_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 |
|---|---|---|---|---|---|---|---|---|
1df31173fab125c6c96984f85b5521f5691d329ce7786380396fde175a932ed1 | macourtney/Conjure | session_utils.clj | (ns conjure.util.session-utils
(:import [java.util Calendar Date])
(:require [clojure.tools.html-utils :as html-utils]
[clojure.tools.string-utils :as conjure-str-utils]
[conjure.util.request :as request]))
(def session-id-name "SID")
(defn
#^{ :doc "Creates a session id for use in a sessi... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_util/src/conjure/util/session_utils.clj | clojure | (ns conjure.util.session-utils
(:import [java.util Calendar Date])
(:require [clojure.tools.html-utils :as html-utils]
[clojure.tools.string-utils :as conjure-str-utils]
[conjure.util.request :as request]))
(def session-id-name "SID")
(defn
#^{ :doc "Creates a session id for use in a sessi... | |
8d1da0ebc81d1a24187ebc3e6e8151ba3f5ae9385d9e6f476abeb925914ed5b0 | zadean/xqerl | op_boolean_greater_than_SUITE.erl | -module('op_boolean_greater_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-boolean-greater-than2args-1'/1]).
-export(['op-boolean-greater-than... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/op/op_boolean_greater_than_SUITE.erl | erlang | -module('op_boolean_greater_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['op-boolean-greater-than2args-1'/1]).
-export(['op-boolean-greater-than... | |
52ba26f123539cf4b67ad0f592f31613c9671bfbee689ae61d1d30f52434a196 | fterrier/pylos | user.clj | (ns user
(:require [clojure.tools.namespace.repl :as repl]
[com.stuartsierra.component :as component]
[system
[figwheel :refer [figwheel-config map->Figwheel]]
[main :refer [get-system-map]]])
(:use [figwheel-sidecar.repl-api :as ra]))
(set! *warn-on-reflection* tr... | null | https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/env/dev/src/clj/user.clj | clojure | (ns user
(:require [clojure.tools.namespace.repl :as repl]
[com.stuartsierra.component :as component]
[system
[figwheel :refer [figwheel-config map->Figwheel]]
[main :refer [get-system-map]]])
(:use [figwheel-sidecar.repl-api :as ra]))
(set! *warn-on-reflection* tr... | |
dcdf4889abfccfa12074c0cb59752795d01fd6edf58dfaa19a6f64f618a76516 | circuithub/rel8 | These.hs | # language DataKinds #
{-# language DeriveAnyClass #-}
# language DeriveGeneric #
# language DerivingStrategies #
# language StandaloneKindSignatures #
module Rel8.Schema.HTable.These
( HTheseTable(..)
)
where
-- base
import GHC.Generics ( Generic )
import Prelude
-- rel8
import Rel8.Schema.HTable ( HTable )
imp... | null | https://raw.githubusercontent.com/circuithub/rel8/f47423ec17c36f441bab4c0cbb2036dc8aecacbd/src/Rel8/Schema/HTable/These.hs | haskell | # language DeriveAnyClass #
base
rel8 | # language DataKinds #
# language DeriveGeneric #
# language DerivingStrategies #
# language StandaloneKindSignatures #
module Rel8.Schema.HTable.These
( HTheseTable(..)
)
where
import GHC.Generics ( Generic )
import Prelude
import Rel8.Schema.HTable ( HTable )
import Rel8.Schema.HTable.Identity ( HIdentity )
im... |
682b7fefa4387d219e956bccfb0df0f718d54aed04a9ae08690fc4a87eee9ad5 | nuprl/gradual-typing-performance | rktd-of-txt.rkt | #lang racket/base
;; Convert Python-generated data files to Racket
(require
(only-in racket/date current-date)
data/heap
racket/set
racket/string
racket/port
)
;; =============================================================================
(define (read-string str)
(with-input-from-string str read))
;... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/piday-2016/src/rktd-of-txt.rkt | racket | Convert Python-generated data files to Racket
=============================================================================
Returns (CFG NUM-TYPED SECONDS)
0-0-0 is fully typed
N-N-N is fully untyped
Want to sort from untyped to typed, so use > | #lang racket/base
(require
(only-in racket/date current-date)
data/heap
racket/set
racket/string
racket/port
)
(define (read-string str)
(with-input-from-string str read))
(define (read-line str)
(read-string (string-append "(" str ")")))
(define line-key car)
(define line-num-types cadr)
(define li... |
f3fe9a5d80e5d713bbeec5244aab5d5391938a7454efa2a3644cabaca5bb1e48 | otherjoel/beeswax | constants.rkt | #lang racket/base
(provide (all-defined-out))
(define template-proc-provide 'apply-template)
| null | https://raw.githubusercontent.com/otherjoel/beeswax/993b5364b474ff0d8a1f8c26dac192cb4408f385/private/constants.rkt | racket | #lang racket/base
(provide (all-defined-out))
(define template-proc-provide 'apply-template)
| |
2aac498ba8168bf064d0ff3e946927fd667ebcc3d999b5e3a47018628afec888 | himura/persistent-relational-record | Config.hs | module Database.Persist.Relational.Config
( NameConfig(..)
, defaultNameConfig
) where
import Data.Char
data NameConfig = NameConfig
{ tableVarNameFromTableTypeName :: String -> String
, insertVarNameFromTableTypeName :: String -> String
, insertQueryVarNameFromTableTypeName :: String -> Strin... | null | https://raw.githubusercontent.com/himura/persistent-relational-record/fcbadcb10b6efc0fe413a0dab7cb9b7e103355d8/src/Database/Persist/Relational/Config.hs | haskell | module Database.Persist.Relational.Config
( NameConfig(..)
, defaultNameConfig
) where
import Data.Char
data NameConfig = NameConfig
{ tableVarNameFromTableTypeName :: String -> String
, insertVarNameFromTableTypeName :: String -> String
, insertQueryVarNameFromTableTypeName :: String -> Strin... | |
65bbac9921c5ab65385e85b6e817751e51c06b1a381c70026ca74363973c4780 | dainiusjocas/clj-jq | api_impl.clj | (ns ^{:doc "Internal implementation details."
:no-doc true}
jq.api.api-impl
(:import (net.thisptr.jackson.jq JsonQuery Versions Scope BuiltinFunctionLoader Output)
(com.fasterxml.jackson.databind ObjectMapper JsonNode)
(net.thisptr.jackson.jq.module.loaders ChainedModuleLoader Builtin... | null | https://raw.githubusercontent.com/dainiusjocas/clj-jq/fa68e84407f4d7464698cf0923e0b19a4388831e/src/jq/api/api_impl.clj | clojure | Load all the functions available for the JQ-1.6
Helper interface that specifies a method to get a string value.
Container class helper that implements the net.thisptr.jackson.jq.Output | (ns ^{:doc "Internal implementation details."
:no-doc true}
jq.api.api-impl
(:import (net.thisptr.jackson.jq JsonQuery Versions Scope BuiltinFunctionLoader Output)
(com.fasterxml.jackson.databind ObjectMapper JsonNode)
(net.thisptr.jackson.jq.module.loaders ChainedModuleLoader Builtin... |
40461fd14d052bb5511ff1325826ab3835440b09d4b009938f9adaf88521cee0 | xmonad/xmonad-contrib | Prompt.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
# LANGUAGE ExistentialQuantification #
# LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/493b6adbc4cfbe2d805ce9c8b7074dceb5e799b5/XMonad/Prompt.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Prompt
License : BSD3
Stability : unstable
Portability : unportable
A module for writing graphical prompts for XMonad
---------------------------------------------------------------------------
--------... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
# LANGUAGE ExistentialQuantification #
# LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
Copyright : ( C ) 2007 , 2015
2015 ... |
d2d5883014f0a7a989fcb4d008f6f113861221ba5a90cbddb8eac9c92c05ffce | hakaru-dev/hakaru | LinearRegression20.hs | # LANGUAGE DataKinds , TypeOperators , OverloadedStrings #
module LinearRegression20 where
import Prelude (print, length, IO)
import Language.Hakaru.Syntax.Prelude
import Language.Hakaru.Disintegrate
import Language.Hakaru.Syntax.ABT
import Language.Hakaru.Syntax.AST
import Language.Hakaru.Types.DataKind
import Langu... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Tests/Unroll/LinearRegression20.hs | haskell | # LANGUAGE DataKinds , TypeOperators , OverloadedStrings #
module LinearRegression20 where
import Prelude (print, length, IO)
import Language.Hakaru.Syntax.Prelude
import Language.Hakaru.Disintegrate
import Language.Hakaru.Syntax.ABT
import Language.Hakaru.Syntax.AST
import Language.Hakaru.Types.DataKind
import Langu... | |
ee0b7f78cdd37c5ee2b9cc933738debe017b79fe67490efc772d81bb0a6dce9a | na4zagin3/satyrographos | lint_module_hashes.ml | open Core
open Satyrographos
open Lint_prim
let lint_module_hashes ~outf:_ ~locs ~satysfi_version ~basedir ~env:_ (m : BuildScript.m) =
let target_library =
BuildScript.read_module ~src_dir:basedir m
in
target_library.hashes
|> Library.LibraryFiles.to_alist
|> List.concat_map ~f:(fun (file, (_, json)) -... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/src/command/lint_module_hashes.ml | ocaml | open Core
open Satyrographos
open Lint_prim
let lint_module_hashes ~outf:_ ~locs ~satysfi_version ~basedir ~env:_ (m : BuildScript.m) =
let target_library =
BuildScript.read_module ~src_dir:basedir m
in
target_library.hashes
|> Library.LibraryFiles.to_alist
|> List.concat_map ~f:(fun (file, (_, json)) -... | |
f042260c1394f93cc703dfc440b5707d21222ab9f8152cb4e6bae6879db457fe | MyDataFlow/ttalk-server | ejabberd_c2s.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_c2s.erl
Author : < >
%%% Purpose : Serve C2S connection
Created : 16 Nov 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free software; you can redistribute it ... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_c2s.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_c2s.erl
Purpose : Serve C2S connection
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WIT... | Author : < >
Created : 16 Nov 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
68e691476f76737f53130467a08407e6e1b6e7e99dcc797f94515337aa5c8551 | spechub/Hets | StaticAnalysis.hs | |
Module : / StaticAnalysis.hs
Copyright : : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Static analysis for RDF
Module : ./RDF/StaticAnalysis.hs
Copyright : Felix Gabriel Mance
License : GPLv2 or hig... | null | https://raw.githubusercontent.com/spechub/Hets/b064f539cefe5d345b78c5888b85ed6a37ffdfb5/RDF/StaticAnalysis.hs | haskell | * URI Resolution
FIXME: If null (localPart new)
then head will fail!
* Axiom extraction
| takes an entity and modifies the sign according to the given function
| adding entities to the signature
| collects all entites from the axioms
| static analysis of documen... | |
Module : / StaticAnalysis.hs
Copyright : : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Static analysis for RDF
Module : ./RDF/StaticAnalysis.hs
Copyright : Felix Gabriel Mance
License : GPLv2 or hig... |
1c1f12c900cea86701ed33a24dcef159eada37fbecd66795ab0651b619100362 | xapi-project/xen-api | xapi_db_process.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/db_process/xapi_db_process.ml | ocaml | should never be thrown due to checking argument at start
read other_config from my row, replace host_iqn if already there, add it if its not there and write back
replace if key already exists
... otherwise add new key/value pair |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
ea3a78a72baad9846f712d885f47672a1b7c1dda0f45a2bbb897ed877f6ca7d2 | jrh13/hol-light | mk_unity_prog.ml | (*---------------------------------------------------------------------------*)
File : mk_unity_prog.sml
Description :
A back - end definition for the HOL - UNITY compiler programming language .
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Unity/mk_unity_prog.ml | ocaml | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Defining Variable extraction functions
-------------------------------------------------... |
File : mk_unity_prog.sml
Description :
A back - end definition for the HOL - UNITY compiler programming language .
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
This file introduces general d... |
3184760ae5d2df37a10dc7d906fafffc7db98bc39aa48f1bed97150437566a2d | esb-lwb/lwb | prop_test.clj | lwb Logic WorkBench -- Propositional Logic , tests
Copyright ( c ) 2014 - 2016 , THM . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php ) .
; By using this software in any fashion, you are agreeing to be bound by
; the terms of th... | null | https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/test/lwb/prop_test.clj | clojure | The use and distribution terms for this software are covered by the
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
Utility functions with operators ------------------------------------
manual test
model ------------------------------------------------------------... | lwb Logic WorkBench -- Propositional Logic , tests
Copyright ( c ) 2014 - 2016 , THM . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php ) .
(ns lwb.prop-test
(:require [clojure.test :refer :all]
[lwb.prop :refer :all]
[clojure.spec.alpha :as s]
[clojure.spec.te... |
6f0e65d99b3517a52113887990fc798643856dda850b4fdd07adf198952e262b | gogins/csound-extended-nudruz | foster-cm.lisp | (require :asdf)
(require :fomus)
(require :nudruz)
(load "example-csd.lisp")
(in-package :cm)
Second - order Markov process . The transition table is taken
from chapter 8 of " Computer Music " by Dodge / Jerse . Sounds
;;; best with slow strings.
(defun foster (len octave chan)
p1 is a second order Markov proc... | null | https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/examples/foster-cm.lisp | lisp | best with slow strings.
p2 is rhythmic pattern that randomly selects
between several rhythmic motives that are
and transposes the data according to the octave offset
passed into the function.
(events (list (new midi-program-change :time 0
:program +orchestral-strings+)
"foster.midi") | (require :asdf)
(require :fomus)
(require :nudruz)
(load "example-csd.lisp")
(in-package :cm)
Second - order Markov process . The transition table is taken
from chapter 8 of " Computer Music " by Dodge / Jerse . Sounds
(defun foster (len octave chan)
p1 is a second order Markov process
(new markov
... |
5201274d2756531d19b2fad09f4ced4d7899e183424998522e614f2f09837071 | OCamlPro/ocamlexc | lexing.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/stdlib/lexing.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : lexing.ml , v 1.1 1998/08/19 13:29:07 pessaux Exp $
type lexbuf =
{ refill_buff : lexbuf -> unit;
... |
e057553a383710a0dce21f2e2db37ce6f0e56fdf996130dc62201d51b4fc2054 | cjfrisz/clojure-tco | let.clj | ;;----------------------------------------------------------------------
;; File let.clj
Written by
;;
Created 16 Apr 2012
Last modified 20 Oct 2012
;;
Defines the LetSrs , LetTriv , and LetCps record types representing
serious , trivial , and ' let ' expressions , respectively . LetSrs
and LetTriv cor... | null | https://raw.githubusercontent.com/cjfrisz/clojure-tco/a816af402f88bdf58d53f7574a5d7892939a1dc1/src/ctco/expr/let.clj | clojure | ----------------------------------------------------------------------
File let.clj
(either the right-hand side of a variable binding or the body) which
algorithm. LetCps corresponds to a 'let' expression that has
LetCps implements the following protocols:
PLoadTrampoline:
Maps load-tramp ... | Written by
Created 16 Apr 2012
Last modified 20 Oct 2012
Defines the LetSrs , LetTriv , and LetCps record types representing
serious , trivial , and ' let ' expressions , respectively . LetSrs
and LetTriv correspond to ' let ' expression that have subexpressions
are " serious " or " trivial " with resp... |
fb9f301d15961d9b513b33d1d75e2f0dc478c354d96cb4843b598e1d28c9a39a | roburio/utcp | server.ml | open Lwt.Infix
module Ethernet = Ethernet.Make(Netif)
module ARP = Arp.Make(Ethernet)(Unix_os.Time)
module IPv4 = Static_ipv4.Make(Mirage_random_test)(Mclock)(Ethernet)(ARP)
let log_err ~pp_error = function
| Ok _ -> ()
| Error e -> Logs.err (fun m -> m "error %a" pp_error e)
let handle_data ip =
Lwt_list.iter... | null | https://raw.githubusercontent.com/roburio/utcp/da815a6a3c1a2fa572c20c4a0479f9e9f454e247/app/server.ml | ocaml | let dst = Ipaddr.(V4 (V4.of_string_exn "10.0.42.1")) in
delay client a bit to have arp up and running | open Lwt.Infix
module Ethernet = Ethernet.Make(Netif)
module ARP = Arp.Make(Ethernet)(Unix_os.Time)
module IPv4 = Static_ipv4.Make(Mirage_random_test)(Mclock)(Ethernet)(ARP)
let log_err ~pp_error = function
| Ok _ -> ()
| Error e -> Logs.err (fun m -> m "error %a" pp_error e)
let handle_data ip =
Lwt_list.iter... |
260a161ee98dd954c482cec8c5462cf3586cf65dfe7e6ea945176baf73f3b9d3 | achirkin/qua-view | Modal.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecursiveDo #
# LANGUAGE DataKinds #
# LANGUAGE JavaScriptFFI #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
module Widgets.Modal
( createModal
, createModalWithClicks
, createModalWithClicks'
, createSmallModalWith... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Widgets/Modal.hs | haskell | # LANGUAGE OverloadedStrings #
| Create a modal window ("popup") with arbitrary content inside.
^ get open or close command from outside
^ initial state (open or closed)
^ content of the widget
^ Modal size
| Create a modal window ("popup") with arbitrary content inside.
Provides a typical use case: outside bu... | # LANGUAGE RecursiveDo #
# LANGUAGE DataKinds #
# LANGUAGE JavaScriptFFI #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
module Widgets.Modal
( createModal
, createModalWithClicks
, createModalWithClicks'
, createSmallModalWithClicks
, createSmallModalWithCl... |
110cb4e7fc44a02a52f0991cd420facad892be3d2b3e7047adfabeea4db968ef | typeable/schematic | Schema.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fprint-explicit-kinds #-}
module Data.Schematic.Schema where
import Control.Applicative ((<|>))
import Control.Monad
import Data.Aeso... | null | https://raw.githubusercontent.com/typeable/schematic/7db0b46d7a43bd929a9dd932fa7f0d0e9bf6e94a/src/Data/Schematic/Schema.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fprint-explicit-kinds #
| Move to the union package | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
# LANGUAGE OverloadedLists #
module Data.Schematic.Schema where
import Control.Applicative ((<|>))
import Control.Monad
import Data.Aeson as J
import Data.Aeson.Types as J
import Data.HashMap.Stri... |
4db5fa5203af3eb6c580d5f18df2273ae6eb9a56558fba2ff0065298bf1a03ce | clingen-data-model/genegraph | dosage_jira.clj | (ns genegraph.transform.dosage-jira
(:require [clojure.java.io :as io]
[cheshire.core :as json]
[clojure.pprint :refer [pprint]]
[clojure.string :as s]
[flatland.ordered.map :refer [ordered-map]]
[camel-snake-kebab.core :refer :all]
[genegraph.d... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/6097333633b2a93ff8cb28604b56a91f2c7ab77b/src/genegraph/transform/dosage_jira.clj | clojure | (q/resource "")
assume moderate evidence for dosage sensitivity unlikely
TODO Java chokes on parsing a time offset without a colon, and is unwilling
to construct a ISO_INSTANT from the format parsed below. Need to either hack
TODO reference sequence should be a resource | (ns genegraph.transform.dosage-jira
(:require [clojure.java.io :as io]
[cheshire.core :as json]
[clojure.pprint :refer [pprint]]
[clojure.string :as s]
[flatland.ordered.map :refer [ordered-map]]
[camel-snake-kebab.core :refer :all]
[genegraph.d... |
a525352b5eb438473763aeab5dc52d29981e344b210a63b21ec0daf782e3b794 | sbcl/sbcl | gc-search.impure.lisp |
#-immobile-space (invoke-restart 'run-tests::skip-file)
(defun make-page-full-of-fdefns ()
;; Make a bunch of fdefns until we're aligned at a page boundary.
(let* ((page-size 4096)
(n-per-page (floor page-size sb-vm:symbol-size))
(fdefn)
(page-base)
(list)
(retries 0))... | null | https://raw.githubusercontent.com/sbcl/sbcl/dd911e00794a976aa590f5c458a9c3ae4d0bb6fa/tests/gc-search.impure.lisp | lisp | Make a bunch of fdefns until we're aligned at a page boundary.
Yay! This fdefn is immobile-page-aligned
Now try to allocate enough more to fill up the page so that
it is assured that there are not other (older) random fdefns
on that page.
(format t "Winner~%")
ensure liveness
(format t "Oops~%")
a higher addre... |
#-immobile-space (invoke-restart 'run-tests::skip-file)
(defun make-page-full-of-fdefns ()
(let* ((page-size 4096)
(n-per-page (floor page-size sb-vm:symbol-size))
(fdefn)
(page-base)
(list)
(retries 0))
(tagbody
try-again
(format t "~&Try ~D~%" (1+ ret... |
b04ad109bbf266526cbcf457b7e331324fbdc25e5cf3fd245b8d3ffc33394a2b | magnars/prone | app.cljs | (ns prone.ui.components.app
(:require [cljs.core.async :refer [put! map>]]
[prone.ui.components.map-browser :refer [MapBrowser InlineVectorBrowser ValueToken]]
[prone.ui.components.source-location :refer [SourceLocation]]
[prone.ui.components.code-excerpt :refer [CodeExcerpt]]
... | null | https://raw.githubusercontent.com/magnars/prone/50ed099bb95ad3dfa6d70d506f62faf0fdccebf8/src/prone/ui/components/app.cljs | clojure | (ns prone.ui.components.app
(:require [cljs.core.async :refer [put! map>]]
[prone.ui.components.map-browser :refer [MapBrowser InlineVectorBrowser ValueToken]]
[prone.ui.components.source-location :refer [SourceLocation]]
[prone.ui.components.code-excerpt :refer [CodeExcerpt]]
... | |
44301717e312f10f96328b5bca3d53a2743c5a11a7bde23331dde830ff2b269b | clash-lang/clash-compiler | Literal.hs | |
Copyright : ( C ) 2019 , Myrtle Software Ltd
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Blackbox generation for literal data constructors . ( System)Verilog only !
Copyright : (C) 2019, Myrtle Software Ltd
License : BSD2 (see the file LICENSE)
Maintainer : ... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/4fbd947626e2f17f193dbeb970bd66376159d356/clash-lib/src/Clash/Primitives/GHC/Literal.hs | haskell | # LANGUAGE OverloadedStrings #
| Constructs "clean" literals.
^ Base name of constructors (for example: "GHC.Word.W")
^ Functions processing | |
Copyright : ( C ) 2019 , Myrtle Software Ltd
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Blackbox generation for literal data constructors . ( System)Verilog only !
Copyright : (C) 2019, Myrtle Software Ltd
License : BSD2 (see the file LICENSE)
Maintainer : ... |
ef2bcb5f262df2970ee55935d64ab6bbe92d282bc9a31a2f9aa346d94177e2e7 | bellissimogiorno/nominal | EquivarSpec.hs | module Language.Nominal.EquivarSpec
( spec
) where
import Test.Hspec
import Test.QuickCheck
import Language.Nominal.Properties.SpecUtilities ()
import Language.Nominal.Properties.EquivarSpec
spec :: Spec
spec = do
it "Atoms one orbit" $ property prop_atoms_one_orbit
it "Two orbits of atoms pairs (eq... | null | https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/test/Language/Nominal/EquivarSpec.hs | haskell | module Language.Nominal.EquivarSpec
( spec
) where
import Test.Hspec
import Test.QuickCheck
import Language.Nominal.Properties.SpecUtilities ()
import Language.Nominal.Properties.EquivarSpec
spec :: Spec
spec = do
it "Atoms one orbit" $ property prop_atoms_one_orbit
it "Two orbits of atoms pairs (eq... | |
f45ab312f5783a602486b119148c75c93d85a425b5da9c79fd78da6dd36ac829 | fulcrologic/fulcro-spec | core.cljs | (ns fulcro-spec.core
(:require-macros
[fulcro-spec.core])
(:require
[cljs.test :include-macros true]
[fulcro-spec.assertions]
[fulcro-spec.async]
[fulcro-spec.stub]
[fulcro-spec.hooks :refer [hooks]]))
(declare => =1x=> =2x=> =3x=> =4x=> =throws=> =fn=>)
(defn set-hooks!
"Call this to se... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-spec/ef3fece4a2562590547fe12f27f135148fda65cf/src/main/fulcro_spec/core.cljs | clojure | (ns fulcro-spec.core
(:require-macros
[fulcro-spec.core])
(:require
[cljs.test :include-macros true]
[fulcro-spec.assertions]
[fulcro-spec.async]
[fulcro-spec.stub]
[fulcro-spec.hooks :refer [hooks]]))
(declare => =1x=> =2x=> =3x=> =4x=> =throws=> =fn=>)
(defn set-hooks!
"Call this to se... | |
844798f9b93715c865eec08d0e6ee16dd6592bf8a9556c4491017a0a2b87b3a4 | orthecreedence/wookie | state.lisp | (in-package :wookie)
This file defines and instantiates Wookie 's global state handler . This is
used throughout Wookie to store hook functions , routes , plugin state , etc .
The having all state in one variable makes it a lot easier to thread Wookie
;;; without worrying about threads bumping into each other.
... | null | https://raw.githubusercontent.com/orthecreedence/wookie/c18e4f994b307c648cce0a82d0ea78c2581c46df/state.lisp | lisp | without worrying about threads bumping into each other. | (in-package :wookie)
This file defines and instantiates Wookie 's global state handler . This is
used throughout Wookie to store hook functions , routes , plugin state , etc .
The having all state in one variable makes it a lot easier to thread Wookie
(defclass wookie-state ()
((hooks
:accessor wookie-st... |
ae708b8296800e121e9c2ecca70872478205171e46612fa72f6e678e43c84ab1 | metosin/sormilla | video_sim.clj | (ns sormilla.video-sim
(:import [java.net Socket ServerSocket InetSocketAddress]
[java.io InputStream OutputStream ByteArrayInputStream]
[org.apache.commons.io IOUtils])
(:require [sormilla.bin :as bin]
[clojure.java.io :as io]))
(set! *warn-on-reflection* true)
20 fps
(defn r... | null | https://raw.githubusercontent.com/metosin/sormilla/e50930930c41f64272f06c4bd02a4e3ab58e923f/src/sormilla/video_sim.clj | clojure | (ns sormilla.video-sim
(:import [java.net Socket ServerSocket InetSocketAddress]
[java.io InputStream OutputStream ByteArrayInputStream]
[org.apache.commons.io IOUtils])
(:require [sormilla.bin :as bin]
[clojure.java.io :as io]))
(set! *warn-on-reflection* true)
20 fps
(defn r... | |
c81c3d2441ce39e1202bd252f4c116edb67671b64d14883a60992f830f19ba33 | hidaris/thinking-dumps | interp.rkt | #lang racket
(provide (all-defined-out))
(require "../compile.rkt"
"../interp.rkt"
"printer.rkt"
racket/runtime-path
rackunit)
(define-runtime-path dir "..")
;; Asm -> Integer
;; Interpret (by assemblying, linking, and exec'ing) x86-64 code
;; Assume: starts with entry point run-tim... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/compiler/blackmail/asm/interp.rkt | racket | Asm -> Integer
Interpret (by assemblying, linking, and exec'ing) x86-64 code
Assume: starts with entry point run-time expects | #lang racket
(provide (all-defined-out))
(require "../compile.rkt"
"../interp.rkt"
"printer.rkt"
racket/runtime-path
rackunit)
(define-runtime-path dir "..")
(define (asm-interp a)
(let* ((t.s (make-temporary-file "nasm~a.s"))
(t.run (path-replace-extension t.s #".run")))... |
85941e4eced557b64e02719e01481a8a333e91fde48efe8473cb045b4417f019 | jimcrayne/jhc | Qualify1.hs | module Main where
import qualified Prelude as P
data T = T
GHC does n't allow : T.show T = " T " . What does the haskell98 doc say ?
idecls - > { ; ... ; idecl_n } ( n>=0 )
idecl - > ( funlhs | var ) rhs
| ( empty )
idecls -... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/Qualify1.hs | haskell | var, of course, does not permit qnames. | module Main where
import qualified Prelude as P
data T = T
GHC does n't allow : T.show T = " T " . What does the haskell98 doc say ?
idecls - > { ; ... ; idecl_n } ( n>=0 )
idecl - > ( funlhs | var ) rhs
| ( empty )
idecls -... |
86ed8a422c05ed0ddbd740dd291a6d172ba0022e0943d9c4dfe009e86ff4380a | discus-lang/ddc | Predicates.hs |
-- | Predicates on type expressions.
module DDC.Type.Exp.Simple.Predicates
( -- * Binders
isBNone
, isBAnon
, isBName
-- * Atoms
, isTVar
, isBot
, isAtomT
, isTExists
-- * Kinds
, isDataKind
, isRegionKind
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Type/Exp/Simple/Predicates.hs | haskell | | Predicates on type expressions.
* Binders
* Atoms
* Kinds
* Data Types
* Effect Types
Binders --------------------------------------------------------------------
Atoms ----------------------------------------------------------------------
| Test if some type is an empty TSum
| Check whether this type is an... |
module DDC.Type.Exp.Simple.Predicates
isBNone
, isBAnon
, isBName
, isTVar
, isBot
, isAtomT
, isTExists
, isDataKind
, isRegionKind
, isEffectKind
, isClosureKind
, isWitnessKind
, isWitnessType
, isCo... |
85769baf0f608060134530a1d2350c7420ee6d5c32a0c27976ed613f68a52e49 | bmeurer/ocaml-arm | includeclass.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/typing/includeclass.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Types
let class_types env ... |
2969096ed4412969cfb1f634b71731a4b7a27cde3e7d9112ca0fd1806a1db5a8 | seek-oss/evaporate | FileSystem.hs | {-# LANGUAGE RankNTypes #-}
module FileSystem
( checkPath
, getFilesFromFolder
, sourceFileOrDirectory
) where
import Conduit (runConduitRes
, sourceDirectoryDeep
, sinkList
, Producer
, yield)
import Control.Exception.Safe (throwM)
import Control.Monad.I... | null | https://raw.githubusercontent.com/seek-oss/evaporate/661542a0fb2380dc32ebbaf5ebb310959c15caa2/src/FileSystem.hs | haskell | # LANGUAGE RankNTypes #
| Deeply stream the contents of the given directory.
This works the same as sourceDirectoryDeep, except if the path is a File not a Directory then
it will yield just that file. | module FileSystem
( checkPath
, getFilesFromFolder
, sourceFileOrDirectory
) where
import Conduit (runConduitRes
, sourceDirectoryDeep
, sinkList
, Producer
, yield)
import Control.Exception.Safe (throwM)
import Control.Monad.IO.Class (MonadIO(..))
import... |
5094b7d2c28b7303fc82001e6400260c8ff498d994fdaa6b67ece9b385bb6f50 | conjure-cp/conjure | Eq.hs | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Eq where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
import qualified Data.Aeson as JSON -- aeson
import qualified Data.HashMap.Strict as M -- u... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/Eq.hs | haskell | aeson
unordered-containers
vector | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Eq where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
data OpEq x = OpEq x x
deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable, Generic... |
7c3d7903a1b4b75e047c9c0b32cfcf06e8214869019e1055e428211d2d5e0610 | macourtney/Dark-Exchange | has_panel.clj | (ns darkexchange.controller.offer.has-panel
(:require [darkexchange.controller.widgets.currency-combobox :as currency-combobox]
[darkexchange.controller.widgets.payment-type-combobox :as payment-type-combobox]
[seesaw.core :as seesaw-core])
(:import [java.math BigDecimal]))
(defn find-i-hav... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/controller/offer/has_panel.clj | clojure | (ns darkexchange.controller.offer.has-panel
(:require [darkexchange.controller.widgets.currency-combobox :as currency-combobox]
[darkexchange.controller.widgets.payment-type-combobox :as payment-type-combobox]
[seesaw.core :as seesaw-core])
(:import [java.math BigDecimal]))
(defn find-i-hav... | |
e35433b4c81f1acddb5f6e8df797a2eebf70999a01b13521e3684b21f2f7bfa9 | jasonstolaruk/CurryMUD | FilePaths.hs | {-# LANGUAGE OverloadedStrings #-}
module Mud.TopLvlDefs.FilePaths where
import System.Directory (getHomeDirectory)
import System.FilePath ((<.>), (</>))
type HomeDir = FilePath
type FilePathFun = HomeDir -> FilePath
mkMudFilePath :: FilePathFun -> IO FilePath
mkMudFilePath = flip fmap getHomeDirectory
under :... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/TopLvlDefs/FilePaths.hs | haskell | # LANGUAGE OverloadedStrings #
==================================================
Directories:
==================================================
Log files:
==================================================
Persistence files:
==================================================
The database file:
==============... |
module Mud.TopLvlDefs.FilePaths where
import System.Directory (getHomeDirectory)
import System.FilePath ((<.>), (</>))
type HomeDir = FilePath
type FilePathFun = HomeDir -> FilePath
mkMudFilePath :: FilePathFun -> IO FilePath
mkMudFilePath = flip fmap getHomeDirectory
under :: FilePathFun -> FilePath -> HomeDi... |
165b82d04d5bc4994dc32434891564f662aeac5d3ab675f41577a5c210dc4080 | tov/dssl2 | expt.rkt | #lang dssl2
assert 2 ** 10 == 1024
assert 2 ** 2 ** 3 == 256
assert (2 ** 2) ** 3 == 64
| null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/expt.rkt | racket | #lang dssl2
assert 2 ** 10 == 1024
assert 2 ** 2 ** 3 == 256
assert (2 ** 2) ** 3 == 64
| |
320ed8b810e2d97e4e24c53789ae64993639b46a851329eaa27e10c1e0beef26 | cl-axon/cl-paip | cmacsyma.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
File cmacsyma.lisp : Canonical Form version of .
Bug Fix by dst ,
(requires "macsyma") ; Only for the infix parser
;;;; rule and expression definitions from "student.lisp"
(defstruct (rule (:type lis... | null | https://raw.githubusercontent.com/cl-axon/cl-paip/5922be8e3aae00197779bad4a05afa8ea1f6b8c9/cmacsyma.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
Only for the infix parser
rule and expression definitions from "student.lisp"
Add numbers
Multiply numbers
Multiply each coefficient
Accumulate result in r; r[i] = k*p[i]
r[i] = p[0]*q[i] + p[1]*q[i-1] + ...
otherwise do real work.
of the form #(X 0 1).
d(a + bx + cx... | Code from Paradigms of AI Programming
Copyright ( c ) 1991
File cmacsyma.lisp : Canonical Form version of .
Bug Fix by dst ,
(defstruct (rule (:type list)) pattern response)
(defstruct (exp (:type list)
(:constructor mkexp (lhs op rhs)))
op lhs rhs)
(defun exp-p (x) (consp x))
(defun... |
8cfbd92fe5784d6bf08ac5b006baa2aa1151da65bedae70ef2e75133a83af12f | sunshowers/z3.rkt | test-integers.rkt | #lang racket
(require rackunit)
(require "../main.rkt")
(define/provide-test-suite test-integers
(test-case
"Test >, <, and +"
(smt:with-context
(smt:new-context)
(smt:declare-fun a () Int)
(smt:assert (>/s a 10))
(smt:assert (</s a 20))
(check-eq? (smt:check-sat) 'sat)
(define a-eval ... | null | https://raw.githubusercontent.com/sunshowers/z3.rkt/769a734f9751ba2053bdff194d951ca6b21cea9c/tests/test-integers.rkt | racket | #lang racket
(require rackunit)
(require "../main.rkt")
(define/provide-test-suite test-integers
(test-case
"Test >, <, and +"
(smt:with-context
(smt:new-context)
(smt:declare-fun a () Int)
(smt:assert (>/s a 10))
(smt:assert (</s a 20))
(check-eq? (smt:check-sat) 'sat)
(define a-eval ... | |
7196ebc6efdacfcc60aae9f0dc7dbb794aacc03f9fae1747f0bf23e97a0ad0b4 | RefactoringTools/wrangler | emacs_wrangler.erl | Copyright ( c ) 2010 , ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditio... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/emacs_wrangler.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Re... | Copyright ( c ) 2010 , ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
Some Interface Functions to Emacs
@private
-module(emacs_wrangler).
-include("../include/wrangler_internal.hrl").
-export([... |
f0c21deed0018c6bb9069b2161b7b7b145117d5de94bd08620085526d5e4f373 | kunstmusik/pink | ringmod.clj | (ns pink.effects.ringmod
(:require [pink.util :refer [generator gen-recur create-buffer]]))
;; Ensure unchecked math used for this namespace
(set! *unchecked-math* :warn-on-boxed)
(defn- create-ringmod-table
([] (create-ringmod-table 1.0))
([^double distortion]
(let [table-len (long (Math/pow 2 16))
... | null | https://raw.githubusercontent.com/kunstmusik/pink/7d37764b6a036a68a4619c93546fa3887f9951a7/src/main/pink/effects/ringmod.clj | clojure | Ensure unchecked math used for this namespace
this needs to be moved to another place, renamed | (ns pink.effects.ringmod
(:require [pink.util :refer [generator gen-recur create-buffer]]))
(set! *unchecked-math* :warn-on-boxed)
(defn- create-ringmod-table
([] (create-ringmod-table 1.0))
([^double distortion]
(let [table-len (long (Math/pow 2 16))
half (double (/ (long table-len) 2))
... |
70cca1210d03cd3e1108cd494c01868d577da437cbb6c9b2ff8853956751e1d2 | tobbebex/GPipe-Core | Uniform.hs | # LANGUAGE TypeFamilies , FlexibleContexts , GADTs , TypeSynonymInstances , ScopedTypeVariables , FlexibleInstances , GeneralizedNewtypeDeriving , Arrows , MultiParamTypeClasses , AllowAmbiguousTypes #
module Graphics.GPipe.Internal.Uniform where
import Graphics.GPipe.Internal.Buffer
import Graphics.GPipe.Internal.Sh... | null | https://raw.githubusercontent.com/tobbebex/GPipe-Core/4607e2c31d5beec30f2a918ab8ad48472ca236b7/GPipe-Core/src/Graphics/GPipe/Internal/Uniform.hs | haskell | | This class constraints which buffer types can be loaded as uniforms, and what type those values have.
| The type the buffer value will be turned into once it becomes a vertex or fragment value (the @x@ parameter is either 'V' or 'F').
| An arrow action that turns a value from it's buffer representation to it's ver... | # LANGUAGE TypeFamilies , FlexibleContexts , GADTs , TypeSynonymInstances , ScopedTypeVariables , FlexibleInstances , GeneralizedNewtypeDeriving , Arrows , MultiParamTypeClasses , AllowAmbiguousTypes #
module Graphics.GPipe.Internal.Uniform where
import Graphics.GPipe.Internal.Buffer
import Graphics.GPipe.Internal.Sh... |
de8eadbc0932c6b21ec9c2128f85ecb50f1525d905779b238be66be67ed04e23 | jyh/metaprl | ocaml_type_df.mli |
* Display forms for types .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/display/ocaml_type_df.mli | ocaml |
* -*-
* Local Variables:
* Caml-master: "refiner"
* End:
* -*-
|
* Display forms for types .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... |
13e78db1d753bfc481b01e8f8804d04f57c3b5e2127c9027a82632da8f7ce497 | Andromedans/andromeda | nonce.mli | (** Nonces are used to generate fresh atoms and meta variables. *)
type t
(** Create a fresh nonce associated with the given name. *)
val create : Name.t -> t
(** The name of the given nonce. *)
val name : t -> Name.t
(** Compare nonces for equality. *)
val equal : t -> t -> bool
(** Compare nonces. *)
val compare... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/utils/nonce.mli | ocaml | * Nonces are used to generate fresh atoms and meta variables.
* Create a fresh nonce associated with the given name.
* The name of the given nonce.
* Compare nonces for equality.
* Compare nonces.
* Print a nonce, with or without a leading questionmark.
Each nonce is guaranteed to printed in a unique way
* A... | type t
val create : Name.t -> t
val name : t -> Name.t
val equal : t -> t -> bool
val compare : t -> t -> int
val print : questionmark:bool -> parentheses:bool -> t -> Format.formatter -> unit
type 'a map
val map_empty : 'a map
val map_add : t -> 'a -> 'a map -> 'a map
val map_is_empty : 'a map -> bool
val ma... |
25070cd7205e171863ef10d44a8461d29e35f28f86671fb12fdd64c0829b2313 | input-output-hk/project-icarus-importer | Logic.hs | | Major logic of Update System ( US ) .
module Pos.Update.Logic
( module Pos.Update.Logic.Global
, module Pos.Update.Logic.Local
) where
import Pos.Update.Logic.Global
import Pos.Update.Logic.Local
| null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/update/Pos/Update/Logic.hs | haskell | | Major logic of Update System ( US ) .
module Pos.Update.Logic
( module Pos.Update.Logic.Global
, module Pos.Update.Logic.Local
) where
import Pos.Update.Logic.Global
import Pos.Update.Logic.Local
| |
9b516e142f80bad2ec0c9ec959339cd8eebd0a4a5b7b256c77b0937805e4c777 | mmontone/cl-gradual | lexenv-late.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; -*-
;;;
Copyright ( c ) 2008 by the authors .
;;;
;;; See COPYING for details.
(in-package :cl-walker)
(defparameter *lexical-environment-functions*
'((make-empty-lexical-environment "Returns an empty lexical environment useful for testing and playing around in the repl."... | null | https://raw.githubusercontent.com/mmontone/cl-gradual/f8c0d992e2886a3fa37e49d9de772391961f234c/cl-walker/src/lexenv-late.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; -*-
See COPYING for details.
set up some docstrings
if there was no definition provided for some of the functions in
*lexical-environment-functions* then register a function that will
signal an error.
variables
functions
macros
symbol-macros
blocks
tags
| Copyright ( c ) 2008 by the authors .
(in-package :cl-walker)
(defparameter *lexical-environment-functions*
'((make-empty-lexical-environment "Returns an empty lexical environment useful for testing and playing around in the repl.")
(iterate-variables-in-lexenv "(funcall VISITOR name &key ignored? specia... |
63dd11a3c2f34838b3e5003eeca5060720cf69815300ac4bbe03a5146b529f11 | anwarmamat/cmsc330spring20 | d3.mli | val concat : string -> string -> string
val add_to_float : int -> float -> float
val fib : int -> int
val add_three : int list -> int list
val filter : ('a -> bool) -> 'a list -> 'a list
val zip : 'a list -> 'b list -> ('a * 'b) list
| null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring20/c16a34bdcddaf9deb386310a7a25ff82c5578167/discussions/disc3/src/d3.mli | ocaml | val concat : string -> string -> string
val add_to_float : int -> float -> float
val fib : int -> int
val add_three : int list -> int list
val filter : ('a -> bool) -> 'a list -> 'a list
val zip : 'a list -> 'b list -> ('a * 'b) list
| |
be056ce1fc8de961c913da3bcb917baa00640034519eba2916c9022d630c11f4 | hellonico/origami-fun | warpone.clj | (ns opencv4.warpone
(:import
[org.opencv.calib3d Calib3d])
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
; use in akazing.clj
(defn rotate-by! [src angle]
(let [ factor 1]
(warp-affine! src
(get-rotation-matrix-2-d (new-point (* factor (/ (.width src) 2)) (* factor (/ (.height s... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/warpone.clj | clojure | use in akazing.clj | (ns opencv4.warpone
(:import
[org.opencv.calib3d Calib3d])
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
(defn rotate-by! [src angle]
(let [ factor 1]
(warp-affine! src
(get-rotation-matrix-2-d (new-point (* factor (/ (.width src) 2)) (* factor (/ (.height src) 2))) angle 1)
... |
64c7abf0fb7a1852d087edbbe91cc5ca6b6ff00e0a770fb4fce99a1cb96b3f92 | arttuka/reagent-material-ui | woman_2_two_tone.cljs | (ns reagent-mui.icons.woman-2-two-tone
"Imports @mui/icons-material/Woman2TwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def woman-2-two-tone (create-s... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/woman_2_two_tone.cljs | clojure | (ns reagent-mui.icons.woman-2-two-tone
"Imports @mui/icons-material/Woman2TwoTone as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def woman-2-two-tone (create-s... | |
ceb55e37eda8297eb0692c5e68a817fa96b24fa76ca6c6ccde08ccb37912156b | appleshan/cl-http | ipc.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : IPC ; Base : 10 -*-
(defpackage "IPC"
(:use "SOCKET" "COMMON-LISP")
(:export "FRANZ-HOSTNAME" "GETDOMAINNAME" "INTERNET-ADDRESS" "INTERNET-ADDRESS-DOMAIN" "PROTOCOL-ERROR" "TCP-CLIENT-ALIVE" "TCP-CLIENT-STREAM" "TCP-SERVER-STREAM" "STREAM-READ"))
(in-p... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/acl/obc/aclpc/ipc.lisp | lisp | Syntax : ansi - common - lisp ; Package : IPC ; Base : 10 -*-
This worked fine in ACLPC 2.0 and now it always return -1.
Please send your fix to - thanks!
This allocates a string for hostname
Fix socket bug where some extra characters
may trail after accept-connection returns |
(defpackage "IPC"
(:use "SOCKET" "COMMON-LISP")
(:export "FRANZ-HOSTNAME" "GETDOMAINNAME" "INTERNET-ADDRESS" "INTERNET-ADDRESS-DOMAIN" "PROTOCOL-ERROR" "TCP-CLIENT-ALIVE" "TCP-CLIENT-STREAM" "TCP-SERVER-STREAM" "STREAM-READ"))
(in-package "IPC")
(deftype unknown-host-name () 'error)
(defvar *local-hostdomainnam... |
89fce1f42cc91bfc90f3a51886e789d6dca8faeadcc15b5b0dcc893e9cab5ee1 | soulomoon/SICP | Exercise3.66.scm | Exercise 3.66 : Examine the stream ( pairs integers integers ) . Can you make any general comments about the order in which the pairs are placed into the stream ? For example , approximately how many pairs precede the pair ( 1 , 100 ) ? the pair ( 99 , 100 ) ? the pair ( 100 , 100 ) ? ( If you can make precise mathem... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter3/Exercise3.66.scm | scheme | Exercise 3.66 : Examine the stream ( pairs integers integers ) . Can you make any general comments about the order in which the pairs are placed into the stream ? For example , approximately how many pairs precede the pair ( 1 , 100 ) ? the pair ( 99 , 100 ) ? the pair ( 100 , 100 ) ? ( If you can make precise mathem... | |
987715879b416b14259d00fef4ee07eb585fba821fb847792ab4358ca487a813 | haskell-github/github | Search.hs | -----------------------------------------------------------------------------
-- |
-- License : BSD-3-Clause
Maintainer : < >
--
module GitHub.Data.Search where
import GitHub.Data.Repos (CodeSearchRepo)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import Prelude ()
import qu... | null | https://raw.githubusercontent.com/haskell-github/github/d9ac0c7ffbcc720a24d06f0a96ea4e3891316d1a/src/GitHub/Data/Search.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-3-Clause
| Maintainer : < >
module GitHub.Data.Search where
import GitHub.Data.Repos (CodeSearchRepo)
import GitHub.Data.URL (URL)
import GitHub.Internal.Prelude
import Prelude ()
import qualified Data.Vector as V
data SearchResult' entities = SearchResult
{ searchResultTotalCount :: !Int
, searc... |
6f329a6cf01b29c96fd665cea7e34b25e2032be1f44be49f5f2b0b73c35c0b18 | noinia/hgeometry | Camera.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Camera
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
-- Description : Data type to represent a camera and some functions for working with it.
--
--------------------... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Graphics/Camera.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Camera
License : see the LICENSE file
Description : Data type to represent a camera and some functions for working with it.
------------------------------------------------------------------------------
-... | Copyright : ( C )
Maintainer :
module Graphics.Camera( Camera(Camera)
, cameraPosition, rawCameraNormal, rawViewUp
, viewPlaneDepth, nearDist, farDist, screenDimensions
, cameraNormal, viewUp
, cameraTransform, wo... |
3d5d853e63ea3e93faa90bb0e65aa0ee8974609dd02f648c2fc8992d444cdc0b | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE NoRebindableSyntax #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.N... | null | https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/Duckling/Numeral/NL/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE NoRebindableSyntax #
module Duckling.Numeral.NL.Rules
( rules
) where
import Data.HashMap.Strict (HashMap)
import Data.Maybe
import Data.String
import Data.Text (Text)
import Prelude
import qualified Data.HashMap.Strict as HashMap
import qualified Da... |
f7af4ae4885d54ddeab947e2a70cb3d99131b9b357a0f452752a8793a84f3c11 | solita/mnt-teet | owner_opinion_commands.clj | (ns teet.land.owner-opinion-commands
(:require [teet.db-api.core :as db-api :refer [defcommand]]
teet.land.owner-opinion-specs
[teet.db-api.db-api-large-text :as db-api-large-text]
[teet.meta.meta-model :as meta-model]
[teet.project.project-db :as project-db]
... | null | https://raw.githubusercontent.com/solita/mnt-teet/2dcdad70d4dcf33eef56650f8f6d3fa9f7756cec/app/backend/src/clj/teet/land/owner_opinion_commands.clj | clojure | (ns teet.land.owner-opinion-commands
(:require [teet.db-api.core :as db-api :refer [defcommand]]
teet.land.owner-opinion-specs
[teet.db-api.db-api-large-text :as db-api-large-text]
[teet.meta.meta-model :as meta-model]
[teet.project.project-db :as project-db]
... | |
d5f878ed738f76ad0c1baad45c8982ac7454d032467355ed041ca714ee0837f0 | emhoracek/smooch | UploadSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module UploadSpec where
import Control.Monad.Trans.Except
import Test.Hspec
import Upload
spec :: Spec
spec = do
describe "getCNF" $ do
it "returns the contents of the first CNF file it finds" $
runExceptT (getCNF "tests/samples") `shouldR... | null | https://raw.githubusercontent.com/emhoracek/smooch/e718696b70bd2fcb0993652a24e97339cead783b/app/tests/UploadSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module UploadSpec where
import Control.Monad.Trans.Except
import Test.Hspec
import Upload
spec :: Spec
spec = do
describe "getCNF" $ do
it "returns the contents of the first CNF file it finds" $
runExceptT (getCNF "tests/samples") `shouldReturn` Right "okay\n"
it "gives... |
6bb0ae8637f5efe311c8584dd2e97fb1dbdb73421414a70b2f064d84cefc1c7d | aratare-jp/shinsetsu | elastic.cljs | (ns shinsetsu.ui.elastic
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as ri]
["@emotion/cache$default" :as createCache]
["@elastic/eui" :refer [EuiFieldSearch
EuiHorizontalRule
EuiCollapsibleNav
EuiCollapsib... | null | https://raw.githubusercontent.com/aratare-jp/shinsetsu/696e7f3387f9c6dc6a6627943fb0888108f8bf1a/src/cljs/shinsetsu/ui/elastic.cljs | clojure | List
Form
Form controls
Page
Modal
Tab
Description list
Header | (ns shinsetsu.ui.elastic
(:require
[com.fulcrologic.fulcro.algorithms.react-interop :as ri]
["@emotion/cache$default" :as createCache]
["@elastic/eui" :refer [EuiFieldSearch
EuiHorizontalRule
EuiCollapsibleNav
EuiCollapsib... |
26f34dd26ef04457091ebe1d30a2d2c6dedd8b7a66b49bbcb5e045272452aa36 | shirok/Gauche | lseqs-test.scm | (use test)
(use srfi-127)
;(include "../lseqs/r7rs-shim.scm")
Make - generator for tests cloned from SRFI 121
(define (make-generator . args)
(lambda () (if (null? args)
(eof-object)
(let ((next (car args)))
(set! args (cdr args))
... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/include/lseqs-test.scm | scheme | (include "../lseqs/r7rs-shim.scm")
Make-lseq creates an lseq, like list, but guarantees the use of a generator
test laziness
(test-assert (procedure? (cdr one23abc)))
(test-assert (procedure? (cdr (lseq-map - '(1 2 3)))))
(test-assert (procedure? (cdr odds)))
(test-assert (procedure? (cdr odds))) | (use test)
(use srfi-127)
Make - generator for tests cloned from SRFI 121
(define (make-generator . args)
(lambda () (if (null? args)
(eof-object)
(let ((next (car args)))
(set! args (cdr args))
next))))
(d... |
79cfbd8523124e2ff916df04b5a92e5e2a5cff91f08dba0d047b53cbb830d268 | mtgred/netrunner | diffs.clj | (ns game.core.diffs
(:require
[cond-plus.core :refer [cond+]]
[differ.core :as differ]
[game.core.board :refer [installable-servers]]
[game.core.card :refer :all]
[game.core.cost-fns :refer [card-ability-cost]]
[game.core.engine :refer [can-trigger?]]
[game.core.installing :refer [corp-can-pay-an... | null | https://raw.githubusercontent.com/mtgred/netrunner/42e25bb461b344b7a85f8123da2a85b56ad3f72a/src/clj/game/core/diffs.clj | clojure | traces
corp, runner, spectator, history | (ns game.core.diffs
(:require
[cond-plus.core :refer [cond+]]
[differ.core :as differ]
[game.core.board :refer [installable-servers]]
[game.core.card :refer :all]
[game.core.cost-fns :refer [card-ability-cost]]
[game.core.engine :refer [can-trigger?]]
[game.core.installing :refer [corp-can-pay-an... |
503c2dcc4cea5a4245e9ef7b27a657893d0fd76781976db1a3ea88ffaf56260a | suhailshergill/extensible-effects | Lazy.hs | # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE Trustworthy #
# LANGUAGE TypeApplications #
--... | null | https://raw.githubusercontent.com/suhailshergill/extensible-effects/249073ccc26f0c49b4bb72cc577d75ef19635f06/src/Control/Eff/State/Lazy.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Lazy state effect
------------------------------------------------------------------------
| State, lazy
Initial design:
The state request carries with it the state mutator function
We can use this request both for mutating and getting the state.
But see below for a ... | # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE Trustworthy #
# LANGUAGE TypeApplications #
module Control.Eff.State.Lazy where
import Control.E... |
94b15749598b32db1593d165285c32c820dd7f7e323264efc554d1d0fb14aa61 | Enecuum/Node | Language.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE UndecidableInstances #
module Enecuum.Framework.NodeDefinition.Language where
import qualified Enecuum.Core.Language as L
impor... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Framework/NodeDefinition/Language.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE TemplateHaskell #
TODO: it's possible to make these steps evaluating step-by-step, in order.
Think about if this really needed.
| Node description language.
Allows to specify what actions should be done when node starts.
| Se... | # LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
module Enecuum.Framework.NodeDefinition.Language where
import qualified Enecuum.Core.Language as L
import qualified Enecuum.Framework.Domain as D
import Enecuum.Framework.Handler.Cmd.Language
impo... |
e9e1365aa61e86868199ed097a9393e4c808ce733ac67dcae7ab75746818e92c | haskell/text | Types.hs | # LANGUAGE BangPatterns , ExistentialQuantification #
-- |
-- Module : Data.Text.Internal.Fusion.Types
Copyright : ( c ) 2008 - 2009 ,
( c ) 2009 ,
( c ) 2009 ,
( c ) 2011
--
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
... | null | https://raw.githubusercontent.com/haskell/text/3488190f25e1ee5a5dea6b1a593d8a5819e76a1e/src/Data/Text/Internal/Fusion/Types.hs | haskell | |
Module : Data.Text.Internal.Fusion.Types
License : BSD-style
Maintainer :
Stability : experimental
/Warning/: this is an internal module, and does not have a stable
API or name. Functions in this module may not check or enforce
preconditions expected by public modules. Use at your own risk!
|... | # LANGUAGE BangPatterns , ExistentialQuantification #
Copyright : ( c ) 2008 - 2009 ,
( c ) 2009 ,
( c ) 2009 ,
( c ) 2011
Portability : GHC
Core stream fusion functionality for text .
module Data.Text.Internal.Fusion.Types
(
CC(..)
, Pai... |
050e06884c5e2d911d36ed6b041cb6aee27487fb437a4c94e58e09c3fc22e99b | AccelerateHS/accelerate-examples | Radix.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
--
-- Radix sort for a subclass of element types
--
module Radix where
import Random
import Prelude as P
import Data.Array.Accelerate as A
import Data.Bits
import Data.List ( sort )
import Data.Array.Unboxed ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/tests/simple/Radix.hs | haskell | # LANGUAGE FlexibleContexts #
Radix sort for a subclass of element types
Radix sort
----------
dummy
radix i e = let x = (unsafeCoerce e :: Exp Int32)
where
floatFlip x = x `testBit` 31 ? (complement x, x) -- twos-complement negative numbers
Main
----
| # LANGUAGE ScopedTypeVariables #
module Radix where
import Random
import Prelude as P
import Data.Array.Accelerate as A
import Data.Bits
import Data.List ( sort )
import Data.Array.Unboxed ( IArray, UArray, listArray, bounds, elems )
import System.Random.MWC
class Elt e =... |
06d8cfe469d522aafbd450d473a5552b3a3f1a12b6cf2b0a4b02540c7ce34c59 | argp/bap | big_int_Z.ml | *
[ Big_int ] interface for Z module .
This modules provides an interface compatible with [ Big_int ] , but using
[ Z ] functions internally .
This file is part of the Zarith library
.
It is distributed under LGPL 2 licensing , with static linking exception .
See the LICENSE fi... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/zarith/big_int_Z.ml | ocaml | *
[ Big_int ] interface for Z module .
This modules provides an interface compatible with [ Big_int ] , but using
[ Z ] functions internally .
This file is part of the Zarith library
.
It is distributed under LGPL 2 licensing , with static linking exception .
See the LICENSE fi... | |
610ce06033bfc5df7cf2a3299a36516550b0b88b272d3cc6caed3e2bf7b0784b | snape/Loopless-Functional-Algorithms | Koda.hs | This file is part of " Loopless Functional Algorithms " .
--
SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory
SPDX - License - Identifier : Apache-2.0
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the Lic... | null | https://raw.githubusercontent.com/snape/Loopless-Functional-Algorithms/b96759a40fcdfad10734071776936514ace4dfa1/Koda.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | This file is part of " Loopless Functional Algorithms " .
SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory
SPDX - License - Identifier : Apache-2.0
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS... |
21841df5016f652baabc465a600ac6a19700cd47339ad5ed70d83af1660eaf0a | GaloisInc/elf-edit | Types.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Data.ElfEdit.HighLevel.Types
( -- * Top level declarations
Elf(..)
, emptyElf
, elfFileData
... | null | https://raw.githubusercontent.com/GaloisInc/elf-edit/fb4699a2bba68c4d46ea3dee436f640c328fb682/src/Data/ElfEdit/HighLevel/Types.hs | haskell | # LANGUAGE OverloadedStrings #
* Top level declarations
* ElfDataRegion
* Symbol tab
* GNU sections
----------------------------------------------------------------------
| This describes the size of a elf segment memory size.
^ The region has the given absolute size.
Note that when writing out files, we will ... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Data.ElfEdit.HighLevel.Types
Elf(..)
, emptyElf
, elfFileData
, elfHeader
, asumDataRegions
, ElfDataRegion(..)
, ppRegio... |
0a3bb2f877deaaad229f9078432d4efb98bb428311e9c90d083e67cf8dbe75d4 | microsoft/SLAyer | NSString.ml | Copyright ( c ) Microsoft Corporation . All rights reserved .
module String = struct
include String
let filteri fn s =
let len = length s in
let s' = create len in
let start = ref (-1) in
let count = ref 0 in
for i = 0 to len - 1 do
if fn i s.[i] then (
s'.[!count] <- s.[i] ... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSString.ml | ocaml | Copyright ( c ) Microsoft Corporation . All rights reserved .
module String = struct
include String
let filteri fn s =
let len = length s in
let s' = create len in
let start = ref (-1) in
let count = ref 0 in
for i = 0 to len - 1 do
if fn i s.[i] then (
s'.[!count] <- s.[i] ... | |
c361fa05dc646349a6b2e2cb8c8d1dc230491f3de99297b626028eb9b05cebbb | KarlHegbloom/zotero-texmacs-integration | init-legal-brief.scm | coding : utf-8
;;; ✠ ✞ ♼ ☮ ☯ ☭ ☺
;;;
;;; MODULE : init-legal-brief.scm
;;; DESCRIPTION : Initialize Legal Brief Style and Support Code
COPYRIGHT : ( C ) 2016 < >
;;;
This software falls under the GNU general public license version 3 or
;;; later. It comes WITHOUT ANY WARRANTY WHATSOEVER. For details... | null | https://raw.githubusercontent.com/KarlHegbloom/zotero-texmacs-integration/39e5db5b22fefc3672b9e5c22b3035b500ffe5b5/progs/init-legal-brief.scm | scheme | ✠ ✞ ♼ ☮ ☯ ☭ ☺
MODULE : init-legal-brief.scm
DESCRIPTION : Initialize Legal Brief Style and Support Code
later. It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file
LICENSE in the root directory or <-3.0.html>
You can put your own customized copy of the legal-brief style, etc. ahead
of the ... | coding : utf-8
COPYRIGHT : ( C ) 2016 < >
This software falls under the GNU general public license version 3 or
(plugin-configure legal-brief
(:require #t))
(when (supports-legal-brief?)
(import-from (legal-brief))
(extend-table style-menu-name
("legal-brief" "Legal Brief Style"))
(extend-... |
435cca81094d8a620c98ba1826d40af54b3f775be2a9546a86b6019f6a546508 | fare/xcvb | asdf-converter.lisp | #+xcvb (module (:depends-on ("grain-interface" "commands" "source-registry")))
(in-package :xcvb)
(declaim (optimize (safety 3) (debug 3) (speed 1)))
(defun equivalent-deps-p (module)
"This function takes a module and returns whether or not
its compile and load dependencies are in such a form that
:depends-on can ... | null | https://raw.githubusercontent.com/fare/xcvb/460e27bd4cbd4db5e7ddf5b22c2ee455df445258/asdf-converter.lisp | lisp | (set-pprint-dispatch 'module ...)
-comments
)
Copy comment header to tmppath file.
Write out xcvb module to tmppath file.
Copy rest of file to tmppath file.
See also
(canonical-fullname (canonicalize-fullname fullname))
Precompute to ensure O(n) behavior
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ... | #+xcvb (module (:depends-on ("grain-interface" "commands" "source-registry")))
(in-package :xcvb)
(declaim (optimize (safety 3) (debug 3) (speed 1)))
(defun equivalent-deps-p (module)
"This function takes a module and returns whether or not
its compile and load dependencies are in such a form that
:depends-on can ... |
3a7383c74acfde7242776af4917012334ad4551214bbaad4c3c5c9c6ac490657 | binsec/haunted | cfgraph.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/ast/cfgraph.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
e353bb6b27b0fc8e6b1e263004898d3e4f6acf7f5b0e9e3e535dc346d6649ea9 | nklein/clifford | def-errors.lisp | (in-package #:clifford)
(define-condition clifford-bad-basis-specification (error)
((algebra-name :initarg :algebra-name
:reader clifford-bad-basis-specification-algebra-name)
(basis-spec :initarg :basis-spec
:reader clifford-bad-basis-specification-basis-spec)
(reason :initarg ... | null | https://raw.githubusercontent.com/nklein/clifford/2ba9b9a8f68eb88c2821341dfac2f2a61c2f84ce/src/def-errors.lisp | lisp | (in-package #:clifford)
(define-condition clifford-bad-basis-specification (error)
((algebra-name :initarg :algebra-name
:reader clifford-bad-basis-specification-algebra-name)
(basis-spec :initarg :basis-spec
:reader clifford-bad-basis-specification-basis-spec)
(reason :initarg ... | |
eb6d6de462bb6b141092df06c44f58742aefdaf4171ab9650f873df07053ac26 | chenyukang/eopl | 03.scm | ;;rewrite each of these in continuation-passing style
1 . ( lambda ( x y ) ( p ( + 8 x ) ( q y ) ) )
;; ==>
(lambda (x y cont)
(q y (lambda (val)
(p (+ 8 x) val cont))))
2 . ( lambda ( x y u v ) ( + 1 ( f ( g x y ) ( + u v ) ) ) )
;; ==>
(lambda (x y u v cont)
(g x y (lambda (val)
(f val (+ u v) (lambda (... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/03.scm | scheme | rewrite each of these in continuation-passing style
==>
==>
=>
=>
=>
=>
=> |
1 . ( lambda ( x y ) ( p ( + 8 x ) ( q y ) ) )
(lambda (x y cont)
(q y (lambda (val)
(p (+ 8 x) val cont))))
2 . ( lambda ( x y u v ) ( + 1 ( f ( g x y ) ( + u v ) ) ) )
(lambda (x y u v cont)
(g x y (lambda (val)
(f val (+ u v) (lambda (val2)
(cont (+ 1 val2)))))))
3 . ( + 1 ( f ( g x y ) ( + u... |
f64ba98248aedbf5dc163446934957131ef592c3001157b88353616461934e1e | Ericson2314/lighthouse | iavor.hs | import qualified Data.ByteString as B
import Data.ByteString (packCString)
import Foreign.C.String
import Foreign
main = do x <- newCString "Hello"
s <- packCString x
let h1 = B.head s
print s
poke x (toEnum 97)
print s
let h2 = B.head s
print h1
... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/bytestring/tests/iavor.hs | haskell | import qualified Data.ByteString as B
import Data.ByteString (packCString)
import Foreign.C.String
import Foreign
main = do x <- newCString "Hello"
s <- packCString x
let h1 = B.head s
print s
poke x (toEnum 97)
print s
let h2 = B.head s
print h1
... | |
1ef485901b706da27fdf999b21251693160fbdad624cd70c475444cc6db3376d | vaibhavsagar/experiments | RawSystem.hs | # OPTIONS_GHC -cpp #
-- #hide
module Distribution.Compat.RawSystem (rawSystem) where
#if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < 602
import Data.List (intersperse)
import System.Cmd (system)
import System.Exit (ExitCode)
#else
import System.Cmd (rawSystem)
#endif
#if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < ... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/Cabal/Distribution/Compat/RawSystem.hs | haskell | #hide
this is hideously broken, actually | # OPTIONS_GHC -cpp #
module Distribution.Compat.RawSystem (rawSystem) where
#if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < 602
import Data.List (intersperse)
import System.Cmd (system)
import System.Exit (ExitCode)
#else
import System.Cmd (rawSystem)
#endif
#if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < 602
rawSy... |
458ee04675b7fe448317606ce7d66f796d309ed954a873d977dc83b7ac5d4069 | reborg/clojure-essential-reference | 12.clj | < 1 >
(.getBytes s (StandardCharsets/UTF_8)))
< 2 >
(.doFinal mac (get-bytes canonical)))
(time (dotimes [i 100000]
(sign-request (str "/" i))))
" Elapsed time : 449.417098 msecs " ; <3 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Creatingandmanipulatingfunctions/Functiondefinition/defnanddefn-/12.clj | clojure | <3 > | < 1 >
(.getBytes s (StandardCharsets/UTF_8)))
< 2 >
(.doFinal mac (get-bytes canonical)))
(time (dotimes [i 100000]
(sign-request (str "/" i))))
|
77ced1f0ed137e34334d37688a0e559b6de231873d84e2e69e5685cf3a9e492b | LPCIC/coq-elpi | coq_elpi_utils.mli | (* coq-elpi: Coq terms as the object language of elpi *)
(* license: GNU Lesser General Public License Version 2.1 or later *)
(* ------------------------------------------------------------------------- *)
val to_coq_loc : Elpi.API.Ast.Loc.t -> Loc.t
val of_coq_loc : Loc.t -> Elpi.AP... | null | https://raw.githubusercontent.com/LPCIC/coq-elpi/68f51f56291953171586a124892705736a131b45/src/coq_elpi_utils.mli | ocaml | coq-elpi: Coq terms as the object language of elpi
license: GNU Lesser General Public License Version 2.1 or later
------------------------------------------------------------------------- |
val to_coq_loc : Elpi.API.Ast.Loc.t -> Loc.t
val of_coq_loc : Loc.t -> Elpi.API.Ast.Loc.t
val err : ?loc:Elpi.API.Ast.Loc.t -> Pp.t -> 'a
exception LtacFail of int * Pp.t
val ltac_fail_err : ?loc:Elpi.API.Ast.Loc.t -> int -> Pp.t -> 'a
val nYI : string -> 'a
val safe_destApp : Evd.evar_map ->
EConstr.t -> (EConstr... |
18a94eab0c16934c8ab3ad377f64916b73aacf6a1f634c460281d3b1cbd086f2 | OCamlPro/ocp-build | copDo.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/cop/driver/copDo.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open Ezcmd.Modules
open BuildValue.TYPES
open BuildEngineTypes
open BuildTerm
let number_of_cores () =
let ncores = ref 0 in
begin try
FileString.iter_lin... |
49321e1ef5629133464ac9a6e463b2f5ec49f5907639f725091e81cf4babb33a | purescript/purescript | Compat.hs | | A compatibility module that allows a restricted set of purs.json manifest
-- | files to be used for publishing. The manifest must described a package
| available on GitHub , and it must be convertable to a Bower manifest .
-- |
-- | Fully supporting the registry manifest format will require `purs publish`
| and... | null | https://raw.githubusercontent.com/purescript/purescript/7f385cd116b6ac51cea49df01529d031580db005/src/Language/PureScript/Publish/Registry/Compat.hs | haskell | | files to be used for publishing. The manifest must described a package
|
| Fully supporting the registry manifest format will require `purs publish`
| the fields required for publishing.
|
|
compiler and to Pursuit.
| The name of the package
| An optional description of the package
| A map of dependencies... | | A compatibility module that allows a restricted set of purs.json manifest
| available on GitHub , and it must be convertable to a Bower manifest .
| and by extension Pursuit to relax the requirement that packages are hosted
| on GitHub , because the registry does not have this requirement .
module Language.Pu... |
f18abbb0bd2ded9e72d1d999f6c9a3562e3db49070da2378ebb31f27b6e3613e | solita/mnt-teet | nvd.clj | #!/usr/bin/env bb
(require '[cheshire.core :as cheshire])
(require '[babashka.curl :as curl])
(require '[clojure.java.shell :as sh])
(require '[clojure.string :as str])
(require '[clojure.set :as set])
(defn without-ion-dep [func]
(let [orig-deps (slurp "app/backend/deps.edn")]
(spit "app/backend/deps.edn"
... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/ci/scripts/nvd.clj | clojure | FIXME: should track the line?
| #!/usr/bin/env bb
(require '[cheshire.core :as cheshire])
(require '[babashka.curl :as curl])
(require '[clojure.java.shell :as sh])
(require '[clojure.string :as str])
(require '[clojure.set :as set])
(defn without-ion-dep [func]
(let [orig-deps (slurp "app/backend/deps.edn")]
(spit "app/backend/deps.edn"
... |
e96c7b43689c1be3f95e822da8a23976911563943b99ffa8ed99e3dd6d06704e | webyrd/n-grams-for-synthesis | custom-macro-transformers.scm | (cond-expand
(custom-macro-transformers
(import (scheme base)))
(else
(import (except (scheme base)
define-syntax
let-syntax
letrec-syntax
syntax-rules))
(import (srfi 147))))
| null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-147/custom-macro-transformers.scm | scheme | (cond-expand
(custom-macro-transformers
(import (scheme base)))
(else
(import (except (scheme base)
define-syntax
let-syntax
letrec-syntax
syntax-rules))
(import (srfi 147))))
| |
3ee1485ac769ef2699386d7692393546697fb77d1a35a3aa36527d9e5a8359b4 | lisp/de.setf.xml | schema.lisp | 20100513T131553Z00
;;; from #<doc-node #x26678E8E>
(common-lisp:in-package "#") | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/2004/02/skos/core/schema.lisp | lisp | from #<doc-node #x26678E8E> | 20100513T131553Z00
(common-lisp:in-package "#") |
08edeaf81c63ae4cdf362a391558b27d319addd23fc962bc624105bac2cefff4 | rodo/tsung-gis | wms.erl | -*- coding : utf-8 -*-
%%
Copyright ( c ) 2013 < >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later ... | null | https://raw.githubusercontent.com/rodo/tsung-gis/d6fc43e5c21d7d12f703cf0766dcd0900ab1d6bc/src/wms.erl | erlang |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th... | -*- coding : utf-8 -*-
Copyright ( c ) 2013 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Web Mapping Service url generator
-module(... |
80141d10248f7b0f958561996edbddb53dbb5f59ecbcb1c12de983f9f73fb7f4 | jarvinet/scheme | fact.scm | (define (factorial n)
(if (= n 1)
1
(* (factorial (- n 1)) n)))
| null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/fact.scm | scheme | (define (factorial n)
(if (= n 1)
1
(* (factorial (- n 1)) n)))
| |
c1add77f1ccc88ee8b2e93e2c188d715aadb4203bfe70927f26ae3e191566dbd | hidaris/thinking-dumps | interp.rkt | #lang typed/racket
(provide (all-defined-out))
(require "parser.rkt")
(require "ast.rkt")
(require "env.rkt")
(: apply-procedure (Closure Value -> Value))
(define (apply-procedure proc val)
(match proc
[(Closure param body saved-env)
(value-of body (extend-env param val saved-env))]))
(: value-of
(-> ... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-20/interp.rkt | racket | #lang typed/racket
(provide (all-defined-out))
(require "parser.rkt")
(require "ast.rkt")
(require "env.rkt")
(: apply-procedure (Closure Value -> Value))
(define (apply-procedure proc val)
(match proc
[(Closure param body saved-env)
(value-of body (extend-env param val saved-env))]))
(: value-of
(-> ... | |
ee3a0acf272b90901068593f5d94d2c0252ee8360ac0d0c6c01c4f58805568d4 | uncomplicate/neanderthal | api.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/neanderthal/e05c8a81457d9a3f01356334ffcc04a26769c6d1/src/clojure/uncomplicate/neanderthal/internal/api.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns uncomplicate.neanderthal.internal.api
(:refer-clojure :exclude [abs])
(:require [uncomplicate.commons.core :refer [Releaseable]]))
(definterface RealDefault
(entry [nav stor da buf ^long ofst ^long i ^long j]))
(defprotocol Flippable
(flip [this]))
(defpro... |
587bdbac070eb7e5eca9bf259fe2e2efa975f79306c44f8b83f2078706d51e9e | alanz/ghc-exactprint | OverloadedRecFldsFail10_C.hs | # LANGUAGE DuplicateRecordFields , TypeFamilies #
module OverloadedRecFldsFail10_C (F(..)) where
import OverloadedRecFldsFail10_A
data instance F Char = MkFChar { foo :: Char }
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/OverloadedRecFldsFail10_C.hs | haskell | # LANGUAGE DuplicateRecordFields , TypeFamilies #
module OverloadedRecFldsFail10_C (F(..)) where
import OverloadedRecFldsFail10_A
data instance F Char = MkFChar { foo :: Char }
| |
cba4694bcfc8104561ee5619cc19d0c6951a86658cbe20b120560ba505a89015 | AccelerateHS/accelerate-examples | Foreign.hs | # LANGUAGE CPP #
module Test.Foreign (
test_foreign
) where
import Config
#ifdef ACCELERATE_CUDA_BACKEND
import Test.Foreign.CUDA
#endif
import Data.Array.Accelerate.Examples.Internal
test_foreign :: Backend -> Config -> Test
test_foreign _be _conf =
testGroup "foreign"
[
#ifdef ACCELERATE_CUDA_BACKEND
... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/nofib/Test/Foreign.hs | haskell | # LANGUAGE CPP #
module Test.Foreign (
test_foreign
) where
import Config
#ifdef ACCELERATE_CUDA_BACKEND
import Test.Foreign.CUDA
#endif
import Data.Array.Accelerate.Examples.Internal
test_foreign :: Backend -> Config -> Test
test_foreign _be _conf =
testGroup "foreign"
[
#ifdef ACCELERATE_CUDA_BACKEND
... | |
a9c12e06a64cd64f71c809c77d0f467a11de435112447bb9c0385d952a27a38f | camlp5/pa_ppx_ag | topo_test.ml | open OUnit2 ;
module StringVertex = struct
include String ;
value hash = Hashtbl.hash ;
end ;
module G = Graph.Imperative.Digraph.ConcreteBidirectional(StringVertex) ;
module TSort = Graph.Topological.Make(G) ;
module ITSort = ImperativeTopological.Make(G) ;
value test0 ctxt =
let edges = [("a","b"); ("b","c")... | null | https://raw.githubusercontent.com/camlp5/pa_ppx_ag/cd6169ca104e4d13ff9d8f87059fd13e36497373/tests/unit/topo_test.ml | ocaml | open OUnit2 ;
module StringVertex = struct
include String ;
value hash = Hashtbl.hash ;
end ;
module G = Graph.Imperative.Digraph.ConcreteBidirectional(StringVertex) ;
module TSort = Graph.Topological.Make(G) ;
module ITSort = ImperativeTopological.Make(G) ;
value test0 ctxt =
let edges = [("a","b"); ("b","c")... | |
647da7043119ff280b2292b28c2ebf0973a92565b2f2cff4d28c75e7acc7355a | basho/riak_pipe | riak_pipe_stat.erl | %% -------------------------------------------------------------------
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You ma... | null | https://raw.githubusercontent.com/basho/riak_pipe/a341b653408bd1517ccdd0f54ec27be1005dbeba/src/riak_pipe_stat.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permission... | Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-... |
0d3aa51c7e0c3e0f239b798b66235a8697e146bdaf5831d241a2321e9b9aa524 | rbkmoney/genlib | genlib_pmap_tests.erl | %%
-module(genlib_pmap_tests).
-include_lib("eunit/include/eunit.hrl").
-spec test() -> _.
-type testcase() :: {_, fun()}.
-spec empty_test_() -> [testcase()].
empty_test_() ->
[
?_assertEqual([], genlib_pmap:map(fun(V) -> V end, [])),
?_assertEqual([], genlib_pmap:map(fun(_) -> exit(welwalla) ... | null | https://raw.githubusercontent.com/rbkmoney/genlib/b08ef4d61e0dde98995ec3d2f69a4447255e79ef/test/genlib_pmap_tests.erl | erlang |
lazy, i know
NOTE
We assume here that pmap overall spent no more than `T` time (which is the time a single worker
spends sleeping) plus some constant (which is essentially synchronisation overhead and non-ideal
SMP as we run tests on real hardware after all) |
-module(genlib_pmap_tests).
-include_lib("eunit/include/eunit.hrl").
-spec test() -> _.
-type testcase() :: {_, fun()}.
-spec empty_test_() -> [testcase()].
empty_test_() ->
[
?_assertEqual([], genlib_pmap:map(fun(V) -> V end, [])),
?_assertEqual([], genlib_pmap:map(fun(_) -> exit(welwalla) end... |
d53c4a2d74469e652da69e546a4e96a38f119f8fccf6ba0564b8a9d39e77b15b | SuYi1995/game_server | svr_global_data.erl | %%%-------------------------------------------------------------------
%%% @author sy
( C ) 2020 , < COMPANY >
%%% @doc
%%% 全局数据处理进程
%%% @end
Created : 14 . 10月 2020 15:52
%%%-------------------------------------------------------------------
-module(svr_global_data).
-author("sy").
-behaviour(gen_server).
-incl... | null | https://raw.githubusercontent.com/SuYi1995/game_server/b9a8574589075a1264c3d1f9a564d6d2ea8ae574/src/server/global_data/svr_global_data.erl | erlang | -------------------------------------------------------------------
@author sy
@doc
全局数据处理进程
@end
-------------------------------------------------------------------
API
gen_server callbacks
永久数据
===================================================================
API
============================================... | ( C ) 2020 , < COMPANY >
Created : 14 . 10月 2020 15:52
-module(svr_global_data).
-author("sy").
-behaviour(gen_server).
-include("common.hrl").
-include("global_data.hrl").
-export([start_link/0, stop/0, get_value/3, get_all_value/1, put_value/3,
add_count/3, append_value/4, daily_clear/0, i/0, p/0, call/1, c... |
effe0f292cf3a9f55b693faa84a7d3ce2cb023f1213609fd64b96788a93481d3 | creswick/ihaskell-notebook | Types.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Types where
import Data.Aeson.Generic() -- for instances
import Data.Typeable (Typeable)
import Data.Data (Data)
import GHC.IO.Handle (Handle)
data Input = Input { inputCellNo :: Int
, inputSource :: String
} deriving (Eq, Show, Data, Ty... | null | https://raw.githubusercontent.com/creswick/ihaskell-notebook/91dfd756d408e5cddf9b53286bca702d731b09b7/ghcj/src/Types.hs | haskell | # LANGUAGE DeriveDataTypeable #
for instances
^ The temporary file used to share 'it' values. | module Types where
import Data.Typeable (Typeable)
import Data.Data (Data)
import GHC.IO.Handle (Handle)
data Input = Input { inputCellNo :: Int
, inputSource :: String
} deriving (Eq, Show, Data, Typeable)
data Output = ParseError String
| CompileError { outputErr :... |
39aca599e312073e91baba657c1d03f8e39a6ee5cabd4187dfd09d286fa5fd31 | theodormoroianu/SecondYearCourses | Exp-5_20210115162714.hs | module Exp where
import Parsing
import Control.Applicative
data Exp = Lit Int
| Add Exp Exp
| Sub Exp Exp
| Mul Exp Exp
| Div Exp Exp
deriving (Eq,Show)
evalExp :: Exp -> Int
evalExp (Lit n) = n
evalExp (Add e f) = evalExp e + evalExp f
evalExp (Sub e f) = evalE... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab12/Exp-5_20210115162714.hs | haskell | module Exp where
import Parsing
import Control.Applicative
data Exp = Lit Int
| Add Exp Exp
| Sub Exp Exp
| Mul Exp Exp
| Div Exp Exp
deriving (Eq,Show)
evalExp :: Exp -> Int
evalExp (Lit n) = n
evalExp (Add e f) = evalExp e + evalExp f
evalExp (Sub e f) = evalE... | |
f3ad289f055ef5871b46ad130228def5e04dbba2bdb41939a8780d68bb64d7a8 | freizl/dive-into-haskell | tutorial8.hs | Informatics 1 - Functional Programming
-- Tutorial 8
--
Week 10 - due : 29/30 Nov.
import Data.List
import Test.QuickCheck
-- Type declarations
type FSM q = ([q], Alphabet, q, [q], [Transition q])
type Alphabet = [Char]
type Transition q = (q, Char, q)
-- Example machines
m1 :: FSM Int
m1 = ([0,1,2,3,4],
... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/lectures/informatics1-FP/2011-haisheng/tutorial8/tutorial8.hs | haskell | Tutorial 8
Type declarations
Example machines
OPTIONAL MATERIAL ------------------------------------ | Informatics 1 - Functional Programming
Week 10 - due : 29/30 Nov.
import Data.List
import Test.QuickCheck
type FSM q = ([q], Alphabet, q, [q], [Transition q])
type Alphabet = [Char]
type Transition q = (q, Char, q)
m1 :: FSM Int
m1 = ([0,1,2,3,4],
['a','b'],
0,
[4],
[(0,'a',1), (0,'... |
265df0e6963e64bc98df5f4a3a51c31054a0ae13e01ebc66cec47139c721043d | ghc/ghc | T22871.hs | # LANGUAGE GHCForeignImportPrim #
# LANGUAGE MagicHash #
{-# LANGUAGE UnliftedFFITypes #-}
import Data.Foldable
import GHC.Exts
import GHC.Int
foreign import prim "foo" foo :: Int64# -> Int64#
main :: IO ()
main = for_ [0, 42, 114514] $ \(I64# x#) -> print $ I64# (foo x#)
| null | https://raw.githubusercontent.com/ghc/ghc/354aa47d313113855aff9e5c5476fcb56f80e3bf/testsuite/tests/cmm/should_run/T22871.hs | haskell | # LANGUAGE UnliftedFFITypes # | # LANGUAGE GHCForeignImportPrim #
# LANGUAGE MagicHash #
import Data.Foldable
import GHC.Exts
import GHC.Int
foreign import prim "foo" foo :: Int64# -> Int64#
main :: IO ()
main = for_ [0, 42, 114514] $ \(I64# x#) -> print $ I64# (foo x#)
|
bce65600f32bce8b6d95208df8265333595052611df78cd69322113debd8fd7c | norbu09/umleitung | umleitung_sup.erl | @author author < >
YYYY author .
%% @doc Supervisor for the umleitung application.
-module(umleitung_sup).
-author('author <>').
-behaviour(supervisor).
%% External exports
-export([start_link/0, upgrade/0]).
%% supervisor callbacks
-export([init/1]).
( ) - > ServerRet
%% @doc API for starting the super... | null | https://raw.githubusercontent.com/norbu09/umleitung/e03b67ab4bb6079c9cf56847dbc43e1dba4663ed/src/umleitung_sup.erl | erlang | @doc Supervisor for the umleitung application.
External exports
supervisor callbacks
@doc API for starting the supervisor.
@doc Add processes if necessary.
@doc supervisor callback. | @author author < >
YYYY author .
-module(umleitung_sup).
-author('author <>').
-behaviour(supervisor).
-export([start_link/0, upgrade/0]).
-export([init/1]).
( ) - > ServerRet
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
@spec upgrade ( ) - > ok
upgrade() ->
{ok, {_, ... |
19796fa9e96f949ffe7066c840e2b4fff9a7a7c0a63d2404c363706ed47b7513 | kaoskorobase/mescaline | Library.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Mescaline.Pattern.Library (
-- *Generators
closest
, region
-- *Filters
, takeDur
, filterE
, step
-- *Coordinates
, coord
, polar
-- *Regions
, center
, radius
-- *Randomness
, prrand_
, pexprand_
, pgaussian_
, pbrown_
) where
i... | null | https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-patterns/src/Mescaline/Pattern/Library.hs | haskell | # LANGUAGE DeriveDataTypeable #
*Generators
*Filters
*Coordinates
*Regions
*Randomness
import qualified Data.Packed.Random as R
pscan :: (x -> y -> (x, a)) -> Maybe (x -> a) -> x -> P s y -> P s a
pscanl :: (a -> y -> a) -> a -> P s y -> P s a
pcontinue :: P s x -> (x -> P s x -> P s a) -> P s a
pscan :: (x -... | module Mescaline.Pattern.Library (
closest
, region
, takeDur
, filterE
, step
, coord
, polar
, center
, radius
, prrand_
, pexprand_
, pgaussian_
, pbrown_
) where
import Control.Applicative
import Control.Exception
import qualified Control.Monad as M
import qualified ... |
f382aacf5c586fe20e1b82bf57055716e7a28c45a9b3967a1e39bf847ac81ff2 | ekmett/name | Trie.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ViewPatterns #
{-# L... | null | https://raw.githubusercontent.com/ekmett/name/cbb2ea930c719a13cd68d7703c68189e0e859767/src/Data/Name/Internal/Trie.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
# LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# OPTIONS_GHC -Wall -funbox-strict-fields -fno-warn-orphans -fno-warn-type-defaults -O2 #
-------------------------------------------------------------------------------
|
Stability : experimen... | # LANGUAGE CPP #
# LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
# LANGUAGE LambdaCase #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ViewPatterns #
# LANGUAGE Trustworthy #
# LANGUAGE ScopedTypeVariables #
# LAN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.