_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 |
|---|---|---|---|---|---|---|---|---|
f208bf06d4cddeaf4d793aa916ce94c42c20e0969e5fc10d51f51e9d306f405f | yzh44yzh/practical_erlang | strategy_sup.erl | -module(strategy_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
SupervisorSpecification = #{
strategy => one_for_one,
intensity => 10,
period => 60
},
ChildSpecifications = [
... | null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/final_exercise/strategy/apps/strategy/src/strategy_sup.erl | erlang | -module(strategy_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
SupervisorSpecification = #{
strategy => one_for_one,
intensity => 10,
period => 60
},
ChildSpecifications = [
... | |
e62169c703d770196aae55ecad5fe76d8401d504e2a8ee866265ea2cf21e5ba2 | evrim/core-server | application.lisp | (in-package :manager)
;; -------------------------------------------------------------------------
;; Application Table
;; -------------------------------------------------------------------------
(deftable <manager:application/table ()
((fqdn :label "FQDN")
(application-class :label "Application Class")))
;; --... | null | https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/manager/src/ui/application.lisp | lisp | -------------------------------------------------------------------------
Application Table
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Applications Component
---------------------------------------------------... | (in-package :manager)
(deftable <manager:application/table ()
((fqdn :label "FQDN")
(application-class :label "Application Class")))
(defcomponent <manager:applications (<core:table-with-crud <widget:simple)
()
(:default-initargs
:table-title "Applications"
:table (<manager:application/table)
:cr... |
152bf96f079a073c93bda27caf2d551312b54fe75ae3d43fe8d2c1bf8b982902 | heshrobe/joshua-dist | jensen-est.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*-
(in-package :ideal)
;;;;********************************************************
Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved .
Rockwell International Science Center Palo Alto Lab
;;;;*******************... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/ideal/code/jensen-est.lisp | lisp | Syntax : Common - Lisp ; Package : Ideal ; Base : 10 -*-
********************************************************
********************************************************
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
--------------------------------------------------------
Estimates number of combinatoric operations.
The ... |
(in-package :ideal)
Copyright ( c ) 1989 , 1992 Rockwell International -- All rights reserved .
Rockwell International Science Center Palo Alto Lab
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(JENSEN-INFER-EST)))
: INCREMENTAL approach .
(defun jensen-infer-est (join-tree belief-n... |
ba4e7e9b18cbc4d25d22c301765dc4f305b862f84998a40089054a049ecba978 | gjord/gwern.net | mnemo.hs | #!/usr/bin/env runhaskell
import Control.Monad (liftM)
import Data.Char (isAlphaNum)
import Data.List (intersperse)
main :: IO ()
main = do arg <- liftM (concatMap (permuteAndPutTogether . lines) . breakBlankLines) getContents
mapM_ putStrLn arg
-- Utility function. It *should* be in the base libraries, bu... | null | https://raw.githubusercontent.com/gjord/gwern.net/ea0bfea955d8e4c0c805728df7a2a48fb967ce3d/haskell/mnemo.hs | haskell | Utility function. It *should* be in the base libraries, but alas...
between each supplied item.
Yes, we do need to put this definition last. | #!/usr/bin/env runhaskell
import Control.Monad (liftM)
import Data.Char (isAlphaNum)
import Data.List (intersperse)
main :: IO ()
main = do arg <- liftM (concatMap (permuteAndPutTogether . lines) . breakBlankLines) getContents
mapM_ putStrLn arg
split :: (a -> Bool) -> [a] -> [[a]]
split _ [] = []
split p ... |
6adfb7ceba69039323b01b25d98aea538ad7ef57e2a40ef78bf98bd6997e1d54 | racket/racket7 | check.rkt | #lang racket/base
(require racket/private/check)
(provide (all-from-out racket/private/check))
| null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/common/check.rkt | racket | #lang racket/base
(require racket/private/check)
(provide (all-from-out racket/private/check))
| |
f3d62c6e86ef03cb0fec6a101fa9c2e2316f949512ae0cc2b354f84274c0afcd | g-andrade/aequitas | aequitas_app.erl | Copyright ( c ) 2018 - 2022
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/aequitas/35c446847e2827a478844231c671e0a52bbed2c5/src/aequitas_app.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright not... | Copyright ( c ) 2018 - 2022
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
f50e66844d0f84b4ecb7fb30bbf8fdf6b62f0d27465dab7eb3b416d9c1268fbc | korya/efuns | stddeco.mli | (***********************************************************************)
(* *)
(* GwML *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/stddeco.mli | ocaml | *********************************************************************
GwML
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val update_focus : Gwml.wob_desc -> bool -> unit
val name_update :
Gwml.client_desc ->
< set_st... |
65fb23559d55f7a6b3cef95dc5be6619cd789f0ae22d3d3d4702f4c88a3e8619 | S8A/htdp-exercises | ex498.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-intermediate-lambda-reader.ss" "lang")((modname ex498) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex498.rkt | racket | about the language level of this file in a form that our tools can easily process.
A Tree is one of:
– '()
Tree -> N
computes the height of the given tree i.e. the maximum number
of levels it reaches from any branch
Tree -> N
measures the height of abt0
Tree N -> N
measures the height of abt
accumulator a i... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex498) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct node [left right])
– ( make - node )... |
2652490fde6105fa766c802e6cbbc2cf39ccc7487db06144f852e58aba0531c6 | tomjridge/kv-hash | freelist.ml | * Freelist , which records the free buckets ( after splitting ) that
can be reused on subsequent merges .
can be reused on subsequent merges. *)
open Freelist_intf
type freelist = {
mutable dont_reuse: int list;
mutable do_reuse: int list;
min_free: int ref;
}
module Make_1 = struct
type t = freeli... | null | https://raw.githubusercontent.com/tomjridge/kv-hash/31726abad76bea71dcb5d6182683964b27a06f08/src/freelist.ml | ocaml | FIXME really need a sync of containing dir
reload inplace | * Freelist , which records the free buckets ( after splitting ) that
can be reused on subsequent merges .
can be reused on subsequent merges. *)
open Freelist_intf
type freelist = {
mutable dont_reuse: int list;
mutable do_reuse: int list;
min_free: int ref;
}
module Make_1 = struct
type t = freeli... |
ece2ee55771824e4ab893ff6c17c60a0e3a3344cf13aa5a8a23461dbdd029605 | tbsschroeder/clojure-webshop-app | project.clj | (defproject metro "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:url "-webshop-app"
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/data.json "1.0.0"]
;; lifecycle
[com.stuartsierra/component "1.... | null | https://raw.githubusercontent.com/tbsschroeder/clojure-webshop-app/acedaceae794b8c9bd0805356880169e19a66b86/project.clj | clojure | lifecycle
http abstraction
html in clojure
database
web server
static code analyzer
dependency checker
code formatter
lint tool | (defproject metro "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:url "-webshop-app"
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/data.json "1.0.0"]
[com.stuartsierra/component "1.0.0"]
[ring/... |
fcc5879a3421c1902aaaf62d003d7a04659d8f20aa75f6a4da5fea929e6fe5fd | facebook/infer | PulseCallOperations.mli |
* 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/28e867254f6dc8c2a26d749575b472ca0ae27a0f/infer/src/pulse/PulseCallOperations.mli | ocaml | * perform an interprocedural call: apply the summary for the call proc name passed as argument if
it exists
* performs a call to a function with no summary by optimistically havoc'ing the by-ref actuals and
the return value as appropriate |
* 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
... |
b40cdf6d3d4ec9ad5bdff6f6bb4c426c8646761726e7bcac43d55b16a8a7a98f | INRIA/zelus | disc.ml | (***********************************************************************)
(* *)
(* *)
(* Zelus, a synchronous language for hybrid systems *)
(* ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/compiler/rewrite/disc.ml | ocaml | *********************************************************************
Zelus, a synchronous language for hybrid systems
... | ( c ) 2020 Paris ( see the file )
Automatique . All rights reserved . This file is distributed under
the terms of the INRIA Non - Commercial License Agreement ( see the
Elimation of disc . This construction may be removed
open Zmisc
open Zlocation
open Zident
open Lident
op... |
310130b8ce0706d1a0b3a9da6fbace6617547961163112fe4c5651be89ee80d3 | Trattue/oktade | AccessFlags.hs | -- |
Module : Data . Oktade . Classfile . Class . Fields . AccessFlags
-- License: Apache-2.0
--
-- Types and functions for parsing and unparsing the access flags of classfile
-- fields.
module Data.Oktade.Classfile.Class.Fields.AccessFlags
( -- * Access Flags
FieldAccessFlags (..),
FieldAccessFlag (..),
... | null | https://raw.githubusercontent.com/Trattue/oktade/95026501d01c6ffba6ad0e1318b20d47830a7d76/src/Data/Oktade/Classfile/Class/Fields/AccessFlags.hs | haskell | |
License: Apache-2.0
Types and functions for parsing and unparsing the access flags of classfile
fields.
* Access Flags
------------------------------------------------------------------------------
------------------------------------------------------------------------------
stored as a bit map.
More about ... | Module : Data . Oktade . Classfile . Class . Fields . AccessFlags
module Data.Oktade.Classfile.Class.Fields.AccessFlags
FieldAccessFlags (..),
FieldAccessFlag (..),
)
where
import Data.Bits ((.&.), (.|.))
import Data.ByteString.Builder (word16BE)
import Data.Oktade.ByteConstant (Word16Constant (..))
import... |
f28ba3ec48106b10b2b7af1f6a34a3637d098827d816753fc3e314b7878a146c | ruudkoot/functional-programming | Assignment3.hs | {- This is a framework in which all functions to be written are "undefined". -
- Note that in most cases parameters, pattern-matching and guards have been -
- omitted! You will have to add those yourself. -}
module Assignment3 where
import Control.Arrow ((&&&))
import Data.Function (o... | null | https://raw.githubusercontent.com/ruudkoot/functional-programming/9ee7c79cb44704c11027b0639a8b061dfacac56f/3-TypeClasses/Assignment3.hs | haskell | This is a framework in which all functions to be written are "undefined". -
- Note that in most cases parameters, pattern-matching and guards have been -
- omitted! You will have to add those yourself.
| Containers
| Poker
ANSWER
ANSWER |
module Assignment3 where
import Control.Arrow ((&&&))
import Data.Function (on)
import Data.List (foldl', group, sort, sortBy)
import Data.Set (Set, empty, insert)
data Rose a = a :> [Rose a]
deriving (Eq, Show)
* Exercise 1
instance Functor Rose where
fmap = undefined
class Monoid a where
... |
f078f3230429f40bab41fd932f79942a25d98b94d88feaea88d11fc6e47e2ce4 | McCLIM/McCLIM | list.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) copyright 2018 - 2022 Jan Moringen < >
;;;
;;; --------------------------------------... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/ee506540cdf22bc9580e75e91f33c7fa335f35e4/Apps/Clouseau/src/objects/list.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Places, inspection methods ... | ( c ) copyright 2018 - 2022 Jan Moringen < >
(cl:in-package #:clouseau)
(defclass car-place (basic-place)
())
(defmethod value ((place car-place))
(car (cell place)))
(defmethod (setf value) (new-value (place car-place))
(setf (car (cell place)) new-value))
(defclass cdr-place (basic-place)
())
(defm... |
87c014e97f153faadd5a08790987b0bdfa8db2269f291c00293f5ce2b54671e8 | cornell-netlab/yates | Simulate_TM.ml | open Core
open Simulate_Switch
open Simulation_Types
open Simulation_Util
open Yates_routing.Util
open Yates_solvers.Solvers
open Yates_types.Types
open Yates_utils
(***********************************************************)
Simulate one traffic matrix and generate statistics
(*************************************... | null | https://raw.githubusercontent.com/cornell-netlab/yates/fc30922933fae3184923f7b138d24454a9537536/simulator/Simulate_TM.ml | ocaml | *********************************************************
*********************************************************
Use actual demands for Optimal, without any budget restriction
assert (probabilities_sum_to_one sch);
if we hadn't seen this key earlier
we have already processed it
Return a topology with residual... | open Core
open Simulate_Switch
open Simulation_Types
open Simulation_Util
open Yates_routing.Util
open Yates_solvers.Solvers
open Yates_types.Types
open Yates_utils
Simulate one traffic matrix and generate statistics
Compute a routing scheme for an algorithm and apply budget by pruning the
top - k paths . Al... |
9083c5b8932e62aa11d6d0eb543807d23a7708b39ba8539a702594e3651571b7 | ilovemysillybanana/hclparser | lexer.erl | -file("/usr/local/Cellar/erlang/22.3.3/lib/erlang/lib/parsetools-2.1.8/include/leexinc.hrl", 0).
%% The source of this file is part of leex distribution, as such it
%% has the same Copyright as the other files in the leex
%% distribution. The Copyright is defined in the accompanying file
COPYRIGHT . However , the res... | null | https://raw.githubusercontent.com/ilovemysillybanana/hclparser/5bfd1eb50d7489c4755d6bfcf47044b77a5d18f7/src/lexer.erl | erlang | The source of this file is part of leex distribution, as such it
has the same Copyright as the other files in the leex
distribution. The Copyright is defined in the accompanying file
property of the creator of the scanner and is not covered by that
Copyright.
User code. This is placed here to allow extra attribut... | -file("/usr/local/Cellar/erlang/22.3.3/lib/erlang/lib/parsetools-2.1.8/include/leexinc.hrl", 0).
COPYRIGHT . However , the resultant scanner generated by is the
-module(lexer).
-export([string/1,string/2,token/2,token/3,tokens/2,tokens/3]).
-export([format_error/1]).
-file("src/lexer.xrl", 40).
-file("/usr/local... |
e2e1f4e9c33e83f28cdedd592d96deb3736faf73641c7e03afb212bd04fe63bd | janestreet/hardcaml | test_fifo.ml | Tests for the [ Fifo ] module . We speak about a [ classic ] and [ showahead ] which
differ in when the output data appears . In classic mode it is 1 cycle after a read ,
while in showahead mode it is valid along with the empty flags deassertion .
differ in when the output data appears. In classic mode ... | null | https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/test/lib/test_fifo.ml | ocaml | Tests for the [ Fifo ] module . We speak about a [ classic ] and [ showahead ] which
differ in when the output data appears . In classic mode it is 1 cycle after a read ,
while in showahead mode it is valid along with the empty flags deassertion .
differ in when the output data appears. In classic mode ... | |
a2dec9297e831aa6bac3e17c9a6bb9359161280d7c3bde5a833ad54cd9febd4a | lukaszcz/coqhammer | tacopts.mli | (* sauto tactic options - interface *)
open Ltac_plugin
open Sauto
type sopt_t =
SONop
| SOUse of Constrexpr.constr_expr list
| SOGen of Constrexpr.constr_expr list
| SOUnfold of Libnames.qualid list
| SOUnfoldAll
| SOUnfoldNone
| SOAlwaysUnfold of Libnames.qualid list
| SOAlwaysUnfoldAll
| SOAlwaysUnfoldNone
| SOI... | null | https://raw.githubusercontent.com/lukaszcz/coqhammer/fe83fb0eaf33f56da9ea1983114d0d94a2c41b9b/src/tactics/tacopts.mli | ocaml | sauto tactic options - interface
continuation |
open Ltac_plugin
open Sauto
type sopt_t =
SONop
| SOUse of Constrexpr.constr_expr list
| SOGen of Constrexpr.constr_expr list
| SOUnfold of Libnames.qualid list
| SOUnfoldAll
| SOUnfoldNone
| SOAlwaysUnfold of Libnames.qualid list
| SOAlwaysUnfoldAll
| SOAlwaysUnfoldNone
| SOInv of Libnames.qualid list
| SOInvAll
|... |
99c037c687900c5f79478d17f4e5f27e9e246a3dd847b5879d6abe969b7e99f7 | weavejester/compojure-template | compojure.clj | (ns leiningen.new.compojure
(:require [leiningen.core.main :as main]
[leiningen.new.templates :refer [renderer year project-name
->files sanitize-ns name-to-path
multi-segment]]))
(def render (renderer "compojure"))... | null | https://raw.githubusercontent.com/weavejester/compojure-template/59fcb3be9d5db37d0a841fce2dbc82496b4537ad/src/leiningen/new/compojure.clj | clojure | (ns leiningen.new.compojure
(:require [leiningen.core.main :as main]
[leiningen.new.templates :refer [renderer year project-name
->files sanitize-ns name-to-path
multi-segment]]))
(def render (renderer "compojure"))... | |
7d3fef3fd661d96fae4d3d1f121d9e80d86e412175d2409351858597d4da0b4d | nicolasavru/cl-nn | run.lisp | (ql:quickload "cl-nn")
(in-package cl-nn)
(setf *random-state* (make-random-state t))
(let ((net-fname)
(data-fname)
(output-fname)
(net)
(data)
(alpha)
(epochs)
(training-p)
(sizes))
(setf training-p (y-or-n-p "Train a neural network?"))
(if (and training-p (y-or-... | null | https://raw.githubusercontent.com/nicolasavru/cl-nn/eccc5e5ef7b2e82126ff5db826bce60b965413db/run.lisp | lisp | (ql:quickload "cl-nn")
(in-package cl-nn)
(setf *random-state* (make-random-state t))
(let ((net-fname)
(data-fname)
(output-fname)
(net)
(data)
(alpha)
(epochs)
(training-p)
(sizes))
(setf training-p (y-or-n-p "Train a neural network?"))
(if (and training-p (y-or-... | |
0592073e4b10c4e1ad79f3b67e53548535674aa0afeb333e1f4bcab776970b42 | typedclojure/auto-annotation | project.clj | (defproject runtime-infer-demo "0.1.0-SNAPSHOT"
:description "See README"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:repositories {"sonatype-oss-public" "/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha11"]
;; minimum version for runtime inference
... | null | https://raw.githubusercontent.com/typedclojure/auto-annotation/d51e489379ab0f190ed7f728db73b6ce961fdbd6/project.clj | clojure | minimum version for runtime inference
must add these injections | (defproject runtime-infer-demo "0.1.0-SNAPSHOT"
:description "See README"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:repositories {"sonatype-oss-public" "/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha11"]
[org.clojure/core.typed "0.3.26"]
... |
8cd817a195cae484348e845b6b42451e3b2965b8f83f9b61e8f18fcc0840a30c | yesodweb/persistent | mongo.hs | #!/usr/bin/env stack
-- stack --resolver lts-9.21 script
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGU... | null | https://raw.githubusercontent.com/yesodweb/persistent/bf4c3ae430d7e7ec0351a768783d73e6bd265890/.github/reproductionTemplates/mongo.hs | haskell | stack --resolver lts-9.21 script
# LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell # | #!/usr/bin/env stack
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
import Control.Monad.Logger (runStdoutLoggingT)
import Control.Monad.IO.Class (liftIO)
import Database.Persist
import Database.Persist.... |
710d11813080dbe179c680dc327924506e60564901ade59de5c1ecbb0699b559 | darkling/lagra | lagra_store_trivial_sup.erl | @private
-module(lagra_store_trivial_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [#{id => store,
start => {lagra_store_trivial, start_link, []}}
],
{ok, {{simple_one_for_one, 1, 5}, P... | null | https://raw.githubusercontent.com/darkling/lagra/6827ea20db86aeb4c139db45bd3133ffccfddb7d/src/lagra_store_trivial_sup.erl | erlang | @private
-module(lagra_store_trivial_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [#{id => store,
start => {lagra_store_trivial, start_link, []}}
],
{ok, {{simple_one_for_one, 1, 5}, P... | |
6923c99986a7db26b77a9a117f9092fc36053d03ab367a1862fb4b1ee154df37 | ghc/testsuite | tcfail035.hs | -- !!! instances with empty where parts: duplicate
--
module ShouldFail where
data NUM = ONE | TWO
instance Num NUM
instance Num NUM
instance Eq NUM
instance Show NUM
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail035.hs | haskell | !!! instances with empty where parts: duplicate
| module ShouldFail where
data NUM = ONE | TWO
instance Num NUM
instance Num NUM
instance Eq NUM
instance Show NUM
|
45e1496ab6949b2929367e5352b89d52e9cd0f9d8350c2e393f73407870197b6 | haskell-suite/haskell-src-exts | QuasiQuoteSplice.hs | # LANGUAGE TemplateHaskell , RankNTypes #
{-# OPTIONS_GHC -F -pgmFtrhsx #-}
import Language.Haskell.TH
data PageFunction m a = PF
main = let a = mkName "a" in
runQ [t| forall m. PageFunction m $(conT (mkName "a")) |] >>= print
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/QuasiQuoteSplice.hs | haskell | # OPTIONS_GHC -F -pgmFtrhsx # | # LANGUAGE TemplateHaskell , RankNTypes #
import Language.Haskell.TH
data PageFunction m a = PF
main = let a = mkName "a" in
runQ [t| forall m. PageFunction m $(conT (mkName "a")) |] >>= print
|
4f18f88cef11d64989d62a207c04dbe03853759cda66c87e3fdaf7ad54369527 | mmottl/aifad | algdt_utils.ml |
AIFAD - Automated Induction of Functions over
Author :
email :
WWW :
Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence
Copyright ( C ) 2003-
This library is free software ; you can redistribute it and/or
modify it under the terms of t... | null | https://raw.githubusercontent.com/mmottl/aifad/b06786f5cd60992548405078a903ee3d962ea969/src/algdt_utils.ml | ocaml | Miscellaneous general definitions
XXX implementation dependent!
Conversion: undecorated -> decorated
Calculation of histograms and contingency tables
Split variables on some given variable without adding subvariables.
Split variables on some variable and add possible subvariables
(left, X (x, y), right) ->... |
AIFAD - Automated Induction of Functions over
Author :
email :
WWW :
Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence
Copyright ( C ) 2003-
This library is free software ; you can redistribute it and/or
modify it under the terms of t... |
3d70c0ba123b21697ab167f18d7d3aa4544db1ecb46131932bfe4d77f4590b7d | hopv/homusat | analysis.mli | (* Analysis of the input file *)
val analyze : HFS.t -> LTS.t -> unit
| null | https://raw.githubusercontent.com/hopv/homusat/cc05711a3f9d45b253b83ad09a2d0288115cc4f4/analysis.mli | ocaml | Analysis of the input file |
val analyze : HFS.t -> LTS.t -> unit
|
69cda1b09bd6978fbc66f6acfa80d48330a0905312b16bf2d76d266c2b866d6b | ocaml/oasis-db | ODBTypes.ml |
* General types
@author
@author Sylvain Le Gall
*)
open Sexplib.Conv
TYPE_CONV_PATH "ODBTypes"
(** Name like package name *)
type name = string with sexp
* OASIS - DB user
type user = string with sexp
(** URL *)
type url = string with sexp
(** Filename *)
type filename = string with sexp
... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBTypes.ml | ocaml | * Name like package name
* URL
* Filename
* Dirname
* Date (ISO)
* Version
* A program, can be with or without full path |
* General types
@author
@author Sylvain Le Gall
*)
open Sexplib.Conv
TYPE_CONV_PATH "ODBTypes"
type name = string with sexp
* OASIS - DB user
type user = string with sexp
type url = string with sexp
type filename = string with sexp
type dirname = string with sexp
type date = CalendarLi... |
22a632f6cf949dbaf058b59bd67db2d39ca666a88bddcdd485e82e0e732da3c9 | erlang/otp | wx_xtra_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/eccc556e79f315d1f87c10fb46f2c4af50a63f20/lib/wx/test/wx_xtra_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2009 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 3 Nov 2008 by < >
-module(wx_xtra_SUITE).
-export([all/0, suite/0,groups/0,init_... |
d13a78bc7134f661b5c450989a28e2772b3ffd1ceef71061e94981b85658564b | launchdarkly/haskell-server-sdk | Reference.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE ViewPatterns #
-- |
-- Reference is an attribute name or path expression identifying a value within
-- a Context.
--
-- This type is mainly intended to be used internally by LaunchDarkly SDK and
-- service code, where efficiency is a major concern so it's desirable to do
-- any p... | null | https://raw.githubusercontent.com/launchdarkly/haskell-server-sdk/b8642084591733e620dfc5c1598409be7cc40a63/src/LaunchDarkly/Server/Reference.hs | haskell | |
Reference is an attribute name or path expression identifying a value within
a Context.
This type is mainly intended to be used internally by LaunchDarkly SDK and
service code, where efficiency is a major concern so it's desirable to do
any parsing or preprocessing just once. Applications are unlikely to need ... | # LANGUAGE NamedFieldPuns #
# LANGUAGE ViewPatterns #
is considered invalid . The error can be inspected with ' ' .
The string representation of an attribute reference in JSON
If the first character is not a slash , the string is interpreted literally
If the first character is a slash , the string is interpr... |
a9d488dda17e68c4a272f5f92c8ebecad2ae8ecfc09daf04aba556368278a671 | ocaml-omake/omake | omake_shell_spawn.ml | This is the module for subprocess execution derived from OCamlnet .
It is only meant for Unix . If available , it takes advantage from the
posix_spawn call .
Copyright ( C ) 2014 by
This file is licensed under the same conditions as omake . This work
was sponsored by Lexifi .
It is ... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/shell/omake_shell_spawn.ml | ocaml | Wrapping the library function
Check whether we can use the faster posix_spawn
emulate chdir. We are single-threaded, so this is easy: | This is the module for subprocess execution derived from OCamlnet .
It is only meant for Unix . If available , it takes advantage from the
posix_spawn call .
Copyright ( C ) 2014 by
This file is licensed under the same conditions as omake . This work
was sponsored by Lexifi .
It is ... |
e27ec6f5d6a934b1d955fe674d67b25ff7407604947d9695195c69f3b094cea4 | kind2-mc/kind2 | Res.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/utils/Res.ml | ocaml | * A result for some computation. [Ok] or [Error] of [Format.formatter]
* Unwraps a result.
* Maps functions to [Ok] or [Err].
* Maps a function to a result if it's [Error].
* Feeds a result to a function returning a result, propagates if argument's
an error.
* Fold over a list of results.
* Map over a list with a ... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... |
f1a7adf55f6231d4dd14ccf57e9cd2b2b44cbd5e194f827048d7e8a08656eae9 | ardumont/haskell-lab | RBTTests.hs | module RBTTests where
import Data.List (nub, sort)
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit
import Test.QuickCheck
import Tree.... | null | https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/test/RBTTests.hs | haskell | import Test.Framework.Options (TestOptions, TestOptions'(..))
deepCheck :: Testable prop => prop -> IO ()
tony@dagobah (1,06,) 13:43:47 ~/repo/perso/haskell-lab (master) $ make rbt-tests
Properties Total
instance Arbitrary (Tree a) where
arbitrary = oneof [ return Empty, arbitrary ]
sizedArbTestTree 0 = retur... | module RBTTests where
import Data.List (nub, sort)
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.HUnit
import Test.QuickCheck
import Tree.... |
02de2ee88b126e4b6ffc3fb9207804ab7b4a2e1ee9145c4e42455e0ac1826640 | MinaProtocol/mina | graphql_scalars.ml | open Graphql_basic_scalars.Utils
open Graphql_basic_scalars.Testing
module Make (Schema : Schema) = struct
module Action =
Make_scalar_using_to_string
(Snark_params.Tick.Field)
(struct
let name = "Action"
let doc = "action"
end)
(Schema)
end
include Make (Schema)
let%te... | null | https://raw.githubusercontent.com/MinaProtocol/mina/9a97ea71909a802f2ade0305a8069f7cbace5619/src/lib/snark_params/unix/graphql_scalars.ml | ocaml | open Graphql_basic_scalars.Utils
open Graphql_basic_scalars.Testing
module Make (Schema : Schema) = struct
module Action =
Make_scalar_using_to_string
(Snark_params.Tick.Field)
(struct
let name = "Action"
let doc = "action"
end)
(Schema)
end
include Make (Schema)
let%te... | |
962ea02d97fc873d7fe92ca3caa1a4af33d85d095e772c638e6e6203e1225f11 | leo-project/leo_gateway | leo_gateway_http_req_handler.erl | %%======================================================================
%%
Leo Gateway
%%
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a... | null | https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_gateway_http_req_handler.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 permis... | Leo Gateway
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
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
Request Handler
... |
90ecdef716697543cafb2df6ee3a62da3c569ee9d8ef15823a67d993aca1bd8c | scslab/hails | SimpleApp.hs | {-# LANGUAGE OverloadedStrings #-}
module SimpleApp (server) where
import Hails.HttpServer
server :: Application
server _ _ = do
return $ Response ok200 [] topHtml
topHtml =
"<html>\
\ <head>\
\ <title>Simple static file server</title>\
\ <script src=\"/static/js/jquery-1.7.2.min.js\">... | null | https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/examples/SimpleStatic/SimpleApp.hs | haskell | # LANGUAGE OverloadedStrings # | module SimpleApp (server) where
import Hails.HttpServer
server :: Application
server _ _ = do
return $ Response ok200 [] topHtml
topHtml =
"<html>\
\ <head>\
\ <title>Simple static file server</title>\
\ <script src=\"/static/js/jquery-1.7.2.min.js\"></script>\
\ <script src=\"/st... |
e9a88989a03523185ec04a8dcd1c1239caadd9248ccf1f149893fd8daa546ba2 | GaloisInc/saw-script | Cryptol.hs | {-# Language DataKinds #-}
{-# Language GADTs #-}
{-# Language ImplicitParams #-}
{-# Language KindSignatures #-}
{-# Language OverloadedStrings #-}
{-# Language PatternSynonyms #-}
{-# Language PolyKinds #-}
{-# Language RankNTypes #-}
{-# Language ScopedTypeVariables #-}
{-# Language TypeApplications #-}
{-# Language... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/6cbe62adee8aed712184985937f7a6c1ec360275/crux-mir-comp/src/Mir/Cryptol.hs | haskell | # Language DataKinds #
# Language GADTs #
# Language ImplicitParams #
# Language KindSignatures #
# Language OverloadedStrings #
# Language PatternSynonyms #
# Language PolyKinds #
# Language RankNTypes #
# Language ScopedTypeVariables #
# Language TypeApplications #
# Language ViewPatterns #
used to run the function.... |
module Mir.Cryptol
where
import Control.Lens (use, (^.), (^?), _Wrapped, ix)
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.ByteString as BS
import Data.Functor.Const
import Data.IORef
import qualified Data.Kind as Kind
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Strin... |
bfb514cfe5c8b745604914ee681a8941078a7225ac4be6e13c5556e3f2111c43 | shop-planner/shop3 | p20.lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(INSTRUMENT INSTRUMENT3) (INSTRUMENT INSTRUMENT4)
(INSTRUMENT INSTRUMENT5) (INSTRUMENT INSTRUMENT6)
(INSTRUMENT INSTRUMENT7) (INSTRUMENT INSTRUMENT8)
(INSTRU... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/satellite/strips/p20.lisp | lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(INSTRUMENT INSTRUMENT3) (INSTRUMENT INSTRUMENT4)
(INSTRUMENT INSTRUMENT5) (INSTRUMENT INSTRUMENT6)
(INSTRUMENT INSTRUMENT7) (INSTRUMENT INSTRUMENT8)
(INSTRU... | |
c7a58db52d480af842f779202641ea29c15e819f78283dea4cecd5005db665db | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
main = cabalTest $ do
workdir <- fmap testWorkDir getTestEnv
let conf = workdir </> "cabal-config"
cabalG ["--config-file", conf] "user-config" ["init"]
shouldExist conf
fails $ cabalG ["--config-file", workdir </> "cabal-config"] "user-config" ["init"]
cabalG ["--confi... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/UserConfig/cabal.test.hs | haskell | import Test.Cabal.Prelude
main = cabalTest $ do
workdir <- fmap testWorkDir getTestEnv
let conf = workdir </> "cabal-config"
cabalG ["--config-file", conf] "user-config" ["init"]
shouldExist conf
fails $ cabalG ["--config-file", workdir </> "cabal-config"] "user-config" ["init"]
cabalG ["--confi... | |
51d4e962ffdec0a719b7883531e67d1a370fa295cd83fd3a8595f3782812fad2 | abella-prover/abella | tactics.ml | (****************************************************************************)
Copyright ( C ) 2007 - 2009 Gacek
Copyright ( C ) 2013 - 2022 Inria ( Institut National de Recherche
(* en Informatique et en Automatique) *)
(... | null | https://raw.githubusercontent.com/abella-prover/abella/7795951e17dc53d02b041f5b2ddb68161dd8ec2b/src/tactics.ml | ocaml | **************************************************************************
en Informatique et en Automatique)
(at your option) an... | Copyright ( C ) 2007 - 2009 Gacek
Copyright ( C ) 2013 - 2022 Inria ( Institut National de Recherche
This file is part of Abella .
Abella is free software : you can redistribute it and/or modify
it ... |
a62d8e11739c66aa36f1ca3383c6ee041f22e8eae9d97e1b69d23536c28c2881 | racket/drracket | option-snip.rkt | #lang racket
(require racket/gui)
(provide option-snip%
checkbox-snip%)
(define inset 2)
(define arrow-sep 5)
(define arrow-height 5)
(define arrow (list (make-object point% 0 0)
(make-object point% arrow-height arrow-height)
(make-object point% (* 2 arrow-height) 0))... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/browser/private/option-snip.rkt | racket | a box when we're looking (in case we're looking for #f)
called by an editor to get the snip's size
called by an editor to draw the snip
called by an editor to get the snip's size
called by an editor to draw the snip | #lang racket
(require racket/gui)
(provide option-snip%
checkbox-snip%)
(define inset 2)
(define arrow-sep 5)
(define arrow-height 5)
(define arrow (list (make-object point% 0 0)
(make-object point% arrow-height arrow-height)
(make-object point% (* 2 arrow-height) 0))... |
e0dae86569c013dd6c11f293bb65d173b2bbb3bdb244b35b5ccb5a72d6cea27b | byorgey/species | Class.hs | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Math.Combinatorics.Species.Class
Copyright : ( c ) 2010
-- License : BSD-style (see LICENSE)
-- Maintainer :
-- Stability : experimenta... | null | https://raw.githubusercontent.com/byorgey/species/5f1d99095e41b860e2bfbc3ba034109a8101846f/Math/Combinatorics/Species/Class.hs | haskell | ---------------------------------------------------------------------------
|
Module : Math.Combinatorics.Species.Class
License : BSD-style (see LICENSE)
Maintainer :
Stability : experimental
The Species type class, which defines a small DSL for describing
combinatorial species. Other modules ... | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2010
module Math.Combinatorics.Species.Class
(
Species(..)
, oneHole
, x
For example , we can use @'set ' ` o ` ' nonEmpty ' ' sets'@
instead of @'set ' ` o ` ' nonEmpty ' ' set'@.
, sets
, cycl... |
905a2c84612b788c4bcddcbd7ee81ad19290a69b4cd45dd36469d07427c0ec00 | erlang/otp | ct_groups.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/common_test/src/ct_groups.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2004 - 2023 . 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(ct_groups).
-export([find_groups/4]).
-export([make_all_conf/3, make_all_conf/4, make_conf/5]).
-export([d... |
4a3475c9984c3fdf503d097c53393fa7e5ae27a0dfe670308fe25186b4d029bb | serokell/servant-util | Sorting.hs | | Converting a sorting specification to a value understandable by Beam .
module Servant.Util.Beam.Postgres.Sorting
( SortingSpecApp
, fieldSort
, sortBy_
) where
import Universum
import Data.Coerce (coerce)
import Database.Beam.Backend.SQL (BeamSqlBackend)
import Database.Beam.Query (SqlOrderable, a... | null | https://raw.githubusercontent.com/serokell/servant-util/4821fc7dd982a5ff5127edf0fc26fd21cef8a355/servant-util-beam-pg/src/Servant/Util/Beam/Postgres/Sorting.hs | haskell | | Implements sorting for beam-postgres package.
TODO [DSCP-425]
nullsOrder = case siNullsOrder of
Nothing -> id
Just NullsFirst -> nullsFirst_
| Applies 'orderBy_' according to the given sorting specification. | | Converting a sorting specification to a value understandable by Beam .
module Servant.Util.Beam.Postgres.Sorting
( SortingSpecApp
, fieldSort
, sortBy_
) where
import Universum
import Data.Coerce (coerce)
import Database.Beam.Backend.SQL (BeamSqlBackend)
import Database.Beam.Query (SqlOrderable, a... |
adc688516084f1c8810b5a46b0385ab79f79a7ff1845f65489c5dffefdcdeb02 | HunterYIboHu/htdp2-solution | 23.3-list-pick.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-intermediate-lambda-reader.ss" "lang")((modname 23.3-list-pick) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor r... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section23-Simultaneous-Processing/23.3-list-pick.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
– (add1 N)
functions
[List-of Symbol] N -> Symbol
extracts the nth symbol from l;
signals an error if there is no such symbol | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname 23.3-list-pick) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
N is one of :
– 0
(check-error (list-p... |
0902aa68a0cfd4d7a122f4e9b67a943ff7c877cb7950df1dc55ef70013597a50 | Chris00/mesh | test.ml |
# load " bigarray.cma " ; ;
# load " graphics.cma " ; ;
# load " mesh.cma " ; ;
#load "bigarray.cma";;
#load "graphics.cma";;
#load "mesh.cma";;
*)
open Bigarray
open Printf
module M = Mesh_triangle
let pi = 4. *. atan 1.
(* Round [x] to the nearest integer *)
let round x = floor(x +. 0.5)
let triunsuitabl... | null | https://raw.githubusercontent.com/Chris00/mesh/a998a3d898b0013517a5f7f6078791b61e6a0fe2/src/test.ml | ocaml | Round [x] to the nearest integer
~max_area:0.001
Local Variables:
End: |
# load " bigarray.cma " ; ;
# load " graphics.cma " ; ;
# load " mesh.cma " ; ;
#load "bigarray.cma";;
#load "graphics.cma";;
#load "mesh.cma";;
*)
open Bigarray
open Printf
module M = Mesh_triangle
let pi = 4. *. atan 1.
let round x = floor(x +. 0.5)
let triunsuitable x1 y1 x2 y2 x3 y3 area = area > 0.001... |
767babc20325fb628c50d53e5b21d1df02c469e672acfe35f9bdd05c7acd5922 | facebookarchive/duckling_old | numbers.clj | (
; Context map
{}
"၀"
"သုံည"
"မရှိ"
(number 0)
"၁"
"တစ်"
"ပထမ"
(number 1)
"၂"
"နှစ်"
"ဒုတိယ"
(number 2)
"၃"
"သုံး"
"တတိယ"
(number 3)
"သုံးဆယ်"
(number 30)
"သုံးဆယ့်သုံး"
(number 33)
"ဆယ့်လေး"
(number 14)
"ဆယ့်ခုနှစ်"
(number 17)
"နှစ်ရာ"
(number ... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/my/corpus/numbers.clj | clojure | Context map | (
{}
"၀"
"သုံည"
"မရှိ"
(number 0)
"၁"
"တစ်"
"ပထမ"
(number 1)
"၂"
"နှစ်"
"ဒုတိယ"
(number 2)
"၃"
"သုံး"
"တတိယ"
(number 3)
"သုံးဆယ်"
(number 30)
"သုံးဆယ့်သုံး"
(number 33)
"ဆယ့်လေး"
(number 14)
"ဆယ့်ခုနှစ်"
(number 17)
"နှစ်ရာ"
(number 200)
"ကိုးရာ"... |
07438dfaefc984aaf8b46e41a1005070d8decd5c31a6d0664be529cd30a328d5 | paurkedal/batyr | content.ml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later ver... | null | https://raw.githubusercontent.com/paurkedal/batyr/13aa15970a60286afbd887685a816fcd5fc4976e/batyr-web/client/content.ml | ocaml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later ver... | |
deeddfa58d7a5fbaf915189c3343634678508d507ea0d9a8d6cedee8f203fab8 | mikeizbicki/subhask | Matrix.hs | # OPTIONS_GHC -fno - warn - missing - methods #
module SubHask.Algebra.Matrix
( Matrix (..)
, unsafeToModuleM
, ValidMatrix
, mmult
, transpose
, row
, col
, (!!)
, Matrix'(..)
)
where
import Data.Primitive hiding (sizeOf)
import Control.Monad.Primitive
import Control.Monad... | null | https://raw.githubusercontent.com/mikeizbicki/subhask/f53fd8f465747681c88276c7dabe3646fbdf7d50/src/SubHask/Algebra/Matrix.hs | haskell | | matrix type
#UNPACK#
row length (aka number of columns)
# INLINE (!!) #
| FiniteModule attempt
# INLINE unsafeToModuleM #
-------------------------------------
mutable
algebra
# INLINE (+) #
# INLINE (-) #
# INLINE (.*) #
# INLINE (.+) #
# INLINE (.*.) #
# INLINE (./) #
# INLINE (./.) #
---------------------... | # OPTIONS_GHC -fno - warn - missing - methods #
module SubHask.Algebra.Matrix
( Matrix (..)
, unsafeToModuleM
, ValidMatrix
, mmult
, transpose
, row
, col
, (!!)
, Matrix'(..)
)
where
import Data.Primitive hiding (sizeOf)
import Control.Monad.Primitive
import Control.Monad... |
97beefe90634f60ac3522998e4b076936b4687171ee030cb7828a7e5d042ff28 | mindreframer/clojure-stuff | logging.clj | (ns puppetlabs.trapperkeeper.logging
(:import [ch.qos.logback.classic Level PatternLayout]
(ch.qos.logback.core ConsoleAppender)
(org.slf4j Logger LoggerFactory)
(ch.qos.logback.classic.joran JoranConfigurator))
(:require [clojure.stacktrace :refer [print-cause-trace]]
[... | null | https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/puppetlabs/trapperkeeper/src/puppetlabs/trapperkeeper/logging.clj | clojure | (ns puppetlabs.trapperkeeper.logging
(:import [ch.qos.logback.classic Level PatternLayout]
(ch.qos.logback.core ConsoleAppender)
(org.slf4j Logger LoggerFactory)
(ch.qos.logback.classic.joran JoranConfigurator))
(:require [clojure.stacktrace :refer [print-cause-trace]]
[... | |
2697e4c89bd0b70eb0fd2dd006047f71ec07427ed78498ec90aec5558a26597d | mirage/ocaml-crunch | main.ml |
* Copyright ( c ) 2009 - 2013 Anil Madhavapeddy < >
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all co... | null | https://raw.githubusercontent.com/mirage/ocaml-crunch/f935901cd9715126be398830e6c49c4dfcea3e45/src/main.ml | ocaml |
* Copyright ( c ) 2009 - 2013 Anil Madhavapeddy < >
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all co... | |
a24ebed1c3c216e5384a7b4806a61c8788b2d3783009a38bf44184f94c783a84 | ChrisPenner/json-to-haskell | Flags.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Flags where
import Options.Applicative
import JsonToHaskell
import Text.RawString.QQ (r)
import Text.PrettyPrint.ANSI.Leijen
optionsParserInfo :: ParserInfo Options
optionsParserInfo = info (optionParser <*... | null | https://raw.githubusercontent.com/ChrisPenner/json-to-haskell/37276529efa2d861f061d8cf0642daef5ab8c47b/app/Flags.hs | haskell | # LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Flags where
import Options.Applicative
import JsonToHaskell
import Text.RawString.QQ (r)
import Text.PrettyPrint.ANSI.Leijen
optionsParserInfo :: ParserInfo Options
optionsParserInfo = info (optionParser <*... | |
bbf521b2367d01760e13cc354ba9906f6fed3fd46e08f8348f580f371e7ef927 | steffan-westcott/clj-otel | config.clj | (ns ^:no-doc steffan-westcott.clj-otel.config
"Configuration of clj-otel library."
(:require [clojure.java.io :as io]))
(def config
"Configuration map of the clj-otel library."
(-> "steffan_westcott/clj_otel/config.edn"
io/resource
slurp
read-string))
| null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/b227831fbf71062f68527321837d5e3cf75990b1/clj-otel-api/src/steffan_westcott/clj_otel/config.clj | clojure | (ns ^:no-doc steffan-westcott.clj-otel.config
"Configuration of clj-otel library."
(:require [clojure.java.io :as io]))
(def config
"Configuration map of the clj-otel library."
(-> "steffan_westcott/clj_otel/config.edn"
io/resource
slurp
read-string))
| |
19b4f251154a3649075b3d146c584321ec8f7f2c62842363f628035e16e4c4f6 | slipstream/SlipStreamServer | session_template_internal_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.session-template-internal-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.session-template :as st]
[com.sixsq.slipstream.ssclj.resources.spec.session-template-internal :as session-tpl]
[com.sixsq.slipstream.ssclj.res... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/spec/session_template_internal_test.cljc | clojure | (ns com.sixsq.slipstream.ssclj.resources.spec.session-template-internal-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.session-template :as st]
[com.sixsq.slipstream.ssclj.resources.spec.session-template-internal :as session-tpl]
[com.sixsq.slipstream.ssclj.res... | |
d705facc9abca4e3f77a070b8b89b250de78d22bcffbff0105346eaed849d5d8 | esl/MongooseIM | pep_SUITE.erl | %%%===================================================================
( C ) 2016 , Erlang Solutions Ltd.
%%% @doc Suite for testing Personal Eventing Protocol features
as described in XEP-0163
%%% @end
%%%===================================================================
-module(pep_SUITE).
-include_lib("... | null | https://raw.githubusercontent.com/esl/MongooseIM/56f756c9e03c9efcbae8ea21e3be3fef8c1fec8c/big_tests/tests/pep_SUITE.erl | erlang | ===================================================================
@doc Suite for testing Personal Eventing Protocol features
@end
===================================================================
--------------------------------------------------------------------
Suite configuration
----------------------------... | ( C ) 2016 , Erlang Solutions Ltd.
as described in XEP-0163
-module(pep_SUITE).
-include_lib("escalus/include/escalus.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("exml/include/exml.hrl").
-include_lib("eunit/include/eunit.hrl").
-export... |
ba52fd70ab1bcef2416ee8e801e301f39cafa97452ca442a2e38388c8b7810ab | metaocaml/ber-metaocaml | printtyp.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/printtyp.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Types
open Outcometree
val longident: formatter -> Longident.t -> unit
val ident: form... |
a9c944d6028eb189fe319a1f046cfb034d14b8727edc7d1d1fc6a4e71d46b969 | TDacik/Deadlock | CFA_analysis_utils.ml | Predefined instances of parameters of CFA analysis functor .
*
* Author : ( ) , 2021
*
* Author: Tomas Dacik (), 2021
*)
open Trace_utils
open Cil_datatype
include CFA_analysis_signatures
(** No function refinement is performed *)
module No_refinement (State : STATE) (Results : RESULTS) = struct
t... | null | https://raw.githubusercontent.com/TDacik/Deadlock/4bc4d1db2a74731138f181c645da2227b4d178cf/src/cfa_analysis/CFA_analysis_utils.ml | ocaml | * No function refinement is performed
Folowing functions are never called
* Summary caching visited functions.
* Summary caching visited functions separately for different threads. | Predefined instances of parameters of CFA analysis functor .
*
* Author : ( ) , 2021
*
* Author: Tomas Dacik (), 2021
*)
open Trace_utils
open Cil_datatype
include CFA_analysis_signatures
module No_refinement (State : STATE) (Results : RESULTS) = struct
type state = State.t
type results = Result... |
3930fa8968a5370c51a18dad4d9ae7ab1c926293c339de8edd71f7d8a059790a | juxt/skip | notify.clj | (ns skip.notify)
(defprotocol INotify
(notify [_ ev] "Callback on state changes further down in the tree. Always update! the record first, then notify any watchers."))
(extend-protocol INotify
clojure.lang.Fn
(notify [f ev] (f ev)))
(defprotocol IWatchable
(watch [_ watcher] "Register an observer")
(unwatc... | null | https://raw.githubusercontent.com/juxt/skip/114b3105993f8cd062be913e21b81a15af825702/src/skip/notify.clj | clojure | (ns skip.notify)
(defprotocol INotify
(notify [_ ev] "Callback on state changes further down in the tree. Always update! the record first, then notify any watchers."))
(extend-protocol INotify
clojure.lang.Fn
(notify [f ev] (f ev)))
(defprotocol IWatchable
(watch [_ watcher] "Register an observer")
(unwatc... | |
cf10f205085368835a8e16a9ad11b4ffa3aa58379c7306ef2a0b0abec6135142 | janegca/htdp2e | Exercise-346-render-item1.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-intermediate-lambda-reader.ss" "lang")((modname Exercise-346-render-item1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t co... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-346-render-item1.rkt | racket | about the language level of this file in a form that our tools can easily process.
test; make sure that the tests are formulated so that they don’t truly
depend on the nature of BULLET. Then explain how the function works; keep
in mind that the purpose statement explains only what it does.
-- functions from exerc... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-346-render-item1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 346 .
Before you read on ... |
1bce68665cdff0fd06713f538e7aefc2f4c7e3434819da7bbf3d0c221d23a854 | jdstmporter/Distributed-Haskell | Common.hs | {-# LANGUAGE DeriveDataTypeable #-}
-- | Common type for message passing by distributed stores. Used only by store implementations.
module Distributed.Storage.Common where
import Data.ByteString.Lazy (ByteString)
import Data.Binary (Binary,Get,Put,get,put)
import Data.Typeable
-- | Basic type that is used to pass ... | null | https://raw.githubusercontent.com/jdstmporter/Distributed-Haskell/a176f51f5cf197de2717f41b74f1ca3e71ae863a/src/Distributed/Storage/Common.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Common type for message passing by distributed stores. Used only by store implementations.
| Basic type that is used to pass messages between client and server. Messages
as part of making it 'Remote.Serializable'.
| Make it 'Data.Binary.Binary' to enable 'Remote.Serializable'. ... |
module Distributed.Storage.Common where
import Data.ByteString.Lazy (ByteString)
import Data.Binary (Binary,Get,Put,get,put)
import Data.Typeable
either push some data , request a pull , or request an exchange . Derives ' Data . Typeable . '
data DataMessage = Push [ByteString] | Pull | Exchange
der... |
92b7f9911111fad21818cbad95cb4da74f7e4dc3ed188705dd8a6a5b423d8d72 | mikelevins/folio2 | taps-functions.lisp | ;;;; ***********************************************************************
;;;;
;;;; Name: functions.lisp
;;;; Project: folio2 - Functional idioms for Common Lisp
;;;; Purpose: tap functions
;;;; Author: mikel evins
Copyright : 2015 by mikel evins
;;;;
;;;; *************************... | null | https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/taps-functions.lisp | lisp | ***********************************************************************
Name: functions.lisp
Project: folio2 - Functional idioms for Common Lisp
Purpose: tap functions
Author: mikel evins
***********************************************************************
-----------------------... | Copyright : 2015 by mikel evins
(in-package :net.bardcode.folio2.taps)
(defmethod characters ((in cl:pathname)) (series:scan-file in 'cl:read-char))
(defmethod characters ((in cl:stream)) (series:scan-stream in 'cl:read-char))
(defmethod characters ((str cl:string))
(with-input-from-string (in str)
(c... |
5bc6b69e480178ccf8ba00303886c103ca7c806a914711015f9995cfbe3ee95e | hiratara/Haskell-Nyumon-Sample | chap08-samples-8-2-3.hs | import Control.Monad (forM_)
import Control.Exception (bracket_)
import Control.Concurrent
data SharedResource a = SharedResource QSem a
newSharedResource :: Int -> a -> IO (SharedResource a)
newSharedResource n v = do
sem <- newQSem n
return $ SharedResource sem v
withSharedResource :: SharedResource a -> (a ->... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap08-samples/chap08-samples-8-2-3.hs | haskell | import Control.Monad (forM_)
import Control.Exception (bracket_)
import Control.Concurrent
data SharedResource a = SharedResource QSem a
newSharedResource :: Int -> a -> IO (SharedResource a)
newSharedResource n v = do
sem <- newQSem n
return $ SharedResource sem v
withSharedResource :: SharedResource a -> (a ->... | |
af7a6048171b83d242d6032fccdbfbd329060212f166d49b866c007ad01015b7 | auser/hermes | thrift_disk_log_transport.erl | %%%-------------------------------------------------------------------
%%% File : thrift_disk_log_transport.erl
Author : < >
%%% Description : Write-only Thrift transport outputting to disk_log
Created : 22 Apr 2008 by < >
%%%
%%% Todo: this might be better off as a gen_server type of transport
t... | null | https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/deps/thrift/src/thrift_disk_log_transport.erl | erlang | -------------------------------------------------------------------
File : thrift_disk_log_transport.erl
Description : Write-only Thrift transport outputting to disk_log
Todo: this might be better off as a gen_server type of transport
-------------------------------------------------------------------
API
thri... | Author : < >
Created : 22 Apr 2008 by < >
that handles stuff like group commit , similar to TFileTransport
in cpp land
-module(thrift_disk_log_transport).
-behaviour(thrift_transport).
-export([new/2, new_transport_factory/2, new_transport_factory/3]).
-export([read/2, write/2, force_flus... |
2bd926777abae455157725bb0010b17c8ebcb3d50bbe9c3161eb63bf54747aa7 | Bogdanp/koyo | dispatch.rkt | #lang racket/base
(require koyo/dispatch
koyo/testing
racket/function
rackunit
web-server/dispatch
web-server/dispatchers/dispatch)
(provide
dispatch-tests)
(define (home-page req)
'home)
(define ((order-page orders) req id)
'order)
(define ((admin:edit-order-page ... | null | https://raw.githubusercontent.com/Bogdanp/koyo/93f3fd06ee596a62bb0b286cb6290a800e911154/koyo-test/koyo/dispatch.rkt | racket | #lang racket/base
(require koyo/dispatch
koyo/testing
racket/function
rackunit
web-server/dispatch
web-server/dispatchers/dispatch)
(provide
dispatch-tests)
(define (home-page req)
'home)
(define ((order-page orders) req id)
'order)
(define ((admin:edit-order-page ... | |
1bc8168c11fedfdd6e8b8a3c5f3f6e137b00a5d2d9edd7a003532291bd8851dc | damn/cdq | spawn.clj | (ns game.monster.spawn
(:use data.grid2d
utils.core
engine.render
(game.monster defmonster)
(game.components core body render)
game.maps.data
[game.item.instance :only (create-item-body)]
(game.utils random random)))
(defn try-spawn [posi monster-type & {debug ... | null | https://raw.githubusercontent.com/damn/cdq/5dbe979da6c198091ad86748f04054ebe1df7981/src/game/monster/spawn.clj | clojure | dont spawn monsters near the start locations of the levels ... so a calm start... start-positions need to be translated to tile middle !!
returning it
same code @ item-boni
concat so the map is a sequence of its elements
deactivated because problem with 'current-animation' in game.render and because
sleeping mons... | (ns game.monster.spawn
(:use data.grid2d
utils.core
engine.render
(game.monster defmonster)
(game.components core body render)
game.maps.data
[game.item.instance :only (create-item-body)]
(game.utils random random)))
(defn try-spawn [posi monster-type & {debug ... |
b0e8d9f61ad41e2e97b4e5769b03fc278eb87b3d53b3a682772f8090863ec816 | helix-collective/hx-deploy-tool | S3.hs | {-# LANGUAGE OverloadedStrings #-}
module Util.Aws.S3(
adlValueFromS3,
adlValueToS3,
deleteObject,
downloadFileFrom,
extendObjectKey,
listObjects,
listObjectsPrefixesAndNames,
objectExists,
readObject,
splitPath,
S3.BucketName,
S3.ObjectKey,
S3Metadata(..),
S3Path,
) where
import qualified ... | null | https://raw.githubusercontent.com/helix-collective/hx-deploy-tool/74ad135308157d54ba73818341e86ae91ba3c09e/src/Util/Aws/S3.hs | haskell | # LANGUAGE OverloadedStrings #
returns (prefix,name)
no value at the specified S3 key. | module Util.Aws.S3(
adlValueFromS3,
adlValueToS3,
deleteObject,
downloadFileFrom,
extendObjectKey,
listObjects,
listObjectsPrefixesAndNames,
objectExists,
readObject,
splitPath,
S3.BucketName,
S3.ObjectKey,
S3Metadata(..),
S3Path,
) where
import qualified Data.ByteString as BS
import qualif... |
2d28a2d6d574d5083ab6ad4ba401ffb15c5e0a2361c2de96707985d49109cdfb | robstewart57/hdph-rs | fib.hs | Fibonacci numbers in
--
Author :
-----------------------------------------------------------------------------
# LANGUAGE TemplateHaskell #
module Main where
import Prelude
import Control.Exception (evaluate)
import Control.Monad (when)
import Data.Functor ((<$>))
import Data.List (elemIndex, stripPrefix)
imp... | null | https://raw.githubusercontent.com/robstewart57/hdph-rs/5074e7de02ec13707361b1c117fa25c8a796b59e/src/Test/HdpH/fib.hs | haskell |
---------------------------------------------------------------------------
---------------------------------------------------------------------------
'Static' declaration
declare Static deserialisers
from imported modules
from imported modules
---------------------------------------------------------------------... | Fibonacci numbers in
Author :
# LANGUAGE TemplateHaskell #
module Main where
import Prelude
import Control.Exception (evaluate)
import Control.Monad (when)
import Data.Functor ((<$>))
import Data.List (elemIndex, stripPrefix)
import Data.Maybe (fromJust)
import Data.Monoid (mconcat)
import Data.Time.Clock (No... |
bd24cef4ea0cef93021b9fd53614d8142eed7c0ccb5ae06f837e89c3eabf0009 | cxphoe/SICP-solutions | connector.rkt | ;;constructor procedures
(define (make-connector)
(let ((value false) (informant false) (constraints '()))
;;--informant: is set to avoid the change of connector value
;; affecting the relative connector in the informant.
;;--constraints: constaint inside represent the relations between
... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/3.Changed%20Data/connector.rkt | racket | constructor procedures
--informant: is set to avoid the change of connector value
affecting the relative connector in the informant.
--constraints: constaint inside represent the relations between
local connector and others.
create a new constraint
other connectors in its constraints.
--... | (define (make-connector)
(let ((value false) (informant false) (constraints '()))
(define (set-my-value newval setter)
(cond ((not (has-value? me))
(set! value newval)
(set! informant setter)
(for-each-except setter
inform-about-value
... |
266cc378ba34ec6823446e84a1987b22ba4315a898c48397c0f7163a354c240f | rd--/hsc3 | stepper.help.hs | -- stepper
let i = impulse kr 10 0
f = stepper i 0 4 16 (-3) 4 * 100
in sinOsc ar f 0 * 0.1
-- stepper ; mouse button press increments integer frequency multiplier
let tr = trig1 (mouseButton kr 0 1 0) controlDur
fr = 55 * stepper tr 0 1 17 1 1
in sinOsc ar fr 0 * 0.1
stepper ; with bufRd for sequencing
let... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/stepper.help.hs | haskell | stepper
stepper ; mouse button press increments integer frequency multiplier | let i = impulse kr 10 0
f = stepper i 0 4 16 (-3) 4 * 100
in sinOsc ar f 0 * 0.1
let tr = trig1 (mouseButton kr 0 1 0) controlDur
fr = 55 * stepper tr 0 1 17 1 1
in sinOsc ar fr 0 * 0.1
stepper ; with bufRd for sequencing
let compose = foldl (flip (.)) id
rvbId z0 s =
let f z1 i =
let ... |
2925f0fde47c6dbb1f8c2ceba57678e0ee67c335fb0a6e0039a83cb29ca82aee | soulomoon/SICP | Exercise 2.22.scm | Exercise 2.22 : tries to rewrite the first square - list procedure of Exercise 2.21 so that it evolves an iterative process :
; (define (square-list items)
; (define (iter things answer)
; (if (null? things)
; answer
; (iter (cdr things)
; (cons (square (car things))
; ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.22.scm | scheme | (define (square-list items)
(define (iter things answer)
(if (null? things)
answer
(iter (cdr things)
(cons (square (car things))
answer))))
(iter items nil))
Unfortunately, defining square-list this way produces the answer list in the reverse order of ... | Exercise 2.22 : tries to rewrite the first square - list procedure of Exercise 2.21 so that it evolves an iterative process :
recursive is down up while iter is down-up, the upest in the downest
only make (cdr x) be the element of x, so it went wrong |
f6aa9d991996b57be9e05fe7612b13e09ac967f6a80ad9f7e7593df8a9589660 | YoshikuniJujo/test_haskell | Internal.hs | # LANGUAGE ImportQualifiedPost #
# , LambdaCase #
{-# LANGUAGE ScopedTypeVariables, TypeApplications #-}
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds , PolyKinds #
{-# LANGUAGE KindSignatures, TypeOperators #-}
# LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts , FlexibleIn... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/27ccc38bc7eff9fe68d0aff14fa853826ffc73f6/themes/gui/vulkan/try-vulkan-middle/src/Gpu/Vulkan/Pipeline/Graphics/Middle/Internal.hs | haskell | # LANGUAGE ScopedTypeVariables, TypeApplications #
# LANGUAGE KindSignatures, TypeOperators #
# LANGUAGE PatternSynonyms, ViewPatterns # | # LANGUAGE ImportQualifiedPost #
# , LambdaCase #
# LANGUAGE GADTs , TypeFamilies #
# LANGUAGE DataKinds , PolyKinds #
# LANGUAGE MultiParamTypeClasses , AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts , FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.... |
63ab4bfd9579f44131f1451243aa6811a595c4e06fefdb1bb4a01bf6ba991d21 | peerdrive/peerdrive | store_SUITE.erl | -module(store_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include("store.hrl").
-define(get(Key, Config), proplists:get_value(Key, Config)).
-define(store(Config), proplists:get_value(store, Config)).
suite() ->
[{timetrap, {seconds, 10}}].
all() ->
[test_rw_readback_small, test_rw... | null | https://raw.githubusercontent.com/peerdrive/peerdrive/94389e2536cc9b1a0c168ec56ba3912910eb0c35/server/apps/peerdrive/test/store_SUITE.erl | erlang | Write and read back some small data
Write and read back a big chunk
now read back
Create a document and make sure flags are empty
Test that update of flags works
Test that update of a part doesn't change flags
Flags should be inherited when forking
Creator code must be stored as expected
Creator code must be s... | -module(store_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include("store.hrl").
-define(get(Key, Config), proplists:get_value(Key, Config)).
-define(store(Config), proplists:get_value(store, Config)).
suite() ->
[{timetrap, {seconds, 10}}].
all() ->
[test_rw_readback_small, test_rw... |
96d08f9fb215a1953cdab4898d618b484385bb5ea3268f498e113004a3d1b89a | np/hlatex | Align.hs | -- This module is supposed to provide a mean to align parts
-- of a text/code according to the rule:
` ` Characters vertically aligned with at least two spaces
-- before them in the source are aligned in output.''
-- Example:
foo : : Bar - >
-- -> Boo
-- foo = f . g
-- . h
--
-- ... | null | https://raw.githubusercontent.com/np/hlatex/4f2212c5db5e10dab7f6cbb9cf47a041b3320176/Text/Align.hs | haskell | This module is supposed to provide a mean to align parts
of a text/code according to the rule:
before them in the source are aligned in output.''
Example:
-> Boo
foo = f . g
. h
In this example `::' is aligned with `=',
`.' are aligned, and `->' are aligned.
The code is original... | ` ` Characters vertically aligned with at least two spaces
foo : : Bar - >
module Text.Align where
import Data.List
import Control.Arrow
import Control.Applicative
type Row = Int
type Col = Int
data Pos a = Pos {row :: !Row, col :: !Col, ann ... |
5ebf0d9c3fb0aa2d48883b350e16fd2e165ec736799b79957a122be32878663b | ktakashi/sagittarius-scheme | command-line.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; srfi/%3a193/command-line.scm - SRFI 193 Command line
;;;
Copyright ( c ) 2021 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/13ca71aa1b803a983e414eaa3fabe15a4d4a04f7/sitelib/srfi/%253a193/command-line.scm | scheme | coding : utf-8 -*-
srfi/%3a193/command-line.scm - SRFI 193 Command line
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice,... | Copyright ( c ) 2021 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (srfi :193 command-line)
(... |
b701ecf07de81b6d0304889d80daf602f3b8e7be72398dd29cec61269d07c88a | skynet-gh/skylobby | spring_info.clj | (ns skylobby.fx.spring-info
(:require
[cljfx.api :as fx]
[clojure.string :as string]
skylobby.fx
[skylobby.fx.font-icon :as font-icon]
[skylobby.fx.rich-text :as fx.rich-text]
[skylobby.fx.sub :as sub]
[skylobby.fx.sync :refer [error-severity]]
[skylobby.fx.virtualized-scroll-pane :as ... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/3c6df035796fc107a4a770f348cb8016b21c071a/src/clj/skylobby/fx/spring_info.clj | clojure | (ns skylobby.fx.spring-info
(:require
[cljfx.api :as fx]
[clojure.string :as string]
skylobby.fx
[skylobby.fx.font-icon :as font-icon]
[skylobby.fx.rich-text :as fx.rich-text]
[skylobby.fx.sub :as sub]
[skylobby.fx.sync :refer [error-severity]]
[skylobby.fx.virtualized-scroll-pane :as ... | |
e6b83759798297edfaa024dd6cdcd8af5cb1296f598a540c34d3c97a73051cd8 | ghc/testsuite | tcfail005.hs | module ShouldFail where
(h:i) = (1,'a')
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail005.hs | haskell | module ShouldFail where
(h:i) = (1,'a')
| |
f9d09f0c9d58cd4e6d4fcf16df530c60d20b73ce5e7d43f16e1c8ac6d969dfcb | TyOverby/mono | applicative.ml | open! Import
include Applicative_intf
module List = List0
(** This module serves mostly as a partial check that [S2] and [S] are in sync, but
actually calling it is occasionally useful. *)
module S_to_S2 (X : S) : S2 with type ('a, 'e) t = 'a X.t = struct
include X
type ('a, 'e) t = 'a X.t
end
module S2_to_S... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/src/applicative.ml | ocaml | * This module serves mostly as a partial check that [S2] and [S] are in sync, but
actually calling it is occasionally useful. | open! Import
include Applicative_intf
module List = List0
module S_to_S2 (X : S) : S2 with type ('a, 'e) t = 'a X.t = struct
include X
type ('a, 'e) t = 'a X.t
end
module S2_to_S (X : S2) : S with type 'a t = ('a, unit) X.t = struct
include X
type 'a t = ('a, unit) X.t
end
module S2_to_S3 (X : S2) : S3 wit... |
c4fad2ea813dc81452ef898ebee8d72963b65d14fdec9820475bc6aac3d44959 | benzap/eden | core.cljc | (ns eden.stdlib.core
(:require
[clojure.pprint :as pprint]
[eden.def :refer [set-var!]]))
(defn uuid
([s] (java.util.UUID/fromString s))
([] (java.util.UUID/randomUUID)))
;;(uuid (str (uuid)))
(defn throw-fn
([msg data] (throw (ex-info msg data)))
([msg] (throw-fn msg {}))
([] (throw-fn "No Error... | null | https://raw.githubusercontent.com/benzap/eden/dbfa63dc18dbc5ef18a9b2b16dbb7af0e633f6d0/src/eden/stdlib/core.cljc | clojure | (uuid (str (uuid))) | (ns eden.stdlib.core
(:require
[clojure.pprint :as pprint]
[eden.def :refer [set-var!]]))
(defn uuid
([s] (java.util.UUID/fromString s))
([] (java.util.UUID/randomUUID)))
(defn throw-fn
([msg data] (throw (ex-info msg data)))
([msg] (throw-fn msg {}))
([] (throw-fn "No Error Message" {})))
(def... |
09e934936285d7737309a474dd5c31e4c0f38478b463a12ec476b82fb86572d4 | namenu/advent-of-code | day25.clj | --- Day 25 : Cryostasis ---
(ns aoc.year2019.day25
(:refer-clojure :exclude [take drop])
(:require [aoc.util :refer [input]]
[aoc.year2019.intcode :refer :all]
[clojure.math.combinatorics :as combo]))
(defn run-cmd [droid cmd & [opts]]
;(println ">> " cmd)
(let [opts (merge {:ascii tr... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2019/clojure/src/aoc/year2019/day25.clj | clojure | (println ">> " cmd)
(println output)
do not touch: infinite loop, photons, escape pod, molten lava, giant electromagnet(?)
no need to branch and bound
E, bed: [candy cane]
EN, Stables: [infinite loop]
ENNNE, Corridor : [escape pod]
EE, Kitchen
EEES, Passage
EEESE, Sickbay: [photons]
EEESW, Gift Wrapping Center... | --- Day 25 : Cryostasis ---
(ns aoc.year2019.day25
(:refer-clojure :exclude [take drop])
(:require [aoc.util :refer [input]]
[aoc.year2019.intcode :refer :all]
[clojure.math.combinatorics :as combo]))
(defn run-cmd [droid cmd & [opts]]
(let [opts (merge {:ascii true} opts)
[droi... |
64ed38b6fba2c889904cd987855ac90527c561ac89f4429322af58dacd5fa368 | pmundkur/flowcaml | doc_gen.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/docgen/doc_gen.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : doc_gen.ml , v 1.6 2003/06/26 1... |
f7e7670c51b7b28bbb388f4f2b763d8792bf6d7411bcbc1cee162beef962909b | clash-lang/clash-compiler | ZipWithUnitSP2.hs | module ZipWithUnitSP2 where
import Clash.Prelude
import Clash.Explicit.Testbench
data YZA = Y Int | Z () | A deriving (Eq, Show, Generic, ShowX)
topEntity
:: Vec 2 YZA
-> Vec 2 (Index 2, YZA)
topEntity xs = zipWith (,) indicesI xs
{-# NOINLINE topEntity #-}
testBench :: Signal System Bool
testBench = done
whe... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Unit/ZipWithUnitSP2.hs | haskell | # NOINLINE topEntity # | module ZipWithUnitSP2 where
import Clash.Prelude
import Clash.Explicit.Testbench
data YZA = Y Int | Z () | A deriving (Eq, Show, Generic, ShowX)
topEntity
:: Vec 2 YZA
-> Vec 2 (Index 2, YZA)
topEntity xs = zipWith (,) indicesI xs
testBench :: Signal System Bool
testBench = done
where
testInput = sti... |
3e80c73a55bbe976ca9e9e31bbeed5e3b3cb577940ab714b30584881979b45f4 | OCamlPro/optal | generate.ml | open Common_types
open Ast
open Lp
open Value
type error =
| Not_linear
| Type_error of (vtyp list) * vtyp
| Bool_not_impossible of btyp
| Bool_op_impossible of bool_binop * btyp * btyp
| Operation_impossible of string * vtyp * vtyp
| Comparison_impossible of cmp * vtyp * vtyp
| Not_a_linear_constraint o... | null | https://raw.githubusercontent.com/OCamlPro/optal/852d269ad2698760e5130fb869bb8473f2dfd26c/src/generate.ml | ocaml | maybe some other cases are possible
autorized ?
and eval_expr_string env expr =
match eval_expr env expr with
| Vstring s -> s
TODO: it is probably possible on linear expression
comparing with >= or <= on integers and maybe with foating point
(adding epsilon ?)
the constant can... | open Common_types
open Ast
open Lp
open Value
type error =
| Not_linear
| Type_error of (vtyp list) * vtyp
| Bool_not_impossible of btyp
| Bool_op_impossible of bool_binop * btyp * btyp
| Operation_impossible of string * vtyp * vtyp
| Comparison_impossible of cmp * vtyp * vtyp
| Not_a_linear_constraint o... |
8d946d053b7b79e6c76b7d9661892ca6671be1703cb6c336fbbdd89be06cbe64 | reactiveml/rml | main.ml | Js_of_ocaml example
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/examples/wiki/main.ml | ocaml | Js_of_ocaml example
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of ... | |
866b990b61d5b70f375c5f9370b193063009133db2e10e43bfdd154d2c4b40e3 | fukamachi/clozure-cl | l1-sysio.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-1/l1-sysio.lisp | lisp | Package : CCL -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
current io position in octets
file length in elements
The file-ioblock-oct... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
bc6a91f23d7b477926dfbf45b9c1475145ea5a3134b4ddffa63130ec62fe2bb4 | uw-unsat/jitsynth | sraiw.rkt | #lang rosette
(require "../riscv/test-macros.rkt")
(provide run-riscv-sraiw-tests)
(define (run-riscv-sraiw-tests)
; See LICENSE for license details.
;*****************************************************************************
; 'sraiw.S
;-----------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/test/rv64ui/sraiw.rkt | racket | See LICENSE for license details.
*****************************************************************************
'sraiw.S
-----------------------------------------------------------------------------
Test 'sraiw instruction.
include "riscv_test.h"
include "test_macros.h"
---------------------------------------------... | #lang rosette
(require "../riscv/test-macros.rkt")
(provide run-riscv-sraiw-tests)
(define (run-riscv-sraiw-tests)
Verify that shifts ignore top 32 ( using true 64 - bit values )
(TEST_IMM_OP 26 'sraiw #x0000000000000000 #x00e0000000000000 28)
(TEST_IMM_OP 27 'sraiw #xffffffffff000000 #x00000000... |
f3f5f85561de7029d0cd0f87efcc67baf089eb9e3fdd11adbcf8be748350e7cc | shriram/gradescope-racket | grade-macros.rkt | #lang racket
(require rackunit) ;; WARNING: Use the test- forms, NOT the check- forms!
(require "lib-grade.rkt")
(mirror-macro foo from "student-code.rkt")
(mirror-macro lett from "student-code.rkt")
(mirror-macro with-a-kwd from "student-code.rkt")
(mirror-macro mycond from "student-code.rkt")
(define-test-suite m... | null | https://raw.githubusercontent.com/shriram/gradescope-racket/56aacb9caf6d0d233d9e267c6e7a4ba216fde073/grade-macros.rkt | racket | WARNING: Use the test- forms, NOT the check- forms!
note that `foo` comes from student-code.rkt
note that `x` comes from student-code.rkt | #lang racket
(require "lib-grade.rkt")
(mirror-macro foo from "student-code.rkt")
(mirror-macro lett from "student-code.rkt")
(mirror-macro with-a-kwd from "student-code.rkt")
(mirror-macro mycond from "student-code.rkt")
(define-test-suite macro-tests
(test-equal? "foo"
"hello this is foo")
(tes... |
246e36e2e128fcb577204896798bda81cf38cd24c278fee484cf8641c5d78ba2 | shayan-najd/NativeMetaprogramming | AssocTyDef06.hs | # LANGUAGE TypeFamilies #
module AssocTyDef06 where
class Cls a where
type Typ a
type Typ a b = Int
-- Too many params for default
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/AssocTyDef06.hs | haskell | Too many params for default | # LANGUAGE TypeFamilies #
module AssocTyDef06 where
class Cls a where
type Typ a
type Typ a b = Int
|
6570709292995cc50a71ad3ca21d5b09386787850d9f6fce46f2573f6281f843 | ztellman/cambrian-collections | map.clj | (ns cambrian-collections.map
(:require
[cambrian-collections.java :as j]
[clojure.string :as str]))
(defn reduce-body [reduce-ops]
(apply str
(map
(fn [op]
(str
"init = " op ";"
"if (RT.isReduced(init)) { return ((IDeref)init).deref(); }"))
reduce-ops)))
(defn o... | null | https://raw.githubusercontent.com/ztellman/cambrian-collections/35c80f0afde9f5bf33e63f93c859d4baa9981f4c/generate/cambrian_collections/map.clj | clojure |
fields
public CardN(IPersistentMap meta, ...)
public CardN(...)
public IPersistentMap meta()
public IObj withMeta(IPersistentMap meta)
int indexOf(int h, Object key)
private int indexOfObj(int h, Object key)
public boolean containsKey(Object key)
public IMapEntry entryAt(Object key)
public Object valAt(Objec... | (ns cambrian-collections.map
(:require
[cambrian-collections.java :as j]
[clojure.string :as str]))
(defn reduce-body [reduce-ops]
(apply str
(map
(fn [op]
(str
"init = " op ";"
"if (RT.isReduced(init)) { return ((IDeref)init).deref(); }"))
reduce-ops)))
(defn o... |
1f98aa83cfbfeab0a1d6ad5b1da6127874621f87e3c6ec0beff664d921fd5bc1 | typelead/eta | tc034.hs | module ShouldSucceed where
data AList a = ANull | ANode a (AList a)
type IntList = AList Int
g (ANull) = 2
g (ANode b (ANode c d)) | b = 3
| True = 4
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc034.hs | haskell | module ShouldSucceed where
data AList a = ANull | ANode a (AList a)
type IntList = AList Int
g (ANull) = 2
g (ANode b (ANode c d)) | b = 3
| True = 4
| |
53c36902f5762330700a2d25866708d78be1043e1b3052ede7e5b04214e3f5b5 | ghc/nofib | RG.hs | #include "unboxery.h"
module RG(rG,rG') where
import Types
rG
= Nuc
(Tfo FL_LIT(-0.0018) FL_LIT(-0.8207) FL_LIT(0.5714) -- dgf_base_tfo
FL_LIT(0.2679) FL_LIT(-0.5509) FL_LIT(-0.7904)
FL_LIT(0.9634) FL_LIT(0.1517) FL_LIT(0.2209)
FL_LIT(0.0073) FL_LIT(8.4030) FL... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/hartel/nucleic2/RG.hs | haskell | dgf_base_tfo
p_o3'_275_tfo
p_o3'_180_tfo
p_o3'_60_tfo
P
O1P
O2P
H5'
H5''
C4'
H4'
C1'
H1'
H2''
H2'
C3'
H3'
O3'
N1
C4
N2
O6
H1
H21
dgf_base_tfo
p_o3'_275_tfo
p_o3'_180_tfo
p_o3'_60_tfo
P
O1P
O2P
H5'
H5''
C4'
H4'
C1'
H1'
H2''
H2'
C3'
H3'
O3'
N1
C4
N2
O6
H1
H21
dgf_base_tfo
... | #include "unboxery.h"
module RG(rG,rG') where
import Types
rG
= Nuc
FL_LIT(0.2679) FL_LIT(-0.5509) FL_LIT(-0.7904)
FL_LIT(0.9634) FL_LIT(0.1517) FL_LIT(0.2209)
FL_LIT(0.0073) FL_LIT(8.4030) FL_LIT(0.6232))
FL_LIT(-0.0433) FL_LIT(-0.4257) FL_LIT(0.9038)
... |
30322d112ff47036414bce611fd07b7bf7b8c0822e241a31ee63a479a6ffdc34 | redstarssystems/context | core.clj | (ns ^{:author "Mikhail Ananev"}
org.rssys.context.core
(:require [unifier.response :as r]
[clojure.spec.alpha :as s])
(:import (clojure.lang Keyword Atom IFn)))
;; component's specification
(s/def ::id keyword?) ;; component's identifier
config is a map or fn w... | null | https://raw.githubusercontent.com/redstarssystems/context/135077506b43279643a43556016f68268e9f2b2b/src/org/rssys/context/core.clj | clojure | component's specification
component's identifier
a stateful object
status
dependencies which should be started before this component
dependencies which should be stopped before this component
function which starts this component
function which stops this component
default value for stopped components
config s... | (ns ^{:author "Mikhail Ananev"}
org.rssys.context.core
(:require [unifier.response :as r]
[clojure.spec.alpha :as s])
(:import (clojure.lang Keyword Atom IFn)))
config is a map or fn with 1 arg - the current context value
(s/def ::component (s/keys
:req-un [::id ::config]
... |
fc69f8c973fb0c5d7061d86bab69642b9b71d9c44256dcb5e4a38bbba0f5cd79 | fragnix/fragnix | Data.Binary.Put.hs | # LANGUAGE Haskell98 #
# LINE 1 " src / Data / Binary / Put.hs " #
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Binary.Put
Copyrigh... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Binary.Put.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.Binary.Put
License : BSD3-style (see LICENSE)
Stability : stable
The Put monad. A monad for efficiently constructing lazy bytestrings.
--------------------------------------------------------... | # LANGUAGE Haskell98 #
# LINE 1 " src / Data / Binary / Put.hs " #
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
Copyright :
Maintainer : < >
Portability : Portable to Hugs and GHC . Requires MPTCs
module Data.Binary.Put (
Put
, PutM... |
85711df5f322069c4045c109950bcaba1ae32b688477b05a00c37d364135f2a3 | jordwalke/rehp | js_token.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2017 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/js_token.ml | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2017 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | |
5c92d84ba3cc9b666850e6886c4baee93a0f1c68cb7227dabf7da06730e171a8 | jimcrayne/jhc | tc185.hs | {-# OPTIONS -fglasgow-exts #-}
Killed GHC 6.3 HEAD
module Bug where
import GHC.Base
foo v = let !(I# x#) = 7 * 7 in "Forty-Two" | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc185.hs | haskell | # OPTIONS -fglasgow-exts # |
Killed GHC 6.3 HEAD
module Bug where
import GHC.Base
foo v = let !(I# x#) = 7 * 7 in "Forty-Two" |
b01c890768a74f1ce48405e7b85b10fbdfb5d0c1511e616740a65950b473d5a8 | klarna-incubator/bec | bitbucket_repo_config.erl | -module(bitbucket_repo_config).
-include_lib("kernel/include/logger.hrl").
-export([ verify/1
, verify/2
]).
-type opts() :: [{atom(), any()}].
-spec verify(string()) -> boolean().
verify(Path) ->
verify(Path, []).
-spec verify(string(), opts()) -> boolean().
verify(Path, Options) ->
case filen... | null | https://raw.githubusercontent.com/klarna-incubator/bec/35243aba91d90e059bd81955e6a7191c7046a3f0/src/bitbucket_repo_config.erl | erlang | Simple template: contains a list of `repo' values only
Convert a binary to upper-case.
abort_on_error is only meaningful if enforce == false
Verification passed. Nothing to enforce, proceeding
Verification failed. If enforce == true, abort_on_error is false
by definition. Record the fact that verification failed ... | -module(bitbucket_repo_config).
-include_lib("kernel/include/logger.hrl").
-export([ verify/1
, verify/2
]).
-type opts() :: [{atom(), any()}].
-spec verify(string()) -> boolean().
verify(Path) ->
verify(Path, []).
-spec verify(string(), opts()) -> boolean().
verify(Path, Options) ->
case filen... |
9a6a7cd065e2cda8b94836ee6af569efea358912f945cd8e4a9c798112ce92cf | lpw25/ocaml-typed-effects | typedtree.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/typing/typedtree.mli | 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 Q Public License version 1.0 .
open Asttypes
open Types
type partia... |
089ba0ddb82df6a29b2b0a1d61cfe0b96d00cca6a734747102294b7c233b3bf2 | finkel-lang/finkel | block-comment.hs | putStrLn {- Haskell block comment -} "bar"
| null | https://raw.githubusercontent.com/finkel-lang/finkel/c3c7729d5228bd7e0cf76e8ff05fe2f79a0ec0a2/doc/include/language-syntax/expr/block-comment.hs | haskell | Haskell block comment | |
ffcb1f4b61e0328c5098a5794bf15569b51a7e640e2ed779d91408878f58c402 | darrenldl/ProVerif-ATP | evaluation_helper.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/evaluation_helper.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
891cf8b522f5c0314fcff9ed2f1fa6241c3acce1a33065de9cdb640bfe9355ca | Armael/cdcl | prelude.ml | Takes a literal between -n and n ( for an unknown n ) , and returns an
index between 0 and 2*n . aid is bijective , so it 's useful to index
array by literals
index between 0 and 2*n. aid is bijective, so it's useful to index
array by literals *)
let aid var = 2 * (abs var - 1) + (if var > 0 then 0 el... | null | https://raw.githubusercontent.com/Armael/cdcl/44c9c0e48549a0433fe7f3819b15b5ca2f369ea6/src/prelude.ml | ocaml | Cowardly exits the program
Returns the list [a; a+1; ...; b] | Takes a literal between -n and n ( for an unknown n ) , and returns an
index between 0 and 2*n . aid is bijective , so it 's useful to index
array by literals
index between 0 and 2*n. aid is bijective, so it's useful to index
array by literals *)
let aid var = 2 * (abs var - 1) + (if var > 0 then 0 el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.