_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 |
|---|---|---|---|---|---|---|---|---|
9da5e0d9371d1fee7fc91d879cc9f2e484d8dbf2053c8f4abc9b454d4c128a8c | stumpwm/stumpwm-contrib | swm-emacs.lisp | ;;;; swm-emacs.lisp
(in-package #:swm-emacs)
(export '(emacs-daemon-start
emacsclient-eval
emacs-daemon-stop
emacs-daemon-kill-force
*emacs-daemon-name*
*emacsclient-last-load-file*
*emacsclient-last-command*))
(defvar *emacs-daemon-name* "stumpwm-emacs")
(... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/swm-emacs/swm-emacs.lisp | lisp | swm-emacs.lisp
Delete last emacsclient-load-file
write emacs lisp sexp to temp file, all symbol names
update *emacsclient-last-load-file*
start emacs daemon.
TODO: Add a macro `define-emacs-command', which can define emacs command like this:
(gnus)
(message "Start gnus successful!!!"))
This macro NEED He... |
(in-package #:swm-emacs)
(export '(emacs-daemon-start
emacsclient-eval
emacs-daemon-stop
emacs-daemon-kill-force
*emacs-daemon-name*
*emacsclient-last-load-file*
*emacsclient-last-command*))
(defvar *emacs-daemon-name* "stumpwm-emacs")
(defvar *emacsclient-... |
029ac63655a49eb451c2b185083a6e698fb57398424efb6ac8f1d62d3f62cd1e | titola/incudine | score.lisp | Incudine version of CLM
Copyright ( c ) 2017
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (at your option) any later version.
;;;
;;; Thi... | null | https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/contrib/cudere-clm/score.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
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... | Incudine version of CLM
Copyright ( c ) 2017
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
(in-package :cudere-clm.sys)
Copied from... |
51150ddc8797ffa9afe420ddf9b8929945f5fca56cbf341259d885ae9d31b59c | input-output-hk/cardano-ledger | MaryEraGen.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
| Export ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/38aa337834ccb9b5f47dbf9e81a3b986dcdd57f5/eras/shelley-ma/test-suite/src/Test/Cardano/Ledger/MaryEraGen.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
---------------------------------------------------------------------------
----------------------------------------------------------------------------}
------------------------------------------------------
... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
| Export the EraGen instance for MaryEra , a... |
828898fd081ef715c70f94f6ca67cb22e7a4b9d661b4ae294c5844c62ca71edf | OCamlPro/socaml-analyzer | pervasives2.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/test/samples/pervasives2.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
external raise : exn -> 'a = "%raise"... |
759096bbc3d355cc0283c75d7016724268706eaf870f93dd8bbea0227faf5881 | robert-strandh/SICL | fixnum.lisp | (cl:in-package #:sicl-hir-to-mir)
(defmethod process-instruction
(client (instruction cleavir-ir:fixnum-less-instruction))
(change-class instruction 'cleavir-ir:signed-less-instruction))
(defmethod process-instruction
(client (instruction cleavir-ir:fixnum-not-greater-instruction))
(change-class instructi... | null | https://raw.githubusercontent.com/robert-strandh/SICL/a0488795d7a8f84a4cc42c3f09ad6a798a3502f1/Code/Compiler/HIR-to-MIR/fixnum.lisp | lisp | (cl:in-package #:sicl-hir-to-mir)
(defmethod process-instruction
(client (instruction cleavir-ir:fixnum-less-instruction))
(change-class instruction 'cleavir-ir:signed-less-instruction))
(defmethod process-instruction
(client (instruction cleavir-ir:fixnum-not-greater-instruction))
(change-class instructi... | |
7688cf57190e2f15fb6645bef36f6cdefe7417c7e513881e2e76f2ca7bcb64ac | CmdrDats/igoki | announce.clj | (ns igoki.sound.announce
(:require
[clojure.string :as str]
[igoki.sgf :as sgf]
[clojure.java.io :as io]
[igoki.sound.sound :as snd])
(:import (java.util.concurrent ThreadPoolExecutor TimeUnit LinkedBlockingQueue)))
Japanese words generated via google translate
;; Enlglish words generated via /
... | null | https://raw.githubusercontent.com/CmdrDats/igoki/21b1515cb7380bcad86d44f076e012c0e31e9c3b/src/igoki/sound/announce.clj | clojure | Enlglish words generated via /
Words..
There shouldn't be black _and_ white moves to announce, else we'll just bombard
And the user should have requested which players to announce, specifically. | (ns igoki.sound.announce
(:require
[clojure.string :as str]
[igoki.sgf :as sgf]
[clojure.java.io :as io]
[igoki.sound.sound :as snd])
(:import (java.util.concurrent ThreadPoolExecutor TimeUnit LinkedBlockingQueue)))
Japanese words generated via google translate
(comment
"
1,2,3,4,5,6,7,8,9,1... |
c72e9dd04701fe05b173acaa62dc3e832c4d574a09e8e6b34b30ec01ae8d5049 | nixeagle/nisp | bot.lisp | (in-package :nisp.i)
(defvar +root-directory+
(asdf:system-relative-pathname (asdf:find-system :nisp.i) "/")
"The root of where the asdf source is at.
We use this for locating data and configuration information for
nisp.i. This may run nto some issues in the future but for the near term
future this solves most is... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/irc-bot/bot.lisp | lisp | }}}
Actually care its the right type.
link completion on those patterns. The spaces in those examples can
be any number of characters.
harder say stuff... not at all best way to do this
END | (in-package :nisp.i)
(defvar +root-directory+
(asdf:system-relative-pathname (asdf:find-system :nisp.i) "/")
"The root of where the asdf source is at.
We use this for locating data and configuration information for
nisp.i. This may run nto some issues in the future but for the near term
future this solves most is... |
a4f4bc6adec3c215fe5ca01189633253a7bbced87b39b72f6f079779ba27231e | facebook/infer | InferAnalyze.mli |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/facebook/infer/3b26f36976d6bf6b4aea849d9a03c73cc96e329c/infer/src/backend/InferAnalyze.mli | ocaml | * Main module for the analysis after the capture phase |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
0028f71a16cc33b63241e2e73cd08ceed31b61891c067655c67c693dfff35986 | ocurrent/ocaml-ci | git_forge_intf.ml | module Client = Ocaml_ci_api.Client
module Run_time = Ocaml_ci_client_lib.Run_time
module Build_status = Build_status
module type Forge_prefix = sig
val prefix : string
end
module type Forge = sig
include Forge_prefix
val request_abbrev : string
val request_prefix : string
val org_url : org:string -> strin... | null | https://raw.githubusercontent.com/ocurrent/ocaml-ci/85a6f26b09386a442744ebe0acd961c1169eb14f/web-ui/view/git_forge_intf.ml | ocaml | module Client = Ocaml_ci_api.Client
module Run_time = Ocaml_ci_client_lib.Run_time
module Build_status = Build_status
module type Forge_prefix = sig
val prefix : string
end
module type Forge = sig
include Forge_prefix
val request_abbrev : string
val request_prefix : string
val org_url : org:string -> strin... | |
cdd81c063421364a178240f89699b249aa1d1da8a02d34cf40fbe4fe71142b26 | viercc/kitchen-sink-hs | Extra.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE MagicHash #
module Data.Set.Extra (symdiff, symdiffSlow) where
import GHC.Exts(reallyUnsafePtrEquality#, isTrue#)
import Data.Set.Internal ( Set(..), splitMember, link, merge )
import Data.Set (union, (\\))
ptrEq :: a -> a -> Bool
ptrEq x y = isTrue# (reallyUnsafePtrEquality# ... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/2919cf37c56dec74a0d74740199d3319e7560a82/experiment/src/Data/Set/Extra.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE MagicHash #
module Data.Set.Extra (symdiff, symdiffSlow) where
import GHC.Exts(reallyUnsafePtrEquality#, isTrue#)
import Data.Set.Internal ( Set(..), splitMember, link, merge )
import Data.Set (union, (\\))
ptrEq :: a -> a -> Bool
ptrEq x y = isTrue# (reallyUnsafePtrEquality# x y)
symdiff :: Ord a => Set ... |
02a8bc5e35dda1d16aec8586440adb75f90ba9c81f2bf6ed2e142ba265bbe85f | jackfirth/lens | zoom.rkt | #lang reprovide
lens/private/compound/zoom
| null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-unstable/unstable/lens/zoom.rkt | racket | #lang reprovide
lens/private/compound/zoom
| |
dddc01d6b7829a74b637fba78c9ee1102677380bac71bcb6390f1c25ceadcffd | noinia/hgeometry | Polygon.hs | # OPTIONS_GHC -fno - warn - orphans #
--------------------------------------------------------------------------------
-- |
Module : Geometry .
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
A Polygon data type and some basic functions to interact with them .
--
-... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/Polygon.hs | haskell | ------------------------------------------------------------------------------
|
License : see the LICENSE file
------------------------------------------------------------------------------
* Types
* Conversion
* Accessors
* Properties
* Queries
* Misc
---------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
Module : Geometry .
Copyright : ( C )
Maintainer :
A Polygon data type and some basic functions to interact with them .
module Geometry.Polygon
PolygonType(..)
, Polygon(..)
, _SimplePolygon, _MultiPolygon
, SimplePolygon, MultiPolygon, SomeP... |
35c9f7244b420e89b7ae17d2da3707651477b39a230e3bdda5d86624e5832d43 | zotonic/cowmachine | cowmachine_accept_language_tests.erl | @author < >
%% @hidden
-module(cowmachine_accept_language_tests).
-include_lib("eunit/include/eunit.hrl").
% Run test module
% $ rebar3 eunit -v -m cowmachine_accept_language_tests
all_cowmachine_accept_language_test_() ->
[{"Check selected languages based on priority", fun cowmachine_accept_language_0/0},... | null | https://raw.githubusercontent.com/zotonic/cowmachine/7c96143c2dc26d36ba620c21b6c891a2fcabdccc/test/cowmachine_accept_language_tests.erl | erlang | @hidden
Run test module
$ rebar3 eunit -v -m cowmachine_accept_language_tests | @author < >
-module(cowmachine_accept_language_tests).
-include_lib("eunit/include/eunit.hrl").
all_cowmachine_accept_language_test_() ->
[{"Check selected languages based on priority", fun cowmachine_accept_language_0/0},
{"Check fallback languages if primary language does not match", fun cowmachine_... |
77af540e8651f98e561c571aa3e6ac6c545cb242e225de8e70bc251f79d4a210 | unisonweb/unison | Alternative.hs | module Unison.Util.Alternative
( whenM,
)
where
import Control.Applicative (Alternative (empty))
whenM :: (Monad m, Alternative m) => m Bool -> a -> m a
whenM m a = do
b <- m
if b then pure a else empty
| null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/lib/unison-prelude/src/Unison/Util/Alternative.hs | haskell | module Unison.Util.Alternative
( whenM,
)
where
import Control.Applicative (Alternative (empty))
whenM :: (Monad m, Alternative m) => m Bool -> a -> m a
whenM m a = do
b <- m
if b then pure a else empty
| |
0a3ad46a7040adafa7b917762c1ecb9ee9d6a339574897980caa405510ace283 | mfelleisen/Fish | configure.rkt | #lang racket
(provide
{ [ ] - > [ ImmutableHash ' port ' players ] }
configure-server
creates a configuration table for both the xserver and xtest
;; the defaults are specified below as `tournament-defaults`
the user can override them with commandline arguments a JSON config file
{ [ ] - > ( values [ ... | null | https://raw.githubusercontent.com/mfelleisen/Fish/06308dce24b282c63f06c49e83dee37e66d102bd/Scripts/Private/configure.rkt | racket | the defaults are specified below as `tournament-defaults`
creates a list of players, their names, and a function that maps players to an initial game state
the defaults are specified below as `game-defaults`
---------------------------------------------------------------------------------------------------
... | #lang racket
(provide
{ [ ] - > [ ImmutableHash ' port ' players ] }
configure-server
creates a configuration table for both the xserver and xtest
the user can override them with commandline arguments a JSON config file
{ [ ] - > ( values [ Listof Player ] [ ] [ [ Listof Player ] - > State ] ) }
th... |
cccdf6648593c5e6a5a4e7e353025feaa7315ded7676d96528f23c51688391f3 | jorams/birch | commands.lisp | (defpackage :birch.test/commands
(:use :cl :birch/commands :birch.test/util :prove)
(:import-from :birch/connection
#:make-channel
#:make-user
#:activep))
(in-package :birch.test/commands)
(diag "Command tests")
(plan 12)
(define-message-test "/raw" (connection)
(... | null | https://raw.githubusercontent.com/jorams/birch/50f1313cabb89c1ec2f275cdc4fb10bd145fdd9d/test/commands.lisp | lisp | (defpackage :birch.test/commands
(:use :cl :birch/commands :birch.test/util :prove)
(:import-from :birch/connection
#:make-channel
#:make-user
#:activep))
(in-package :birch.test/commands)
(diag "Command tests")
(plan 12)
(define-message-test "/raw" (connection)
(... | |
b634c81ee59ee4cba570a361b5b2033922256d8573fc441df33dd7ccd60bbc08 | erlangonrails/devdb | kai_version.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the License . You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/kai-0.4.0/src/kai_version.erl | erlang | the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
TODO: raise error if length > 15(=2#1111) | 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
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(kai_version).
-behaviour(gen_server).
-export([start_link/0, sto... |
2c9c011b4b31856d20cc30c3f900eb5324104efd23565bad17146fe0ceec24f0 | backtracking/ocamlgraph | eulerian.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/d442d5f16b081541368e50e85518b30baa3caa1c/src/eulerian.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
* Euleria... |
2fd65fd4c3ae65525c09dd51bbb9d1615bb7f4c1c74e07d170421d6f26efe42d | fsestini/zsyntax | Interface.hs | # LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveFunctor #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE KindSignatures #
# LA... | null | https://raw.githubusercontent.com/fsestini/zsyntax/761a4e42b05cd77bfcd6160165562baf20ca4697/src/Zsyntax/Labelled/Rule/Interface.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE GADTs #
------------------------------------------------------------------------------
Neutral sequents
-- | Type of unrestricted contexts. Unrestricted contexts are made out of
-- elements of some type of axiomatic formulas.
-- | Type of linear contex... | # LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveFunctor #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ExistentialQuantification #
# LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE DataKinds #
# LANGUAGE Undecida... |
0cf745d1e21318e2fff11f75aa1c60610e0d8c3b76c4729a7dd465b9e8f02c1c | ekmett/monoids | Group.hs | ----------------------------------------------------------------------------
-- |
-- Module : Data.Group
Copyright : 2007 - 2009
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Extends 'Monoid' to support 'Group' operations
-------------------------... | null | https://raw.githubusercontent.com/ekmett/monoids/711963df750ba3417f464fbc0c6c726f3a0c9c8c/Data/Group.hs | haskell | --------------------------------------------------------------------------
|
Module : Data.Group
License : BSD
Stability : experimental
Portability : portable
Extends 'Monoid' to support 'Group' operations
---------------------------------------------------------------------------
| Minimal complete d... | Copyright : 2007 - 2009
Maintainer : < >
module Data.Group
( Group
, gnegate
, gsubtract
, minus
, MultiplicativeGroup
, over
, under
, grecip
) where
import Data.Monoid (Monoid, Sum(..), Product(..), Dual(..))
import Data.Monoid.Additive (plus, zero)
import Data.Mono... |
974865a3c30b772cd7a0a8d353dcf1489e7bff20989d401e340c2220b36b6e91 | xsc/kithara | batching_consumer.clj | (ns kithara.components.batching-consumer
(:require [kithara.components.base-consumer :as base]
[kithara.protocols :as p]
[manifold.deferred :as d]
[peripheral.core :refer [defcomponent]]
[clojure.tools.logging :as log])
(:import [java.util ArrayList]
[java.... | null | https://raw.githubusercontent.com/xsc/kithara/3394a9e9ef5e6e605637a74e070c7d24bfaf19cc/src/kithara/components/batching_consumer.clj | clojure | ## Per-Message Tasks
## Periodic Draining
## Consumer | (ns kithara.components.batching-consumer
(:require [kithara.components.base-consumer :as base]
[kithara.protocols :as p]
[manifold.deferred :as d]
[peripheral.core :refer [defcomponent]]
[clojure.tools.logging :as log])
(:import [java.util ArrayList]
[java.... |
02f26832dbb6a982b38ba4e06c3f351bdc330dc6b41d6b771f96aa8827612531 | emqx/esockd | esockd_listener_sup.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/esockd/6b8ec033bf50c21893e48428e002a05fa3994417/src/esockd_listener_sup.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 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(esockd_listener_sup).
-behaviour(supervisor).
-include("esockd.hrl").
-export([ start_link/5... |
2ffafdfa685e3923b42eb37ff2e8fbc52cefa29d00aa0119ddd4f914550ccad6 | SnootyMonkey/Falkland-CMS | collection.clj | (ns fcms.resources.collection
"
A collection is a container for all the items that you'd like to be organized and searched together.
A collection may have none, one or many taxonomies and they are independent of each other.
"
(:require [clojure.set :refer (intersection)]
[clojure.string :refer (b... | null | https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/src/fcms/resources/collection.clj | clojure | recur with the next possible slug
get all the id and rev of all the items in this collection
create a bulk update request to delete all the items and the collection | (ns fcms.resources.collection
"
A collection is a container for all the items that you'd like to be organized and searched together.
A collection may have none, one or many taxonomies and they are independent of each other.
"
(:require [clojure.set :refer (intersection)]
[clojure.string :refer (b... |
8ec85270607f06aae37123e31d9f41f15d6cc72646109a7c4c60d6fd50c73a00 | ninenines/cowboy | loop_handler_body_h.erl | %% This module implements a loop handler that reads
%% the request body after sending itself a message,
checks that its size is exactly 100000 bytes ,
then sends a 200 reply back .
-module(loop_handler_body_h).
-export([init/2]).
-export([info/3]).
-export([terminate/3]).
init(Req, _) ->
self() ! timeout,
{cow... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/loop_handler_body_h.erl | erlang | This module implements a loop handler that reads
the request body after sending itself a message, | checks that its size is exactly 100000 bytes ,
then sends a 200 reply back .
-module(loop_handler_body_h).
-export([init/2]).
-export([info/3]).
-export([terminate/3]).
init(Req, _) ->
self() ! timeout,
{cowboy_loop, Req, undefined, hibernate}.
info(timeout, Req0, State) ->
{ok, Body, Req} = cowboy_req:read_... |
67c5298cf4241e97f2e1dcea0595b8467ba3d41e7d191e83851609b318f0da6b | andrewMacmurray/haskell-book-solutions | safeOps.hs | module SafeOps where
safeTail :: [a] -> Maybe [a]
safeTail [] = Nothing
safeTail (x:[]) = Nothing
safeTail (x:xs) = Just xs
safeHead :: [a] -> Maybe a
safeHead [] = Nothing
safeHead (x:_) = Just x
| null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch9/safeOps.hs | haskell | module SafeOps where
safeTail :: [a] -> Maybe [a]
safeTail [] = Nothing
safeTail (x:[]) = Nothing
safeTail (x:xs) = Just xs
safeHead :: [a] -> Maybe a
safeHead [] = Nothing
safeHead (x:_) = Just x
| |
13350babab2e175106f9c0b1079ecd969e89a4c98945ca75f3210527ca500ab0 | vikram/lisplibraries | pagination.lisp |
(in-package :weblocks)
(export '(*pagination-items-per-page* pagination
pagination-items-per-page pagination-total-items
pagination-show-total-items-p pagination-current-page
pagination-on-change pagination-on-error pagination-page-count
pagination-render-total-item-count pagination-page-item-range))
(de... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/widgets/pagination.lisp | lisp | 'Previous' link
'Viewing Page X of Y'
Go to page
Total items |
(in-package :weblocks)
(export '(*pagination-items-per-page* pagination
pagination-items-per-page pagination-total-items
pagination-show-total-items-p pagination-current-page
pagination-on-change pagination-on-error pagination-page-count
pagination-render-total-item-count pagination-page-item-range))
(de... |
6b108b73ad85787f1aef83433fd26a6e40c7b7a65f29243d8e7f92b44b2fabe4 | alphagov/blinken | routes.clj | (ns govuk.blinken.routes
(:require [compojure.core :refer :all]
[compojure.route :as route]
[govuk.blinken.dashboard :as dashboard]
[govuk.blinken.service :as service]))
(defn- get-environment-status [group-key key environment services-status]
(assoc (services-status (str group... | null | https://raw.githubusercontent.com/alphagov/blinken/9624cc58b4345efe5f37fc9f6fb8c976ee3f7347/src/govuk/blinken/routes.clj | clojure | (ns govuk.blinken.routes
(:require [compojure.core :refer :all]
[compojure.route :as route]
[govuk.blinken.dashboard :as dashboard]
[govuk.blinken.service :as service]))
(defn- get-environment-status [group-key key environment services-status]
(assoc (services-status (str group... | |
d53cca717117f0eab30bccced45792e776c8bdec3221c8b5d93a993bd0b9fe41 | Dasudian/DSDIN | dsdct_call.erl |
-module(dsdct_call).
%% API
-export([ deserialize/1
, id/1
, id/3
, new/4
, contract_address/1
, caller_address/1
, caller_nonce/1
, height/1
, return_type/1
, return_value/1
, gas_used/1
, serialize/1
, serialize_for_clie... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcontract/src/dsdct_call.erl | erlang | API
===================================================================
Types
===================================================================
===================================================================
API
===================================================================
These are filled later
=======... |
-module(dsdct_call).
-export([ deserialize/1
, id/1
, id/3
, new/4
, contract_address/1
, caller_address/1
, caller_nonce/1
, height/1
, return_type/1
, return_value/1
, gas_used/1
, serialize/1
, serialize_for_client/1
... |
96ef29cc5d6bf53f6d3f3143f6eeab0e3dd08892be984d4255dd3b0f51280d5e | spurious/sagittarius-scheme-mirror | eval.sps | #!r6rs
(import (tests r6rs eval)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs eval)\n")
(run-eval-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/r6rs-test-suite/tests/r6rs/run/eval.sps | scheme | #!r6rs
(import (tests r6rs eval)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs eval)\n")
(run-eval-tests)
(report-test-results)
| |
1baffa82120b5ffe91b33d81279f97c39edfe1d5f4a84a1cc754d02a543ac614 | ocaml/ocaml | ephemeron.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/eaa2cb358f559fa848e4d05cdab08e908645ade1/stdlib/ephemeron.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module type SeededS = sig
type key
type !'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
... |
73ae0bd55aeadc96264ef0f27cf110b502a112ae1d061813cae616c83dd64007 | gusenov/stepik-functional-programming-hs | TwoDigits2Int.hs | import Data.Char
twoDigits2Int :: Char -> Char -> Int
twoDigits2Int x y = if isDigit x && isDigit y then digitToInt x * 10 + digitToInt y else 100 | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/TwoDigits2Int/TwoDigits2Int.hs | haskell | import Data.Char
twoDigits2Int :: Char -> Char -> Int
twoDigits2Int x y = if isDigit x && isDigit y then digitToInt x * 10 + digitToInt y else 100 | |
b15bf515f4535a1c7af28add212468b8f7b10349a906566860a8b240cfe0b54c | russ/openpoker | schema.erl | Copyright ( C ) 2005 - 2008 Wager Labs , SA
%%%%
%%%% THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
%%%% PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
%%%% THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICE... | null | https://raw.githubusercontent.com/russ/openpoker/62edd72a35b9ef52f55da9303cf1e06142e95895/src/schema.erl | erlang |
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT
LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT
AND AGREE TO BE BOUND BY THE TERM... | Copyright ( C ) 2005 - 2008 Wager Labs , SA
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
-nc-sa/3.0/us/
-module(schema).
-export([install/1, install/0, populate/0]).
-include("schema.hrl").
-include("common.hrl").
-include("pp.hrl").
install() ->
install([node()]).
install(No... |
7bb4bfbc6515e9e22c19aeeb153cc099a9073419fb082be877627d6bcfe81e75 | ryanpbrewster/haskell | Structures.hs | module Rosalind.Structures
where
import Control.Exception (assert)
import qualified Data.Map as M
data FASTA = FASTA { getID :: ID
, getSequence :: BioSequence
} deriving (Show, Eq, Ord)
data ID = ID String deriving (Show, Eq, Ord)
showID (ID id) = id
data BioSequence = Nucleot... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/Rosalind/Structures.hs | haskell | module Rosalind.Structures
where
import Control.Exception (assert)
import qualified Data.Map as M
data FASTA = FASTA { getID :: ID
, getSequence :: BioSequence
} deriving (Show, Eq, Ord)
data ID = ID String deriving (Show, Eq, Ord)
showID (ID id) = id
data BioSequence = Nucleot... | |
cd3bcda5c309a12e3856ad176ec429a6f7e13b0bb98b10052dd7aa07be53a0ce | ryanpbrewster/haskell | P062Test.hs | module Problems.P062Test
( test_062
) where
import Problems.P062
import Test.Tasty.Discover
test_062 :: [TestTree]
test_062 =
[ testCase "main" $ solve @?= "127035954683"
, testCase "big" $ solveProblem 8 @?= 12620043581768
]
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P062Test.hs | haskell | module Problems.P062Test
( test_062
) where
import Problems.P062
import Test.Tasty.Discover
test_062 :: [TestTree]
test_062 =
[ testCase "main" $ solve @?= "127035954683"
, testCase "big" $ solveProblem 8 @?= 12620043581768
]
| |
000a57bda440328e8f2f5bcb829b96480ffc95ecd16425c981beaadd37773f78 | Gertjan423/KHC | HsRenamer.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module Frontend.HsRenamer (RnEnv(..), hsRename) where
import Frontend.HsTypes
import Backend.FcTypes
import Utils.Unique
import Utils.Var
import Utils.Kind
import Utils.AssocList
import Utils.Ctx
import Utils.PrettyPrint
import Utils.Utils
impo... | null | https://raw.githubusercontent.com/Gertjan423/KHC/07d00ebaab5245f632eff8ae7930711a44259192/Frontend/HsRenamer.hs | haskell | # LANGUAGE TypeSynonymInstances #
* Renaming monad
------------------------------------------------------------------------------
| The renaming context maps parsed term and type variables to renamed term
and type variables, respectively.
* Basic Monadic Setters and Getters
---------------------------------------... | # LANGUAGE FlexibleInstances #
module Frontend.HsRenamer (RnEnv(..), hsRename) where
import Frontend.HsTypes
import Backend.FcTypes
import Utils.Unique
import Utils.Var
import Utils.Kind
import Utils.AssocList
import Utils.Ctx
import Utils.PrettyPrint
import Utils.Utils
import Utils.Annotated
import Utils.FreeVa... |
82860c22721cab267eefdd4e13b4a051bcc8c4a774c7337a19b66b4299de1cc7 | poscat0x04/telegram-types | EditMessageLiveLocation.hs | module Web.Telegram.Types.Internal.API.EditMessageLiveLocation where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ReplyMarkup
data EditMessageLiveLocation = EditMessageLiveLocation
{ chatId :: Maybe ChatId,
messageId :: Maybe Int,
inlineMessageId :: Maybe Te... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/EditMessageLiveLocation.hs | haskell | module Web.Telegram.Types.Internal.API.EditMessageLiveLocation where
import Common
import Web.Telegram.Types.Internal.API.ChatId
import Web.Telegram.Types.Internal.ReplyMarkup
data EditMessageLiveLocation = EditMessageLiveLocation
{ chatId :: Maybe ChatId,
messageId :: Maybe Int,
inlineMessageId :: Maybe Te... | |
56f2b7969509cfecf54a6becec7da41a450728e80080f4066d7d07644c6ba936 | input-output-hk/cardano-ledger | Rules.hs | module Cardano.Ledger.Shelley.Rules (
module Cardano.Ledger.Shelley.Rules.Bbody,
module Cardano.Ledger.Shelley.Rules.Deleg,
module Cardano.Ledger.Shelley.Rules.Delegs,
module Cardano.Ledger.Shelley.Rules.Delpl,
module Cardano.Ledger.Shelley.Rules.Epoch,
module Cardano.Ledger.Shelley.Rules.Ledger,
module C... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules.hs | haskell | module Cardano.Ledger.Shelley.Rules (
module Cardano.Ledger.Shelley.Rules.Bbody,
module Cardano.Ledger.Shelley.Rules.Deleg,
module Cardano.Ledger.Shelley.Rules.Delegs,
module Cardano.Ledger.Shelley.Rules.Delpl,
module Cardano.Ledger.Shelley.Rules.Epoch,
module Cardano.Ledger.Shelley.Rules.Ledger,
module C... | |
a937ac85feb0f86c1b1012b42c48a9597e72df8aaba5cfbc537ddf2cee00289c | projectodd/proddbot | jenkins_builds.clj | (ns proddbot.jenkins-builds
(:require [cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.walk :refer [keywordize-keys]]
[immutant.web :as web]
[ring.middleware.params :refer [wrap-params]]
[taoensso.timbre :as log... | null | https://raw.githubusercontent.com/projectodd/proddbot/e93e97708bb2a2fc2158dcdeb621cab3981ee649/src/proddbot/jenkins_builds.clj | clojure | "origin/pr/191/merge" | (ns proddbot.jenkins-builds
(:require [cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.walk :refer [keywordize-keys]]
[immutant.web :as web]
[ring.middleware.params :refer [wrap-params]]
[taoensso.timbre :as log... |
25eaf75283808accfae956332dbf88e277c007e1a7de0408b55ab7a07ec689e9 | cl-axon/shop2 | protections.lisp | -*- Mode : common - lisp ; package : shop2 ; -*-
;;;---------------------------------------------------------------------------
;;; File Description:
;;;
;;; This file contains functions for manipulating protections.
;;; These have been pulled out of the main SHOP code to make it
;;; easier to modify them.
... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/planning-engine/protections.lisp | lisp | package : shop2 ; -*-
---------------------------------------------------------------------------
File Description:
This file contains functions for manipulating protections.
These have been pulled out of the main SHOP code to make it
easier to modify them.
History/Bugs/Notes:
-----------------------... |
[ 2008/02/13 : rpg ] Created .
Version : MPL 1.1 / GPL 2.0 / LGPL 2.1
The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SHOP2 .
The Initial Developer of the Original Code is the University of
... |
1a542697e9d5a701d1a4b3a13726223a3f801ae214e1da7d0cf5488e0108e34a | comby-tools/comby | evaluate.ml | open Core_kernel
open Match
open Rewriter
open Ast
module Configuration = Matchers.Configuration
type t = Ast.t
type result = bool * environment option
type options = Options.t
let options = Options.of_rule
let sat = fst
let result_env = snd
let match_configuration_of_syntax template =
(* decide match confi... | null | https://raw.githubusercontent.com/comby-tools/comby/432f416866720dcd7ef7c4f418e50b4161cd357d/lib/kernel/language/evaluate.ml | ocaml | decide match configuration based on whether there are holes
merge environments. overwrite behavior is undefined
FIXME(RVT) assumes only contextual rewrite for now.
substitute for variables that are in the outside scope | open Core_kernel
open Match
open Rewriter
open Ast
module Configuration = Matchers.Configuration
type t = Ast.t
type result = bool * environment option
type options = Options.t
let options = Options.of_rule
let sat = fst
let result_env = snd
let match_configuration_of_syntax template =
let antecedent_contai... |
13ccf93289e1c3554668a5003cab8dcef802a525a39b55ba729f37a84c71a31c | nomnom-insights/nomnom.duckula | server.clj | (ns duckula.test.server
"Test HTTP server"
(:require
[com.stuartsierra.component :as component]
[duckula.component.basic-monitoring :as monitoring]
[duckula.handler]
[duckula.middleware]
[duckula.swagger]
[duckula.test.component.http-server :as http-server]
[duckula.test.handler.echo :as handle... | null | https://raw.githubusercontent.com/nomnom-insights/nomnom.duckula/a6c8ee965da5717c5909bfbda5745be7a287d2ce/dev-resources/duckula/test/server.clj | clojure | report validation errors but don't fail requests
no validation | (ns duckula.test.server
"Test HTTP server"
(:require
[com.stuartsierra.component :as component]
[duckula.component.basic-monitoring :as monitoring]
[duckula.handler]
[duckula.middleware]
[duckula.swagger]
[duckula.test.component.http-server :as http-server]
[duckula.test.handler.echo :as handle... |
d7f4dac05d70784aa5c6a9e95eab37c9341a4d2dac09d2f831b78c1e52f5a374 | muesli4/table-layout | Util.hs | module Text.Layout.Table.Spec.Util where
-- | An alias for lists, conceptually for values with a horizontal arrangement.
type Row a = [a]
-- | An alias for lists, conceptually for values with a vertical arrangement.
type Col a = [a]
| null | https://raw.githubusercontent.com/muesli4/table-layout/294053c2f63bc835b6426e4965719db179f30a6f/src/Text/Layout/Table/Spec/Util.hs | haskell | | An alias for lists, conceptually for values with a horizontal arrangement.
| An alias for lists, conceptually for values with a vertical arrangement. | module Text.Layout.Table.Spec.Util where
type Row a = [a]
type Col a = [a]
|
87fab6248c538d4cc25631da3344144e033e8a3448e81454a0b1bdd066017244 | geophf/1HaskellADay | Solution.hs | # LANGUAGE QuasiQuotes #
module Y2018.M02.D05.Solution where
-
So , our log - type assumes that the time of insertion is the record of when the
log was made . Okay . But what happens if the log entry occurs seconds or longer
after the event because of external factors , such as a computation in
exponential ti... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M02/D05/Solution.hs | haskell | }
hint: see below. I put the time-field at the head of the insert columns
takes a log entry and puts the current timestamp on it
sayIO may be an useful function to define as well:
... as it 'automatically' timestamps a logentry for you as it puts it in
the log.
moving to Store.SQL.Util.Logging:
hint: you may wis... | # LANGUAGE QuasiQuotes #
module Y2018.M02.D05.Solution where
-
So , our log - type assumes that the time of insertion is the record of when the
log was made . Okay . But what happens if the log entry occurs seconds or longer
after the event because of external factors , such as a computation in
exponential ti... |
e418b79f217de201d672e064df6de4a7620581092c0b32ec36ba1765ac6835dc | triffon/fp-2019-20 | 17--derive.rkt | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 17
Напишете функция ` ( derive f dx ) ` която връща
(define (derive f dx)
(lambda (x)
(/ (- (f (+ x dx)) (f x))
dx)))
(define (sq x) (* x x))
(run-tests (test-suite "derive tests"
(check-= ((derive sq 0.0001) 2)
... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/03--higher-order-functions--accumulate/solutions/17--derive.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
# # # Задача 17
Напишете функция ` ( derive f dx ) ` която връща
(define (derive f dx)
(lambda (x)
(/ (- (f (+ x dx)) (f x))
dx)))
(define (sq x) (* x x))
(run-tests (test-suite "derive tests"
(check-= ((derive sq 0.0001) 2)
... | |
6b93831868626c06d40d99c580b879bbac6e5adb6146ed186666986f6bcd633d | unclebob/spacewar | geometry_test.clj | (ns spacewar.geometry-test
(:require [midje.sweet :refer [facts fact => roughly =not=>]]
[spacewar.geometry :refer [distance
inside-circle
angle-degrees
->degrees
... | null | https://raw.githubusercontent.com/unclebob/spacewar/71c3195b050c4fdb7e643f53556ab580d70f27ba/test/spacewar/geometry_test.clj | clojure | (ns spacewar.geometry-test
(:require [midje.sweet :refer [facts fact => roughly =not=>]]
[spacewar.geometry :refer [distance
inside-circle
angle-degrees
->degrees
... | |
4baf5fea09fa17e957756ac1652ac86bd443687bc91aa426d4acedb7e836b5ef | awkay/fulcro-with-reframe | user.clj | (ns user
(:require
[clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]]
[mount.core :as mount]
;; this is the top-level dependent component...mount will find the rest via ns requires
[app.server-components.http-server :refer [http-server]]))
;; ==================== SERVER ===========... | null | https://raw.githubusercontent.com/awkay/fulcro-with-reframe/6db83fe496654b21865c75465343d056786ffc03/src/dev/user.clj | clojure | this is the top-level dependent component...mount will find the rest via ns requires
==================== SERVER ==================== | (ns user
(:require
[clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs]]
[mount.core :as mount]
[app.server-components.http-server :refer [http-server]]))
(set-refresh-dirs "src/main" "src/dev")
(defn start
"Start the web server"
[] (mount/start))
(defn stop
"Stop the web server"
... |
5208a0acd0b335f5d03d703e27b970af0cbc6d584b27cfc51db5b56238c9957a | msantos/pkt | pkt_tcp.erl | Copyright ( c ) 2009 - 2015 , < >
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
%%
%% Redistributions of source code must retain the above copyright
%% notice, this list of condition... | null | https://raw.githubusercontent.com/msantos/pkt/8c826b25098b06db8c24805fb1da2d65c14abe06/src/pkt_tcp.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in bi... | Copyright ( c ) 2009 - 2015 , < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
LOSS OF U... |
5e048b9ed349955dbf1f0d97d20892c523cb4f09ea6e62e7ac48b118ce85941a | felipeZ/Haskell-abinitio | Logger.hs |
|
Module : Science . QuantumChemistry . ConcurrencyTools . Logger where
Description : Restricted Hartree - Fock Method
Copyright : tape
@2012,2015 Felipe Zapata core SCF machinery
to log events Taking as model the logger Implementation of
in " Parallel and Concurrent Progra... | null | https://raw.githubusercontent.com/felipeZ/Haskell-abinitio/c019bc37c8de78affddf97eb858c1ef18af76d83/Science/QuantumChemistry/ConcurrencyTools/Logger.hs | haskell | ==========> <==========
===========> <========= |
|
Module : Science . QuantumChemistry . ConcurrencyTools . Logger where
Description : Restricted Hartree - Fock Method
Copyright : tape
@2012,2015 Felipe Zapata core SCF machinery
to log events Taking as model the logger Implementation of
in " Parallel and Concurrent Progra... |
4052452e448f275390e1a5a2882bb94e3147a5f90f42cccbd5313085997db57e | xxyzz/SICP | Exercise_5_8.rkt | #lang racket/base
` assoc`(in ` lookup - label ` ) returns the first matching element
labels of the dumb machine , the first ` here ` is used
;; ((controller
{ ( goto ( label here ) ) }
{ ( assign a ( const 3 ) ) }
{ ( goto ( label there ) ) }
{ ( assign a ( const 4 ) ) }
{ ( goto ( label there... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/5_Computing_with_Register_Machines/5.2_A_Register-Machine_Simulator/Exercise_5_8.rkt | racket | ((controller
(start
(here
(here
(there))
test
'done | #lang racket/base
` assoc`(in ` lookup - label ` ) returns the first matching element
labels of the dumb machine , the first ` here ` is used
{ ( goto ( label here ) ) }
{ ( assign a ( const 3 ) ) }
{ ( goto ( label there ) ) }
{ ( assign a ( const 4 ) ) }
{ ( goto ( label there ) ) } )
{ ... |
2e8c45f4576e953f00f2a7baaa3dddf3578f3ba89dc88733643fcc821ad9134d | cs136/seashell | compiler.rkt | #lang typed/racket
Seashell 's Clang interface .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
;;
;; 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 ,... | null | https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell/compiler/compiler.rkt | racket |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
See also 'ADDITIONAL TERMS' at the end of the included LICENSE file.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | #lang typed/racket
Seashell 's Clang interface .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
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
(re... |
6dfd05b151d9e058d02061a018a42612576e171b7eaa1ef3594a9d55c277b21e | Decentralized-Pictures/T4L3NT | ledgerwallet_tezos.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/vendors/ocaml-ledger-wallet/src/ledgerwallet_tezos.ml | ocaml | [ chain-id | main-hwm | test-hwm | derivations-path ]
derivations-path = [ length | paths ] | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... |
5ddb7551ef36bc4e6bf861c4e563dc420c2d9831096c9f8682a9a2165b628fd9 | den1k/vimsical | service.clj | (ns vimsical.backend.components.service
(:require
[io.pedestal.http :as http]
[io.pedestal.http.cors :as cors]
[io.pedestal.http.ring-middlewares :as middlewares]
[io.pedestal.http.route :as route]
[vimsical.backend.components.server.interceptors.errors :as interceptors.errors]
[vimsical.backend.com... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/backend/vimsical/backend/components/service.clj | clojure |
* Routes
* Interceptors
* Service map
| (ns vimsical.backend.components.service
(:require
[io.pedestal.http :as http]
[io.pedestal.http.cors :as cors]
[io.pedestal.http.ring-middlewares :as middlewares]
[io.pedestal.http.route :as route]
[vimsical.backend.components.server.interceptors.errors :as interceptors.errors]
[vimsical.backend.com... |
11c07b5aa6472339dbbdf2ae83e6722d58a0eae1b67581e5cda492da046b281f | 2600hz-archive/whistle | j5_dth_blacklist.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
Query DTH whapps for their blacklist
%%% @end
Created : 30 Aug 2011 by < >
%%%-------------------------------------------------------------------
-module(j5_dth_blacklist).
-behaviour(gen_li... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/jonny5/src/j5_dth_blacklist.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
{AccountID, Reason}
===================================================================
API
===================================================... | @author < >
( C ) 2011 , VoIP INC
Query DTH whapps for their blacklist
Created : 30 Aug 2011 by < >
-module(j5_dth_blacklist).
-behaviour(gen_listener).
-export([start_link/0, is_blacklisted/2, handle_req/2, stop/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, handle_event/2
,term... |
32c0fed65911c0a2f207f0e428aa4e40af9c6226987a33b781cb9498c5c9154b | ejconlon/blanks | ScopeW.hs | # LANGUAGE UndecidableInstances #
-- | Internals.
module Blanks.Internal.ScopeW
( ScopeWC
, ScopeW (..)
, scopeWFree
, scopeWAbstract
, scopeWEmbed
, scopeWBindFree
, scopeWBindFree1
, scopeWFillBound
, scopeWFillBound1
, scopeWUnBindFree
, scopeWUnBindFree1
, scopeWApply
, scopeWApply1
, s... | null | https://raw.githubusercontent.com/ejconlon/blanks/d54b18e9ea1f4873c3a248c2462a057cc4e05432/src/Blanks/Internal/ScopeW.hs | haskell | | Internals.
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
* ScopeW, patterns, and instances
| The core internal scope type. (The "w" comes from "wrapper".)
* Smart constructors, shift, and bind
* Abstraction and instantiation
sub in info with original or shifted vars
* Annotation functions | # LANGUAGE UndecidableInstances #
module Blanks.Internal.ScopeW
( ScopeWC
, ScopeW (..)
, scopeWFree
, scopeWAbstract
, scopeWEmbed
, scopeWBindFree
, scopeWBindFree1
, scopeWFillBound
, scopeWFillBound1
, scopeWUnBindFree
, scopeWUnBindFree1
, scopeWApply
, scopeWApply1
, scopeWBind
, sc... |
6406dbc777ebec3a69146ea1be959f4ba3d81d0c85bf6e6e84c0adb4b29d8b39 | sudo-rushil/lambda | Syntax.hs | |
Module : Lambda . Syntax
Description : AST definitions for the untyped λ - calculus
License : MIT
Maintainer :
Module : Lambda.Syntax
Description : AST definitions for the untyped λ-calculus
License : MIT
Maintainer : Rushil Mallarapu
-}
{-# LANGUAGE GADTs #-}
module Lambda.Syn... | null | https://raw.githubusercontent.com/sudo-rushil/lambda/70474f5053540a693be2f317062074417a687ff7/src/Lambda/Syntax.hs | haskell | # LANGUAGE GADTs #
AST Types
Instances | |
Module : Lambda . Syntax
Description : AST definitions for the untyped λ - calculus
License : MIT
Maintainer :
Module : Lambda.Syntax
Description : AST definitions for the untyped λ-calculus
License : MIT
Maintainer : Rushil Mallarapu
-}
module Lambda.Syntax
( Expr(..)
... |
e8f41a4c9a95b42093dc076832e308d1fe14ce33cc5493f640145929ce60a48c | satos---jp/mincaml_self_hosting | lambda_lift.ml | open Knorm
open Syntax
open Debug
open Type
open Type_checker
open Elim_unused
open Alpha
open Genint
type name = string * (ty * debug_data)
let gencname () = Printf.sprintf "@lift_%d" (genint ())
(* ast中のenvにない変数がfvである *)
let rec get_fvs ast (env : string list) =
let filter vs = List.filter (fun (x,_) -> not (Lis... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/compiler/lambda_lift.ml | ocaml | ast中のenvにない変数がfvである
今回は、λリフティングしたやつをゆるやかにグローバルに入れる。
先にe1を変換してからでないと、
let f x =
... in
let g x =
f x in
...
的な時に、fがliftされる場合、g内でfのlift後の名前を呼び出すことになるので、それが必要になってくる。
出せそうなら、出す。
自分自身が再帰的に、部分適用的に呼ばれている場合のみ、外に持ち上げられない
いまのところは、保守的に、再帰があればやめておく。(ちゃんとするにはte1を二度とる必要があるはず)
持ち上げ後の名前
持ち上げ後の型 | open Knorm
open Syntax
open Debug
open Type
open Type_checker
open Elim_unused
open Alpha
open Genint
type name = string * (ty * debug_data)
let gencname () = Printf.sprintf "@lift_%d" (genint ())
let rec get_fvs ast (env : string list) =
let filter vs = List.filter (fun (x,_) -> not (List.mem x env)) vs in
match... |
e384da233f0eee87ad0ab10d336314206fe1864fd2b5e633cf9a4dced7b0e236 | xapi-project/xen-api | gpumon_cli.ml | Gpumon CLI
module Cmds = Gpumon_interface.RPC_API (Cmdlinergen.Gen ())
let doc =
String.concat ""
[
"A CLI for the GPU monitoring API. This allows scripting of the "
; "gpumon daemon for testing and debugging. This tool is not intended "
; "to be used as an end user tool"
]
let cmdline_gen ... | null | https://raw.githubusercontent.com/xapi-project/xen-api/8d17b53bc236e23aa1ec455137773f7367665d83/ocaml/xapi-idl/gpumon/gpumon_cli.ml | ocaml | Gpumon CLI
module Cmds = Gpumon_interface.RPC_API (Cmdlinergen.Gen ())
let doc =
String.concat ""
[
"A CLI for the GPU monitoring API. This allows scripting of the "
; "gpumon daemon for testing and debugging. This tool is not intended "
; "to be used as an end user tool"
]
let cmdline_gen ... | |
0622ad9f01ac90812b0dc41c5aa40bcde6e4f56b0e5fc2d1b7786e237d601425 | buntine/Simply-Scheme-Exercises | 5-13.scm | ; A) What does ’’banana stand for?
B ) What is ( first ’’ banana ) and why ?
; A) It will exaluate to itself, which is 'banana.
''banana
; B) It will evalutate to a quote.
(first ''banana)
| null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/05-words-and-sentences/5-13.scm | scheme | A) What does ’’banana stand for?
A) It will exaluate to itself, which is 'banana.
B) It will evalutate to a quote. | B ) What is ( first ’’ banana ) and why ?
''banana
(first ''banana)
|
976ab350139d804255355f199a9135f8e9a8223ce3ece2d0382b608fe460068d | well-typed/visualize-cbn | head-map-repeat.hs | head ( map ( \x - > x + x ) ( repeat ( 10 + 1 ) ) )
repeat = (\x -> let xs = @repeat x
in Cons x xs)
map = (\f -> (\xs -> case xs of {
Nil -> Nil ;
Cons x xs' -> let fx = f x
in Cons fx (@map f xs')
... | null | https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/examples/head-map-repeat.hs | haskell | head ( map ( \x - > x + x ) ( repeat ( 10 + 1 ) ) )
repeat = (\x -> let xs = @repeat x
in Cons x xs)
map = (\f -> (\xs -> case xs of {
Nil -> Nil ;
Cons x xs' -> let fx = f x
in Cons fx (@map f xs')
... | |
d3eadbe00be413491043cc6eb826f20aba0a191a07b69bd24a7fec519c965366 | cram2/cram | blas-swap.lisp | Regression test BLAS - SWAP for GSLL , automatically generated
;;
Copyright 2009 , 2010 , 2011 , 2014
Distributed under the terms of the GNU General Public License
;;
;; 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
... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/blas-swap.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
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 General Publi... | Regression test BLAS - SWAP for GSLL , automatically generated
Copyright 2009 , 2010 , 2011 , 2014
Distributed under the terms of the GNU General Public License
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 sho... |
3abbf9e388f29dfaed48c1a205608d511e20495646b40040e4363f268c0ced2e | wireapp/wire-server | Federator.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/galley/src/Galley/Intra/Federator.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
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 PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Intra.Federator (i... |
65cc4bcb2a3ea1f50817555a2607a1d9be281654532bc6c705322ccbbc60c5c8 | soegaard/metapict | arbelos.rkt | #lang racket
(require metapict)
(def r 0.75) ; radius of the large circle with center midAB
(def A (pt 0 0))
the diameter of the large circle is 1
(def C (med r A B)) ; C is between A and B
(def midAB (med 1/2 A B)) ; midpoint of A and B
(def midAC (med 1/2 A C)) ; midpoint of... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/arbelos.rkt | racket | radius of the large circle with center midAB
C is between A and B
midpoint of A and B
midpoint of A and C
midpoint of B and C
diameter r
mix in some teal to
make the colors more interesting | #lang racket
(require metapict)
(def A (pt 0 0))
the diameter of the large circle is 1
(define (half-circle center radius)
make half - circle given center and radius
(shifted center (arc radius 0 pi)))
half circle , diameter 1
diamter 1 - r
(set-curve-pict-size 300 150)
(with-window (wind... |
36f903e06a4e7a75069e77565890927eb22deca2459a948879a7f9fb71b53955 | dbuenzli/useri | useri_jsoo.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/useri/4646a7b8f3c0d6ce34b1c3f789eebe56cb75b9d2/src-jsoo/useri_jsoo.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
c2ec9feef21bb270b631370bb9b661d424c9a11705f8ea3668ba20ec632b3566 | kkinnear/zprint | finish_test.cljc | (ns zprint.finish-test
(:require [expectations.clojure.test
#?(:clj :refer
:cljs :refer-macros) [defexpect expect]]
#?(:cljs [cljs.tools.reader :refer [read-string]])
[zprint.core :refer [zprint-str set-options! czprint-str]]
[zprint.finish :refer [cvec... | null | https://raw.githubusercontent.com/kkinnear/zprint/f9031d6762e3c7dc557baadc1e9d3a842944cb8c/test/zprint/finish_test.cljc | clojure |
Keep tests from configuring from any $HOME/.zprintrc or local .zprintrc
cvec-to-style-vec
compress-style
Same tests, but this time we turn :none to nil
These were the original tests
Ensure that we only get escape sequences when we actually do colors | (ns zprint.finish-test
(:require [expectations.clojure.test
#?(:clj :refer
:cljs :refer-macros) [defexpect expect]]
#?(:cljs [cljs.tools.reader :refer [read-string]])
[zprint.core :refer [zprint-str set-options! czprint-str]]
[zprint.finish :refer [cvec... |
f50f835a51405b2ef65780eaef21a0b8efbfe6d381701003a855cbcff1883403 | txyyss/Project-Euler | Euler057.hs | It is possible to show that the square root of two can be expressed
-- as an infinite continued fraction.
√2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ) ) ) = 1.414213 ...
By expanding this for the first four iterations , we get :
1 + 1/2 = 3/2 = 1.5
1 + 1/(2 + 1/2 ) = 7/5 = 1.4
1 + 1/(2 + 1/(2 + 1/2 ) ) = 17/12 = ... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler057.hs | haskell | as an infinite continued fraction.
of digits in the numerator exceeds the number of digits in the
denominator.
numerator with more digits than denominator? | It is possible to show that the square root of two can be expressed
√2 = 1 + 1/(2 + 1/(2 + 1/(2 + ... ) ) ) = 1.414213 ...
By expanding this for the first four iterations , we get :
1 + 1/2 = 3/2 = 1.5
1 + 1/(2 + 1/2 ) = 7/5 = 1.4
1 + 1/(2 + 1/(2 + 1/2 ) ) = 17/12 = 1.41666 ...
1 + 1/(2 + 1/(2 + 1/(2 +... |
5c28195eefbccc5259dd5de7048e74c6278df409ec14cd1bfe4a74b2335b0f42 | Kakadu/fp2022 | rep.ml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Tree
open Type
open Helper
exception Internal of string
exception WrongTableStructure
exception WrongDBStructure
exception WrongType
exception IllegalName
exception ColumnDNE
exception TableDNE
exception Duplicate... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0eb49bf60d173287607678159465c425cdf699be/SQLyd/lib/rep.ml | ocaml | placeholder for single database implementation
assoc list of field names and datatypes
list of data in provided column
gets the cell in this column whose index matches the row_num
data in this row as a list
list [0,1,2...(num_rows - 1)]
concatenate spaces to the end of the str till desired length
get all... | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Tree
open Type
open Helper
exception Internal of string
exception WrongTableStructure
exception WrongDBStructure
exception WrongType
exception IllegalName
exception ColumnDNE
exception TableDNE
exception Duplicate... |
fbb30005aecc3be7862dad572b94fb3b9d7eeec4de449ad766575c3e312aa023 | ekmett/speculation | List.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.Speculation.List
Copyright : ( C ) 2010 - 2015 ,
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability ... | null | https://raw.githubusercontent.com/ekmett/speculation/354a3accdb1eebc3a8c99e1c5e3f58ebad8104a2/src/Control/Concurrent/Speculation/List.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Concurrent.Speculation.List
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
--------------------------------------------------------------------------
* Specula... | # LANGUAGE CPP #
Copyright : ( C ) 2010 - 2015 ,
Maintainer : < >
module Control.Concurrent.Speculation.List
(
scan, scanBy
, scanMap, scanMapBy
, scanr, scanrBy
, scanl, scanlBy
, scanr1, scanr1By
, scanl1, scanl1By
, scanrM , scanrByM
, scanlM , scanlByM
... |
e1d8ba9693be9c57ee15d9fdf683c086c35d5a1f3871b92780f212f530c10e14 | kelamg/HtDP2e-workthrough | ex151.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 ex151) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex151.rkt | racket | about the language level of this file in a form that our tools can easily process.
N Number -> Number
computes (* n x) without using * | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex151) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (multiply 0 3) 0)
(check-expect (multiply 3 0) 0)
(... |
2a597321cf4d8f93bebad6d609decbb2dfb29b09b1404a4a45be6737245b1ff4 | hbr/albatross | pattern.mli | open Term
type match_result = (term array * term list, term list) result
val is_pattern: int -> term -> int -> Feature_table.t -> bool
val unify_with_pattern:
term -> int -> term -> Context.t -> match_result option
val decide_inspect: term -> (formals*term*term) array -> Context.t
-> (int * ar... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/alba1/pattern.mli | ocaml | open Term
type match_result = (term array * term list, term list) result
val is_pattern: int -> term -> int -> Feature_table.t -> bool
val unify_with_pattern:
term -> int -> term -> Context.t -> match_result option
val decide_inspect: term -> (formals*term*term) array -> Context.t
-> (int * ar... | |
f81d2bb91b5458b8563e8f6ff24cb88281ea12c5eb1ecfecb64ef5b0c31f0f7f | Frama-C/Frama-C-snapshot | source_viewer.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/gui/source_viewer.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
37db419243a4e32b2db2c95969a8e57e5d5861a4d13c278f15705e2bdcbab21c | samply/blaze | equiv_relationships_spec.clj | (ns blaze.elm.equiv-relationships-spec
(:require
[blaze.elm.equiv-relationships :as equiv-relationships]
[blaze.elm.spec]
[clojure.spec.alpha :as s]))
(s/fdef equiv-relationships/find-equiv-rels-library
:args (s/cat :library :elm/library))
| null | https://raw.githubusercontent.com/samply/blaze/6533433ef4e903995cb8d8fac9e1c4cffd96a89f/modules/cql/test/blaze/elm/equiv_relationships_spec.clj | clojure | (ns blaze.elm.equiv-relationships-spec
(:require
[blaze.elm.equiv-relationships :as equiv-relationships]
[blaze.elm.spec]
[clojure.spec.alpha :as s]))
(s/fdef equiv-relationships/find-equiv-rels-library
:args (s/cat :library :elm/library))
| |
b5196e64a58dbd5be9a81e747bfc716fb5d37f237f816ba8efefc0ead57826a1 | broadinstitute/firecloud-ui | main.cljs | (ns broadfcui.main
(:require
[dmohs.react :as react]
[org.broadinstitute.uicomps.modal :as modal]
[clojure.string :as string]
[broadfcui.auth :as auth]
[broadfcui.common :as common]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.links :as links]
... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/main.cljs | clojure | partial profile case
unregistered case
developer override for terra redirects, read from local storage
combining override, config, and user preference, should redirects be enabled?
are redirects both enabled and the current page has a redirect?
to what url should we redirect, if redirects are enabled?
As low as ... | (ns broadfcui.main
(:require
[dmohs.react :as react]
[org.broadinstitute.uicomps.modal :as modal]
[clojure.string :as string]
[broadfcui.auth :as auth]
[broadfcui.common :as common]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.links :as links]
... |
0f249b1c60d3cb9338f135ab09caea06402eb78740a286d10a04db2bec0f2f82 | hjcapple/reading-sicp | newton_sqrt_blackbox.scm | #lang racket
;; P17 - [1.1.8 过程作为黑箱抽象]
(define (average x y)
(/ (+ x y) 2))
(define (abs x)
(cond ((< x 0) (- x))
(else x)))
(define (square x) (* x x))
(define (sqrt x)
(define (good-enough? guess x)
(< (abs (- (square guess) x)) 0.001))
(define (improve guess x)
(average guess (/ x gu... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/newton_sqrt_blackbox.scm | scheme | P17 - [1.1.8 过程作为黑箱抽象]
| #lang racket
(define (average x y)
(/ (+ x y) 2))
(define (abs x)
(cond ((< x 0) (- x))
(else x)))
(define (square x) (* x x))
(define (sqrt x)
(define (good-enough? guess x)
(< (abs (- (square guess) x)) 0.001))
(define (improve guess x)
(average guess (/ x guess)))
(define (sqrt-... |
8409e9f84704c2c213c88751f44617b7a4218bb2f3161584bc7ba01f43e3767b | racket/drracket | time-keystrokes.rkt | (module time-keystrokes mzscheme
(require drscheme/tool
mzlib/list
mzlib/unit
mzlib/class
mzlib/etc
mred
framework)
(provide tool@)
(define short-str "(abc)")
(define chars-to-test (build-string
400
... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket-test/tests/drracket/time-keystrokes.rkt | racket | copied from framework/test.rkt
copied from framework/test.rkt | (module time-keystrokes mzscheme
(require drscheme/tool
mzlib/list
mzlib/unit
mzlib/class
mzlib/etc
mred
framework)
(provide tool@)
(define short-str "(abc)")
(define chars-to-test (build-string
400
... |
484218c2d93d1133e05110c6768f25fc62acfdb24925b047acdcd27e91b0437c | austral/austral | Cst.ml |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/Cst.ml | ocaml |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | |
c651943f1c44eeda5402609f26db6f1e8b8d7d5bd7bb0bc861163041cdb73573 | cl21/cl21 | structure.lisp | (in-package :cl-user)
(defpackage cl21.core.structure
(:use :cl)
(:export :defstruct
:copy-structure
:structure
:structure-class
:structure-object))
| null | https://raw.githubusercontent.com/cl21/cl21/c36644f3b6ea4975174c8ce72de43a4524dd0696/src/core/structure.lisp | lisp | (in-package :cl-user)
(defpackage cl21.core.structure
(:use :cl)
(:export :defstruct
:copy-structure
:structure
:structure-class
:structure-object))
| |
d71c8f07e06b19b440bc3615deee7d9705a42b0ac3b8d02d8e74ede08d9ad912 | facebook/infer | Timings.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/b1284587e56d95c81ebdd856894563c335fffa83/infer/src/base/Timings.ml | ocaml | don't bother if the digest is empty |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
5acb2b4fe4cf2af2e940740d25ad34ebe1118ff2ee89ca5594ad5960719df80c | hendriktews/proof-tree | tree_layers.ml |
* prooftree --- proof tree display for Proof General
*
* Copyright ( C ) 2013 - 2019
*
* This file is part of " prooftree " .
*
* " prooftree " 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 Softwar... | null | https://raw.githubusercontent.com/hendriktews/proof-tree/7b18f01a6a6b09547a25ed464c2deb7f8a2f5481/tree_layers.ml | ocaml | * Organize several layers of proof trees
*************************************************************************
*************************************************************************
*************************************************************************
********************************************************... |
* prooftree --- proof tree display for Proof General
*
* Copyright ( C ) 2013 - 2019
*
* This file is part of " prooftree " .
*
* " prooftree " 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 Softwar... |
487f13000082a6bb01b2d142d01d6b140f52c7dad2c210702638e967cff298d1 | basho/riak_cs | riak_cs_wm_objects.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_wm_objects.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
4e9bc57aed2305c72c6bd92e9e344939d9cbce715aa37ff345dd2efffc28468c | derekmcloughlin/pearls | chap02a.hs |
-- A Surpassing Problem
--
msc xs = maximum [scount z zs | z : zs <- tails xs]
scount x xs = length(filter(x < ) xs)
tails [] = []
tails (x:xs) = (x:xs) : tails xs
| null | https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap02/chap02a.hs | haskell | A Surpassing Problem
|
msc xs = maximum [scount z zs | z : zs <- tails xs]
scount x xs = length(filter(x < ) xs)
tails [] = []
tails (x:xs) = (x:xs) : tails xs
|
f3c0e1c5f602b17c814f69937ef4f98878c4970b273ecf3dae78a79314276c78 | fgalassi/cs61a-sp11 | 2.67.scm | EXERCISE 2.67
;: (define sample-tree
: ( make - code - tree ( make - leaf ' A 4 )
;: (make-code-tree
: ( make - leaf ' B 2 )
: ( make - code - tree ( make - leaf ' D 1 )
;: (make-leaf 'C 1)))))
;: (define sample-message ... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/2.67.scm | scheme | : (define sample-tree
: (make-code-tree
: (make-leaf 'C 1)))))
: (define sample-message '(0 1 1 0 0 1 0 1 0 1 1 1 0))
| EXERCISE 2.67
: ( make - code - tree ( make - leaf ' A 4 )
: ( make - leaf ' B 2 )
: ( make - code - tree ( make - leaf ' D 1 )
solution : ADABBCA
|
859f67b4ef2ced1007fed5b8fcd832511b09df315ce16f48760db43954071080 | mit-pdos/mcqc | String.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module Sema.String where
import CIR.Expr
import Common.Utils
import Data.MonoTraversable
import Data.Text (Text)
import qualified Data.Text as T
import Data.Bits
Ascii as byte semantics
asciiSemantics :: CExpr -> CExpr
asciiSemantics CExprCall { _cd = C... | null | https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Sema/String.hs | haskell | # LANGUAGE OverloadedStrings #
Handle string semantics | # LANGUAGE RecordWildCards #
module Sema.String where
import CIR.Expr
import Common.Utils
import Data.MonoTraversable
import Data.Text (Text)
import qualified Data.Text as T
import Data.Bits
Ascii as byte semantics
asciiSemantics :: CExpr -> CExpr
asciiSemantics CExprCall { _cd = CDef { _nm = "Ascii" }, _cparams = f... |
ca39a96751e3a05289b11e5246bcc9395fee06794a163a09e78dfdee8571bfd9 | metabase/throttle | core.clj | (ns throttle.core
(:require [clojure.math.numeric-tower :as math])
(:import (clojure.lang Atom Keyword)))
;;; # PUBLIC INTERFACE
(declare calculate-delay remove-old-attempts)
(defrecord Throttler [;; Name of the API field/value being checked. Used to generate appropriate API error messages, so
... | null | https://raw.githubusercontent.com/metabase/throttle/75dce37020c1a8a288315bba3a2e29d00b52edd9/src/throttle/core.clj | clojure | # PUBLIC INTERFACE
Name of the API field/value being checked. Used to generate appropriate API error messages, so
they'll be displayed on the right part of the screen
[Internal] List of attempt entries. These are pairs of [key timestamp (ms)],
Amount of time to keep an entry in `attempts` before dropping it.
Numb... | (ns throttle.core
(:require [clojure.math.numeric-tower :as math])
(:import (clojure.lang Atom Keyword)))
(declare calculate-delay remove-old-attempts)
^Keyword exception-field-key
e.g. [ " " 1438045261132 ]
^Atom attempts
^Integer attempt-t... |
acbd4f7534861f486dfd3112c65a6cbcb8474e8f5a6a1ebdbb561fbc83a1a1d7 | xsc/claro | protocols.cljc | (ns claro.projection.protocols
(:require [claro.data.ops.then :refer [then]]))
(defprotocol Projection
"Protocol for projection templates."
(project [template value]
"Use the given template to ensure the shape of the given value."))
(defn then-project
"Use the given projection template to ensure the shape... | null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/projection/protocols.cljc | clojure | (ns claro.projection.protocols
(:require [claro.data.ops.then :refer [then]]))
(defprotocol Projection
"Protocol for projection templates."
(project [template value]
"Use the given template to ensure the shape of the given value."))
(defn then-project
"Use the given projection template to ensure the shape... | |
516078c2306fb5a0ee9648cd43a72320685e0c77d6cea24294e9bfedfcd003f2 | casperschipper/ocaml-cisp | cisp6.ml | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR ( MidiCh 0 ) ( MidiCtrl 0 ) > > = fun ( MidiVal ctrl1 ) - >
MidiState.getControlR ( MidiCh 0 ) ( MidiCtrl 1 ) > > = fun ( MidiVal ctrl2 ) - >
MidiState.triggerR 3000 > > =... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/drumPattern/cisp6.ml | ocaml | LEAD MELODY
a seq of (x,y) make it (seq x, seq y)
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
the result is then used to contruct streams
turn back into raw midi | open Cisp
open Midi
open Seq
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR ( MidiCh 0 ) ( MidiCtrl 0 ) > > = fun ( MidiVal ctrl1 ) - >
MidiState.getControlR ( MidiCh 0 ) ( MidiCtrl 1 ) > > = fun ( MidiVal ctrl2 ) - >
MidiState.triggerR 3000 > > =... |
db852d7ab72234b2a760a11e5ceab565fe79bffa6655285551e84777249aab42 | AlexKnauth/debug | debug-repl-macros.rkt | #lang racket/base
(require "../repl.rkt"
"test-util.rkt"
rackunit
(for-syntax racket/base syntax/parse))
(define a 3)
(define b 4)
(test-case "local macros that don't refer to other macros"
(define (f tmp)
(define-syntax ?list
(syntax-parser
[(?list x:expr ...)
... | null | https://raw.githubusercontent.com/AlexKnauth/debug/aa798842c09ece55c2a088f09d30e398d2b77fee/debug/test/debug-repl-macros.rkt | racket | TODO: figure out how to make syntax-parse's own errors
not cause infinite loops
tmp "1\n"
TODO: !!! identifier used out of context !!!
tmp "1\n" | #lang racket/base
(require "../repl.rkt"
"test-util.rkt"
rackunit
(for-syntax racket/base syntax/parse))
(define a 3)
(define b 4)
(test-case "local macros that don't refer to other macros"
(define (f tmp)
(define-syntax ?list
(syntax-parser
[(?list x:expr ...)
... |
c08b7c6f30a38942f9082a0d671802fa294d53cb57293d64a2a47488f6576263 | semilin/layoup | functions.lisp | (use-package :layoup)
UTILITIES
(defun pinky? (pos)
(or (eq LP (pos-finger pos))
(eq RP (pos-finger pos))))
(defun ring? (pos)
(or (eq LR (pos-finger pos))
(eq RR (pos-finger pos))))
(defun middle? (pos)
(or (eq LM (pos-finger pos))
(eq RM (pos-finger pos))))
(defun index? (pos)
(or (eq... | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/functions.lisp | lisp | (use-package :layoup)
UTILITIES
(defun pinky? (pos)
(or (eq LP (pos-finger pos))
(eq RP (pos-finger pos))))
(defun ring? (pos)
(or (eq LR (pos-finger pos))
(eq RR (pos-finger pos))))
(defun middle? (pos)
(or (eq LM (pos-finger pos))
(eq RM (pos-finger pos))))
(defun index? (pos)
(or (eq... | |
361ded6035841aab27e5ccb3af9003861d43619eb10c0ca67bd7b85fe16bb73e | inria-parkas/sundialsml | ark_brusselator1D.ml | ---------------------------------------------------------------
* Programmer(s ): @ SMU
* ---------------------------------------------------------------
* OCaml port : , , Jan 2016 .
* ---------------------------------------------------------------
* Copyright ( c ) 2015 , Southern Methodist Unive... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/arkode/C_serial/ark_brusselator1D.ml | ocaml | user data structure
number of intervals
mesh spacing
constant forcing on u
steady-state value of w
diffusion coeff for u
diffusion coeff for v
diffusion coeff for w
stiffness parameter
f routine to compute the ODE RHS function f(t,y).
iterate over domain, computing all eq... | ---------------------------------------------------------------
* Programmer(s ): @ SMU
* ---------------------------------------------------------------
* OCaml port : , , Jan 2016 .
* ---------------------------------------------------------------
* Copyright ( c ) 2015 , Southern Methodist Unive... |
59bb58fb64007887ec51e56b5f166fe839949c51c06af8589559ce96a8487e3f | valis/hoq | Termination.hs | {-# LANGUAGE GADTs, ExistentialQuantification #-}
module TypeChecking.Definitions.Termination
( checkTermination, CT(..), PatInCtx(..)
) where
import qualified Syntax as S
import Semantics.Value
import Semantics
import Syntax.ErrorDoc
import TypeChecking.Context
import TypeChecking.Expressions.Utils
data CT ... | null | https://raw.githubusercontent.com/valis/hoq/9d2d2f5dee367ca5a609199856ca5964499bf33a/src/TypeChecking/Definitions/Termination.hs | haskell | # LANGUAGE GADTs, ExistentialQuantification # |
module TypeChecking.Definitions.Termination
( checkTermination, CT(..), PatInCtx(..)
) where
import qualified Syntax as S
import Semantics.Value
import Semantics
import Syntax.ErrorDoc
import TypeChecking.Context
import TypeChecking.Expressions.Utils
data CT a = Constructor ID Int | Function ID | Variable a ... |
6a624cbf8118a507b4fdb9271aaace808fde68edc7518d2f842cdbe21a0471bc | swarmpit/swarmpit | list.cljs | (ns swarmpit.component.stack.list
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.list.basic :as list]
[material.component.list.util :as list-util]
[material.component.label :as label]
[swarmpit.component.state :as state... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/stack/list.cljs | clojure | (ns swarmpit.component.stack.list
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.list.basic :as list]
[material.component.list.util :as list-util]
[material.component.label :as label]
[swarmpit.component.state :as state... | |
f59f5087cfe62307ee2548f3d1801c701b585ad4770b1062dc8fd236f79f9ef0 | triffon/fp-2022-23 | 08-all.rkt | #lang racket
(define (all? lst predicate?)
(cond
((null? lst) #t)
((predicate? (car lst)) (all? (cdr lst) predicate?))
(else #f))) | null | https://raw.githubusercontent.com/triffon/fp-2022-23/11290d958efee803626cba4019581f0af86aab2f/exercises/inf2/04/08-all.rkt | racket | #lang racket
(define (all? lst predicate?)
(cond
((null? lst) #t)
((predicate? (car lst)) (all? (cdr lst) predicate?))
(else #f))) | |
b0371f18821a456b3e7f4524ac745cb74f47bbe35758d59d8144c1ddf48aee67 | rd--/hsc3 | envSine.help.hs | -- envSine
let s = envSine 9 0.1
e = envGen kr 1 1 0 1 RemoveSynth s
in sinOsc ar 440 0 * e
---- ; drawings
Sound.Sc3.Plot.plotEnvelope [envSine 9 1,envSine 3 0.25]
---- ; help
Sound.Sc3.Lang.Help.viewSc3Help "Env.*sine"
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/envSine.help.hs | haskell | envSine
-- ; drawings
-- ; help | let s = envSine 9 0.1
e = envGen kr 1 1 0 1 RemoveSynth s
in sinOsc ar 440 0 * e
Sound.Sc3.Plot.plotEnvelope [envSine 9 1,envSine 3 0.25]
Sound.Sc3.Lang.Help.viewSc3Help "Env.*sine"
|
83108eba1f796fbf0bda849ec551c3903c88c102823722b6ff2e5895bfd06643 | cxxxr/valtan | should-hash-table.lisp | Copyright ( C ) 2002 - 2004 , < >
;; ALL RIGHTS RESERVED.
;;
$ I d : should - hash - table.lisp , v 1.7 2004/02/20 07:23:42 yuji Exp $
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributi... | null | https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/tests/sacla-tests/should-hash-table.lisp | lisp | ALL RIGHTS RESERVED.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistribu... | Copyright ( C ) 2002 - 2004 , < >
$ I d : should - hash - table.lisp , v 1.7 2004/02/20 07:23:42 yuji Exp $
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY O... |
89013bd4e69f4d4574a05b6c61415bd95877e092e08231d6b8aa489418d02ec6 | ocaml-flambda/ocaml-jst | camlinternalComprehension.mli | (** Supporting functions for list comprehensions *)
(** Backwards snoc lists that can be spine-local but element-global. This
allows list comprehensions to build their intermediate data structure on the
stack instead of the heap; since list comprehensions build their
intermediate lists backwards, we store... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/e08377d2d1bdbfbbe7c719e2d580445ae08d770f/stdlib/camlinternalComprehension.mli | ocaml | * Supporting functions for list comprehensions
* Backwards snoc lists that can be spine-local but element-global. This
allows list comprehensions to build their intermediate data structure on the
stack instead of the heap; since list comprehensions build their
intermediate lists backwards, we store these ... |
type 'a rev_list =
| Nil
| Snoc of { init : 'a rev_list; global_ last : 'a }
type 'a rev_dlist = local_ 'a rev_list -> local_ 'a rev_list
* Reverse a [ local _ ] snoc list to get a global regular list . To turn a local
reversed difference list into a ( global , normal , forwards ) list , first
prov... |
2cddf8c74c385d2ca9f7a2c7ec6992093e6c67947cc7b7a4d8fee3d13dea1146 | lulf/hcoap | MessageCodec.hs | module Network.CoAP.MessageCodec
( decode
, encode
) where
import Debug.Trace
import Network.CoAP.Types
import Data.ByteString.Lazy hiding (map)
import qualified Data.ByteString as BS
import Data.Word
import Data.Maybe
import Data.List (sortBy)
import Data.Binary hiding (encode, decode)
import qualified Data.Binary as... | null | https://raw.githubusercontent.com/lulf/hcoap/8127520b767430b5513be6cfe646894ae7a2e616/src/Network/CoAP/MessageCodec.hs | haskell | module Network.CoAP.MessageCodec
( decode
, encode
) where
import Debug.Trace
import Network.CoAP.Types
import Data.ByteString.Lazy hiding (map)
import qualified Data.ByteString as BS
import Data.Word
import Data.Maybe
import Data.List (sortBy)
import Data.Binary hiding (encode, decode)
import qualified Data.Binary as... | |
6e0a0d714581cdf98e7f3331df757e80ab499c66c3f077681ec60b5aa1358c9f | herd/herdtools7 | gen_theme.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
(* ... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/jingle/gen_theme.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... |
Copyright 2018 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribute the software under the terms of the CeCILL - B
license as circulat... |
1b87891749ee54a5b5e23c5f31610633853a12a70fc5abbd94307fea281c3297 | elbrujohalcon/witchcraft | uuid.erl | -module(uuid).
-export([new/0]).
new() -> <<"an-uuid">>.
| null | https://raw.githubusercontent.com/elbrujohalcon/witchcraft/050e91f028a50874347fea9dc552a0e0a056018f/src/uuid.erl | erlang | -module(uuid).
-export([new/0]).
new() -> <<"an-uuid">>.
| |
18e156b54cc8d8cd2b96a0e2d249273d26ca45974014fa8d97b6baa77d5031a3 | fulcrologic/fulcro-inspect | settings.cljs | (ns fulcro.inspect.ui.settings
(:require
[fulcro.client.data-fetch :as df]
[fulcro.client.localized-dom :as dom]
[fulcro.client.mutations :as m :refer [defmutation]]
[fulcro.client.primitives :as fp :refer [defsc]]
[fulcro.inspect.helpers :as h]
[fulcro.inspect.ui.core :as ui]))
(defmutation ... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-inspect/a03b61cbd95384c0f03aa936368bcf5cf573fa32/src/ui/fulcro/inspect/ui/settings.cljs | clojure | (ns fulcro.inspect.ui.settings
(:require
[fulcro.client.data-fetch :as df]
[fulcro.client.localized-dom :as dom]
[fulcro.client.mutations :as m :refer [defmutation]]
[fulcro.client.primitives :as fp :refer [defsc]]
[fulcro.inspect.helpers :as h]
[fulcro.inspect.ui.core :as ui]))
(defmutation ... | |
0c5f983a6a7ce13b6b134748cbbee5e8ab3ced254c49a67a87a7f7c44f318824 | VERIMAG-Polyhedra/VPL | CertcheckerConfig.ml | exception from the certified
exception CertCheckerFailure of (Debugging.failureStatus * string)
| null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/coq_ml/CertcheckerConfig.ml | ocaml | exception from the certified
exception CertCheckerFailure of (Debugging.failureStatus * string)
| |
2e7011469f12d26518d8af83dae5bb2b1959153f5b1804efeb5c7c5c13eb0d71 | javalib-team/sawja | jBirSSA.ml |
* This file is part of SAWJA
* Copyright ( c)2009 ( INRIA )
* Copyright ( c)2010 ( INRIA )
* Copyright ( c)2016 ( ENS Rennes )
* Copyright ( c)2016 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
... | null | https://raw.githubusercontent.com/javalib-team/sawja/74b5171bfe385cdc37401d418601578c15b907b7/src/jBirSSA.ml | ocaml | let pc_bc2ir m = m.bir_pc_bc2ir |
* This file is part of SAWJA
* Copyright ( c)2009 ( INRIA )
* Copyright ( c)2010 ( INRIA )
* Copyright ( c)2016 ( ENS Rennes )
* Copyright ( c)2016 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.