_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 |
|---|---|---|---|---|---|---|---|---|
4d0afd3eb3d47171c10c92d920427a75e723b34cffe13860c924b4c283a030bf | chapmanb/bcbio.variation | core.clj | (ns bcbio.variation.remote.core
"Top level API for working with remote filestores."
(:require [bcbio.variation.remote.file :as file]
[bcbio.variation.remote.client :as client]))
(def get-client client/get-client)
(def list-dirs file/list-dirs)
(def list-files file/list-files)
(def get-file file/get-fil... | null | https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/remote/core.clj | clojure | (ns bcbio.variation.remote.core
"Top level API for working with remote filestores."
(:require [bcbio.variation.remote.file :as file]
[bcbio.variation.remote.client :as client]))
(def get-client client/get-client)
(def list-dirs file/list-dirs)
(def list-files file/list-files)
(def get-file file/get-fil... | |
43ced74914d3f648a27b7b54ca88d23f4d06590abc5d6f3871657c3bf7da9d2e | intolerable/reddit | Search.hs | module Reddit.Actions.Search where
import Reddit.Routes.Search
import Reddit.Types.Options
import Reddit.Types.Post
import Reddit.Types.Reddit
import Reddit.Types.Subreddit
import qualified Reddit.Types.SearchOptions as Search
import Data.Text (Text)
search :: Monad m => Maybe SubredditName -> Options PostID -> Sear... | null | https://raw.githubusercontent.com/intolerable/reddit/588901f79e684536a6839d63e6f9c6a4847fe001/src/Reddit/Actions/Search.hs | haskell | module Reddit.Actions.Search where
import Reddit.Routes.Search
import Reddit.Types.Options
import Reddit.Types.Post
import Reddit.Types.Reddit
import Reddit.Types.Subreddit
import qualified Reddit.Types.SearchOptions as Search
import Data.Text (Text)
search :: Monad m => Maybe SubredditName -> Options PostID -> Sear... | |
2683d8af3ad32badea03148a2831a9d5e6755835d3d053e300401dbdf74badfa | aeternity/aeternity | aeo_query_tx.erl | %%%=============================================================================
2017 , Aeternity Anstalt
%%% @doc
Module defining the Oracle register transaction
%%% @end
%%%=============================================================================
-module(aeo_query_tx).
-include("oracle_txs.hrl").
-includ... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aeoracle/src/aeo_query_tx.erl | erlang | =============================================================================
@doc
@end
=============================================================================
Behavior API
Additional getters
Checks are in process/3. | 2017 , Aeternity Anstalt
Module defining the Oracle register transaction
-module(aeo_query_tx).
-include("oracle_txs.hrl").
-include_lib("aecontract/include/hard_forks.hrl").
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
gas/1,
ttl/1,
nonce/1,
origin/1,... |
7c487029223558043aff24935c115a7a81a5bddc44f301eb39cfe20cbcf63873 | nickzuber/lets-make-a-compiler | emoji.ml |
let herb = "\xF0\x9F\x8C\xBF"
| null | https://raw.githubusercontent.com/nickzuber/lets-make-a-compiler/ee2337b116f07c1357f7b70bd09f1503e39fdc88/utils/emoji.ml | ocaml |
let herb = "\xF0\x9F\x8C\xBF"
| |
f58955365a9389af91920b83bf36e175f993b87b5b8fae5170255d69d20a5ca3 | well-typed/large-records | R050.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.ApBaseline.Sized.R050 where
import Bench.Types
import Common.FunOfArity.F050
applyF :: Applicative f => F r -> f r
apply... | null | https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Experiment/ApBaseline/Sized/R050.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ApBaseline.Sized.R050 where
import Bench.Types
import Common.FunOfArity.F050
applyF :: Applicative f => F r -> f r
applyF f =
pure f
<*> pure (MkT 00)
<*> pure (MkT 01)
<*> pure (MkT 02)
<*> pure (MkT 03)
<*> pure (Mk... |
1a2c678e9b6732b36b5d9f93cfbaa19c46d36ca7f7bf7f51eda3374861b4ced5 | cyverse-archive/DiscoveryEnvironmentBackend | exception_util.clj | (ns clojure-commons.exception-util
(:use [slingshot.slingshot :only [throw+]])
(:require [clojure-commons.exception :as cx]))
(defn unauthorized
"Throws an error indicating that the request is unauthorized."
[reason]
(throw+ {:type ::cx/authentication-not-found :error reason}))
(defn forbidden
"Throws an ... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/iplant-clojure-commons/src/clojure_commons/exception_util.clj | clojure | (ns clojure-commons.exception-util
(:use [slingshot.slingshot :only [throw+]])
(:require [clojure-commons.exception :as cx]))
(defn unauthorized
"Throws an error indicating that the request is unauthorized."
[reason]
(throw+ {:type ::cx/authentication-not-found :error reason}))
(defn forbidden
"Throws an ... | |
bed4e4a80fda7d24af2da3c0dcb75f6e559ef5f5bfd7437ee01d6a392716c648 | sigxcpu76/transcode-server | transcode_sup.erl | -module(transcode_sup).
-behaviour(supervisor).
-include("commons.hrl").
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type),
{I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ===... | null | https://raw.githubusercontent.com/sigxcpu76/transcode-server/8b5e5bd9c672ab22486c9853d8e6ec749745ec12/src/transcode_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(transcode_sup).
-behaviour(supervisor).
-include("commons.hrl").
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-define(CHILD(I, Type),
{I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
... |
a5ecc705770cf15a2e3abd7887bf8549e7590c347b68f62b332b1cc3076470e0 | discus-lang/ddc | Check.hs | module DDC.Driver.Command.Check
( -- * Checking modules.
cmdCheckFromFile
, cmdCheckSourceTetraFromFile
, cmdCheckSourceTetraFromString
, cmdCheckCoreFromFile
, cmdCheckCoreFromString
-- * Checking types.
, cmdShowType
, cmdTypeEquiv
,... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/Command/Check.hs | haskell | * Checking modules.
* Checking types.
* Checking expressions.
* Checking witnesses.
Module -----------------------------------------------------------------------------------------
printing any errors to @stdout@.
modules. The language to use is determined by inspecting the file name
extension.
^ Drive... | module DDC.Driver.Command.Check
cmdCheckFromFile
, cmdCheckSourceTetraFromFile
, cmdCheckSourceTetraFromString
, cmdCheckCoreFromFile
, cmdCheckCoreFromString
, cmdShowType
, cmdTypeEquiv
, cmdParseCheckType
, Mode(..)
, ShowSpecMode(..... |
8b1e617ddd93aec5375b78f1189faa037065d05cb83c0e10081cd6671c74f5b3 | arrterian/nix-env-selector | constants.cljs | (ns ext.constants)
(def donate-url "")
| null | https://raw.githubusercontent.com/arrterian/nix-env-selector/62f01e632dd1e5ba4ac72d23ccf18b30175dabe0/src/main/ext/constants.cljs | clojure | (ns ext.constants)
(def donate-url "")
| |
47b9476df1b4b847d9484fb26415bdae63d3c883d25c2de57c067f6aec602480 | gedge-platform/gedge-platform | rabbit_priority_queue.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2015 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_priority_queue).
-include_lib("r... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_priority_queue.erl | erlang |
enabled unconditionally. Disabling priority queuing after
it has been enabled is dangerous.
See 'note on suffixes' below
This module adds support for priority queues.
by priority.
For queues that do not
have priorities enabled, the functions in this module delegate to
their "regular" backing queue module cou... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2015 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_priority_queue).
-include_lib("rabbit_... |
0190721a6274343321944c6449ddbc91d7b1efa4514c7519ceabf24f68e839ed | pablomarx/Thomas | runtime-methods.scm | * Copyright 1992 Digital Equipment Corporation
;* All Rights Reserved
;*
;* Permission to use, copy, and modify this software and its documentation is
;* hereby granted only under the following terms and conditions. Both the
;* above copyright notice and this permission notice mus... | null | https://raw.githubusercontent.com/pablomarx/Thomas/c8ab3f6fa92a9a39667fe37dfe060b651affb18e/kits/scc/src/runtime-methods.scm | scheme | * All Rights Reserved
*
* Permission to use, copy, and modify this software and its documentation is
* hereby granted only under the following terms and conditions. Both the
* above copyright notice and this permission notice must appear in all copies
* of the software, derivative works or modi... | * Copyright 1992 Digital Equipment Corporation
* and hereby grant back to Digital a non - exclusive , unrestricted , royalty - free
* their best efforts to return to Digital any such changes , enhancements or
* extensions that they make and inform Digital of noteworthy uses of this
* software . Correspo... |
f2b6cfb50af08962eb73eba2844a7a7842adf82b952ba9596b1d05b154a2179e | dradtke/Lisp-Text-Editor | library.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; library.lisp --- GLUT foreign library definition.
;;;
Copyright ( c ) 2006 ,
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are ... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/cl-opengl-20120107-git/glut/library.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
library.lisp --- GLUT foreign library definition.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
o Redistributions of source code must retain the a... | Copyright ( c ) 2006 ,
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(in-package :cl-glut)... |
8bfc406901d2477d2bf139fab5ef329f1f6924dd43462a77ad07ae9fa7ddd762 | vaibhavsagar/experiments | XmlCDataSection.hs | module Dotnet.System.Xml.XmlCDataSection where
import Dotnet
import qualified Dotnet.System.Xml.XmlCharacterData
import Dotnet.System.Xml.XmlWriter
import Dotnet.System.Xml.XmlNode
import Dotnet.System.Xml.XmlNodeType
data XmlCDataSection_ a
type XmlCDataSection a = Dotnet.System.Xml.XmlCharacterData.XmlCharacterData... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/lib/Dotnet/System/Xml/XmlCDataSection.hs | haskell | module Dotnet.System.Xml.XmlCDataSection where
import Dotnet
import qualified Dotnet.System.Xml.XmlCharacterData
import Dotnet.System.Xml.XmlWriter
import Dotnet.System.Xml.XmlNode
import Dotnet.System.Xml.XmlNodeType
data XmlCDataSection_ a
type XmlCDataSection a = Dotnet.System.Xml.XmlCharacterData.XmlCharacterData... | |
acf65b6870abca1e93276d9ed5e8eef998921a4bb7085779e2bf028a58ea551c | guicho271828/trivia | level0.lisp |
(defpackage :trivia.level0.test
(:use :cl :fiveam :trivia.level0))
(in-package :trivia.level0.test)
(in-suite :trivia.level0)
(defun testfn (x)
(match0 x
((list) :null)
((list* :keyword _) :keyword)
((list* "string" _) "string")
((list* MOST-POSITIVE-FIXNUM _) MOST-POSITIVE-FIXNUM)
((list 'a... | null | https://raw.githubusercontent.com/guicho271828/trivia/69637801872cc80da4fc727de7ffce402bfb7c8a/test/level0.lisp | lisp |
(defpackage :trivia.level0.test
(:use :cl :fiveam :trivia.level0))
(in-package :trivia.level0.test)
(in-suite :trivia.level0)
(defun testfn (x)
(match0 x
((list) :null)
((list* :keyword _) :keyword)
((list* "string" _) "string")
((list* MOST-POSITIVE-FIXNUM _) MOST-POSITIVE-FIXNUM)
((list 'a... | |
0c199a8c32a4ee07ee7d6f403f9f1a550072a6695557e81e4029e5a53682378e | cxxxr/cl-source-map | source-map-generator.lisp | (defpackage :cl-source-map/source-map-generator
(:use :cl
:cl-source-map/util)
(:local-nicknames (:mapping-list
:cl-source-map/mapping-list)
(:mapping
:cl-source-map/mapping)
(:base64-vlq
:cl-source-map/ba... | null | https://raw.githubusercontent.com/cxxxr/cl-source-map/1193fcc7c7bd1ce60a7aaa50e380f766f1ec774c/source-map-generator.lisp | lisp | TODO: validate arguments
) | (defpackage :cl-source-map/source-map-generator
(:use :cl
:cl-source-map/util)
(:local-nicknames (:mapping-list
:cl-source-map/mapping-list)
(:mapping
:cl-source-map/mapping)
(:base64-vlq
:cl-source-map/ba... |
a138b0d363f0e62e8c2cb98966487852e8a5c999af584ed10a45a78644221e50 | ZeusWPI/contests | puzzle.hs | --------------------------------------------------------------------------------
import Control.Applicative ((<$>))
import Control.Monad (replicateM_)
import Data.List (foldl')
import Data.List (sortBy)
import Data.Map (Map)
import q... | null | https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2013-vpw/schuifpuzzel/puzzle.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
# UNPACK #
# UNPACK #
------------------------------------------------------------------------------
-------------------------------------------------------------... | import Control.Applicative ((<$>))
import Control.Monad (replicateM_)
import Data.List (foldl')
import Data.List (sortBy)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Ord (comparing... |
ec215a49236e66e0c412132b2123bd972fc21a27d4ea14fcf29094f0444e1fa9 | processone/xmpp | xep0191.erl | Created automatically by XML generator ( fxml_gen.erl )
%% Source: xmpp_codec.spec
-module(xep0191).
-compile(export_all).
do_decode(<<"blocklist">>, <<"urn:xmpp:blocking">>, El,
Opts) ->
decode_block_list(<<"urn:xmpp:blocking">>, Opts, El);
do_decode(<<"unblock">>, <<"urn:xmpp:blocking">>, El,
... | null | https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0191.erl | erlang | Source: xmpp_codec.spec | Created automatically by XML generator ( fxml_gen.erl )
-module(xep0191).
-compile(export_all).
do_decode(<<"blocklist">>, <<"urn:xmpp:blocking">>, El,
Opts) ->
decode_block_list(<<"urn:xmpp:blocking">>, Opts, El);
do_decode(<<"unblock">>, <<"urn:xmpp:blocking">>, El,
Opts) ->
decode_un... |
2e98bdd84628dee0a48a1bcf09c2ed17c70d5c46f6547c2e954d25e5e830def2 | roddyyaga/finch | filters.ml | open Core
open Jingoo
let nullmap f opt =
let f = Jg_types.unbox_fun f in
match opt with Jg_types.Tnull -> Jg_types.Tnull | non_null -> f non_null
let iso_fmt = "%FT%TZ"
let strptime fmt s =
let fmt, s = Jg_types.(unbox_string fmt, unbox_string s) in
let parsed = Unix.strptime ~fmt s in
Jg_types.Tstr (Unix... | null | https://raw.githubusercontent.com/roddyyaga/finch/685b661b987c7b57fe07e1e67b0ce4f688d87d67/lib/filters.ml | ocaml | Assume ISO formatting | open Core
open Jingoo
let nullmap f opt =
let f = Jg_types.unbox_fun f in
match opt with Jg_types.Tnull -> Jg_types.Tnull | non_null -> f non_null
let iso_fmt = "%FT%TZ"
let strptime fmt s =
let fmt, s = Jg_types.(unbox_string fmt, unbox_string s) in
let parsed = Unix.strptime ~fmt s in
Jg_types.Tstr (Unix... |
ba339ffa44134ef112b42bc569e184b2234939bd14f20c396273d2744d249a1b | adamwalker/sdr | Pulse.hs | {-| Pulse Audio Pipes sink -}
module SDR.Pulse (
pulseAudioSink,
doPulse
) where
import Foreign.ForeignPtr
import Foreign.C.Types
import Control.Concurrent
import Data.ByteString.Internal
import Data.Vector.Storable as VS
import Sound.Pulse.Simple
import Pipes
import Pipes.Concurrent
-- | Returns a c... | null | https://raw.githubusercontent.com/adamwalker/sdr/73a8bb20a036338e33ac802325fd56b50f643024/hs_sources/SDR/Pulse.hs | haskell | | Pulse Audio Pipes sink
| Returns a consumer that sends all incoming data to pulseaudio. Runs Pulse Audio output writing in a different thread. This is probably what you want as it does not block the entire pipline while the data is being played.
| Returns a consumer that sends all incoming data to pulseaudio. | module SDR.Pulse (
pulseAudioSink,
doPulse
) where
import Foreign.ForeignPtr
import Foreign.C.Types
import Control.Concurrent
import Data.ByteString.Internal
import Data.Vector.Storable as VS
import Sound.Pulse.Simple
import Pipes
import Pipes.Concurrent
pulseAudioSink :: IO (Consumer (VS.Vector Floa... |
61771ffdeedfdf3ab2ba0dadb8a23272b992bb4cad7c34d2b7dcc06adc80b6de | exoscale/clojure-kubernetes-client | v1_scale.clj | (ns clojure-kubernetes-client.specs.v1-scale
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-scale-spec :refer :all]
[clojure-kubernetes-client.specs.v1-s... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_scale.clj | clojure | (ns clojure-kubernetes-client.specs.v1-scale
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1-scale-spec :refer :all]
[clojure-kubernetes-client.specs.v1-s... | |
2ad98cccec3bf627373c817b761f883dc44dcea0af22626fe7070c066a7d59cb | scarvalhojr/haskellbook | section7.7.hs |
avgGrade x
| otherwise = 'F'
| y >= 0.9 = 'A'
| y >= 0.8 = 'B'
| y >= 0.7 = 'C'
| y >= 0.59 = 'D'
where y = x / 100
numbers x
| x < 0 = -1
| x == 0 = 0
| x > 0 = 1
| null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter7/section7.7.hs | haskell |
avgGrade x
| otherwise = 'F'
| y >= 0.9 = 'A'
| y >= 0.8 = 'B'
| y >= 0.7 = 'C'
| y >= 0.59 = 'D'
where y = x / 100
numbers x
| x < 0 = -1
| x == 0 = 0
| x > 0 = 1
| |
2552cf2118e4e61586e61f8a71d4c3d056cbef40d5a815493a6705ba81a3b663 | helium/blockchain-core | blockchain_poc_path_v4.erl | %%%-----------------------------------------------------------------------------
%%% @doc blockchain_poc_path_v4 implementation.
%%%
%%% The way paths are built depends solely on witnessing data we have accumulated
%%% in the blockchain ledger.
%%%
%%% Assuming we already have a `TargetPubkeyBin` and `TargetRandState` ... | null | https://raw.githubusercontent.com/helium/blockchain-core/9402994d745f7aa3ce16b68147ff54912e64afef/src/poc/blockchain_poc_path_v4.erl | erlang | -----------------------------------------------------------------------------
@doc blockchain_poc_path_v4 implementation.
The way paths are built depends solely on witnessing data we have accumulated
in the blockchain ledger.
Assuming we already have a `TargetPubkeyBin` and `TargetRandState` using `target_v3:targ... | We recursively start building a path starting at ` TargetPubkeyBin ` .
*
We scale these probabilities and run an ICDF to select the witness from
-module(blockchain_poc_path_v4).
-export([
build/5
]).
-include("blockchain_utils.hrl").
-include("blockchain_vars.hrl").
-include("blockchain_caps.hrl").
-type ... |
65d254042d8d9bbddb3285ef77c18b9a0a80bf5a2af1f0053afcb1761c0c74a4 | carl-eastlund/dracula | main.rkt | #lang scheme/base
(require "require-provide.ss")
(require/provide
"class.ss"
"contract.ss"
"debug.ss"
"define.ss"
"dict.ss"
"exn.ss"
"function.ss"
"hash.ss"
"match.ss"
"planet.ss"
"port.ss"
"queue.ss"
"regexp.ss"
"require-provide.ss"
"sandbox.ss"
"set.ss"
"syntax.ss"
"text.ss"
"values.ss"
"web.ss")... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/main.rkt | racket | #lang scheme/base
(require "require-provide.ss")
(require/provide
"class.ss"
"contract.ss"
"debug.ss"
"define.ss"
"dict.ss"
"exn.ss"
"function.ss"
"hash.ss"
"match.ss"
"planet.ss"
"port.ss"
"queue.ss"
"regexp.ss"
"require-provide.ss"
"sandbox.ss"
"set.ss"
"syntax.ss"
"text.ss"
"values.ss"
"web.ss")... | |
e16e25d22503dcd4f2c77f9b2a75e7d3f315df39ea3c07ebffa10c11c0150918 | mirage/irmin | path.mli |
* Copyright ( c ) 2013 - 2022 < >
*
* 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... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/path.mli | ocaml | * Tree path handling. |
* Copyright ( c ) 2013 - 2022 < >
*
* 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... |
db08fd870a572899ccf42dd88e4f432435a5f4bea92c481c0f9fd5abef986db3 | dmitryvk/sbcl-win32-threads | mop-25.impure.lisp | miscellaneous side - effectful tests of the MOP
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This softwar... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/mop-25.impure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
be sure that the :FUNCTION initarg to initialize methods overrides
any system-provided func... | miscellaneous side - effectful tests of the MOP
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(defpackage "MOP-25"
(:use "CL" "SB-MOP"))
(in-package "MOP-25")
(defclass typechecking-reader-method (standard-... |
c2fba9e121cb608f16a2694906fe3b88ded8abc50835a3b5a595ef1b3fde1fb3 | eugenehr/erlyconv | cp850.erl | %% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
FROM mappings / MICSFT / PC / CP850.TXT AT 2016 - 08 - 19
-module(cp850).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
%% Public functions
to_unicode(16#80) -> 16#00c7;
to_unicode(16#81) -> 16#00fc;
to_unicode(16#82) -> 16#00e9;
to_unicode(16#83) -> ... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/cp850.erl | erlang | THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
Public functions
Private functions | FROM mappings / MICSFT / PC / CP850.TXT AT 2016 - 08 - 19
-module(cp850).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
to_unicode(16#80) -> 16#00c7;
to_unicode(16#81) -> 16#00fc;
to_unicode(16#82) -> 16#00e9;
to_unicode(16#83) -> 16#00e2;
to_unicode(16#84) -> 16#00e4;
to_unicode(16#85) -> 16#00e0;
to_uni... |
613641ac16987b4467d2f14c2c351923d6eb5529def1e811c8be82d0e93d8b74 | TrustInSoft/tis-kernel | cil2cfg.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/cil2cfg.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
044241b0e4cef54a826d0e92ca2aa299b97b6a186b03b87448d9b275d822eb00 | input-output-hk/ouroboros-network | Node.hs | {-# LANGUAGE EmptyCase #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/999f250358b875746bdc92838a3f60bd62010a53/ouroboros-consensus-mock/src/Ouroboros/Consensus/Mock/Node.hs | haskell | # LANGUAGE EmptyCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
----------------------------------------------------------------------------
------------------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Mock.Node (
CodecConfig (..)
, simpleBlockForging
) where
import Cod... |
ba7721eabbe7a207f67538cbd4ce52307aa9a18a50c27e9cf8d5195c129fe6b9 | JunSuzukiJapan/cl-reex | synchronize.lisp | (in-package :cl-user)
(defpackage cl-reex.operator.synchronize
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:is-active
:set-error
:set-completed
:set-dis... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/operator/synchronize.lisp | lisp | (in-package :cl-user)
(defpackage cl-reex.operator.synchronize
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:is-active
:set-error
:set-completed
:set-dis... | |
4d39daf3968cb95c016996100691fb409bf7d9539de850e869bed67d58aec0b2 | exercism/common-lisp | example.lisp | (defpackage :beer-song
(:use :common-lisp)
(:export :verse :sing))
(in-package :beer-song)
(defgeneric bottles (n))
(defmethod bottles (n) (format nil "~A bottle~:P" n))
(defmethod bottles ((n (eql 0))) (bottles "no more"))
(defgeneric left (n))
(defmethod left ((n integer)) (1- n))
(defmethod left ((n (eql 0)))... | null | https://raw.githubusercontent.com/exercism/common-lisp/0bb38d1b126f7dc90d86f04c41479d4eaf35df74/exercises/practice/beer-song/.meta/example.lisp | lisp | (defpackage :beer-song
(:use :common-lisp)
(:export :verse :sing))
(in-package :beer-song)
(defgeneric bottles (n))
(defmethod bottles (n) (format nil "~A bottle~:P" n))
(defmethod bottles ((n (eql 0))) (bottles "no more"))
(defgeneric left (n))
(defmethod left ((n integer)) (1- n))
(defmethod left ((n (eql 0)))... | |
925f4c2d2186e943b8cd80bb1b98f09029814e910473749a274423ffe13789f2 | HIPERFIT/accelerate-opencl | ZipWith_Test.hs | module ZipWith_Test (tests) where
import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Smart as Acc
import qualified Data.Array.Accelerate.OpenCL as Acc
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
tests = testGroup "zipWith"
... | null | https://raw.githubusercontent.com/HIPERFIT/accelerate-opencl/7ec05ba9d4d5461ffcf952bed6d0dcc4b1915099/tests/unit/ZipWith_Test.hs | haskell | We must explicitly mention the types that we want QuickCheck to
generate as elements
test_zipWithTup :: [Float] -> [Int] -> Bool
Supply it with a regular function and an Accelerate function that
performs the same operations, to create a QuickCheckable property | module ZipWith_Test (tests) where
import Data.Array.Accelerate as Acc
import Data.Array.Accelerate.Smart as Acc
import qualified Data.Array.Accelerate.OpenCL as Acc
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
tests = testGroup "zipWith"
... |
3bbf070d88ae6144ffea7c5abaed99dd98759c695b7b6e14e089b1742fd444df | cxphoe/SICP-solutions | 4.59.rkt | ;; a)
(meeting ?division (Friday ?time))
;; b)
(rule (meeting-time ?person ?day-and-time)
(or (meeting whole-company ?day-and-time)
(and (job ?person (?division . ?type))
(meeting ?division ?day-and-time))))
;; c)
(meeting-time (Hacker P Alyssa) (Wednesday ?time)) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%204-Metalinguistic%20Abstraction/4.Logical%20Programing/4.59.rkt | racket | a)
b)
c) | (meeting ?division (Friday ?time))
(rule (meeting-time ?person ?day-and-time)
(or (meeting whole-company ?day-and-time)
(and (job ?person (?division . ?type))
(meeting ?division ?day-and-time))))
(meeting-time (Hacker P Alyssa) (Wednesday ?time)) |
9c75ac6c7555436985eb2c57a065a6357c033869afbdd92ade153ecfe088669c | nikita-volkov/rerebase | PArr.hs | module GHC.PArr
(
module Rebase.GHC.PArr
)
where
import Rebase.GHC.PArr
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/GHC/PArr.hs | haskell | module GHC.PArr
(
module Rebase.GHC.PArr
)
where
import Rebase.GHC.PArr
| |
248444f2b5eaca672ad801f1d066ff7ef2767a8fb4288cb9d679ebc8160b4c3f | ftrain/anxietybox | handler.clj | (ns anxietybox.handler
(:use compojure.core)
(:require
[taoensso.timbre :as timbre]
[anxietybox.data :as data]
[anxietybox.style :as style]
[anxietybox.bot :as bot]
[anxietybox.mail :as mail]
[clojure.string :as string]
[compojure.handler :as handler]
[compojure.route :as route]... | null | https://raw.githubusercontent.com/ftrain/anxietybox/cee9286931465f345e22aec162fb8610a00b6977/anxietybox/src/anxietybox/handler.clj | clojure | Logging prefix
(timbre/set-config! [:shared-appender-config :spit-filename] (env/env :log-file))
}
}));}
that's
(mail/send-anxiety (data/box-select ""))
(map mail/send-anxiety (data/boxes-for-update)) | (ns anxietybox.handler
(:use compojure.core)
(:require
[taoensso.timbre :as timbre]
[anxietybox.data :as data]
[anxietybox.style :as style]
[anxietybox.bot :as bot]
[anxietybox.mail :as mail]
[clojure.string :as string]
[compojure.handler :as handler]
[compojure.route :as route]... |
0fa64ab7a43d3c054b3261ca0c445dcec006faa3509e948ccf7a911ad94187a0 | aphyr/tea-time | virtual_test.clj | (ns tea-time.virtual-test
(:require [tea-time.core :refer :all]
[tea-time.virtual :refer :all]
[clojure.test :refer :all]))
(use-fixtures :once call-with-virtual-time!)
(use-fixtures :each reset-time!)
(deftest clock-test
(is (= (virtual-unix-time) 0.0))
(advance! -1)
... | null | https://raw.githubusercontent.com/aphyr/tea-time/b055044f07535c60527e7a41569426bc76ccdee2/test/tea_time/virtual_test.clj | clojure | Double-down
Into the future! | (ns tea-time.virtual-test
(:require [tea-time.core :refer :all]
[tea-time.virtual :refer :all]
[clojure.test :refer :all]))
(use-fixtures :once call-with-virtual-time!)
(use-fixtures :each reset-time!)
(deftest clock-test
(is (= (virtual-unix-time) 0.0))
(advance! -1)
... |
4b193511687c66168a8f929b4738f0cc240ce273159c50e73373df59496a3c76 | ghcjs/ghcjs-boot | Ord.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ord
Copyright : ( c ) The University of Glasgow 2005
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stabi... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Data/Ord.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Ord
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------------------------
|
> ... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The University of Glasgow 2005
module Data.Ord (
Ord(..),
Ordering(..),
Down(..),
comparing,
) where
import GHC.Base
import GHC.Show
import GHC.Read
Useful combinator for use in conjunction with the @xxxBy@ family
>... |
8b39c6f1df11b77b813216e37984ddc2aed28c2a216ac5340302695b1958ef3d | mirage/wodan | location.ml | Limited to max_int until Bitv adds support for int64 indexes
include Int64
exception TooLarge
exception NotUnsigned
let of_int64 v =
if Int64.compare v (Int64.of_int Stdlib.max_int) > 0 then raise TooLarge
else if Int64.compare v 0L < 0 then raise NotUnsigned
else v
let of_int v = if v < 0 then raise NotUns... | null | https://raw.githubusercontent.com/mirage/wodan/fa37883ed73a1e9d7a05781453caf926134edcf3/src/wodan/location.ml | ocaml | Limited to max_int until Bitv adds support for int64 indexes
include Int64
exception TooLarge
exception NotUnsigned
let of_int64 v =
if Int64.compare v (Int64.of_int Stdlib.max_int) > 0 then raise TooLarge
else if Int64.compare v 0L < 0 then raise NotUnsigned
else v
let of_int v = if v < 0 then raise NotUns... | |
5eac14d4bd94a24961fb0ef470614d240fffc7810e2b6124e69fe34f010b4f5a | haroldcarr/learn-haskell-coq-ml-etc | SumReflexion.hs | module SumReflexion where
import Either
sr1 = Either.either Left Right (Left 10)
sr1' = id (Left 10)
( Left 10 )
sr2 = Either.either Left Right (Right 100)
sr2' = id (Right 100)
( Right 100 )
-- End
| null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2019-Program_Design_by_Calculation-Oliveira/2015-05-LambdaConf/SumReflexion.hs | haskell | End | module SumReflexion where
import Either
sr1 = Either.either Left Right (Left 10)
sr1' = id (Left 10)
( Left 10 )
sr2 = Either.either Left Right (Right 100)
sr2' = id (Right 100)
( Right 100 )
|
f689d28e57634eb35635b8c90c2c764724b04ff64b2970ba232c5094d42b286b | Brat-vseznamus/hi | Spec.hs | import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.HUnit (assertFailure, testCase, (@?=))
import Test.Tasty.QuickCheck as QC (testProperty, (==>))
import Test.Tasty.SmallCheck as SC (testProperty, (==>))
import Control.Exception (SomeException, try)
import Data.List (sort)
import Data.Ord ()
import... | null | https://raw.githubusercontent.com/Brat-vseznamus/hi/ce50c72046711f2acc63a71321a790e94cb9d051/hw3/test/Spec.hs | haskell | import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.HUnit (assertFailure, testCase, (@?=))
import Test.Tasty.QuickCheck as QC (testProperty, (==>))
import Test.Tasty.SmallCheck as SC (testProperty, (==>))
import Control.Exception (SomeException, try)
import Data.List (sort)
import Data.Ord ()
import... | |
4361074be530e529f32c1ebffb90ca33586f0d0b63d751248f0f5999d0b1c787 | RoccoMathijn/programming-in-haskell | chapter03.hs | module Chapter3 where
1 .
-- :type ['a','b','c']
[ ' a','b','c ' ] : : [ ]
--
-- :type ('a','b','c')
( ' a','b','c ' ) : : ( , , )
--
-- :type [(False, '0'), (True, '1')]
[ ( False , ' 0 ' ) , ( True , ' 1 ' ) ] : : [ ( , ) ]
--
-- :type ([False, True], ['0', '1'])
( [ False , True ] , [ ' 0 ' , ' 1 '... | null | https://raw.githubusercontent.com/RoccoMathijn/programming-in-haskell/ef2e3a5fa8c8a82154fdd5cd067d83b1fef1f220/chapter03.hs | haskell | :type ['a','b','c']
:type ('a','b','c')
:type [(False, '0'), (True, '1')]
:type ([False, True], ['0', '1'])
:type (tail, init, reverse)
(tail, init, reverse) :: ([a2] -> [a2], [a1] -> [a1], [a] -> [a])
:type bools
bools :: [Bool]
:type nums
nums :: [[Integer]]
:type add
:type copy
copy :: t -> (t, t)... | module Chapter3 where
1 .
[ ' a','b','c ' ] : : [ ]
( ' a','b','c ' ) : : ( , , )
[ ( False , ' 0 ' ) , ( True , ' 1 ' ) ] : : [ ( , ) ]
( [ False , True ] , [ ' 0 ' , ' 1 ' ] ) : : ( [ Bool ] , [ ] )
2 .
bools = [True]
nums = [[1],[2]]
add x y z = x + y + z
add : : a = > a - > a - > a - > a
... |
c5c00914e17f2aa6c6bf84836df5fb624b726add5c973e577efeefa5dfb4b5af | evincarofautumn/kitten | Merge.hs | |
Module : Kitten . Entry . Merge
Description : Merge behavior for dictionary entries
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Entry.Merge
Description : Merge behavior for dictionary entries
Copyright : (c... | null | https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Entry/Merge.hs | haskell | | When adding a definition to the dictionary, if an existing definition has
the same name, the default 'Merge' behavior of 'Deny' raises an error, while | |
Module : Kitten . Entry . Merge
Description : Merge behavior for dictionary entries
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : experimental
Portability : GHC
Module : Kitten.Entry.Merge
Description : Merge behavior for dictionary entries
Copyright : (c... |
b8f9f10c6f7309f3254180aba48849c5b9bb78fd3f1cd603758b9c0dd8cba18f | TyOverby/mono | app_test.ml | open! Core
open! Bonsai_web_test
open! Bonsai_web
open Bonsai_time_example
(* $MDX part-begin=test-clock-component *)
let%expect_test _ =
let clock = Incr.Clock.create ~start:Time_ns.epoch () in
let handle = Handle.create ~clock (Result_spec.vdom Fn.id) component in
Handle.show handle;
[%expect {| 1970-01-01 0... | null | https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/time/test/app_test.ml | ocaml | $MDX part-begin=test-clock-component
$MDX part-end | open! Core
open! Bonsai_web_test
open! Bonsai_web
open Bonsai_time_example
let%expect_test _ =
let clock = Incr.Clock.create ~start:Time_ns.epoch () in
let handle = Handle.create ~clock (Result_spec.vdom Fn.id) component in
Handle.show handle;
[%expect {| 1970-01-01 00:00:00.000000000Z |}];
Incr.Clock.advanc... |
154748e238692ccf707ee2a250e4a71b5a2de55243e75a7b63b70074c4eeb3a9 | tolitius/mount | start_with.cljc | (ns mount.test.start-with
(:require
#?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]]
[mount.core :as mount :refer-macros [defstate]]
[tapp.websockets :refer [system-a]]
[tapp.conf :refer [config]]
[tapp.audit-log :refer [l... | null | https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/test/core/mount/test/start_with.cljc | clojure | (ns mount.test.start-with
(:require
#?@(:cljs [[cljs.test :as t :refer-macros [is are deftest testing use-fixtures]]
[mount.core :as mount :refer-macros [defstate]]
[tapp.websockets :refer [system-a]]
[tapp.conf :refer [config]]
[tapp.audit-log :refer [l... | |
52707807f2ad83260c2d6ff0fd5e501049a50d725034c2118614329e4c0cb83e | hamler-lang/hamler | Counters.erl | %%---------------------------------------------------------------------------
%% |
%% Module : Counters
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Data/Counters.erl | erlang | ---------------------------------------------------------------------------
|
Module : Counters
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The Counters FFI module.
--------------------------------------------------------------------------- | Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('Counters').
-include("../Foreign.hrl").
-export([new/2]).
new(Size, Option) ->
?IO(counters:new(Size, parseOpt(Option))).
parseOpt({'Atomics'}) -> [atomics];
parseOpt({'WriteConcurrency'}) -> [w... |
ef3f8b20976db19e8091cc2f3d7ec7d31b324a7f009711c48f8f87d1c9ba7ed0 | grin-compiler/ghc-whole-program-compiler-project | Int8.hs | # LANGUAGE RecordWildCards , LambdaCase , OverloadedStrings , PatternSynonyms , Strict #
module Stg.Interpreter.PrimOp.Int8 where
import Stg.Syntax
import Stg.Interpreter.Base
import Data.Int
import Data.Word
import Data.Bits
pattern IntV i = IntAtom i -- Literal (LitNumber LitNumInt i)
pattern Int8V i = IntAto... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/6e75aaccf4df0d78786f5bb1a28778d54c09a7be/external-stg-interpreter/lib/Stg/Interpreter/PrimOp/Int8.hs | haskell | Literal (LitNumber LitNumInt i)
Literal (LitNumber LitNumInt i)
int8ToInt# :: Int8# -> Int#
intToInt8# :: Int# -> Int8#
negateInt8# :: Int8# -> Int8#
plusInt8# :: Int8# -> Int8# -> Int8#
subInt8# :: Int8# -> Int8# -> Int8#
timesInt8# :: Int8# -> Int8# -> Int8#
quotInt8# :: Int8# -> Int8# -> Int8#
NOTE: int8 /... | # LANGUAGE RecordWildCards , LambdaCase , OverloadedStrings , PatternSynonyms , Strict #
module Stg.Interpreter.PrimOp.Int8 where
import Stg.Syntax
import Stg.Interpreter.Base
import Data.Int
import Data.Word
import Data.Bits
Literal ( LitNumber LitNumWord i )
Literal ( LitNumber LitNumWord i )
evalPrimOp :: Pr... |
fe09ba648bf52efa0560cf05eb25625b02f028d0d20a07c80f1a4da6718f5d4c | RJMetrics/sweet-liberty | handlers.clj | (ns com.rjmetrics.sweet-liberty.handlers
(:require [clojure.walk :refer [keywordize-keys]]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
[com.rjmetrics.sweet-liberty.util :as util]
[com.rjmetrics.sweet-liberty.expansion :as expansion]
[com.rjm... | null | https://raw.githubusercontent.com/RJMetrics/sweet-liberty/812a1caee1a6ef2053d0545a9e05d83e03011212/src/com/rjmetrics/sweet_liberty/handlers.clj | clojure | Form params only exist if the body is of content type form-urlencoded
Body params only exist if it's json or otherwise.
Url formencoded CANNOT be bulk, only single updates.
/update/5 | name=new-name
/update/5 | {"name": "new-name"}
:params is used here since otherwise we'd merge all parameters together anyway
Th... | (ns com.rjmetrics.sweet-liberty.handlers
(:require [clojure.walk :refer [keywordize-keys]]
[clojure.data.json :as json]
[clojure.tools.logging :as log]
[com.rjmetrics.sweet-liberty.util :as util]
[com.rjmetrics.sweet-liberty.expansion :as expansion]
[com.rjm... |
e90406740ec3a58e9cb517ec50d4d914c4dd4b6fa1b31c66f6338e311ac4aff0 | lisp/de.setf.thrift | ThriftTest-types.lisp | ;;; -*- Package: thrift-generated -*-
;;;
Autogenerated by Thrift
;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
(def-package :thrift-generated)
(thrift:def-enum "Numberz"
(("ONE" . 1)
("TWO" . 2)
("THREE" . 3)
("FIVE" . 5)
("SIX" . 6)
("EIGHT" . 8)))
(thrift:def-struct "bon... | null | https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/test/gen-cl/ThriftTest-types.lisp | lisp | -*- Package: thrift-generated -*-
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | Autogenerated by Thrift
(def-package :thrift-generated)
(thrift:def-enum "Numberz"
(("ONE" . 1)
("TWO" . 2)
("THREE" . 3)
("FIVE" . 5)
("SIX" . 6)
("EIGHT" . 8)))
(thrift:def-struct "bonk"
(("message" nil :type string :id 1)
("type" nil :type i32 :id 2)))
(thrift:def-struct "bools"
(("im_t... |
5310f88b9066a2ce45faa19671d895383cd0739f21e26ae7a800a3dd9f48a7eb | clingen-data-model/genegraph | debug.clj | (ns genegraph.debug
"Debug tools not specific to this program."
(:require [clojure.pprint :refer [pprint]]))
(defmacro dump
"Dump [EXPRESSION VALUE] where VALUE is EXPRESSION's value."
[expression]
`(let [x# ~expression]
(do
(pprint ['~expression x#])
x#)))
(defmacro trace
"Like `dump` ... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/3ff22415702171eaffac9c41cb45aec544c367d8/src/genegraph/debug.clj | clojure | (ns genegraph.debug
"Debug tools not specific to this program."
(:require [clojure.pprint :refer [pprint]]))
(defmacro dump
"Dump [EXPRESSION VALUE] where VALUE is EXPRESSION's value."
[expression]
`(let [x# ~expression]
(do
(pprint ['~expression x#])
x#)))
(defmacro trace
"Like `dump` ... | |
c4d1d817c54b1d3c3afae4d3a2f871724e089ef2e6042262227acd9045f66afd | input-output-hk/high-assurance-legacy | ThreadId.hs | module Simulation.ThreadId
( ThreadId(..)
) where
newtype ThreadId = ThreadId Int deriving (Eq, Ord)
instance Show ThreadId where
show (ThreadId n) = "#" ++ show n
| null | https://raw.githubusercontent.com/input-output-hk/high-assurance-legacy/ee90add31d3fa286322144219092d60fe854bf8d/Exploration/%CE%94Q%20simulation/src/Simulation/ThreadId.hs | haskell | module Simulation.ThreadId
( ThreadId(..)
) where
newtype ThreadId = ThreadId Int deriving (Eq, Ord)
instance Show ThreadId where
show (ThreadId n) = "#" ++ show n
| |
c861fcad9b6b909bb9509cb880f1b77d2caebd894e38c2c69389751fb9a58ceb | part-cw/lambdanative | array.scm | ;;;;"array.scm" Arrays for Scheme
Copyright ( C ) 2001 , 2003 , 2005 , 2006
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made of this soft... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/array/array.scm | scheme | "array.scm" Arrays for Scheme
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any... | Copyright ( C ) 2001 , 2003 , 2005 , 2006
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
@code{(require ' array ) } or @code{(require ' ) }
(##namespace ... |
9c991f92b10f75742c1dc60415404f2b9efc28121b60463a506cc6da7f4976d8 | couchbase/couchdb | couch_replicator_worker.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/couchbase/couchdb/8a75fd2faa89f95158de1776354ceccf3e762753/src/couchdb/couch_replicator_worker.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_replicator_worker).
-behaviour(gen_server).
-export([start_link/5]).
-export([init/1, terminate/2, code_change/3]).
-export([handle_call/3, ... |
9c235758967ec40b1e67de8d3ffc3959f022abbca4fc1f35c15f0f80bc49ba0c | stevenvar/OMicroB | device_config.ml | let arch_args =
arch_args@[
("-xc32-c++", Arg.Unit (fun () -> Printf.printf "%s\n%!" Config.xc32_cxx; exit 0),
" Print location of XC32 C++ compiler and exit");
("-xc32-bin2hex", Arg.Unit (fun () -> Printf.printf "%s\n%!" Config.xc32_bin2hex; exit 0),
" Print location of xc32-bin2hex and exit");
... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/targets/pic32/device_config.ml | ocaml | ****************************************************************************
Compile a .c into a .pic32_elf
**************************************************************************** | let arch_args =
arch_args@[
("-xc32-c++", Arg.Unit (fun () -> Printf.printf "%s\n%!" Config.xc32_cxx; exit 0),
" Print location of XC32 C++ compiler and exit");
("-xc32-bin2hex", Arg.Unit (fun () -> Printf.printf "%s\n%!" Config.xc32_bin2hex; exit 0),
" Print location of xc32-bin2hex and exit");
... |
678dc1122d8e34b795b06028c38c9d76b7d1bf2f548118090c9e21e70d024d15 | simonmichael/games | Main.hs | #!/usr/bin/env stack
stack script --optimize --verbosity = info --resolver = nightly-2022 - 04 - 04
--ghc - options=-threaded
--package ansi - terminal
--package ansi - terminal - game
--package containers
--package directory
--package extra
--package filepath
--package pretty - show
... | null | https://raw.githubusercontent.com/simonmichael/games/f1122d6939a8e84636c5ac0cfc35e21365ac42e9/caverunner/src/Main.hs | haskell | optimize --verbosity = info --resolver = nightly-2022 - 04 - 04
ghc - options=-threaded
package ansi - terminal
package ansi - terminal - game
package containers
package directory
package extra
package filepath
package pretty - show
package pretty - simple
package safe
package time
package typed - process
... | #!/usr/bin/env stack
-}
way to run this program reliably . On first run the script may seem
to hang ( perhaps for minutes ) while downloading and unpacking GHC ;
the above haskell packages and a suitable GHC version ( eg 8.10 ) ,
# OPTIONS_GHC -Wno - missing - signatures -Wno - unused - imports #
import Contr... |
619d81d86c97fd5465c76077a28f8c0c44ea4b3066a8d28b43e56b792ea0087a | dundalek/closh | pipeline_test.cljc | (ns closh.pipeline-test
(:require [clojure.test :refer [deftest is are]]
[clojure.string]
[closh.test-util.util :refer [null-file]]
[closh.zero.platform.process :refer [shx]]
[closh.zero.pipeline :refer [process-output pipe pipe-multi pipe-map pipe-filter pipeline-value... | null | https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/test/closh/pipeline_test.cljc | clojure | process to process - redirect stdout
"echo abc | tr \"[:lower:]\" \"[:upper:]\""
process to fn - collect stdout
"echo abc | (clojure.string/upper-case)"))
process to sequence - split lines
"echo -e \"a\\nb\\nc\" |> (reverse)"
; sequence to fn
sequence to sequence
"(list 1 2 3) | (reverse)"))
sequence to proce... | (ns closh.pipeline-test
(:require [clojure.test :refer [deftest is are]]
[clojure.string]
[closh.test-util.util :refer [null-file]]
[closh.zero.platform.process :refer [shx]]
[closh.zero.pipeline :refer [process-output pipe pipe-multi pipe-map pipe-filter pipeline-value... |
5792267dbcf6711afe6a1d1bf89569521465cf150ba5d2073f2617fdab8e8b1e | jwiegley/gitlib | Smoke.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - do - bind #
# OPTIONS_GHC -fno - warn - wrong - do - bind #
# OPTIONS_GHC -fno - warn - n... | null | https://raw.githubusercontent.com/jwiegley/gitlib/7d7ee1a62de723e3ebbbcaf7c262d6b43936329c/gitlib-test/Git/Smoke.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
createBlobUtf8 "Hello, world!\n"
liftIO $ x @?= "Hello, world!\n"
e1 <- existsObject $ untag oid
liftIO $ e1 @? "Expected object doesn't exist."
e2 <- existsObject =<< parseOid "efefefefefefefefefefefefe... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - do - bind #
# OPTIONS_GHC -fno - warn - wrong - do - bind #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Git.Smoke where
import Conduit
import Control.Applicative... |
cf5ab35a04fad7febb65d244e7bb838a61c183b585f385327ed0499f14e0ef8d | jrm-code-project/LISP-Machine | gl.lisp | -*- Mode : LISP ; Package : GL ; ; : CL -*-
(defpackage "GNU"
:use nil)
(defvar *gnu-readtable* nil)
(import '(eval
nil
t
defun
fset
defvar
setq
let
defconst
<=
1+
or
and
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/gl.lisp | lisp | Package : GL ; ; : CL -*-
always push SOMETHING -- NIL if evaluation is aborted.
Inform user of return to top level. |
(defpackage "GNU"
:use nil)
(defvar *gnu-readtable* nil)
(import '(eval
nil
t
defun
fset
defvar
setq
let
defconst
<=
1+
or
and
fboundp
if
memq
... |
e198413e926ff351fb283965e57d1702ae673206e4a9eb67b1425fa083f2c4dd | V-Wong/COMP3141 | secondLast.hs | module Main where
-- Using direct indexing
secondLast1 :: [a] -> a
secondLast1 x | length x < 2 = error "List must contain > 2 items"
| otherwise = x !! ((length x) - 2)
-- Recursive approach using pattern matching
secondLast2 :: [a] -> a
secondLast2 [] = error "List must contain > 2 items"
secondLast2 ... | null | https://raw.githubusercontent.com/V-Wong/COMP3141/f5a92e5833d2bb0a08e68cb2d025e38c8c875563/Random%20Code/secondLast.hs | haskell | Using direct indexing
Recursive approach using pattern matching
Recursive approach using tail | module Main where
secondLast1 :: [a] -> a
secondLast1 x | length x < 2 = error "List must contain > 2 items"
| otherwise = x !! ((length x) - 2)
secondLast2 :: [a] -> a
secondLast2 [] = error "List must contain > 2 items"
secondLast2 [x] = error "List must contain > 2 items"
secondLast2 [x, y] = x
secon... |
1c8f9dff691833de04ef699959c0ff72ef7fce1c68b273f3c11c93437db06734 | skanev/playground | 40-tests.scm | (require rackunit rackunit/text-ui)
(load-relative "../../support/eopl.scm")
(load-relative "../40.scm")
(load-relative "helpers/nameless.scm")
(define eopl-3.40-tests
(test-suite
"Tests for EOPL exercise 3.40"
(check-equal? (run "42") 42)
(check-equal? (run "% Comment\n 1") 1)
(check-equal? (run ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/tests/40-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load-relative "../../support/eopl.scm")
(load-relative "../40.scm")
(load-relative "helpers/nameless.scm")
(define eopl-3.40-tests
(test-suite
"Tests for EOPL exercise 3.40"
(check-equal? (run "42") 42)
(check-equal? (run "% Comment\n 1") 1)
(check-equal? (run ... | |
f327dcabccd78dedd33e7d886eba7b609bebfb74b031df21712373d794dc3a55 | kowainik/typerep-map | OptimalVector.hs | # OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module OptimalVector
( spec
... | null | https://raw.githubusercontent.com/kowainik/typerep-map/88b9ac5a236c72bddf610283f6341cebb42f13ea/benchmark/OptimalVector.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
Not implemented
Not implemented
Not implemented
Not implemented | # OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module OptimalVector
( spec
) where
import Prelude hiding (lookup)
import Criterion.Main (bench, env, nf)
import Data.Kind (Type)
import Data.Maybe (fromJust)
import Data.Prox... |
ba56713436dfe3fae6d74b199bedecf51ccf4fd2343f313e02020e8fe8f5b679 | ltoth/unison | lwt_unix.ml | include Lwt_unix_impl
| null | https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/lwt/lwt_unix.ml | ocaml | include Lwt_unix_impl
| |
3881096d00c9eeba74c319450dcc8254ab85e0fe5f45e885583d436b108f8df7 | kelsey-sorrels/robinson | animationtest.clj | (ns robinson.animationtest
(:require [zaffre.terminal :as zat]
[zaffre.glterminal :as zgl]
[zaffre.events :as zevents]
[zaffre.font :as zfont]
[zaffre.tilesets :as ztiles]
[zaffre.util :as zutil])
(:import (zaffre.font CompositeFont)))
(def font (Composit... | null | https://raw.githubusercontent.com/kelsey-sorrels/robinson/337fd2646882708331257d1f3db78a3074ccc67a/src/robinson/animationtest.clj | clojure | Setup a layer group `:app`
With no position offset
Give the group a nice font
Set the window title
Screen dimentions in pixels
Receive the terminal in a callback
Save the last key press in an atom
Every 33ms, draw a full frame
Draw strings
Wire up terminal events to channels we read from
Save last key
Make ... | (ns robinson.animationtest
(:require [zaffre.terminal :as zat]
[zaffre.glterminal :as zgl]
[zaffre.events :as zevents]
[zaffre.font :as zfont]
[zaffre.tilesets :as ztiles]
[zaffre.util :as zutil])
(:import (zaffre.font CompositeFont)))
(def font (Composit... |
01c271c982b9ff50de426620ea08afcf7593f044c912de090e1ce705dde6951d | racket/parser-tools | info.rkt | #lang info
(define collection 'multi)
(define deps '("parser-tools-lib"
"parser-tools-doc"))
(define implies '("parser-tools-lib"
"parser-tools-doc"))
(define pkg-desc "Lex- and Yacc-style parsing tools")
(define pkg-authors '(mflatt))
(define license
'(Apache-2.0 OR MIT))
| null | https://raw.githubusercontent.com/racket/parser-tools/4afd434f2fcd719132e7a5b2c263faf544f916ca/parser-tools/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("parser-tools-lib"
"parser-tools-doc"))
(define implies '("parser-tools-lib"
"parser-tools-doc"))
(define pkg-desc "Lex- and Yacc-style parsing tools")
(define pkg-authors '(mflatt))
(define license
'(Apache-2.0 OR MIT))
| |
63f69c2c3e6d98d14d2fe702f3a72952f8da96eb99421d03284762aa5a13a9fd | ropas/sparrow | interCfg.mli | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserved... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/program/interCfg.mli | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
* Inter - procedural CFG
module Proc : AbsDom.HASHABLE_SET with type t = string
module ProcSet : ... |
e80cd069cbaf4e1ef567ae85deae2c75f82b632cad7cff597542a1b631d37c68 | potapenko/playphraseme-site | view.cljs | (ns playphraseme.views.register.view
(:require [clojure.string :as string]
[cljs.pprint :refer [pprint]]
[reagent.core :as r]
[re-frame.core :as rf]
[cljs.core.async :as async :refer [<! >! put! chan timeout]]
[playphraseme.common.util :as util]
... | null | https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/cljs/playphraseme/views/register/view.cljs | clojure | (ns playphraseme.views.register.view
(:require [clojure.string :as string]
[cljs.pprint :refer [pprint]]
[reagent.core :as r]
[re-frame.core :as rf]
[cljs.core.async :as async :refer [<! >! put! chan timeout]]
[playphraseme.common.util :as util]
... | |
9b0a704dbdc79b21258f6b4a39080834909c009514f1b291aa5b9896c8b3e551 | John-Nagle/pasv | dosimp.lisp | "@(#)dosimp.l 2.1"
; Load-and-go simplifier
(load 'setup)
;;; Execute the simplifier on expressions read from standard input
(def dosimp (lambda nil
(print '> )
(do conj nil nil (not (setq conj (read)))
(setq thm (simp conj))
(pp thm)
(print '> )
)
)
)
(dosimp)
| null | https://raw.githubusercontent.com/John-Nagle/pasv/04fa44aaabc46b2e231ab83f96b8857dc5977754/src/CPC4/dosimp.lisp | lisp | Load-and-go simplifier
Execute the simplifier on expressions read from standard input | "@(#)dosimp.l 2.1"
(load 'setup)
(def dosimp (lambda nil
(print '> )
(do conj nil nil (not (setq conj (read)))
(setq thm (simp conj))
(pp thm)
(print '> )
)
)
)
(dosimp)
|
5f1c2d6788d4ddb637c758785730439b987eea10d59423197e7d84e14ca2de18 | tfausak/patrol | ListSpec.hs | module Patrol.Extra.ListSpec where
import qualified Data.Char as Char
import qualified Data.Function as Function
import qualified Patrol.Extra.List as Extra
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Extra.List" $ do
Hspec.describe "insertAll" $ do
Hspec.it "handles em... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Extra/ListSpec.hs | haskell | module Patrol.Extra.ListSpec where
import qualified Data.Char as Char
import qualified Data.Function as Function
import qualified Patrol.Extra.List as Extra
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Extra.List" $ do
Hspec.describe "insertAll" $ do
Hspec.it "handles em... | |
10d35c76a8d47e0ab375f613296dbdfcdb810bb83b458bcdf717292f872208a5 | lwhjp/rince | cpp.rkt | #lang racket/base
(require (for-template "../lib.rkt"
(rename-in "../lib/stdio.rkt"
[c-prototypes stdio]))
parser-tools/lex
(prefix-in : parser-tools/lex-sre)
racket/list
racket/match
racket/port
racket/strin... | null | https://raw.githubusercontent.com/lwhjp/rince/18ac447b7fb87c184ddd203117bc3547103353f6/lang/cpp.rkt | racket | TODO: preprocess properly (including position) | #lang racket/base
(require (for-template "../lib.rkt"
(rename-in "../lib/stdio.rkt"
[c-prototypes stdio]))
parser-tools/lex
(prefix-in : parser-tools/lex-sre)
racket/list
racket/match
racket/port
racket/strin... |
fa27b9db6228966191c7f7d7c81d99fb1367a52d0623b3ae79e2612f1ca90ea4 | janestreet/memtrace_viewer_with_deps | counter_example_test.ml | open! Core_kernel
open! Incr_dom_testing
module App = Incr_dom_counter_example_lib.App
let%expect_test _ =
let driver =
Driver.create
~initial_model:App.initial_model
~sexp_of_model:App.Model.sexp_of_t
~initial_state:()
(module App)
in
let module H = (val Helpers.make driver) in
H.s... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom/example/counter/test/counter_example_test.ml | ocaml | open! Core_kernel
open! Incr_dom_testing
module App = Incr_dom_counter_example_lib.App
let%expect_test _ =
let driver =
Driver.create
~initial_model:App.initial_model
~sexp_of_model:App.Model.sexp_of_t
~initial_state:()
(module App)
in
let module H = (val Helpers.make driver) in
H.s... | |
5ce5db1001e58390e6d6049c445ab2486add91f01147162000120db9e48738fd | yangyang5214/asciicast2mp4 | v1.cljs | (ns asciinema.player.asciicast.v1
(:require [asciinema.vt :as vt]
[asciinema.player.frames :as frames]))
(defn- calc-duration [stdout idle-time-limit]
(-> (comp (frames/cap-relative-time-xf idle-time-limit)
(frames/to-absolute-time-xf))
(sequence stdout)
last
first))
(def... | null | https://raw.githubusercontent.com/yangyang5214/asciicast2mp4/5404a53ae331d44abfada6002b9affac76073418/asciinema-player/src/asciinema/player/asciicast/v1.cljs | clojure | (ns asciinema.player.asciicast.v1
(:require [asciinema.vt :as vt]
[asciinema.player.frames :as frames]))
(defn- calc-duration [stdout idle-time-limit]
(-> (comp (frames/cap-relative-time-xf idle-time-limit)
(frames/to-absolute-time-xf))
(sequence stdout)
last
first))
(def... | |
ceba7416fe68035e375de1a78652b54cf7c71be8e8855c7aca92442dca536430 | haskell/aeson | TH.hs | -- Use Template Haskell to generate good instances.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Twitter.TH
(
Metadata(..)
, Geo(..)
, Story(..)
, Result(..)
) where
import Twitter
import Twitter.Options
import Data.Aeson.TH
$(... | null | https://raw.githubusercontent.com/haskell/aeson/d711df76b826942f4a9e791712512c6b19b8c1c8/examples/src/Twitter/TH.hs | haskell | Use Template Haskell to generate good instances. |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Twitter.TH
(
Metadata(..)
, Geo(..)
, Story(..)
, Result(..)
) where
import Twitter
import Twitter.Options
import Data.Aeson.TH
$(deriveJSON twitterOptions ''Metadata)
$(deriveJSON t... |
293ce53f976ec27c9ff8a9465bfed3472e8eecad80d80c8f18151ad24070783b | reborg/parallel | core.clj | (ns parallel.core
(:refer-clojure :exclude [eduction sequence transduce pmap
frequencies let slurp do doto and or
count group-by sort min max amap distinct])
(:require [parallel.foldmap :as fmap]
[parallel.merge-sort :as msort]
[paralle... | null | https://raw.githubusercontent.com/reborg/parallel/7fde6e48e49455f213c435239c35d31c60e08948/src/parallel/core.clj | clojure | (ns parallel.core
(:refer-clojure :exclude [eduction sequence transduce pmap
frequencies let slurp do doto and or
count group-by sort min max amap distinct])
(:require [parallel.foldmap :as fmap]
[parallel.merge-sort :as msort]
[paralle... | |
f9a5095d942d4abcebd201aaea257c38f886927b659e2c78ecce1558990df65d | tolysz/ghcjs-stack | Logarithms.hs | # LANGUAGE MagicHash , UnboxedTuples , NoImplicitPrelude #
module GHC.Integer.Logarithms
( integerLogBase#
, integerLog2#
, wordLog2#
) where
import GHC.Prim
import GHC.Integer
import qualified GHC.Integer.Logarithms.Internals as I
-- | Calculate the integer logarithm for an arbitrary base.
The ba... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/integer-gmp/GHC/Integer/Logarithms.hs | haskell | | Calculate the integer logarithm for an arbitrary base.
whose logarithm is sought, should be positive, otherwise the
result is meaningless.
The calculation is more efficient than for the general case,
| # LANGUAGE MagicHash , UnboxedTuples , NoImplicitPrelude #
module GHC.Integer.Logarithms
( integerLogBase#
, integerLog2#
, wordLog2#
) where
import GHC.Prim
import GHC.Integer
import qualified GHC.Integer.Logarithms.Internals as I
The base must be greater than 1 , the second argument , the number... |
fdfe2e7977db0905626cf0d6255d0b7d9610e43ce3d1de820d858faaf0ddf71c | cau-placc/ghc-language-plugin | Constr.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Plugin . Trans . Constr
Description : Functions to handle lifting of value constructor declarations
Copyright : ( c ) ( 2020 - 2023 )
Maintainer :
This module contains a function to lift a data or newtype
constructor declaration and
functions ... | null | https://raw.githubusercontent.com/cau-placc/ghc-language-plugin/5b4de152e8f96d69b6bf2bad1caf76082608d452/src/Plugin/Trans/Constr.hs | haskell | # LANGUAGE OverloadedStrings #
| Exception type when lifting of a class fails.
| Lift a value constructor definition.
Note that this is part of a fixed-point computation, where the
^ True iff the type constructor should not be renamed
^ Compiler flags
^ 'Shareable' type constructor
^ '-->' type constructor
^ Li... | |
Module : Plugin . Trans . Constr
Description : Functions to handle lifting of value constructor declarations
Copyright : ( c ) ( 2020 - 2023 )
Maintainer :
This module contains a function to lift a data or newtype
constructor declaration and
functions to get the lifted constructors and ... |
19c280c0ac8ba223d4a179a8f3520bbc45fcd7e51d4cd2d1663bd9422dd3d05c | jaspervdj/blaze-markup | Util.hs | -- | Utility functions for the blaze tests
--
{-# LANGUAGE OverloadedStrings #-}
module Text.Blaze.Tests.Util
( renderUsingString
, renderUsingText
, renderUsingUtf8
, p, div, table, img, br, area
, id, class_, name
) where
import Prelude hiding (div, id)
import Text.Blaze.Internal
import Blaz... | null | https://raw.githubusercontent.com/jaspervdj/blaze-markup/214b4110b925378f5e5e5a1e9c2d66120b6889d1/tests/Text/Blaze/Tests/Util.hs | haskell | | Utility functions for the blaze tests
# LANGUAGE OverloadedStrings #
Some definitions for HTML combinators to enable testing
^ Inner HTML.
^ Resulting HTML.
^ Inner HTML.
^ Resulting HTML.
^ Inner HTML.
^ Resulting HTML.
^ Resulting HTML.
^ Resulting HTML.
^ Resulting HTML.
^ Attribute value.
^ Resul... | module Text.Blaze.Tests.Util
( renderUsingString
, renderUsingText
, renderUsingUtf8
, p, div, table, img, br, area
, id, class_, name
) where
import Prelude hiding (div, id)
import Text.Blaze.Internal
import Blaze.ByteString.Builder as B (toLazyByteString)
import Blaze.ByteString.Builder.Char... |
cf477593e16b9830fb1697f8e3b0bf3cefb9551b0ac214fd5da334514e3db099 | NorfairKing/autorecorder | Record.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module AutoRecorder.Commands.Record where
import AutoRecorder.Cast
import AutoRecorder.Input
import AutoRecorder.OptParse.Types
import AutoRecorder.Output
import AutoRecorder.Spec
import AutoRecorder.Terminal
import AutoRecorder.W... | null | https://raw.githubusercontent.com/NorfairKing/autorecorder/be41b01155781630e450039c1985f42a515f2c9b/autorecorder/src/AutoRecorder/Commands/Record.hs | haskell | # LANGUAGE OverloadedStrings #
Get the output file's parent directory ready
Make sure the output file can be created nicely
For progress output
For some reason the output conduit never finishes, so this works.
Purposefully empty, so we don't leak a nix store path into the cast file. | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module AutoRecorder.Commands.Record where
import AutoRecorder.Cast
import AutoRecorder.Input
import AutoRecorder.OptParse.Types
import AutoRecorder.Output
import AutoRecorder.Spec
import AutoRecorder.Terminal
import AutoRecorder.WindowSize
import Autodocodec.Yaml
i... |
c3aebdc36ed08406d6d838ff9a87dd12320774becae05c2951e6af00600dd6c3 | OCamlPro/drom | main.ml | !{header-ml}
open Js_of_ocaml
let main () =
Dom_html.window##alert (Js.string "hello, world")
| null | https://raw.githubusercontent.com/OCamlPro/drom/7bc86026e0e170f1a468b437d369aefc5dbea5d7/src/drom_lib/share/drom/skeletons/packages/js_library/main.ml | ocaml | !{header-ml}
open Js_of_ocaml
let main () =
Dom_html.window##alert (Js.string "hello, world")
| |
163d67a4e8fb474086b437457e356221c196932361b5836fdcea2324c9f47e2b | AshleyYakeley/Truth | Main.hs | module Main
( main
) where
import Changes.Core
import Changes.World.Clock
import Changes.World.GNOME.GTK
import Data.Time
import qualified GI.Gtk as GI
import Graphics.Cairo.Functional
import Shapes hiding (rotate)
import Shapes.Numeric
showPoint :: String -> UIDrawing
showPoint t =
onMouseEvent $ \p _ ->... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/2817d5e36bd1dc5de932d808026098b6c35e7185/Changes/changes-gnome/examples/cairo/Main.hs | haskell | module Main
( main
) where
import Changes.Core
import Changes.World.Clock
import Changes.World.GNOME.GTK
import Data.Time
import qualified GI.Gtk as GI
import Graphics.Cairo.Functional
import Shapes hiding (rotate)
import Shapes.Numeric
showPoint :: String -> UIDrawing
showPoint t =
onMouseEvent $ \p _ ->... | |
5a45a38eb0d680e55a7a29c2b4ceba5c2393290bff1ed821d77c0d7647e9dfcf | wdebeaum/step | whisky.lisp | ;;;;
;;;; w::whisky
;;;;
(define-words :pos W::n
:words (
(w::whisky
(senses
ALCOHOL )
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/whisky.lisp | lisp |
w::whisky
|
(define-words :pos W::n
:words (
(w::whisky
(senses
ALCOHOL )
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
|
b388a95a5722aa61dab78b751743fa1f5f2cb16ca2ad773363bd0a0e9c9fd7e0 | AntidoteDB/antidote_aql | delete.erl | %%%-------------------------------------------------------------------
@author ,
%%% @doc A module to handle AQL delete operations.
%%% @end
%%%-------------------------------------------------------------------
-module(delete).
%% ===================================================================
%% API funct... | null | https://raw.githubusercontent.com/AntidoteDB/antidote_aql/e7ef4913d233c2fee8ebff582d91fe3e2e95786c/src/delete.erl | erlang | -------------------------------------------------------------------
@doc A module to handle AQL delete operations.
@end
-------------------------------------------------------------------
===================================================================
API functions
=============================================... | @author ,
-module(delete).
-export([exec/3, table/1, where/1]).
-define(REFINTEG_ERROR(TName, Value),
io_lib:format("Cannot delete a parent row on table ~p: a foreign key constraint fails on deleting value ~p", [TName, Value])).
-include("parser.hrl").
-include("aql.hrl").
-include("types.hrl").
-ifdef(TES... |
14e62495e94cadf41900e6f25f263c1216ec38654f4e7d1a833223aa02dfdfcd | sfertman/easy-rpc | client.clj | (ns easy-rpc.client
(:require
[clojure.walk :refer [postwalk]]
[easy-rpc.client.http :as http]))
(defmulti client :transport)
(defmethod client :http [config] (http/client config))
(defn- quote-inputs [inputs] (postwalk #(if (symbol? %) `(quote ~%) %) inputs))
(defn- inputs->map [inputs] (apply hash-map (q... | null | https://raw.githubusercontent.com/sfertman/easy-rpc/6c05d2b18fb16671608fdd91a4693a55f473d1b2/src/easy_rpc/client.clj | clojure | poor man's destructure | (ns easy-rpc.client
(:require
[clojure.walk :refer [postwalk]]
[easy-rpc.client.http :as http]))
(defmulti client :transport)
(defmethod client :http [config] (http/client config))
(defn- quote-inputs [inputs] (postwalk #(if (symbol? %) `(quote ~%) %) inputs))
(defn- inputs->map [inputs] (apply hash-map (q... |
7eb8405d24443f5c9488c6927be151ac63c975ff2333299c9e766af0cfa51dfb | mnieper/unsyntax | position.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/position.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
7d2e3c0920c569217757bf2ac49c2929088430dcbe192c851bf755ae89070f90 | ds-wizard/engine-backend | Common.hs | module Wizard.Bootstrap.Common where
import Control.Monad.Except (runExceptT)
import Control.Monad.Reader (liftIO, runReaderT)
import Data.Pool
import Shared.Constant.App
import Shared.Model.Config.ServerConfig
import Shared.Util.Uuid
import Wizard.Database.Migration.Development.User.Data.Users
import Wizard.Model.Co... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/72eb656dcce17115acf304438198aad11219db11/engine-wizard/src/Wizard/Bootstrap/Common.hs | haskell | module Wizard.Bootstrap.Common where
import Control.Monad.Except (runExceptT)
import Control.Monad.Reader (liftIO, runReaderT)
import Data.Pool
import Shared.Constant.App
import Shared.Model.Config.ServerConfig
import Shared.Util.Uuid
import Wizard.Database.Migration.Development.User.Data.Users
import Wizard.Model.Co... | |
4cae6bf5d1483505c1d3c0f9213e252c6aac49afaa5067d3b11031c2d68c7d76 | webyrd/mediKanren | create-umls-cui-to-cid-hashtable.rkt | #lang racket
(require
"create-hashtable-common.rkt")
(provide
(all-defined-out))
(define umls-ht (make-hash))
(define umls-ht-file-path (build-path HASHTABLE_SAVE_DIRECTORY "umls-hash.rkt"))
(define (fill-umls-ht!)
(set! umls-ht (make-hash))
(define add-to-ht! (add-concept-key/cid-associations-to-hashtab... | null | https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/medikanren/create-umls-cui-to-cid-hashtable.rkt | racket | #lang racket
(require
"create-hashtable-common.rkt")
(provide
(all-defined-out))
(define umls-ht (make-hash))
(define umls-ht-file-path (build-path HASHTABLE_SAVE_DIRECTORY "umls-hash.rkt"))
(define (fill-umls-ht!)
(set! umls-ht (make-hash))
(define add-to-ht! (add-concept-key/cid-associations-to-hashtab... | |
748902621d90946cd344b0b59cb954448e1dc0bb4f7ba1318c2976f7dcfe474d | nuvla/api-server | session_template_lifecycle_test.clj | (ns sixsq.nuvla.server.resources.session-template-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.lifecycle-test-utils :as ltu]
[sixsq.nuvla.server.resources.session-template :as st]
[sixsq.nuvla.server.resou... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/session_template_lifecycle_test.clj | clojure | (ns sixsq.nuvla.server.resources.session-template-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.lifecycle-test-utils :as ltu]
[sixsq.nuvla.server.resources.session-template :as st]
[sixsq.nuvla.server.resou... | |
41cfa28060174d5454933422d913c53b36b43709f5d4031fa02a4464b527a9fa | geophf/1HaskellADay | Exercise.hs | module Y2021.M02.D24.Exercise where
import Data.Time
-
What 's today 's date ?
Today 's problem is to get the current date as a YYYY - mm - dd - formatted
string from ... wherever you get the current date .
-
What's today's date?
Today's Haskell problem is to get the current date as a YYYY-mm-dd-formatted
... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2021/M02/D24/Exercise.hs | haskell | }
go get'm! | module Y2021.M02.D24.Exercise where
import Data.Time
-
What 's today 's date ?
Today 's problem is to get the current date as a YYYY - mm - dd - formatted
string from ... wherever you get the current date .
-
What's today's date?
Today's Haskell problem is to get the current date as a YYYY-mm-dd-formatted
... |
067141ef9e2ab260c62da852d77bfce7fd5898aee9a7943d60b41a6aff4c1244 | tomjridge/tjr_simple_earley | test_unstaged.ml | (** This is almost a direct copy of test_spec *)
open Tjr_simple_earley
open Prelude
open Spec_common
module Internal = Earley_unstaged.Make(A)
open Internal
open Spec_types
let main () =
let grammar = Examples.get_grammar_by_name !Params.grammar in
let initial_nt = grammar.initial_nt in
let expand_nt,expand_... | null | https://raw.githubusercontent.com/tomjridge/tjr_simple_earley/ca558e0e7f4ddba4cd6573bf180710cd02f25ba4/_archive/.dockerfile/tjr_simple_earley/bin/test_unstaged.ml | ocaml | * This is almost a direct copy of test_spec | open Tjr_simple_earley
open Prelude
open Spec_common
module Internal = Earley_unstaged.Make(A)
open Internal
open Spec_types
let main () =
let grammar = Examples.get_grammar_by_name !Params.grammar in
let initial_nt = grammar.initial_nt in
let expand_nt,expand_tm = grammar_to_expand grammar in
earley_unstag... |
5b12189bab5c0f93e6a3402547c4c561e4f85ce2dda9e21acfc82f65de8bfc41 | atdixon/me.untethr.nostr-relay | jetty.clj | (ns me.untethr.nostr.jetty
(:require
[clojure.string :as str]
[clojure.tools.logging :as log])
(:import (jakarta.servlet Servlet ServletContext)
(jakarta.servlet.http HttpServlet HttpServletRequest HttpServletResponse)
(java.net InetSocketAddress)
(java.time Duration)
... | null | https://raw.githubusercontent.com/atdixon/me.untethr.nostr-relay/20a6200438ccccbfb55252b1794f963cab8ac894/src/me/untethr/nostr/jetty.clj | clojure | cond-> does not short circuit and we use doto in each form so that the
modified response object threads all the way through -- and we return it
from our fn.
note: essential to call proxy-super here so that the default
handling that sets session
...specifically ProgrammaticWebSocketUpgradeServlet example.
e.g. he... | (ns me.untethr.nostr.jetty
(:require
[clojure.string :as str]
[clojure.tools.logging :as log])
(:import (jakarta.servlet Servlet ServletContext)
(jakarta.servlet.http HttpServlet HttpServletRequest HttpServletResponse)
(java.net InetSocketAddress)
(java.time Duration)
... |
21653199043c11430820fc5b7a1816a6185a110092a276aa23f32eb0f56db1b7 | skynet-gh/skylobby | battle.clj | (ns skylobby.event.battle
(:require
[clojure.string :as string]
[skylobby.fs :as fs]
[skylobby.util :as u]
[taoensso.timbre :as log])
(:import
(me.xdrop.fuzzywuzzy FuzzySearch)))
(set! *warn-on-reflection* true)
(defn update-player-or-bot-state
[state-atom server-key {:keys [bot-name usern... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/6ea330009d37c3d94eded6dd204a939719e1a13d/graal/clj/skylobby/event/battle.clj | clojure | (ns skylobby.event.battle
(:require
[clojure.string :as string]
[skylobby.fs :as fs]
[skylobby.util :as u]
[taoensso.timbre :as log])
(:import
(me.xdrop.fuzzywuzzy FuzzySearch)))
(set! *warn-on-reflection* true)
(defn update-player-or-bot-state
[state-atom server-key {:keys [bot-name usern... | |
dedc8be1083b30d899730cc9c00b474b9cb5af84ba86d763c664cbe92c6b6ac6 | 8c6794b6/guile-tjit | t-bytecompile-04.scm | (compile
'(begin
(define *bailout* 16.0)
(define *max-iterations* 1000)
(define (mandelbrot x y)
(let ((cr (- y 0.5))
(ci x)
(zi 0.0)
(zr 0.0))
(let lp ((i 0) (zr zr) (zi zi))
(if (< *max-iterations* i)
0
(let ((zi2 (*... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-bytecompile-04.scm | scheme | (compile
'(begin
(define *bailout* 16.0)
(define *max-iterations* 1000)
(define (mandelbrot x y)
(let ((cr (- y 0.5))
(ci x)
(zi 0.0)
(zr 0.0))
(let lp ((i 0) (zr zr) (zi zi))
(if (< *max-iterations* i)
0
(let ((zi2 (*... | |
a750ad1711d1a53cc06724a0da6bf4b466ff92d114d80ccf2c55f548fb990fcc | gelisam/hyzzy | D5.hs | {-# LANGUAGE OverloadedStrings #-}
module Rooms.D5 where
import Hyzzy.Command
look :: Command
look = Command $ do
display "More foliage walls. This place is a maze..."
display ""
display "On the west is the paper-dispensing machine."
south :: Command
south = Command $ goToRoom "E5"
west :: Command
wes... | null | https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/maze/Rooms/D5.hs | haskell | # LANGUAGE OverloadedStrings #
1 2 3 4 5 6 7
+-+-+ +-+-+-+-+
A| | |
+ +-+-+-+-+-+ +
B| | | |
+ + +-+-+ + +-+
+ + +-+ +-+ + +
D| | *| | |
+ + + + + + + +
E| | | | | |
+ + +-+ + +-+ +
F| | | |
+ +-+-+ +-+-+ +
+-+-+-+-+-+-+-+ | module Rooms.D5 where
import Hyzzy.Command
look :: Command
look = Command $ do
display "More foliage walls. This place is a maze..."
display ""
display "On the west is the paper-dispensing machine."
south :: Command
south = Command $ goToRoom "E5"
west :: Command
west = Command $ goToRoom "D4"
C|... |
9a8ec2e596f1ba8169316085329edbac2fa43d3cc433d9e77814124f8fa46021 | nikita-volkov/rerebase | Coerce.hs | module Unsafe.Coerce
(
module Rebase.Unsafe.Coerce
)
where
import Rebase.Unsafe.Coerce
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Unsafe/Coerce.hs | haskell | module Unsafe.Coerce
(
module Rebase.Unsafe.Coerce
)
where
import Rebase.Unsafe.Coerce
| |
472bbe30735f384b7b16fbe488c711cb36c0b684f2fa6cc6815e5141be867e13 | scrintal/heroicons-reagent | arrows_pointing_in.cljs | (ns com.scrintal.heroicons.outline.arrows-pointing-in)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "rou... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/arrows_pointing_in.cljs | clojure | (ns com.scrintal.heroicons.outline.arrows-pointing-in)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "rou... | |
837098fc405358b60c97f58345f20afdcdaa9441ed6761e23318eaea2e3e0960 | caisah/sicp-exercises-and-examples | ex_1.40.scm | ;; Define a procedure cubic that can be used together with the newtons-method procedure
;; in expressions of the form:
( newton - method ( cubic a b c ) 1 )
to approximate zeros of the cubic x^3 + ax^2 + bx + c
(define tolerance 0.00001)
(define (average x y)
(/ (+ x y) 2.0))
(define (fixed-point f first-gue... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/1.3.4-procedures_as_returned_values/ex_1.40.scm | scheme | Define a procedure cubic that can be used together with the newtons-method procedure
in expressions of the form: | ( newton - method ( cubic a b c ) 1 )
to approximate zeros of the cubic x^3 + ax^2 + bx + c
(define tolerance 0.00001)
(define (average x y)
(/ (+ x y) 2.0))
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (try guess)
(let ((next (f guess))... |
e01ca89a45ef2a507371ec19a1dd60424a1a1e93ba746010dcb51539cb7d0832 | ocaml-sf/learn-ocaml-corpus | cnf_disj.ml | (* ------------------------------------------------------------------------------ *)
(* Building formulae. *)
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
(* [FConst sense] would work too, but would allocate memory *)
let neg ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/wrong/cnf_disj.ml | ocaml | ------------------------------------------------------------------------------
Building formulae.
[FConst sense] would work too, but would allocate memory
------------------------------------------------------------------------------
Evaluating formulae.
We assume [n < Sys.word_size - 1].
-----------------... |
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
let neg f =
match f with
| FConst sense ->
const (not sense)
| FNeg f ->
f
| _ ->
FNeg f
let conn sense f1 f2 =
match f1, f2 with
| FConst sense', f
| f... |
9f7cbf0aabd8dd5f0926f33e0d50614855f93235f9810cabffcef966d5dc9ec6 | StrykerKKD/SandDB | sanddb.ml | module Database = Database
module Record_id = Record_id
module Serializer = Serializer
* [ Sanddb.create_json_database file_name json_serializer ] will create a json database based on the provided :
- [ file_name ] which will be tha base of the database
- [ json_serializer ] which will be responsible for the ser... | null | https://raw.githubusercontent.com/StrykerKKD/SandDB/a57360b7e324a4f4c09148fc88580596cc878f34/lib/sanddb.ml | ocaml | module Database = Database
module Record_id = Record_id
module Serializer = Serializer
* [ Sanddb.create_json_database file_name json_serializer ] will create a json database based on the provided :
- [ file_name ] which will be tha base of the database
- [ json_serializer ] which will be responsible for the ser... | |
d79356286a88c69689c0c828ce9f9237bcd54b5f5e674fabddef0811056162be | ocsigen/ojwidgets | ojw_hookjs.ml |
Hook
Version : 1.1
Author : , ,
Copyright ( c ) 2013 - Hook . All rights reserved .
Hook
Version: 1.1
Author: Jordan Singer, Brandon Jacoby, Adam Girton
Copyright (c) 2013 - Hook. All rights reserved.
*)
type t = Ojquery.t
class type options =
object
method rel... | null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/ojw_hookjs.ml | ocaml |
Hook
Version : 1.1
Author : , ,
Copyright ( c ) 2013 - Hook . All rights reserved .
Hook
Version: 1.1
Author: Jordan Singer, Brandon Jacoby, Adam Girton
Copyright (c) 2013 - Hook. All rights reserved.
*)
type t = Ojquery.t
class type options =
object
method rel... | |
523e0ed46ffb7f1f35a6cd3a34179340ecb738f98604a85648090f7e6e27397b | thelema/ocaml-community | opttoploop.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/toplevel/opttoploop.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Path
open Format
open Config
open... |
839b55689299c58a206671e4bae5e3ef308efaf2c1181bf7d617cd4bb054d972 | logicmoo/wam_common_lisp | text.lsp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
CLX text keyboard and pointer requests
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is grante... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/clx/text.lsp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
CLX text keyboard and pointer requests
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
(defparameter *max-string-size* 254)
( sub)sequence , u... |
a4aa3dad8870d31568d6e3d51d40e0edba517c7f6bb06f2f77bed73691a1bda2 | fantasytree/fancy_game_server | map_rpc.erl | %%----------------------------------------------------
%% 地图相关RPC调用
%%----------------------------------------------------
-module(map_rpc).
-export([handle/3]).
-include("common.hrl").
-include("role.hrl").
-include("map.hrl").
-include("pos.hrl").
-include("link.hrl").
%% 角色进入地图
handle(10100, _, Role = #role{pos = P... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/mod/map/map_rpc.erl | erlang | ----------------------------------------------------
地图相关RPC调用
----------------------------------------------------
角色进入地图
TODO:如果进不去正常的地图,可以考虑进入上次进入的地方
角色移动过程中同步位置
----------------------------------------------------
---------------------------------------------------- | -module(map_rpc).
-export([handle/3]).
-include("common.hrl").
-include("role.hrl").
-include("map.hrl").
-include("pos.hrl").
-include("link.hrl").
handle(10100, _, Role = #role{pos = Pos}) ->
{ToMapId, ToX, ToY} = case Pos of
undefined ->
#map_data{revive = Entry} = map_data:get(?DEFAULT_MAP_... |
eac7625f401fb7193f63581338ff12ef8505db77bd5b945852d7eb84a7119b16 | ghc/packages-dph | DT.hs | {-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-}
# LANGUAGE CPP #
#include "fusion-phases.h"
-- | Distribution of Segment Descriptors
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.DT
where
import Data.Array.Parallel.Unlifted.Distributed.Data.USegd ()
import Data.Array.Par... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USSegd/DT.hs | haskell | # OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #
| Distribution of Segment Descriptors
segment starts
segment sources
segment starts
segment sources
# INLINE_DIST readMD #
# NOINLINE measureD # | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.DT
where
import Data.Array.Parallel.Unlifted.Distributed.Data.USegd ()
import Data.Array.Parallel.Unlifted.Distributed.Data.Vector ()
import Data.Array.Parallel.Unlifted.Distributed.Primitiv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.