_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 |
|---|---|---|---|---|---|---|---|---|
f3bc0d657eff51d04b275803f5d323b29dbddbc9cd11969ddd16190c028463c1 | e-wrks/edh | Vector.hs | module Language.Edh.Batteries.Vector where
-- import Debug.Trace
import Control.Applicative
import Control.Concurrent.STM
import Data.Hashable
import qualified Data.Lossless.Decimal as D
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Vector as V
import Data.Vector.Mutable (IOV... | null | https://raw.githubusercontent.com/e-wrks/edh/9cc52fef71c16cce1d6fdb27f10fb4b60d597de7/host.hs/src/Language/Edh/Batteries/Vector.hs | haskell | import Debug.Trace
vectorized (non)equality tests and ordering comparisons
indexing
indexed assignment
indexed update
vectorized ops
inplace update
misc
performance here, justify this decision | module Language.Edh.Batteries.Vector where
import Control.Applicative
import Control.Concurrent.STM
import Data.Hashable
import qualified Data.Lossless.Decimal as D
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Vector as V
import Data.Vector.Mutable (IOVector)
import qualified Data.Vec... |
ea58dc0c55f4e1724ca8bdc9c29bdbc349046e34d825dae712d7f0eca23a8fb2 | raspasov/neversleep | to_disk_mem.clj | (ns neversleep-db.to-disk-mem
(:require [taoensso.nippy :as nippy]
[neversleep-db.mysql-lib :as mysql-lib]
[neversleep-db.println-m :refer [println-m]]
[qbits.nippy-lz4 :refer [lz4-compressor lz4hc-compressor]]
[neversleep-db.util :as util]))
;save-node [uuid data]
;ge... | null | https://raw.githubusercontent.com/raspasov/neversleep/7fd968f4ab20fa6ef71e1049e3eec289ea6691e4/src/neversleep_db/to_disk_mem.clj | clojure | save-node [uuid data]
get-node [uuid]
DB TABLE
nodes
=============
roots
id | uuid | timestamp | data
(println-m "data before serialize: " data)
{:compressor lz4hc-compressor}
(println-m "frozen data: " frozen-data)
{:compressor lz4-compressor}
DURABLE MAPS
=========================
in-memory storage
(mysql-lib/execu... | (ns neversleep-db.to-disk-mem
(:require [taoensso.nippy :as nippy]
[neversleep-db.mysql-lib :as mysql-lib]
[neversleep-db.println-m :refer [println-m]]
[qbits.nippy-lz4 :refer [lz4-compressor lz4hc-compressor]]
[neversleep-db.util :as util]))
uuid | data
DATA JUGGLING... |
fc262eaaefc4fedb735f3faa52593e2ec36d2bc300f63b0be02e8a7029657f4c | vinted/kafka-elasticsearch-tool | properties.clj | (ns core.properties
(:require [clojure.string :as str])
(:import (java.util Properties)))
(defn ^Properties opts->properties [opts]
(reduce (fn [^Properties props [k v]]
(.put props ^String (name k) ^String v)
props)
(Properties.)
opts))
(defn opts-valid? [required-ke... | null | https://raw.githubusercontent.com/vinted/kafka-elasticsearch-tool/281de24d51cbd2a7ad78e3c1d13a4619b786210d/src/core/properties.clj | clojure | (ns core.properties
(:require [clojure.string :as str])
(:import (java.util Properties)))
(defn ^Properties opts->properties [opts]
(reduce (fn [^Properties props [k v]]
(.put props ^String (name k) ^String v)
props)
(Properties.)
opts))
(defn opts-valid? [required-ke... | |
22608e11e7ea0dd2742c239a9e1c23a55daaa8d0398e7c4577f15089c064983f | mattgreen/hython | Lexer.hs | # OPTIONS_GHC -fno - warn - unused - do - bind #
module Language.Python.Lexer
where
import Prelude hiding (exp, lex)
import Control.Monad
import Data.Complex
import Data.Char hiding (digitToInt)
import Data.List
import Data.Text (Text)
import qualified Data.Text as T
import Text.Parsec hiding (newline, tokens)
imp... | null | https://raw.githubusercontent.com/mattgreen/hython/fcbde98e9b5a033f0d4bea73ac9914bc5e12b746/src/Language/Python/Lexer.hs | haskell | # OPTIONS_GHC -fno - warn - unused - do - bind #
module Language.Python.Lexer
where
import Prelude hiding (exp, lex)
import Control.Monad
import Data.Complex
import Data.Char hiding (digitToInt)
import Data.List
import Data.Text (Text)
import qualified Data.Text as T
import Text.Parsec hiding (newline, tokens)
imp... | |
a514dde3c407f01c1c60e81778a01a2b68b9dd20d18b84a80a22f080dd87113d | OCamlPro/digodoc | fulltext_search.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2022 OCamlPro SAS & Origin Labs SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/digodoc/a781c251b3b6ef94badbaea1cfd8dc176d47d364/src/frontend/fulltext_search.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2022 OCamlPro SAS & Origin Labs SAS
Public License version 2.1 , with the special exception on linking
open Js_of_ocaml
open Js
open Globals
open Data_types
* Module [ Fulltext_Search ] defines behaviour for fulltext search page ( fulltext_search.html )
Fulltext s... |
862530a205768ab36014b08868c26cc0c119ae72039773ac24f828a6205a9e9a | ocaml-omake/omake | omake_symbol.ml | (*
* Symbols used everywhere.
* Eventually, we should collect all the global symbols and
* put them here.
*)
let braces_sym = Lm_symbol.add "{}"
let builtin_sym = Lm_symbol.add "$builtin"
let map_sym = Lm_symbol.add "$map"
let pervasives_sym = Lm_symbo... | null | https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_symbol.ml | ocaml |
* Symbols used everywhere.
* Eventually, we should collect all the global symbols and
* put them here.
let value_sym = Lm_symbol.add "value"
* Special symbols.
* Awk values.
* The applications that can have cases.
* Colon symbols.
* Symbols.
|
let braces_sym = Lm_symbol.add "{}"
let builtin_sym = Lm_symbol.add "$builtin"
let map_sym = Lm_symbol.add "$map"
let pervasives_sym = Lm_symbol.add "Pervasives"
let object_sym = Lm_symbol.add "Object"
let int_object_sym = Lm_sy... |
83c33e949d22e7753e716b70dd7e38ddf7dd76096c0d9ebf3519eafacee83315 | district0x/re-frame-google-analytics-fx | project.clj | (defproject district0x.re-frame/google-analytics-fx "1.0.0"
:description "A re-frame effects handler for performing Google Analytics tasks"
:url "-frame-google-analytics-fx"
:license {:name "MIT"}
:dependencies [[org.clojure/clojurescript "1.9.946"]
[re-frame "0.10.2"]])
| null | https://raw.githubusercontent.com/district0x/re-frame-google-analytics-fx/28396a15d8cc7ef4aa2bf686781c6b9cdcebdd89/project.clj | clojure | (defproject district0x.re-frame/google-analytics-fx "1.0.0"
:description "A re-frame effects handler for performing Google Analytics tasks"
:url "-frame-google-analytics-fx"
:license {:name "MIT"}
:dependencies [[org.clojure/clojurescript "1.9.946"]
[re-frame "0.10.2"]])
| |
6c55e909775ba6df7b7c9f1669b4722037702b58a9aee0514085a7cec8da573e | SuYi1995/game_server | hot_swap.erl | %%%-------------------------------------------------------------------
%%% @author sy
( C ) 2019 , < COMPANY >
%%% @doc
%%% 本地热更模块
%%% @end
Created : 30 . 9月 2019 14:05
%%%-------------------------------------------------------------------
-module(hot_swap).
-export([
load/1,
network_load/1,
network_... | null | https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/tools/hot_swap.erl | erlang | -------------------------------------------------------------------
@author sy
@doc
本地热更模块
@end
-------------------------------------------------------------------
当前节点热部署:
节点集热更:
指定单节点热更: | ( C ) 2019 , < COMPANY >
Created : 30 . 9月 2019 14:05
-module(hot_swap).
-export([
load/1,
network_load/1,
network_load/2
]).
@param ModList 模块列表(原子列表 )
load(ModList)->
lists:foreach(fun(Module)->
code:purge(Module),
code:load_file(Module)
end,ModList).
... |
c1e1be7ce78c192ecf0abcfa998b1d49bbb5f85392397c9fac7019ef70d0183f | antono/guix-debian | guile-wm.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of t... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/guile-wm.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages guile-wm)
#:use-module (guix licenses)
#:use-module (gnu packages)
#:use... |
431efc33ee357cf4b3f8c88bd1435349c4330c2b5948eb85fc6bf8a0b6eaeb25 | nvim-treesitter/nvim-treesitter | locals.scm | ; Scopes
[
(infrastructure)
(call_expression)
(lambda_expression)
(subscript_expression)
(if_statement)
(for_statement)
(array)
(object)
(interpolation)
] @scope
; References
(property_identifier) @reference
(call_expression
(identifier) @reference)
(object_property
(_)
":"
(identifier... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/028b7dfbddffdd4738a25a76b280d9b26f38ce42/queries/bicep/locals.scm | scheme | Scopes
References
Definitions |
[
(infrastructure)
(call_expression)
(lambda_expression)
(subscript_expression)
(if_statement)
(for_statement)
(array)
(object)
(interpolation)
] @scope
(property_identifier) @reference
(call_expression
(identifier) @reference)
(object_property
(_)
":"
(identifier) @reference)
(resour... |
2b11d6eda40d06795cdc2203058eec851751f369bca5ff6eb59d61e548905a16 | tlaplus/tlapm | tptp.mli | Copyright 2004 INRIA
open Phrase;;
val translate : string list -> tpphrase list -> phrase list * string;;
| null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/tptp.mli | ocaml | Copyright 2004 INRIA
open Phrase;;
val translate : string list -> tpphrase list -> phrase list * string;;
| |
c0fb9ddcebc8568a9a4c2dc8eed9d13fb3fe303e6ed9370da442053776974f1d | mainland/dph | Vectorised1.hs | {-# LANGUAGE ParallelArrays #-}
{-# OPTIONS -fvectorise #-}
{-# OPTIONS -fno-spec-constr-count #-}
module Vectorised1 (closest1PA, closeststupid1PA) where
import Points2D.Types
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Double as D
import qualified Data.Array.Parallel.Prelude.Int as I
import q... | null | https://raw.githubusercontent.com/mainland/dph/742078c9e18b7dcf6526348e08d2dd16e2334739/dph-examples/examples/spectral/ClosestPairs/dph/Vectorised1.hs | haskell | # LANGUAGE ParallelArrays #
# OPTIONS -fvectorise #
# OPTIONS -fno-spec-constr-count #
removed the sqrt here - only some users actually need it
Our divide and conquer drops back to this once there are few enough points
^ array of points
^ split / x boundary
^ maximum distance
| Find pair with minimum distance bet... | module Vectorised1 (closest1PA, closeststupid1PA) where
import Points2D.Types
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Double as D
import qualified Data.Array.Parallel.Prelude.Int as I
import qualified Prelude as P
distance :: Point -> Point -> Double
distance (x1, y1) (x2, y2)
= ( (... |
d4ad9e14b66a339dc2e33db12be697fc368fa4a7a3d4ab4e7461ee3f6a7beacf | incoherentsoftware/defect-process | FloatingAttack.hs | module Player.Weapon.All.Scythe.FloatingAttack
( FloatingAttackOnDoneBehavior(..)
, FloatingAttackData(..)
, mkFloatingAttack
, removeFloatingAtkMsg
, updateFloatingAtkStatusMsg
, addFloatingAtkMsgs
) where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO)
import ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Player/Weapon/All/Scythe/FloatingAttack.hs | haskell | vert-slash -> vert-slash-land
vert-slash -> vert-slash-land
ignore wall collisions
prevent various attacks from going inside surfaces | module Player.Weapon.All.Scythe.FloatingAttack
( FloatingAttackOnDoneBehavior(..)
, FloatingAttackData(..)
, mkFloatingAttack
, removeFloatingAtkMsg
, updateFloatingAtkStatusMsg
, addFloatingAtkMsgs
) where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO)
import ... |
0292a3588fc3e32c0681e1cf5b070b9d0fde77f419698d9917c9d7651876cf22 | haskell-tools/haskell-tools | HigherOrder.hs | module Refactor.GenerateTypeSignature.HigherOrder where
app f x = f x
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/GenerateTypeSignature/HigherOrder.hs | haskell | module Refactor.GenerateTypeSignature.HigherOrder where
app f x = f x
| |
d88d735821c9d84ca9df35d55f7bc178763619be8191b7c9850f6d540e7899b0 | jguhlin/ODG | pathways.clj | (ns odg.pathways
(:require
[clojure.core.reducers :as r]
[biotools.pmn-pathways :as pmn-pathways]
[odg.db :as db]
[odg.batch :as batch]
[odg.util :as util]
[co.paralleluniverse.pulsar.core :as p]
[odg.db-handler :as dbh]
)
(:import
(org.neo4j.unsafe.batchinsert BatchInserter
... | null | https://raw.githubusercontent.com/jguhlin/ODG/c8a09f273c278ba7b3acbd37155477979f8b4851/src/odg/pathways.clj | clojure | example of data that comes from biotools
#biotools.pmn_pathways.PMNPathway{
:pathway-name fatty acid activation,
:reaction-id RXN-7904,
:EC 6.2.1.3,
:protein-id GDQG-2927-MONOMER,
:protein-name long-chain-fatty-acid-CoA ligase,
:gene-id GDQG-2927,
Only do genes that exist in the database
Not certain why doall... | (ns odg.pathways
(:require
[clojure.core.reducers :as r]
[biotools.pmn-pathways :as pmn-pathways]
[odg.db :as db]
[odg.batch :as batch]
[odg.util :as util]
[co.paralleluniverse.pulsar.core :as p]
[odg.db-handler :as dbh]
)
(:import
(org.neo4j.unsafe.batchinsert BatchInserter
... |
437dd232cb96195fa9681b41f1ea5d7dcdeb93541efb93efb7cbd5cde6dd3977 | Oblosys/proxima | Interfaces.hs |
UUAGC 0.9.10 ( Interfaces.ag )
module Interfaces where
import CommonTypes
import SequentialTypes
-- IRoot -------------------------------------------------------
{-
alternatives:
alternative IRoot:
child inters : Interfaces
-}
data IRoot = IRoot (Interfaces)
Interface ---------------... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/Interfaces.hs | haskell | IRoot -------------------------------------------------------
alternatives:
alternative IRoot:
child inters : Interfaces
-------------------------------------------------
Interfaces --------------------------------------------------
Segment -----------------------------------------------... |
UUAGC 0.9.10 ( Interfaces.ag )
module Interfaces where
import CommonTypes
import SequentialTypes
data IRoot = IRoot (Interfaces)
alternatives :
alternative Interface :
child nt : { NontermIdent }
child cons : { [ ConstructorIdent ] }
child seg... |
ee8a313abdf05dd3241aac96860dc7111299ff8f81e5dd0ed7e7b273d6361438 | RichiH/git-annex | Locations.hs | git - annex file locations
-
- Copyright 2010 - 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Annex.Locations (
keyFile,
fileKey,
keyPaths,
keyPath,
annexDir,
objectDir,
gi... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/Locations.hs | haskell | Conventions:
-
- Functions ending in "Dir" should always return values ending with a
- trailing path separator. Most code does not rely on that, but a few
- things do.
-
- Everything else should not end in a trailing path sepatator.
-
- Only functions (with names starting with "git") that build a path
- bas... | git - annex file locations
-
- Copyright 2010 - 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Annex.Locations (
keyFile,
fileKey,
keyPaths,
keyPath,
annexDir,
objectDir,
gi... |
ee50eea5491ab9c9d32aa0c45df802a0348e22a29afaa9965547ee3b08e10eb6 | alesaccoia/festival_flinger | build_clunits.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2005 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_rxr_cg/festvox/build_clunits.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(defvar cmu_us_rxr::dir ".")
(require 'clunits_build)
Basic voice definition file with voice defines and
(load "festvox/cmu_us_rxr_clunits.scm")
(defvar cluster_feature_filename "all.desc")
(set! cmu_us_rxr::dt_params
(cons
(list 'db_dir (string-append cmu_us_rxr::dir "/"))
(append
cmu_us_r... |
4cbc7a5db2288d304e16bc48b17078c40f2942aab32ae6da3ce603b223102d89 | vascokk/NumEr | numer_nifs_tests.erl | -module(numer_nifs_tests).
-compile(export_all).
-include("numer.hrl").
-include_lib("eunit/include/eunit.hrl").
create_destroy_float_test() ->
{ok, Ctx} = numer_nifs:new_context(),
{ok, Buf} = numer_nifs:new_float_buffer(Ctx),
ok = numer_nifs:destroy_buffer(Buf),
numer_nifs:destroy_context(Ctx).
c... | null | https://raw.githubusercontent.com/vascokk/NumEr/0d22c31633ef2ab43dde50809a9dbbb6a736f5b7/test/numer_nifs_tests.erl | erlang | numer_nifs:write_buffer(Buf, A),
{ok, A} = numer_nifs:read_buffer(Buf),
{ok, A} = numer_nifs:read_buffer(Buf),
Float matrix operations only supported
GEMM: C = α op ( A ) op ( B ) + β C
row major
row major
num_cols_A
num_cols_B
row major
row major
row major
num_cols_A
num_cols_B
rows A
columns A
columns A
SAXPY: ... | -module(numer_nifs_tests).
-compile(export_all).
-include("numer.hrl").
-include_lib("eunit/include/eunit.hrl").
create_destroy_float_test() ->
{ok, Ctx} = numer_nifs:new_context(),
{ok, Buf} = numer_nifs:new_float_buffer(Ctx),
ok = numer_nifs:destroy_buffer(Buf),
numer_nifs:destroy_context(Ctx).
c... |
ba2dde674f85179698c0a16c0974539ae9f99e5117b861455026cb4f7c40bef1 | Eonblast/Scalaxis | tx_item_state.erl | 2009 - 2011 Zuse Institute Berlin
and onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agree... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/transactions/tx_item_state.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2009 - 2011 Zuse Institute Berlin
and onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
The state for a single request in a transaction of a TM and RTM .
-module(tx_i... |
41a6bd5bac0e40419da1c6d9e80d0232a1d4939c2dba01eab96766e613b53b67 | VERIMAG-Polyhedra/VPL | EqSet.mli | (** This module handles equality sets.
Equality sets are maintained in echelon form. *)
module Cs = Cstr.Rat
(** Type of equality set.
Each equality defines a variable in terms of the others. *)
type 'c t = (Var.t * 'c Cons.t) list
val to_string: (Var.t -> string) -> 'c t -> string
val to_string_ext: 'c Fact... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/core/EqSet.mli | ocaml | * This module handles equality sets.
Equality sets are maintained in echelon form.
* Type of equality set.
Each equality defines a variable in terms of the others.
* Empty equality set: top.
* @return true if the given equality set is top.
* @return the list of equalities of the set.
* Rewrites a constrain... |
module Cs = Cstr.Rat
type 'c t = (Var.t * 'c Cons.t) list
val to_string: (Var.t -> string) -> 'c t -> string
val to_string_ext: 'c Factory.t -> (Var.t -> string) -> 'c t -> string
val nil : 'c t
val isTop: 'c t -> bool
val list : 'c t -> 'c Cons.t list
val filter : 'c Factory.t -> 'c t -> 'c Cons.t -> 'c Cons.t
... |
9a7431dfd409b5e577edf008e2f2bb53933b73ab11e16435fd855b61a2f4eacf | static-analysis-engineering/codehawk | bCHDictionary.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlib/bCHDictionary.ml | ocaml | chutil
bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
2da64099d1668d3cc928db0f77513d410470a4304058a4428461e852fe9ac804 | mirage/retreat.mirage.io | page.ml | open Tyxml.Html
let header t =
head
(title (txt t))
([meta ~a:[a_charset "UTF-8"] ();
style [ txt
{___|body {
font-family: monospace;
color: #333;
margin: 2% 0 10% 15%;
width: 45%;
}
a, a:visited {
color: #333;
text... | null | https://raw.githubusercontent.com/mirage/retreat.mirage.io/0204681b462c46c33db0dcea1d9d5c5dc080c2b8/page.ml | ocaml | open Tyxml.Html
let header t =
head
(title (txt t))
([meta ~a:[a_charset "UTF-8"] ();
style [ txt
{___|body {
font-family: monospace;
color: #333;
margin: 2% 0 10% 15%;
width: 45%;
}
a, a:visited {
color: #333;
text... | |
c04f8673510a08e4aa5328825af6ec29475b7dd4b0363552ff6cb0533cbce1ff | dselsam/arc | EagerFeatures.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE StrictData #-... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Synth/EagerFeatures.hs | haskell | # LANGUAGE StrictData # | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Synth.EagerFeatures... |
d87339839468ed0a8bae8f9616ae1b91a99d7e5112514eb0d93c9e1a4425a4cd | mwotton/judy | Bench2.hs | import Control.Monad (forM_)
import Criterion.Config
import Criterion.Main
import qualified Data.IntMap as I
import qualified Data.Judy as J
import qualified Data.Map as M
import Data.List (foldl')
import Data.Word
import System.IO.Unsafe
import System.Random.Mersenne
Work around the fact that the GC wo n't run fin... | null | https://raw.githubusercontent.com/mwotton/judy/0fdb8687b39e67bfec21430865ce3611a0c6b266/tests/examples/Bench2.hs | haskell | enough for us.
judy100k `seq` judy1M `seq` judy10M `seq` return ()
judy10k `seq` return ()
judy100k `seq` return ()
h 10000 = judy10k
h 100000 = judy100k
----------------------------------------------------------------------
construction.
---------------------------------------------------------------... | import Control.Monad (forM_)
import Criterion.Config
import Criterion.Main
import qualified Data.IntMap as I
import qualified Data.Judy as J
import qualified Data.Map as M
import Data.List (foldl')
import Data.Word
import System.IO.Unsafe
import System.Random.Mersenne
Work around the fact that the GC wo n't run fin... |
c2821aaf7e743953061a2f15c9e8300b3a655c0c0ccbc4f2e6e1cc6939297702 | gregcman/lisp-in-small-pieces | other.lisp | (in-package :lisp)
;;;;values
(defparameter *the-false-value* nil)
(defun truep (value)
(not (eq *the-false-value* value)))
(defun booleanp (value)
(or (eq *the-false-value* value)
(eq t value)))
(defparameter *empty-progn* 69)
;;;;environments
;;;;represented as alists where each cell is (symbol . value)
(... | null | https://raw.githubusercontent.com/gregcman/lisp-in-small-pieces/71a89aa2108dc1122a60337177ea75c5170e6828/interpreters/other.lisp | lisp | values
environments
represented as alists where each cell is (symbol . value) | (in-package :lisp)
(defparameter *the-false-value* nil)
(defun truep (value)
(not (eq *the-false-value* value)))
(defun booleanp (value)
(or (eq *the-false-value* value)
(eq t value)))
(defparameter *empty-progn* 69)
(defparameter *initial-environment* '())
(defun lookup (id env)
(if (consp env)
(if... |
ddfdfa4999c978ad224192a260439db882a49648ec6a7eebe0ee7d5d06b03eb7 | jvf/scalaris | db_hanoidb.erl | 2013 scalaris project
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/db_hanoidb.erl | erlang | You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@d... | 2013 scalaris project
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
distributed under the License is distributed on an " AS IS " BASIS ,
@author
@author < >
HanoiDB is a memory - ... |
39e7f17ae618a2649f99fbc03e4d373dec5f5989c3fd7437293e51a06fa1ff8b | hiroshi-unno/coar | apply_add.ml | let apply f x = f x
let add x y = x + y
let main x = assert (apply (add x) 0 >= x)
[@@@assert "typeof(main) <: int -> unit"]
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/apply_add.ml | ocaml | let apply f x = f x
let add x y = x + y
let main x = assert (apply (add x) 0 >= x)
[@@@assert "typeof(main) <: int -> unit"]
| |
8a70b8e4887d25c7c281ca23f2af8240aab811906cfb16b19dd772e00d508e7d | footprintanalytics/footprint-web | search_test.clj | (ns metabase.api.search-test
(:require [clojure.set :as set]
[clojure.string :as str]
[clojure.test :refer :all]
[honeysql.core :as hsql]
[metabase.api.search :as api.search]
[metabase.models
:refer
[App Card CardBookmark Collection... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/api/search_test.clj | clojure | `:scores` is just used for debugging and would be a pain to match against.
it 's because the test2 results happen to come first in the API response
The ignored elements are there to make sure the IDs
coll-id and app-id are different. | (ns metabase.api.search-test
(:require [clojure.set :as set]
[clojure.string :as str]
[clojure.test :refer :all]
[honeysql.core :as hsql]
[metabase.api.search :as api.search]
[metabase.models
:refer
[App Card CardBookmark Collection... |
c81dbfe9eba7d172ac6699bd75726051d286ac28e2d6284b585a50abe9b1994d | donaldsonjw/bigloo | gstelement.scm | ;*=====================================================================*/
;* .../project/bigloo/api/gstreamer/src/Llib/gstelement.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : Sun Dec 30... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/gstreamer/src/Llib/gstelement.scm | scheme | *=====================================================================*/
* .../project/bigloo/api/gstreamer/src/Llib/gstelement.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*===========================... | * Author : * /
* Creation : Sun Dec 30 15:46:10 2007 * /
* Last change : Tue Nov 15 16:56:12 2011 ( serrano ) * /
* Copyright : 2007 - 11 * /
* GstElement wrapper ... |
8e925eec405f3bede3a0fd6a1d73db3b7cae6e0a4a96d070154a7f71946a4652 | pedromartins/cuboid | Main.hs | {-# LANGUAGE Arrows #-}
module Main where
import FRP.Yampa
import Graphics.UI.GLUT hiding (Level,Vector3(..),normalize)
import Data.IORef
import Types
import Input
import Update
import Graphics
mainSF = parseInput >>> update >>> draw
| Main , initializes Yampa and sets up reactimation loop
main :: IO ()
main =... | null | https://raw.githubusercontent.com/pedromartins/cuboid/9bb33b94688497949e52998376cdf5ab4d9c9b5a/Main.hs | haskell | # LANGUAGE Arrows #
| Reactimation iteration, supplying the input | module Main where
import FRP.Yampa
import Graphics.UI.GLUT hiding (Level,Vector3(..),normalize)
import Data.IORef
import Types
import Input
import Update
import Graphics
mainSF = parseInput >>> update >>> draw
| Main , initializes Yampa and sets up reactimation loop
main :: IO ()
main = do
newInput <- newI... |
273c8b656b0a165af1ed4e73a37183b08e1ca8cd7ea9b0fe0b676bacb0fec8e1 | DSiSc/why3 | typeinv.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/mlw/typeinv.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Wstdlib
open Ident
open Ty
open Term
open Ity
open Expr
open Pdecl
let ls_valid =
let v = create_t... |
775e52c49d4594ce035248372583ab8895dba472885ab1fcdf5fa50842dd07aa | manzyuk/groebner | Polynomial.hs | # LANGUAGE FlexibleContexts , TypeOperators #
module Polynomial
( Term
, (*^)
, Polynomial
, constant
, variable
, lm
, spoly
, demote
)
where
import Monomial
import Types
import Data.Monoid
data Term r v o = T r (Monomial v o) deriving (Eq, Show)
instance (Num r, Ord v) => S... | null | https://raw.githubusercontent.com/manzyuk/groebner/3f68f3512f19ee0a4740e6ee204f6b117ecbbcad/src/Polynomial.hs | haskell | descending order by their monomials. This makes equality test and
extraction of the leading monomial very simple and fast. Besides,
the relative order of terms does not change if the polynomial is
multiplied with a term.
Multiply a polynomial with a term.
We are trying to make the display of polynomials as clos... | # LANGUAGE FlexibleContexts , TypeOperators #
module Polynomial
( Term
, (*^)
, Polynomial
, constant
, variable
, lm
, spoly
, demote
)
where
import Monomial
import Types
import Data.Monoid
data Term r v o = T r (Monomial v o) deriving (Eq, Show)
instance (Num r, Ord v) => S... |
1e543877c71e900f87550350f1b4ed17b0e8ff7604a376167c7fd130c730c74b | BekaValentine/SimpleFP-v2 | REPL.hs | module Dependent.Unification.REPL where
import Control.Monad.Reader (runReaderT)
import System.IO
import Utils.ABT
import Utils.Env
import Utils.Eval
import Utils.Pretty
import Dependent.Core.ConSig
import Dependent.Core.Evaluation
import Dependent.Core.Parser
import Dependent.Core.Term
import Dependent.Unification.E... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Dependent/Unification/REPL.hs | haskell | module Dependent.Unification.REPL where
import Control.Monad.Reader (runReaderT)
import System.IO
import Utils.ABT
import Utils.Env
import Utils.Eval
import Utils.Pretty
import Dependent.Core.ConSig
import Dependent.Core.Evaluation
import Dependent.Core.Parser
import Dependent.Core.Term
import Dependent.Unification.E... | |
0e93819a43e074cd1745ac3b762e11f4b0b892d65ac38fe7cc853b94c9d0d78e | reanimate/reanimate | doc_svgLogo.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main (main) where
import Reanimate
import Reanimate.Builtin.Documentation
import Reanimate.Builtin.Images
main :: IO ()
main = reanimate $ docEnv $ animate $ const svgLogo
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_svgLogo.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main (main) where
import Reanimate
import Reanimate.Builtin.Documentation
import Reanimate.Builtin.Images
main :: IO ()
main = reanimate $ docEnv $ animate $ const svgLogo
|
b77344b03e5c73c539d2a82b2ed7f2e74734dc6a0f73cbf22fa2ebe35949834b | 3b/3bmd | wiki-links.lisp | (defpackage #:3bmd-wiki
(:use #:cl #:esrap #:3bmd-ext)
(:export #:*wiki-links*
#:*wiki-links*
#:*wiki-processor*
#:process-wiki-link
))
(in-package #:3bmd-wiki)
;;; example extension for handling wiki-style [[links]]
;;; extending parser:
define independent rules wit... | null | https://raw.githubusercontent.com/3b/3bmd/6fc5759448f6f6df6f6df556e020a289a2643288/wiki-links.lisp | lisp | example extension for handling wiki-style [[links]]
extending parser:
define-extension-inline to add the extension to the main grammar
allowing markup for now, to be normalized like ref links during printing...
would be nicer to just use wiki-link
rule rather than duplicating it
here, but then we'd have to
seri... | (defpackage #:3bmd-wiki
(:use #:cl #:esrap #:3bmd-ext)
(:export #:*wiki-links*
#:*wiki-links*
#:*wiki-processor*
#:process-wiki-link
))
(in-package #:3bmd-wiki)
define independent rules with esrap : then use
(defrule wiki-link-label (* (and (! #\]) (! #\|) inline))... |
44f17885e4578464e7f565121f73d344ea4993a58c51c97bf504ef2cacd854d7 | dalaing/little-languages | Check.hs | module STLC.Check where
import Data.List.NonEmpty
import Data.Validation
import Control.Lens
import STLC
import STLC.Type
data Error e = Stuck | Expected e e | Arg Int (Error e)
type Errors e = NonEmpty (Error e)
expect :: Type -> AccValidation (Errors Type) Type -> AccValidation (Errors Type) Type
expect ex = ove... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/prototypes/arith/src/STLC/Check.hs | haskell | module STLC.Check where
import Data.List.NonEmpty
import Data.Validation
import Control.Lens
import STLC
import STLC.Type
data Error e = Stuck | Expected e e | Arg Int (Error e)
type Errors e = NonEmpty (Error e)
expect :: Type -> AccValidation (Errors Type) Type -> AccValidation (Errors Type) Type
expect ex = ove... | |
1a6a97280f03c3092b741dccd93d2c63ff9cbac45ef966d6e154c10e490a9919 | mmcqd/pure | statics.mli |
module Make (T : Pure.THEORY) :
sig
exception TypeError of string
val synthtype : Pure.term Pure.Context.t * Pure.term Pure.Context.t -> Pure.term -> Pure.term
end
| null | https://raw.githubusercontent.com/mmcqd/pure/1a1dcb29925c6713dc295822164b4972f4c0bfc9/statics.mli | ocaml |
module Make (T : Pure.THEORY) :
sig
exception TypeError of string
val synthtype : Pure.term Pure.Context.t * Pure.term Pure.Context.t -> Pure.term -> Pure.term
end
| |
c1304c30f0f8187a17e9373d0366297ca5f89324bde72680d19cf866eaa04b06 | haskell-opengl/GLUT | Material.hs |
( adapted from material.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates the use of the GL lighting model . Several
obje... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/Material.hs | haskell | Do not specify a material property here.
reflection with a low shininess exponent.
reflection with a high shininess exponent (a more concentrated highlight).
translate is used to move spheres to their appropriate locations.
diffuse reflection only; no ambient or specular
diffuse and specular reflection; low shi... |
( adapted from material.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates the use of the GL lighting model . Several
obje... |
29efaf3855aae5d5ec507e91eae7aec478d9a401d117aef7f63935e762437a4d | rabbitmq/rabbitmq-clusterer | rabbit_clusterer.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY ... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-clusterer/f08c59ada2d62ef66ff1c02e2ffc404d5c210185/src/rabbit_clusterer.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
for 'rabbi... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is Pivotal Software , Inc.
Portions created by the Initial Developer are Copyright ( C ) 2013 - 2... |
0a2764368ecd90abe5c295a576545a4bc232bc9d614abd54ffb5c513d1b8de6d | tomjridge/tjr_kv | summary.t.ml | (** Summary *)
*
{ 2 Architecture }
{ % html :
< img src=" / drawings / d / e/2PACX-1vSnTmJGnVDyxnrBZ_VOVZ7T0O9etqZa - BDPu - EPH9ziiNjY375TMgO - ENB9UO4e - HT3qmtbJKvFOFl0 / pub?w=453&h=373 " >
< img src=" / drawings / d / e/2PACX-1vTIXhyNa7dovQYXuJXBMwPQZU99 - x_tRdTIH3SkMUDyPwbL31zExWXauT2hO - eRIUc... | null | https://raw.githubusercontent.com/tomjridge/tjr_kv/68b3d2fa0c7a144765a3720d78cffb96d5478b32/src/summary.t.ml | ocaml | * Summary |
*
{ 2 Architecture }
{ % html :
< img src=" / drawings / d / e/2PACX-1vSnTmJGnVDyxnrBZ_VOVZ7T0O9etqZa - BDPu - EPH9ziiNjY375TMgO - ENB9UO4e - HT3qmtbJKvFOFl0 / pub?w=453&h=373 " >
< img src=" / drawings / d / e/2PACX-1vTIXhyNa7dovQYXuJXBMwPQZU99 - x_tRdTIH3SkMUDyPwbL31zExWXauT2hO - eRIUcnGP3RVHiSHrjt /... |
d8610e10c4e6c77c724cd1bd67eb9a0d9252f0c2ee463d63a9f14f1913e4d6e9 | giorgidze/Hydra | Desugar.hs | module Hydra.Stages.Desugar (desugar) where
import Hydra.BNFC.AbsHydra
desugar :: SigRel -> SigRel
desugar = desugarTupleSigRel
desugarTupleSigRel :: SigRel -> SigRel
desugarTupleSigRel sr = case sr of
SigRel pat1 eqs1 -> SigRel pat1 (concatMap desugarTupleEquation eqs1)
desugarTupleEquation :: Equation -> [Equat... | null | https://raw.githubusercontent.com/giorgidze/Hydra/e5b59d0baff27f06368caeb1e9860f1395913ca5/src/Hydra/Stages/Desugar.hs | haskell | module Hydra.Stages.Desugar (desugar) where
import Hydra.BNFC.AbsHydra
desugar :: SigRel -> SigRel
desugar = desugarTupleSigRel
desugarTupleSigRel :: SigRel -> SigRel
desugarTupleSigRel sr = case sr of
SigRel pat1 eqs1 -> SigRel pat1 (concatMap desugarTupleEquation eqs1)
desugarTupleEquation :: Equation -> [Equat... | |
ab8bfe1ac171472ee472014475aefd66a94b5297f4df8a9ad34753d6cc493a5e | noinia/hgeometry | Writer.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- |
-- Module : Geometry.Svg.Writer
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-svg/src/Geometry/Svg/Writer.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
|
Module : Geometry.Svg.Writer
License : see the LICENSE file
Description :
Write geometry to svg
------------------------------------------------------------------------------
---------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
Copyright : ( C )
Maintainer :
module Geometry.Svg.Writer where
import Control.Lens hiding (rmap, Const(..))
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString.Lazy.Char8 as B8
import D... |
3e7a73738b22864c40adb292d3d251aac39e93f30473fdfad5b5d6b3970621d3 | Helium4Haskell/helium | PMWBug.hs | f "a" = 1
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/PMWBug.hs | haskell | f "a" = 1
| |
e93634c4b71ef641c3267486424a4d628303b2efb0f6928e7039d345f42adac8 | stackbuilders/cloud-haskell-chat | Client.hs | module Client where
import Control.Distributed.Process.ManagedProcess.Client (callChan, cast)
import Control.Distributed.Process ( expectTimeout
, whereisRemoteAsync
, spawnLocal
, receiveChan
... | null | https://raw.githubusercontent.com/stackbuilders/cloud-haskell-chat/71698c87b2b5a8aa359a30590286bbce3f462b04/src/Client.hs | haskell | module Client where
import Control.Distributed.Process.ManagedProcess.Client (callChan, cast)
import Control.Distributed.Process ( expectTimeout
, whereisRemoteAsync
, spawnLocal
, receiveChan
... | |
bb5532ee584d7f6b453286fcff4cca19d30c05baf858816ab22758229247a69c | ohua-dev/ohua-core | Lang.hs | -- |
-- Module : $Header$
Description : Definition of an abstract expression language as the first IR for the Ohua compiler .
Copyright : ( c ) , 2017 . All Rights Reserved .
-- License : EPL-1.0
-- Maintainer : ,
-- Stability : experimental
-- Portability : portable
This source code is licen... | null | https://raw.githubusercontent.com/ohua-dev/ohua-core/978fa3369922f86cc3fc474d5f2c554cc87fd60a/core/src/Ohua/DAGLang/Lang.hs | haskell | |
Module : $Header$
License : EPL-1.0
Maintainer : ,
Stability : experimental
Portability : portable
It contains concepts for spawning and joining tasks.
As such it represents the backend IR which contains parallel abstractions.
| Description : Definition of an abstract expression language as the first IR for the Ohua compiler .
Copyright : ( c ) , 2017 . All Rights Reserved .
This source code is licensed under the terms described in the associated LICENSE.TXT file
module Ohua.DAGLang.Lang where
This module defines the dag lang ... |
a3bc05d433995648144abfa4abeded9c0fb355aa5dabe23aad32cc521c0f773d | daveyarwood/music-theory | util.cljc | (ns music-theory.util)
(defn error
"Throws a Clojure or ClojureScript error/exception."
[msg]
(throw (new #?(:clj Exception :cljs js/Error) msg)))
(defn parse-int
"Parses a string as an integer."
[n]
(#?(:clj Integer/parseInt :cljs js/Number) n))
| null | https://raw.githubusercontent.com/daveyarwood/music-theory/c58beb9fa6d290900afeff78ee4f86c875e393d7/src/music_theory/util.cljc | clojure | (ns music-theory.util)
(defn error
"Throws a Clojure or ClojureScript error/exception."
[msg]
(throw (new #?(:clj Exception :cljs js/Error) msg)))
(defn parse-int
"Parses a string as an integer."
[n]
(#?(:clj Integer/parseInt :cljs js/Number) n))
| |
2707653cb090ce35c9a16472b2300b43f612fb8895ffe67903238e45c6e5a135 | herd/herdtools7 | code.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/319d1c8ec9f7d939e98785dd519a0da54435b606/gen/code.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
74258bf91c856b528fa937026f36772b41df655f1abba08744a700d694b57a1d | spechub/Hets | DataTypes.hs | |
Module : ./Omega / DataTypes.hs
Description : The Omega Data Types
Copyright : ( c ) , DFKI 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
for an intermediate Omega Representation .
Module : ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Omega/DataTypes.hs | haskell | | Contains a theoryname a list of imports, signature elements and
sentences (axioms or theorems)
| Theory constitutive elements
| An axiom or theorem element
| Symbol to represent sorts, constants, predicate symbols, etc.
| A comment, only for development purposes
| Term structure
| Symbol
| Simple variable
|... | |
Module : ./Omega / DataTypes.hs
Description : The Omega Data Types
Copyright : ( c ) , DFKI 2008
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
for an intermediate Omega Representation .
Module : ... |
630bbb1ea12d629206e2b53d27542462de9bc78d9083b337c352f7d12cd637c0 | ksrky/Plato | Eval.hs | module Plato.Core.Eval where
import Plato.Core.Context
import Plato.Core.Subst
import Plato.Syntax.Core
import Control.Monad (forM)
----------------------------------------------------------------
-- Evaluation
----------------------------------------------------------------
isval :: Context -> Term -> Bool
isval ct... | null | https://raw.githubusercontent.com/ksrky/Plato/02b1a043efa92cf2093ff7d721a607d8abe9d876/src/Plato/Core/Eval.hs | haskell | --------------------------------------------------------------
Evaluation
-------------------------------------------------------------- | module Plato.Core.Eval where
import Plato.Core.Context
import Plato.Core.Subst
import Plato.Syntax.Core
import Control.Monad (forM)
isval :: Context -> Term -> Bool
isval ctx t = case t of
TmVar i _ -> case getBinding ctx i of
VarBind{} -> True
_ -> False
TmAbs{} -> Tr... |
4c9146ff193ad0773d40c807c95420101d792ad6935fc944907b0fc400424e27 | lucian303/corenlpd | layout.clj | (ns corenlpd.layout
(:require [selmer.parser :as parser]
[selmer.filters :as filters]
[markdown.core :refer [md-to-html-string]]
[ring.util.response :refer [content-type response]]
[compojure.response :refer [Renderable]]
[ring.util.anti-forgery :refer [anti... | null | https://raw.githubusercontent.com/lucian303/corenlpd/51454aaa0cbed40f0bea7d9be47aac5d224e31ef/src/corenlpd/layout.clj | clojure | (ns corenlpd.layout
(:require [selmer.parser :as parser]
[selmer.filters :as filters]
[markdown.core :refer [md-to-html-string]]
[ring.util.response :refer [content-type response]]
[compojure.response :refer [Renderable]]
[ring.util.anti-forgery :refer [anti... | |
906e76e207f7645b75769cf6606ccfeb16d2feb8337ec5b179487c3ea366b235 | facebookarchive/duckling_old | cycles.clj | ; Cycles are like a heart beat, the next starts just when the previous ends.
; Unlike durations, they have an absolute position in the time, it's just that this position is periodic.
; Examples of phrases involving cycles:
- this week
; - today (= this day)
; - last month
; - last 2 calendar months (last 2 months is ... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/de/rules/cycles.clj | clojure | Cycles are like a heart beat, the next starts just when the previous ends.
Unlike durations, they have an absolute position in the time, it's just that this position is periodic.
Examples of phrases involving cycles:
- today (= this day)
- last month
- last 2 calendar months (last 2 months is interpreted as a dur... | - this week
As soon as you put a quantity ( 2 months ) , the cycle becomes a duration .
(
"second (cycle)"
#"(?i)sekunden?"
{:dim :cycle
:grain :second}
"minute (cycle)"
#"(?i)minuten?"
{:dim :cycle
:grain :minute}
"hour (cycle)"
#"(?i)stunden?"
{:dim :cycle
:grain :hour}
"day (cyc... |
8a26f6deba9c6e918722bc1f7fe05d254d93bb930b338f8c9234895e73f0ecfc | finnishtransportagency/harja | navigaatio.cljs | (ns harja.tiedot.navigaatio
"Tämä nimiavaruus hallinnoi sovelluksen navigoinnin. Sisältää atomit, joilla eri sivuja ja polkua
sovelluksessa ohjataan sekä kytkeytyy selaimen osoitepalkin #-polkuun ja historiaan. Tämä nimiavaruus
ei viittaa itse näkymiin, vaan näkymät voivat hakea täältä tarvitsemansa navigointitie... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/cdd0f1cfdf0c66de83a0f1a7f23d9b4701691ebe/src/cljs/harja/tiedot/navigaatio.cljs | clojure | Reititykset
:hidden (ei näy mitään)
(= nil kaikki)
Quick and dirty history configuration.
väylämuodon hallintayksiköt | (ns harja.tiedot.navigaatio
"Tämä nimiavaruus hallinnoi sovelluksen navigoinnin. Sisältää atomit, joilla eri sivuja ja polkua
sovelluksessa ohjataan sekä kytkeytyy selaimen osoitepalkin #-polkuun ja historiaan. Tämä nimiavaruus
ei viittaa itse näkymiin, vaan näkymät voivat hakea täältä tarvitsemansa navigointitie... |
d0053d22e7b6fd30abe9be54a371d8433a55a83db68cf85042ac85c0b2a5f70f | ejgallego/coq-serapi | ser_constrexpr.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/dd9e3fbf7faaf3bf365fa3eff134641055151a9b/serlib/ser_constrexpr.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 - 2017 MINES... |
d61a50c3038744af96359cabd5c416854e2dd684abd56d74ecb61ac9922e3605 | mokus0/junkbox | FIFO.hs | -- |Queues with pre-evaluation, from
--
module Data.FIFO
( FIFO
, empty
, size
, insert
, remove
, null
, fromList
, toList
) where
import Data.List (unfoldr)
import Data.Maybe (isNothing)
import Prelude hiding (null)
Almost - direct translation of Figure 4
-- ('remove' has... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Data/FIFO.hs | haskell | |Queues with pre-evaluation, from
('remove' has been made total)
suffix of 'l')
for each step of (++), guaranteeing that by the time any element of 'r'
is demanded, 'r' has been fully reversed ('a' is an accumulator for the
reversed part of 'r').
| module Data.FIFO
( FIFO
, empty
, size
, insert
, remove
, null
, fromList
, toList
) where
import Data.List (unfoldr)
import Data.Maybe (isNothing)
import Prelude hiding (null)
Almost - direct translation of Figure 4
all operations except ' size ' take O(1 ) time to evalu... |
67125d49eeef3764e8a90f3b869c88a661c8e10ddfbe3b8ddc48fc3a5b7e6ae3 | malcolmreynolds/GSLL | set-identity.lisp | Regression test SET - IDENTITY for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST SET-IDENTITY
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #2A((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)))
(MULTIPLE-VALUE-LIST
... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/set-identity.lisp | lisp | Regression test SET - IDENTITY for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST SET-IDENTITY
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #2A((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)))
(MULTIPLE-VALUE-LIST
... | |
9312e54632d375778c144260d4267f375739b38eed881a4da7eed350fd8e83b5 | mirage/irmin-watcher | backend.polling.mli | include module type of struct
include Polling
end
| null | https://raw.githubusercontent.com/mirage/irmin-watcher/b2cf05dc3fd18e99f3cfe53c55b834d07e5775e4/src/backend.polling.mli | ocaml | include module type of struct
include Polling
end
| |
4e2b7b969910de2cd474c54cea4cf272c01f26eb19ecb247794a74ac5ddbedac | unison-code/unison | Predicates.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Predicate functions for the machine IR program representation .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Predicate functi... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/MachineIR/Predicates.hs | haskell | * MachineFunctionProperty predicates
* MachineInstruction predicates
* MachineInstructionProperty predicates
* MachineFunction predicates | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Predicate functions for the machine IR program representation .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Predicate functi... |
ff7cc6cb313ff3ee8ac7533e24e15418e9e11235dd02c2681bd4c2fcc947a817 | seckcoder/course-compiler | scratch.rkt | #lang racket
(define (primitives) (set '+ '- '* 'read))
(define (collect-locals)
(lambda (ast)
(match ast
[`(assign ,x ,e) (list x)]
[`(return ,e) '()]
[else
(error "unmatched in collect-locals S0" ast)]
)))
(define (map2 f ls)
(if (null? ls) (values '() '())
(let-values (... | null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/HW-Grammars/scratch.rkt | racket | select-instructions : C0 -> psuedo-x86
The following can shorten the live range of e2. -JGS | #lang racket
(define (primitives) (set '+ '- '* 'read))
(define (collect-locals)
(lambda (ast)
(match ast
[`(assign ,x ,e) (list x)]
[`(return ,e) '()]
[else
(error "unmatched in collect-locals S0" ast)]
)))
(define (map2 f ls)
(if (null? ls) (values '() '())
(let-values (... |
51ea9a68d925d4bc93618c41c49598cc1b050bfb3f234a4a331a644e1c7badc3 | CardanoSolutions/kupo | Script.hs | module Kupo.Data.Cardano.Script where
import Kupo.Prelude
import Cardano.Binary
( DecoderError (..)
, FromCBOR (..)
, decodeAnnotator
)
import Control.Arrow
( left
)
import Kupo.Data.Cardano.NativeScript
( NativeScript
)
import Kupo.Data.Cardano.ScriptHash
( ScriptHash
)
import... | null | https://raw.githubusercontent.com/CardanoSolutions/kupo/4904123abeed53f672eb34e0ef10c6c710bda61b/src/Kupo/Data/Cardano/Script.hs | haskell | module Kupo.Data.Cardano.Script where
import Kupo.Prelude
import Cardano.Binary
( DecoderError (..)
, FromCBOR (..)
, decodeAnnotator
)
import Control.Arrow
( left
)
import Kupo.Data.Cardano.NativeScript
( NativeScript
)
import Kupo.Data.Cardano.ScriptHash
( ScriptHash
)
import... | |
ac9fa4008d3c3d7af538933e4a0b160db46704c4642a01c378f19a100e0ebc7f | hhucn/decide3 | argumentation.cljc | (ns decide.models.argumentation
(:require
#?@(:clj [[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[datahike.core :as d.core]]
:cljs [[cljs.spec.alpha :as s]
[cljs.spec.gen.alpha :as gen]])
[com.fulcrologic.guardrails.core :refer [>def >defn =>]]
... | null | https://raw.githubusercontent.com/hhucn/decide3/7c048b0411285282d56a127cd1ec10362d024947/src/main/decide/models/argumentation.cljc | clojure | :db/fulltext true
TODO Move the whole id stuff to a util ns
move this to a util ns | (ns decide.models.argumentation
(:require
#?@(:clj [[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[datahike.core :as d.core]]
:cljs [[cljs.spec.alpha :as s]
[cljs.spec.gen.alpha :as gen]])
[com.fulcrologic.guardrails.core :refer [>def >defn =>]]
... |
768b5ef6f855c6b075b1fcf9ee93bbff151d26c04ac488478e999ca7a6b79594 | ygmpkk/house | Main.hs | -----------------------------------------------------------
( c ) 1999 - 2000 ,
-----------------------------------------------------------
module Main where
import MonParser (prettyFile)
main :: IO ()
main = prettyFile "prelude.m"
| null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/parsec/examples/Mondrian/Main.hs | haskell | ---------------------------------------------------------
--------------------------------------------------------- | ( c ) 1999 - 2000 ,
module Main where
import MonParser (prettyFile)
main :: IO ()
main = prettyFile "prelude.m"
|
f3d1084b39c38cf611a61eea3a64d6fff7a307fb8cfce23c9477f4b884259935 | janestreet/merlin-jst | diffing.mli |
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/utils/diffing.mli | ocaml | ************************************************************************
OCaml
... |
, projet Cambium , Paris
Copyright 2020 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Parametric diffing
This module implements diffing over lists of arbitrary content .
It is paramet... |
337e5875b826862fe7ed77a6484812e5f344a9604e4ce69a95c4b405c6b192e1 | plumatic/grab-bag | repl.clj | (ns service.repl
(:use plumbing.core)
(:require
[clojure.pprint :as pprint]
[clojure.reflect :as reflect]
[lazymap.core :as lazymap]
[plumbing.error :as err]
[crane.config :as crane-config]
[store.bucket :as bucket]
store.s3
[store.snapshots :as snapshots]
[service.graft :as graft]
[se... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/service/src/service/repl.clj | clojure | to service?
needs to be available all over, and have access to everything | (ns service.repl
(:use plumbing.core)
(:require
[clojure.pprint :as pprint]
[clojure.reflect :as reflect]
[lazymap.core :as lazymap]
[plumbing.error :as err]
[crane.config :as crane-config]
[store.bucket :as bucket]
store.s3
[store.snapshots :as snapshots]
[service.graft :as graft]
[se... |
8fd0cdf5369741ceaa16c1ebf45e598fd23a37f72378cd87d44a323c7b751957 | ober/metis | db-manardb.lisp | (in-package :metis)
(defvar *manard-files* (thread-safe-hash-table))
(defvar *metis-fields* (thread-safe-hash-table))
(defvar *metis-counters* (thread-safe-hash-table))
(defvar *metis-need-files* nil)
(defvar *output-sep* "|")
(defvar ct-fields '(
;;metis::additionalEventData
... | null | https://raw.githubusercontent.com/ober/metis/80062f3b23536cf42ef6e90c6b15f06307f1fdc9/src/db-manardb.lisp | lisp | metis::additionalEventData
metis::requestID
metis::requestParameters
metis::resources
metis::responseElements
metis::userIdentity
metis::tlsDetails
lists
(find-username (get-val-by-idx 'metis::userIdentity userIdentity))
Search functions | (in-package :metis)
(defvar *manard-files* (thread-safe-hash-table))
(defvar *metis-fields* (thread-safe-hash-table))
(defvar *metis-counters* (thread-safe-hash-table))
(defvar *metis-need-files* nil)
(defvar *output-sep* "|")
(defvar ct-fields '(
metis::eventCategory
metis::s... |
97c2b48b0edf82411b8319695c1817b942395c31145d8138c0f8d78ff37c0e34 | malcolmreynolds/GSLL | bessel.lisp | Regression test BESSEL for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST BESSEL
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST -0.3971498098638474d0 4.334456411751256d-16)
(MULTIPLE-VALUE-LIST (CYLINDRICAL-BESSEL-J0 4.0d0)))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST -0.06604332802354... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/bessel.lisp | lisp | Regression test BESSEL for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST BESSEL
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST -0.3971498098638474d0 4.334456411751256d-16)
(MULTIPLE-VALUE-LIST (CYLINDRICAL-BESSEL-J0 4.0d0)))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST -0.06604332802354... | |
42141a752f7c31654e41cbcddbb48fa7afa6b130bb7078b3e9231d20f55cb1cb | awakesecurity/grpc-mqtt | Core.hs |
-- |
-- Module : Network.GRPC.MQTT.Message.Request.Core
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
Core module defining the ' Request ' type and ' Request ' instanc... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/fbde6f3fe90e82260469bab922c5ebb9f0b40e95/src/Network/GRPC/MQTT/Message/Request/Core.hs | haskell | |
Module : Network.GRPC.MQTT.Message.Request.Core
Stability : stable
@since 1.0.0
* Request
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Request ------------------------------------------... |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
Portability : non - portable ( GHC extensions )
Core module defining the ' Request ' type and ' Request ' instances .
module Network.GRPC.MQTT.Message.Request.Core
Request (Request, message, options, ti... |
f565dda0579a3da00849967d304fe7cb51649022719e1f87de00ffe3830c4516 | ProjectMAC/propagators | copying-data-test.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 - 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/o... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/core/test/copying-data-test.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 - 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the G... |
7e0e150656088911418ca88ed7612af9a2b9ec6a236251a85715caa1872f5621 | anthonygalea/riemann-console | db.cljs | (ns riemann-console.db)
(def sample-db
{:loading? false
:saving? false
:dashboard-settings? false
:delete-confirmation? false
:configuring-widget nil
:notification {:type :error
:message "Connected"}
:dashboards {"1" "dashboard name"
"2" "foo board"
... | null | https://raw.githubusercontent.com/anthonygalea/riemann-console/d4eb21bbde8b191f6a4d853a3b14d370b9fc0761/src/cljs/riemann_console/db.cljs | clojure | (ns riemann-console.db)
(def sample-db
{:loading? false
:saving? false
:dashboard-settings? false
:delete-confirmation? false
:configuring-widget nil
:notification {:type :error
:message "Connected"}
:dashboards {"1" "dashboard name"
"2" "foo board"
... | |
57d2c10d7894a2df50b7567524897bcd97d1f372777b79cc4d1e822f4fc61d5e | tfausak/patrol | Context.hs | module Patrol.Type.Context where
import qualified Data.Aeson as Aeson
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Patrol.Type.AppContext as AppContext
import qualified Patrol.Type.BrowserContext as BrowserContext
import qualified Patrol.Type.DeviceContext as DeviceContext
impor... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/library/Patrol/Type/Context.hs | haskell | module Patrol.Type.Context where
import qualified Data.Aeson as Aeson
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Patrol.Type.AppContext as AppContext
import qualified Patrol.Type.BrowserContext as BrowserContext
import qualified Patrol.Type.DeviceContext as DeviceContext
impor... | |
73b69b69ff742b0e0eebed12ddb521f300478710c1e8a46807242eac1ee86423 | urueedi/monster-ui-phonebook | wapi_offnet_resource.erl | %%%-------------------------------------------------------------------
( C ) 2011 - 2015 , 2600Hz INC
%%% @doc
%%%
%%% @end
%%% @contributors
%%%-------------------------------------------------------------------
-module(wapi_offnet_resource).
-export([req/1, req_v/1]).
-export([resp/1, resp_v/1]).
-exp... | null | https://raw.githubusercontent.com/urueedi/monster-ui-phonebook/00b1b54996785d7a67fa902a46c82ead12ef022b/kazoo-3/core/whistle-1.0.0/src/api/wapi_offnet_resource.erl | erlang | -------------------------------------------------------------------
@doc
@end
@contributors
-------------------------------------------------------------------
helpers for working with opaque object
Offnet Resource Request
talk to both sides
hear both sides - default
Offnet Resource Response
------------------... | ( C ) 2011 - 2015 , 2600Hz INC
-module(wapi_offnet_resource).
-export([req/1, req_v/1]).
-export([resp/1, resp_v/1]).
-export([publish_req/1, publish_req/2]).
-export([publish_resp/2, publish_resp/3]).
-export([bind_q/2]).
-export([unbind_q/2]).
-export([declare_exchanges/0]).
-export([account_id/1, ac... |
8f2b966fb4c51d33cc787021807c6a63a52e877b1a9bfae4642b6a67a2567559 | karlll/bioerl | origc.erl | %
2013 - 11 - 24 karlll < >
%
%
% Finding origc
%
-module(origc).
-compile([export_all]).
%% -------------------------------------------------------------------------- %%
%% Frequency %%
%% ---------------------------------------------------------... | null | https://raw.githubusercontent.com/karlll/bioerl/6ade2d63bb37f1312e33c3bbad9b7252323ad369/src/origc.erl | erlang |
Finding origc
-------------------------------------------------------------------------- %%
Frequency %%
-------------------------------------------------------------------------- %%
Print most frequent k-mers of a specified length in a provided... | 2013 - 11 - 24 karlll < >
-module(origc).
-compile([export_all]).
print_most_frequent_kmers([],_) ->
io:format("None.");
print_most_frequent_kmers(_,0) ->
io:format("None.");
print_most_frequent_kmers(String,Length) ->
TopKmers = most_frequent_kmers(String,Length),
{_,Freq,_} = hd(TopKmers),
io:format("Mo... |
5e497a12fa0d108f15da1119fd19b18482f75bf725874dbabf5fe8be0f765520 | mirage/ocaml-qcow | qcow_config.mli |
* Copyright ( C ) 2017 < >
*
* 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 copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/lib/qcow_config.mli | ocaml | * unique name for the prometheus metrics
* discard (aka TRIM) is enabled
* maintain a free pool of this many erased sectors
* once more than this many sectors are free, perform a compact
* perform an integrity check on connect
* guarantee to not modify the file
* default configuration values
* convert the config... |
* Copyright ( C ) 2017 < >
*
* 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 copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
d64f3c6858755cf9aef1f0f4fd26623b9b805c298931273084be5cc9a9dc3931 | ocaml-flambda/flambda-backend | unboxed_invariant_ref.ml | type t = { mutable x : int }
let[@inline] f l =
let t = { x = 0 } in
List.iter (fun () -> t.x <- 1 + t.x) l;
t
let test l = (f l).x
| null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/92dbdba868235321a48916b8f1bb3f04ee884d3f/middle_end/flambda2/tests/ref_to_var/unboxed_invariant_ref.ml | ocaml | type t = { mutable x : int }
let[@inline] f l =
let t = { x = 0 } in
List.iter (fun () -> t.x <- 1 + t.x) l;
t
let test l = (f l).x
| |
e5554760d5a8d6d2952c3b5d3397fa111ed59998e253c91022ed3d74704e2ff6 | Emmanuel-PLF/facile | fcl_boolean.ml | (***********************************************************************)
(* *)
FaCiLe
A Functional Constraint Library
(* ... | null | https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_boolean.ml | ocaml | *********************************************************************
under the terms of the GNU Lesser Gener... | FaCiLe
A Functional Constraint Library
, , LOG , CENA
Copyright 2004 CENA . All rights reserved . This file is distributed
open Fcl_var
open Fcl_misc.Operators
let linear (terms : ... |
44b14f2ab0524a7c37bf752765cc06c4dfdaec0c71b7b19b75b37d35795b9e32 | HunterYIboHu/htdp2-solution | image.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname image) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section2/image.rkt | racket | about the language level of this file in a form that our tools can easily process.
定义
运行
(overlay cir sta 7polygon) | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname image) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none ... |
b13d4db928204ba87787ec13c750d4c487d08b8de8771a6b5b015a75adc1e39c | harpocrates/pretty-ghci | Value.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Text.PrettyPrint.GHCi.Value (
prettyPrintValue, value2Doc,
ValuePrintConf(..),
defaultValueConf,
) where
import Text.PrettyPrint.GHCi.Value.Lexer
import Text.PrettyPrint.GHCi.Value.Parser
import System.Terminal.Utils
-- base
import Data.... | null | https://raw.githubusercontent.com/harpocrates/pretty-ghci/179e8453d8af84a2c64fd4dc506c119fa4f971df/src/Text/PrettyPrint/GHCi/Value.hs | haskell | # LANGUAGE OverloadedStrings #
base
prettyprinter, prettyprinter-ansi-terminal
| Given a 'Show'-ed value, print that value out to the terminal, add helpful
indentation and colours whenever possible. If a structured value cannot be
parsed out, this falls back on 'print'.
The 'Bool' is to enable a slower but poten... | # LANGUAGE ScopedTypeVariables #
module Text.PrettyPrint.GHCi.Value (
prettyPrintValue, value2Doc,
ValuePrintConf(..),
defaultValueConf,
) where
import Text.PrettyPrint.GHCi.Value.Lexer
import Text.PrettyPrint.GHCi.Value.Parser
import System.Terminal.Utils
import Data.String ( fromString )
import Control.... |
bee2d58a0bbeca84391d98540e4faa8026d73ea4153edef9f74aec5973499955 | alexbs01/OCaml | tour.mli | val tour : int -> int -> (int * int) list -> int -> (int * int) list
| null | https://raw.githubusercontent.com/alexbs01/OCaml/c71ccf1289e7b158847ec2a3a8209ddb126b834c/p10/tour.mli | ocaml | val tour : int -> int -> (int * int) list -> int -> (int * int) list
| |
8e852fe227deab25cdea0cdaea23056be66866417523c7fcb1b8bc05678ff665 | jaspervdj/number-six | Quote.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Quote
( handler
) where
--------------------------------------------------------------------------------
import Control.Monad.Trans (liftIO)
import ... | null | https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Handlers/Quote.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | module NumberSix.Handlers.Quote
( handler
) where
import Control.Monad.Trans (liftIO)
import Data.Char (isDigit)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Database.SQLite.Simple as Sqlite
import Sy... |
a9f74f3f35c8e2315db582db0191da19810d285f5f2edaf7aac0e00cede1921b | michalkonecny/aern2 | Integration.hs | # LANGUAGE CPP #
-- #define DEBUG
|
Module : AERN2.RealFun . UnaryBallFun . Integration
Description : unary function integration
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Unary function integration
Module ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-fun-univariate/src/AERN2/RealFun/UnaryBallFun/Integration.hs | haskell | #define DEBUG
import Text.Printf
import AERN2.MP.Dyadic
aux diArea2 (p2:p3rest) | # LANGUAGE CPP #
|
Module : AERN2.RealFun . UnaryBallFun . Integration
Description : unary function integration
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Unary function integration
Module : AERN2.RealFu... |
a2b4d3bbface7b99f4b589347e45a0b0270a1428438906ff8aa7764364f0413e | snapframework/xmlhtml | CursorTests.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.XmlHtml.CursorTests (cursorTests) where
import Data.Maybe
import Test.Hspec
import Test.HUnit hiding (Test, Node)
import Text.XmlHtml
import Text.XmlHtml.Cursor
import Text.XmlHtml.TestCommon
----------... | null | https://raw.githubusercontent.com/snapframework/xmlhtml/54463f1691c7b31cc3c4c336a6fe328b1f0ebb95/test/src/Text/XmlHtml/CursorTests.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
--------------------------------
----------------------------------------------------------------------------
Sample node structure for running cursor tests.
Stock insertLeft
Stock insertRight
insertR... |
module Text.XmlHtml.CursorTests (cursorTests) where
import Data.Maybe
import Test.Hspec
import Test.HUnit hiding (Test, Node)
import Text.XmlHtml
import Text.XmlHtml.Cursor
import Text.XmlHtml.TestCommon
cursorTests :: Spec
cursorTests = do
testIt "f... |
26b4d0cf96221211a2058a71e1522cf0d5a590858dd97085b96c12b595f7fc1d | input-output-hk/cardano-explorer | AddressBalance.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Explorer.Web.Api.HttpBridge.AddressBalance
( addressBalance
) where
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (ReaderT)
import Data.ByteString.Char8 (ByteString)
import Data.Te... | null | https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-explorer-webapi/src/Explorer/Web/Api/HttpBridge/AddressBalance.hs | haskell | # LANGUAGE OverloadedStrings #
GET: /:network/utxos/:address
, "txid": "89eb0d6a8a691dae2cd15ed0369931ce0a949ecafa5c3f93f8121833646e15c3"
}
]
This endpoint always returns a list (which may be empty).
Currently ignore the 'CNetwork' parameter (eg mainnet, testnet etc) as the explorer only
supports a si... | # LANGUAGE DataKinds #
module Explorer.Web.Api.HttpBridge.AddressBalance
( addressBalance
) where
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (ReaderT)
import Data.ByteString.Char8 (ByteString)
import Data.Text (Text)
import Data.Wor... |
d26c6b87025a486c592439e735e83c93e9eecf8d52b9975ddc3e3562a7ff3028 | EmileTrotignon/embedded_ocaml_templates | file_handling.ml | type file = File of string | Directory of (string * file array)
let sort_by_int array ~to_int =
ArrayLabels.sort array ~cmp:(fun a b -> compare (to_int a) (to_int b))
let rec print_file file =
match file with
| File f ->
Printf.printf "File %s\n" f
| Directory (s, fa) ->
Printf.printf "File %s (\n... | null | https://raw.githubusercontent.com/EmileTrotignon/embedded_ocaml_templates/2baf51d1b07db050fe535615018864e7e850ce38/src/common/file_handling.ml | ocaml | type file = File of string | Directory of (string * file array)
let sort_by_int array ~to_int =
ArrayLabels.sort array ~cmp:(fun a b -> compare (to_int a) (to_int b))
let rec print_file file =
match file with
| File f ->
Printf.printf "File %s\n" f
| Directory (s, fa) ->
Printf.printf "File %s (\n... | |
d547392148142deb0b2c65bc4aa43003afe0a0e43e2396104f2cd04915634f67 | PacktWorkshops/The-Clojure-Workshop | core.cljs | (ns ^:figwheel-hooks support-desk.core
(:require [cuerdas.core :as str]
[goog.dom :as gdom]
[jayq.core :as jayq :refer [$]]
[rum.core :as rum]
[support-desk.utils :as utils]))
(def priorities-list [{:title "IE bugs" :priority 2} {:title "404 page" :priority 1} {:title ... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter10/Activity10.02/support-desk/src/support_desk/core.cljs | clojure | define your app data so that it doesn't get over-written on reload
conditionally start your application based on the presence of an "app" element
this is particularly helpful for testing this ns without launching the app
specify reload hook with ^;after-load metadata | (ns ^:figwheel-hooks support-desk.core
(:require [cuerdas.core :as str]
[goog.dom :as gdom]
[jayq.core :as jayq :refer [$]]
[rum.core :as rum]
[support-desk.utils :as utils]))
(def priorities-list [{:title "IE bugs" :priority 2} {:title "404 page" :priority 1} {:title ... |
69a796d44d7a7833f01941c73524f2c2cf6c09d4476f877f23bb00beb0bc963a | geophf/1HaskellADay | Solution.hs | module Y2016.M08.D01.Solution where
import Control.List (choose, permute)
import Control.Logic.Frege (assert)
summer :: Int -> Int -> [[Int]]
summer result slotCount =
choose slotCount [1..9] >>= assert ((== result) . sum) >>= permute
-- Note the return value: there may be multiple solutions.
Note also [ 1,2,3 ... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2016/M08/D01/Solution.hs | haskell | Note the return value: there may be multiple solutions.
} | module Y2016.M08.D01.Solution where
import Control.List (choose, permute)
import Control.Logic.Frege (assert)
summer :: Int -> Int -> [[Int]]
summer result slotCount =
choose slotCount [1..9] >>= assert ((== result) . sum) >>= permute
Note also [ 1,2,3 ] for the sum of 6 is a different value than [ 3,2,1 ]
sum... |
88903d074e27d829649cdc88a7ab4fa9106d47bff9271c6d5188579bf950420b | mfp/oraft | oraft_lwt_conn_wrapper.mli | type -'a conn_wrapper
type simple_wrapper =
Lwt_unix.file_descr -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t
val make_client_conn_wrapper :
simple_wrapper -> [`Outgoing] conn_wrapper
val make_server_conn_wrapper :
incoming:simple_wrapper ->
outgoing:simple_wrapper ->
[`Incoming | `Outgoing] conn... | null | https://raw.githubusercontent.com/mfp/oraft/cf7352eb8f1324717d47dc294a058c857ebef9eb/src/oraft_lwt_conn_wrapper.mli | ocaml | type -'a conn_wrapper
type simple_wrapper =
Lwt_unix.file_descr -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt.t
val make_client_conn_wrapper :
simple_wrapper -> [`Outgoing] conn_wrapper
val make_server_conn_wrapper :
incoming:simple_wrapper ->
outgoing:simple_wrapper ->
[`Incoming | `Outgoing] conn... | |
9202e05167c590dabcef6ac3b7a7334b18e02437b3efc05cf1080a136a1545fd | mirleft/ocaml-tls | tls_eio.ml | module Flow = Eio.Flow
exception Tls_alert of Tls.Packet.alert_type
exception Tls_failure of Tls.Engine.failure
module Raw = struct
(* We could replace [`Eof] with [`Error End_of_file] and then use
a regular [result] type here. *)
type t = {
flow : Flow.two_way ;
mutable state : [ `Acti... | null | https://raw.githubusercontent.com/mirleft/ocaml-tls/7c3fda0b4321450f48c7b42f64781de16dea0358/eio/tls_eio.ml | ocaml | We could replace [`Eof] with [`Error End_of_file] and then use
a regular [result] type here.
Error is in [t.state]
* XXX bad XXX
* This is a point that should particularly be protected from concurrent r/w.
* Doing this before a `t` is returned is safe; redoing it during rekeying is
* not, as the A... | module Flow = Eio.Flow
exception Tls_alert of Tls.Packet.alert_type
exception Tls_failure of Tls.Engine.failure
module Raw = struct
type t = {
flow : Flow.two_way ;
mutable state : [ `Active of Tls.Engine.state
| `Eof
| `Error of exn ] ;
mutable li... |
d9cfd5bc3326debe630f18b51f97e01cc266a6f348d92200812599d03ad840ae | zonotope/zanmi | time.clj | (ns zanmi.util.time
(:require [clj-time.core :as time]))
(defn now []
(.toDate (time/now)))
(defn in-hours [hours]
(.toDate (time/plus (time/now) (time/hours hours))))
| null | https://raw.githubusercontent.com/zonotope/zanmi/26e448db2dfb1b5edb3cb6ca9e49d6ff8cac607c/src/zanmi/util/time.clj | clojure | (ns zanmi.util.time
(:require [clj-time.core :as time]))
(defn now []
(.toDate (time/now)))
(defn in-hours [hours]
(.toDate (time/plus (time/now) (time/hours hours))))
| |
2c1ae3b7076be3885ac8ae7514b59c931939be085d792eea5a757511a8a1131b | walang/wa | wa.lisp | ; Wa main.
(in-package :cl-user)
(declaim (optimize (speed 3) (safety 1) (debug 0)))
(load "wc.lisp")
(load "bi.lisp")
(defun main ()
(let ((file (cadr *posix-argv*)))
(if file
(with-wa-readtable (wa-load file))
(with-wa-readtable (wa-repl)))))
(loop repeat 10 do (gc :full t))
(save-lisp-and... | null | https://raw.githubusercontent.com/walang/wa/74ac218cd222c0db1176775965656fa75b09d5f4/src/wa/wa.lisp | lisp | Wa main. |
(in-package :cl-user)
(declaim (optimize (speed 3) (safety 1) (debug 0)))
(load "wc.lisp")
(load "bi.lisp")
(defun main ()
(let ((file (cadr *posix-argv*)))
(if file
(with-wa-readtable (wa-load file))
(with-wa-readtable (wa-repl)))))
(loop repeat 10 do (gc :full t))
(save-lisp-and-die "wa" :... |
4e88a423a4089754467329576b985dd4144806d6ef508b062e38b0f278b5ceab | zenspider/schemers | exercise.4.47.scm | #!/usr/bin/env csi -s
(require rackunit)
Exercise 4.47
suggests that , since a verb phrase
;; is either a verb or a verb phrase followed by a prepositional
;; phrase, it would be much more straightforward to define the
;; procedure `parse-verb-phrase' as follows (and similarly for noun
;; phrases):
;;
;; ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_4/exercise.4.47.scm | scheme | is either a verb or a verb phrase followed by a prepositional
phrase, it would be much more straightforward to define the
procedure `parse-verb-phrase' as follows (and similarly for noun
phrases):
(define (parse-verb-phrase)
(amb (parse-word verbs)
(list 'verb-phrase
(... | #!/usr/bin/env csi -s
(require rackunit)
Exercise 4.47
suggests that , since a verb phrase
|
87d2e069faacfad5ff53e652ad0c71af6abd0b99af78a6aee51971cf601d9b89 | luminus-framework/examples | middleware.clj | (ns multi-client-ws-aleph.middleware
(:require
[multi-client-ws-aleph.env :refer [defaults]]
[cheshire.generate :as cheshire]
[cognitect.transit :as transit]
[clojure.tools.logging :as log]
[multi-client-ws-aleph.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forge... | null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-aleph/src/clj/multi_client_ws_aleph/middleware.clj | clojure | since they're not compatible with this middleware | (ns multi-client-ws-aleph.middleware
(:require
[multi-client-ws-aleph.env :refer [defaults]]
[cheshire.generate :as cheshire]
[cognitect.transit :as transit]
[clojure.tools.logging :as log]
[multi-client-ws-aleph.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forge... |
25070c64998e745c3e0ae7c7f66ec42aae225e17f4328917d86daf945521fe9e | xh4/web-toolkit | handler.lisp | (in-package :http)
(defclass handler-class (standard-class)
((function
:initarg :function
:initform nil)
(%function
:initform nil
:accessor handler-function)
(function-lambda-list
:initarg :function-lambda-list
:initform nil
:accessor handler-function-lambda-list)))
(defmethod vali... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/handler.lisp | lisp | Mapping from handler names (class names of handlers) to handler instances
TODO: handle referer missing condition | (in-package :http)
(defclass handler-class (standard-class)
((function
:initarg :function
:initform nil)
(%function
:initform nil
:accessor handler-function)
(function-lambda-list
:initarg :function-lambda-list
:initform nil
:accessor handler-function-lambda-list)))
(defmethod vali... |
38549c8a4476c4b8074b23b9f5e6743a1fd726f909f6bbac86af6831dc81ae0a | footprintanalytics/footprint-web | h2.clj | (ns metabase.cmd.copy.h2
"Functions for working with H2 databases shared between the `load-from-h2` and `dump-to-h2` commands."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[metabase.db.data-source :as mdb.data-source]
[m... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/cmd/copy/h2.clj | clojure | (ns metabase.cmd.copy.h2
"Functions for working with H2 databases shared between the `load-from-h2` and `dump-to-h2` commands."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[metabase.db.data-source :as mdb.data-source]
[m... | |
0f54159043094d0684c2cf54cbf84b366817321288c920b112d1a6a547e5b5d9 | g-andrade/erlchronos | erlchronos_tests.erl | % vim: set expandtab softtabstop=2 shiftwidth=4:
-module(erlchronos_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-define(IN_RANGE(X, Y, Range), (abs((X) - (Y)) =< Range)).
erlchronos_test_() ->
{foreach,
fun() ->
%error_logger:tty(false)
ok
end,
... | null | https://raw.githubusercontent.com/g-andrade/erlchronos/45bd22a78c0a27d78be44b2b07f330511747e7cd/test/erlchronos_tests.erl | erlang | vim: set expandtab softtabstop=2 shiftwidth=4:
error_logger:tty(false)
error_logger:tty(true)
ifdef(TEST) | -module(erlchronos_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-define(IN_RANGE(X, Y, Range), (abs((X) - (Y)) =< Range)).
erlchronos_test_() ->
{foreach,
fun() ->
ok
end,
fun(_) ->
ok
end,
[
{<<"Basic tick works">>,
... |
ad292c388830898f56edd247c7bbcbacfe2fb0d1e16e9814206d17e9d6fd0431 | fiddlerwoaroof/lisp-sandbox | lambda-test.lisp | (defpackage :lambda-test
(:use cl)
(:export :mksym :alambda))
(in-package :lambda-test)
(defun mksym (str)
(intern (string-upcase str) *package*))
(defmacro alambda ((&optional (nargs 1)) &body body)
(let ((args (loop for x from 1 to nargs collect (mksym (format nil "$~a" x)))))
`(lambda ,args ,@body)))
... | null | https://raw.githubusercontent.com/fiddlerwoaroof/lisp-sandbox/38ff817c95af35db042faf760b477675264220d2/lambda-test.lisp | lisp | (defpackage :lambda-test
(:use cl)
(:export :mksym :alambda))
(in-package :lambda-test)
(defun mksym (str)
(intern (string-upcase str) *package*))
(defmacro alambda ((&optional (nargs 1)) &body body)
(let ((args (loop for x from 1 to nargs collect (mksym (format nil "$~a" x)))))
`(lambda ,args ,@body)))
... | |
110c4624672bca1a9b4e43a6ebde6361dcb19f3845fb310c854564625f1a0006 | criticic/llpp | glutils.mli | val vraw : [< Raw.kind > `float ] Raw.t
val filledrect2 :
float ->
float -> float -> float -> float -> float -> float -> float -> unit
val filledrect1 : float -> float -> float -> float -> unit
val filledrect : float -> float -> float -> float -> unit
val linerect : float -> float -> float -> float -> unit
val draw... | null | https://raw.githubusercontent.com/criticic/llpp/04431d79a40dcc0215f87a2ad577f126a85c1e61/glutils.mli | ocaml | val vraw : [< Raw.kind > `float ] Raw.t
val filledrect2 :
float ->
float -> float -> float -> float -> float -> float -> float -> unit
val filledrect1 : float -> float -> float -> float -> unit
val filledrect : float -> float -> float -> float -> unit
val linerect : float -> float -> float -> float -> unit
val draw... | |
b9338b28a3e4a5e7a15543b27af599503235f9d89e37a78e385e993e53c733b7 | kupl/FixML | sub66.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) -> match exp with
|Const n -> Const 0
| Var t -> if t=var then Const 1 else Const 0
|Power (t,n) -> if t=var then Times [Const n; Po... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub66.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) -> match exp with
|Const n -> Const 0
| Var t -> if t=var then Const 1 else Const 0
|Power (t,n) -> if t=var then Times [Const n; Po... | |
8fb953d2dcfc147ef417b38872e3896a35895ab2e0867b642480610e4da32979 | karamellpelle/grid | File.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/File.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module File
(
#ifdef GRID_PLATFORM_IOS
modul... |
fa4b683227e8ecb56c4e87e4f2e10496a19b6a8b5ea6d4a563d43898a1750040 | robert-stuttaford/bridge | base.cljs | (ns bridge.ui.base)
(defmulti load-on-view :view)
(defmethod load-on-view :default [_]
nil)
(defmulti view :view)
| null | https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/ui/base.cljs | clojure | (ns bridge.ui.base)
(defmulti load-on-view :view)
(defmethod load-on-view :default [_]
nil)
(defmulti view :view)
| |
6a858fd81c74cf137e7c1a6e0096eb673d1a7c8321a924f0957a3bd9b7d4ae64 | mfoemmel/erlang-otp | pg.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/stdlib/src/pg.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(pg).
-export([create/1,
create/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.