_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 |
|---|---|---|---|---|---|---|---|---|
6a2856e324a2e4773ac24aca16a8ba3a751e12431e56648ac87e41f5fff62dc3 | tek/polysemy-hasql | Enum.hs | module Polysemy.Hasql.Table.Enum where
import qualified Data.Map.Strict as Map
import Hasql.Decoders (Value, enum)
import Polysemy.Hasql.SOP.Enum (EnumTable(enumTable))
enumDecodeValue ::
EnumTable a =>
Value a
enumDecodeValue =
enum (`Map.lookup` enumTable)
| null | https://raw.githubusercontent.com/tek/polysemy-hasql/254c0f53b74bc6d0e9f7dc6a1641153d47a416d7/packages/hasql/lib/Polysemy/Hasql/Table/Enum.hs | haskell | module Polysemy.Hasql.Table.Enum where
import qualified Data.Map.Strict as Map
import Hasql.Decoders (Value, enum)
import Polysemy.Hasql.SOP.Enum (EnumTable(enumTable))
enumDecodeValue ::
EnumTable a =>
Value a
enumDecodeValue =
enum (`Map.lookup` enumTable)
| |
466592e3ea29ed763baa966ee75d9fc6f4ec0119e4c02cd30985f79b8dc5cf97 | kit-ty-kate/labrys | type.ml | Copyright ( c ) 2013 - 2017 The Labrys developers .
(* See the LICENSE file at the top-level directory. *)
open TypedEnv
let trigger_pure_arrow = function
| `Partial -> `Forbid
| `Allow | `Forbid as x -> x
let add_abstract_type name k env =
let types = EnvMap.Type.add name (Abstract k) env.TypedEnv.types in
... | null | https://raw.githubusercontent.com/kit-ty-kate/labrys/4a3e0c5dd45343b4de2e22051095b49d05772608/src/typing/type.ml | ocaml | See the LICENSE file at the top-level directory.
TODO: Warning ?
TODO: Sum ? | Copyright ( c ) 2013 - 2017 The Labrys developers .
open TypedEnv
let trigger_pure_arrow = function
| `Partial -> `Forbid
| `Allow | `Forbid as x -> x
let add_abstract_type name k env =
let types = EnvMap.Type.add name (Abstract k) env.TypedEnv.types in
{env with TypedEnv.types}
let rec kind_equal x y = m... |
59b64ae542f096d84c2a7dce497a3509512d02f3c6029cc30df1004622730d4e | jeromesimeon/Galax | finfo.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/base/finfo.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : finfo.mli , v 1.9 2007/02/01 22:08:45 simeon Exp $
type finfo
val get_file_id : string -> int
val set_current_file : string -> unit
val make_finfo : int -> int -> finfo
val make_finfo_line_col : string -> int -> int -> finfo
val... |
135bf24e2f47721bab3300d7b47a25e7149c9a70d3c5af1bd1d70cc598dfdbe6 | Decentralized-Pictures/T4L3NT | client_daemon.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_112_Pt4FJEL6/lib_delegate/client_daemon.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
8502cd3f2578eccc35d1e5a9c244aa070e281c21ef71e63b9028c63faad36830 | brendanhay/terrafomo | LogicMonitor.hs | -- This module is auto-generated.
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
-- |
-- Module : Terrafomo.LogicMonitor
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : a... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-logicmonitor/gen/Terrafomo/LogicMonitor.hs | haskell | This module is auto-generated.
|
Module : Terrafomo.LogicMonitor
Stability : auto-generated
* Provider
* Types
* Resources
* DataSources
* Settings |
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.LogicMonitor
(
modul... |
21de20a416e6489288eba10523cd44f0dfaa8cd21de24b3592e44e7ff59931f1 | dyzsr/ocaml-selectml | diffing_with_keys.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/utils/diffing_with_keys.mli | ocaml | ************************************************************************
OCaml
... | , projet Cambium , Inria Paris
Copyright 2021 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
*
When diffing lists where each element has a distinct key , we can refine
the diffing patch by int... |
5198c5c9b29d48451b2414fd04f0a75ede8446532da7d031c3ee9817d4e972e7 | takikawa/racket-ppa | make-boot.rkt | #lang racket/base
(require racket/runtime-path
racket/match
racket/file
racket/pretty
(only-in "r6rs-lang.rkt"
optimize-level)
(only-in "scheme-lang.rkt"
current-expand
with-source-path
getprop)
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/ChezScheme/rktboot/make-boot.rkt | racket | environment variable to generate just enough to run `configure`
for a corss build.
Writes ".boot" and ".h" files to a "boot" subdirectory of
`SCHEME_SRC`.
----------------------------------------
get `library`
Change some bindings from imported to top-level references so that
expressions are compiled to referen... | #lang racket/base
(require racket/runtime-path
racket/match
racket/file
racket/pretty
(only-in "r6rs-lang.rkt"
optimize-level)
(only-in "scheme-lang.rkt"
current-expand
with-source-path
getprop)
... |
b70749adc8af20ae19c34a553ee70394c79ac294df855b77b7c208bfe35bffcf | footprintanalytics/footprint-web | permissions.clj | (ns metabase.models.native-query-snippet.permissions
"NativeQuerySnippets have different permissions implementations. In Metabase CE, anyone can read/edit/create all
NativeQuerySnippets. EE has a more advanced implementation."
(:require [metabase.public-settings.premium-features :refer [defenterprise]]))
(defent... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/models/native_query_snippet/permissions.clj | clojure | (ns metabase.models.native-query-snippet.permissions
"NativeQuerySnippets have different permissions implementations. In Metabase CE, anyone can read/edit/create all
NativeQuerySnippets. EE has a more advanced implementation."
(:require [metabase.public-settings.premium-features :refer [defenterprise]]))
(defent... | |
cdb9544976eeb2e72f44865712678f38aabcd8d7ba26152d7f863415ffa0c24c | alwx/luno-react-native | root.cljs | (ns luno.android.scenes.root
(:require [reagent.core :as r]
[clojure.string :refer [blank?]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[luno.shared.ui :as ui]
[luno.shared.scenes.main :refer [main-scene]]
[luno.shared.scenes.about :refer [abo... | null | https://raw.githubusercontent.com/alwx/luno-react-native/34f9f8b01c1248cf64f40be9638e8352fd8fd448/src/luno/android/scenes/root.cljs | clojure | (ns luno.android.scenes.root
(:require [reagent.core :as r]
[clojure.string :refer [blank?]]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[luno.shared.ui :as ui]
[luno.shared.scenes.main :refer [main-scene]]
[luno.shared.scenes.about :refer [abo... | |
b4fe3f4f2778b82c5fa54da9f6491748210369188078b86610c8eb37b1f778cb | BinaryAnalysisPlatform/bap-veri | veri_policy.mli | open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_traces.Std
open Regular.Std
type event = Trace.event
type events = Value.Set.t
type rule = Veri_rule.t
module Matched : sig
type t = event list * event list [@@deriving bin_io, compare, sexp]
include Regular.S with type t := t
end
type matched = Matched.t [@... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-veri/1368edaa32c11079b610ba61558ddcd091c1e774/lib/veri_policy.mli | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Bap_traces.Std
open Regular.Std
type event = Trace.event
type events = Value.Set.t
type rule = Veri_rule.t
module Matched : sig
type t = event list * event list [@@deriving bin_io, compare, sexp]
include Regular.S with type t := t
end
type matched = Matched.t [@... | |
f36091c436a1f1c034611159146482710c21eaf29dd3edb2acfdc3ead091f974 | jacobobryant/biff | worker.clj | (ns com.example.feat.worker
(:require [clojure.tools.logging :as log]
[com.biffweb :as biff :refer [q]]
[xtdb.api :as xt]))
(defn every-minute []
(iterate #(biff/add-seconds % (* 5 60)) (java.util.Date.)))
(defn print-usage [{:keys [biff/db]}]
;; For a real app, you can have this run onc... | null | https://raw.githubusercontent.com/jacobobryant/biff/6353c406adef0344484b49a5ef2282eab77c2347/example/src/com/example/feat/worker.clj | clojure | For a real app, you can have this run once per day and send you the output
in an email.
You could send this as an email instead of printing. | (ns com.example.feat.worker
(:require [clojure.tools.logging :as log]
[com.biffweb :as biff :refer [q]]
[xtdb.api :as xt]))
(defn every-minute []
(iterate #(biff/add-seconds % (* 5 60)) (java.util.Date.)))
(defn print-usage [{:keys [biff/db]}]
(let [n-users (nth (q db
... |
d96b90af516d02cbc2c20aa7b81fa9d630f092a12bb774e8117171e13ddba504 | helium/blockchain-core | blockchain_json.erl | -module(blockchain_json).
-include("blockchain_json.hrl").
-callback to_json(blockchain_block:block()
| blockchain_txn:txn(),
Opts::[tuple()]
) -> map().
-type json_object() :: map().
-type json_opts() :: [tuple()].
-export_type([json_object/0,
json... | null | https://raw.githubusercontent.com/helium/blockchain-core/d614f914777c6fa7787cb3fce5546d7da7035060/src/blockchain_json.erl | erlang | -module(blockchain_json).
-include("blockchain_json.hrl").
-callback to_json(blockchain_block:block()
| blockchain_txn:txn(),
Opts::[tuple()]
) -> map().
-type json_object() :: map().
-type json_opts() :: [tuple()].
-export_type([json_object/0,
json... | |
b3d4339c59905c5ffdc10fd642b8ab964a3627b152705495e8243ac3864a8242 | tensorflow/haskell | NNTest.hs | Copyright 2016 TensorFlow authors .
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/tensorflow/haskell/d088e30b80f1508281e400975bec9d14b431a22c/tensorflow-ops/tests/NNTest.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 perm... | Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLists #
module Main where
import TensorFlow.Test (assert... |
b27e4f884c002a4375972e9cb2a7b14663ed24934697ed55a28399e154ea7e7d | janestreet/core_extended | read.ml | open Core
exception Bad_csv_formatting = Parse_state.Bad_csv_formatting
module On_invalid_row = struct
type 'a t =
line_number:int
-> int String.Map.t
-> string Append_only_buffer.t
-> exn
-> [ `Skip | `Yield of 'a | `Raise of exn | `Fallback of 'a t ]
let raise ~line_number header_map buffer... | null | https://raw.githubusercontent.com/janestreet/core_extended/edf633c74144300a1934213e610edb0cba116f68/delimited_kernel/src/read.ml | ocaml | We only want to parse the header here and nothing more. To achieve that, we feed the
parser with chunks of input that does not contain newlines but at the end. After
each chunk, we check whether a header was successfully parsed or not.
An empty header is parsed as a single column with an empty name
[P... | open Core
exception Bad_csv_formatting = Parse_state.Bad_csv_formatting
module On_invalid_row = struct
type 'a t =
line_number:int
-> int String.Map.t
-> string Append_only_buffer.t
-> exn
-> [ `Skip | `Yield of 'a | `Raise of exn | `Fallback of 'a t ]
let raise ~line_number header_map buffer... |
5110cf4f580fd8b3ea39a2aa7333a4947a4fb6f170e13f97c68145ef343ef01c | ska80/thinlisp | backquote.lisp | (in-package "TLI")
;;;; Module BACKQUOTE
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1997 Gensym Corporation .
;;; All rights reserved.
This file is part of ThinLisp .
ThinLisp is open source ; you can redistribute it and/or modify it
under the terms of the ThinLisp License as published... | null | https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/backquote.lisp | lisp | Module BACKQUOTE
All rights reserved.
you can redistribute it and/or modify it
either version 1 or ( at your option ) any later version .
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note that this version of the backquote reader will only be ins... | (in-package "TLI")
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1997 Gensym Corporation .
This file is part of ThinLisp .
under the terms of the ThinLisp License as published by the ThinLisp
ThinLisp is distributed in the hope that it will be useful , but
For additional information s... |
b74215b66c46764fe8bd4e68d7e6324744e28186eb105483f79f7b7f5b737457 | TDacik/Deadlock | lockgraph.ml | is oriented graph with locks as vertices and edges representing locking
* order . Each edge is labelled by list of traces describing how the edge was obtained .
*
* Author : ( ) , 2020
* order. Each edge is labelled by list of traces describing how the edge was obtained.
*
* Author: Tomas Dacik (),... | null | https://raw.githubusercontent.com/TDacik/Deadlock/4f6d39062f727983f6f6d52659c291731b3064b4/src/lockset_analysis/lockgraph.ml | ocaml | Create new edge. If it already exists, update it by adding labels.
Create new edge
Union of (not necessarily disjoint) graphs. Traces at common edges are concatenated.
Remove duplicit and empty cycles. Then convert rest to list of locks.
TODO: consider reversed cycles | is oriented graph with locks as vertices and edges representing locking
* order . Each edge is labelled by list of traces describing how the edge was obtained .
*
* Author : ( ) , 2020
* order. Each edge is labelled by list of traces describing how the edge was obtained.
*
* Author: Tomas Dacik (),... |
a86c4750302ffd0ccf3a226723b375bd87756ae179c7cf64565648bb7210a60d | marianoguerra/interfix | interfix.erl | -module('interfix').
%% API exports
-export([to_lex/1, to_ast/1, to_erl_ast/1, to_erl/1, to_mod/1, to_code/1,
to_code/2, compile/2, compile/3]).
-export([str_to_lex/1, str_to_ast/1, str_to_erl_ast/1]).
%% CLI exports
-export([main/1]).
%%====================================================================
%... | null | https://raw.githubusercontent.com/marianoguerra/interfix/4d29a68f85876ed8430f46a4a4b43f233852fe8f/src/interfix.erl | erlang | API exports
CLI exports
====================================================================
API functions
====================================================================
remove newline after colon, semicolon
remove duplicated endlines
remove newline before dots
remove newline before splits
remove last en... | -module('interfix').
-export([to_lex/1, to_ast/1, to_erl_ast/1, to_erl/1, to_mod/1, to_code/1,
to_code/2, compile/2, compile/3]).
-export([str_to_lex/1, str_to_ast/1, str_to_erl_ast/1]).
-export([main/1]).
read_file(Path) ->
case file:read_file(Path) of
{ok, Content} -> {ok, unicode:characters_t... |
1ed861f2c307b09bae9b6c62ee77180e51e4fdc0052e7e842f147fbf75e68c2d | kmi/irs | new.lisp | Mode : Lisp ; Package :
The Open University
(in-package "OCML")
(in-ontology standard-dimensions)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/standard-dimensions/new.lisp | lisp | Package : |
The Open University
(in-package "OCML")
(in-ontology standard-dimensions)
|
26434ef59dbfa04affe86799efb793f70f43f047096201e83b594a80b0c34e69 | igorhvr/bedlam | look-for-str.scm | ; -- Function: find-string-from-port? STR IN-PORT MAX-NO-CHARS
Looks for a string STR within the first MAX - NO - CHARS chars of the
; input port IN-PORT
MAX - NO - CHARS may be omitted : in that case , the search span would be
; limited only by the end of the input stream.
When the STR is found , ... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/pure-scheme/ssax/look-for-str.scm | scheme | -- Function: find-string-from-port? STR IN-PORT MAX-NO-CHARS
input port IN-PORT
limited only by the end of the input stream.
characters it has read from the port, and the port is set
The function returns #f when the string wasn't found
Note the function reads the port *STRICTLY* sequentially, and does... | Looks for a string STR within the first MAX - NO - CHARS chars of the
MAX - NO - CHARS may be omitted : in that case , the search span would be
When the STR is found , the function returns the number of
to read the first char after that ( that is , after the STR )
Notes on the algorithm .
match ... |
a0a44968cdde105f24b7dcc3eeed9d36962cc6cd2f00e8196176698b931e3c09 | databrary/databrary | Types.hs | module Model.AssetSegment.Types
( AssetSegment(..)
, getAssetSegmentRelease2
, getAssetSegmentVolumePermission2
, getAssetSegmentVolume
, newAssetSegment
, assetFullSegment
, assetSlotSegment
, assetSegmentFull
, assetSegmentRange
, Excerpt(..)
, newExcerpt
, excerptInSegment
) where
import D... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/AssetSegment/Types.hs | haskell | |A "fake" (possibly invalid) 'AssetSegment' corresponding to the full 'AssetSlot'
when the assetslot has lower permissions than the excerpt, then use the excerpt's permissions
when no excerpt is present, then assume no access
TODO: should I expose the guts of getAssetSlotRelease2? | module Model.AssetSegment.Types
( AssetSegment(..)
, getAssetSegmentRelease2
, getAssetSegmentVolumePermission2
, getAssetSegmentVolume
, newAssetSegment
, assetFullSegment
, assetSlotSegment
, assetSegmentFull
, assetSegmentRange
, Excerpt(..)
, newExcerpt
, excerptInSegment
) where
import D... |
54299bdcd17d16975faff88b3c770af54d02e670ef65eef93723562045fa347f | TrustInSoft/tis-kernel | mem_exec.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/legacy/mem_exec.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
c493c8254a031083018b19f1a3d5f393ac4bbebca56694f8922c3cc79a546409 | Enecuum/Node | Node.hs | {-# LANGUAGE DeriveAnyClass #-}
module Enecuum.Framework.Domain.Node where
import qualified Data.Aeson as J
import Data.Aeson.Extra (noLensPrefixJsonConfig)
import Enecuum.Core.Types (StringHash)
import Enecuum.Framework.Domain... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Framework/Domain/Node.hs | haskell | # LANGUAGE DeriveAnyClass #
This is used in tests only.
TODO: get rid of it.
| Common
| Network messages |
module Enecuum.Framework.Domain.Node where
import qualified Data.Aeson as J
import Data.Aeson.Extra (noLensPrefixJsonConfig)
import Enecuum.Core.Types (StringHash)
import Enecuum.Framework.Domain.Networking
import Ene... |
4bebdbec81f85f75e91fdb7ae22735feeaa35e067dd37b754d13524a03aeb30b | BartMassey/advent-of-code-2015 | soln.hs | Copyright © 2015
[ This program is licensed under the " MIT License " ]
-- Please see the file COPYING in the source
-- distribution of this software for license terms.
# LANGUAGE FlexibleContexts #
import Data.Array.IO
import Soln
| Each dimension goes from 0 to 999 inclusive .
bound :: Int
bound = 999
--... | null | https://raw.githubusercontent.com/BartMassey/advent-of-code-2015/16bb3eca7852f1b0d2bfb9dbbe2da587642444f4/6/soln.hs | haskell | Please see the file COPYING in the source
distribution of this software for license terms.
| Every coordinate in the array, in y-major order.
| A mutable unboxed 2D array of lights.
| Take a coordinate string to a coordinate pair.
| Given a current state, an operator to apply,
and a string describing a rectangle... | Copyright © 2015
[ This program is licensed under the " MIT License " ]
# LANGUAGE FlexibleContexts #
import Data.Array.IO
import Soln
| Each dimension goes from 0 to 999 inclusive .
bound :: Int
bound = 999
allCoords :: [(Int, Int)]
allCoords = [(x, y) | x <- [0..bound], y <- [0..bound]]
type LightArray ... |
fec2db4d43d64a4c8d6108ba610f369780302f81fcc24df47870c1b033392936 | arttuka/reagent-material-ui | diversity_3_sharp.cljs | (ns reagent-mui.icons.diversity-3-sharp
"Imports @mui/icons-material/Diversity3Sharp 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 diversity-3-sharp (crea... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/diversity_3_sharp.cljs | clojure | (ns reagent-mui.icons.diversity-3-sharp
"Imports @mui/icons-material/Diversity3Sharp 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 diversity-3-sharp (crea... | |
a29294aef250a77d68a40603fe57e8f7f715916da761e9b186466ccbaa935326 | Vetd-Inc/vetd-app | threads.clj | (ns com.vetd.app.threads
(:require [com.vetd.app.db :as db]
[com.vetd.app.journal :as journal]
[com.vetd.app.hasura :as ha]
[com.vetd.app.auth :as auth]
[com.vetd.app.common :as com]
[com.vetd.app.util :as ut]
[com.vetd.app.docs :as docs]
... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/clj/com/vetd/app/threads.clj | clojure | (ns com.vetd.app.threads
(:require [com.vetd.app.db :as db]
[com.vetd.app.journal :as journal]
[com.vetd.app.hasura :as ha]
[com.vetd.app.auth :as auth]
[com.vetd.app.common :as com]
[com.vetd.app.util :as ut]
[com.vetd.app.docs :as docs]
... | |
ac28a2cccb86c7f2d053f1c49ca6e8afda9b1db1f1227c52f21bd89f34c8b492 | geneweb/geneweb | gwdPlugin.ml | open Geneweb
let assets = ref ""
let registered = ref []
let ht : (string, string * (Config.config -> string option -> bool)) Hashtbl.t =
Hashtbl.create 0
let register ~ns list =
assert (not @@ List.mem ns !registered);
registered := ns :: !registered;
List.iter
(fun (m, fn) ->
let fn = fn !assets ... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/bin/gwd/gwdPlugin.ml | ocaml | open Geneweb
let assets = ref ""
let registered = ref []
let ht : (string, string * (Config.config -> string option -> bool)) Hashtbl.t =
Hashtbl.create 0
let register ~ns list =
assert (not @@ List.mem ns !registered);
registered := ns :: !registered;
List.iter
(fun (m, fn) ->
let fn = fn !assets ... | |
11ca0634c7087b199506a64d5a0a7b5e111fc077778ec39a80d5f3be6ed4fa59 | korya/efuns | asttypes.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/beta/include/asttypes.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : asttypes.mli , v 1.1 2000/08/... |
c9b56a2baab32788a1c98bc0380809c5f651110205c3ad646c0e0d55c495997d | k0001/network-simple-tls | tls-echo.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import qualified Data.ByteString.Char8 as B
import Data.Char (toUpper)
import Data.Monoid ((<>))
import Data.X509 (SignedCertificate)
import Data.X509.CertificateStore (makeCertificateStor... | null | https://raw.githubusercontent.com/k0001/network-simple-tls/97a07544c2a504ff9f0d38b4b4ddf26286949b71/examples/tls-echo.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
| Repeatedly receive data from the given 'T.Context' until exhausted,
performing the given action on each received chunk.
------------------------------------------------------------------------------
The boring stuff below is related to command line parsing |
module Main (main) where
import qualified Data.ByteString.Char8 as B
import Data.Char (toUpper)
import Data.Monoid ((<>))
import Data.X509 (SignedCertificate)
import Data.X509.CertificateStore (makeCertificateStore, CertificateStore)
import Data.X509.File (readSignedO... |
b910c5fcaffd1303330ba429d823dca02148e9441fb7c735221a81b8192a1d66 | metabase/metabase | temporal_bucket.cljc | (ns metabase.lib.temporal-bucket
(:require
[metabase.lib.dispatch :as lib.dispatch]
[metabase.lib.schema.temporal-bucketing :as temporal-bucketing]
[metabase.util.malli :as mu]))
(defmulti temporal-bucket*
"Implementation for [[temporal-bucket]]. Implement this to tell [[temporal-bucket]] how to add a buc... | null | https://raw.githubusercontent.com/metabase/metabase/02e9aa420ef910138b9b5e05f74c96e31286bcf2/src/metabase/lib/temporal_bucket.cljc | clojure | (ns metabase.lib.temporal-bucket
(:require
[metabase.lib.dispatch :as lib.dispatch]
[metabase.lib.schema.temporal-bucketing :as temporal-bucketing]
[metabase.util.malli :as mu]))
(defmulti temporal-bucket*
"Implementation for [[temporal-bucket]]. Implement this to tell [[temporal-bucket]] how to add a buc... | |
d5f55097c2aee344708fc48be67bca42ad232007baa51f03612938d380ad1ce9 | stchang/macrotypes | eval.rkt | #lang turnstile+/base
(require turnstile/eval)
(provide (all-from-out turnstile/eval))
| null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-lib/turnstile%2B/eval.rkt | racket | #lang turnstile+/base
(require turnstile/eval)
(provide (all-from-out turnstile/eval))
| |
42d3b089a9e0fced6a70af30a9fdca151d8169ae5d2009863b2260b52ebda352 | jbracker/supermonad | CodeGenerator.hs |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/hmtc/monad-param/CodeGenerator.hs | haskell | | TAM Code Generator.
:: MTIR -> D [TAMInst]
Standard library imports
----------------------------------------------------------------------------
Code generator environment
----------------------------------------------------------------------------
Maps internal term-level symbols either to a displacement (with ... |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* H M T C *
* ... |
0a6887097ecab3e3623aa50591870989b81042e70e514927adce3579221f9aef | input-output-hk/ouroboros-network | Common.hs | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LA... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/437d7160079c83c4632fe0a42c596e5105c59a4d/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Serialisation/Common.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableIn... | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableSuperClasses #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Conse... |
e4e1a12a68ff257aa4b94ee372e86ec51ef018d4f27d1ae832468ffdb8964185 | raaz-crypto/raaz | CPortable.hs | # LANGUAGE DataKinds #
module ChaCha20.Random.CPortable
( name, primName, description, RandomBufferSize, reseedAfter, randomBlocks
, module ChaCha20.CPortable
) where
import Raaz.Core
import qualified ChaCha20.CPortable as Base
import ChaCha20.CPortable (Prim, Internals, BufferAlignment, Buff... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/77caa8ca850ec0dec245cecd4f86ea2617dda193/implementation/ChaCha20/Random/CPortable.hs | haskell | ---------------- CSPRG related stuff -------------------------------
| How many blocks of the primitive to generated before re-seeding. | # LANGUAGE DataKinds #
module ChaCha20.Random.CPortable
( name, primName, description, RandomBufferSize, reseedAfter, randomBlocks
, module ChaCha20.CPortable
) where
import Raaz.Core
import qualified ChaCha20.CPortable as Base
import ChaCha20.CPortable (Prim, Internals, BufferAlignment, Buff... |
9fa56a43e72ef2d433f85d2de46359323a5eb0d9ebad8279206d8770b18f1856 | jiangpengnju/htdp2e | programming_with_structures_sample_UFO.v1.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname programming_with_structures_sample_UFO.v1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/programming_with_structures_sample_UFO.v1.rkt | racket | about the language level of this file in a form that our tools can easily process.
Sample Problem: Your team is designing a game program that keeps track of an
object that moves across the canvas at changing speed. The chosen data
interpretation: (make-vel dx dy) means a velocity of dx pixels [per tick]
along t... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname programming_with_structures_sample_UFO.v1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
representation requires two ... |
b571a85375d5695c2fdfa191164112b228f0f52f12633cdf22dc27a7d1e8ebb6 | psholtz/MIT-SICP | exercise1-18.scm | ;;
Exercise 1.18
;;
Using the results of exercises 1.16 and 1.17 , devise a procedure that generates an iterative
process for multiplying two integers in terms of adding , doubling , and halving and uses a
;; logarithmic number of steps.
;;
(define (double x) (+ x x))
(define (halve x) (/ x 2))
(define (even? n)... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-18.scm | scheme |
logarithmic number of steps.
Unit test:
Expanding the call graph:
| Exercise 1.18
Using the results of exercises 1.16 and 1.17 , devise a procedure that generates an iterative
process for multiplying two integers in terms of adding , doubling , and halving and uses a
(define (double x) (+ x x))
(define (halve x) (/ x 2))
(define (even? n) (= (remainder n 2) 0))
(define (* a b)
... |
4c6a34a1b9ed3e266da56af20e856c2ec167df7cbdda8f612d3e1a0ce16a254e | jaspervdj/hakyll | Routes.hs | --------------------------------------------------------------------------------
| ' Routes ' is part of the ' Hakyll . Core . Rules . Rules ' processing pipeline .
It determines if and where the compilation result of the underlying
' Hakyll . Core . Item . Item ' being processed is written out to
( relative to... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/6b0ccabdfa32cfcee101c9395d3b49954fe43bca/lib/Hakyll/Core/Routes.hs | haskell | ------------------------------------------------------------------------------
file on disk : ' < project - directory>/posts / hakyll.md '
compilation result is written to ' < destination - directory>/posts / hakyll.html '
compilation result is written to ' < destination - directory>/posts / hakyll.md '
file on ... | | ' Routes ' is part of the ' Hakyll . Core . Rules . Rules ' processing pipeline .
It determines if and where the compilation result of the underlying
' Hakyll . Core . Item . Item ' being processed is written out to
( relative to the destination directory as configured in
' Hakyll . Core . Configuration.des... |
651bb96dd7c82b7178156074561e129e1343a23ccc9ba45f73d4382b22e590aa | coalton-lang/coalton | fundeps.lisp | ;;;; fundeps.lisp
;;;;
- " Type Classes with Functional Dependencies " by [ 2000 ]
- " Exploring the Design Space for Type - based Implicit Parameterization " by [ 1999 ]
- " The Theory of Relational Databases " by ch . 4 and 5 [ 1983 ]
(defpackage #:coalton-impl/typechecker/fundeps
(:use
#:cl)
(:... | null | https://raw.githubusercontent.com/coalton-lang/coalton/3a08ed5f88250a67026a0c82d7da6abd3af229bc/src/typechecker/fundeps.lisp | lisp | fundeps.lisp
STRUCT
TYPE
FUNCTION
CONSTANT | - " Type Classes with Functional Dependencies " by [ 2000 ]
- " Exploring the Design Space for Type - based Implicit Parameterization " by [ 1999 ]
- " The Theory of Relational Databases " by ch . 4 and 5 [ 1983 ]
(defpackage #:coalton-impl/typechecker/fundeps
(:use
#:cl)
(:local-nicknames
(#:u... |
e049a6d1c394ba6d2a68c90e14cae9c343fe06aac98fc6316b129e6b96c6e5d5 | re-ops/re-gent | facts.clj | (ns re-gent.facts
"re-cog facts collector"
(:require
[re-share.schedule :refer (watch halt! seconds)]
[re-cog.facts.datalog :refer (populate)]))
(defn stop
[]
(halt!))
(defn setup []
(populate))
(defn start
"Start facts update schedule"
[]
(watch :facts (rest (seconds 120)) (fn [] (populate))))... | null | https://raw.githubusercontent.com/re-ops/re-gent/78bcd22011a31ca3f19a7221e87a6a7afd7682a5/src/re_gent/facts.clj | clojure | (ns re-gent.facts
"re-cog facts collector"
(:require
[re-share.schedule :refer (watch halt! seconds)]
[re-cog.facts.datalog :refer (populate)]))
(defn stop
[]
(halt!))
(defn setup []
(populate))
(defn start
"Start facts update schedule"
[]
(watch :facts (rest (seconds 120)) (fn [] (populate))))... | |
729bba9b7c7d15a495af9b19407f4d246f8c6b518f2205bc12bc42770f60434f | dustin/gopro | DB.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
modul... | null | https://raw.githubusercontent.com/dustin/gopro/7e024751f0dccfab8dc8c164958f4c0d5e7aef49/src/GoPro/DB.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards # | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
module GoPro.DB (MediaRow(..), row_fileInfo, row_media, row_thumbnail, row_variants, row_raw_json,
Area(..), area_id, area_name, area_nw... |
7decd68d1de3957f905c23538139320188697ad8d0e2246b581b784c96aa8dbf | malcolmstill/ulubis | keyboard.lisp |
(in-package :ulubis)
(defgeneric keyboard-handler (object time keycode keysym state))
(defmethod keyboard-handler ((o (eql nil)) time keycode keysym state))
(defgeneric cancel-mods (surface))
(defmethod cancel-mods ((object (eql nil)))
nil)
| null | https://raw.githubusercontent.com/malcolmstill/ulubis/23c89ccd5589930e66025487c31531f49218bb76/keyboard.lisp | lisp |
(in-package :ulubis)
(defgeneric keyboard-handler (object time keycode keysym state))
(defmethod keyboard-handler ((o (eql nil)) time keycode keysym state))
(defgeneric cancel-mods (surface))
(defmethod cancel-mods ((object (eql nil)))
nil)
| |
d3e1d42a2639ca4153c361bf94fe0b4d2563aa54ac2dfb368ae53978aa351a76 | Helium4Haskell/helium | CompileUtils.hs | {-| Module : CompileUtils
License : GPL
Maintainer :
Stability : experimental
Portability : portable
-}
module Helium.Main.CompileUtils
( module Helium.Main.CompileUtils
, Option(..)
, splitFilePath, combinePathAndFile
, when, unless
, exitWith, ExitCode(..), exit... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/src/Helium/Main/CompileUtils.hs | haskell | | Module : CompileUtils
License : GPL
Maintainer :
Stability : experimental
Portability : portable
putStrLn ("System:" ++ s) |
module Helium.Main.CompileUtils
( module Helium.Main.CompileUtils
, Option(..)
, splitFilePath, combinePathAndFile
, when, unless
, exitWith, ExitCode(..), exitSuccess, getArgs
, module Helium.ModuleSystem.ImportEnvironment
, Module(..)
) where
import Helium.Main.Args(Option(..))
impor... |
85ddf8f0d564df17907f4098ed8d6feb920c73a3c10689573bf7aaea73627b20 | ygrek/mldonkey | gui_users.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/newgui/gui_users.ml | ocaml | * GUI for the lists of files. | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
dbd25ca1cad0ab231671fa53b8a29b9f0a89ce20e4f7e808a70c05da81fb6613 | webyrd/mediKanren | mk.rkt | #lang racket/base
(require racket/list
racket/include
racket/stream
)
(provide
run run* run-stream
== =/=
fresh
conde
symbolo numbero
absento
project
var?
fail
succeed
choice
inc
unify
walk
walk*
mplus
mplus*
bind
bind*
take-stream
reify
)
;; ext... | null | https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/medikanren/mk.rkt | racket | extra stuff for racket
due mostly to samth
Substitution representation
Returns #f if not found, or a pair of u and the result of the lookup.
This distinguishes between #f indicating absence and being the result.
Scope object.
Used to determine whether a branch has occured between variable creation
and unificati... | #lang racket/base
(require racket/list
racket/include
racket/stream
)
(provide
run run* run-stream
== =/=
fresh
conde
symbolo numbero
absento
project
var?
fail
succeed
choice
inc
unify
walk
walk*
mplus
mplus*
bind
bind*
take-stream
reify
)
(defin... |
82156f188d8cd77f56b38c6ebe1afdf722de7afdd3000e2adaf4e2e12b934406 | YoshikuniJujo/funpaala | Some1.hs | module Some (a, b) where
a, b, c :: Int
a = 3
b = 4 * c
c = 5
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/24_adt_module/Some1.hs | haskell | module Some (a, b) where
a, b, c :: Int
a = 3
b = 4 * c
c = 5
| |
c681b06965ccb0999c6ae84082aecdef5af0dc5254b78c7784103fa93bd69716 | astrada/ocaml-extjs | ext_util_ComponentDragger.ml | class type t =
object('self)
inherit Ext_dd_DragTracker.t
method onDrag : Ext_EventObject.t Js.t -> unit Js.meth
method onEnd : Ext_EventObject.t Js.t -> unit Js.meth
method onStart : Ext_EventObject.t Js.t -> unit Js.meth
end
class type configs =
object('self)
inherit Ext_dd_DragTracker.configs
m... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_util_ComponentDragger.ml | ocaml | class type t =
object('self)
inherit Ext_dd_DragTracker.t
method onDrag : Ext_EventObject.t Js.t -> unit Js.meth
method onEnd : Ext_EventObject.t Js.t -> unit Js.meth
method onStart : Ext_EventObject.t Js.t -> unit Js.meth
end
class type configs =
object('self)
inherit Ext_dd_DragTracker.configs
m... | |
4a83bdbdbcb23c0bdf887fcb191da21f32df9b2fdb247dc8a1bd18a426cd48f2 | kmi/irs | see-events.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology see-events)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/see-events/see-events.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(in-ontology see-events)
|
0de14dda1d8f9aa4b02959d63c94d3fca7f093b5d2370dd5c883000fd9fe67b1 | polymeris/cljs-aws | efs.cljs | (ns cljs-aws.efs
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "EFS" "elasticfilesystem-2015-02-01.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/efs.cljs | clojure | (ns cljs-aws.efs
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "EFS" "elasticfilesystem-2015-02-01.min.json")
| |
fb81044f8d902e981fb0a3e4a419c620739e3df39aff942b1876f294e907c83b | ekmett/adjunctions | Adjunction.hs | # LANGUAGE Rank2Types
, MultiParamTypeClasses
, FunctionalDependencies
, TypeOperators
, UndecidableInstances #
, MultiParamTypeClasses
, FunctionalDependencies
, TypeOperators
, UndecidableInstances #-}
# LANGUAGE CPP #
#i... | null | https://raw.githubusercontent.com/ekmett/adjunctions/6ec0b919b58de36cafdce3bdd114c0fa1294897f/src/Data/Functor/Adjunction.hs | haskell | # OPTIONS_GHC -Wno-trustworthy-safe #
-----------------------------------------------------------------------------------------
|
License : BSD
Stability : experimental
-----------------------------------------------------------------------------------------
functions to be defined:
* 'unit' and 'counit'
... | # LANGUAGE Rank2Types
, MultiParamTypeClasses
, FunctionalDependencies
, TypeOperators
, UndecidableInstances #
, MultiParamTypeClasses
, FunctionalDependencies
, TypeOperators
, UndecidableInstances #-}
# LANGUAGE CPP #
#i... |
64e3dfcf613a015f4ab5ff2ee0126cc0c25e5101f15bc8042c8402c43dfa0126 | finnishtransportagency/harja | kulut_test.cljs | (ns harja.views.urakka.kulut-test
"Kulut näkymän testi"
(:require [cljs.test :as t :refer-macros [deftest is testing async]]
[harja.testutils.shared-testutils :as u]
[harja.tiedot.urakka.urakka :as tila]
[harja.views.urakka.kulut.kulut :refer [paivamaaran-valinta]]
[h... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/1c9ed494fe3e33b8bb919b59b4e2b336bad50cc0/test/cljs/harja/views/urakka/kulut_test.cljs | clojure | (ns harja.views.urakka.kulut-test
"Kulut näkymän testi"
(:require [cljs.test :as t :refer-macros [deftest is testing async]]
[harja.testutils.shared-testutils :as u]
[harja.tiedot.urakka.urakka :as tila]
[harja.views.urakka.kulut.kulut :refer [paivamaaran-valinta]]
[h... | |
ee55783e7ca46234485e7e9cdeca52a15435d2b8da8eeda07f1b5c8897777414 | digikar99/numericals | package.lisp | (cl:in-package :cl)
(uiop:define-package :dense-numericals-lite
(:documentation "Functionality in this package is available with pure lisp.")
(:use :dense-arrays-plus-lite)
(:reexport :dense-arrays-plus-lite)
(:export #:empty
#:empty-like)
(:shadow #:full
#:full-like
#:zeros
... | null | https://raw.githubusercontent.com/digikar99/numericals/69bfa08401c512772069d74ac30325d49f19b65c/dense-numericals-src/package.lisp | lisp | #:one-arg--
#:logtest
(defpackage :dense-numericals.linalg
(:export #:multidot
#:matrix-power
#:qr
#:eig
#:eigh
#:eigvals
#:eigvalsh
#:norm
#:cond
#:matrix-rank
#:solve
#:inv
... | (cl:in-package :cl)
(uiop:define-package :dense-numericals-lite
(:documentation "Functionality in this package is available with pure lisp.")
(:use :dense-arrays-plus-lite)
(:reexport :dense-arrays-plus-lite)
(:export #:empty
#:empty-like)
(:shadow #:full
#:full-like
#:zeros
... |
1556502e8e45ae00551a99cf5ef66805aea65fa8338a4f53de4bf61c5587ddf4 | luminus-framework/luminus-template | reagent.clj | (ns leiningen.new.reagent
(:require [leiningen.new.common :refer :all]))
(def reagent-assets
[["{{client-path}}/{{sanitized}}/core.cljs" "reagent/src/cljs/core.cljs"]
["{{client-path}}/{{sanitized}}/ajax.cljs" "reagent/src/cljs/ajax.cljs"]])
(defn reagent-dependencies [{:keys [features]}]
(into
[['reagen... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/e23c79868553ae18ff692e89f9491d3731cf1b06/src/leiningen/new/reagent.clj | clojure | (ns leiningen.new.reagent
(:require [leiningen.new.common :refer :all]))
(def reagent-assets
[["{{client-path}}/{{sanitized}}/core.cljs" "reagent/src/cljs/core.cljs"]
["{{client-path}}/{{sanitized}}/ajax.cljs" "reagent/src/cljs/ajax.cljs"]])
(defn reagent-dependencies [{:keys [features]}]
(into
[['reagen... | |
c8eefd8010a5614a20dc3f89305f29401fb474af3ed6eaf304f03fdf00fbcf03 | fukamachi/re21 | re21.lisp | (in-package :cl-user)
(defpackage re21-test
(:use :cl
:re21
:prove))
(in-package :re21-test)
;; NOTE: To run this test file, execute `(asdf:test-system :re21)' in your Lisp.
(plan nil)
;; blah blah blah.
(finalize)
| null | https://raw.githubusercontent.com/fukamachi/re21/f367818d4800588091dcd2c3ac5bf5c56c5df3bb/t/re21.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :re21)' in your Lisp.
blah blah blah. | (in-package :cl-user)
(defpackage re21-test
(:use :cl
:re21
:prove))
(in-package :re21-test)
(plan nil)
(finalize)
|
490258fc7e6c36c91bac8ecf336358598be3048080f9e6a0e0ca7ac0b851d7eb | neovimhaskell/nvim-hs | CommonSpec.hs | module RPC.CommonSpec where
import Neovim.RPC.Common
import Test.Hspec
spec :: Spec
spec = do
describe "Parsing of $NVIM environment variable" $ do
it "is a UnixSocket if it doesn't contain a colon" $ do
UnixSocket actual <- parseNvimEnvironmentVariable "/some/file"
actual `should... | null | https://raw.githubusercontent.com/neovimhaskell/nvim-hs/9d0a040c24f060da57e47e1b720b99ad32e6dfc7/tests/RPC/CommonSpec.hs | haskell | module RPC.CommonSpec where
import Neovim.RPC.Common
import Test.Hspec
spec :: Spec
spec = do
describe "Parsing of $NVIM environment variable" $ do
it "is a UnixSocket if it doesn't contain a colon" $ do
UnixSocket actual <- parseNvimEnvironmentVariable "/some/file"
actual `should... | |
96d940420df0d8c21c844b2874c364bb15360e15d5a40aae5bfa1d35a4e2a1c0 | OCamlPro/digodoc | module.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2020 OCamlPro SAS & Origin Labs SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/digodoc/c7694f2624a1b432caf16998f63b4da297539048/src/digodoc_lib/module.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2020 OCamlPro SAS & Origin Labs SAS
Public License version 2.1 , with the special exception on linking
open EzCompat
open Type
open Ez_file.FileString.OP
let long_name ~mdl_name ~mdl_opam =
mdl_opam.opam_name ^ "::" ^ mdl_name
let file mdl ~ext =
let _name_n_ext =... |
5c867262090d2293870d7b2787685b521f1edaa9a0e27f9fbaf61f549e059b2e | grin-compiler/ghc-wpc-sample-programs | Extensions.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
|
Module : Text . Pandoc . Extensions
Copyrig... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Extensions.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE OverloadedStrings #
| Individually selectable syntax extensions.
^ PHP markdown extra abbreviation definitions
^ Make all non-alphanumerics escapable
^ Make < and > escapable
... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
|
Module : Text . Pandoc . Extensions
Copyright : Copyright ( C ) 2012 - 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Data... |
24cb2c303863e04f8984a8e06f263f1dc946044eb1a47f754a90e9417333fd75 | adamdoupe/find_ear_rails | evals.ml | open Config
open Printf
open Dynamic
open Yaml
open Dyn_builder
module Domain = YString
module CoDomain = YString
let name = "eval"
let instrument_ast a = a
let watch_f meth =
{src_msg = `ID_MethodName meth;
dst_target = Cfg.Abbr.access_path ["DRuby";"Profile";"Eval"];
dst_msg = `ID_MethodName "record_eval... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/dyn/evals.ml | ocaml | * finds out which eval the given msg is referring to
keep following the rhs of the dot op
generates a new method call to an eval with a new block
handle nested dynamic features!
sets pos to actual pos
generic eval cannot take a block; just spit out the code by itself
replaces the eval with a conventional ev... | open Config
open Printf
open Dynamic
open Yaml
open Dyn_builder
module Domain = YString
module CoDomain = YString
let name = "eval"
let instrument_ast a = a
let watch_f meth =
{src_msg = `ID_MethodName meth;
dst_target = Cfg.Abbr.access_path ["DRuby";"Profile";"Eval"];
dst_msg = `ID_MethodName "record_eval... |
79ccaecd0be378bd4e6f834fa0189f198d179c78a85978a67b0716a001b87856 | solita/mnt-teet | account_commands.clj | (ns teet.account.account-commands
(:require [teet.db-api.core :refer [defcommand]]
[teet.meta.meta-model :as meta-model]
teet.user.user-tx))
(defcommand :account/update
{:doc "Update logged in users email or phone number"
:context {:keys [db user]}
:payload payload
:unauthenticated... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/src/clj/teet/account/account_commands.clj | clojure | (ns teet.account.account-commands
(:require [teet.db-api.core :refer [defcommand]]
[teet.meta.meta-model :as meta-model]
teet.user.user-tx))
(defcommand :account/update
{:doc "Update logged in users email or phone number"
:context {:keys [db user]}
:payload payload
:unauthenticated... | |
fb8633283784480e4a5da0b35260cb45278f2a3cd1c06296fc42f7454b949c16 | willprice/little-schemer | value.rkt | #lang racket/base
(require rackunit
"../value.rkt")
(test-case
"value"
(check-equal? (value 1) 1)
(check-equal? (value '#t) #t)
(check-equal? (value '#f) #f)
(check-equal? (value '(quote a)) 'a)
(check-equal? (value '(quote (1))) '(1))
(check-equal? (value '(cons 2 (quote (1)))) '(2 1))
(chec... | null | https://raw.githubusercontent.com/willprice/little-schemer/b2bd9ab7b1f1d43fe92415c6d41e18d3a2ba4677/tests/value.rkt | racket | #lang racket/base
(require rackunit
"../value.rkt")
(test-case
"value"
(check-equal? (value 1) 1)
(check-equal? (value '#t) #t)
(check-equal? (value '#f) #f)
(check-equal? (value '(quote a)) 'a)
(check-equal? (value '(quote (1))) '(1))
(check-equal? (value '(cons 2 (quote (1)))) '(2 1))
(chec... | |
6d79d5b03757c346dc1575a72cf41edb53d1565b8d39516bbbd9619b1df23dc2 | well-typed/large-records | Internal.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE TypeOperators #-}
-- | Definition of 'Rep' and functions that do not depend on ".Generic"
--
-- Defined as a separate module to avoid circular module dependencies.
module Data.Record.Generic.R... | null | https://raw.githubusercontent.com/well-typed/large-records/dd57e815c7e40cfab69e12094c135d760ea50c35/large-generics/src/Data/Record/Generic/Rep/Internal.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeOperators #
| Definition of 'Rep' and functions that do not depend on ".Generic"
Defined as a separate module to avoid circular module dependencies.
* Basic functions
* Conversion
* Auxiliary
-----------------------------------... | # LANGUAGE FlexibleInstances #
module Data.Record.Generic.Rep.Internal (
Rep(..)
, map'
, sequenceA
, unsafeFromList
, unsafeFromListAny
, collapse
, toListAny
, noInlineUnsafeCo
) where
import Prelude hiding (sequenceA)
import qualified Prelude
import Data.Coerce (coerce)
import Data.Foldable... |
d7590ff9f25ab8812746da87a778c9398bf93edcba7b5cdbb9d2d9cb992bd014 | pallet/learn-pallet | install_java.clj | (defsection install-java
:dependencies [[com.palletops/java-crate "0.8.0-beta.4"]])
(ns install-java
(:require [pallet.crate.java :as java]
[pallet.api :as api]))
(def my-group (api/group-spec "my-test"
:extends [*base-spec*
(java/server-sp... | null | https://raw.githubusercontent.com/pallet/learn-pallet/7cbd3b353e523dd079151a6c3d680f528efbc6e2/src/install_java.clj | clojure | (defsection install-java
:dependencies [[com.palletops/java-crate "0.8.0-beta.4"]])
(ns install-java
(:require [pallet.crate.java :as java]
[pallet.api :as api]))
(def my-group (api/group-spec "my-test"
:extends [*base-spec*
(java/server-sp... | |
49054dfd766a324f66b5c53ba7774ed54cd65434b33aa6bfdcaf5357023e5139 | bennn/dissertation | drum.rkt | #lang racket/base
(require (only-in "array-struct.rkt"
array-size
make-array
build-array
unsafe-vector->array)
(only-in "array-utils.rkt"
array-shape-size
check-array-shape)
(only-in "array-tra... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/synth/untyped/drum.rkt | racket | -- drum
Drum "samples" (Arrays of floats)
limited drum machine
drum patterns are simply lists with either O (bass drum), X (snare) or
#f (pause) | #lang racket/base
(require (only-in "array-struct.rkt"
array-size
make-array
build-array
unsafe-vector->array)
(only-in "array-utils.rkt"
array-shape-size
check-array-shape)
(only-in "array-tra... |
74a718231faaa04860f43486509ec2acd14efc1bbf30e68663e7715d37b79f3e | mejgun/haskell-tdlib | PollOption.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.PollOption where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
| Describes one answer option of a poll
PollOption
{ -- | True, if the option is being chosen by a pending setPollAnswer request
i... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/PollOption.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| True, if the option is being chosen by a pending setPollAnswer request
| True, if the option was chosen by the user
| Number of voters for this option, available only for closed or voted polls |
module TD.Data.PollOption where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
| Describes one answer option of a poll
PollOption
is_being_chosen :: Maybe Bool,
is_chosen :: Maybe Bool,
| The percentage of votes for this option ; 0 - 100
vote_per... |
d324e10344ef6250b68115fc6bc459b9dfe0620a21d6d82f18b22ce3f121a1a2 | FranklinChen/hugs98-plus-Sep2006 | Constants.hs | -- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Sound.OpenAL.Constants
Copyright : ( c ) 2005
-- License : BSD-style (see the file libraries/OpenAL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/OpenAL/Sound/OpenAL/Constants.hs | haskell | #hide
------------------------------------------------------------------------------
|
Module : Sound.OpenAL.Constants
License : BSD-style (see the file libraries/OpenAL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
This purely internal module defines all AL\/ALC cons... | Copyright : ( c ) 2005
figured out by configure . In contrast to OpenGL and GLUT , these constants
module Sound.OpenAL.Constants where
import Sound.OpenAL.Config (
ALboolean, ALint, ALenum, ALCboolean, ALCint, ALCenum )
#include "HsOpenALConfig.h"
al_FALSE, al_TRUE :: ALboolean
al_FALSE ... |
938d6f0891c915f612d82e9e1925f62d962a81c18fad6f29a6bff7c218e0a819 | skanev/playground | 11.scm | SICP exercise 2.11
;
In passing , also cryptically comments : " By testing the signs of the
endpoints of the intervals , it is possible to break - interval into nine
cases , only one of which requires more than two multiplications . " Rewrite
this procedure using 's suggestion .
; Let's have (a, b) x (c, ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/11.scm | scheme |
Let's have (a, b) x (c, d).
We know that a ≤ b and c ≤ d. Thus, we have the following cases:
+---+---+---+---+----------------------------+
| a | b | c | d | result |
+---+---+---+---+----------------------------+
+---+---+---+---+----------------------------+
+---+---+---+---+------------... | SICP exercise 2.11
In passing , also cryptically comments : " By testing the signs of the
endpoints of the intervals , it is possible to break - interval into nine
cases , only one of which requires more than two multiplications . " Rewrite
this procedure using 's suggestion .
| + | + | + | + | ( ac , b... |
9660d6f74510e47807fcc6a0038b05e49c719017ff7c170912610f54a19c3e2d | kbosompem/bb-excel | cli.clj | (ns bb-excel.cli
(:require [bb-excel.core :refer [get-sheets]]
[clojure.java.io :refer [make-parents]]
[clojure.tools.cli :refer [parse-opts]]
[clojure.string :refer [split join lower-case trim] :as str]
[clojure.pprint :refer [print-table]])
(:gen-class))... | null | https://raw.githubusercontent.com/kbosompem/bb-excel/5f691ebbf89b33ca97288e7b1093b015e6aa2bfe/src/bb_excel/cli.clj | clojure | (ns bb-excel.cli
(:require [bb-excel.core :refer [get-sheets]]
[clojure.java.io :refer [make-parents]]
[clojure.tools.cli :refer [parse-opts]]
[clojure.string :refer [split join lower-case trim] :as str]
[clojure.pprint :refer [print-table]])
(:gen-class))... | |
80208b83ac5fccec62ff7785f8fb9d7f10052dc2cb4e93e4a982ef9afddae857 | weavejester/compojure | middleware.clj | (ns compojure.middleware
"Optional middleware to enhance routing in Compojure."
(:require [compojure.core :refer [wrap-routes]]
[ring.util.response :as resp]))
(defn remove-trailing-slash
"Remove the trailing '/' from a URI string, if it exists."
[^String uri]
(if (.endsWith uri "/")
(.substr... | null | https://raw.githubusercontent.com/weavejester/compojure/bdf6c8cf630e160967a5e1e8cf8f60688e85c24f/src/compojure/middleware.clj | clojure | (ns compojure.middleware
"Optional middleware to enhance routing in Compojure."
(:require [compojure.core :refer [wrap-routes]]
[ring.util.response :as resp]))
(defn remove-trailing-slash
"Remove the trailing '/' from a URI string, if it exists."
[^String uri]
(if (.endsWith uri "/")
(.substr... | |
05baf9c233bf2fd8aeb64db36dab2dee9b2c769e5f7dc7a3bf6c8a9fcb7eeb75 | elastic/eui-cljs | screen_reader_only.cljs | (ns eui.screen-reader-only
(:require ["@elastic/eui/lib/components/accessibility/screen_reader_only/screen_reader_only.js" :as eui]))
(def EuiScreenReaderOnly eui/EuiScreenReaderOnly)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/screen_reader_only.cljs | clojure | (ns eui.screen-reader-only
(:require ["@elastic/eui/lib/components/accessibility/screen_reader_only/screen_reader_only.js" :as eui]))
(def EuiScreenReaderOnly eui/EuiScreenReaderOnly)
| |
2f285d25bb7dfbdecc746e36882cfa19f38fbb3a4f7f63e270f392a86865e0cc | jamesmartin/datomic-tutorial | project.clj | (defproject datomic-tutorial "0.1.0-SNAPSHOT"
:description "Clojure code for playing with the Datomic tutorial."
:url "-tutorial"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [
[org.clojure/clojure "1.6.0"]
[com.datomic/datomic-pro "0.9.5... | null | https://raw.githubusercontent.com/jamesmartin/datomic-tutorial/ca381b9be10e10df5a4c9417cacc512f086ff785/project.clj | clojure | (defproject datomic-tutorial "0.1.0-SNAPSHOT"
:description "Clojure code for playing with the Datomic tutorial."
:url "-tutorial"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [
[org.clojure/clojure "1.6.0"]
[com.datomic/datomic-pro "0.9.5... | |
10f48225081ae7f49451bd2ac28c0bca25fa9828269d564326ebb3aa64772568 | srid/revue | Markdown.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
module Backend.Markdown where
import Control.Foldl hi... | null | https://raw.githubusercontent.com/srid/revue/fefd551c10fa3ff4b91c8cbd4c7b2bbd737adb7b/backend/src/Backend/Markdown.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
NOTE: This is for future; not used yet.
text $ "TODO: Naked"
TODO: What to do with 'start'? | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
module Backend.Markdown where
import Control.Foldl hiding (mconcat)
import Control.Monad (forM_)
import Data.Ae... |
b57946211ffa60823b8fa04277528618ae829aa4ea2feaef822196ad5f12be84 | shayne-fletcher/zen | merge.ml | (**{b Merge sort}, an {i O(n log n)} comparison based sorting
algorithm *)
module type MERGESORT = sig
val take : int -> 'a list -> 'a list
* [ take n ] applied to a list [ xs ] , returns the prefix of [ xs ] of
length [ n ] or [ xs ] itself if [ n > List.length xs ] e.g. [ take 2
[ 1 ; 2 ; 3 ] ] { ... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/merge/merge.ml | ocaml | *{b Merge sort}, an {i O(n log n)} comparison based sorting
algorithm
module type MERGESORT
Test | module type MERGESORT = sig
val take : int -> 'a list -> 'a list
* [ take n ] applied to a list [ xs ] , returns the prefix of [ xs ] of
length [ n ] or [ xs ] itself if [ n > List.length xs ] e.g. [ take 2
[ 1 ; 2 ; 3 ] ] { i = } [ [ 1 ; 2 ] ]
length [n] or [xs] itself if [n > List.length xs] e.g... |
9916a8b87e2822ee71895066f052f481f646fedbd7d7e0daf891a869a626a86d | ygrek/ocaml-extlib | runner.ml | (** test runner *)
let () =
let filter =
match Array.to_list Sys.argv with
| [] | [_] -> None
| _::l -> Some (List.map ExtString.String.lowercase l)
in
let tests = [
Test_BitSet.register;
Test_Dllist.register;
Test_DynArray.register;
Test_ExtArray.register;
Test_ExtHashtbl.registe... | null | https://raw.githubusercontent.com/ygrek/ocaml-extlib/cfb2d9632d117020f9c9bfdabea679ae9222a620/test/runner.ml | ocaml | * test runner |
let () =
let filter =
match Array.to_list Sys.argv with
| [] | [_] -> None
| _::l -> Some (List.map ExtString.String.lowercase l)
in
let tests = [
Test_BitSet.register;
Test_Dllist.register;
Test_DynArray.register;
Test_ExtArray.register;
Test_ExtHashtbl.register;
Test_ExtList... |
b79164bdfb5b8c95fd11b6ec8b415731f4a931f8bd1c2f876bd4b6758e9bacf4 | aarkerio/ZentaurLMS | process_json.clj | (ns zentaur.libs.models.process-json
(:require [cheshire.core :as ches]
[clojure.tools.logging :as log]
[ring.util.codec :as c]
[zentaur.db.core :as db]
[zentaur.libs.models.shared :as shar]))
(defn- build-test [{:keys [title description instructions level lang tags or... | null | https://raw.githubusercontent.com/aarkerio/ZentaurLMS/adb43fb879b88d6a35f7f556cb225f7930d524f9/src/clj/zentaur/libs/models/process_json.clj | clojure | (ns zentaur.libs.models.process-json
(:require [cheshire.core :as ches]
[clojure.tools.logging :as log]
[ring.util.codec :as c]
[zentaur.db.core :as db]
[zentaur.libs.models.shared :as shar]))
(defn- build-test [{:keys [title description instructions level lang tags or... | |
4229dd839bea556cad87c2315aef0c7461d058cd5738d151bcbc54700b557b70 | zwizwa/staapl | shift.rkt | #lang staapl/pic18
\ some shift words
provide-all
: >>3 #xF8 and
: rot>>3 rot>>
: rot>>2 rot>> rot>> ;
: >>2 #xFC and rot>>2 ;
: >>4 rot>>4 #xF and ;
| null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/shift.rkt | racket | #lang staapl/pic18
\ some shift words
provide-all
: >>3 #xF8 and
: rot>>3 rot>>
| |
00a64546164606a38c91e93b7d1fd20708206a983a119fe4afa0a790181d4640 | wilkerlucio/pathom | js_promises.cljs | (ns com.wsscode.pathom.book.async.js-promises
(:require [com.wsscode.common.async-cljs :refer [go-catch <!p]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[goog.object :as gobj]))
(pc/defresolver random-dog [env {:keys []}]
{::pc/output [:dog.ceo/random-do... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/book/async/js_promises.cljs | clojure | (ns com.wsscode.pathom.book.async.js-promises
(:require [com.wsscode.common.async-cljs :refer [go-catch <!p]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[goog.object :as gobj]))
(pc/defresolver random-dog [env {:keys []}]
{::pc/output [:dog.ceo/random-do... | |
d1fe2a80ebffa3bab4fafe81a8b043b8ba9de06bd870b5c94ccd692055431ead | zoomhub/zoomhub | Worker.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module ZoomHub.Worker
( processExistingContent,
processExpiredActiveContent,
)
where
import Control.Concurrent (threadDelay)
import Control.Exception.Enclosed (catchAny)
import Contro... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/e4b0a827af2751ea7f2d4e889e9bd1454db5c38f/src/ZoomHub/Worker.hs | haskell | # LANGUAGE OverloadedStrings #
Constants
Public API
("sleepDuration" .= sleepDuration) : extraLogMeta | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module ZoomHub.Worker
( processExistingContent,
processExpiredActiveContent,
)
where
import Control.Concurrent (threadDelay)
import Control.Exception.Enclosed (catchAny)
import Control.Lens ((&), (.~), (^.))
import Con... |
6624aaaf4ae8382aa41f76562709eaf1bdc02e55423add82b94c587a8f9be737 | larcenists/larceny | esc4.scm | (text
(begin (call $eip)
(call $win)
(call $lose))
(seq (jmp $eip)
(jmp $win)
(jmp $lose)
(nop))
(seq (jmp short $eip)
(jmp short $win)
(jmp short $lose)
(nop))
(alt (jmp $win)
(jmp $lose)
(nop)
(nop)))
00000000 E800000000 call 0x5
00000005 E8... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/esc4.scm | scheme | (text
(begin (call $eip)
(call $win)
(call $lose))
(seq (jmp $eip)
(jmp $win)
(jmp $lose)
(nop))
(seq (jmp short $eip)
(jmp short $win)
(jmp short $lose)
(nop))
(alt (jmp $win)
(jmp $lose)
(nop)
(nop)))
00000000 E800000000 call 0x5
00000005 E8... | |
518681961b47a4d86d6d18701719eae5f862717841bfcc0831751960e0d5c222 | NelosG/fp-tests | TList.hs | # LANGUAGE StandaloneDeriving #
module Test.TList
( propList
) where
import HW2.T1 (List (..), mapList)
import HW2.T2 (distList, wrapList)
import Hedgehog (Gen)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Internal.Range as Range
import Test.Common (allProps, genString)
import Test.Tasty (TestTr... | null | https://raw.githubusercontent.com/NelosG/fp-tests/7e2af5c3c3279c2045662faaff8e5f895af6af6a/hw2/test/T2/Test/TList.hs | haskell | # LANGUAGE StandaloneDeriving #
module Test.TList
( propList
) where
import HW2.T1 (List (..), mapList)
import HW2.T2 (distList, wrapList)
import Hedgehog (Gen)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Internal.Range as Range
import Test.Common (allProps, genString)
import Test.Tasty (TestTr... | |
46b00e2e16c2715b4d61d7fdc954314987df7a45f10bc9971bf9eab289f432d4 | Apress/practical-common-lisp-11 | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.19 2004/04/22 18:50:16 edi Exp $
;;; globally declared special variables
Copyright ( c ) 2002 - 2004 , Dr. . All rights reserved .
;;; Redistribution and use in ... | null | https://raw.githubusercontent.com/Apress/practical-common-lisp-11/3e36d8b02b7f0731ad36c31cbbf01f9de0acf003/practicals/libraries/cl-ppcre-1.2.3/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
globally declared special variables
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
n... | $ Header : /usr / local / cvsrep / cl - ppcre / specials.lisp , v 1.19 2004/04/22 18:50:16 edi Exp $
Copyright ( c ) 2002 - 2004 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-packa... |
56113654ad52ea54750c780e2982a29beb62795165e979114d8205cdc973f641 | larcenists/larceny | label2.scm | (text
(iter (begin
(nop)
(label foo (nop))
(nop)))
(jmp foo))
00000000 90 nop
; foo:
00000001 90 nop
00000002 90 nop
00000003 EBFB jmp short 0x0
00000005 E9F7FFFFFF jmp 0x1 ; foo
| null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/label2.scm | scheme | foo:
foo | (text
(iter (begin
(nop)
(label foo (nop))
(nop)))
(jmp foo))
00000000 90 nop
00000001 90 nop
00000002 90 nop
00000003 EBFB jmp short 0x0
|
33485dc62b7be53476331f5607f08904fa7072288c821170c0799f40cbd9e438 | Frama-C/Frama-C-snapshot | builtins_split.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/domains/cvalue/builtins_split.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
2b1c60ee9fd304437d205fa5cb9b22d0fe08acbee1252aa7b7fdb306436af4c6 | NoRedInk/haskell-libraries | Internal.hs | module Test.Reporter.Internal where
import qualified Data.ByteString as BS
import qualified Data.Text.Encoding as TE
import qualified GHC.Stack as Stack
import qualified List
import NriPrelude
import qualified System.Directory
import System.FilePath ((</>))
import qualified Test.Internal as Internal
import qualified T... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/aed21b6003f5415ca80b86ee32d552534e1ef5d2/nri-prelude/src/Test/Reporter/Internal.hs | haskell | splitting newlines | module Test.Reporter.Internal where
import qualified Data.ByteString as BS
import qualified Data.Text.Encoding as TE
import qualified GHC.Stack as Stack
import qualified List
import NriPrelude
import qualified System.Directory
import System.FilePath ((</>))
import qualified Test.Internal as Internal
import qualified T... |
b907c1e7cba370bd62cc6c0704de9876bc25121ebdb8a95f4bbc2da69dd92634 | ocaml-ppx/ppx_tools_versioned | ast_convenience_409.ml | open Migrate_parsetree.Ast_409
(* This file is part of the ppx_tools package. It is released *)
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
open Parsetree
open Asttypes
open Location
open Ast_helper
module Label = struct
type t = A... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_convenience_409.ml | ocaml | This file is part of the ppx_tools package. It is released | open Migrate_parsetree.Ast_409
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
open Parsetree
open Asttypes
open Location
open Ast_helper
module Label = struct
type t = Asttypes.arg_label
type desc = Asttypes.arg_label =
Nolabel
... |
300cb211e932a0bf34da4b3b53b54c2510187047ac09a913a3fa7f537f38f959 | philipcristiano/etsdb | etsdb_numbers_test.erl | -module(etsdb_numbers_test).
-include_lib("eunit/include/eunit.hrl").
to_float_test() ->
?assertEqual(4.0, etsdb_numbers:to_float("4.0")),
?assertEqual(4.0, etsdb_numbers:to_float(<<"4.0">>)),
?assertEqual(4.0, etsdb_numbers:to_float("4")),
?assertError(badarg, etsdb_numbers:to_float("X")).
| null | https://raw.githubusercontent.com/philipcristiano/etsdb/f1c0d1d8baff8666d55a1f30e77a40652d173826/test/etsdb_numbers_test.erl | erlang | -module(etsdb_numbers_test).
-include_lib("eunit/include/eunit.hrl").
to_float_test() ->
?assertEqual(4.0, etsdb_numbers:to_float("4.0")),
?assertEqual(4.0, etsdb_numbers:to_float(<<"4.0">>)),
?assertEqual(4.0, etsdb_numbers:to_float("4")),
?assertError(badarg, etsdb_numbers:to_float("X")).
| |
3bb2d0e14be608df865df52aa74ce87fbd6c6ebec118f0ad9d47479ea96ef05e | jaseemabid/Olifant | Olifant.hs | module Olifant where
| null | https://raw.githubusercontent.com/jaseemabid/Olifant/2ebcef67c558e866f7a00e28526a1d51ab3c606c/src/Olifant.hs | haskell | module Olifant where
| |
b87f056fb197d3db9653560ce1480364123d9a7f60d10312ecc8262a93571680 | hpyhacking/openpoker | stop.erl | -module(stop).
-behaviour(op_exch_mod).
-export([start/2, dispatch/2, stop/2]).
-include("openpoker.hrl").
start([], Ctx) ->
erlang:start_timer(10 * 1000, self(), ?MODULE),
{next, stop, Ctx}.
dispatch(_R, _Ctx) ->
ok.
stop({timeout, _, ?MODULE}, Ctx = #texas{}) ->
{stop, Ctx};
stop(_, Ctx) ->
{skip, Ctx}... | null | https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/src/mods/stop.erl | erlang | -module(stop).
-behaviour(op_exch_mod).
-export([start/2, dispatch/2, stop/2]).
-include("openpoker.hrl").
start([], Ctx) ->
erlang:start_timer(10 * 1000, self(), ?MODULE),
{next, stop, Ctx}.
dispatch(_R, _Ctx) ->
ok.
stop({timeout, _, ?MODULE}, Ctx = #texas{}) ->
{stop, Ctx};
stop(_, Ctx) ->
{skip, Ctx}... | |
dc8f663ebf67e64387284582deff0c6cc79f9e950f6a3a96996bce4021411d0c | Simre1/haskell-game | MyWindow.hs | module MyWindow where
import Graphics.GPipe.Context.GLFW (Handle)
import Window.GPipe (WindowIO, WindowAction, RGBAFloat)
type MyWindow = WindowIO Handle RGBAFloat ()
type MyWindowAction a = WindowAction Handle RGBAFloat () a
| null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/app/MyWindow.hs | haskell | module MyWindow where
import Graphics.GPipe.Context.GLFW (Handle)
import Window.GPipe (WindowIO, WindowAction, RGBAFloat)
type MyWindow = WindowIO Handle RGBAFloat ()
type MyWindowAction a = WindowAction Handle RGBAFloat () a
| |
c7f7b512ada5786836003e5ebbb6de58f51108bca3f799cff674390df39e7eb5 | lemmaandrew/CodingBatHaskell | lastDigit.hs | From
Given two non - negative int values , return true if they have the same last digit ,
such as with 27 and 57 . Note that the % \"mod\ " operator computes remainders , so 17 %
10 is 7 .
Given two non-negative int values, return true if they have the same last digit,
such as with 27 and 57. Note that the ... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Warmup-1/lastDigit.hs | haskell | From
Given two non - negative int values , return true if they have the same last digit ,
such as with 27 and 57 . Note that the % \"mod\ " operator computes remainders , so 17 %
10 is 7 .
Given two non-negative int values, return true if they have the same last digit,
such as with 27 and 57. Note that the ... | |
e3ea85a2764d670e52ad077e0b824c891368743dce6a0fae16fe1f513655a52c | brendanhay/amazonka | FilterBehavior.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wafv2/gen/Amazonka/WAFV2/Types/FilterBehavior.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WAFV2.Types.FilterBehavior
Stability : auto-generated
# COMPLETE
FilterBehavior_DROP,
FilterBehavior_KEEP,
FilterBehavior'
# | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Copyright : (... |
b61231b1362026b1b115a3ffe9d00b1e8ba5f8b0529e03047a3921bf720c1eae | FreeProving/free-compiler | TypeTests.hs | -- | This module contains tests for "FreeC.Backend.Coq.Converter.Type".
module FreeC.Backend.Coq.Converter.TypeTests ( testConvertType ) where
import Test.Hspec
import FreeC.Backend.Coq.Converter.Type
import FreeC.Backend.Coq.Pretty ()
import FreeC.Monad.Class.Testable
... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/Backend/Coq/Converter/TypeTests.hs | haskell | | This module contains tests for "FreeC.Backend.Coq.Converter.Type".
-----------------------------------------------------------------------------
Expectation Setters --
-----------------------------------------------------------------------------
'convertType'... | module FreeC.Backend.Coq.Converter.TypeTests ( testConvertType ) where
import Test.Hspec
import FreeC.Backend.Coq.Converter.Type
import FreeC.Backend.Coq.Pretty ()
import FreeC.Monad.Class.Testable
import FreeC.Monad.Converter
import FreeC.Test.Envir... |
ed3709ccc393ee24ce8c301874fc3c7c7695e77811a95fad14883191e637d36f | TheLortex/mirage-monorepo | cstruct.ml |
* Copyright ( c ) 2012 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-cstruct/lib/cstruct.ml | ocaml | for thread safety.
The following call is safe, since b is not visible elsewhere.
Note that this is only safe as long as all [t]s are coherent.
* [sum_lengths ~caller acc l] is [acc] plus the sum of the lengths
of the elements of [l]. Raises [Invalid_argument caller] if
arithmetic overflows.
The followi... |
* Copyright ( c ) 2012 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... |
f29357f155eda444dc44a31653b6f6fbd228c54b24a31c34a2f3f7bc94e0e4a9 | sheyll/b9-vm-image-builder | B9Error.hs | | Error handling in B9 via extensible effects .
B9 wraps errors in ` SomeException ` .
--
@since 0.5.64
module B9.B9Error
( throwSomeException,
throwSomeException_,
throwB9Error,
throwB9Error_,
errorOnException,
ExcB9,
WithIoExceptions,
runExcB9,
B9Error (MkB9Error),
fromB9Er... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/B9Error.hs | haskell |
| Constraint alias for the exception effect that allows to
@since 1.0.0
some exceptional event.
| Catch exceptions.
| Catch exceptions and return them via 'Either'.
| Always execute an action and rethrow any exceptions caught.
@since 1.0.0 | | Error handling in B9 via extensible effects .
B9 wraps errors in ` SomeException ` .
@since 0.5.64
module B9.B9Error
( throwSomeException,
throwSomeException_,
throwB9Error,
throwB9Error_,
errorOnException,
ExcB9,
WithIoExceptions,
runExcB9,
B9Error (MkB9Error),
fromB9Error... |
f7336f97b07f97bb6fe196e15f28a2f6631af051e31295506d787b357baf46bb | ogri-la/strongbox | core.clj | (ns strongbox.core
(:require
[clojure.set :refer [rename-keys]]
[clojure.string :refer [lower-case starts-with? ends-with? trim]]
[taoensso.timbre :as timbre :refer [debug info warn error report spy]]
[clojure.spec.alpha :as s]
[orchestra.core :refer [defn-spec]]
[me.raynes.fs :as fs]
[trptcolin.... | null | https://raw.githubusercontent.com/ogri-la/strongbox/11cf358df13e42f5295e5f58c5807cf79a774b99/src/strongbox/core.clj | clojure | strict
XDG_DATA_HOME=/foo/bar => /foo/bar/strongbox
XDG_CONFIG_HOME=/baz/bup => /baz/bup/strongbox
- -spec/basedir-spec-latest.html
ensure path ends with `-file` or `-dir` or `-url`.
see `init-dirs`.
/home/$you/.local/share/strongbox/logs
/home/$you/.local/share/strongbox/cache
/home/$you/.local/share/strongbo... | (ns strongbox.core
(:require
[clojure.set :refer [rename-keys]]
[clojure.string :refer [lower-case starts-with? ends-with? trim]]
[taoensso.timbre :as timbre :refer [debug info warn error report spy]]
[clojure.spec.alpha :as s]
[orchestra.core :refer [defn-spec]]
[me.raynes.fs :as fs]
[trptcolin.... |
4857e982da495f47e38a4e4792026e504c3ad4474ba98a8056bc76c98ccf3a2c | ghcjs/jsaddle-dom | SVGSVGElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGSVGElement
(suspendRedraw, suspendRedraw_, unsuspendRedraw,
unsuspendRedrawAll, forceRedraw, pauseAnimat... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGSVGElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGSVGElement.unsuspendRedraw Mozilla SVGSVGElement.unsuspendRedraw documentation>
| <-US/docs/Web/API/SVGSVGElement.unsuspendRedrawAll Mozilla SVGSVGElement.unsuspendRedrawAll documentation>
| <-US/doc... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGSVGElement
(suspendRedraw, suspendRedraw_, unsuspendRedraw,
unsuspendRedrawAll, forceRedraw, pauseAnimations,
unpauseAnimations, animationsPaused, animationsPaused_,
getCurrentTime, getCu... |
c335e26cdae1e3afabfa2c35aac30af7d9457f1729b718e125636c75af3fc009 | axch/pattern-case | load.scm | ;;; This file is part of Pattern Case, a Schemely pattern matching
case facility in MIT Scheme .
Copyright 2011 .
;;;
;;; Pattern Case is free software; you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation ; either versi... | null | https://raw.githubusercontent.com/axch/pattern-case/95b858442a2e45d2bec915665979659a5e38e1d3/load.scm | scheme | This file is part of Pattern Case, a Schemely pattern matching
Pattern Case is free software; you can redistribute it and/or
either version 3 of
Pattern Case 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 PARTIC... | case facility in MIT Scheme .
Copyright 2011 .
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You should have received a copy of the GNU Affero General Public
Loading Pattern Case
(define (self-relatively thunk)
(let ((place (... |
6fa3509d7de9d29517dbc11abb3f3a6f04140cfcd7b4602097b1199b01614ce0 | rufoa/named-re | string.clj | (ns named-re.string
(:refer-clojure :exclude [replace])
(:require [named-re.re :only [re-matcher]])
(:import [java.util.regex Pattern Matcher]))
(defn- replace-by
[^CharSequence s re f]
(let [m (clojure.core/re-matcher re s)]
(let [buffer (StringBuffer. (.length s))]
(loop []
(if (.find m)
... | null | https://raw.githubusercontent.com/rufoa/named-re/382bcea3d3815155dd7a42798209a2f1e2f33bb8/src/named_re/string.clj | clojure | (ns named-re.string
(:refer-clojure :exclude [replace])
(:require [named-re.re :only [re-matcher]])
(:import [java.util.regex Pattern Matcher]))
(defn- replace-by
[^CharSequence s re f]
(let [m (clojure.core/re-matcher re s)]
(let [buffer (StringBuffer. (.length s))]
(loop []
(if (.find m)
... | |
9962a8a744cf12483f9c1d0aa275c6de9157f0a64f448dfaed9a73c761990544 | GaloisInc/daedalus | InsertCopy.hs | -- | Assumes borrow analysis has been done
# Language BlockArguments , OverloadedStrings , RecordWildCards #
module Daedalus.VM.InsertCopy (addCopyIs) where
import Control.Monad(zipWithM,ap,liftM)
import Data.Map(Map)
import qualified Data.Map as Map
import Data.Set(Set)
import qualified Data.Set as Set
import Data.Li... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/7dcbf6a240dedd8473bb18c47dd7e1ed2268afeb/daedalus-vm/src/Daedalus/VM/InsertCopy.hs | haskell | | Assumes borrow analysis has been done
------------------------------------------------------------------------------
- x is borrowed
>
- x is borrowed
>
Optimization 1: Make a copy, and immediately dallocate source
Check for Optimization 2 `x = copy y` can be eliminated if `x` and `y`
will never exist at the sa... | # Language BlockArguments , OverloadedStrings , RecordWildCards #
module Daedalus.VM.InsertCopy (addCopyIs) where
import Control.Monad(zipWithM,ap,liftM)
import Data.Map(Map)
import qualified Data.Map as Map
import Data.Set(Set)
import qualified Data.Set as Set
import Data.List(mapAccumL)
import Daedalus.PP(pp)
impor... |
356f3641fc05beaa61935f918d2beba1007e142f288273c1e11ca638d4c1bdff | lispbuilder/lispbuilder | opengl32.lisp |
(in-package #:lispbuilder-openrm-cffi)
(cffi:defcfun ("wglCreateContext" #.(openrm-lispify "wglCreateContext" 'function)) :pointer
(hdc :pointer))
(cffi:defcfun ("wglDeleteContext" #.(openrm-lispify "wglDeleteContext" 'function)) :int
(hglrc :pointer))
(cffi:defcfun ("wglGetCurrentDC" #.(openrm-lispify "wglGetC... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/native/opengl32.lisp | lisp | BOOL wglMakeCurrent(
); |
(in-package #:lispbuilder-openrm-cffi)
(cffi:defcfun ("wglCreateContext" #.(openrm-lispify "wglCreateContext" 'function)) :pointer
(hdc :pointer))
(cffi:defcfun ("wglDeleteContext" #.(openrm-lispify "wglDeleteContext" 'function)) :int
(hglrc :pointer))
(cffi:defcfun ("wglGetCurrentDC" #.(openrm-lispify "wglGetC... |
ff02bc28c2cb521426e16a4e7ee1e5075e0c035a33e34469623a81fc4373ed44 | meta-ex/ignite | dub.clj | (ns meta-ex.dub
(:use [overtone.live]
[meta-ex.kit.mixer]
[meta-ex.synths.synths])
(:require [meta-ex.kit.monome-sequencer :as ms]
[meta-ex.kit.timing :as tim]
[meta-ex.kit.sequencer :as seq]))
(defonce dub-g (group))
;;(stop)
;;(ms/stop-sequencer sequencer)
;;(kill dub-g)
... | null | https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/dub.clj | clojure | (stop)
(ms/stop-sequencer sequencer)
(kill dub-g)
special flavours
hi manster
sweep manster
lo manster
decimate
crunch
get the dubstep bass involved
(kill dub-g)
go crazy - especially with the deci-man
modify saw params on the fly too... | (ns meta-ex.dub
(:use [overtone.live]
[meta-ex.kit.mixer]
[meta-ex.synths.synths])
(:require [meta-ex.kit.monome-sequencer :as ms]
[meta-ex.kit.timing :as tim]
[meta-ex.kit.sequencer :as seq]))
(defonce dub-g (group))
(defsynth dubstep [note 40 wobble 32 hi-man 0 lo-man 0 s... |
2b56a076f2a502d028fe0c1136d4d337c21460bb0bef3e6a20c6118a8415ee0d | JoelSanchez/ventas | country.clj | (ns ventas.entities.country
(:require
[clojure.spec.alpha :as spec]
[ventas.database.entity :as entity]
[ventas.entities.i18n :as entities.i18n]))
(spec/def :schema.type/country.group
(spec/keys :req [:country.group/name]))
(entity/register-type!
:country.group
{:migrations
[[:base [{:db/ident :count... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/entities/country.clj | clojure | (ns ventas.entities.country
(:require
[clojure.spec.alpha :as spec]
[ventas.database.entity :as entity]
[ventas.entities.i18n :as entities.i18n]))
(spec/def :schema.type/country.group
(spec/keys :req [:country.group/name]))
(entity/register-type!
:country.group
{:migrations
[[:base [{:db/ident :count... | |
9cf820da8cdc1be4a19fe0ba3f0108baac892193a179049c667a4eb24f26cb41 | iij/lmq | lmq_queue.erl | -module(lmq_queue).
-behaviour(gen_server).
-export([start/1, start/2, start_link/1, start_link/2, stop/1, notify/1,
push/2, pull/1, pull/2, pull_async/1, pull_async/2, pull_cancel/2,
done/2, retain/2, release/2, put_back/2, props/2, get_properties/1,
reload_properties/1]).
-export([init/1, handle_call/3, h... | null | https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/src/lmq_queue.erl | erlang | ==================================================================
gen_server callbacks
==================================================================
this is necessary when a queue restarted by supervisor
==================================================================
Private functions
==================... | -module(lmq_queue).
-behaviour(gen_server).
-export([start/1, start/2, start_link/1, start_link/2, stop/1, notify/1,
push/2, pull/1, pull/2, pull_async/1, pull_async/2, pull_cancel/2,
done/2, retain/2, release/2, put_back/2, props/2, get_properties/1,
reload_properties/1]).
-export([init/1, handle_call/3, h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.