_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 |
|---|---|---|---|---|---|---|---|---|
692c016c8374ae5bccc6803c9891b2519823d95a88725f4fbfc64f383d485c9b | slipstream/SlipStreamServer | storage_bucket.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.storage-bucket
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.common :as cimi-common]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::credentials (s/c... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/spec/storage_bucket.cljc | clojure | (ns com.sixsq.slipstream.ssclj.resources.spec.storage-bucket
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.common :as cimi-common]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.util.spec :as su]))
(s/def ::credentials (s/c... | |
e3e42a3cb654faf213388d53bc9c977ea991762de54ecec2c44171c8da92f83d | ekmett/succinct-binary | Get.hs | {-# language DeriveFunctor #-}
{-# language DefaultSignatures #-}
{-# language FlexibleContexts #-}
# language EmptyCase #
# language GADTs #
# language PolyKinds #
# language DataKinds #
{-# language ScopedTypeVariables #-}
# language TypeApplications #
# language TypeOperators #
module Data.Binary.Succinct.Get where
... | null | https://raw.githubusercontent.com/ekmett/succinct-binary/c8731ba6617e83ab416faffde95a118c4a3eef38/src/Data/Binary/Succinct/Get.hs | haskell | # language DeriveFunctor #
# language DefaultSignatures #
# language FlexibleContexts #
# language ScopedTypeVariables #
------------------------------------------------------------------------------
* Gettable
------------------------------------------------------------------------------
do we need to add a case ... | # language EmptyCase #
# language GADTs #
# language PolyKinds #
# language DataKinds #
# language TypeApplications #
# language TypeOperators #
module Data.Binary.Succinct.Get where
foo :: Int
foo = 1
( Get ( .. )
, get8
, ( .. )
, liftGet
) where
import Control . ( ap )
import Data . Bi... |
82b0a1ea096a9c7ba4ff5aa536498712d6a06e1f6b21d1b949fdb9448443fc45 | hatsugai/SyncStitch | bfs.ml | let bfs make reg mem length s0 next =
let ht = make () in
let que = Queue.create () in
let rec loop () =
if Queue.is_empty que then
ht
else
let (state, id, path) = Queue.take que in
let trans = next state id path in
reg ht state (id, trans);
List.iter
(fun (label, tar... | null | https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/bfs.ml | ocaml | let bfs make reg mem length s0 next =
let ht = make () in
let que = Queue.create () in
let rec loop () =
if Queue.is_empty que then
ht
else
let (state, id, path) = Queue.take que in
let trans = next state id path in
reg ht state (id, trans);
List.iter
(fun (label, tar... | |
6925938c2693bda5bebfc7110613e098c14daa4dc164922734a43ac3749eebb1 | sneerteam/sneer | convo_summarization.clj | (ns sneer.convo-summarization
(:require
[clojure.core.async :as async :refer [go chan close! <! >! <!! >!! sliding-buffer alt! timeout mult]]
[clojure.stacktrace :refer [print-stack-trace]]
[sneer.async :refer [close-with! sliding-chan sliding-tap go-while-let go-trace go-loop-trace state-machine tap-stat... | null | https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/sneer/convo_summarization.clj | clojure | Handle redundant message-read tuples as a hack to clear the unread status of convos that have session messages. See "set-message-read" event handling in convos.
state: {:last-id long
:unread "*"
:last-received original_id}
:contacts {...} }
... | (ns sneer.convo-summarization
(:require
[clojure.core.async :as async :refer [go chan close! <! >! <!! >!! sliding-buffer alt! timeout mult]]
[clojure.stacktrace :refer [print-stack-trace]]
[sneer.async :refer [close-with! sliding-chan sliding-tap go-while-let go-trace go-loop-trace state-machine tap-stat... |
40d1fc3228854db3c5946f7d729477f241ced7556312646eb907bccfbf6e2516 | nvim-treesitter/nvim-treesitter | highlights.scm | ;; Fish highlighting
Operators
[
"&&"
"||"
"|"
"&"
".."
"!"
(direction)
(stream_redirect)
] @operator
;; match operators of test command
(command
name: (word) @function.builtin (#match? @function.builtin "^test$")
argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
;; match operator... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/f8595b13bff62d5c64d54840e16678b9ad843620/queries/fish/highlights.scm | scheme | Fish highlighting
match operators of test command
match operators of [ command
Conditionals
Loops/Blocks
Keywords
Punctuation
Commands
non-builtin command names
Functions
Strings
Variables
Nodes
Error |
Operators
[
"&&"
"||"
"|"
"&"
".."
"!"
(direction)
(stream_redirect)
] @operator
(command
name: (word) @function.builtin (#match? @function.builtin "^test$")
argument: (word) @operator (#match? @operator "^(!?\\=|-[a-zA-Z]+)$"))
(command
name: (word) @punctuation.bracket (#match? @punctuation.bracke... |
c2ff32dd2748bdcacbf73f2f6f16cdc2767b4c230fddb4319e1ad51176717ec0 | expipiplus1/vulkan | VK_KHR_shader_subgroup_extended_types.hs | {-# language CPP #-}
-- | = Name
--
VK_KHR_shader_subgroup_extended_types - device extension
--
-- == VK_KHR_shader_subgroup_extended_types
--
-- [__Name String__]
-- @VK_KHR_shader_subgroup_extended_types@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
176
--
-- ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_shader_subgroup_extended_types.hs | haskell | # language CPP #
| = Name
== VK_KHR_shader_subgroup_extended_types
[__Name String__]
@VK_KHR_shader_subgroup_extended_types@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
[__Deprecation state__]
- /Promo... | VK_KHR_shader_subgroup_extended_types - device extension
176
1
- Requires support for Vulkan 1.1
-
< -Docs/issues/new?body=[VK_KHR_shader_subgroup_extended_types ] @sheredom%0A*Here describe the issue or question you have about the VK_KHR_shader_subgroup_extended_types extens... |
bbe906dddb5646f8f48825ab547edf4abb3c98a75276df7e897bb534e7a82c1b | capnproto/capnp-ocaml | cArray.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/runtime/cArray.ml | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | |
c90867589ab5e37eaa6140d2dfd3b72144a614a08c1783bbf30a59c1f7ec759e | commercialhaskell/rio | Partial.hs | -- | Partial functions. Import as:
--
> import qualified RIO.Partial as RIO '
module RIO.Partial
( Data.Maybe.fromJust
, Prelude.read
, Prelude.toEnum
, Prelude.pred
, Prelude.succ
) where
import qualified Data.Maybe
import qualified Prelude
| null | https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Partial.hs | haskell | | Partial functions. Import as:
| > import qualified RIO.Partial as RIO '
module RIO.Partial
( Data.Maybe.fromJust
, Prelude.read
, Prelude.toEnum
, Prelude.pred
, Prelude.succ
) where
import qualified Data.Maybe
import qualified Prelude
|
488f2fd0ef6f6bece14e926f7d8f63dd6724a3129a5bb372ea3eb5ceb7b44371 | ivanjovanovic/sicp | e-2.64.scm | Exercise 2.64 . The following procedure list->tree converts an ordered list
; to a balanced binary tree. The helper procedure partial-tree takes as
; arguments an integer n and list of at least n elements and constructs a
balanced tree containing the first n elements of the list . The result
; returned by partial... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/2.3/e-2.64.scm | scheme | to a balanced binary tree. The helper procedure partial-tree takes as
arguments an integer n and list of at least n elements and constructs a
returned by partial-tree is a pair (formed with cons) whose car is the
constructed tree and whose cdr is the list of elements not included in the
tree.
a. Write a short par... | Exercise 2.64 . The following procedure list->tree converts an ordered list
balanced tree containing the first n elements of the list . The result
(define (list->tree elements)
(car (partial-tree elements (length elements))))
(define (partial-tree elts n)
(if (= n 0)
(cons '() elts)
(let ((left-... |
7347883875135d079c951defcf4a2c3eb6c4e5b831aca6f8502444ada029ca7d | WeiDUorg/weidu | tolower.ml | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
(*
* Module to reduce all files in the base directory to lowercase
* and other Linux-only boringness
*)
open BatteriesInit
(*
* Bare-bones interface
*)
exce... | null | https://raw.githubusercontent.com/WeiDUorg/weidu/56a33839be1fa6606d6d96c80d19e977c91c3c72/src/tolower.ml | ocaml |
* Module to reduce all files in the base directory to lowercase
* and other Linux-only boringness
* Bare-bones interface
* Turn all files to lowercase, recursively.
Even if directory itself is already lowercased, it may contain
not-lowercased items and we consequently need to process it anyway.... | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
open BatteriesInit
exception Good_exit ;;
let force = ref false
let askfor func mess =
print_string mess ;
try
while true do
print_string "[Y]es ... |
fc89e6adc7fcbd20b179bd7c84bd524c1fecb306c79700166d57a0747cc65c5c | ujihisa/haskell-workshop-project-eular | problem4.hs | is_palindrome :: Integer -> Bool
is_palindrome n = show(n) == (reverse (show n))
p4 = [x*y|x <-[100..999], y <- [100..999], is_palindrome(x*y)]
main = do print $ maximum p4
| null | https://raw.githubusercontent.com/ujihisa/haskell-workshop-project-eular/96d98133ad42cbacfb83c3a9229410760d7745aa/guccyon/problem4.hs | haskell | is_palindrome :: Integer -> Bool
is_palindrome n = show(n) == (reverse (show n))
p4 = [x*y|x <-[100..999], y <- [100..999], is_palindrome(x*y)]
main = do print $ maximum p4
| |
7f4cce72a153f82ee9f39cea237bdf079accbfe9d38db8b6503a85104a80ab51 | emqx/emqx-auth-mysql | emqx_auth_mysql_app.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the L... | null | https://raw.githubusercontent.com/emqx/emqx-auth-mysql/e49fed4d23133d83c1e48fbe6102247930714222/src/emqx_auth_mysql_app.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_auth_mysql_app).
-behaviour(application).
-emqx_plugin(auth).
-include("emqx_auth_mysql... |
d13434063f0a177878302abd64509530627b9e99a5ed689ebc93c3095889ef34 | Lambda-X/cljs-repl-web | app.cljs | (ns cljs-repl-web.app
(:require [reagent.core :as reagent]
cljsjs.enquire
[re-frame.core :refer [dispatch subscribe]]
[re-complete.app :as complete-app]
[replumb.ast :as ast]
[clojure.string :as str]))
(defn gist-showing?
"Given a db, indicates if the gis... | null | https://raw.githubusercontent.com/Lambda-X/cljs-repl-web/0dabe8ff18d8c0f4ae6c9f052dc23eb1f5ad262c/src/cljs/cljs_repl_web/app.cljs | clojure |
;
AR - degrade gracefully to this if browser does
not support CSS3 Media queries
;
Autocomplete ;;;
| (ns cljs-repl-web.app
(:require [reagent.core :as reagent]
cljsjs.enquire
[re-frame.core :refer [dispatch subscribe]]
[re-complete.app :as complete-app]
[replumb.ast :as ast]
[clojure.string :as str]))
(defn gist-showing?
"Given a db, indicates if the gis... |
4038671e61025c5b2a08f743764cbd0a40311c5efb1d547b269fbb4f0c969e61 | mikeplus64/Greg | Bot.hs | # LANGUAGE OverloadedStrings , BangPatterns #
module Greg.Bot where
import Greg.Types
import Greg.IRC (send)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Map as M
import Data.Sequence as S ((|>), singleton)
import Control.Concurrent
import Control.Mona... | null | https://raw.githubusercontent.com/mikeplus64/Greg/bb3d5af691eed895e330cb3e5425e43419b0244c/src/Greg/Bot.hs | haskell | | Send a message to the bot's channel.
delete permit as Normal is the default anyway
| True if a user has the required level to run a command.
# SCC "ok" #
# SCC "lookupByAlias" #
| Run a command, and send the output to the channel, or
yell at the person who called the command for an error.
# SCC "msgCommand" # | # LANGUAGE OverloadedStrings , BangPatterns #
module Greg.Bot where
import Greg.Types
import Greg.IRC (send)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Map as M
import Data.Sequence as S ((|>), singleton)
import Control.Concurrent
import Control.Mona... |
22eda33a6655ffac9e9f398916f553c97068c7dac18c97be8b55ef2ab576c92e | noinia/hgeometry | Set.hs | --------------------------------------------------------------------------------
-- |
-- Module : Data.List.Set
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--------------------------------------------------------------------------------
module Data.List.Set( Set, singlet... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-combinatorial/src/Data/List/Set.hs | haskell | ------------------------------------------------------------------------------
|
Module : Data.List.Set
License : see the LICENSE file
------------------------------------------------------------------------------
------------------------------------------------------------------------------
advantage of... | Copyright : ( C )
Maintainer :
module Data.List.Set( Set, singleton
, insert, delete
, union, intersection, difference
, fromList, insertAll
) where
import qualified Data.List as List
| A Set of 's , implemented using... |
635c23ebd59c268bcf965573ba8831de9e2b597cbd66891f2cbbe771ea6aa977 | gsakkas/rite | 20060417-09:09:48-c1254f26855289d18929c3dffb68cc3d.seminal.ml | exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
(****** Syntax for our language, including types (do not change) *****)
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Plus... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060417-09%3A09%3A48-c1254f26855289d18929c3dffb68cc3d.seminal.ml | ocaml | ***** Syntax for our language, including types (do not change) ****
***** Interpreter for our language (do not change) ****
**** helper functions provided to you (do not change) ****
********* examples and testing ********** | exception Unimplemented
exception RuntimeTypeError
exception DoesNotTypecheck of string
type exp = Var of string
| Lam of string * typ * exp
| Apply of exp * exp
| Closure of string * exp * (env ref)
| Int of int
| Plus of exp * exp
| If of exp * exp * exp
| RecordE of (string * exp) l... |
3f1565d49d288629b546a676ebb25e7ac8179b34386e48c0ceac9a75cfddde85 | wavewave/fficxx | HsProxy.hs | {-# LANGUAGE OverloadedStrings #-}
module FFICXX.Generate.Code.HsProxy where
import qualified Data.List as L (foldr1)
--
import FFICXX.Generate.Util.HaskellSrcExts
( con,
inapp,
mkFun,
mkVar,
op,
qualifier,
tyapp,
tycon,
tylist,
)
import qualified FFICXX.Runtime.CodeGen.Cxx as R
i... | null | https://raw.githubusercontent.com/wavewave/fficxx/53756db8ba3af2b8f9fd31098f14d80d70cdac44/fficxx/src/FFICXX/Generate/Code/HsProxy.hs | haskell | # LANGUAGE OverloadedStrings #
|
module FFICXX.Generate.Code.HsProxy where
import qualified Data.List as L (foldr1)
import FFICXX.Generate.Util.HaskellSrcExts
( con,
inapp,
mkFun,
mkVar,
op,
qualifier,
tyapp,
tycon,
tylist,
)
import qualified FFICXX.Runtime.CodeGen.Cxx as R
import Language.Haskell.Exts.Build (app... |
043c11fa1d71ef5f769c31a5b73320aff9cc1f9ef9902feeebb2df0aca0f13b2 | pixlsus/registry.gimp.org_static | guides-new-center.scm | ;; -*-scheme-*-
2004 . No copyright . Public Domain .
(define (script-fu-guide-new-center image drawable)
(let* (
(width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
(positionH (* height 0.5))
(positionV (* width 0.5))
)
(if (<= po... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/guides-new-center.scm | scheme | -*-scheme-*- |
2004 . No copyright . Public Domain .
(define (script-fu-guide-new-center image drawable)
(let* (
(width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
(positionH (* height 0.5))
(positionV (* width 0.5))
)
(if (<= positionH height) ... |
7db353540d7a7d8c67efe81069e4d63529fb93fa943f1ceb66f780da6ac99c8b | dstarcev/stepic-haskell | Task12.hs | module Module3.Task12 where
import Data.Char
delAllUpper :: String -> String
delAllUpper = unwords . (filter $ any isLower) . words
| null | https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module3/Task12.hs | haskell | module Module3.Task12 where
import Data.Char
delAllUpper :: String -> String
delAllUpper = unwords . (filter $ any isLower) . words
| |
e52a95f5f140032411ac4af1d00590fed9cc7fbdf5b9ea27bd2029f4904ebcfa | okuoku/nausicaa | test-pregexp.sps | ;;;
Part of : / Scheme
Contents : tests for
Date : Sun Jul 12 , 2009
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2009 < >
Copyright ( c ) 1999 - 2005 . All rights reserved .
;;;
;;;Permission to copy, modify, distribute, and use this work or a
;;;modified copy of this work, for any purpose, is hereby... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-pregexp.sps | scheme |
Abstract
Permission to copy, modify, distribute, and use this work or a
modified copy of this work, for any purpose, is hereby granted,
provided that the copy includes this copyright notice, and in the
case of a modified copy, also includes a notice of modification.
This work is provided as ... | Part of : / Scheme
Contents : tests for
Date : Sun Jul 12 , 2009
Copyright ( c ) 2009 < >
Copyright ( c ) 1999 - 2005 . All rights reserved .
#!r6rs
(import (nausicaa)
(nausicaa pregexp)
(nausicaa checks))
(check-set-mode! 'report-failed)
(display "*** testing pregexp\n")
(check
(pregexp "c.r")
... |
cd3c9f987fca5d2a21b0a083f877c8970f4fac085646a5b23ac743758e7bd277 | ijp/guildhall | base.scm | ;;; base.scm --- command-line UI base library
Copyright ( C ) 2010 < >
Author : < >
;; 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 3
of the License , or ( at you... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/ui/cmdline/base.scm | scheme | base.scm --- command-line UI base library
This program is free software; you can redistribute it and/or
either version 3
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU... |
Copyright ( C ) 2010 < >
Author : < >
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
#!r6rs
(library (guildhall ui cmdline base)
(export make-cmdline-ui
... |
94435663899811fc80e589615f15e0431963a72a31a145e70660689e9279d011 | ad-si/TaskLite | Main.hs | -- Necessary to print git hash in help output
-- and to embed example config file
# LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use camelCase" #-}
{-|
This is the main module which provides the CLI
-}
module Main where
import Protolude (
Alternative (some, (<|>)),
A... | null | https://raw.githubusercontent.com/ad-si/TaskLite/e36e1cb7998ff35185d86b7b3c988cb062622db5/tasklite-core/app/Main.hs | haskell | Necessary to print git hash in help output
and to embed example config file
# OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Use camelCase" #
|
This is the main module which provides the CLI
Add
Modify With Parameter
| Modify [IdText] Text -- DSL for modifying a task
Launch editor with YAML version ... | # LANGUAGE TemplateHaskell #
module Main where
import Protolude (
Alternative (some, (<|>)),
Applicative (pure, (<*>)),
Bool (True),
Char,
Either (..),
Eq ((==)),
FilePath,
Float,
Foldable (foldr, null),
Functor (fmap),
IO,
Maybe (..),
Monad ((>>=)),
Semigroup ((<>)),
Show,
Text,
Tr... |
361759bc81475d07b35340070b04ec976d3ab59b423d0855921f30c318ae1352 | ucsd-progsys/liquidhaskell | BinahUpdateClient.hs | {-@ LIQUID "--no-adt" @-}
{-@ LIQUID "--exact-data-con" @-}
{-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--ple" @-}
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/ple/neg/BinahUpdateClient.hs | haskell | @ LIQUID "--no-adt" @
@ LIQUID "--exact-data-con" @
@ LIQUID "--higherorder" @
@ LIQUID "--no-termination" @
@ LIQUID "--ple" @ |
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs #
module BinahUpdateClient where
import BinahUpdateLib
testUpdateQuery :: () -> Update Blob Int
toggle to 80 to be SAFE
|
6d04ea057394e5248080ac25c841a01dc6fcd27014009a643f3f5285b56dd054 | part-cw/lambdanative | char-encoding.scm |
;;(include "../libs/gambit/myenv.sch")
;;(include "../libs/gambit/common.sch")
; Top-level cond-expand expanded automatically
(define ascii->char integer->char)
ucscode->char INT - >
Return a character whose UCS ( ISO / IEC 10646 ) code is INT
; Note
This function is required for processing of XML character ... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/ssax/char-encoding.scm | scheme | (include "../libs/gambit/myenv.sch")
(include "../libs/gambit/common.sch")
Top-level cond-expand expanded automatically
Note
According to Section "4.1 Character and Entity References"
"[Definition: A character reference refers to a specific character
in the ISO/IEC 10646 character set, for example one not direc... |
(define ascii->char integer->char)
ucscode->char INT - >
Return a character whose UCS ( ISO / IEC 10646 ) code is INT
This function is required for processing of XML character entities :
of the XML Recommendation :
(define (ucscode->char code)
(cond-expand
(bigloo
(ucs2->char (integer->ucs2 co... |
df0b7245202e3ab751dba6869aac553a703acb47bd23b376f10067ebb7bad587 | matteobusi/incremental-mincaml | simpleIf.ml | let x = 2.0 in
if x < 10.0 then
x *. x
else
x /. 2.0
| null | https://raw.githubusercontent.com/matteobusi/incremental-mincaml/aebbaf3b918bab4b0398edbf01b43c63d8b7820d/src/fun/examples/simpleIf.ml | ocaml | let x = 2.0 in
if x < 10.0 then
x *. x
else
x /. 2.0
| |
a5e0aa6a8d134614a3975407db81b3c47b59a85094f9ca3e1d74d6e939beb4f2 | ml4tp/tcoq | ccproof.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/cc/ccproof.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Proof smart constructors
* Proof ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Ccalgo
open Term
type r... |
1407db57b62e74a3a9cf0b5cfa4caf81244c015f9964fede6409e9586f327c35 | martijnbastiaan/doctest-parallel | NoImplicitImport.hs | module NonExposedModule.NoImplicitImport where
# ANN module " doctest - parallel : --no - implicit - module - import " #
-- |
> > > import . Exposed ( foo )
> > > foo 7
14
foo :: Int -> Int
foo a = a + a
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/03bd28cd91eb98e3baa63a2faef45efb317c650a/test/integration/NonExposedModule/NoImplicitImport.hs | haskell | | | module NonExposedModule.NoImplicitImport where
# ANN module " doctest - parallel : --no - implicit - module - import " #
> > > import . Exposed ( foo )
> > > foo 7
14
foo :: Int -> Int
foo a = a + a
|
3f54fdb85e655d3a5447cd8aa520ad8332651a6963f237aec9dbbab9354a9bce | cuter-testing/cuter | cuter_cerl.erl | -*- erlang - indent - level : 2 -*-
%%------------------------------------------------------------------------------
-module(cuter_cerl).
%% External exports
-export([get_tags/1, id_of_tag/1, tag_from_id/1, empty_tag/0,
empty_tagId/0, collect_feasible_tags/2]).
Core AST extraction .
-export([load/3, get_c... | null | https://raw.githubusercontent.com/cuter-testing/cuter/0e761b12262d8a6cca90b73697d099d2b4ef4d98/src/cuter_cerl.erl | erlang | ------------------------------------------------------------------------------
External exports
Node types generators.
kfun API.
kmodule API.
Export for unit tests.
TODO(aggelgian): Change it to a map.
In each kmodule(), the following information is stored:
Key Value
-------- -----------------... | -*- erlang - indent - level : 2 -*-
-module(cuter_cerl).
-export([get_tags/1, id_of_tag/1, tag_from_id/1, empty_tag/0,
empty_tagId/0, collect_feasible_tags/2]).
Core AST extraction .
-export([load/3, get_core/2]).
-export([node_types_branches/0, node_types_branches_nocomp/0, node_types_all/0,
nod... |
08ce42cc626c5c7f93046d85463fbfe78aade7d2115502a3056c657a36290d0c | SahilKang/cl-rdkafka | future.lisp | Copyright ( C ) 2018 - 2020 < >
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any l... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/4d0b6f7f9b102769cb91a020e4e192a2ea066e0b/src/high-level/future.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2018 - 2020 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-rdkafka)
( let ( lparallel - promise )
( - pr... |
7134e616a22c76023999e7b8b013da427341b77d4b92452dae45ca0252235abb | fulcrologic/fulcro | transit.cljs | (ns ^:no-doc com.fulcrologic.fulcro.inspect.transit
(:require [cognitect.transit :as t]
[com.cognitect.transit.types :as ty]
[com.fulcrologic.fulcro.algorithms.transit :as ft]
[taoensso.timbre :as log]))
(deftype ErrorHandler []
Object
(tag [this v] "js-error")
(rep [this v]... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/71ed79c650222567ac4a566513365a95f12657e3/src/main/com/fulcrologic/fulcro/inspect/transit.cljs | clojure | (ns ^:no-doc com.fulcrologic.fulcro.inspect.transit
(:require [cognitect.transit :as t]
[com.cognitect.transit.types :as ty]
[com.fulcrologic.fulcro.algorithms.transit :as ft]
[taoensso.timbre :as log]))
(deftype ErrorHandler []
Object
(tag [this v] "js-error")
(rep [this v]... | |
24d964e80a7ab710c540b6585ab955fd2329957d98007987fbfa0b34d8281932 | vyorkin/tiger | env.ml | module T = Type
module Tr = Translate
module L = Location
module S = Symbol
module ST = Symbol_table
type var_entry = {
access: Tr.access;
ty: T.t
} [@@deriving show { with_path = false }]
type fun_entry = {
level: Tr.level;
label: Temp.label;
formals: T.t list;
result: T.t
} [@@deriving show { with_path ... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter7/lib/env.ml | ocaml | module T = Type
module Tr = Translate
module L = Location
module S = Symbol
module ST = Symbol_table
type var_entry = {
access: Tr.access;
ty: T.t
} [@@deriving show { with_path = false }]
type fun_entry = {
level: Tr.level;
label: Temp.label;
formals: T.t list;
result: T.t
} [@@deriving show { with_path ... | |
1507a21f5336fe5ddecf5f43f75e28bee8f5ffde8a46e0894cb4ae225106a462 | hasktorch/hasktorch | ParseFunctionSig.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module ParseFunctionSig where
import Text . . Error as M
import Data.Aeson.Types ()
import Data.String.Conversions (cs)
import Data.Void (Void)
import Data.Yaml hiding (Array, Parser)
im... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/0269df6b3c7fdfa3f25a8c8e315b6188214c57ca/codegen/src/ParseFunctionSig.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
Examples:
- func: log10_(Tensor self) -> Tensor
- func: fft(Tensor self, int64_t signal_ndim, bool normalized=false) -> Tensor
nullptr
, *,
Tensor(a)
Tensor(a!)
Tensor(a)?
Tensor(a!)?
Tensor?
Tensor(a)[]
| parser of i... | # LANGUAGE DeriveGeneric #
module ParseFunctionSig where
import Text . . Error as M
import Data.Aeson.Types ()
import Data.String.Conversions (cs)
import Data.Void (Void)
import Data.Yaml hiding (Array, Parser)
import GHC.Generics
import Text.Megaparsec as M
import Text.Megaparsec.Char as M
import Text.Megaparsec.C... |
6c46d9ccea2c72ce14bca1b0925b6cbdb391fdde970023629ae9d108e0411bc3 | dbuenzli/uucp | uucp_case_map.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/uucp/09d2186c0828465dbe37ed976c8d8ab7a5e7eeed/src/uucp_case_map.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | |
4491e4a1c5269ad6cf631c7aadfe0ef963ab11b5f0830399e75af6118dd90a3f | chris-taylor/aima-haskell | Fig52Game.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module AI.Search.Example.Fig52Game where
import AI.Search.Adversarial
import AI.Util.Util
----------------------------
Example Game ( Fig 5.2 ) --
----------------------------
-- |Data type representing the example game.
data ExampleGame s a = ExampleGame d... | null | https://raw.githubusercontent.com/chris-taylor/aima-haskell/538dcfe82a57a623e45174e911ce68974d8aa839/src/AI/Search/Example/Fig52Game.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
--------------------------
--------------------------
|Data type representing the example game.
|Instance of the example game.
how to create games). |
module AI.Search.Example.Fig52Game where
import AI.Search.Adversarial
import AI.Util.Util
data ExampleGame s a = ExampleGame deriving (Show)
exampleGame :: ExampleGame String Int
exampleGame = ExampleGame
|Definition of the example game in Fig 5.2 ( mainly useful as an example of
instance Game ExampleGame Strin... |
4f5d6e1986a914ab9a69e1c8bfbbfa5bea0310c1029a0f8a91a441ed14a55914 | gator1/jepsen | cscp_test.clj | (ns block-s.cscp-test
(:require [clojure.test :refer :all]
[block-s.core :refer :all]
[jepsen.core :as jepsen]
[jepsen.tests :as tests]
[jepsen.checker :as checker]
[jepsen.checker.timeline :as timeline]
[jepsen.generator :as gen])
(:use cl... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/block-s/test/block_s/cscp_test.clj | clojure | tests/noop-test
block client-server consistency testing on register write
fstorage client-server testing based on block write | (ns block-s.cscp-test
(:require [clojure.test :refer :all]
[block-s.core :refer :all]
[jepsen.core :as jepsen]
[jepsen.tests :as tests]
[jepsen.checker :as checker]
[jepsen.checker.timeline :as timeline]
[jepsen.generator :as gen])
(:use cl... |
b2332d691a0421440f562ba897265ce7371147429c3d85a2f30da30807889ec6 | madjestic/Haskell-OpenGL-Tutorial | Main.hs | {-# LANGUAGE Rank2Types #-}
module Main where
import NGL.Shape
import NGL.Rendering
import Control.Applicative
import Control.Monad
import Graphics.UI.GLFW (pollEvents, Window)
import Reactive.Banana
import Reactive.Banana.Frameworks
import Reactive.Banana.GLFW
import System.Clock
main :: IO ()
main = do
let ... | null | https://raw.githubusercontent.com/madjestic/Haskell-OpenGL-Tutorial/9f685ddde9d6c5d2cc9c2c62f214ca0d43e717c7/tutorial09/Main.hs | haskell | # LANGUAGE Rank2Types #
time <- getTime Realtime
| Keyboard events |
module Main where
import NGL.Shape
import NGL.Rendering
import Control.Applicative
import Control.Monad
import Graphics.UI.GLFW (pollEvents, Window)
import Reactive.Banana
import Reactive.Banana.Frameworks
import Reactive.Banana.GLFW
import System.Clock
main :: IO ()
main = do
let drawables = [ toDrawable Whi... |
8cc8286cb91c27a1787d94df21f6c5924778d74ee44688d33fe7a4a14be4a050 | borodust/alien-works | packages.lisp | (cl:defpackage :%alien-works.math
(:use)
(:export #:vec2-element-ptr
#:vec2-ptr
#:vec3-element-ptr
#:vec3-ptr))
(cl:defpackage :alien-works.math
(:local-nicknames (:a :alexandria)
(:! :alien-works.utils.empty)
(:u :alien-works.utils)
... | null | https://raw.githubusercontent.com/borodust/alien-works/909f4f4a756498811af3ffd68f98aff4f1b6ea64/src/math/packages.lisp | lisp | (cl:defpackage :%alien-works.math
(:use)
(:export #:vec2-element-ptr
#:vec2-ptr
#:vec3-element-ptr
#:vec3-ptr))
(cl:defpackage :alien-works.math
(:local-nicknames (:a :alexandria)
(:! :alien-works.utils.empty)
(:u :alien-works.utils)
... | |
8399be764afb421b41d143c74269bd0f3e7ee6374ea657b9a02f4809188479ba | racket/typed-racket | pr390-variation-4.rkt | #lang typed/racket/base
;; Test Hash Table functions with "complicated" types
(require typed/rackunit)
(test-case "hash-copy" ;; returns a mutable hash with same 'key-holding strength'
(check-pred hash?
(ann (hash-copy (make-immutable-hash)) Mutable-HashTableTop))
(check-pred hash?
(ann (hash-copy (make-... | null | https://raw.githubusercontent.com/racket/typed-racket/a37f1a9eea2a00154ec816d3cde025014d6a4938/typed-racket-test/succeed/pr390-variation-4.rkt | racket | Test Hash Table functions with "complicated" types
returns a mutable hash with same 'key-holding strength'
returns hash with same mutability
inst required because of inference limitations with keywords
specific type is not used here because `hash-copy-clear`'s type is not that specific wrt kind
only for immutable... | #lang typed/racket/base
(require typed/rackunit)
(check-pred hash?
(ann (hash-copy (make-immutable-hash)) Mutable-HashTableTop))
(check-pred hash?
(ann (hash-copy (make-immutable-hash '((1 . 1)))) (Mutable-HashTable Integer Integer)))
(check-pred hash?
(ann (hash-copy (make-hash '((1 . 1)))) (Muta... |
b1e6bedbe2edbf4f66b182387256066a1e532bf34f63030525b3851123447c09 | pandoc/pandoc-lua-marshal | Shared.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
|
Copyright : © 2021 - 2023 : MIT
Maintainer : >
Shared functions used in multiple types .
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <tarleb+>
Shared functions used in... | null | https://raw.githubusercontent.com/pandoc/pandoc-lua-marshal/e71315da1d377cf52cd94975c20ac04616c2d935/src/Text/Pandoc/Lua/Marshal/Shared.hs | haskell | # LANGUAGE OverloadedStrings #
* Walking
# SOURCE #
# SOURCE #
towards the leaves depth-first. | # LANGUAGE FlexibleContexts #
|
Copyright : © 2021 - 2023 : MIT
Maintainer : >
Shared functions used in multiple types .
Copyright : © 2021-2023 Albert Krewinkel
License : MIT
Maintainer : Albert Krewinkel <tarleb+>
Shared functions used in multiple types.
-}
module Text.Pandoc... |
f1d0a45a0ce2ec54a57bf017989d6960124fd9bbfeb0a8a3ad24a3ffac268467 | flyspeck/flyspeck | update_database_400.ml | (* ========================================================================== *)
FLYSPECK - BOOK FORMALIZATION
(* *)
(* Update theorem search ... | null | https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/text_formalization/general/update_database_400.ml | ocaml | ==========================================================================
Update theorem search
===========... | FLYSPECK - BOOK FORMALIZATION
Date : 2010 - 07 - 16
2012 - 09 - 06 : fixed up for OCaml 4.0 and added alphabetic sorting .
The trickery to get at the OCaml environment is due to .
let e... |
14c381b83bf596b77fe9710ea2e034e28bcc12fc24a50271a72eff95eb199f5e | Opetushallitus/ataru | organization_client_spec.clj | (ns ataru.organization-service.organization-client-spec
(:require
[cheshire.core :as json]
[speclj.core :refer [describe it should= tags around]]
[ataru.organization-service.organization-client :as org-client]
[clojure.java.io :as io]
[clj-http.client :as http]))
(def organization-hierarchy-data (slur... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/8736be332c3dcff5c197088f1a93e60f3ddc5e7c/spec/ataru/organization_service/organization_client_spec.clj | clojure | (ns ataru.organization-service.organization-client-spec
(:require
[cheshire.core :as json]
[speclj.core :refer [describe it should= tags around]]
[ataru.organization-service.organization-client :as org-client]
[clojure.java.io :as io]
[clj-http.client :as http]))
(def organization-hierarchy-data (slur... | |
f8d7c1a15aba7d41d628989a3e28a977b945428ed6e862a03eaa27cd47f30051 | pmapcat/reagent_autocomplete | core_test.cljs | (ns thereisnodot.reagent-autocomplete.core-test
(:require [clojure.test :refer :all]
[thereisnodot.reagent-autocomplete :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/pmapcat/reagent_autocomplete/5b0c979253843bdc828d9239b8a3893a04ec2b70/test/thereisnodot/reagent_autocomplete/core_test.cljs | clojure | (ns thereisnodot.reagent-autocomplete.core-test
(:require [clojure.test :refer :all]
[thereisnodot.reagent-autocomplete :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
16f1f6abe19b3eb1cb91d9eb6a8b8b1b1e575845e46b95145902939279bb5cc1 | yzhs/ocamlllvm | optcompile.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/driver/optcompile.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Config
open Fo... |
3324b17a6a1e1e9d418031a724f3452ae2478e3cede6ca68e57049f16d891450 | Proxymoron461/chesskell | CastleHelperTests.hs | module CastleHelperTests where
import Test.Hspec
import Test.HUnit.Lang (Assertion, assertFailure)
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Chesskell
im... | null | https://raw.githubusercontent.com/Proxymoron461/chesskell/fcfdb954ccc760d3689583d7198f0be5da2905a5/chess/test/CastleHelperTests.hs | haskell | bothWhiteRooksMovedBoard = create
put _Wh _R at a1
put _Wh _R at h1
put _Bl _P at h7
lastTeam _Bl
lastMoved e4 -- Set random position, to avoid nasty type err... | module CastleHelperTests where
import Test.Hspec
import Test.HUnit.Lang (Assertion, assertFailure)
import Test.ShouldNotTypecheck (shouldNotTypecheck)
import Data.Type.Equality ((:~:)(..))
import qualified GHC.TypeLits as TL (Nat)
import Data.Proxy(Proxy(..))
import Data.Type.Nat hiding (SNat(..))
import Chesskell
im... |
8c5df2f7eb10583df3990301b232772c09fa45868e88d94a9b8cdfa9e55c7385 | xh4/web-toolkit | package.lisp | (in-package :cl-user)
(defpackage :dom
(:nicknames :wt.dom)
(:use :cl :alexandria)
(:shadow :length :append :remove :class-name :type)
#+sb-package-locks
(:lock t)
(:export
;; node tree
:document
:document-type
:document-fragment
:node
:parent-node
:child-node
:element
:named-nod... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/dom/package.lisp | lisp | node tree
node types
namespaces
old-style collections
o
node
o
o
o
o
o
o
o
o
o
o
o TODO: setter
- TODO: setter
o
o
document
o
o
o
o
o
o
o
document-type
element
o
o
o
o
o
o
o
o
o
named-node-map
attribute
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
charac... | (in-package :cl-user)
(defpackage :dom
(:nicknames :wt.dom)
(:use :cl :alexandria)
(:shadow :length :append :remove :class-name :type)
#+sb-package-locks
(:lock t)
(:export
:document
:document-type
:document-fragment
:node
:parent-node
:child-node
:element
:named-node-map
:attr
... |
f3e8964e664bf53b77cab8f555310329020063ceac2b9adacbafbfbfe6142983 | agentm/project-m36 | AtomFunctionBody.hs | # LANGUAGE ScopedTypeVariables #
--tools to execute an atom function body
module ProjectM36.AtomFunctionBody where
import ProjectM36.Base
compiledAtomFunctionBody :: AtomFunctionBodyType -> AtomFunctionBody
compiledAtomFunctionBody = FunctionBuiltInBody
| null | https://raw.githubusercontent.com/agentm/project-m36/40996a7775dd5b8cffe7074baf23961d186f0c22/src/lib/ProjectM36/AtomFunctionBody.hs | haskell | tools to execute an atom function body | # LANGUAGE ScopedTypeVariables #
module ProjectM36.AtomFunctionBody where
import ProjectM36.Base
compiledAtomFunctionBody :: AtomFunctionBodyType -> AtomFunctionBody
compiledAtomFunctionBody = FunctionBuiltInBody
|
a53e3e5613ad218e2f1d24f728bb63898ffcd057f4cbd87e3ae41d0d2398bd2b | iskandr/parakeet-retired | TypeAnalysis.ml | (* pp: -parser o pa_macro.cmo *)
open Printf
open Base
open Type
open Adverb
open UntypedSSA
exception TypeError of string * (SrcInfo.t option)
let infer_unop (op:Prim.scalar_op) (t:Type.t) : Type.t =
let resultScalarT = Type.common_elt_type (Type.elt_type t) Float32T in
if Prim.is_float_unop op then Type.fil... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/SSA/Specialization/TypeAnalysis.ml | ocaml | pp: -parser o pa_macro.cmo
this will be the result if we're indexing only scalars
shape operator always returns a 1D shape vector
given an operator and types of its arguments, return list of types to which
args must be converted for the operator to work properly
upconvert non-float arguments to appropriate f... |
open Printf
open Base
open Type
open Adverb
open UntypedSSA
exception TypeError of string * (SrcInfo.t option)
let infer_unop (op:Prim.scalar_op) (t:Type.t) : Type.t =
let resultScalarT = Type.common_elt_type (Type.elt_type t) Float32T in
if Prim.is_float_unop op then Type.fill_elt_type t resultScalarT
else... |
5eb9f3136526ad95b220a6e07110c4880eb07006aa4919c1a7ea792752d836ab | reagent-project/reagent-template | project.clj | (defproject {{full-name}} "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.11.1"]
[ring-server "0.5.0"]
[reagent "1.1.1"]
[reagent-uti... | null | https://raw.githubusercontent.com/reagent-project/reagent-template/c54f0bc9e183783c12a3c151af9061bbbae5a0ac/resources/leiningen/new/reagent/project.clj | clojure | To silence warnings from less4clj dependecies about missing logger implementation | (defproject {{full-name}} "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.11.1"]
[ring-server "0.5.0"]
[reagent "1.1.1"]
[reagent-uti... |
d44eff86591bfd227ec48fa67ba306a9e938327f7a1a4e904f9ee93207c1e25f | CSCfi/rems | test_permissions.clj | (ns ^:integration rems.api.test-permissions
(:require [buddy.sign.jws :as buddy-jws]
[buddy.sign.jwt :as buddy-jwt]
[buddy.core.keys :as buddy-keys]
[clojure.test :refer :all]
[rems.api.testing :refer :all]
[rems.service.test-data :as test-data]
... | null | https://raw.githubusercontent.com/CSCfi/rems/af65570a5e5a6102aec4dc85d07d0f6fbb60c18d/test/clj/rems/api/test_permissions.clj | clojure | (ns ^:integration rems.api.test-permissions
(:require [buddy.sign.jws :as buddy-jws]
[buddy.sign.jwt :as buddy-jwt]
[buddy.core.keys :as buddy-keys]
[clojure.test :refer :all]
[rems.api.testing :refer :all]
[rems.service.test-data :as test-data]
... | |
8cfb470f90205bc126ee2508716bbb459792d1b60c054998d1e554ca4126a9bf | csg-tokyo/typelevelLR | TestInvalid3.hs |
import Expr
main :: IO ()
main = print $ begin |> lp |> num 1 |> add |> num 2 |> end
| null | https://raw.githubusercontent.com/csg-tokyo/typelevelLR/ca5853890fac7fb819a026f0fd15d8b43f7c8470/examples/haskell/expr/TestInvalid3.hs | haskell |
import Expr
main :: IO ()
main = print $ begin |> lp |> num 1 |> add |> num 2 |> end
| |
7962e29426e48d9009eebe69582b762eb86611d2deb89917b8769306611169fb | mflatt/shrubbery-rhombus-0 | nested-bindings.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
shrubbery/print)
racket/unsafe/undefined
"binding.rkt"
"parse.rkt"
"forwarding-sequence.rkt"
"composite.rkt"
"static-info.rkt")
(provide nested-bindings)
(def... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/9cf011811ab502a8481cfb22bac9fb0a11a376fa/rhombus/private/nested-bindings.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse
shrubbery/print)
racket/unsafe/undefined
"binding.rkt"
"parse.rkt"
"forwarding-sequence.rkt"
"composite.rkt"
"static-info.rkt")
(provide nested-bindings)
(def... | |
5c2e95c39e6310038eab78bfa4aeceb4bf41c6a6749fdded70f096fa9d388bc5 | uxbox/uxbox-backend | token.clj | 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 ) 2016 < >
(ns uxbox.util.token
"Facilities for generate random tokens."
(:require [buddy.core.nonce :as nonce]
... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/src/uxbox/util/token.clj | clojure | 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 ) 2016 < >
(ns uxbox.util.token
"Facilities for generate random tokens."
(:require [buddy.core.nonce :as nonce]
... | |
efdcaa185b3cb3f2d6509b258c57198c17729f618c8674e909748ea9b81e576a | frenchy64/fully-satisfies | never.clj | (ns io.github.frenchy64.fully-satisfies.never)
(defn never?
"Returns false for any argument."
{:tag Boolean}
[x] false)
| null | https://raw.githubusercontent.com/frenchy64/fully-satisfies/9f684d86195b48b06f7e3f0f25f4c4deaad91467/src/io/github/frenchy64/fully_satisfies/never.clj | clojure | (ns io.github.frenchy64.fully-satisfies.never)
(defn never?
"Returns false for any argument."
{:tag Boolean}
[x] false)
| |
ec692f701680ebb8d2c313bbbbe01032391f5040adf9f075e2a391f45d6c569b | input-output-hk/cardano-ledger | TxInfo.hs | # LANGUAGE TypeApplications #
module Test.Cardano.Ledger.Babbage.TxInfo where
import Cardano.Ledger.Address (Addr (..), BootstrapAddress (..))
import Cardano.Ledger.Allegra.Scripts (ValidityInterval (..))
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.PParams ()
import Cardano.Ledg... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/38aa337834ccb9b5f47dbf9e81a3b986dcdd57f5/eras/babbage/test-suite/test/Test/Cardano/Ledger/Babbage/TxInfo.hs | haskell | This input is only unknown in the sense | # LANGUAGE TypeApplications #
module Test.Cardano.Ledger.Babbage.TxInfo where
import Cardano.Ledger.Address (Addr (..), BootstrapAddress (..))
import Cardano.Ledger.Allegra.Scripts (ValidityInterval (..))
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.PParams ()
import Cardano.Ledg... |
5308b9edf19c4fddef26323abfb969b30bff127bc57dce0852592238215ab730 | broadinstitute/firecloud-ui | ontology_autosuggest.cljs | (ns broadfcui.components.ontology-autosuggest
(:require
[dmohs.react :as react]
[clojure.string :as string]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.links :as links]
[broadfcui.common.style :as style]
[broadfcui.components.autosuggest :refer [Aut... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/components/ontology_autosuggest.cljs | clojure | (ns broadfcui.components.ontology-autosuggest
(:require
[dmohs.react :as react]
[clojure.string :as string]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.links :as links]
[broadfcui.common.style :as style]
[broadfcui.components.autosuggest :refer [Aut... | |
78bd0ce9c22791512087971ecb6c1833785e8fdc063c93388b19ec206241fdc7 | ygmpkk/house | BounceDraw.hs | module BounceDraw where
import Graphics.UI.ObjectIO
import BounceTypes
drawBarrel :: UpdateArea -> Scale -> Barrel -> Draw ()
drawBarrel updArea scale barrel = do
setPenColour grey
mapM_ fill updArea
unfillAt base polygon
where
(base,polygon) = barrelToPolygon scale barrel
drawBall :: Scale -> Point2 -> Ball... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Examples/Bounce/BounceDraw.hs | haskell | module BounceDraw where
import Graphics.UI.ObjectIO
import BounceTypes
drawBarrel :: UpdateArea -> Scale -> Barrel -> Draw ()
drawBarrel updArea scale barrel = do
setPenColour grey
mapM_ fill updArea
unfillAt base polygon
where
(base,polygon) = barrelToPolygon scale barrel
drawBall :: Scale -> Point2 -> Ball... | |
df1ce7c9fb333b1b97d8b9b467546b24fa52a45a58cda05569521e41c4753138 | ekmett/coda | Completion.hs | --------------------------------------------------------------------
-- |
Copyright : ( c ) 2017 , ( c ) and 2012 - 2013
License : BSD2
Maintainer : < >
-- Stability : experimental
-- Portability: non-portable
--
--------------------------------------------------------------------
module Coda.... | null | https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/lib/coda-console/Coda/Console/Completion.hs | haskell | ------------------------------------------------------------------
|
Stability : experimental
Portability: non-portable
------------------------------------------------------------------
todo upgrade this to use more general per-command parser
strs <- use consoleIds
| Haskeline settings supporting autocomplete ... | Copyright : ( c ) 2017 , ( c ) and 2012 - 2013
License : BSD2
Maintainer : < >
module Coda.Console.Completion
( settings
) where
import Control.Lens
import Data.Char
import Data.List
import Data.Set as Set
import Data.Set.Lens
import Data.Monoid
import Coda.Syntax.Token
import Coda.Console... |
ef77684b43097db2c6d61b26243cd0de175a49b8807af3db6edfcff22362a316 | lagenorhynque/clj-rest-api-and-cljs-spa-example | main.clj | (ns todo-api.main
(:gen-class)
(:require [duct.core :as duct]))
(duct/load-hierarchy)
(def custom-readers
{'todo-api/regex re-pattern})
(defn -main [& args]
(let [keys (or (duct/parse-keys args) [:duct/daemon])
profiles [:duct.profile/prod]]
(-> (duct/resource "todo_api/config.edn")
(... | null | https://raw.githubusercontent.com/lagenorhynque/clj-rest-api-and-cljs-spa-example/d3932f89490ecdc6cae14098e91b5f4bffa07ecb/todo-api/src/todo_api/main.clj | clojure | (ns todo-api.main
(:gen-class)
(:require [duct.core :as duct]))
(duct/load-hierarchy)
(def custom-readers
{'todo-api/regex re-pattern})
(defn -main [& args]
(let [keys (or (duct/parse-keys args) [:duct/daemon])
profiles [:duct.profile/prod]]
(-> (duct/resource "todo_api/config.edn")
(... | |
4cd299d41d91533fd46d0632b3a11e46932049e16b96a4acbc716a6e5230cd75 | aiya000/haskell-examples | Chapter_3_3.hs | import Control.Monad
import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
window <- windowNew
table <- tableNew 1 7 True
set window
[ windowTitle := "1週間やる蔵"
, windowDefaultWidth := 600
, windowDefaultHeight := 200
, containerBorderWidth := 10
, containerChild := table
... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Graphics/UI/Gtk/tutorial/Chapter_3_3.hs | haskell | import Control.Monad
import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
window <- windowNew
table <- tableNew 1 7 True
set window
[ windowTitle := "1週間やる蔵"
, windowDefaultWidth := 600
, windowDefaultHeight := 200
, containerBorderWidth := 10
, containerChild := table
... | |
b21e11936c3b37b2759a97de46afa011e6eb06f5bb01d90cebcdca9273337e46 | xapi-project/xen-api | xapi_vm_lifecycle.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_vm_lifecycle.ml | ocaml | * Helper functions relating to VM lifecycle operations.
* @group Virtual-Machine Management
* Given an operation, [allowed_power_states] returns all the possible power state for
wich this operation can be performed.
a VM.import is done on file and not on VMs, so there is not power-state there!
* check if [op]... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
5f16233a2538a244454a22cc53a9f769199a4afb1c883b33620a53d8e13eaf25 | aria42/infer | probability_test.clj | (ns infer.probability-test
(:use clojure.test)
(:use infer.core)
(:use infer.classification)
(:use infer.probability))
(deftest counts-of-1
(is (= {:a 1 :b 1}
((classification-workflow
identity
#(classify-one-to-one
{:a (present-when (gt 5))
:b (present-when (lt 5))}
%)
(map-... | null | https://raw.githubusercontent.com/aria42/infer/9849325a27770794b91415592a8706fd90777469/test/infer/probability_test.clj | clojure | (ns infer.probability-test
(:use clojure.test)
(:use infer.core)
(:use infer.classification)
(:use infer.probability))
(deftest counts-of-1
(is (= {:a 1 :b 1}
((classification-workflow
identity
#(classify-one-to-one
{:a (present-when (gt 5))
:b (present-when (lt 5))}
%)
(map-... | |
154421f16c84ead1642a502104484538e38010f85e1d1b758907fa8be5e96bb5 | binaryage/cljs-oops | tools.clj | (ns oops.tools
(:require [environ.core :refer [env]]
[oops.config :as config]
[clojure.string :as string]
[clojure.java.io :as io]
[cuerdas.core :as cuerdas])
(:import (java.io StringWriter)))
; -- helpers -------------------------------------------------------------... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/tools/oops/tools.clj | clojure | -- helpers ----------------------------------------------------------------------------------------------------------------
-- console recording ------------------------------------------------------------------------------------------------------
-- helper macros --------------------------------------------------... | (ns oops.tools
(:require [environ.core :refer [env]]
[oops.config :as config]
[clojure.string :as string]
[clojure.java.io :as io]
[cuerdas.core :as cuerdas])
(:import (java.io StringWriter)))
(defn advanced-mode? []
(when (some? cljs.env/*compiler*)
(= (get-i... |
02e960f4f84d6c20a89981bf39f7ed95282d88e441e66a2f8c62095954013f29 | reborg/clojure-essential-reference | 2.clj | < 1 >
; (1 2 3) | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialGeneration/OtherGenerators/lazy-seq/2.clj | clojure | (1 2 3) | < 1 > |
5200f544cb87bf1782aec8dabf1227aa20b4aaf7ec2fffdeea6977e0e7453d28 | quicklisp/quicklisp-controller | update-failure-report.lisp | (in-package #:quicklisp-controller)
(defun latest-build-log-file ()
(let ((logs (directory (asdf:system-relative-pathname "quicklisp-controller"
#p"logs/**/*.txt"))))
(first (last (sort logs #'string< :key #'namestring )))))
(defun collect-matching (fun stream)
(loop for line = (next-line stream)
... | null | https://raw.githubusercontent.com/quicklisp/quicklisp-controller/5608e75ec9c4e1f33438c204d37f4d4ca2b21ff6/update-failure-report.lisp | lisp | (in-package #:quicklisp-controller)
(defun latest-build-log-file ()
(let ((logs (directory (asdf:system-relative-pathname "quicklisp-controller"
#p"logs/**/*.txt"))))
(first (last (sort logs #'string< :key #'namestring )))))
(defun collect-matching (fun stream)
(loop for line = (next-line stream)
... | |
fb311d1a4cecc5890f852e5b5579602f7f6c881492a86813072278678a3a7d3a | RolfRolles/PandemicML | X86Util.ml | open X86
let x86_is_cjmp = function
| Ja | Jae | Jb | Jbe | Jcxz | Jecxz | Jg | Jge | Jl | Jle | Jno | Jnp
| Jns | Jnz | Jo | Jp | Js | Jz -> true
| _ -> false
let x86_is_call = function | Call -> true | _ -> false
let x86_is_jmp = function | Jmp -> true | _ -> false
let x86_is_ret = function | Ret -> t... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/DetectVM/X86Util.ml | ocaml | open X86
let x86_is_cjmp = function
| Ja | Jae | Jb | Jbe | Jcxz | Jecxz | Jg | Jge | Jl | Jle | Jno | Jnp
| Jns | Jnz | Jo | Jp | Js | Jz -> true
| _ -> false
let x86_is_call = function | Call -> true | _ -> false
let x86_is_jmp = function | Jmp -> true | _ -> false
let x86_is_ret = function | Ret -> t... | |
2dfb1eeb04ea68974ac99ff6426b52390160062c3455130c83be04a0048272bb | ocaml-multicore/ocaml-tsan | compilenv.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/middle_end/compilenv.mli | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
, OCamlPro
and ,
Copyright 2010 Institut National de Recherche en Informatique et
Copyright 2014 - -2016 Jane Street Group LLC
t... |
ddcfae89cc2e7cb9ee3c5355ad7bb284432ce57ad9cf7f8d71129862eeb5c196 | redstarssystems/libtemplate | build.clj | (ns build
(:refer-clojure :exclude [test])
(:require
[clojure.pprint]
[org.corfield.build :as bb]))
(def artifact 'org.rssys/libtemplate)
(def version "0.1.0-SNAPSHOT")
( def version ( format " 1.0.%s " ( System / getenv " git - rev - count " ) ) ) ; ; alternatively , use MAJOR.MINOR.COMMITS :
(def... | null | https://raw.githubusercontent.com/redstarssystems/libtemplate/f99fccdead672ffc1738d620e2eaf8ef89bfa2fc/build.clj | clojure | ; alternatively , use MAJOR.MINOR.COMMITS : | (ns build
(:refer-clojure :exclude [test])
(:require
[clojure.pprint]
[org.corfield.build :as bb]))
(def artifact 'org.rssys/libtemplate)
(def version "0.1.0-SNAPSHOT")
(def project-env
{:artifact artifact
:version version
:build-time (System/getenv "build-time")... |
4b1d2713febe74d862c5c55dd463be159942ca126c215cee4c7971228eea620e | YoshikuniJujo/funpaala | circleRec.hs | data Circle = Circle { centerX :: Double, centerY :: Double, radius :: Double }
deriving Show
circle1 :: Circle
circle1 = Circle { centerX = 10, centerY = 15, radius = 7 }
area :: Circle -> Double
area Circle { radius = r } = r ^ 2 * pi
inside :: Circle -> (Double, Double) -> Bool
inside Circle { centerX = cx, cent... | null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/23_record/circleRec.hs | haskell | data Circle = Circle { centerX :: Double, centerY :: Double, radius :: Double }
deriving Show
circle1 :: Circle
circle1 = Circle { centerX = 10, centerY = 15, radius = 7 }
area :: Circle -> Double
area Circle { radius = r } = r ^ 2 * pi
inside :: Circle -> (Double, Double) -> Bool
inside Circle { centerX = cx, cent... | |
384c2bff59dc37529113337fc690ebd306d2c02e68cb0d17f4c88a242fe41060 | astynax/hemmet | Tree.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
module Hemmet.Tree
( Tree
, Node(..)
, Transformation
, ToTree(..)
) where
import Data.Text
type Tree a = a (Node a)
data Node a = Node
{ _nName :: Text
, _nPayload :: Tree a
}
instance Eq (Tree a) => Eq (Node a) where
(Node n1 p1) =... | null | https://raw.githubusercontent.com/astynax/hemmet/0ee76cc4ffca5726f8a70ab78ae8473232b96ee3/src/Hemmet/Tree.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
module Hemmet.Tree
( Tree
, Node(..)
, Transformation
, ToTree(..)
) where
import Data.Text
type Tree a = a (Node a)
data Node a = Node
{ _nName :: Text
, _nPayload :: Tree a
}
instance Eq (Tree a) => Eq (Node a) where
(Node n1 p1) =... | |
c5c41810058daf282251bad4901512d7f1de32ebe6607a752b3785c55fc55c80 | dannypsnl/plt-research | info.rkt | #lang info
(define collection "racket-learn-redex")
(define deps '("base" "redex"))
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
(define pkg-desc "Description Here")
(define version "0.0")
(define pkg-authors '(dannypsnl))
| null | https://raw.githubusercontent.com/dannypsnl/plt-research/48220b986cdde758571f3fb7a09987543cc9e449/racket/redex/info.rkt | racket | #lang info
(define collection "racket-learn-redex")
(define deps '("base" "redex"))
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
(define pkg-desc "Description Here")
(define version "0.0")
(define pkg-authors '(dannypsnl))
| |
079dc620131f41841a58453c45aa858680a1fa04e2cbe0e5f0bf8313cd465325 | xapi-project/ocaml-encodings | encodings_private.ml |
* Copyright ( C ) 2007 - 2008 XenSource Ltd.
*
* Authors :
* < >
* < >
*
* Provides functions relating to character and string encodings .
* Copyright (C) 2007-2008 XenSource Ltd.
*
* Authors:
* Vincent Hanquez <>
* Jonathan Knowles <>
*
* Provides functions relating to character an... | null | https://raw.githubusercontent.com/xapi-project/ocaml-encodings/9df3dc122c31837af527749a08f16b3b0e7ec025/main/encodings_private.ml | ocaml | === Utility Functions ===
=== Unicode Functions ===
* non-character. Such non-characters are forbidden for use in open
* Returns true if and only if the given value lies outside the
* surrogate code point, only for use in UTF-16 encoded strings.
* Returns true if and only if the given value corresponds to
* ... |
* Copyright ( C ) 2007 - 2008 XenSource Ltd.
*
* Authors :
* < >
* < >
*
* Provides functions relating to character and string encodings .
* Copyright (C) 2007-2008 XenSource Ltd.
*
* Authors:
* Vincent Hanquez <>
* Jonathan Knowles <>
*
* Provides functions relating to character an... |
265e5f0d1d69f0d1a0cc2650170279e211f4147a0af427564fa8005f88a9aab5 | shirok/Gauche | srfi-222-tests.scm | (import
(scheme base)
(srfi 64)
(compounds))
(define (test-compound-equal c1 c2)
(test-equal
(compound-subobjects c1)
(compound-subobjects c2)))
(test-begin "Compounds")
(test-group "make-compound, compound?, compound-subobjects"
(define (test c)
(test-assert (compound? c))
... | null | https://raw.githubusercontent.com/shirok/Gauche/cfd501f87b5b45117b102a2760adce5cea75f726/test/include/srfi-222-tests.scm | scheme | The following definitions are referenced in later examples
grade-point average
integer year
annualized
These definitions are referenced in later examples | (import
(scheme base)
(srfi 64)
(compounds))
(define (test-compound-equal c1 c2)
(test-equal
(compound-subobjects c1)
(compound-subobjects c2)))
(test-begin "Compounds")
(test-group "make-compound, compound?, compound-subobjects"
(define (test c)
(test-assert (compound? c))
... |
2d2dab7c6b69c420a3463841ffb639070d586c3ae09260e6ea2f4edfe6748ffd | logseq/logseq | right_sidebar.cljs | (ns frontend.components.right-sidebar
(:require [cljs-bean.core :as bean]
[clojure.string :as string]
[frontend.components.block :as block]
[frontend.components.onboarding :as onboarding]
[frontend.components.page :as page]
[frontend.components.shortcut :as ... | null | https://raw.githubusercontent.com/logseq/logseq/59647482fad04fb1696d99a5953b97f72bb9b4f4/src/main/frontend/components/right_sidebar.cljs | clojure | (ns frontend.components.right-sidebar
(:require [cljs-bean.core :as bean]
[clojure.string :as string]
[frontend.components.block :as block]
[frontend.components.onboarding :as onboarding]
[frontend.components.page :as page]
[frontend.components.shortcut :as ... | |
d323ce64cb7b713f0c9ae5f72e3fc0a27ac10e646669fe6d72c30dc3c5b781a1 | nvim-treesitter/nvim-treesitter | folds.scm | (body) @fold
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/a7c0c1764b0b583d0597108dd7d48bc5c0f98c81/queries/ninja/folds.scm | scheme | (body) @fold
| |
1ad7a13663c7b41b89f94a24527d751e4a2c4ff44235ac77edd0478b54520495 | 8c6794b6/haskell-sc-scratch | Expr.hs | module Bench.Expr where
import Control.DeepSeq
import Data.Binary (encode, decode)
import Sound.SC3
import Sound.SC3.Lepton.Pattern.Expression
import Sound.SC3.Lepton.Pattern.Interpreter.Bz
import Sound.SC3.Lepton.Pattern.Interpreter.Expr
import Sound.SC3.Lepton.Pattern.Interpreter.R
import Sound.SC3.Lepton.Pattern.Pa... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/bench/Bench/Expr.hs | haskell | module Bench.Expr where
import Control.DeepSeq
import Data.Binary (encode, decode)
import Sound.SC3
import Sound.SC3.Lepton.Pattern.Expression
import Sound.SC3.Lepton.Pattern.Interpreter.Bz
import Sound.SC3.Lepton.Pattern.Interpreter.Expr
import Sound.SC3.Lepton.Pattern.Interpreter.R
import Sound.SC3.Lepton.Pattern.Pa... | |
036418426e963699ec0b2493a74e54ef7a942ca2b3e8adcbb57d30764e5ea5a6 | arianvp/ghcjs-servant-client | Main.hs | # LANGUAGE DataKinds , TypeOperators , DeriveGeneric , CPP , JavaScriptFFI #
import Servant.Client
import Servant.API
import Data.Aeson
import Data.String
import Control.Monad.Trans.Either
import Control.Monad.IO.Class
import Data.Proxy
import GHC.Generics
import GHCJS.Types
import GHCJS.Marshal
import GHCJS.Foreign
... | null | https://raw.githubusercontent.com/arianvp/ghcjs-servant-client/063cdfcee57d586b480082daaeca3ef73035ad5b/Main.hs | haskell | # LANGUAGE DataKinds , TypeOperators , DeriveGeneric , CPP , JavaScriptFFI #
import Servant.Client
import Servant.API
import Data.Aeson
import Data.String
import Control.Monad.Trans.Either
import Control.Monad.IO.Class
import Data.Proxy
import GHC.Generics
import GHCJS.Types
import GHCJS.Marshal
import GHCJS.Foreign
... | |
0b45de36a57769d01cc6649a8ef34a401bd525ba49638865a3a7ba9cfc82aacb | brendanzab/language-garden | Filament.mli | (** {0 Model of Anabaena catenula}*)
* Development of a multicelluar filament in the blue - green bactieria ,
{ { : } Anabaena catenula } .
{{: } Anabaena catenula}. *)
(** Alphabet of symbols for this system *)
type symbol
include FractalGrowth.LSystem.Grammar
with type symbol := symbol
(** @open *)
... | null | https://raw.githubusercontent.com/brendanzab/language-garden/4d9c8b4c7a178f5001c5394bfd188baa72420db2/lang-fractal-growth/examples/Filament.mli | ocaml | * {0 Model of Anabaena catenula}
* Alphabet of symbols for this system
* @open
* {1 String interpretation}
* Convert a symbol to a string
* Convert a word to a string |
* Development of a multicelluar filament in the blue - green bactieria ,
{ { : } Anabaena catenula } .
{{: } Anabaena catenula}. *)
type symbol
include FractalGrowth.LSystem.Grammar
with type symbol := symbol
val string_of_symbol : symbol -> string
val string_of_word : symbol list -> string
|
b0f2280b502123e1ace242d3668bf66e8214821cd37d1b9fb717d126e1bde374 | RunOrg/RunOrg | common.ml | (* © 2014 RunOrg *)
let trace_enabled = false
let trace_events = false
First connection queries
= = = = = = = = = = = = = = = = = = = = = = = =
======================== *)
let on_first_connection = ref (Run.return ())
(* Context manipulation
==================== *)
type cqrs = SqlConnection.t
class... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/cqrsLib/common.ml | ocaml | © 2014 RunOrg
Context manipulation
==================== |
let trace_enabled = false
let trace_events = false
First connection queries
= = = = = = = = = = = = = = = = = = = = = = = =
======================== *)
let on_first_connection = ref (Run.return ())
type cqrs = SqlConnection.t
class type ctx = object ('self)
method cqrs : cqrs
method time : Time.t
... |
b7c243fac5c69e2c0aaf1ef62bab41bb08d1b2fb43b2022cb5befae87ea6bb54 | puppetlabs/puppetdb | event_counts.clj | (ns puppetlabs.puppetdb.query.event-counts
(:require [puppetlabs.puppetdb.query.events :as events]
[clojure.string :as string]
[puppetlabs.puppetdb.jdbc :as jdbc]
[puppetlabs.puppetdb.query :as query]
[puppetlabs.puppetdb.query.paging :as paging]
[puppetlabs... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/src/puppetlabs/puppetdb/query/event_counts.clj | clojure | The query engine does not support distinct-resources! | (ns puppetlabs.puppetdb.query.event-counts
(:require [puppetlabs.puppetdb.query.events :as events]
[clojure.string :as string]
[puppetlabs.puppetdb.jdbc :as jdbc]
[puppetlabs.puppetdb.query :as query]
[puppetlabs.puppetdb.query.paging :as paging]
[puppetlabs... |
fe692c79a11f1766c44705a8f428490be2c4f702e390099579c99c4c1ec57b1f | ekmett/stable-maps | Dynamic.hs | # LANGUAGE CPP #
{-# LANGUAGE TypeFamilies, Rank2Types #-}
# LANGUAGE GeneralizedNewtypeDeriving #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
Module : System . Mem . StableName . Dynamic
Copyright : (... | null | https://raw.githubusercontent.com/ekmett/stable-maps/7d3b9c16b4ff4fd4bda9a07436b0fc6a95e63444/System/Mem/StableName/Dynamic.hs | haskell | # LANGUAGE TypeFamilies, Rank2Types #
---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
| Makes a 'DynamicStableName' for an arbitrary object. T... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
Module : System . Mem . StableName . Dynamic
Copyright : ( c ) 2010
Portability : GHC only
Dynamic stable names are a way of performing fast ( O(1 ) ) , not - quite - exact co... |
a0619b5b90064221bbc159feae8c9683d891ed6d7a3e8a46b09ced928b935262 | aymannadeem/foldilocks | Map.hs | module Map where
-- Manual Recursion
map' :: (a -> b) -> [a] -> [b]
map' f [] = []
map' f (x:xs) = f x : map' f xs
-- using foldr
mapFold :: (a -> b) -> [a] -> [b]
mapFold f = foldr (\ x zs -> f x : zs) []
-- using function composition
mapFold' :: (a -> b) -> [a] -> [b]
mapFold' f = foldr ((:).f) []
---------------... | null | https://raw.githubusercontent.com/aymannadeem/foldilocks/d1f21261668df9b6c058f1675039e3b94b2d9416/exercise-solutions/Map.hs | haskell | Manual Recursion
using foldr
using function composition
-----------------------
Fun fact:
functions composed:
a lot more efficient.
-----------------------
Run in your browser:
/@aymannadeem/Map | module Map where
map' :: (a -> b) -> [a] -> [b]
map' f [] = []
map' f (x:xs) = f x : map' f xs
mapFold :: (a -> b) -> [a] -> [b]
mapFold f = foldr (\ x zs -> f x : zs) []
mapFold' :: (a -> b) -> [a] -> [b]
mapFold' f = foldr ((:).f) []
The fusion law for map states that composing two
maps is equivalent to sing... |
2f1d1a3bab60d016650f78147f0c70482bc28eeb36a04da655cc9652bfd4ab73 | takikawa/racket-ppa | and.rkt | #lang racket/base
(require (for-syntax racket/base
"arr-util.rkt")
racket/promise
(only-in "../../private/promise.rkt" prop:force promise-forcer)
"../../private/math-predicates.rkt"
"prop.rkt"
"blame.rkt"
"guts.rkt"
"rand.rkt"
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/collects/racket/contract/private/and.rkt | racket | #lang racket/base
(require (for-syntax racket/base
"arr-util.rkt")
racket/promise
(only-in "../../private/promise.rkt" prop:force promise-forcer)
"../../private/math-predicates.rkt"
"prop.rkt"
"blame.rkt"
"guts.rkt"
"rand.rkt"
... | |
e9e82fc1e2f448b08b357465543bd20f5422e8dae39397e30f30b0f83496702f | nojb/llvm-tiger | compile.ml | The MIT License ( MIT )
Copyright ( c ) 2013 - 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rig... | null | https://raw.githubusercontent.com/nojb/llvm-tiger/eebc900d0646c68879eeb4a696c311605e084121/src/compile.ml | ocaml | let rec base_type env ty =
match ty.tdesc with
| NAME x -> base_type env (M.find x env.tenv)
| _ as t -> t
env
t1.tdesc == ANY || t2.tdesc == ANY || base_type env t1 == base_type env t2
{ i32, [0 x t] }*
named_structs := (t, ty) :: !named_structs;
false
end;
let check_type env (x, _) = ... | The MIT License ( MIT )
Copyright ( c ) 2013 - 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rig... |
fc66d8e8ddf84908eba50f30f3991fdcc9c7a5d78bbbac8439a4488556964bc3 | rakutenrewards/clojure-bandit | core_test.clj | (ns curbside.bandit.core-test
(:require
[clojure.algo.generic.functor :refer [fmap]]
[clojure.core.match :refer [match]]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.math.numeric-tower :as math]
[clojure.test :refer :all]
[curbside.bandit.core :as bandit]
[curbside.bandit.ext :... | null | https://raw.githubusercontent.com/rakutenrewards/clojure-bandit/81425388006c02fc8f052384c185c3bed3b1e986/test/curbside/bandit/core_test.clj | clojure | executed for side effects | (ns curbside.bandit.core-test
(:require
[clojure.algo.generic.functor :refer [fmap]]
[clojure.core.match :refer [match]]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.math.numeric-tower :as math]
[clojure.test :refer :all]
[curbside.bandit.core :as bandit]
[curbside.bandit.ext :... |
821afda9b2fd87332c397c6caeccef3c977bd1d56bbf461299a8ab316eee1342 | ekmett/lens | Lens.hs | # LANGUAGE CPP #
#ifdef TRUSTWORTHY
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Text.Lens.Encoding
Copyright : ( C ) 2013
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : ... | null | https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/experimental/Data/Text/Encoding/Lens.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Text.Lens.Encoding
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
-------------------------------------------------------------------------- | # LANGUAGE CPP #
#ifdef TRUSTWORTHY
# LANGUAGE Trustworthy #
#endif
Copyright : ( C ) 2013
Maintainer : < >
module Data.Text.Encoding.Lens where
import Control.Lens
import Data.ByteString
import Data.Text
import Data.Text.Encoding as T
utf8 :: Iso' Text ByteString
utf8 = iso encodeUtf8 decodeUtf8
#... |
c06a2ed6ea784eea8ca8f174b9c1d1661ba78c74ae1fdec32ddb7eeebffc76b9 | funcool/httpurr | aleph.clj | (ns httpurr.client.aleph
(:refer-clojure :exclude [get])
(:require [aleph.http :as http]
[manifold.deferred :as dfd]
[httpurr.client :as c]
[httpurr.protocols :as p]
[httpurr.status :as s]))
;; --- Client Impl.
(defn- response?
"Check if data has valid response li... | null | https://raw.githubusercontent.com/funcool/httpurr/22fb1b921864155a6b4eff113e2456ee924dd681/src/httpurr/client/aleph.clj | clojure | --- Client Impl.
--- Shortcuts | (ns httpurr.client.aleph
(:refer-clojure :exclude [get])
(:require [aleph.http :as http]
[manifold.deferred :as dfd]
[httpurr.client :as c]
[httpurr.protocols :as p]
[httpurr.status :as s]))
(defn- response?
"Check if data has valid response like format."
[data]... |
4130341e622a78bdf60710b8e56771ff9516e0ff0ee8bf228d266583dbc9355b | emaphis/HtDP2e-solutions | 09_Structure_in_the_World.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 09_Structure_in_the_World) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor r... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/05-Adding-Structure/09_Structure_in_the_World.rkt | racket | about the language level of this file in a form that our tools can easily process.
data
data type to hold tank and ufo info.
Space-game -> ???
template
A SpaceGame is a structure:
interpretation (make-space-game (make-posn ux uy) tx)
describes a configuration where the UFO is | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 09_Structure_in_the_World) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 5 Adding Structure
5.9 Structure... |
1e5f2cb1f784d739ff0566425fc31ecbaa1e9ccd3eb41eb7191df3010a4b8568 | mwand/5010-examples | 01-3-rocket-examples.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 01-5-rocket-examples) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat... | null | https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/01-3-rocket-examples.rkt | racket | about the language level of this file in a form that our tools can easily process.
making examples human-readable
a rocket simulation.
Information Analysis:
We have a single rocket, which is at some altitude and is
travelling vertically at some velocity.
We should be able to pause the animation
a Rocket
A Ro... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 01-5-rocket-examples) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define-struct rocket (altitude velocity))
veloc... |
b85607681dd24884acac95ede99bb08912a994e078358c58dc87ac855f6b7702 | racket/rhombus-prototype | pack.rkt | #lang racket/base
(require syntax/stx
enforest/proc-name
"realm.rkt")
We represent Rhombus syntax objects as a syntax object with one of
;; the following forms:
;; (multi (group term ...) ...) - as a general multi-group syntax object
;; (group term ...) - for a group syntax object
;; term - f... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/692dfda43c0d6c5a2bb0298cc5f0445125f3c567/rhombus/private/pack.rkt | racket | the following forms:
(multi (group term ...) ...) - as a general multi-group syntax object
(group term ...) - for a group syntax object
term - for a single-term syntax object
'x'
could be represented for most purposes as #'(multi (group x)) or just #'x.
"Pack" means going form the internal Racket-side re... | #lang racket/base
(require syntax/stx
enforest/proc-name
"realm.rkt")
We represent Rhombus syntax objects as a syntax object with one of
Coercions among these happen automatically . So , the Rhombus expression
the Rhombus repesentation , such as when sending syntax to a
Rhombus - implemented... |
fc78b12406fd5bd0d543167964674e90c42c7e98557da606e9abfaacc438bcf6 | smallmelon/sdzmmo | test_client.erl | %%%---------------------------------------------
%%% @Module : test_client
@Author : xyao
%%% @Email :
@Created : 2010.05.11
%%% @Description: 客户端
%%%---------------------------------------------
-module(test_client).
-export([start/0, login/1]).
start() ->
case gen_tcp:connect("localhost", ... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/test/script/test_client.erl | erlang | ---------------------------------------------
@Module : test_client
@Email :
@Description: 客户端
---------------------------------------------
load_scene(Socket),
attack_mon(Socket),
登陆
玩家列表
加载场景
load_scene(Socket) ->
io:format("send:12002~n"),
rec(Socket).
获取对话
人攻击怪
... | @Author : xyao
@Created : 2010.05.11
-module(test_client).
-export([start/0, login/1]).
start() ->
case gen_tcp:connect("localhost", 6666, [binary, {packet, 0}]) of
{ok, Socket1} ->
gen_tcp:send(Socket1, <<"<policy-file-request/>\0">>),
rec(Socket1),
ge... |
11ab54081f4474e4165e7e45f8be8e729d1a0929a7560c96ae642908795d64c4 | SKA-ScienceDataProcessor/RC | Chan.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
-- | Description of distributed program
module Chan where
import Control.Applicative
import Control.Category
import Control.Monad
import Control.Monad.Trans.Except
... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/distributed-dot-product/Chan.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
| Description of distributed program
--------------------------------------------------------------
Chan
--------------------------------------------------------------
PID of running fold process
Full range of indices
Set of running processes
Number of completed ... | # LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
module Chan where
import Control.Applicative
import Control.Category
import Control.Monad
import Control.Monad.Trans.Except
import Control.Distributed.Process
import Control.Distributed.Process.Closure
import Control.Distri... |
e8abff7ba81eb8d8159185e5ab4d4dd3df3649bdc90402982624046f3172d18c | MLstate/opalang | qmlCpsRewriter.mli |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/qmlcps/qmlCpsRewriter.mli | ocaml | *
*
The options of this rewriting pass.
Any corresponding option from qml2ocaml or opaEnv should be passed consistency.
<!> As usual to be more robust to any added option in this interface,
any construction of options should be done with the syntax
{[{ QmlCpsRewriter.default_options with
...
}]... |
Copyright © 2011 - 2013 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
25c498cc058b10591be32958c8b3b33f1d726c16083d6addb5620778fbe37c93 | vlstill/hsExprTest | bimap.2.ok.hs | binmap :: (a -> a -> b) -> [a] -> [b]
binmap f xs = snd $ foldr (\h (mnh, rest) -> (Just h, maybe [] (\nh -> f h nh : rest) mnh)) (Nothing, []) xs
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/bimap.2.ok.hs | haskell | binmap :: (a -> a -> b) -> [a] -> [b]
binmap f xs = snd $ foldr (\h (mnh, rest) -> (Just h, maybe [] (\nh -> f h nh : rest) mnh)) (Nothing, []) xs
| |
7355a540e694417aec90d429b43540ed0eafbd00357abb9861821559b71d6f1f | gedge-platform/gedge-platform | syslog.erl | %%%=============================================================================
Copyright 2011 , Travelping GmbH < >
Copyright 2013 - 2017 , < >
%%%
%%% Permission to use, copy, modify, and/or distribute this software for any
%%% purpose with or without fee is hereby granted, provided that the above
%%% copyri... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/syslog/src/syslog.erl | erlang | =============================================================================
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWA... | Copyright 2011 , Travelping GmbH < >
Copyright 2013 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
send messages dire... |
3b218313486a1a9ab455c00b4c2e2a3e0edadb9d6682268ba05a65b5241516e4 | portkey-cloud/edn-to-cfn | ops_works.clj | (ns portkey.cloudformation.ops-works
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.ops-works/app
[___19567__auto__]
(clojure.spec.alpha/keys
:re... | null | https://raw.githubusercontent.com/portkey-cloud/edn-to-cfn/7a3d247d35b7c4988c9b55634d03a008b87a2449/src/portkey/cloudformation/ops_works.clj | clojure | (ns portkey.cloudformation.ops-works
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.ops-works/app
[___19567__auto__]
(clojure.spec.alpha/keys
:re... | |
8a1ecfdd7f31cb45156dfb19b665a4dfc423f6e8b0159dee6086f7718eecfa07 | chaoxu/fancy-walks | C.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteStri... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202011/Round%202/C.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
im... |
63d1fa3b98a023992f26801fd7822423e9129eee729ae8d458fac1994eded6f7 | opencog/pln | evaluation-to-member.scm | ; =============================================================================
;
; Takes EvaluationLinks and creates a Member Link
;
EvaluationLink
; D
; B
; C
; |-
MemberLink
; B
; SatisfyingSetScopeLink
; X
; EvaluationLink
; D
; X ... | null | https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/opencog/pln/rules/wip/evaluation-to-member.scm | scheme | =============================================================================
Takes EvaluationLinks and creates a Member Link
D
B
C
|-
B
SatisfyingSetScopeLink
X
EvaluationLink
D
X
C
---------------------------------------------... |
EvaluationLink
MemberLink
Temporary Rule for now . EvaluationToMemberRule split into three parts for
three different kinds of rules .
Converts EvaluationLinks which have only one member which is not part of
the
eg:- EvaluationLink
PredicateNode " laughs "
ConceptNode " " ... |
322a2665111bec1addd00ada1948bc7280ad460d82139a51f3d83d3d577b2019 | OCamlPro/ocp-build | ocpPervasives.mli | (**************************************************************************)
(* *)
(* Typerex Libraries *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpPervasives.mli | ocaml | ************************************************************************
Typerex Libraries
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
val decr : int ref -> unit
|
ec14ee830146d9b4c9d623bb111ca091eaccdde24dafa1d51459c72b22689787 | clash-lang/clash-compiler | RomFile.hs | module RomFile where
import Clash.Prelude
import qualified Clash.Explicit.Prelude as Explicit
import Clash.Explicit.Testbench
zeroAt0
:: HiddenClockResetEnable dom
=> Signal dom (Unsigned 8)
-> Signal dom (Unsigned 8)
zeroAt0 a = mux en a 0
where
en = register False (pure True)
topEntity
:: Clock Syste... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Signal/RomFile.hs | haskell | # NOINLINE topEntity # | module RomFile where
import Clash.Prelude
import qualified Clash.Explicit.Prelude as Explicit
import Clash.Explicit.Testbench
zeroAt0
:: HiddenClockResetEnable dom
=> Signal dom (Unsigned 8)
-> Signal dom (Unsigned 8)
zeroAt0 a = mux en a 0
where
en = register False (pure True)
topEntity
:: Clock Syste... |
74f3aa13b26705fe6836cfa04f2b3a0f73fbb4ecec9ad81360122cc93060d2bf | afronski/wolves-and-rabbits-world-simulation | simulation_entity_wolf.erl | -module(simulation_entity_wolf).
-behavior(gen_fsm).
-include("../include/simulation_records.hrl").
-export([ start_link/1, init/1, handle_sync_event/4, terminate/3, handle_event/3, handle_info/3, code_change/4 ]).
-export([ running/2, chasing/2, splitting/2 ]).
start_link(InitialState) ->
gen_fsm:start_link(?MO... | null | https://raw.githubusercontent.com/afronski/wolves-and-rabbits-world-simulation/245cbff5a87f3cae0f4cc7bc422e0a4d139fcecc/src/simulation_entity_wolf.erl | erlang | -module(simulation_entity_wolf).
-behavior(gen_fsm).
-include("../include/simulation_records.hrl").
-export([ start_link/1, init/1, handle_sync_event/4, terminate/3, handle_event/3, handle_info/3, code_change/4 ]).
-export([ running/2, chasing/2, splitting/2 ]).
start_link(InitialState) ->
gen_fsm:start_link(?MO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.