_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 |
|---|---|---|---|---|---|---|---|---|
cc649cf9c0f0d800ff9c184c1d1fd449fb52556bc0c27dafcd1d543817f70c15 | symbiont-io/eff-in-anger | server.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
import PetStore.Config
import PetStore.Server
import System.Environment
main :: IO ()
main = do
[devMode, port, payHost, payPort ] <- getArgs
startSer... | null | https://raw.githubusercontent.com/symbiont-io/eff-in-anger/9f3a4aadbe7fa3ae3deda87ae7a624b58fd4748f/pet-store-backend/server/server.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
import PetStore.Config
import PetStore.Server
import System.Environment
main :: IO ()
main = do
[devMode, port, payHost, payPort ] <- getArgs
startServer $ ServerConfig (read devMode) (read port) payHost (read payPort)
|
0dbea2c42a47b063ce9010d7e93ad2fe108f6404ac168aa1270a63e05e76cbe0 | jarohen/clidget | project.clj | (defproject clidget-sample ""
:description "A sample application to demo the Clidget library"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring/ring-core "1.2.0"]
[compojure "1.1.5"]
[hi... | null | https://raw.githubusercontent.com/jarohen/clidget/bd67082ad3819908e2d532151417cab436333ad0/clidget-sample/project.clj | clojure | uncomment for source-maps
:source-map "target/resources/js/clidget-sample.js.map" | (defproject clidget-sample ""
:description "A sample application to demo the Clidget library"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ring/ring-core "1.2.0"]
[compojure "1.1.5"]
[hi... |
6be31d5a8b945b0a2b4437b2ebdbc1d07e7ba897156504c027a0995849f4ef3e | igorhvr/bedlam | srfi-11.scm | (module srfi-11
(let-values let*-values)
(include "../../modules/srfi/srfi-11.scm")
(add-feature 'srfi-11))
| null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/libs/srfi/srfi-11.scm | scheme | (module srfi-11
(let-values let*-values)
(include "../../modules/srfi/srfi-11.scm")
(add-feature 'srfi-11))
| |
d249ca008d8fde7c6c187d690438b91a80e04c5c146b6deafe0da414ad70e81c | racket/plot | point.rkt | #lang typed/racket/base
(require typed/racket/class racket/list racket/match
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(require/typed
"../common/untyped-utils.rkt"
[fix-vector-field3d-fun (-> Symbol
(U (-> ... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/plot3d/point.rkt | racket | ===================================================================================================
=================================================================================================== | #lang typed/racket/base
(require typed/racket/class racket/list racket/match
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(require/typed
"../common/untyped-utils.rkt"
[fix-vector-field3d-fun (-> Symbol
(U (-> ... |
66fe48ea083d0bf5953853cf2701a1c73d702ac5f9c0811dae24acf908baf0ef | jeffshrager/biobike | interface-info.lisp | -*- Package : bio ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :bio)
;; Specification of interface (possibly not up to date)
;; can be found at /
Phage list /~redwards/FIG/Phage.cgi
;; seed glossary: #PEG
Biobike on seed machine : :7001/biologin
;; new wsdl:
good test gid is 217.... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/seedorgs/interface-info.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
Specification of interface (possibly not up to date)
can be found at /
seed glossary: #PEG
new wsdl: |
(in-package :bio)
Phage list /~redwards/FIG/Phage.cgi
Biobike on seed machine : :7001/biologin
good test gid is 217.1
good virus test gid is 12021.1
|
733264313b046bce7874bfc0124eef0c15a15b3848c47de2b4a4c75011b8606e | GlideAngle/flare-timing | Double.hs | module Flight.LatLng.Double (showAngle, degToRad, radToDeg) where
import Data.Text.Lazy (unpack)
import Formatting ((%), format)
import qualified Formatting.ShortFormatters as Fmt (sf)
import Data.UnitsOfMeasure (KnownUnit, Unpack, u)
import Data.UnitsOfMeasure.Show (showUnit, showQuantity)
import Data.UnitsOfMeasure.... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/latlng/library/Flight/LatLng/Double.hs | haskell | | Conversion of degrees to radians.
| Conversion of radians to degrees. | module Flight.LatLng.Double (showAngle, degToRad, radToDeg) where
import Data.Text.Lazy (unpack)
import Formatting ((%), format)
import qualified Formatting.ShortFormatters as Fmt (sf)
import Data.UnitsOfMeasure (KnownUnit, Unpack, u)
import Data.UnitsOfMeasure.Show (showUnit, showQuantity)
import Data.UnitsOfMeasure.... |
e28ad07dd969bb5ca96749239b4d6c22b5912fdca1a6101c00d4600350014621 | ztellman/immutable-bitset | immutable_bitset.clj | (ns immutable-bitset
(:require
[primitive-math :as p])
(:import
[java.util
BitSet]))
(deftype Chunk
[^int generation
^BitSet bitset])
(defn- ^Chunk bitset-chunk [^long generation log2-chunk-size]
(Chunk. generation (BitSet. (p/<< 1 log2-chunk-size))))
(defn- bit-seq [^java.util.BitSet bitset ... | null | https://raw.githubusercontent.com/ztellman/immutable-bitset/63fbe232390522527db021266be29cfcec5c1f33/src/immutable_bitset.clj | clojure | (ns immutable-bitset
(:require
[primitive-math :as p])
(:import
[java.util
BitSet]))
(deftype Chunk
[^int generation
^BitSet bitset])
(defn- ^Chunk bitset-chunk [^long generation log2-chunk-size]
(Chunk. generation (BitSet. (p/<< 1 log2-chunk-size))))
(defn- bit-seq [^java.util.BitSet bitset ... | |
066c762510a51abab72a100538fbf85628e5e1336845cae94eb6ca1192dd406f | askonomm/babe | utils.clj | (ns babe.utils
(:require [clojure.string :as string]
[clojure.instant :as inst]
[clojure.java.io :as io]
[markdown.core :as md])
(:import (clojure.lang PersistentList)))
(defn triml
"Trims the given `trim-char` from the left of `string`."
[string trim-char]
(loop [string ... | null | https://raw.githubusercontent.com/askonomm/babe/83ba8bc597fdc5cffb531182dc17206194f5a4ea/src/babe/utils.clj | clojure | (ns babe.utils
(:require [clojure.string :as string]
[clojure.instant :as inst]
[clojure.java.io :as io]
[markdown.core :as md])
(:import (clojure.lang PersistentList)))
(defn triml
"Trims the given `trim-char` from the left of `string`."
[string trim-char]
(loop [string ... | |
859e5c8e02dbad2bbb5f1ffaac227b042b275baa3e3afe06548c028dce742cbb | ghcjs/ghcjs-base | Pattern.hs | {-# LANGUAGE JavaScriptFFI, ForeignFunctionInterface, DeriveDataTypeable #-}
module JavaScript.Web.Canvas.Pattern {-( Pattern
, Repeat(..)
, create
)-} where
import Data.Typeable
import Data.Data
create ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Web/Canvas/Pattern.hs | haskell | # LANGUAGE JavaScriptFFI, ForeignFunctionInterface, DeriveDataTypeable #
( Pattern
, Repeat(..)
, create
)
# INLINE create #
----------------------------------------------------------------------------- |
import Data.Typeable
import Data.Data
create : : ...
{ - # INLINE create #
create :: ...
foreign import javascript unsafe js_create
:: JSString -> IO Pattern
-}
|
339961d520b34c8d4c2c6be3561df510229af67e19fd695c45385fe5036823fd | rudolph-miller/clipper | config.lisp | (in-package :cl-user)
(defpackage clipper.config
(:use :cl
:annot.doc
:clipper.error
:annot.class)
(:export :*clipper-config*))
(in-package :clipper.config)
(syntax:use-syntax :annot)
(defvar *s3-require-list* (list :aws-access-key :aws-secret-key :s3-endpoint :s3-bucket-name))
(defvar *lo... | null | https://raw.githubusercontent.com/rudolph-miller/clipper/b07a1be210d5504cd67c8e303168cb4bc09f642e/src/config.lisp | lisp | (in-package :cl-user)
(defpackage clipper.config
(:use :cl
:annot.doc
:clipper.error
:annot.class)
(:export :*clipper-config*))
(in-package :clipper.config)
(syntax:use-syntax :annot)
(defvar *s3-require-list* (list :aws-access-key :aws-secret-key :s3-endpoint :s3-bucket-name))
(defvar *lo... | |
1a446abbc95d955a8f6d26ff8d43945e2bd875e7e35d328251d4ddd170419f68 | 3b/cl-opengl | gears-raw.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
gears.lisp --- Lisp version of gears.c ( GLUT Mesa demos ) .
;;;
Simple program with rotating 3 - D gear wheels .
This is an example using the raw bindings to GLUT and CFFI .
Compare with the CLOS version in gears.lisp
(defpackage #:mesademos-gears-raw
(:use #:... | null | https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/examples/mesademos/gears-raw.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Draw front face.
Draw front sides of teeth.
Draw back face.
Draw back sides of teeth.
Draw outward faces of teeth.
Draw inside radius cylinder.
..
Calculating frame rate
bogus?
Make the gears.
red
green
blue
.. | gears.lisp --- Lisp version of gears.c ( GLUT Mesa demos ) .
Simple program with rotating 3 - D gear wheels .
This is an example using the raw bindings to GLUT and CFFI .
Compare with the CLOS version in gears.lisp
(defpackage #:mesademos-gears-raw
(:use #:cl)
(:export #:run))
(in-package #:mesademos-gear... |
f3b4ac830e47cd15770825611bb5a86f9ec404a1f517630f1bb65fd0c804759b | bobbae/gosling-emacs | grep.ml | ; grep.ml -- enables use of UNIX grep command from within EMACS
;
;SYNOPSIS
;
; (grep pattern filenames) -- interface to UNIX grep
;
;
;DESCRIPTION
;
; This function is the interface to the grep program from within
; Emacs. It is not very clean, but it appears to work. It prompts
; for a pattern and a list of file... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/grep.ml | ocaml | ; grep.ml -- enables use of UNIX grep command from within EMACS
;
;SYNOPSIS
;
; (grep pattern filenames) -- interface to UNIX grep
;
;
;DESCRIPTION
;
; This function is the interface to the grep program from within
; Emacs. It is not very clean, but it appears to work. It prompts
; for a pattern and a list of file... | |
c5988a3da51df0b398060c1f65f70901145dea205bf72493e7ef717b278aaccd | ygrek/mldonkey | fileTPGlobals.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/fileTP/fileTPGlobals.ml | ocaml | let redirectors_ips = ref ( [] : Ip.t list)
let min_range_size = megabyte
file_name = file_name;
lprintf "ADD FILE TO DOWNLOAD LIST\n";
add_source r c.client_user index; | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
93b141b5d5aac3e50ec79deb03f2e152e87e3dde649fdd9a8a8d456523e35d2b | hyperfiddle/electric | trace6.cljc | (ns dustin.trace6
(:require [minitest :refer [tests]]
[hyperfiddle.incremental :as I :refer [incr?]]))
(declare flow1 viz ast1 ->Flow compile-incr ast2 flow2 Flow
dag1 dag2 directive! replay! !log1 !log2)
Produce a snapshot of a flow – clearly showing internal as EDN
Recreate a flow from a snapsho... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/trace/trace6.cljc | clojure | by having explicitly marked inputs. Bind node has inputs, closure has stack frame
lexical environment is a stack of frames
This is difference between dataflow and continuations
via notation
inputs and outputs must be reachable
shadow | (ns dustin.trace6
(:require [minitest :refer [tests]]
[hyperfiddle.incremental :as I :refer [incr?]]))
(declare flow1 viz ast1 ->Flow compile-incr ast2 flow2 Flow
dag1 dag2 directive! replay! !log1 !log2)
Produce a snapshot of a flow – clearly showing internal as EDN
Recreate a flow from a snapsho... |
77e8341ada27795828fb2bd5e34f267e5954c33fb3ae48426c44b6a453d1ace3 | nojb/llvm-min-caml | emit.ml | open Llvm
open Gc
open Prim
let the_module : llmodule option ref = ref None
let the_builder = builder (global_context ())
let get_module () =
match !the_module with
| None -> failwith "Emit.get_module: llmodule not initialised"
| Some m -> m
let initialise () =
match !the_module with
| None -> the_module... | null | https://raw.githubusercontent.com/nojb/llvm-min-caml/68703b905f8292cb2e20b41bbd90cfea85ca2a19/emit.ml | ocaml | XXX
FIXME XXX the malloc should come BEFORE the atom env a's so that
* they are loaded after the malloc! - otherwise there is not
* much point in spilling them to the stack.
this is needed so that the
new_block "start" below works!
let b = builder_at_end (global_context ()) (entry_block f) in
X... | open Llvm
open Gc
open Prim
let the_module : llmodule option ref = ref None
let the_builder = builder (global_context ())
let get_module () =
match !the_module with
| None -> failwith "Emit.get_module: llmodule not initialised"
| Some m -> m
let initialise () =
match !the_module with
| None -> the_module... |
dcb099738eae9ed1091c313071a0ce3b74400134cacce4e4e9b41cccf2788f20 | louispan/ghcjs-base-stub | Callback.hs | {-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes,
GHCForeignImportPrim, DeriveDataTypeable, GHCForeignImportPrim #-}
module GHCJS.Foreign.Callback
( Callback
, OnBlocked(..)
, releaseCallback
-- * asynchronous callbacks
, asyncCallback
, asyncCallback1
, ... | null | https://raw.githubusercontent.com/louispan/ghcjs-base-stub/8eaee240c9af1a2290f4572a87528f3ddb3e9f12/src/GHCJS/Foreign/Callback.hs | haskell | # LANGUAGE ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes,
GHCForeignImportPrim, DeriveDataTypeable, GHCForeignImportPrim #
* asynchronous callbacks
* synchronous callbacks
* synchronous callbacks that return a value
^ what to do when the thread blocks
^ the callback
^ what to do when the ... | module GHCJS.Foreign.Callback
( Callback
, OnBlocked(..)
, releaseCallback
, asyncCallback
, asyncCallback1
, asyncCallback2
, asyncCallback3
, syncCallback
, syncCallback1
, syncCallback2
, syncCallback3
, syncCallback'
, syncCallback1'
, syncCallback2'
, syn... |
c898030dabf30569ccb8ea3848949a9b0e766315d7351d150995eac8a67384b2 | nixeagle/cl-irc | parse-message.lisp | $ Id$
$ URL$
;;;; See the LICENSE file for licensing information.
(in-package :irc)
(defun find-reply-name (reply-number &key (reply-names *reply-names*))
"Numeric replies in the IRC RFCs have more meaningful names. Given
a numeric reply (`reply-number') this function will either return the
symbol representin... | null | https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/trunk/parse-message.lisp | lisp | See the LICENSE file for licensing information.
GET
TSGET
RECV
SRECV
TRECV
STRECV
TSRECV
STRSEND
TSRSEND
VOICE
((irc-error-reply-p command)
Disable for now, as it prevents adding hooks for some useful
error types | $ Id$
$ URL$
(in-package :irc)
(defun find-reply-name (reply-number &key (reply-names *reply-names*))
"Numeric replies in the IRC RFCs have more meaningful names. Given
a numeric reply (`reply-number') this function will either return the
symbol representing the reply or raise a continuable error
(`no-such-re... |
311006941da49cc449da96d345e3eb410b4a1767421d23a7c6d11e68f60df763 | fogfish/uid | uid_SUITE.erl | %%
Copyright 2012 , All Rights Reserved
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing... | null | https://raw.githubusercontent.com/fogfish/uid/d797d2403e1f3fd05236e5ab61d9a4e25420d608/test/uid_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2012 , 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(uid_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
-export([
native_format/1
, cast/1
, cast_... |
bc3ef07681d05200b09171f8d05920e82310c378fc93d00d4f08e099e2b3ba54 | janestreet/core | command.ml |
open! Base
open! Import
include Command_intf
module Shape = Shape
(* in order to define expect tests, we want to raise rather than exit if the code is
running in the test runner process *)
let raise_instead_of_exit =
match Ppx_inline_test_lib.testing with
| `Testing `Am_test_runner -> true
| `Testing `Am_chi... | null | https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/command/src/command.ml | ocaml | in order to define expect tests, we want to raise rather than exit if the code is
running in the test runner process
[raise_instead_of_exit]-respecting wrappers for [exit] and functions that call it
See [run_and_exit] - no completions is equivalent to not having a
[Complete].
[aliases_excluded_from... |
open! Base
open! Import
include Command_intf
module Shape = Shape
let raise_instead_of_exit =
match Ppx_inline_test_lib.testing with
| `Testing `Am_test_runner -> true
| `Testing `Am_child_of_test_runner | `Not_testing -> false
;;
exception Exit_called of { status : int } [@@deriving sexp_of]
include struct
... |
a67c6f1896e2b3cab2adaf4a39f2808bc20afbfceeebaf6ef23fd03183669e6d | hoplon/hoplon | attribute_test.cljs | (ns hoplon.attribute-test
(:require
[hoplon.core :as h]
hoplon.jquery
[cljs.test :refer-macros [deftest is]]))
(deftest ??attribute
(let [el (h/div :baz "foo")]
(is (= (:baz el) "foo"))
(is (= (:bar el "bar") "bar"))
(is (= (get el :baz) "foo"))
(is (= (get el :bar "bar") "bar"))))
| null | https://raw.githubusercontent.com/hoplon/hoplon/2f886d10d942e72e4565dfbb997487e90c8d5e3a/tst/src/cljs/hoplon/attribute_test.cljs | clojure | (ns hoplon.attribute-test
(:require
[hoplon.core :as h]
hoplon.jquery
[cljs.test :refer-macros [deftest is]]))
(deftest ??attribute
(let [el (h/div :baz "foo")]
(is (= (:baz el) "foo"))
(is (= (:bar el "bar") "bar"))
(is (= (get el :baz) "foo"))
(is (= (get el :bar "bar") "bar"))))
| |
2c2861a88199771bf5481a0ed03ea0ce7daf0063a116852e8595eeb132898a99 | haskell/haskell-language-server | Debug.hs | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE TypeApplications #
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Wingman.Debug
( unsafeRender
, unsafeRender'
, traceM
, traceShowId
, trace
, traceX
, traceIdX
, traceMX
, traceFX
... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/src/Wingman/Debug.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
# OPTIONS_GHC -Wno-unused-imports #
----------------------------------------------------------------------------
| Print something
We might not have unsafeGlobalDynFlags (like during testing), in which | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE TypeApplications #
module Wingman.Debug
( unsafeRender
, unsafeRender'
, traceM
, traceShowId
, trace
, traceX
, traceIdX
, traceMX
, traceFX
) where
import Control.DeepSeq
import Control.Exception
import ... |
0ddb4cc077e40a1706e7875f67466344be41d06063e0b82d2aa01a89bed3706b | music-suite/music-suite | update5.hs |
# LANGUAGE
MultiParamTypeClasses ,
TypeFamilies ,
DeriveFunctor ,
DeriveFoldable ,
DeriveTraversable ,
FlexibleInstances ,
FlexibleContexts ,
ConstraintKinds ,
NoMonomorphismRestriction ,
UndecidableInstances ,
RankNTypes ,
DefaultSignatures ,
... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/sketch/old/update/update5.hs | haskell | import qualified Music.Pitch as M
setPitch' = setPitch
mapPitch' = mapPitch
Undecidable ??
getPitch = id
getPitch = id
type HasInterval a = (Floating (Interval a), M.InnerSpace (Interval a), M.Scalar (Interval a) ~ (Interval a))
interval x y = (x^.pitch) `distance` (y^.pitch)
invert p = pitch %~ refl... |
# LANGUAGE
MultiParamTypeClasses ,
TypeFamilies ,
DeriveFunctor ,
DeriveFoldable ,
DeriveTraversable ,
FlexibleInstances ,
FlexibleContexts ,
ConstraintKinds ,
NoMonomorphismRestriction ,
UndecidableInstances ,
RankNTypes ,
DefaultSignatures ,
... |
b01d00d4008db7c873349b31f26472146b1408a0e3e4a390587bf43d76bf03bd | inclojure-org/intermediate-clojure-workshop | core.clj | (ns workshop-app.core
(:gen-class)
(:require [ring.adapter.jetty :as raj]
[ring.middleware.params :as rmp]
[ring.middleware.keyword-params :as rmkp]
[workshop-app.middlewares.users :as wamu]
[workshop-app.routes :as war]))
(defn -main
[& _]
(raj/run-jetty (-> wa... | null | https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/5/src/workshop_app/core.clj | clojure | (ns workshop-app.core
(:gen-class)
(:require [ring.adapter.jetty :as raj]
[ring.middleware.params :as rmp]
[ring.middleware.keyword-params :as rmkp]
[workshop-app.middlewares.users :as wamu]
[workshop-app.routes :as war]))
(defn -main
[& _]
(raj/run-jetty (-> wa... | |
3299ac6b014ca25858821715003d17b1f0ad358457d91216d53e30d37de75a09 | JohnnyJayJay/poker | waiting.clj | (ns poker.discord.waiting
(:require [discljord.formatting :as dfmt]
[discljord.messaging :as dr]
[slash.component.structure :as cmp]
[slash.response :as rsp]
[clojure.string :as str]
[clojure.core.async :as a :refer [chan go <!]]
[poker.discord.s... | null | https://raw.githubusercontent.com/JohnnyJayJay/poker/ec8dea05db30fcad9dafe22d642736fb6ee273ed/src/poker/discord/waiting.clj | clojure | Already joined?
Game already full? (should usually not occur because the join button will be disabled in that case)
Game is a continuation of a previous round, not open to new players and the user is a new player?
If none of the above, you're good to join
Wait for abort or start/timeout signal
Remove game from wa... | (ns poker.discord.waiting
(:require [discljord.formatting :as dfmt]
[discljord.messaging :as dr]
[slash.component.structure :as cmp]
[slash.response :as rsp]
[clojure.string :as str]
[clojure.core.async :as a :refer [chan go <!]]
[poker.discord.s... |
4dcdb198a7bbf377e823d7437dad3df7dceb77400956bae7b8cc211dd51dc3fe | avsm/eeww | acme_client.ml | open Acme_common
let src = Logs.Src.create "letsencrypt" ~doc:"let's encrypt library"
module Log = (val Logs.src_log src : Logs.LOG)
let ( let* ) = Result.bind
let guard p err = if p then Ok () else Error err
let key_authorization key token =
let pk = X509.Private_key.public key in
let thumbprint = Jwk.thumbpri... | null | https://raw.githubusercontent.com/avsm/eeww/b15e7dac7d1f07b2b67abfbe76cf056635f520b8/lib/letsencrypt/src/acme_client.ml | ocaml | extension value is an octet_string of the hash
at least staging doesn't include orders
well, here we may encounter some orders which should be processed
(or cancelled, considering the lack of a csr)!
not entirely clear why this now is {} and not ""
good news is that we already ensured that the solver an... | open Acme_common
let src = Logs.Src.create "letsencrypt" ~doc:"let's encrypt library"
module Log = (val Logs.src_log src : Logs.LOG)
let ( let* ) = Result.bind
let guard p err = if p then Ok () else Error err
let key_authorization key token =
let pk = X509.Private_key.public key in
let thumbprint = Jwk.thumbpri... |
ddc2c9b040a65e412b3c12df6044e46ae47537caac806632bc6bad764f4c9319 | wavewave/hxournal | Network.hs | module Application.HXournal.Coroutine.Network where
import Application.HXournal.Type.XournalState
import Application.HXournal.Type.Coroutine
import Application.HXournal.Type.Event
import Application.HXournal.ModelAction.Network
import Application.HXournal.ModelAction.Select
import Application.HXournal.Accessor
import... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Coroutine/Network.hs | haskell | Iteratee MyEvent XournalStateIO ()
Iteratee MyEvent XournalStateIO () | module Application.HXournal.Coroutine.Network where
import Application.HXournal.Type.XournalState
import Application.HXournal.Type.Coroutine
import Application.HXournal.Type.Event
import Application.HXournal.ModelAction.Network
import Application.HXournal.ModelAction.Select
import Application.HXournal.Accessor
import... |
462c07bdf5be066b86e8909c885081a2a2f23011f74134b8a8c60766e33c9522 | wz1000/hie-lsp | TH.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
# LANGUAGE PolyKinds #
#endif
module Data.GADT.Compare.TH
( DeriveGEQ(..)
, DeriveGCompare(..)
, GComparing, runGCompa... | null | https://raw.githubusercontent.com/wz1000/hie-lsp/dbb3caa97c0acbff0e4fd86fc46eeea748f65e89/dependent-sum-template-0.0.0.6/src/Data/GADT/Compare/TH.hs | haskell | # LANGUAGE GADTs #
A type class purely for overloading purposes
TODO: figure out proper number of family parameters vs instance parameters
A monad allowing gcompare to be defined in the same style as geq
TODO: figure out proper number of family parameters vs instance parameters
arguments) then add catch-all cases;... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
# LANGUAGE PolyKinds #
#endif
module Data.GADT.Compare.TH
( DeriveGEQ(..)
, DeriveGCompare(..)
, GComparing, runGComparing, geq', compare'
... |
90b5644a43597968f9df50da5299fda464adc4265508c2d2446becaeb05b6082 | ndmitchell/record-dot-preprocessor | travis.hs |
import Control.Monad
import Data.List
import System.Exit
import System.Process.Extra
main = do
system_ "chmod go-w .ghci"
system_ "chmod go-w ."
(code, xs) <- systemOutput "ghc -e \":test --installed\""
putStrLn xs
when (code /= ExitSuccess || not ("Success" `isInfixOf` xs)) $
putStrLn "Ru... | null | https://raw.githubusercontent.com/ndmitchell/record-dot-preprocessor/4b3f4f70823f5cd63d84332fb6c62700d0a04636/travis.hs | haskell | installed\"" |
import Control.Monad
import Data.List
import System.Exit
import System.Process.Extra
main = do
system_ "chmod go-w .ghci"
system_ "chmod go-w ."
putStrLn xs
when (code /= ExitSuccess || not ("Success" `isInfixOf` xs)) $
putStrLn "Running the test did not succeed"
|
5629456c1d1527d049ebcaa61ebdadad63a7bb9f68dd42f8e1dce5252de90301 | silverpond/hat | validation.clj | (ns hat.validation
(:require [vlad.validation-types :refer [validate]]))
; TODO: This pattern can probably be used for auth as well
(defn flatten-rules [rules]
(->> rules
(mapcat (fn [[resource methods]]
(map (fn [[method validator]]
[[resource method] validator])
... | null | https://raw.githubusercontent.com/silverpond/hat/4e4a5dd89cac29c0a0cf68e4f02b76523e096276/src/hat/validation.clj | clojure | TODO: This pattern can probably be used for auth as well | (ns hat.validation
(:require [vlad.validation-types :refer [validate]]))
(defn flatten-rules [rules]
(->> rules
(mapcat (fn [[resource methods]]
(map (fn [[method validator]]
[[resource method] validator])
methods)))
(into {})))
(defn in... |
c9b71953603c2338bf6840470d0090bcf78758f837dbdb62d21d442c0de30b61 | antoniogarrote/mahout-vis | Visualization.clj | (ns mahout-vis.Visualization
(:use [mahout-vis.core])
(:gen-class
:methods [#^{:static true} [plot [String String "[Ljava.lang.Object;" "[Ljava.lang.Object;" java.util.HashMap] "[Lorg.jfree.chart.JFreeChart;"]
#^{:static true} [start [String] void]]))
(defn -start
([conf-file]
(bootstrap! co... | null | https://raw.githubusercontent.com/antoniogarrote/mahout-vis/d9ac8771095f1bc7686df956a2a7d719c01bcf17/src/mahout_vis/Visualization.clj | clojure | (ns mahout-vis.Visualization
(:use [mahout-vis.core])
(:gen-class
:methods [#^{:static true} [plot [String String "[Ljava.lang.Object;" "[Ljava.lang.Object;" java.util.HashMap] "[Lorg.jfree.chart.JFreeChart;"]
#^{:static true} [start [String] void]]))
(defn -start
([conf-file]
(bootstrap! co... | |
c6c06a4a35a166bb1f9685cd8d647c667a4bded92d912b6984e4c548668f9038 | inaka/elvis_core | pass_dont_repeat_yourself_elvis_attr.erl | -module(pass_dont_repeat_yourself_elvis_attr).
-export([
repeated_complexity_5/2,
repeated_complexity_10/2
]).
-elvis([{elvis_style, dont_repeat_yourself, #{min_complexity => 13}},
{elvis_style, no_debug_call, disable},
{elvis_style, function_naming_convention, #{regex => "^[... | null | https://raw.githubusercontent.com/inaka/elvis_core/468bd3498f1782fd74ef3d8eb1b36217b0b76c11/test/examples/pass_dont_repeat_yourself_elvis_attr.erl | erlang | -module(pass_dont_repeat_yourself_elvis_attr).
-export([
repeated_complexity_5/2,
repeated_complexity_10/2
]).
-elvis([{elvis_style, dont_repeat_yourself, #{min_complexity => 13}},
{elvis_style, no_debug_call, disable},
{elvis_style, function_naming_convention, #{regex => "^[... | |
717bc5740d944085994331a0ab645f517aaf03e3588473cb74f701650409f354 | ryukzak/nitta | Explore.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE NoMonomorphismRestriction #
|
Module : NITTA.Synthesis . Explore
Description : Explore synthesis tree
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Synthesis.Explore
Description : Ex... | null | https://raw.githubusercontent.com/ryukzak/nitta/1e1e571fd73b2cb9bea4e5781bf658e7edd264c0/src/NITTA/Synthesis/Explore.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Make synthesis tree
| Get list of all nodes from root to selected.
* Internal | # LANGUAGE NoMonomorphismRestriction #
|
Module : NITTA.Synthesis . Explore
Description : Explore synthesis tree
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Synthesis.Explore
Description : Explore synthesis tree
Copyright : (c) Aleksandr Pe... |
08204508b8bbc3ee48f8f5fd0f5c0ffb346e5de874ad5708c286697c69c82495 | ekmett/reducers | Generator.hs | # LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies , CPP #
#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
-- Module ... | null | https://raw.githubusercontent.com/ekmett/reducers/605d56e5824d35276df50ad0875f63c73cf4659d/src/Data/Semigroup/Generator.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Semigroup.Generator
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
A 'Generator1' @c@ is a possibly-specialized container, which contains values of
type 'Elem' @c@, an... | # LANGUAGE UndecidableInstances , TypeOperators , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , TypeFamilies , CPP #
#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
# LANGUAGE Trustworthy #
#endif
Copyright : ( c ) 2009
module Data.Semigroup.Generator
(
Generator1(..)
, r... |
a5d8897e17dfbf0f686d6d8b8e46095ac47c59f698426a023136e66b5471aab2 | moquist/datomic-schematode | constraints_test.clj | (ns datomic-schematode.constraints-test
(:require [clojure.test :refer :all]
[datomic.api :as d]
[datomic-schematode :as dst]
[datomic-schematode.constraints :as ds-constraints]
[datomic-schematode.constraints-test.config :as config]
[datomic-schematode.test... | null | https://raw.githubusercontent.com/moquist/datomic-schematode/b73206fc86bb61bc97ddd5df55f7441bf5fc0447/test/datomic_schematode/constraints_test.clj | clojure | #db/fn breaks the reader, and this (str (sort (into ...))) was
the only way around it that I could think of. Anybody have a
better idea? | (ns datomic-schematode.constraints-test
(:require [clojure.test :refer :all]
[datomic.api :as d]
[datomic-schematode :as dst]
[datomic-schematode.constraints :as ds-constraints]
[datomic-schematode.constraints-test.config :as config]
[datomic-schematode.test... |
0a485068262f8bdcb40a6d923939d3a537a88ef0d9b1f2401ead036d24a337b4 | dannypsnl/racket-llvm | write-bitcode.rkt | #lang racket
(require racket-llvm)
(define mod (llvm-module "test_mod"))
(define sum (llvm-add-function mod "sum" (llvm-function-type (llvm-int32-type) (list (llvm-int32-type) (llvm-int32-type)))))
(define entry (llvm-append-basic-block sum))
(define builder (llvm-builder-create))
(llvm-builder-position-at-end builde... | null | https://raw.githubusercontent.com/dannypsnl/racket-llvm/b712d0058fc354bd20d0e4f3d12593979d5ff2fc/examples/write-bitcode.rkt | racket | #lang racket
(require racket-llvm)
(define mod (llvm-module "test_mod"))
(define sum (llvm-add-function mod "sum" (llvm-function-type (llvm-int32-type) (list (llvm-int32-type) (llvm-int32-type)))))
(define entry (llvm-append-basic-block sum))
(define builder (llvm-builder-create))
(llvm-builder-position-at-end builde... | |
15774f73993a132172748bfb588338006a3f76a3a0fc5b32b3ebf8fa99b889c1 | pirapira/coq2rust | context.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/kernel/context.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* TODO: cleanup
* {6 Signatures of ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
* { 6 Declaratio... |
5236b2402a3243f1221aa12e1fad180c24314b2ff903a590de715d2342bd47d8 | racket/macro-debugger | stx-util.rkt | #lang racket/base
(require syntax/stx)
(provide stx->datum
stxd-car
stxd-cdr
syntaxish?
stx-disarm
resyntax
restx
syntax-armed?
syntax-armed/tainted?
syntax-unarmed?
property:unlocked-by-expander
property:artificial
... | null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger-text-lib/macro-debugger/model/stx-util.rkt | racket | Used to communicate with syntax-browser | #lang racket/base
(require syntax/stx)
(provide stx->datum
stxd-car
stxd-cdr
syntaxish?
stx-disarm
resyntax
restx
syntax-armed?
syntax-armed/tainted?
syntax-unarmed?
property:unlocked-by-expander
property:artificial
... |
4c30a310051dd2ad20da8d50cb778be16de70065bc0b378d5644c8e5db4a2063 | technomancy/leiningen | project.clj | (defproject org.domain/tricky-name "1.0"
:description "One with a tricky group and project name"
:dependencies [[org.clojure/clojure "1.3.0"]]
:main ^{:skip-aot true} org.domain.tricky-name.core)
| null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/tricky-name/project.clj | clojure | (defproject org.domain/tricky-name "1.0"
:description "One with a tricky group and project name"
:dependencies [[org.clojure/clojure "1.3.0"]]
:main ^{:skip-aot true} org.domain.tricky-name.core)
| |
0729a2325f2541782e3c53d20ea9b59441179f838bfdb25f455685c1e06927a2 | DavidVujic/clojurescript-amplified | views.cljs | (ns app.amplified.views
(:require [app.amplified.auth :as auth]
[app.amplified.subs]
[app.components.top :as top]
[app.components.user :as user]
[re-frame.core :as rf]
[app.amplified.api.update :as update-api]
[reagent-mui.components :refer [stac... | null | https://raw.githubusercontent.com/DavidVujic/clojurescript-amplified/fce9c84f416cf0fc9f7caa82c0f13b27d6fcdde7/src/main/app/amplified/views.cljs | clojure | (ns app.amplified.views
(:require [app.amplified.auth :as auth]
[app.amplified.subs]
[app.components.top :as top]
[app.components.user :as user]
[re-frame.core :as rf]
[app.amplified.api.update :as update-api]
[reagent-mui.components :refer [stac... | |
91dd1fd8cfc856e9d081fe5d8127804039ac9abce26c11f0a5e7d565740a619e | threatgrid/ctim | openc2_network_sdn.cljc | (ns ctim.schemas.openc2-network-sdn
(:require #?(:clj [flanders.core :as f :refer [def-enum-type def-map-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-enum-type def-map-type def-eq]])))
(def-enum-type ScanMethods
#{"arp"
"ping"
"tcpsyn"
"udpprobe"})
(def-eq ScanTypeIdent... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/schemas/openc2_network_sdn.cljc | clojure | (ns ctim.schemas.openc2-network-sdn
(:require #?(:clj [flanders.core :as f :refer [def-enum-type def-map-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-enum-type def-map-type def-eq]])))
(def-enum-type ScanMethods
#{"arp"
"ping"
"tcpsyn"
"udpprobe"})
(def-eq ScanTypeIdent... | |
bff5799bd1eef8f9cf641648663e7f045e94ba2a2c0ca81857add8dae0227602 | fgalassi/cs61a-sp11 | test-stop-at.scm | (load "load-simply")
(load "stop-at")
(load "assert")
(define stop-at-0 (stop-at 0))
(assert equal? (stop-at-0 '() 'as) #f "empty hand -> #f")
(assert equal? (stop-at-0 '(2s) 'as) #f "2s -> #f")
(define stop-at-3 (stop-at 3))
(assert equal? (stop-at-3 '() 'as) #t "empty hand -> #t")
(assert equal? (stop-at-3 '(2s) 'a... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/projects/blackjack/normal/test-stop-at.scm | scheme | (load "load-simply")
(load "stop-at")
(load "assert")
(define stop-at-0 (stop-at 0))
(assert equal? (stop-at-0 '() 'as) #f "empty hand -> #f")
(assert equal? (stop-at-0 '(2s) 'as) #f "2s -> #f")
(define stop-at-3 (stop-at 3))
(assert equal? (stop-at-3 '() 'as) #t "empty hand -> #t")
(assert equal? (stop-at-3 '(2s) 'a... | |
ccd18c7f3556ad773538ce12c9543b73f984dc8326158fcacc062014c5b583c9 | cpsc411/cpsc411-pub | test-mlang.rkt | #lang racket/base
(require
syntax/readerr
"../test-suite/utils.rkt")
(provide
(rename-out
[$-read read]
[$-read-syntax read-syntax]))
(define ($-read in)
(parameterize ([current-readtable (make-$-readtable)])
(read in)))
(define ($-read-syntax src in)
(parameterize ([current-readtable (make-$-readtab... | null | https://raw.githubusercontent.com/cpsc411/cpsc411-pub/757ececf84d54d86cfa0c2c6c84f1456c8765db9/cpsc411-lib/cpsc411/test-lang/test-mlang.rkt | racket | #lang racket/base
(require
syntax/readerr
"../test-suite/utils.rkt")
(provide
(rename-out
[$-read read]
[$-read-syntax read-syntax]))
(define ($-read in)
(parameterize ([current-readtable (make-$-readtable)])
(read in)))
(define ($-read-syntax src in)
(parameterize ([current-readtable (make-$-readtab... | |
3bf775d88a03fe3834102dc32f6d5e3972eab5a137bb2e9c1a107084efdd082e | lasp-lang/types | state_mvregister.erl | %%
Copyright ( c ) 2015 - 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/lasp-lang/types/e35b9b3a32b8f580daff1a7d1102813ad530835e/src/state_mvregister.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 permissions and limitations
under the License.
----------------------------... | Copyright ( c ) 2015 - 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
, , and
... |
52fada68d6cb3c8af7805589d534a4e6f2c71bc8820f47494e923a170329c67b | shterrett/haskell-road | Chapter2.hs | # LANGUAGE FlexibleInstances #
module Chapter2 where
import Book.TAMO
-- ex 2.15
isContradiction1 :: (Bool -> Bool) -> Bool
isContradiction1 p = not ((p False) || (p True))
isContradiction2 :: (Bool -> Bool -> Bool) -> Bool
isContradiction2 p = not (or [ p a b | a <- [True, False],
... | null | https://raw.githubusercontent.com/shterrett/haskell-road/4af8253fc4475e5689b0ce59da468a3a6c92872e/src/Chapter2.hs | haskell | ex 2.15
ex 2.51 | # LANGUAGE FlexibleInstances #
module Chapter2 where
import Book.TAMO
isContradiction1 :: (Bool -> Bool) -> Bool
isContradiction1 p = not ((p False) || (p True))
isContradiction2 :: (Bool -> Bool -> Bool) -> Bool
isContradiction2 p = not (or [ p a b | a <- [True, False],
b <- [... |
0cc96cb8df8b3dccd103541978a5220a34279dc643624c34bf312c94930b277d | typelead/intellij-eta | EtlasModuleBuilder.hs | module IntelliJ.Plugin.Eta.Project.Module.EtlasModuleBuilder where
import P
import FFI.Com.IntelliJ.Ide.Util.ProjectWizard.EmptyModuleBuilder (EmptyModuleBuilder)
import FFI.Com.IntelliJ.Ide.Util.ProjectWizard.JavaModuleBuilder (JavaModuleBuilder)
import FFI.Com.IntelliJ.Ide.Util.Project... | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/IntelliJ/Plugin/Eta/Project/Module/EtlasModuleBuilder.hs | haskell | if isNewProj then do
this <- getThis
arrayFromList =<< sequence [newEtlasStep this wizardContext]
else
arrayFromList []
newEtlasStep :: EtlasModuleBuilder -> WizardContext -> Java a ModuleWizardStep
where
mkModuleWizardStepUpdateDataModel = undefined
TODO: Need to add locateExecutableByGues... | module IntelliJ.Plugin.Eta.Project.Module.EtlasModuleBuilder where
import P
import FFI.Com.IntelliJ.Ide.Util.ProjectWizard.EmptyModuleBuilder (EmptyModuleBuilder)
import FFI.Com.IntelliJ.Ide.Util.ProjectWizard.JavaModuleBuilder (JavaModuleBuilder)
import FFI.Com.IntelliJ.Ide.Util.Project... |
4e60392f5d7f5ed20612345339f22be4aac4198513c0533527dc6e333aecc62e | inria-parkas/sundialsml | ark_twowaycouple_mri.ml | ------------------------------------------------------------------
* Programmer(s ): @ LLNL
* ------------------------------------------------------------------
* OCaml port : , , Aug 2020 .
* ---------------------------------------------------------------
* Based a linear example program by Ruje... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/examples/arkode/C_serial/ark_twowaycouple_mri.ml | ocaml | ------------------------------
* Functions called by the solver
* ------------------------------
ff routine to compute the fast portion of the ODE RHS.
fs routine to compute the slow portion of the ODE RHS.
general problem parameters
initial time
final time
time between outputs
number of output times
... | ------------------------------------------------------------------
* Programmer(s ): @ LLNL
* ------------------------------------------------------------------
* OCaml port : , , Aug 2020 .
* ---------------------------------------------------------------
* Based a linear example program by Ruje... |
5a6b2204c56df3a202404e40baf5e9e2b0061628e63879d794f0ef34dc6cac67 | timjb/halma | Draw.hs | # LANGUAGE FlexibleContexts , TypeFamilies #
module Game.Halma.Board.Draw
( defaultTeamColours
, drawBoard', drawBoard
) where
import Game.Halma.Board
import Diagrams.Prelude
import Math.Geometry.Grid
defaultTeamColours :: Team -> Colour Double
defaultTeamColours team =
-- colors from /
case team of
N... | null | https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma/src/Game/Halma/Board/Draw.hs | haskell | colors from /
blue
green
purple
red
black
orange
| Render the board using the helper function for drawing the fields.
Supports querying for field positions.
| Render the board using the given team colors. Supports querying for field
positions. | # LANGUAGE FlexibleContexts , TypeFamilies #
module Game.Halma.Board.Draw
( defaultTeamColours
, drawBoard', drawBoard
) where
import Game.Halma.Board
import Diagrams.Prelude
import Math.Geometry.Grid
defaultTeamColours :: Team -> Colour Double
defaultTeamColours team =
case team of
drawBoard'
:: (V b ~ ... |
817172248d72f0ef7472f75d9b6d5a44e12c958d980684d50aa1d4808c089d1d | typedclojure/typedclojure | protocol_scoping.clj | (ns clojure.core.typed.test.protocol-scoping
(:require [typed.clojure :as t]))
(t/defprotocol NonPoly
(nonpoly [this]))
(t/ann-datatype DNP [])
(deftype DNP []
NonPoly
(nonpoly [this] this))
(t/defprotocol
[[foo :variance :covariant]]
Foo
(bar- [this] :- foo))
(t/ann-datatype FooD [t :- t/Symbol]
... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/protocol_scoping.clj | clojure | (ns clojure.core.typed.test.protocol-scoping
(:require [typed.clojure :as t]))
(t/defprotocol NonPoly
(nonpoly [this]))
(t/ann-datatype DNP [])
(deftype DNP []
NonPoly
(nonpoly [this] this))
(t/defprotocol
[[foo :variance :covariant]]
Foo
(bar- [this] :- foo))
(t/ann-datatype FooD [t :- t/Symbol]
... | |
00fb923ca79fc623e3467d8bba3ca4e64bcbe0be658e273d61b916f8c211bd90 | ComputeSoftware/gcp-api | java_http_clj.clj | (ns compute.gcp.java-http-clj
(:require
[clojure.string :as str]
[cognitect.anomalies :as anom]
[java-http-clj.core :as http]
[compute.gcp.protocols :as proto])
(:import (java.net.http HttpConnectTimeoutException HttpTimeoutException)
(java.time Duration)
(java.net URLEncoder))... | null | https://raw.githubusercontent.com/ComputeSoftware/gcp-api/24204927554a3e3b69ef2917f139b53f05def52e/src/compute/gcp/java_http_clj.clj | clojure | (ns compute.gcp.java-http-clj
(:require
[clojure.string :as str]
[cognitect.anomalies :as anom]
[java-http-clj.core :as http]
[compute.gcp.protocols :as proto])
(:import (java.net.http HttpConnectTimeoutException HttpTimeoutException)
(java.time Duration)
(java.net URLEncoder))... | |
933f725bb6ce623f9ded596ffcc5be8c807b7a472123f3445e9e848b4c2cd276 | soulomoon/SICP | Exercise 1.16.scm | Exercise 1.16 : Design a procedure that evolves an iterative exponentiation process that uses successive squaring and uses a logarithmic number of steps , as does fast - expt . ( Hint : Using the observation that ( bn/2)2=(b2)n/2(bn/2)2=(b2)n/2 , keep , along with the exponent nn and the base bb , an additional state... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter1/Exercise%201.16.scm | scheme | Exercise 1.16 : Design a procedure that evolves an iterative exponentiation process that uses successive squaring and uses a logarithmic number of steps , as does fast - expt . ( Hint : Using the observation that ( bn/2)2=(b2)n/2(bn/2)2=(b2)n/2 , keep , along with the exponent nn and the base bb , an additional state... | |
4053b267ce888970178925723a4779f7f0138d1be2828b4065c614482250d2d1 | RyanGlScott/text-show | IntegralSpec.hs | # LANGUAGE CPP #
|
Module : Spec . Data . IntegralSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for integral data types .
Module: Spec.Data.IntegralSpec
Copyright: (C)... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/Data/IntegralSpec.hs | haskell | # LANGUAGE CPP #
|
Module : Spec . Data . IntegralSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for integral data types .
Module: Spec.Data.IntegralSpec
Copyright: (C)... | |
61ed27895043deb90687421032def8cf68afb06ae2caabae89335a14305dbfd2 | nickewing/netz | core.clj | (ns netz.core
(:use incanter.core))
(defn report-callback
[network epoch mse complete]
(if complete
(println "Finished Epoch" epoch "MSE" mse)
(println "Epoch" epoch "MSE" mse))
true)
(def default-options
{:max-epochs 20000
:desired-error 0.005
:callback report-callback
:callback-resolution... | null | https://raw.githubusercontent.com/nickewing/netz/8103cb947f7fea989f12aec5debed7823950ac06/src/netz/core.clj | clojure | (ns netz.core
(:use incanter.core))
(defn report-callback
[network epoch mse complete]
(if complete
(println "Finished Epoch" epoch "MSE" mse)
(println "Epoch" epoch "MSE" mse))
true)
(def default-options
{:max-epochs 20000
:desired-error 0.005
:callback report-callback
:callback-resolution... | |
43f9c03495806be7903e9b1644671ee414da3fb0ee9ef70926e76e12c7c0c5ad | fulcro-legacy/semantic-ui-wrapper | ui_feed_extra.cljs | (ns fulcrologic.semantic-ui.views.feed.ui-feed-extra
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/views/Feed/FeedExtra" :default FeedExtra]))
(def ui-feed-extra
"A feed can contain an extra content.
Props:
- as (custom): An element type to render as (... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/views/feed/ui_feed_extra.cljs | clojure | (ns fulcrologic.semantic-ui.views.feed.ui-feed-extra
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/views/Feed/FeedExtra" :default FeedExtra]))
(def ui-feed-extra
"A feed can contain an extra content.
Props:
- as (custom): An element type to render as (... | |
6260621af2e83b4f983c03fcdb9d0ca935c5eb63c97d9fa2fa96458d28bcab53 | eslick/cl-registry | patches.lisp | ;; -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil; -*-
(in-package :registry)
(defun patch-function-name (app version ticket tag)
"Construct a canonical function name for patch referred to by APP, VERSION, TICKET, and TAG."
(intern (format nil "PATCH-~A~@[-~A~]~@[-~A~]~@[-~A~]"
(or app "REGISTRY") version t... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/patches/patches.lisp | lisp | -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil; -*- |
(in-package :registry)
(defun patch-function-name (app version ticket tag)
"Construct a canonical function name for patch referred to by APP, VERSION, TICKET, and TAG."
(intern (format nil "PATCH-~A~@[-~A~]~@[-~A~]~@[-~A~]"
(or app "REGISTRY") version ticket (and tag (string tag)))))
(defmacro defpatch ((app... |
99a15a65b8f492421f435006f46aef2da7fc13885a6992f2a2acd02e8130da4f | rbardou/red | character.mli | (** UTF8-encoded characters. *)
(** Characters which should be displayed in exactly one cell. *)
type t = string
(** Make a character from an ASCII [char]. *)
val of_ascii: char -> t
(** Test whether a character is a character that can be part of a word.
Letters or digits are word characters.
Symbols, such ... | null | https://raw.githubusercontent.com/rbardou/red/e23c2830909b9e5cd6afe563313435ddaeda90bf/src/character.mli | ocaml | * UTF8-encoded characters.
* Characters which should be displayed in exactly one cell.
* Make a character from an ASCII [char].
* Test whether a character is a character that can be part of a word.
Letters or digits are word characters.
Symbols, such as [+], [%], [-] or [_], are not.
* Negation of [is_word... |
type t = string
val of_ascii: char -> t
val is_word_character: t -> bool
val is_not_word_character: t -> bool
val is_big_word_character: t -> bool
val is_not_big_word_character: t -> bool
* Test whether two characters are equal .
val equals: t -> t -> bool
* Test whether two characters are equal ( case - insens... |
ec8e6fc20c389140a7013bfcdacce2c8dbc1d32b9521436f7643188f26c244bf | okeuday/erlbench | jsx_decoder.erl | %% The MIT License
Copyright ( c ) 2010 - 2013 < >
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modi... | null | https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/jsx_decoder.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above co... |
Copyright ( c ) 2010 - 2013 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
570adc01869fdef92f7021d5143a5d75e753cb8ff9f2fb9ba59fee1b748e910c | ghcjs/ghcjs | conc013.hs | module Main where
! ! ! test and instances over thread Ids .
import Control.Concurrent
main = do
tso1 <- forkIO (return ())
tso2 <- forkIO (return ())
print [compare tso1 tso2, compare tso1 tso1, compare tso2 tso1]
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/concurrent/conc013.hs | haskell | module Main where
! ! ! test and instances over thread Ids .
import Control.Concurrent
main = do
tso1 <- forkIO (return ())
tso2 <- forkIO (return ())
print [compare tso1 tso2, compare tso1 tso1, compare tso2 tso1]
| |
7c31185c6e441920f37207a388090c7f57feea5ef63b238e24f33615a7b20145 | metabase/metabase | testing_test.clj | (ns metabase.api.testing-test
(:require
[clojure.java.io :as io]
[clojure.test :refer :all]
[metabase.api.testing :as testing]
[metabase.db.connection :as mdb.connection]
[metabase.test :as mt]
[metabase.util :as u]))
(set! *warn-on-reflection* true)
(deftest snapshot-test
(when (= (mdb.connecti... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/api/testing_test.clj | clojure | (ns metabase.api.testing-test
(:require
[clojure.java.io :as io]
[clojure.test :refer :all]
[metabase.api.testing :as testing]
[metabase.db.connection :as mdb.connection]
[metabase.test :as mt]
[metabase.util :as u]))
(set! *warn-on-reflection* true)
(deftest snapshot-test
(when (= (mdb.connecti... | |
ce435d89b68b9c465b51bd32c44686352cb6773a85e9e58019771d1d271147ed | FPBench/FPBench | test-core2go.rkt | #lang racket
(require generic-flonum)
(require "test-common.rkt" "../src/core2go.rkt")
(define (compile->go prog ctx type test-file)
(define bit-length (match type ['binary64 "64"] ['binary32 "32"]))
(call-with-output-file test-file #:exists 'replace
(λ (p)
(define N (if (list? (second prog)) (length (s... | null | https://raw.githubusercontent.com/FPBench/FPBench/43a8f4854baebce88614059e4b48bcfc08d97f61/infra/test-core2go.rkt | racket | Command line | #lang racket
(require generic-flonum)
(require "test-common.rkt" "../src/core2go.rkt")
(define (compile->go prog ctx type test-file)
(define bit-length (match type ['binary64 "64"] ['binary32 "32"]))
(call-with-output-file test-file #:exists 'replace
(λ (p)
(define N (if (list? (second prog)) (length (s... |
15b52e2988428195acbe9162952522eeeefe7a374dab7734ea5cd65a4abe3d9f | kudu-dynamics/blaze | GroupingSpec.hs | HLINT ignore " Redundant do "
module Blaze.Types.Cfg.GroupingSpec where
import qualified Blaze.Cfg as Cfg
import Blaze.Function (Function (Function))
import Blaze.Prelude
import Blaze.Graph (getNodeId)
import Blaze.Types.Cfg (
BasicBlockNode (BasicBlockNode),
BranchType (..),
CfNode (Grouping),
Cfg,
Group... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/d4194ec27c1d84328e370ea24518f815cfb39eaf/test/general/Blaze/Types/Cfg/GroupingSpec.hs | haskell | HLINT ignore " Redundant do "
module Blaze.Types.Cfg.GroupingSpec where
import qualified Blaze.Cfg as Cfg
import Blaze.Function (Function (Function))
import Blaze.Prelude
import Blaze.Graph (getNodeId)
import Blaze.Types.Cfg (
BasicBlockNode (BasicBlockNode),
BranchType (..),
CfNode (Grouping),
Cfg,
Group... | |
ed78ebe6941268f0f579407644c1421295b4f441245b84d794fdad59dcdd2aa3 | craigfe/compact | hashtbl.mli | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... | null | https://raw.githubusercontent.com/craigfe/compact/fcce0432d267babeb90dbdf4f49e2d2d067b2b0f/src/hashtbl.mli | ocaml | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... | |
7877232281026ac212a6a3e1f3c265dc2430dc4366fb6f0f05bb672c4fc82d1b | korya/efuns | env.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/2.04/include/env.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : env.mli , v 1.1 2000/05/22 08... |
680064096344b2f298a09994ea7388a032086d139588f5a1458f05d543144ea2 | TerrorJack/ghc-alter | Num.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Num
Copyright : ( c ) The University of Glasgow 1994 - 2002
-- License : see libraries/ba... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/Num.hs | haskell | # OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.Num
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
---------------------------------------------------------------------------
Double isn't available yet,... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples #
Copyright : ( c ) The University of Glasgow 1994 - 2002
Portability : non - portable ( GHC Extensions )
The ' ' class and the ' Integer ' type .
module GHC.Num (module GHC.Num, module GHC.Integer) where
import GHC.Base
... |
6e398bed718af1b8f3eb84e481320094047bbd567a130bcd5ea8bdba3f51c65f | willprice/little-schemer | lats.rkt | #lang racket/base
(require rackunit
"../lats.rkt")
(test-case
"lat?"
(check-equal? (lat? '()) #t)
(check-equal? (lat? '(a)) #t)
(check-equal? (lat? '(a '())) #f)
(check-equal? (lat? '(a b)) #t))
(test-case
"member?"
(check-equal? (member? 'a '()) #f)
(check-equal? (member? 'a '(a)) #t)
(ch... | null | https://raw.githubusercontent.com/willprice/little-schemer/b2bd9ab7b1f1d43fe92415c6d41e18d3a2ba4677/tests/lats.rkt | racket | #lang racket/base
(require rackunit
"../lats.rkt")
(test-case
"lat?"
(check-equal? (lat? '()) #t)
(check-equal? (lat? '(a)) #t)
(check-equal? (lat? '(a '())) #f)
(check-equal? (lat? '(a b)) #t))
(test-case
"member?"
(check-equal? (member? 'a '()) #f)
(check-equal? (member? 'a '(a)) #t)
(ch... | |
b52837d0132983ae8f57fec7c5fc8cc2d33928d1ba2015ebca11b31d88381275 | fosskers/vectortiles | Bench.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Criterion.Main
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BL
import qualified Data.HashMap.Strict as M
import qualified Data.Vector.Storable as VS
import Geography.VectorTile
import Lens.Micr... | null | https://raw.githubusercontent.com/fosskers/vectortiles/3f0464e092f2918dc89f4408bc70538f48989074/bench/Bench.hs | haskell | # LANGUAGE OverloadedStrings #
- |
module Main where
import Criterion.Main
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BL
import qualified Data.HashMap.Strict as M
import qualified Data.Vector.Storable as VS
import Geography.VectorTile
import Lens.Micro
import Lens.Micro.Platf... |
2c4cfe6cc8ae8f77b7be67fcf2a01c77f717a58b66c03c10c5d792fde2296ef5 | kidpollo/jackdaw-literate-examples | scratch.clj | (ns clojure.test)
(run-tests 'simple-app.core-test)
(ns simple-app.core)
(hello "World")
(str "foo")(+ 1)(prn "baz")
["foo" "bar" "baz"]
[["foo" "bar" "baz" "qux"]
["1" "2" "3" "4"]
[1 2 3 4]
'(:one :two :three :four)
(take 4 (range))]
(clojure.pprint/print-table [{:a 1 :b 2 :c 3} {:b 5 :a 7 :c "dog"}])
| null | https://raw.githubusercontent.com/kidpollo/jackdaw-literate-examples/9f3eca7415c0c4d460ab114eca675901a6c32114/simple-app/dev/scratch.clj | clojure | (ns clojure.test)
(run-tests 'simple-app.core-test)
(ns simple-app.core)
(hello "World")
(str "foo")(+ 1)(prn "baz")
["foo" "bar" "baz"]
[["foo" "bar" "baz" "qux"]
["1" "2" "3" "4"]
[1 2 3 4]
'(:one :two :three :four)
(take 4 (range))]
(clojure.pprint/print-table [{:a 1 :b 2 :c 3} {:b 5 :a 7 :c "dog"}])
| |
445b5b22a9639722848129b644d8172d605fb851c01de89b82901d672f639a3b | anoma/juvix | TopEtaExpand.hs | module Core.Transformation.TopEtaExpand (allTests) where
import Base
import Core.Eval.Positive qualified as Eval
import Core.Transformation.Base
import Juvix.Compiler.Core.Transformation
allTests :: TestTree
allTests = testGroup "Top eta expand" (map liftTest Eval.tests)
pipe :: [TransformationId]
pipe = [TopEtaExpa... | null | https://raw.githubusercontent.com/anoma/juvix/169155690b623761309875b509c28334cba7826a/test/Core/Transformation/TopEtaExpand.hs | haskell | module Core.Transformation.TopEtaExpand (allTests) where
import Base
import Core.Eval.Positive qualified as Eval
import Core.Transformation.Base
import Juvix.Compiler.Core.Transformation
allTests :: TestTree
allTests = testGroup "Top eta expand" (map liftTest Eval.tests)
pipe :: [TransformationId]
pipe = [TopEtaExpa... | |
45d31a16f4b3dbf2f044bf374f97411ec76f5615c5cc227fc8c2ffb60a801539 | tonsky/icfpc2019 | main.clj | (ns icfpc.main
(:require
[icfpc.bot :as bot]
[icfpc.core :as core :refer [cond+]]
[icfpc.level :as level]
[icfpc.generator :as generator]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.data.json :as json])
(:import
[java.io File]
[java.util.co... | null | https://raw.githubusercontent.com/tonsky/icfpc2019/9f6869f78cc16ede79353a433b9aba93ecab8317/src/icfpc/main.clj | clojure | (ns icfpc.main
(:require
[icfpc.bot :as bot]
[icfpc.core :as core :refer [cond+]]
[icfpc.level :as level]
[icfpc.generator :as generator]
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.java.shell :as shell]
[clojure.data.json :as json])
(:import
[java.io File]
[java.util.co... | |
25a3ef18a351804c2a1a83505c71d8ba37b0eac0c82fe229d74a18fbc9df893a | spechub/Hets | MathematicaInterpreter.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , TypeSynonymInstances #
|
Module : ./CSL / MathematicaInterpreter.hs
Description : Mathematica instance for the class
Copyright : ( c ) , DFKI Bremen 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/CSL/MathematicaInterpreter.hs | haskell | --------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------- -}
--------------------------------------------------------------------
---------------------------------------... | # LANGUAGE FlexibleContexts , FlexibleInstances , TypeSynonymInstances #
|
Module : ./CSL / MathematicaInterpreter.hs
Description : Mathematica instance for the class
Copyright : ( c ) , DFKI Bremen 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability ... |
55d99d207b9ba9a58788a49b1e41d3921d5703f6c7d37d7ab26e29ea2bcf1229 | yogthos/yuggoth | noise.cljs | ;;inspired by /
(ns yuggoth.noise)
(def distributions
{:uniform 1
:triangular 2
:bell 5})
(defn random-parametric [n bias]
(Math/pow
(/ (->> #(Math/random)
(repeatedly n)
(reduce +))
(dec n))
(Math/pow 1.2 bias)))
(defn hex->rgb [hex]
[(bit-shift-right (bit-and hex 0xff0... | null | https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src-cljs/yuggoth/noise.cljs | clojure | inspired by / | (ns yuggoth.noise)
(def distributions
{:uniform 1
:triangular 2
:bell 5})
(defn random-parametric [n bias]
(Math/pow
(/ (->> #(Math/random)
(repeatedly n)
(reduce +))
(dec n))
(Math/pow 1.2 bias)))
(defn hex->rgb [hex]
[(bit-shift-right (bit-and hex 0xff0000) 16)
(bit... |
928a6994b5535585ba79d676960c0ade0b1d5e126e5513018148c023b2a230dd | bldl/magnolisp | test-let-expr-1.rkt | #lang magnolisp/2014
(typedef int (#:annos foreign))
(function (f x)
(#:annos export (type (fn int int)))
(let-var y #an(^int) x y))
(f 7)
(function (cxx-f x)
(#:annos foreign (type (fn int int)))
(+ x 1))
(function (g x)
(#:annos export (type (fn int int)))
(let-var y #an(^int) x (cxx-f y)))
(g 7)
(... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-let-expr-1.rkt | racket | #lang magnolisp/2014
(typedef int (#:annos foreign))
(function (f x)
(#:annos export (type (fn int int)))
(let-var y #an(^int) x y))
(f 7)
(function (cxx-f x)
(#:annos foreign (type (fn int int)))
(+ x 1))
(function (g x)
(#:annos export (type (fn int int)))
(let-var y #an(^int) x (cxx-f y)))
(g 7)
(... | |
5319c92f4a0f5f4e902b6a8822107307248a0f9ed965183a252a82d7b5dd7957 | NovoLabs/gregor | test_consumer_control_operations.clj | (ns gregor.integration.test-consumer-control-operations
(:require [gregor.consumer :as c]
[clojure.core.async :as a]
[clojure.test :refer :all]))
(defn create-consumer
[]
(c/create {:output-policy #{:data :control :error}
:kafka-configuration {:bootstrap.servers "localhost:90... | null | https://raw.githubusercontent.com/NovoLabs/gregor/017488d88abe23df1f0389080629d6f26ba2a84e/test/gregor/integration/test_consumer_control_operations.clj | clojure | Should have a single subscription from the creation of the consumer
Should get an `:error` event as you can not switch subscription types (i.e. named to regex-based)
Subscriptions should be empty if we are unsubscribed
Now we can successfully subscribe using a regular expression | (ns gregor.integration.test-consumer-control-operations
(:require [gregor.consumer :as c]
[clojure.core.async :as a]
[clojure.test :refer :all]))
(defn create-consumer
[]
(c/create {:output-policy #{:data :control :error}
:kafka-configuration {:bootstrap.servers "localhost:90... |
991f113c18416a86cf1a628c74f6735bd37008b9f5881cb55dcce9c0982524a4 | haskell-numerics/random-fu | Poisson.hs | # LANGUAGE
MultiParamTypeClasses ,
FlexibleInstances , FlexibleContexts , UndecidableInstances
#
MultiParamTypeClasses,
FlexibleInstances, FlexibleContexts, UndecidableInstances
#-}
# OPTIONS_GHC -fno - warn - simplifiable - class - constraints #
module Data.Random.Distribution.Poisson where... | null | https://raw.githubusercontent.com/haskell-numerics/random-fu/da12c65350979eecc8ac5c57d22fbfbe616d7b92/random-fu/src/Data/Random/Distribution/Poisson.hs | haskell | | The probability of getting exactly k successes is
given by the probability mass function:
\[
f(k;\lambda) = \Pr(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}
\]
Note that in `integralPoissonPDF` the parameter of the mass | # LANGUAGE
MultiParamTypeClasses ,
FlexibleInstances , FlexibleContexts , UndecidableInstances
#
MultiParamTypeClasses,
FlexibleInstances, FlexibleContexts, UndecidableInstances
#-}
# OPTIONS_GHC -fno - warn - simplifiable - class - constraints #
module Data.Random.Distribution.Poisson where... |
ed0c44628c6602e08b450bc345d52b42fb3cfbb721e10a5fa88c2b83abec15e4 | eighttrigrams/cljc-minimals | main.clj | (ns main
(:require [ring.adapter.jetty :as jetty]
[integrant.core :as ig]
[ring.util.response :as response]))
(def config
{:adapter/jetty {:port 8888 :handler (ig/ref :handler/greet)}
:handler/greet {:name "Alice"}})
(defmethod ig/init-key :adapter/jetty [_ {:keys [handler] :as opts}]
... | null | https://raw.githubusercontent.com/eighttrigrams/cljc-minimals/e30399f2937c3c00c1f1b98e9389abab87846d3b/integrant/src/main.clj | clojure | (ns main
(:require [ring.adapter.jetty :as jetty]
[integrant.core :as ig]
[ring.util.response :as response]))
(def config
{:adapter/jetty {:port 8888 :handler (ig/ref :handler/greet)}
:handler/greet {:name "Alice"}})
(defmethod ig/init-key :adapter/jetty [_ {:keys [handler] :as opts}]
... | |
4ea26a7af9fa6f4386110a9cb125f6510ea733cb6c888b2ba072cb563b16a547 | juspay/atlas | Handler.hs | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/API/UI/Booking/Handler.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | |
a8651a94e25a3afe3a78f834bfd8e1c7605361a3c420e9115f209e3ef9887fd9 | slyrus/abcl | package.lisp | (in-package :cl-user)
(defpackage abcl-asdf
(:use cl)
(:import-from :abcl/build
#:split-string)
(:export
;;; Public API
#:resolve
;; Configuring Maven
#:with-aether
#:ensure-mvn-version
#:find-mvn
#:*mvn-directory*
#:init
;;; "Internal" API
#:resolve-dependenci... | null | https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/contrib/abcl-asdf/package.lisp | lisp | Public API
Configuring Maven
"Internal" API | (in-package :cl-user)
(defpackage abcl-asdf
(:use cl)
(:import-from :abcl/build
#:split-string)
(:export
#:resolve
#:with-aether
#:ensure-mvn-version
#:find-mvn
#:*mvn-directory*
#:init
#:resolve-dependencies
#:resolve-artifact
Maven
#:*mvn-libs-directory... |
f74633967279836c00320eec6d998665e6f3291ab99016c8726adbe3e6493de5 | andreasabel/cabal-clean | Options.hs | module Options (module Options, module X) where
import System.Console.Pretty ( color, style )
import System.Console.Pretty as X
( Color(Green, Red, White)
, Style(ColoredNormal, Faint, Italic)
)
import Util
data Options = Options
{ optDelete :: Bool
, optNoColors :: Bool
, optVerbose :: Bool
,... | null | https://raw.githubusercontent.com/andreasabel/cabal-clean/015cf3d6bda2e7b9118f3b19f50e27c70592d75c/src/Options.hs | haskell | | Apply ANSI style if coloring is enabled in 'Options'.
* Verbosity functionality. | module Options (module Options, module X) where
import System.Console.Pretty ( color, style )
import System.Console.Pretty as X
( Color(Green, Red, White)
, Style(ColoredNormal, Faint, Italic)
)
import Util
data Options = Options
{ optDelete :: Bool
, optNoColors :: Bool
, optVerbose :: Bool
,... |
5bc9a3d2b0d17b9f8a6bf50ba9c2499f529de6936864541facdae2e35436afd8 | broadinstitute/firecloud-ui | summary.cljs | (ns broadfcui.page.method-repo.method.summary
(:require
[dmohs.react :as react]
[clojure.string :as string]
[broadfcui.common :as common]
[broadfcui.common.icons :as icons]
[broadfcui.common.markdown :refer [MarkdownView]]
[broadfcui.common.style :as style]
[broadfcui.components.buttons :as butto... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/method_repo/method/summary.cljs | clojure | (ns broadfcui.page.method-repo.method.summary
(:require
[dmohs.react :as react]
[clojure.string :as string]
[broadfcui.common :as common]
[broadfcui.common.icons :as icons]
[broadfcui.common.markdown :refer [MarkdownView]]
[broadfcui.common.style :as style]
[broadfcui.components.buttons :as butto... | |
d932974a6374e094ab77b0d7082d0c9fdd6cfb085d0da003a5fc513141db46b0 | richardalligier/trc2018 | csvaddenergyrate.ml |
type config=
{
alt:string;
tas:string;
temp:string;
}
let argspecs,init=
let tas = ref ""
and alt = ref ""
and temp = ref ""
in
let argspecs=
[
"-alt", Arg.Set_string alt, "baroaltitude var";
"-tas", Arg.Set_string tas, "baroaltitude var";
"-temp", Arg.Set_string temp,... | null | https://raw.githubusercontent.com/richardalligier/trc2018/f4e56fbe80997ca4e818889fe047d47c460fa8aa/OCaml/csvaddenergyrate.ml | ocaml | m/s2
fun count _ _-> count>1 |
type config=
{
alt:string;
tas:string;
temp:string;
}
let argspecs,init=
let tas = ref ""
and alt = ref ""
and temp = ref ""
in
let argspecs=
[
"-alt", Arg.Set_string alt, "baroaltitude var";
"-tas", Arg.Set_string tas, "baroaltitude var";
"-temp", Arg.Set_string temp,... |
585b8a1c43af6c1a4e86e6c9b50d946007ed12eceea76a9db930f76934eb37db | BitGameEN/bitgamex | ecrn_cron_sup.erl | , LLC . All Rights Reserved .
%%%
This file is provided to you under the BSD License ; you may not use
%%% this file except in compliance with the License.
%%%-------------------------------------------------------------------
%%% @doc
Simple one for one supervisor for ecd_chron jobs .
-module(ecrn_cron_sup).... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcron/src/ecrn_cron_sup.erl | erlang |
this file except in compliance with the License.
-------------------------------------------------------------------
@doc
API
Supervisor callbacks
===================================================================
API functions
===================================================================
@doc
Add a chr... | , LLC . All Rights Reserved .
This file is provided to you under the BSD License ; you may not use
Simple one for one supervisor for ecd_chron jobs .
-module(ecrn_cron_sup).
-behaviour(supervisor).
-export([start_link/0,
add_job/2]).
-export([init/1]).
-define(SERVER, ?MODULE).
-spec start_link... |
0d93653338cb70b0b7b0e1b9a50090399635a96fc6dfbff62e457a58e1f31762 | Ferada/cl-inotify | inotify.lisp | -*- mode : lisp ; syntax : common - lisp ; coding : utf-8 - unix ; package : cl - inotify - tests ; -*-
Copyright ( c ) 2011 - 15 , Frahm
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are me... | null | https://raw.githubusercontent.com/Ferada/cl-inotify/bcc063b2be65b4bd726ec84a220ad3d9948550bc/tests/inotify.lisp | lisp | syntax : common - lisp ; coding : utf-8 - unix ; package : cl - inotify - tests ; -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
n... |
Copyright ( c ) 2011 - 15 , Frahm
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL ,... |
21e2c37e70c2be32c92cbf2332588ec3eddc4a5485c4d53a5b88098d7506a445 | sky-big/RabbitMQ | clustering_management.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-test/test/src/clustering_management.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Allow clusterin... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module(... |
0c4cb1c25045c73be53bd72fe467cf57d61a35b77ccfd1f1eb7741f3897d8694 | mfikes/fifth-postulate | ns32.cljs | (ns fifth-postulate.ns32)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns32.cljs | clojure | (ns fifth-postulate.ns32)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | |
79f8b4b14b806dd9d9da010125bff9e62356b42402beebae6f5142bf9ab3a0e3 | abdulapopoola/SICPBook | Ex1.29.scm | #lang planet neil/sicp
Simpson 's rule
;; h = (b - a) /n
;; y(k) = f(a + kh)
(define (sum term a next b)
(if (> a b)
0
(+ (term a)
(sum term (next a) next b))))
(define (simpsons-rule f a b n)
(define h (/ (- b a) n))
(define (inc x) (+ x 1))
(define (y-k k) (f (+ a (* k h))))
(define... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%201/1.3/Ex1.29.scm | scheme | h = (b - a) /n
y(k) = f(a + kh) | #lang planet neil/sicp
Simpson 's rule
(define (sum term a next b)
(if (> a b)
0
(+ (term a)
(sum term (next a) next b))))
(define (simpsons-rule f a b n)
(define h (/ (- b a) n))
(define (inc x) (+ x 1))
(define (y-k k) (f (+ a (* k h))))
(define (term k)
(* (cond ((odd? k) 4)
... |
bd50aabecf7f62e15d4bf00cc9adbb6df967385af5053665bb52ad94cfa66ea0 | sig-gis/gridfire | simple_sockets.clj | (ns gridfire.simple-sockets
(:import (java.io BufferedReader)
(java.net ConnectException Socket ServerSocket))
(:require [clojure.java.io :as io]
[clojure.string :as s]
[triangulum.logging :refer [log log-str]]))
;;=================================
;; Client Socket
;;===========... | null | https://raw.githubusercontent.com/sig-gis/gridfire/44aeaf56fceb01f61b21db6220d2cb562a92570b/src/gridfire/simple_sockets.clj | clojure | =================================
Client Socket
=================================
=================================
================================= | (ns gridfire.simple-sockets
(:import (java.io BufferedReader)
(java.net ConnectException Socket ServerSocket))
(:require [clojure.java.io :as io]
[clojure.string :as s]
[triangulum.logging :refer [log log-str]]))
(defn send-to-server! [host port message]
(try
(with-open [... |
4a74472e6722c0eb4e6f8146e7280b175936304fe85a70d3d6fc326faf0796d8 | wireless-net/erlang-nommu | wxListCtrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2011 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Licen... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/api_gen/wx_extra/wxListCtrl.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2011 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
<<EXPORT:SortItems sortItems/2 SortItems:EXPORT>>... |
8d8f912ebd82530817f9aceb11da91b1840ad0b7f7763e70cfe21890385ef43c | SquidDev/urn | debug.lisp | (define-native debug :bind-to "debug and debug.debug")
(define-native gethook :bind-to "debug and debug.gethook")
(define-native getinfo :bind-to "debug and debug.getinfo")
(define-native getlocal :bind-to "debug and debug.getlocal")
(define-native getmetatable :bind-to "debug and debug.getmetatabl... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/lua/debug.lisp | lisp | (define-native debug :bind-to "debug and debug.debug")
(define-native gethook :bind-to "debug and debug.gethook")
(define-native getinfo :bind-to "debug and debug.getinfo")
(define-native getlocal :bind-to "debug and debug.getlocal")
(define-native getmetatable :bind-to "debug and debug.getmetatabl... | |
1a770e936fb77c3200725bc7c8a69f4581d68fa051badc5de4ead910ba2ad4de | mhwombat/creatur | BRGCBool.hs | ------------------------------------------------------------------------
-- |
Module : ALife . . Genetics . BRGCBool
Copyright : ( c ) 2013 - 2022
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
Utilities for working with genes that are ... | null | https://raw.githubusercontent.com/mhwombat/creatur/c715f4de16d29b646b27f3185d1d073df0fc9cb6/src/ALife/Creatur/Genetics/BRGCBool.hs | haskell | ----------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
bits, using a Binary Reflected Gray Code (BRGC).
A Gray code maps values to codes in a way that guarantees that the
feature can be useful in evo... | Module : ALife . . Genetics . BRGCBool
Copyright : ( c ) 2013 - 2022
Utilities for working with genes that are encoded as a sequence of
codes for two consecutive values will differ by only one bit . This
their parents , as any radical changes from one generation to the
# LANGUAGE DefaultSigna... |
c0e9b96698762e158df145d371a28583028a60ecf36dd9b22b4a3344899acae1 | tek/ribosome | Main.hs | module Main (module Ribosome.App.Cli) where
import Ribosome.App.Cli (main)
| null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/ribosome/app/Main.hs | haskell | module Main (module Ribosome.App.Cli) where
import Ribosome.App.Cli (main)
| |
011a660bfb53dd5d0424a28b56207d2615f8c7f2e189b370ce10b59b3f053735 | bos/rwh | lookup.hs | {-- snippet standalone --}
myLookup :: Eq a => a -> [(a, b)] -> Maybe b
myLookup _ [] = Nothing
myLookup key ((thiskey,thisval):rest) =
if key == thiskey
then Just thisval
else myLookup key rest
{-- /snippet standalone --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch13/lookup.hs | haskell | - snippet standalone -
- /snippet standalone - | myLookup :: Eq a => a -> [(a, b)] -> Maybe b
myLookup _ [] = Nothing
myLookup key ((thiskey,thisval):rest) =
if key == thiskey
then Just thisval
else myLookup key rest
|
1287c37e1e91f6b05e857ea5776331d78a76e2d2d99d5cfd4606ba053088e9b7 | marigold-dev/deku | protocol.ml | open Receipt
open Deku_ledger
module Tezos_operation_hash = Deku_tezos.Tezos_operation_hash
open Deku_stdlib
type protocol =
| Protocol of {
included_operations : Included_operation_set.t;
included_tezos_operations : Deku_tezos.Tezos_operation_hash.Set.t;
ledger : Ledger.t;
vm_state : Ocaml_w... | null | https://raw.githubusercontent.com/marigold-dev/deku/4b9d667060f546daae68e18eb1ad980797be42b6/deku-p/src/core/protocol/protocol.ml | ocaml | TODO: check code through different lane
TODO: check that incorrect operations are removed from the pool
TODO: wrap this in a function exposed from the VM
TODO: in the future we should return a Vm_trnasaction_error here
TODO: print exception
TODO: how to clean the set of tezos operations in memory? | open Receipt
open Deku_ledger
module Tezos_operation_hash = Deku_tezos.Tezos_operation_hash
open Deku_stdlib
type protocol =
| Protocol of {
included_operations : Included_operation_set.t;
included_tezos_operations : Deku_tezos.Tezos_operation_hash.Set.t;
ledger : Ledger.t;
vm_state : Ocaml_w... |
1668a6549c29fa07613f428d72ef9c7cd32f13506ed108d426f478a147f295a6 | quan-nh/adventofcode | day4.clj | (ns adventofcode.day4
(:import (java.security MessageDigest)))
(defn md5 [s]
(let [algorithm (MessageDigest/getInstance "MD5")
size (* 2 (.getDigestLength algorithm))
raw (.digest algorithm (.getBytes s))
sig (.toString (BigInteger. 1 raw) 16)
padding (apply str (repeat (- size (cou... | null | https://raw.githubusercontent.com/quan-nh/adventofcode/98542934a121d1df85dd271d28fedc1f25b98206/src/adventofcode2015/day4.clj | clojure | (ns adventofcode.day4
(:import (java.security MessageDigest)))
(defn md5 [s]
(let [algorithm (MessageDigest/getInstance "MD5")
size (* 2 (.getDigestLength algorithm))
raw (.digest algorithm (.getBytes s))
sig (.toString (BigInteger. 1 raw) 16)
padding (apply str (repeat (- size (cou... | |
602c92814f09a96f62b4ba66ee3d75dce54911aba0b08b4f7b09abe68a35b2e7 | timothypratley/snakelake | config.cljs | (ns snakelake.config)
(def server "localhost:3000") | null | https://raw.githubusercontent.com/timothypratley/snakelake/2479f800d37645a18d0ae535a6c7712fbd814cef/dev/snakelake/config.cljs | clojure | (ns snakelake.config)
(def server "localhost:3000") | |
ede3ec0743e870326be6a3e5b5c3e74fb551ad6cb64b6526d9887f04e9f0f13f | metosin/web-schemas | transit.cljc | (ns web-schemas.transit
(:require [cognitect.transit :as transit]
[schema.core :as s]))
(def writers
{schema.core.AnythingSchema
(transit/write-handler
(constantly "AnythingSchema")
(constantly nil))
schema.core.EqSchema
(transit/write-handler
(constantly "EqSchema")
(fn [... | null | https://raw.githubusercontent.com/metosin/web-schemas/31d0f8246d04d76fd294f135bf68bf9ac22431a9/src/web_schemas/transit.cljc | clojure | FIXME: error-symbol
FIXME:
(transit/read-handler (fn [[klass schema]] (s/record klass schema)))
FIXME: | (ns web-schemas.transit
(:require [cognitect.transit :as transit]
[schema.core :as s]))
(def writers
{schema.core.AnythingSchema
(transit/write-handler
(constantly "AnythingSchema")
(constantly nil))
schema.core.EqSchema
(transit/write-handler
(constantly "EqSchema")
(fn [... |
60c575910795ef2805a88cb5e1ec1d7da0baa63ec4d796a632ae588cb5ae8ccf | devonhollowood/search-algorithms | Search.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
-- | This module contains a collection of generalized graph search algorithms,
-- for when you don't want to explicitly represent your data as a graph. The
-- general idea is to provide these algorithms with a way of generating... | null | https://raw.githubusercontent.com/devonhollowood/search-algorithms/8defc3ff88639e3ae78f20767cda0bc9046b97c7/src/Algorithm/Search.hs | haskell | | This module contains a collection of generalized graph search algorithms,
for when you don't want to explicitly represent your data as a graph. The
general idea is to provide these algorithms with a way of generating "next"
states, a way of generating associated information, a way of determining
when you have fo... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
module Algorithm.Search (
bfs,
dfs,
dijkstra,
dijkstraAssoc,
aStar,
aStarAssoc,
bfsM,
dfsM,
dijkstraM,
dijkstraAssocM,
aStarM,
aStarAssocM,
incrementalCosts,
incrementalCostsM,
pruning,
pruningM
... |
c28df058b8c2aceed96fdde1e5b6a35566ec318fa9073a7b48bc121d7b73edfb | racket/gui | menu.rkt | #lang racket/base
(require racket/class
ffi/unsafe
(only-in racket/list drop take)
"../../lock.rkt"
"../../syntax.rkt"
"../common/event.rkt"
"utils.rkt"
"types.rkt"
"const.rkt"
"menu-item.rkt")
(provide
(protect-out menu%))
(define-user... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/win32/menu.rkt | racket | #lang racket/base
(require racket/class
ffi/unsafe
(only-in racket/list drop take)
"../../lock.rkt"
"../../syntax.rkt"
"../common/event.rkt"
"utils.rkt"
"types.rkt"
"const.rkt"
"menu-item.rkt")
(provide
(protect-out menu%))
(define-user... | |
cfacb24fcb5c87d29bc02c73c16141fcc12bc3571f7e2d886ee7aa29cad764b6 | fumieval/free-game | Font.hs | -----------------------------------------------------------------------------
-- |
-- Module : FreeGame.Data.Font
Copyright : ( C ) 2013
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability : non-portable
--
-- Rendering... | null | https://raw.githubusercontent.com/fumieval/free-game/70d7f86851f524a02f32142a92c16df6c4eb8241/FreeGame/Data/Font.hs | haskell | ---------------------------------------------------------------------------
|
Module : FreeGame.Data.Font
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : non-portable
Rendering characters
-------------------------------------------------------------------... | Copyright : ( C ) 2013
Maintainer : < >
module FreeGame.Data.Font
( Font
, loadFontFromFile
, loadFont
, fontBoundingBox
, metricsAscent
, metricsDescent
, charToBitmap
, RenderedChar(..)
) where
import Control.Monad.IO.Class
import Control.Monad
import Data.IORef
... |
fb81c9c001b3040e367d74a58bad69563210729da7af50f1a14df7a3a6796f6f | xtendo-org/saha | Compile.hs | module Saha.Compile where
import Data.Maybe
import Control.Monad
import System.Directory (createDirectoryIfMissing)
import System.FilePath (dropExtension, splitFileName)
import System.Posix.Types (EpochTime)
import System.Posix.Files
import Data.List (isSuffixOf)
import Prelude hiding (readFile, writeFile)
import Dat... | null | https://raw.githubusercontent.com/xtendo-org/saha/e2774cdbc7e5147e7178342317083ea2ee8e7a75/library/Saha/Compile.hs | haskell | module Saha.Compile where
import Data.Maybe
import Control.Monad
import System.Directory (createDirectoryIfMissing)
import System.FilePath (dropExtension, splitFileName)
import System.Posix.Types (EpochTime)
import System.Posix.Files
import Data.List (isSuffixOf)
import Prelude hiding (readFile, writeFile)
import Dat... | |
39aeed800910d2cd3678b4f961970cfa8d2c50efeee8824ac27ea3113b93a479 | Decentralized-Pictures/T4L3NT | long_test.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/long_tests/long_test.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
fa67b67852e425542a657467a248134c947bf7652ddfe42745aeb28cddff832f | purescript/purescript | ToJSON.hs | # LANGUAGE NoOverloadedStrings #
-- |
-- Dump the core functional representation in JSON format for consumption
by third - party code generators
--
module Language.PureScript.CoreFn.ToJSON
( moduleToJSON
) where
import Prelude
import Control.Arrow ((***))
import Data.Either (isLeft... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/CoreFn/ToJSON.hs | haskell | |
Dump the core functional representation in JSON format for consumption
| # LANGUAGE NoOverloadedStrings #
by third - party code generators
module Language.PureScript.CoreFn.ToJSON
( moduleToJSON
) where
import Prelude
import Control.Arrow ((***))
import Data.Either (isLeft)
import qualified Data.Map.Strict as M
import Data.Aeson hiding ((.=))
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.