_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 |
|---|---|---|---|---|---|---|---|---|
d189b143d70422725c2ded79e8ba44e4d2b3c74977d78c0ae6166d185133815e | spechub/Hets | State.hs | |
Module : ./Common / Lib / State.hs
Description : State type from Control . Monad . State but no class MonadState
Copyright : and Uni Bremen 2002 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
State... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Common/Lib/State.hs | haskell | | Our fixed state monad
put and get are non-overloaded here! | |
Module : ./Common / Lib / State.hs
Description : State type from Control . Monad . State but no class MonadState
Copyright : and Uni Bremen 2002 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
State... |
7a11dfcb3e26cb76abe38c951eae90b2763f576b18fa02dfc12cc143e4735507 | bennn/dissertation | make-history.rkt | #lang racket/base
(require (only-in racket/string string-join))
(define binop* '(+ - *))
(define other* '(dup drop over swap))
(define new* (box '()))
(define (random-ref xs)
(list-ref xs (random (length xs))))
(define (random-def)
(define cmd* (for/list ([_i (in-range (add1 (random 10)))])
(ra... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/forth/base/make-history.rkt | racket | #lang racket/base
(require (only-in racket/string string-join))
(define binop* '(+ - *))
(define other* '(dup drop over swap))
(define new* (box '()))
(define (random-ref xs)
(list-ref xs (random (length xs))))
(define (random-def)
(define cmd* (for/list ([_i (in-range (add1 (random 10)))])
(ra... | |
20b16cfc380f3bc3afb9eb7597cb30c9900dc2b08d40c6396e11ece56bd40046 | byorgey/AoC | 11.hs |
import Data.List
import Data.List.Split
step "n" = [1,0,-1]
step "s" = [-1,0,1]
step "ne" = [1,-1,0]
step "se" = [0,-1,1]
step "sw" = [-1,1,0]
step "nw" = [0,1,-1]
main = do
steps <- (splitOn "," . init) <$> getContents
let end = foldl' (zipWith (+)) [0,0,0] $ map step steps
print (dist end)
let locs = sc... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2017/11/11.hs | haskell |
import Data.List
import Data.List.Split
step "n" = [1,0,-1]
step "s" = [-1,0,1]
step "ne" = [1,-1,0]
step "se" = [0,-1,1]
step "sw" = [-1,1,0]
step "nw" = [0,1,-1]
main = do
steps <- (splitOn "," . init) <$> getContents
let end = foldl' (zipWith (+)) [0,0,0] $ map step steps
print (dist end)
let locs = sc... | |
1d288853da7770fa8d4c5279b28d78db09a6d5f2019bc58843e36e34dd491c9b | ygrek/mldonkey | guiUtf8.mli | Copyright 2004 b8_bavard ,
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
( at your option ) any l... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk2/gui/guiUtf8.mli | ocaml | Internationalization functions
*
[codeset_to_string codeset] returns the string, as defined by glib,
corresponding to [codeset].
*
[string_to_codeset s] returns the codeset corresponding to the string [s].
If [s] is unknown, returns ISO_8859_1.
*
[codeset_list_from_region region] returns a predefined... | Copyright 2004 b8_bavard ,
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
( at your option ) any l... |
ae1e9f8f7700e29288d21e480bbb960a6e93f55bc97526da973c1b21a40c1380 | skanev/playground | 01.scm | EOPL exercise 3.01
;
In figure 3.3 , list all the places where we used the fact that
; ⎣ ⎡ n⎤ ⎦ = n.
I will use { } for ⎣ and ⎦ and [ ] for ⎡ and I will annotate the code below :
;
Let p = [ i = 1 , v = 5 , x = 10 ] .
;
; (value-of
< < -(-(x , 3 ) , -(v , i ) ) > >
; p)
;
; = [(-
{ ( value - o... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/01.scm | scheme |
⎣ ⎡ n⎤ ⎦ = n.
(value-of
p)
= [(-
{(value-of <<-(v, i)>> p)})]
= [(-
(-
{(value-of <<x>> p)}
{(value-of <<3>> p)})
{(value-of <<-(v, i)>>)})]
= [(-
(-
HERE
{(value-of <<3>> p)})
{(value-of <<-(v, i)>>)})]
= [(-
(-
3) ... | EOPL exercise 3.01
In figure 3.3 , list all the places where we used the fact that
I will use { } for ⎣ and ⎦ and [ ] for ⎡ and I will annotate the code below :
Let p = [ i = 1 , v = 5 , x = 10 ] .
< < -(-(x , 3 ) , -(v , i ) ) > >
{ ( value - of < < -(x , 3 ) > > p ) }
10
7
... |
750c7ac044d7b91996c7aef640fed22a8df5b25c47c5fb56a15393c4b15eeda1 | fourmolu/fourmolu | SpanStream.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
| Build span stream from AST .
module Ormolu.Printer.SpanStream
( SpanStream (..),
mkSpanStream,
)
where
import Data.DList (DList)
import qualified Data.DList as D
import Data.Data (Data)
import Data.Generics (everything, ext1Q, ext... | null | https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/src/Ormolu/Printer/SpanStream.hs | haskell | # LANGUAGE DeriveDataTypeable #
| A stream of 'RealSrcSpan's in ascending order. This allows us to tell
element and comment we're considering for printing.
| Create 'SpanStream' from a data structure containing \"located\"
elements.
| Data structure to inspect (AST) | # LANGUAGE GeneralizedNewtypeDeriving #
| Build span stream from AST .
module Ormolu.Printer.SpanStream
( SpanStream (..),
mkSpanStream,
)
where
import Data.DList (DList)
import qualified Data.DList as D
import Data.Data (Data)
import Data.Generics (everything, ext1Q, ext2Q)
import Data.List (sortOn)
import... |
af1cc0cab6bca60402bcb708bb757cd198fa94adae334f6f54f4c35018a183f6 | dfinity/motoko | languageServer.mli | val start :
string (** The entry point *) ->
* Log debug messages to ?
int option
* Listen on the given port rather than communicating via stdin / out ?
'a
| null | https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/languageServer/languageServer.mli | ocaml | * The entry point | val start :
* Log debug messages to ?
int option
* Listen on the given port rather than communicating via stdin / out ?
'a
|
45eff8ee2f56e2a654e50971d0c2f847c28c3ed71439496781f6853f0ce7eb5f | granule-project/granule | CheckerSpec.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ImplicitParams #
# LANGUAGE DataKinds #
module Language.Granule.Checker.CheckerSpec where
import Test.Hspec
import Language.Granule.Checker.Checker
import Language.Granule.Checker.Predicates
import Language.Granule.Checker.Monad
import Language.Granule.Syntax.Parser
import... | null | https://raw.githubusercontent.com/granule-project/granule/aa869e0522ad961f6627e827055700c5fcabfc75/frontend/tests/hspec/Language/Granule/Checker/CheckerSpec.hs | haskell | Unit tests
Simple definitions | # LANGUAGE ScopedTypeVariables #
# LANGUAGE ImplicitParams #
# LANGUAGE DataKinds #
module Language.Granule.Checker.CheckerSpec where
import Test.Hspec
import Language.Granule.Checker.Checker
import Language.Granule.Checker.Predicates
import Language.Granule.Checker.Monad
import Language.Granule.Syntax.Parser
import... |
a92c233c938f8bcaee159357d1a492f1fca47200d914c694715f3eb4a0649004 | con-kitty/categorifier-c | Libm.hs | # LANGUAGE ForeignFunctionInterface #
module Categorifier.C.KTypes.Libm
( -- * Direct FFI bindings
c_fmod,
c_atan2,
c_fmin,
c_fmax,
c_log,
c_exp,
c_pow,
c_sin,
c_cos,
c_tan,
c_asin,
c_acos,
c_atan,
c_sinh,
c_cosh,
c_tanh,
c_fmodf,
c_atan2f,
... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/KTypes/Libm.hs | haskell | * Direct FFI bindings
* Haskell type-converted bindings | # LANGUAGE ForeignFunctionInterface #
module Categorifier.C.KTypes.Libm
c_fmod,
c_atan2,
c_fmin,
c_fmax,
c_log,
c_exp,
c_pow,
c_sin,
c_cos,
c_tan,
c_asin,
c_acos,
c_atan,
c_sinh,
c_cosh,
c_tanh,
c_fmodf,
c_atan2f,
c_fminf,
c_fmaxf,
c_l... |
1d653d633cb0beb5a483976ae6f2500580e2a6326716accb7fec9a84fa965630 | mauny/the-functional-approach-to-programming | xCour-B.ml | (* *)
(* Projet Formel *)
(* *)
CAML - light :
(* ... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/xCour-B.ml | ocaml |
Projet Formel
********************************... | CAML - light :
45 rue d'Ulm
75005 PARIS
France
#open "MLgraph";;
let fn =
Courier_Bold,{font_descr_filename="preloaded"; fon... |
7caa441c936d0cdaed72f4b8fd3fdba3697bfb0010080eb2ac225616801b82b2 | smuenzel/opile | sexpify.ml | open! Core
let mknoloc = Location.mknoloc
let loc = Location.none
open Ppxlib
module Longident = struct
module T = struct
type t = longident =
| Lident of string
| Ldot of t * string
| Lapply of t * t
[@@deriving sexp]
include (Ppxlib.Longident : module type of struct include Ppxlib.... | null | https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/sexpify/sexpify.ml | ocaml | open! Core
let mknoloc = Location.mknoloc
let loc = Location.none
open Ppxlib
module Longident = struct
module T = struct
type t = longident =
| Lident of string
| Ldot of t * string
| Lapply of t * t
[@@deriving sexp]
include (Ppxlib.Longident : module type of struct include Ppxlib.... | |
dc32822c8dd9d9c8889f1ad2a3b20cd19a3277d6fa1cda5c33181dc436da1a93 | mstksg/inCode | TagIndex.hs | {-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Blog.View.TagIndex where
import Blog.Types
import Blog.Util
import Blog.Util.Tag
import Blog.View
import Blog.View.Archive
import Control.Monad
impor... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/src/Blog/View/TagIndex.hs | haskell | # LANGUAGE ImplicitParams #
# LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Blog.View.TagIndex where
import Blog.Types
import Blog.Util
import Blog.Util.Tag
import Blog.View
import Blog.View.Archive
import Control.Monad
import Data.String
import Text.Blaze.Html5 (... |
ddc5df331693e483bb38e86ae8e508ad9d18269ab7ae896776c9afc29f5810ea | billstclair/trubanc-lisp | packages.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
$ Header : /usr / local / cvsrep / hunchentoot / packages.lisp , v 1.34 2008/02/13 16:02:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/hunchentoot-1.0.0/packages.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | $ Header : /usr / local / cvsrep / hunchentoot / packages.lisp , v 1.34 2008/02/13 16:02:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-packa... |
d8e3b8ca656fbebd610392519d4ce50aa025476accd9545bce89508964150dc7 | dmitryvk/sbcl-win32-threads | low.lisp | ;;;; This file contains portable versions of low-level functions and macros
;;;; which are ripe for implementation specific customization. None of the code
in this file * has * to be customized for a particular Common Lisp
;;;; implementation. Moreover, in some implementations it may not make any
;;;; sense to custom... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/pcl/low.lisp | lisp | This file contains portable versions of low-level functions and macros
which are ripe for implementation specific customization. None of the code
implementation. Moreover, in some implementations it may not make any
sense to customize some of this code.
The original version was intended to support portable custom... | in this file * has * to be customized for a particular Common Lisp
current version , and it now runs only under SBCL . ( Now that ANSI Common
Lisp has mixed CLOS into the insides of the system ( e.g. error handling
Lisp without CLOS , the old functionality is of dubious use . -- WHN
19981108 )
This softwar... |
62d23f877b1d9dfb41796d1a7ec18db3968395ff8a2b8ede973da32183e6dddf | rowangithub/DOrder | nested.ml | let rec loopb i j n =
if j < n then
(assert (0<= j && j <=n && 0 <= i && i <= n);
loopb i (j+1) n)
else ()
let rec loopa i n =
if i < n then
(loopb i 0 n;
loopa (i+1) n)
else ()
let main n =
if n <= 0 then ()
else
loopa 0 n
let _ = main 1
let _ = main (-1) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/mcmc/nested.ml | ocaml | let rec loopb i j n =
if j < n then
(assert (0<= j && j <=n && 0 <= i && i <= n);
loopb i (j+1) n)
else ()
let rec loopa i n =
if i < n then
(loopb i 0 n;
loopa (i+1) n)
else ()
let main n =
if n <= 0 then ()
else
loopa 0 n
let _ = main 1
let _ = main (-1) | |
318eb65f2ccb390b95b23c9b62fe3439dc71efc3e01fc9f367225bb1dede43a2 | montyly/gueb | gueb_type.ml | type addr = (int*int)
type call_id = int
type call_name = string
type call_string = ((addr) * call_name * call_id)
type call_stack = call_string list
type basic_block = (int * (int list))
type edge = (int * int)
let compare_call_string ((addr,it),name,id) ((addr2,it2),name2,id2) =
match Pervasives.compare ad... | null | https://raw.githubusercontent.com/montyly/gueb/45f496a5a1e8e908e562928762ece304c2408c3a/src/gueb_type.ml | ocaml | type addr = (int*int)
type call_id = int
type call_name = string
type call_string = ((addr) * call_name * call_id)
type call_stack = call_string list
type basic_block = (int * (int list))
type edge = (int * int)
let compare_call_string ((addr,it),name,id) ((addr2,it2),name2,id2) =
match Pervasives.compare ad... | |
6e6c8100aada4e90004db1f35dbba9a2a44b5fd406917a521d17fb5faba800a9 | haskell/cabal | Compiler.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Compiler
Copyright : 2003 - 2004
-- License : BSD3
--
-- Maintainer :
-- Portability : portable
--
-- This should be ... | null | https://raw.githubusercontent.com/haskell/cabal/ed314bc2e8f7c96929ff362047b4b22a764e48cd/Cabal/src/Distribution/Simple/Compiler.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Module : Distribution.Simple.Compiler
License : BSD3
Maintainer :
Portability : portable
This should be a much more sophisticated abstraction than it is. Currently
it's just a bit of dat... | # LANGUAGE DeriveGeneric #
Copyright : 2003 - 2004
' PackageDB ' type which is used to refer to package databases . Most compilers
only know about a single global package collection but GHC has a global and
module Distribution.Simple.Compiler (
* implementations
module Distribution.Compiler,
... |
0c62e4ccc99c51d8cd7b57459f5362a100b5fcf3bd0a53c438203ad59ebcb169 | eeng/shevek | topn.clj | (ns shevek.engine.druid-native.solver.topn
(:require [shevek.driver.druid :refer [send-query]]
[shevek.engine.druid-native.solver.common :refer [dimension-spec dimension-order add-common-fields]]
[shevek.engine.utils :refer [time-zone defaultLimit]]
[shevek.domain.dimension :refer ... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/engine/druid_native/solver/topn.clj | clojure | (ns shevek.engine.druid-native.solver.topn
(:require [shevek.driver.druid :refer [send-query]]
[shevek.engine.druid-native.solver.common :refer [dimension-spec dimension-order add-common-fields]]
[shevek.engine.utils :refer [time-zone defaultLimit]]
[shevek.domain.dimension :refer ... | |
9bcbff1d5d7e406e501fcdab7f63184b666891265b93ea4439f63f85fe3fd761 | rill-event-sourcing/rill | generic_test_base.clj | (ns rill.event-store.generic-test-base
(:require [rill.event-store :as store]
[rill.event-stream :as stream]
[rill.temp-store :refer [comparable-message messages=]]
[rill.event-channel :refer [event-channel]]
[clojure.core.async :as async]
[rill.uuid :refer ... | null | https://raw.githubusercontent.com/rill-event-sourcing/rill/711d08e52bd331cdc2255199069b2d0aca69e8b0/test/rill/event_store/generic_test_base.clj | clojure | (ns rill.event-store.generic-test-base
(:require [rill.event-store :as store]
[rill.event-stream :as stream]
[rill.temp-store :refer [comparable-message messages=]]
[rill.event-channel :refer [event-channel]]
[clojure.core.async :as async]
[rill.uuid :refer ... | |
9b02ca45e8ccb39d93c780749b9d6fe86b0e82e6a3fc900209a0614ada015e52 | freizl/dive-into-haskell | Example.hs | module Example where
import Lib
xs = [2..]
name = "hello haskell"
main = do
print (head xs)
print (foo 8 9)
| null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/stg-to-js/src/Example.hs | haskell | module Example where
import Lib
xs = [2..]
name = "hello haskell"
main = do
print (head xs)
print (foo 8 9)
| |
4bdf69c6bc9898e6f4a83668752d02c2bbc94e72eeca4df193991530d22c1070 | bobzhang/fan | epN.mli |
(** Ast Utilities for [Astfn.ep] *)
open Astfn
val tuple_of_number : ep -> int -> ep
val of_vstr_number : string -> int -> ep
(** used by [Derive.exp_of_ctyp] to generate patterns *)
val gen_tuple_n :
?cons_transform:(string -> string) -> arity:int -> string -> int -> ep
val mk_record : ?arity:int -> Ctyp.... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/main/epN.mli | ocaml | * Ast Utilities for [Astfn.ep]
* used by [Derive.exp_of_ctyp] to generate patterns |
open Astfn
val tuple_of_number : ep -> int -> ep
val of_vstr_number : string -> int -> ep
val gen_tuple_n :
?cons_transform:(string -> string) -> arity:int -> string -> int -> ep
val mk_record : ?arity:int -> Ctyp.col list -> ep
val mk_tuple : arity:int -> number:int -> ep
*
A very naive lifting . I... |
ab717365ca8c676fc84107e8a47d56bc0fadbaf4569fc7f5ccb47fc4472d891e | juxt/clip | edn_test.clj | (ns juxt.clip.edn-test
(:require
[clojure.test :refer [deftest is are]]
[juxt.clip.edn :as clip.edn]))
(defn foo [])
(deftest analyze-test
(is (= {:components {}}
(clip.edn/analyze
{:components {}})))
(is (= {:components {}
:executor #'foo}
(clip.edn/analyze
... | null | https://raw.githubusercontent.com/juxt/clip/c40c288f2de9295af34fc1e352687ac64ad986a7/test/juxt/clip/edn_test.clj | clojure | (ns juxt.clip.edn-test
(:require
[clojure.test :refer [deftest is are]]
[juxt.clip.edn :as clip.edn]))
(defn foo [])
(deftest analyze-test
(is (= {:components {}}
(clip.edn/analyze
{:components {}})))
(is (= {:components {}
:executor #'foo}
(clip.edn/analyze
... | |
0403f0528d200ddaa74cafc83d42562c638e0b8e77302a737f25273d21131b71 | haskell/haskell-language-server | DestructAllMany.hs | data ABC = A | B | C
many :: () -> Either a b -> Bool -> Maybe ABC -> ABC -> ()
many u e b mabc abc = _
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/DestructAllMany.hs | haskell | data ABC = A | B | C
many :: () -> Either a b -> Bool -> Maybe ABC -> ABC -> ()
many u e b mabc abc = _
| |
db0ec036d22d4efaf4d92522bff0505426a59cd51b6b2b24e429291f8f0ea552 | benedekfazekas/mranderson | move_test.clj | (ns mranderson.move-test
(:require [mranderson.move :as sut]
[clojure.test :as t]
[clojure.java.io :as io]
[rewrite-clj.zip :as z])
(:import [java.io File]))
(def ex-a-4
"(comment \"foobar comment here\")
(ns example.a.four)
(defn foo []
(println \"nuf said\"))
(deftype F... | null | https://raw.githubusercontent.com/benedekfazekas/mranderson/5bacf056ebe1feda9112c9df3aba5197fc40150e/test/mranderson/move_test.clj | clojure | this test is a slightly rewritten version of the original test for c.t.namespace.move from
ensure file timestamps are different
(println "affected after move")
(println (.getAbsolutePath a))
(prn (slurp a)))
(println "unaffected after move")
(println (.getAbsolutePath a))
(prn (slurp a)))
(println "af... | (ns mranderson.move-test
(:require [mranderson.move :as sut]
[clojure.test :as t]
[clojure.java.io :as io]
[rewrite-clj.zip :as z])
(:import [java.io File]))
(def ex-a-4
"(comment \"foobar comment here\")
(ns example.a.four)
(defn foo []
(println \"nuf said\"))
(deftype F... |
231cdc33867df945fe35338f2eec02a4ad7cf80585532a770a4443f565eeb8ed | huangz1990/SICP-answers | test-31-tree-map-using-map.scm | (load "test-manager/load.scm")
(load "31-tree-map-using-map.scm")
(define-each-check
(equal? (tree-map square (list (list 1 2) (list 3 4)))
(list (list (square 1) (square 2))
(list (square 3) (square 4))))
)
(run-registered-tests)
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/test-31-tree-map-using-map.scm | scheme | (load "test-manager/load.scm")
(load "31-tree-map-using-map.scm")
(define-each-check
(equal? (tree-map square (list (list 1 2) (list 3 4)))
(list (list (square 1) (square 2))
(list (square 3) (square 4))))
)
(run-registered-tests)
| |
facfabc70eaa32b5e8f16e8cf3287a0b53dace0ecb399eee77d297d0e4eaec5c | clojure-quant/infra-guix | sway.scm | (define-module (awb99 home sway)
#:use-module (srfi srfi-1)
#:use-module (guix gexp)
#:use-module (gnu home services)
# : use - module ( gnu home - services wm )
# : use - module ( awb99 home i3blocks )
# : use - module ( home services mako )
;#:use-module (home services swappy)
#:use-module (gnu packages gnupg)
# : us... | null | https://raw.githubusercontent.com/clojure-quant/infra-guix/d0ed79cbf179d3cc9fce882f3b3b2aae2925176f/modules/awb99/home/sway.scm | scheme | #:use-module (home services swappy)
-sway/-/blob/master/guix-sway-config.scm
sway notes
-config/src/master/sway-service.scm
-Sway/desktop-settings/blob/sway/community/sway/etc/sway/modes/default
package does not work.
(package sway)
(package sway-next) ; no substitutes
resumed. It will also lock your sc... | (define-module (awb99 home sway)
#:use-module (srfi srfi-1)
#:use-module (guix gexp)
#:use-module (gnu home services)
# : use - module ( gnu home - services wm )
# : use - module ( awb99 home i3blocks )
# : use - module ( home services mako )
#:use-module (gnu packages gnupg)
# : use - module ( kreved packages wm )
)
... |
0aa17e992bece4b5f55b8da1091c61037e19f5dea74eba11278531d8534feeb0 | clj-br/clojuredocs | project.clj | (defproject clojuredocs "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[ring-server "0.4.0"]
[reagent "0.6.0-rc"]
[r... | null | https://raw.githubusercontent.com/clj-br/clojuredocs/4957150d6e97281ecd7d82ec021b96ff99656a51/project.clj | clojure | (defproject clojuredocs "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[ring-server "0.4.0"]
[reagent "0.6.0-rc"]
[r... | |
25dd17cecb73d5cc189fc3f40eed0d2a82c3e7516383e69b1da48bba11a3e699 | fukamachi/qlot | dist.lisp | (defpackage #:qlot/source/dist
(:nicknames #:qlot.source.dist)
(:use #:cl
#:qlot/source/base)
(:import-from #:qlot/utils/ql
#:make-versioned-distinfo-url)
(:import-from #:qlot/errors
#:invalid-definition)
(:export #:source-dist
#:source-dist-project
... | null | https://raw.githubusercontent.com/fukamachi/qlot/96c40e6e6193f4bcbc61fe23aee98916347e2d94/source/dist.lisp | lisp | (defpackage #:qlot/source/dist
(:nicknames #:qlot.source.dist)
(:use #:cl
#:qlot/source/base)
(:import-from #:qlot/utils/ql
#:make-versioned-distinfo-url)
(:import-from #:qlot/errors
#:invalid-definition)
(:export #:source-dist
#:source-dist-project
... | |
5a98f82a9d8cabfcd04fb6e5aa2685abd143415294f0ab610c1ba24776638647 | re-ops/re-cipes | nebula.clj | (ns re-cipes.networking.nebula
"Nebula setup"
(:require
[re-cipes.hardening]
[re-cipes.access]
[re-cog.resources.permissions :refer (set-file-acl)]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.facts.config :refer (configuration)]
[re-cog.facts.... | null | https://raw.githubusercontent.com/re-ops/re-cipes/480195e603a9df63aa4d2b34e19343df1f4034ba/src/re_cipes/networking/nebula.clj | clojure | (ns re-cipes.networking.nebula
"Nebula setup"
(:require
[re-cipes.hardening]
[re-cipes.access]
[re-cog.resources.permissions :refer (set-file-acl)]
[re-cog.resources.ufw :refer (add-rule)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.facts.config :refer (configuration)]
[re-cog.facts.... | |
72497f257fc8e840c8618a8a2923639c20be52cab3760c93b82c47479eb67a62 | Azel4231/clojure-quotes | core_test.clj | (ns clojure-quotes.core-test
(:require [clojure.test :refer :all]
[clojure-quotes.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/Azel4231/clojure-quotes/dcac762f5d3901ffd864b2149168f40190c19dac/test/clojure_quotes/core_test.clj | clojure | (ns clojure-quotes.core-test
(:require [clojure.test :refer :all]
[clojure-quotes.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
847f80e70df4c5c06b6641fe566e68f0962a59f3b84a77abf22bebb13178f495 | v-kolesnikov/sicp | 3_29_test.clj | (ns sicp.chapter03.3-29-test
(:require [clojure.test :refer :all]
[sicp.chapter03.3-29 :refer [or-gate]]
[sicp.chapter03.wirelang :refer [and-gate-delay current-time
get-signal inverter-delay
make-wire pr... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter03/3_29_test.clj | clojure | (ns sicp.chapter03.3-29-test
(:require [clojure.test :refer :all]
[sicp.chapter03.3-29 :refer [or-gate]]
[sicp.chapter03.wirelang :refer [and-gate-delay current-time
get-signal inverter-delay
make-wire pr... | |
6a2768e89a28e8090c799366563361a7c5e8a497bd33ca33e3e20789acc36df0 | janestreet/memtrace_viewer | flame_graph_panel.mli | open! Core
open Bonsai_web
open Memtrace_viewer_common
module Selection : sig
type t =
| Flame of { fragment : Data.Fragment.t }
| Icicle of { fragment : Data.Fragment.t }
| Focus of
{ callers_fragment : Data.Fragment.t
; callees_fragment : Data.Fragment.t
}
end
type t =
{ view... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/flame_graph_panel.mli | ocaml | open! Core
open Bonsai_web
open Memtrace_viewer_common
module Selection : sig
type t =
| Flame of { fragment : Data.Fragment.t }
| Icicle of { fragment : Data.Fragment.t }
| Focus of
{ callers_fragment : Data.Fragment.t
; callees_fragment : Data.Fragment.t
}
end
type t =
{ view... | |
d19eab9961a78e566a0403acffac31bc0e4bc606ff8a54adc5f9a80680cbb2d2 | ijvcms/chuanqi_dev | world_boss_reward_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(world_boss_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/world_boss_reward_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(world_boss_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ world_boss_reward_config:get(X) || X <- get_list() ].
get_list() ->
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ... |
e3bd6d8633d1e4fd38c38f56914c701203a703fb8ef1575cd651c891bb9cad67 | dyzsr/ocaml-selectml | moved_while_blocking.ml | (* TEST
* hassysthreads
include systhreads
** bytecode
** native
*)
let t2_begin = Atomic.make false
let t2_promoting = Atomic.make false
let t2_finish_promote = Atomic.make false
let t2_done = Atomic.make false
let t2_quit = Atomic.make false
let await a =
while not (Atomic.get a) do Thread.yield () done
let set a ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/statmemprof/moved_while_blocking.ml | ocaml | TEST
* hassysthreads
include systhreads
** bytecode
** native
no-alloc printing to stdout |
let t2_begin = Atomic.make false
let t2_promoting = Atomic.make false
let t2_finish_promote = Atomic.make false
let t2_done = Atomic.make false
let t2_quit = Atomic.make false
let await a =
while not (Atomic.get a) do Thread.yield () done
let set a =
Atomic.set a true
let say msg =
Unix.write Unix.stdout (Bytes... |
7d20950de1ac85b53f2901f4c3ac97ceb364726239dc2c34c962cbd77d357023 | freizl/dive-into-haskell | type-synonym-families.hs | # LANGUAGE UndecidableInstances #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE NoStarIsType #
module Main where
-- * Open Type synonym family
type family Simplify t
type instance Simplify Integer = Integer
type instance Simplify Double = Integer
type instance Simplify Float = Integer
type instance... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/type-level-programming/type-synonym-families.hs | haskell | * Open Type synonym family
>>> :kind Simplify
>>> :kind (Simplify Double)
(Simplify Double) :: *
>>> :kind! (Simplify Double)
(Simplify Double) :: *
= Integer
* Closed Type synonym family
>>> :t wident False
wident False :: Int
>>> :t wident (1::Int)
wident (1::Int) :: Integer
>>> :t wident 'a'
wident 'a'... | # LANGUAGE UndecidableInstances #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE NoStarIsType #
module Main where
type family Simplify t
type instance Simplify Integer = Integer
type instance Simplify Double = Integer
type instance Simplify Float = Integer
type instance Simplify Bool = String
t... |
48a7d664ef8a3605aec7acbd1c33a6b92332e9cf1e67811292a14ded72f020aa | joearms/ezwebframe | interact1.erl | -module(interact1).
-export([start/1]).
start(Browser) -> running(Browser).
running(Browser) ->
receive
{Browser, {struct, [{entry,<<"input">>},{txt, Bin}]}} ->
Time = clock1:current_time(),
Browser ! [{cmd,append_div},{id,scroll},
{txt, list_to_binary([Time, " > ", Bin, "<br>"])}]
end,
... | null | https://raw.githubusercontent.com/joearms/ezwebframe/9eb320ff61d4dc7b0885f700414e56b7554788bf/demos/interact/interact1.erl | erlang | -module(interact1).
-export([start/1]).
start(Browser) -> running(Browser).
running(Browser) ->
receive
{Browser, {struct, [{entry,<<"input">>},{txt, Bin}]}} ->
Time = clock1:current_time(),
Browser ! [{cmd,append_div},{id,scroll},
{txt, list_to_binary([Time, " > ", Bin, "<br>"])}]
end,
... | |
707a63252e1bb6c628bb18f48f4c598f6989486d888e6ed5746a8d5703441055 | metosin/muuntaja | core.clj | (ns muuntaja.format.core)
(defprotocol Decode
(decode [this data charset]))
(defprotocol EncodeToBytes
(encode-to-bytes [this data charset]))
(defprotocol EncodeToOutputStream
(encode-to-output-stream [this data charset]))
(defrecord Format [name encoder decoder return matches])
| null | https://raw.githubusercontent.com/metosin/muuntaja/83da35f35518aaa02ef4d1ca6bbd007b781ebf84/modules/muuntaja/src/muuntaja/format/core.clj | clojure | (ns muuntaja.format.core)
(defprotocol Decode
(decode [this data charset]))
(defprotocol EncodeToBytes
(encode-to-bytes [this data charset]))
(defprotocol EncodeToOutputStream
(encode-to-output-stream [this data charset]))
(defrecord Format [name encoder decoder return matches])
| |
fd6c5674a047c557c64d31225e5e3b60632484e2d9aef5bdc459ba2b6c93a415 | eponai/sulolive | query.clj | (ns eponai.server.datomic.query
(:require
[clojure.string :as string]
[clojure.set :as set]
[datomic.api :as d]
[medley.core :as medley]
[taoensso.timbre :as timbre :refer [info debug warn trace]]
[eponai.common.database :as db]))
(defn schema
"Pulls schema from the db. If data is provided ... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/server/datomic/query.clj | clojure | Create a path of where-clauses from entity ?e through
the path of the pull-pattern.
If we've got a star attribute,
just return the query matching everything.
For a "star" attribute, just don't specify
which values the ?datom-attr-keyword can take.
Else, return queries for normal and reverse attributes.
TODO: TE... | (ns eponai.server.datomic.query
(:require
[clojure.string :as string]
[clojure.set :as set]
[datomic.api :as d]
[medley.core :as medley]
[taoensso.timbre :as timbre :refer [info debug warn trace]]
[eponai.common.database :as db]))
(defn schema
"Pulls schema from the db. If data is provided ... |
045abe7006d4f53f2aff40a0ad7800f443aed9b5addda4b31ab913abe9489861 | penpot/penpot | project_menu.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.dashboard.project-menu
(:require
[app.common.spec :as us]
[app.main.data.dashboard :as... | null | https://raw.githubusercontent.com/penpot/penpot/96ce475206d90cccb01c8cd63d684132690e480b/frontend/src/app/main/ui/dashboard/project_menu.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.dashboard.project-menu
(:require
[app.common.spec :as us]
[app.main.data.dashboard :as dd]
[app.main.data.messages :... |
98826d757d23dad099489e57baada3eee283d6950516017dac7322f153e40920 | ekmett/ekmett.github.com | Origami.hs | # LANGUAGE ExistentialQuantification , ViewPatterns , FlexibleInstances , PatternGuards #
module Origami where
import Prelude hiding ((.),id)
import Control.Arrow
import Control.Comonad
import Control.Category
import Control.Comonad.Density
import Control.Functor hiding (first,second)
import Control.Functor.Extras
i... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/Origami.hs | haskell | horrible definition, avoid it!
Foldl
pointfree view-patterns!
f <*> x = Mealy $ \(runMealy f &&& runMealy x -> ((f',f''),(x',x''))) -> (f' <*> x', f'' x'')
instance Applicative Foldr1
A density comonad of an arbitrary f-Algebra | # LANGUAGE ExistentialQuantification , ViewPatterns , FlexibleInstances , PatternGuards #
module Origami where
import Prelude hiding ((.),id)
import Control.Arrow
import Control.Comonad
import Control.Category
import Control.Comonad.Density
import Control.Functor hiding (first,second)
import Control.Functor.Extras
i... |
b714f340d92edd864982f4da05c00720464c373bee6104302dc132b61b50dc6e | avsm/eeww | tests.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/ocamltest/tests.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
Copyright 2016 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t = {
test_name : string;
test_run_by_default : bool;
test_actions : Actions.t list;
test_descrip... |
71392682cf858d1a13a2f1542dd45befbe432eb7d15efc9d9885ffd33d2c5c4d | neongreen/haskell-ex | spiral.hs | module Spiral where
import Data.Matrix
data Direction = R | D | U | L
main :: IO ()
main = do
putStrLn "Please enter a size for the spiral!"
i <- getInt
putStrLn $ concatMap (\line -> (concatMap (\x -> if x == 1 then "* " else " ") line) ++ "\n") $ toLists $ spiral i
spiral :: Int -> Matrix Int
spiral... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week4/spiral/aneksteind/spiral.hs | haskell | module Spiral where
import Data.Matrix
data Direction = R | D | U | L
main :: IO ()
main = do
putStrLn "Please enter a size for the spiral!"
i <- getInt
putStrLn $ concatMap (\line -> (concatMap (\x -> if x == 1 then "* " else " ") line) ++ "\n") $ toLists $ spiral i
spiral :: Int -> Matrix Int
spiral... | |
5f758dc38d79780f445c8481c4628e33588aba2668a09fcb76a76113d1d42c4a | dmjio/scythe | LexerUtils.hs | # LANGUAGE RecordWildCards #
module Data.CSV.LexerUtils where
import Control.Monad.State
import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.Encoding as LT
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.ByteString.... | null | https://raw.githubusercontent.com/dmjio/scythe/a5f4e79803e9bf74cb1247a3ba7217a18b529f36/src/Data/CSV/LexerUtils.hs | haskell | # UNPACK #
# UNPACK #
# UNPACK # | # LANGUAGE RecordWildCards #
module Data.CSV.LexerUtils where
import Control.Monad.State
import qualified Data.Text.Lazy as LT
import qualified Data.Text.Lazy.Encoding as LT
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.ByteString.... |
ceb97320547e281d4c39641683e8ec5740aff3f5921b72737f0cfc1fca09eba1 | oriansj/mes-m2 | display_arith.scm | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
;;;
This file is part of GNU .
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/test/test007/display_arith.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Setup output file
Test -
T... | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
This file is part of GNU .
under the terms of the GNU General Public License as published by
GNU is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public... |
5310e93546342d9bbd39c5f8df849d1d56bb6f1fc5df964f00a1ae16f8480714 | dimitaruzunov/fp-2018 | cycle.scm | (require rackunit rackunit/text-ui)
(define the-empty-stream '())
(define-syntax cons-stream
(syntax-rules ()
((cons-stream h t)
(cons h (delay t)))))
(define (empty-stream? s)
(equal? s the-empty-stream))
(define head car)
(define (tail s)
(force (cdr s)))
(define (cycle l)... | null | https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/08/cycle.scm | scheme | (require rackunit rackunit/text-ui)
(define the-empty-stream '())
(define-syntax cons-stream
(syntax-rules ()
((cons-stream h t)
(cons h (delay t)))))
(define (empty-stream? s)
(equal? s the-empty-stream))
(define head car)
(define (tail s)
(force (cdr s)))
(define (cycle l)... | |
b3c829205c0fa859a0e74b1017fa9f18ffbded7f4dd52103ca983420329aec56 | patricoferris/ocaml-multicore-monorepo | check_runtime.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2021 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/js_of_ocaml/compiler/bin-js_of_ocaml/check_runtime.ml | ocaml | [from_runtime2] is a superset of [from_runtime1].
Extra primitives are registered on the ocaml side (e.g. generate.ml)
TODO: add flags to only display missing or extra primitives | Js_of_ocaml compiler
* /
* Copyright ( C ) 2021 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... |
ec88c5e9df09d5f86f1abfef449f2628904866ba81c93200fdaf7e37b2c6e8cc | thi-ng/cgg | project.clj | (defproject thi.ng/cgg "0.1.0-SNAPSHOT"
:description "Cosine gradient designer for thi.ng/color"
:url ""
:license {:name "Apache Software License"
:url "-2.0"
:distribution :repo}
:min-lein-version "2.6.1"
:dependencies [[org.clojure/clojure "1.8.0"]
... | null | https://raw.githubusercontent.com/thi-ng/cgg/8eab52272a9934c2d4af98bfc91d711fca8d5294/project.clj | clojure | (defproject thi.ng/cgg "0.1.0-SNAPSHOT"
:description "Cosine gradient designer for thi.ng/color"
:url ""
:license {:name "Apache Software License"
:url "-2.0"
:distribution :repo}
:min-lein-version "2.6.1"
:dependencies [[org.clojure/clojure "1.8.0"]
... | |
866d6313c4ed386e90800190919e83c793752af817e026cb72f302638fdabfde | ertugrulcetin/ClojureNews | entry.cljs | (ns controller.entry
(:require [ajax.core :as ajax :refer [GET POST PUT DELETE]]
[cljc.validation :as validation]
[cljc.error-messages :as error-message]
[reagent.core :as r]
[goog.dom :as dom]
[util.view]
[util.controller]
[view.entr... | null | https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/controller/entry.cljs | clojure | (ns controller.entry
(:require [ajax.core :as ajax :refer [GET POST PUT DELETE]]
[cljc.validation :as validation]
[cljc.error-messages :as error-message]
[reagent.core :as r]
[goog.dom :as dom]
[util.view]
[util.controller]
[view.entr... | |
d6b16aa20f468b36b7df47f0a03a04e424c0b586d39051861e3d53a109ecf6e1 | ranjitjhala/haddock-annot | Command.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Command
Copyright : 2007
--
-- Maintainer :
-- Portability : portable
--
This is to do with command line handling . The Cabal command line is
-- organised into a number of named sub-co... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/Cabal-1.10.1.1/Distribution/Simple/Command.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Command
Maintainer :
Portability : portable
organised into a number of named sub-commands (much like darcs). The
description, a set of flags. Commands can be associated with actions and
run. It ... | Copyright : 2007
This is to do with command line handling . The Cabal command line is
' CommandUI ' abstraction represents one of these sub - commands , with a name ,
derived commands . This feature is used heavily in - install@.
All rights reserved .
Redistribution and use in source and binary fo... |
5c70611cf1542d9820a10090655721de5e61d9da9ccefad31a2afad13e187930 | zotonic/zotonic | m_linkedin.erl | @author < >
2017
%% @doc Model for mod_linkedin
Copyright 2017
%%
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 o... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_linkedin/src/models/m_linkedin.erl | erlang | @doc Model for mod_linkedin
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 spe... | @author < >
2017
Copyright 2017
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_linkedin).
-behaviour (zotonic_model).
-export([
m_get/3,
is_useauth/1
]).
-include_lib("kernel/include/logg... |
0fb9f9756bea041342aa0754a5f849e12133b2e6e17680eefdfceefbf1f67c01 | silky/quipper | QFTAdder.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
import QuipperLib.Arith
import Qui... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/QFTAdder.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
-- Functions for testing the QFTAdd circuit --------
| Output a preview of the qft_add_in_place circuit for quantum integers of
the gi... | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
import QuipperLib.Arith
import QuipperLib.QFTAdd
import QuipperLib.Simulation
import QuipperLib.Unboxing
import System.Environment
print_qft_add :: Int -> IO ()
print_qft_add m = print_generic Preview qft_add_in_place (qdin... |
b30981be8cc3b5ea23ca892d76bfe6acafd7485cf2c0c054bfe24342476c7b66 | ocsigen/js_of_ocaml | svg.ml | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , ... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/examples/graph_viewer/svg.ml | ocaml | **
print_extent ctx fill stroke;
**
XXX Check white-space only
Format.eprintf "d=%s@." d;
let f = GBin.frame ~shadow_type:`IN
~packing:(b#pack ~expand:true ~fill:true) () in
~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC
let button = GButton.check_button ~label:"Animate"
~packing:b#pack () in
... | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , ... |
18c526dec5d33504c20d0c1f3b9eee157b3d9d1a7a6394b2afe79b5c27b99e42 | byorgey/species | Interval.hs | # LANGUAGE NoImplicitPrelude
, CPP
#
, CPP
#-}
-----------------------------------------------------------------------------
-- |
-- Module : Math.Combinatorics.Species.Util.Interval
Copyright : ( c ) 2010
-- License : BSD-style (see LICENSE)
-- Maintainer :
-- Stab... | null | https://raw.githubusercontent.com/byorgey/species/5f1d99095e41b860e2bfbc3ba034109a8101846f/Math/Combinatorics/Species/Util/Interval.hs | haskell | ---------------------------------------------------------------------------
|
Module : Math.Combinatorics.Species.Util.Interval
License : BSD-style (see LICENSE)
Maintainer :
Stability : experimental
A simple implementation of intervals of natural numbers, for use in
tracking the possible sizes... | # LANGUAGE NoImplicitPrelude
, CPP
#
, CPP
#-}
Copyright : ( c ) 2010
example , the species @x + x^2 + x^3@ will correspond to the
module Math.Combinatorics.Species.Util.Interval
(
NatO, omega, natO
, Interval, iLow, iHigh
, decrI, union, intersect, elem, t... |
16069f265a0a582c9cc14da8eb7177902426db845c3d23e6b87a61de6e6f27f9 | wargrey/w3s | parser.rkt | #lang typed/racket/base
;;; -syntax/#parsing
(provide (all-defined-out))
(require racket/string)
(require racket/symbol)
(require "digicore.rkt")
(require "condition.rkt")
(require "variables.rkt")
(require "selector.rkt")
(require "stdin.rkt")
(require "misc.rkt")
(require (for-syntax racket/base))
;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/wargrey/w3s/2323ac18cdb3a04868485907fdc3b8e8220dd11c/css/digitama/syntax/parser.rkt | racket | -syntax/#parsing
-syntax/#parser-entry-points
-syntax/#parser-entry-points
-syntax/#parse-stylesheet
-syntax/#declaration-rule-list
-syntax/#parse-list-of-rules
-syntax/#declaration-rule-list
-syntax/#parse-rule
-syntax/#declaration
-syntax/#parse-declaration
-conditional/#at-ruledef-supports
-syntax/#par... | #lang typed/racket/base
(provide (all-defined-out))
(require racket/string)
(require racket/symbol)
(require "digicore.rkt")
(require "condition.rkt")
(require "variables.rkt")
(require "selector.rkt")
(require "stdin.rkt")
(require "misc.rkt")
(require (for-syntax racket/base))
(define-syntax (define-css-parser-... |
a603475df74f7453713c67ec821dfb0ea4059a7eba4395d15bcb4235c8ad882e | rabbitmq/khepri | khepri_path.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
@doc Khepri path API .
%%
A path is the type used... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/src/khepri_path.erl | erlang |
A path describes how to reach a node from the root node.
A path, or <em>native path</em>, is a list of components. Components can be
```
% Native path .
Path = [stock, wood, <<"oak">>].
'''
A path may contain conditions to tune how a node is matched or to match
multiple nodes at once. This is called a <em... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
@doc Khepri path API .
A path is the type used by Khepr... |
76a6986e6fe764638282e85c4828cd581a0bab2bd84933d8cddd492514b45d95 | TOTBWF/teenytt | Univ.hs | -- | Refiner rules for the universe.
module TeenyTT.Elaborator.Refiner.Univ
( formation
, el
) where
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Elaborator.Tactic qualified as T
formation :: T.Tp
formation = T.Tp $ pure S.Univ
el :: T.Chk -> T.Tp
el tac ... | null | https://raw.githubusercontent.com/TOTBWF/teenytt/0b5f149508a0a4efe9818b3fb8d76e00dc898f56/src/TeenyTT/Elaborator/Refiner/Univ.hs | haskell | | Refiner rules for the universe. | module TeenyTT.Elaborator.Refiner.Univ
( formation
, el
) where
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Elaborator.Tactic qualified as T
formation :: T.Tp
formation = T.Tp $ pure S.Univ
el :: T.Chk -> T.Tp
el tac = T.Tp do
tm <- T.runChk tac D.VU... |
1b3376d19da51e77829bebcdf07b81906da5813c13b8f12de1a737bd2660c5a5 | zadean/xqerl | op_dateTime_greater_than_SUITE.erl | -module('op_dateTime_greater_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-dateTime-greater-than2args-1'/1]).
-export(['op-dateTime-greater-t... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/op/op_dateTime_greater_than_SUITE.erl | erlang | -module('op_dateTime_greater_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-dateTime-greater-than2args-1'/1]).
-export(['op-dateTime-greater-t... | |
38480e6781ed07c4ec64cc63e0fbe04572f42b29c8fbf5665855b9e65f1aff1c | wilbowma/cur | rackunit-ntac.rkt | #lang racket/base
;; this file contains shim test forms for old cur test files,
;; and some new test forms, eg check-ntac-trace
(provide check-ntac-fail check-ntac-trace ntac/trace ntac/trace/raw :: check-equal?)
(require rackunit
(only-in rackunit/turnstile+ check-type)
syntax/parse/define
... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/rackunit-ntac.rkt | racket | this file contains shim test forms for old cur test files,
and some new test forms, eg check-ntac-trace
env binding
goal, add extra newline | #lang racket/base
(provide check-ntac-fail check-ntac-trace ntac/trace ntac/trace/raw :: check-equal?)
(require rackunit
(only-in rackunit/turnstile+ check-type)
syntax/parse/define
(for-syntax racket/base
racket/port
racket/pretty
... |
a377c137f098876a5e0790d4efb5e000a4c6dd1454487931f1724ab514c7f083 | mbuczko/cerber-oauth2-provider | client.clj | (ns cerber.stores.client
"Functions handling OAuth2 client storage."
(:require [cerber.stores.token :as token]
[cerber
[db :as db]
[error :as error]
[helpers :as helpers]
[mappers :as mappers]
[store :refer :all]]
[failjure.cor... | null | https://raw.githubusercontent.com/mbuczko/cerber-oauth2-provider/56ef50366bc83630ae41d438fa017e5411c20fdd/src/cerber/stores/client.clj | clojure | (ns cerber.stores.client
"Functions handling OAuth2 client storage."
(:require [cerber.stores.token :as token]
[cerber
[db :as db]
[error :as error]
[helpers :as helpers]
[mappers :as mappers]
[store :refer :all]]
[failjure.cor... | |
44ac329c1aea721a1decccc5b1b046052b8abb2879faa2bae255809267e5d8c1 | tweag/asterius | Task.hs | # LANGUAGE DuplicateRecordFields #
module Asterius.Main.Task
( Target (..),
Task,
target,
optimizeLevel,
shrinkLevel,
inputHS,
inputEntryMJS,
outputDirectory,
outputBaseName,
hasMain,
bundle,
debug,
run,
verboseErr,
yolo,
consoleHistory,
extraGHCFlags,
... | null | https://raw.githubusercontent.com/tweag/asterius/e4791671dcfe3baae97a3f5f6bc582e0f9d7d292/asterius/src/Asterius/Main/Task.hs | haskell | # LANGUAGE DuplicateRecordFields #
module Asterius.Main.Task
( Target (..),
Task,
target,
optimizeLevel,
shrinkLevel,
inputHS,
inputEntryMJS,
outputDirectory,
outputBaseName,
hasMain,
bundle,
debug,
run,
verboseErr,
yolo,
consoleHistory,
extraGHCFlags,
... | |
31fe425fd162bffdf419f52147ee4c42891552bd27e92b77f28f7fdc711d9aec | mfoemmel/erlang-otp | snmp_test_mgr.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . 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 Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/test/snmp_test_mgr.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 limit... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmp_test_mgr).
This module imp... |
b42c449356d28467cf3a4ba61bc2d4bf4314ec53943ed074c73f8a695b2048c1 | halgari/naiad | transducers.clj | (ns naiad.transducers
(:require [naiad.transducers.ioc :refer [transducer ingest emit if-value]])
(:refer-clojure :exclude [first nth last reduce]))
(defn reduce [rf init]
(transducer
(loop [acc init]
(if-value [v (ingest)]
(let [acc (rf acc v)]
(if (reduced? acc)
(emit ... | null | https://raw.githubusercontent.com/halgari/naiad/c47bc6f9d2e8e4222bd7820fa404d9ceebfc8e22/src/naiad/transducers.clj | clojure | (ns naiad.transducers
(:require [naiad.transducers.ioc :refer [transducer ingest emit if-value]])
(:refer-clojure :exclude [first nth last reduce]))
(defn reduce [rf init]
(transducer
(loop [acc init]
(if-value [v (ingest)]
(let [acc (rf acc v)]
(if (reduced? acc)
(emit ... | |
186fb896822ff1f1fbb5959a99297734b3a0179413dfb7722b008b215d8cde7b | funcool/catacumba | handlers.clj | (ns website.handlers
(:require [clojure.java.io :as io]
[hiccup.page :as hc]
[catacumba.core :as ct]
[catacumba.handlers :as hs]
[catacumba.handlers.auth :as auth]
[catacumba.http :as http]))
;; A function that renders the basic html layout
;; for all page... | null | https://raw.githubusercontent.com/funcool/catacumba/a493843176ee8defa2f3c6afa23c720f495d9341/examples/website-ssl/src/website/handlers.clj | clojure | A function that renders the basic html layout
for all pages used in that application.
Shows a simple html page. It has different content for anonynmous
and logged users.
Login page
A helper function for render login page, it used also for initial
rendering and render login page with errors on post requests.
... | (ns website.handlers
(:require [clojure.java.io :as io]
[hiccup.page :as hc]
[catacumba.core :as ct]
[catacumba.handlers :as hs]
[catacumba.handlers.auth :as auth]
[catacumba.http :as http]))
(defn layout
[content]
(hc/html5
[:head
[:meta {:cha... |
3c3751c82d1b482c2b1a450a3c7dac45c7ddd2e3423436a0bedbc39841782573 | clojure-interop/google-cloud-clients | StorageRpc$Option.clj | (ns com.google.cloud.storage.spi.v1.StorageRpc$Option
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage.spi.v1 StorageRpc$Option]))
(def PREDEFINED_ACL
"Enum Constant.
type: com.google.cloud.storage.spi.v1.StorageRpc$Option"
StorageRpc$Option/PREDEFINED_ACL)
(def PREDEFINE... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/spi/v1/StorageRpc%24Option.clj | clojure | (ns com.google.cloud.storage.spi.v1.StorageRpc$Option
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage.spi.v1 StorageRpc$Option]))
(def PREDEFINED_ACL
"Enum Constant.
type: com.google.cloud.storage.spi.v1.StorageRpc$Option"
StorageRpc$Option/PREDEFINED_ACL)
(def PREDEFINE... | |
cbaa6410c61dd5f350d544591fece0e1e44c29db081ff77e3bee540bb29f7df2 | helium/erlang-dkg | dkg_distributed_SUITE.erl | -module(dkg_distributed_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/inet.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([symmetric_test/1]).
%% common test callba... | null | https://raw.githubusercontent.com/helium/erlang-dkg/a22b841ae6cb31b17e547a6f208e93fa35f04b7f/test/dkg_distributed_SUITE.erl | erlang | common test callbacks
per suite cleanup, placeholder
test cases
load dkg_worker on each node
start a dkg_worker on each node
begin the DKG
helper functions
for each worker, we expect i - 1 shares worse case | -module(dkg_distributed_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/inet.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2,
all/0
]).
-export([symmetric_test/1]).
all() -> [symmetric_... |
65892346539eb5e89b075a6795730e38cd4ddbe40c6b005ec71263114d9bf5e3 | racket/picturing-programs | map-image.rkt | #lang racket/base
Spring 2010 : started trying to get this to work .
Late June 2010 : Got build - image and map - image working .
; Added name->color and get-pixel-color.
; Added build-masked-image and map-masked-image.
July 6 , 2010 : added change - to - color
July 28 , 2010 : added map3 - image and - image .... | null | https://raw.githubusercontent.com/racket/picturing-programs/9061b6c6f93a2aeba58a785a75c324225e12a47c/picturing-programs/private/map-image.rkt | racket | Added name->color and get-pixel-color.
Added build-masked-image and map-masked-image.
can write a function from color to color, and immediately map it
onto an image.
itself seems to work, and having the cache size >= the number of images DOES improve
performance for a series of get-pixel-color calls rotating amon... | #lang racket/base
Spring 2010 : started trying to get this to work .
Late June 2010 : Got build - image and map - image working .
July 6 , 2010 : added change - to - color
July 28 , 2010 : added map3 - image and - image . Is change - to - color really useful ?
Dec. 26 , 2010 : added color= ? to export ( du... |
1fd71ab41b10286b37023a9a9c1aa4dea37c69b04b41e045bf48ef455d9b4999 | INRIA/zelus | unsafe.ml | (***********************************************************************)
(* *)
(* *)
(* Zelus, a synchronous language for hybrid systems *)
(* ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/compiler/rewrite/unsafe.ml | ocaml | *********************************************************************
Zelus, a synchronous language for hybrid systems
... | ( c ) 2020 Paris ( see the file )
Automatique . All rights reserved . This file is distributed under
the terms of the INRIA Non - Commercial License Agreement ( see the
open Zelus
open Zident
open Deftypes
open Zaux
let rec exp { e_desc = desc } =
match desc with
| ... |
3279c9df40593cbde284c8bf92b4e268f53551a3c21b9877d8728d33530812ed | scalaris-team/scalaris | benchmark_SUITE.erl | 2008 , 2011 Zuse Institute Berlin
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
d... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/benchmark_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 gov... | 2008 , 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(benchmark_SUITE).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("unittest.hrl").
all() ->
... |
00fe754277ca674605bde04ae6060c4ec51a9dac63228f3fde5805e911e88475 | berberman/arch-hs | Compat.hs | # LANGUAGE CPP #
# LANGUAGE PatternSynonyms #
module Distribution.ArchHs.Compat
( pattern PkgFlag,
PkgFlag,
licenseFile,
)
where
import Data.Maybe (listToMaybe)
import Distribution.Types.ConfVar
import Distribution.Types.Flag
import Distribution.Types.PackageDescription (PackageDescription, licenseFiles)
... | null | https://raw.githubusercontent.com/berberman/arch-hs/ae448df37e203a294e1a4814b5ec171f04f6a7fb/src/Distribution/ArchHs/Compat.hs | haskell | # COMPLETE PkgFlag # | # LANGUAGE CPP #
# LANGUAGE PatternSynonyms #
module Distribution.ArchHs.Compat
( pattern PkgFlag,
PkgFlag,
licenseFile,
)
where
import Data.Maybe (listToMaybe)
import Distribution.Types.ConfVar
import Distribution.Types.Flag
import Distribution.Types.PackageDescription (PackageDescription, licenseFiles)
... |
f7858092f5c1994749c8099a890d93ffe409fc74b2313827564ab5a314ca235a | CRogers/obc | gTree.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/lablgtk/gTree.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
0ddaca39d97bee8809aa0df275cbcbfe6310219fd361ff8e171688926c287be7 | Decentralized-Pictures/T4L3NT | client_proto_stresstest_commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_client_commands/client_proto_stresstest_commands.ml | 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... |
03a1c812bb9ccb3d23d760730c7ab95dfcd12944b517fbfeee3f2d4e4f93c307 | robert-strandh/SICL | binary-lcm-defmethods.lisp | (cl:in-package #:sicl-arithmetic)
(defmethod binary-lcm ((x integer) (y integer))
(if (or (zerop x) (zerop y))
0
;; Rather than the obvious (/ (abs (* a b)) (gcd a b)), we divide the
GCD out first , so that we do n't need to compute a large intermediate
;; which we then immediately shrink.
... | null | https://raw.githubusercontent.com/robert-strandh/SICL/8822ce17afe352923e0a08c79b010c4ef73d2011/Code/Arithmetic/binary-lcm-defmethods.lisp | lisp | Rather than the obvious (/ (abs (* a b)) (gcd a b)), we divide the
which we then immediately shrink.
TODO?: Could use an exact division algorithm for the truncation. | (cl:in-package #:sicl-arithmetic)
(defmethod binary-lcm ((x integer) (y integer))
(if (or (zerop x) (zerop y))
0
GCD out first , so that we do n't need to compute a large intermediate
(let ((x (abs x)) (y (abs y)))
(multiple-value-bind (high low) (if (> x y) (values x y) (values y x))
... |
639c233eac5799fa818853e2e55aeb03fa2d2d520b7002a9f6b4a98335bfd26c | jwiegley/notes | Reflection1.hs | module Main where
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
data Foo = Foo [Int] [String]
deriving Show
instance Arbitrary Foo where
arbitrary = do
xs <- listOf chooseAny
len <- choose (1, 100)
ys <- vectorOf len (shuffle "Hello, world")
return $ Foo xs ys
... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Reflection1.hs | haskell | module Main where
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
data Foo = Foo [Int] [String]
deriving Show
instance Arbitrary Foo where
arbitrary = do
xs <- listOf chooseAny
len <- choose (1, 100)
ys <- vectorOf len (shuffle "Hello, world")
return $ Foo xs ys
... | |
ea299eff1cb704874606f8052e4657ced42931e020c64bf637c14906860647dc | scrintal/heroicons-reagent | arrow_left_circle.cljs | (ns com.scrintal.heroicons.mini.arrow-left-circle)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:g {:clipPath "url(#clip0_9_2121)"}
[:path {:fillRule "evenodd"
:d "M10 18a8 8 0 100-16 8 8 0 000 1... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrow_left_circle.cljs | clojure | (ns com.scrintal.heroicons.mini.arrow-left-circle)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:g {:clipPath "url(#clip0_9_2121)"}
[:path {:fillRule "evenodd"
:d "M10 18a8 8 0 100-16 8 8 0 000 1... | |
26c3ab321d552dad5217b5b6724acc5c5d790b3d13be15b8df2a072617a8dc51 | crategus/cl-cffi-gtk | gtk.paper-size.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.paper-size.lisp
;;;
The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK+ library .
;;; See <>. The API documentation of the Lisp binding is
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/gtk/gtk.paper-size.lisp | lisp | ----------------------------------------------------------------------------
gtk.paper-size.lisp
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License for Lisp
License, or (at your op... | The documentation of this file is taken from the GTK+ 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK+ library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either version 3 of... |
ee229ff94cb768224878d36392e15e8acc4073bb0667ec9ed373b9aacaa2d117 | gregr/racket-misc | dkanren-interp.rkt | #lang racket/base
(provide
evalo
)
(require
"dkanren.rkt"
)
(define (letrec-eval-term program)
`(let ((closure-tag ',(gensym "#%closure"))
(prim-tag ',(gensym "#%primitive"))
(empty-env '()))
(let ((initial-env
`((cons . (val . (,prim-tag . cons)))
(car . (... | null | https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/dkanren-interp.rkt | racket | TODO: run higher order interpreters in the relational interpreter instead.
((eval-expr
(lambda (expr env)
(match expr
(`(quote ,datum) datum)
(`(lambda (,(? symbol? x)) ,body)
(lambda (a)
(eval-expr body (lambda (y)
(if (equal? y x) a (env y))))))
((? symbol? x) (env x))
(`(cons ,e1 ,e2) (cons (eval-expr e1 env) (eval... | #lang racket/base
(provide
evalo
)
(require
"dkanren.rkt"
)
(define (letrec-eval-term program)
`(let ((closure-tag ',(gensym "#%closure"))
(prim-tag ',(gensym "#%primitive"))
(empty-env '()))
(let ((initial-env
`((cons . (val . (,prim-tag . cons)))
(car . (... |
d7f48f940d14d81dd68389d5d6bcb0b2288fb1f679a878628065bbc51b8156b5 | takikawa/racket-ppa | no-gui.rkt | #lang racket/base
(require typed/untyped-utils)
;; ===================================================================================================
;; General exports
(require "private/utils-and-no-gui.rkt")
(provide (all-from-out "private/utils-and-no-gui.rkt"))
;; ==============================================... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/plot-lib/plot/no-gui.rkt | racket | ===================================================================================================
General exports
===================================================================================================
===================================================================================================
... | #lang racket/base
(require typed/untyped-utils)
(require "private/utils-and-no-gui.rkt")
(provide (all-from-out "private/utils-and-no-gui.rkt"))
Nonrenderers
(require "private/common/nonrenderer.rkt")
(provide
x-ticks
y-ticks
z-ticks
invisible-rect
invisible-rect3d)
(require (rename-in "private/no-gui/plo... |
73290faef9f8ba3e0597dec20111d5ed5eb4defb0b633eb4ccaa01e3e7315217 | PLTools/GT | test809cool.ml | open GT
module Location = struct
(* from Printast module *)
let fmt_position with_name f l =
let open Format in
let open Lexing in
let fname = if with_name then l.pos_fname else "" in
if l.pos_lnum = -1
then fprintf f "%s[%d]" fname l.pos_cnum
else fprintf f "%s[%d,%d+%d]" fname l.pos_lnum ... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test809cool.ml | ocaml | from Printast module
| Pctf_method of (Asttypes.label Asttypes.loc * Asttypes.private_flag *
* Asttypes.virtual_flag * core_type)
* | Pctf_constraint of (core_type * core_type)
* | Pctf_attribute of attribute
* | Pctf_extension of extension | open GT
module Location = struct
let fmt_position with_name f l =
let open Format in
let open Lexing in
let fname = if with_name then l.pos_fname else "" in
if l.pos_lnum = -1
then fprintf f "%s[%d]" fname l.pos_cnum
else fprintf f "%s[%d,%d+%d]" fname l.pos_lnum l.pos_bol
(l.pos_cnum... |
03a21911309d5285952fc3f5329019a08a14518fad4ea834d177cd4c0f061624 | profmaad/bitcaml | bitcoin_crypto.ml | open! Core.Std
open Cryptokit;;
let ripemd160 data =
hash_string (Hash.ripemd160 ()) data
;;
let sha1 data =
hash_string (Hash.sha1 ()) data
;;
let sha256 data =
hash_string (Hash.sha256 ()) data
;;
let hash160 data =
ripemd160 (sha256 data)
;;
let hash256 data =
sha256 (sha256 data)
;;
let double_sha256 = ... | null | https://raw.githubusercontent.com/profmaad/bitcaml/18cfbca46c989f43dfb1bcfd50ee2ff500f9ab8d/src/bitcoin_crypto.ml | ocaml | let double_sha256 data =
Sha256.to_bin (Sha256.string (Sha256.to_bin (Sha256.string data)))
;; | open! Core.Std
open Cryptokit;;
let ripemd160 data =
hash_string (Hash.ripemd160 ()) data
;;
let sha1 data =
hash_string (Hash.sha1 ()) data
;;
let sha256 data =
hash_string (Hash.sha256 ()) data
;;
let hash160 data =
ripemd160 (sha256 data)
;;
let hash256 data =
sha256 (sha256 data)
;;
let double_sha256 = ... |
47743360dd824e097d892b433c6e587893601b0ea58531eb01bb3f9af7a626ef | elisehuard/game-in-haskell | Backend.hs | {-# LANGUAGE PackageImports #-}
module Testing.Backend (
withWindow
, readInput
, replayInput
, exitKeyPressed
, swapBuffers
) where
import "GLFW-b" Graphics.UI.GLFW as GLFW
import Control.Monad (when)
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent (MVar, tryTakeMVar)
import Data.Maybe (isJust)
... | null | https://raw.githubusercontent.com/elisehuard/game-in-haskell/b755c42d63ff5dc9246b46590fb23ebcc1d455b1/src/Testing/Backend.hs | haskell | # LANGUAGE PackageImports # | module Testing.Backend (
withWindow
, readInput
, replayInput
, exitKeyPressed
, swapBuffers
) where
import "GLFW-b" Graphics.UI.GLFW as GLFW
import Control.Monad (when)
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent (MVar, tryTakeMVar)
import Data.Maybe (isJust)
import Testing.GameTypes
import ... |
0f1acdd76b667c64fbaeae930c41dcd5a69055154908593217b0921dca792262 | seancribbs/neotoma | test_memoization.erl | -module(test_memoization).
-author("Sean Cribbs <>").
-include_lib("eunit/include/eunit.hrl").
-define(I, fun(V,_) -> V end).
setup_memo_test() ->
neotoma_peg:setup_memo(),
?assertNot(undefined == ets:info(get({parse_memo_table, neotoma_peg}))),
neotoma_peg:release_memo().
release_memo_test() ->
neoto... | null | https://raw.githubusercontent.com/seancribbs/neotoma/9e57d8ebd4ebb02c3e2428b08f3a01e2ff834ce2/test/test_memoization.erl | erlang | -module(test_memoization).
-author("Sean Cribbs <>").
-include_lib("eunit/include/eunit.hrl").
-define(I, fun(V,_) -> V end).
setup_memo_test() ->
neotoma_peg:setup_memo(),
?assertNot(undefined == ets:info(get({parse_memo_table, neotoma_peg}))),
neotoma_peg:release_memo().
release_memo_test() ->
neoto... | |
99dfa3225a2b2a3ea7db7ebac2c88cda8ca0b3591e44f59c27d57556f3fcc5ff | originrose/cortex | softmax.clj | (ns cortex.loss.softmax
(:require [clojure.core.matrix :as m]
[cortex.util :refer [merge-args max-index]]
[cortex.compute.math :as math]
[cortex.compute.nn.backend :as backend]
[cortex.loss.util :as util]
[cortex.loss.core :as loss]
[cortex.graph... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/loss/softmax.clj | clojure |
Compute implementation
Graph implementation
util | (ns cortex.loss.softmax
(:require [clojure.core.matrix :as m]
[cortex.util :refer [merge-args max-index]]
[cortex.compute.math :as math]
[cortex.compute.nn.backend :as backend]
[cortex.loss.util :as util]
[cortex.loss.core :as loss]
[cortex.graph... |
ea4c562931c51e7d821b1258a3cd8c73ce1c0357e06cc03e0efc97ed92687a16 | tek/chiasma | DecodeError.hs | module Chiasma.Data.DecodeError where
import Text.ParserCombinators.Parsec (ParseError)
data DecodeFailure =
ParseFailure Text ParseError
|
IntParsingFailure Text
|
BoolParsingFailure Text
|
TooFewFields
|
TooManyFields [Text]
|
TooManyRecords [Text]
|
TargetMissing
deriving stock (Eq, Sho... | null | https://raw.githubusercontent.com/tek/chiasma/45ce231f629db9ed67c78ce872ac719a90a217bd/packages/chiasma/lib/Chiasma/Data/DecodeError.hs | haskell | module Chiasma.Data.DecodeError where
import Text.ParserCombinators.Parsec (ParseError)
data DecodeFailure =
ParseFailure Text ParseError
|
IntParsingFailure Text
|
BoolParsingFailure Text
|
TooFewFields
|
TooManyFields [Text]
|
TooManyRecords [Text]
|
TargetMissing
deriving stock (Eq, Sho... | |
f3af5da0af51c1ccd492460f6978ff3bda104f61a7e1ae44ff779a0d197d6c74 | HealthSamurai/dojo.clj | debounce.cljs | (ns zframes.debounce
(:require [re-frame.core :refer [reg-fx dispatch console] :as rf]))
(defn now [] (.getTime (js/Date.)))
(def registered-keys (atom nil))
(defn dispatch-if-not-superceded [{:keys [key delay event time-received]}]
(when (= time-received (get @registered-keys key))
;; no new events on this... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/zframes/debounce.cljs | clojure | no new events on this key! | (ns zframes.debounce
(:require [re-frame.core :refer [reg-fx dispatch console] :as rf]))
(defn now [] (.getTime (js/Date.)))
(def registered-keys (atom nil))
(defn dispatch-if-not-superceded [{:keys [key delay event time-received]}]
(when (= time-received (get @registered-keys key))
(dispatch event)))
(def... |
1dcbfa554a5d8966ecee30bc933cce2b4c5b599d317c7c3e80fddcfd232778e2 | puppetlabs/trapperkeeper-metrics | metrics_core.clj | (ns puppetlabs.trapperkeeper.services.metrics.metrics-core
(:import (com.codahale.metrics JmxReporter MetricRegistry)
(com.fasterxml.jackson.core JsonParseException)
(com.puppetlabs.trapperkeeper.metrics GraphiteReporter AllowedNamesMetricFilter)
(java.util.concurrent TimeUnit)
... | null | https://raw.githubusercontent.com/puppetlabs/trapperkeeper-metrics/47f1534ebb75339eeb42e0de33fab0ec2f6cacdc/src/clj/puppetlabs/trapperkeeper/services/metrics/metrics_core.clj | clojure |
schema for what is read from config file for a registry
Private
The domain is only needed as an argument for testing, which is unfortunate. In the future, it
would be nice to add the ability to register a function that could receive a callback when a
reporter is added, which could solve the problem of needing th... | (ns puppetlabs.trapperkeeper.services.metrics.metrics-core
(:import (com.codahale.metrics JmxReporter MetricRegistry)
(com.fasterxml.jackson.core JsonParseException)
(com.puppetlabs.trapperkeeper.metrics GraphiteReporter AllowedNamesMetricFilter)
(java.util.concurrent TimeUnit)
... |
9cc4e7e9d05b2dcdb478179060166c2b0f9c4ce5db2935494562e21777bd8498 | ocaml/ocamlbuild | loc.ml | it 's not worth adding a dependency on parsing / location.ml(i ) or
compilerlibs just to support location printing , so we re - implement
that here
compilerlibs just to support location printing, so we re-implement
that here *)
open Lexing
(* We use a loosely structural type so that this bit of code... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/loc.ml | ocaml | We use a loosely structural type so that this bit of code can be
easily reused by project that would wish it, without introducing
any type-compatibility burden.
"file", "environment variable", "command-line option" ... | it 's not worth adding a dependency on parsing / location.ml(i ) or
compilerlibs just to support location printing , so we re - implement
that here
compilerlibs just to support location printing, so we re-implement
that here *)
open Lexing
type location = source * position * position
let file loc =... |
50f5c5b466ee9decc04ef39aeced70a22170da5f4c1425f1072c53fd275eec18 | mfoemmel/erlang-otp | http_cookie.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2009 . 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 Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/inets/src/http_client/http_cookie.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 limita... | Copyright Ericsson AB 2004 - 2009 . 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 "
Description : Cookie handling according t... |
b8bc82a2dbf330900b4ecf2665ece1c1980cc74e0819f47a0f86183cd8eeabdb | ladderlife/autochrome | annotation.clj | (ns autochrome.annotation
(:require [autochrome.common :as clj-common]
[autochrome.scope :as scope]
[autochrome.tree :as tree]
[autochrome.xref :as xref])
(:import [java.util IdentityHashMap]))
(defn attach
[{:keys [type text delim wscontents] :as form} ann]
(let [a (.get an... | null | https://raw.githubusercontent.com/ladderlife/autochrome/d454e4450658b4799bfd939f2a84690921800806/src/autochrome/annotation.clj | clojure | (ns autochrome.annotation
(:require [autochrome.common :as clj-common]
[autochrome.scope :as scope]
[autochrome.tree :as tree]
[autochrome.xref :as xref])
(:import [java.util IdentityHashMap]))
(defn attach
[{:keys [type text delim wscontents] :as form} ann]
(let [a (.get an... | |
ff88554ae5b3bf825b920a93d99e862b1a2f3b9c00e11f97b6ff025e7c06013e | LexiFi/menhir | keyword.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/sdk/keyword.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
27585bcabce94ca63f43a3bdf70069840e7229d73161c9897771641675c2c694 | syntheorem/thexa | Core.hs | -- | The primitive interface to the lexer.
--
Compared to the main " Thexa " module , this module presents a less featureful , but more flexible ,
-- interface for running a lexer. It does not manage any lexer state for you, and instead just
-- provides the 'nextMatch' function to find a single match at a time. If th... | null | https://raw.githubusercontent.com/syntheorem/thexa/e599efd97c0cb49dc3acb9a5da911e20608a210b/src/Thexa/Core.hs | haskell | | The primitive interface to the lexer.
interface for running a lexer. It does not manage any lexer state for you, and instead just
provides the 'nextMatch' function to find a single match at a time. If the features provided by
* Running the lexer
| A precompiled lexer, parameterized on the types of its rules' mo... | Compared to the main " Thexa " module , this module presents a less featureful , but more flexible ,
" Thexa " are not suitable for your use case , you can instead build on top of " Thexa . Core " .
module Thexa.Core
( module Thexa.Rule
* construction
, Lexer
, makeLexer
, GetNextByte
, EvalCondition
, MatchRe... |
01d32c817abf80d5e75b5eb911be87d472a6b41287351b0f0df687456f4c34ae | haskell-opengl/OpenGLRaw | CullVertex.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
Module : Graphics .
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-----------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/CullVertex.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Module : Graphics .
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.CullVertex (
glGetEXTCullVertex,
gl_EXT_cull_vertex,
pattern GL_CULL_VERTEX_EXT,
pattern GL_CULL_VERTEX_EYE_POSITION_EXT,
pattern GL_CULL_VERTEX_OBJECT_POSITION_EXT,
... |
9c273691f1ec07793b5f325e2c7afb943059420665332ecd9e57003c3565b6f5 | rlepigre/subml | subset.ml | (****************************************************************************)
(**{3 Implementattion of mutable sets via subset constraints }*)
(****************************************************************************)
type 'a elts = Finite of 'a list | CoFinite of 'a list
type 'a set = { mutable se... | null | https://raw.githubusercontent.com/rlepigre/subml/6d2b35276d8d299bef9d5e70653a88be7f89f7f1/src/subset.ml | ocaml | **************************************************************************
*{3 Implementattion of mutable sets via subset constraints }
**************************************************************************
* The current value of the set.
* if true, the set is frozen and will not change anymore
* te... |
type 'a elts = Finite of 'a list | CoFinite of 'a list
type 'a set = { mutable set : 'a elts
; mutable frozen : bool
let create l = { set = CoFinite l; frozen = false }
let test : ('a -> 'a -> bool) -> 'a set -> 'a list -> bool =
fun eq set l ->
if set.frozen then
match set.set with
... |
a2121b79e4be184839ca6a158bb5e62652fe06c47e7b2ced51e3d40194d9d541 | YoshikuniJujo/funpaala | fruits1.hs | myFavoriteFruit = "banana"
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/05_function/fruits1.hs | haskell | myFavoriteFruit = "banana"
| |
84a1b1810e27ce61fa7e3455af44b034e3fb7f21d09779fb334f806d2314d559 | dvingo/cljs-emotion | target_styled.cljs | (ns dv.cljs-emotion.target-styled
(:require
[devcards.core :as dc :refer (defcard)]
[sablono.core :refer [html]]
["polished" :as p :refer [darken lighten]]
["react" :as react]
["react-dom" :as react-dom]
[dv.cljs-emotion :as em :refer [defstyled keyframes global-style]]))
(defcard
"These ex... | null | https://raw.githubusercontent.com/dvingo/cljs-emotion/0e2d7339657bd2957f03fbf8f4bb4a97b4fefc81/src/dev/dv/cljs_emotion/target_styled.cljs | clojure |
styled component in selector string
| (ns dv.cljs-emotion.target-styled
(:require
[devcards.core :as dc :refer (defcard)]
[sablono.core :refer [html]]
["polished" :as p :refer [darken lighten]]
["react" :as react]
["react-dom" :as react-dom]
[dv.cljs-emotion :as em :refer [defstyled keyframes global-style]]))
(defcard
"These ex... |
e9dc57717b8ef527a1a2fb21f4d3b70dcd9efb1e797a2573c291511c4791e8c1 | electric-sql/vaxine | logging_notification_server.erl | %% @doc Nofitication service for logging events. Handler are supposed to be
%% light-weight and should not spend too much time in M:F/2 calls.
-module(logging_notification_server).
-behaviour(gen_event).
-export([ start_link/0,
add_handler/3,
delete_handler/1,
notify_cache_update/3,
... | null | https://raw.githubusercontent.com/electric-sql/vaxine/b43ba9add4972c4bd10d3bfe61df9096667ada40/apps/antidote/src/logging_notification_server.erl | erlang | @doc Nofitication service for logging events. Handler are supposed to be
light-weight and should not spend too much time in M:F/2 calls.
@doc Add subscribers handler. Handler should be as light-weight as possible,
as it affects the flow of committed transactions.
----------------------------------------------------... |
-module(logging_notification_server).
-behaviour(gen_event).
-export([ start_link/0,
add_handler/3,
delete_handler/1,
notify_cache_update/3,
lookup_last_global_id/2,
stop/0
]).
-export([ init/1,
handle_event/2,
handle_call/2,
hand... |
c458fd27b2aed0944ab63e8df2a3e4100c82f82a25fae670d58cc15cdf9a7685 | henrystanley/Quark | QuoteEval.hs | module Quark.QuoteEval where
import Quark.Type
import Quark.QVM
import Quark.Errors
import Data.Sequence (viewr)
import Data.Sequence (ViewR(..))
import qualified Data.Sequence as Seq
import qualified Data.Map.Strict as Map
--- Pattern Matching & Quote Calling --
-- this is the function responsible for the behavior... | null | https://raw.githubusercontent.com/henrystanley/Quark/63df61e47bedc1092c89529eedaf8ad229193f0b/Quark/QuoteEval.hs | haskell | - Pattern Matching & Quote Calling --
this is the function responsible for the behavior of the `call` quark function
appends quote body to VM prog queue after subbing
substitutes pattern terms
checks to make sure the items a quote is being applied to match the quotes pattern
if these items do match, it returns the... | module Quark.QuoteEval where
import Quark.Type
import Quark.QVM
import Quark.Errors
import Data.Sequence (viewr)
import Data.Sequence (ViewR(..))
import qualified Data.Sequence as Seq
import qualified Data.Map.Strict as Map
tryQuote :: QItem -> QVM -> IState
tryQuote (QQuote p b) vm = case patternMatch p (stack vm)... |
72c2b0963514a480b6bb179ddd0265078e4b599e554495772b806b9f3be9766f | day8/re-frame-10x | window.cljs | (ns day8.re-frame-10x.fx.window
(:require
[goog.object :as gobj]
[goog.string :as gstring]
[clojure.string :as string]
[day8.re-frame-10x.inlined-deps.re-fram... | null | https://raw.githubusercontent.com/day8/re-frame-10x/2cead8d02ca6eda99af1205f8ea234cc3d38d843/src/day8/re_frame_10x/fx/window.cljs | clojure | control over this, it will only position it within the same display that it was popped out on.
We had to comment out the following unmountComponentAtNode as it causes a React exception we assume
In theory by not freeing up the resources associated with this container (e.g. event handlers) we may be
creating memory ... | (ns day8.re-frame-10x.fx.window
(:require
[goog.object :as gobj]
[goog.string :as gstring]
[clojure.string :as string]
[day8.re-frame-10x.inlined-deps.re-fram... |
7f1f29c8e9089dac0e19601453bca2853255196f35e7a7f46b027d7d42d9e420 | kowainik/summoner | Summoner.hs | |
Module : Summoner
Copyright : ( c ) 2017 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
Main module that reexports all library components of the @summoner@.
... | null | https://raw.githubusercontent.com/kowainik/summoner/0c03dd0d6ee71c79227974b697f171396d3d09a7/summoner-cli/src/Summoner.hs | haskell | |
Module : Summoner
Copyright : ( c ) 2017 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
Main module that reexports all library components of the @summoner@.
... | |
0b0ccf7291244577e30b31665b922881288dfa872cf59e7221be3f772ccd36aa | ajtulloch/freelearning | Free.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Monad
import Control.Monad.Free
import ... | null | https://raw.githubusercontent.com/ajtulloch/freelearning/b89d481735b6bf43f3bc90cea1985b4c6ff4fd8e/Free.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
Convolution, Pointwise ReLU, MaxPool,
Convolution, Pointwise ReLU,
Convolution, Pointwise ReLU, | # LANGUAGE ScopedTypeVariables #
module Main where
import Control.Monad
import Control.Monad.Free
import Control.Monad.IO.Class
import Control.Monad.Random
import qualified Data.Foldable as F
import Data.Graph.Free
import Data.GraphViz
import qualif... |
94a21fae1518998243b93f1223e7caf408b688109bd26b0f27b98a5d037c344f | liquidz/misaki | core.clj | (ns misaki.test.core
(require
[misaki [core :refer :all]
[config :refer :all]
[tester :refer :all]]
[misaki.util.sequence :refer [find-first]]
[clojure.test :refer :all]
[clojure.java.io :as io]))
(set-base-dir! "test/files/core/")
(deftest skip-compile?-test
(testing ... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/test/misaki/test/core.clj | clojure | if additional options exists, return false
call-compiler-fn
get-watch-file-extensions
get-template-files
get-post-files
update-config
process-compile-result
handleable-compiler?
compile*
call-index-compile | (ns misaki.test.core
(require
[misaki [core :refer :all]
[config :refer :all]
[tester :refer :all]]
[misaki.util.sequence :refer [find-first]]
[clojure.test :refer :all]
[clojure.java.io :as io]))
(set-base-dir! "test/files/core/")
(deftest skip-compile?-test
(testing ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.