_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 |
|---|---|---|---|---|---|---|---|---|
edeffc98c25bf3ae60b9ff0b08077927b4798feeefb2c1ff1532b05d4fed627d | fossas/fossa-cli | PbxprojSpec.hs | module Swift.Xcode.PbxprojSpec (
spec,
) where
import Data.Map.Strict qualified as Map
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Text.IO qualified as TIO
import DepTypes (DepType (GitType, SwiftType), Dependency (..), VerConstraint (CEq))
import GraphUtil (expectDeps, expectDirect, expectEdge... | null | https://raw.githubusercontent.com/fossas/fossa-cli/efc29b4f9c874e338f0b5a7d1c5b13cb9543156f/test/Swift/Xcode/PbxprojSpec.hs | haskell | Setup
Setup
Setup
Act | module Swift.Xcode.PbxprojSpec (
spec,
) where
import Data.Map.Strict qualified as Map
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Text.IO qualified as TIO
import DepTypes (DepType (GitType, SwiftType), Dependency (..), VerConstraint (CEq))
import GraphUtil (expectDeps, expectDirect, expectEdge... |
424bad14eac0b31c10c5ee508fe89c7a844c849446016e2118253bbe670a0b5c | ocaml/oasis-db | test.ml |
IFDEF HAS_GETTEXT THEN
module Gettext =
Gettext.Program
(struct
let textdomain = "oasis"
let codeset = None
let dir = None
let dependencies = Gettext.init @ OASISGettext.init
end)
(GettextStub.Native)
ELSE
module Gettext =
struct
let init = [], ""
end
ENDIF... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/test/test.ml | ocaml |
IFDEF HAS_GETTEXT THEN
module Gettext =
Gettext.Program
(struct
let textdomain = "oasis"
let codeset = None
let dir = None
let dependencies = Gettext.init @ OASISGettext.init
end)
(GettextStub.Native)
ELSE
module Gettext =
struct
let init = [], ""
end
ENDIF... | |
84fe355037bd928b7e4c365b5970cd0dd2eb3c31c1fca9e0f87c9e3d4bca2261 | LeastAuthority/haskell-spake2 | Groups.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
module Groups (tests) where
import Protolude hiding (group)
import Crypto.Error (CryptoFailable(..))
import Test.QuickCheck (Gen, (===), arbitrary, forAll, property)
import Test.Tasty (TestTree)
import Test.Tasty.Hspec (testSpec)
import Test.Hspec (Spec, descri... | null | https://raw.githubusercontent.com/LeastAuthority/haskell-spake2/c191b9b8bcc38e2f6f8b3acb054418b8e363918e/tests/Groups.hs | haskell | Doesn't roundtrip per se, because negative integers (for example) get
turned into scalars within the subgroup range, losing the original
information.
| Generate pairs of a thing.
| Generate triples of a thing. | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
module Groups (tests) where
import Protolude hiding (group)
import Crypto.Error (CryptoFailable(..))
import Test.QuickCheck (Gen, (===), arbitrary, forAll, property)
import Test.Tasty (TestTree)
import Test.Tasty.Hspec (testSpec)
import Test.Hspec (Spec, descri... |
508c3c970432fbe1a4fd73482af6cd27e9795117d85fbe0d489f310cf8fc643e | mark-gerarts/nature-of-code | sketch.lisp | (defpackage :nature-of-code.forces.exercise-7
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :cl-bodge :vector-length :normalize))
(in-package :nature-of-code.forces.exercise-7)
(defvar *width* 600)
(defvar *height* 400)
(defvar *black* (vec4 0 0 0 1))
(defvar *gray* (vec4 0.5 0.5 0.5 0.4))
... | null | https://raw.githubusercontent.com/mark-gerarts/nature-of-code/4f8612e18a2a62012e44f08a8e0a4f8aec21a1ec/02.%20Forces/Exercise%202.7%20-%20Multiple%20attractors/sketch.lisp | lisp | Make the radius dependent on the mass of the mover.
Invisible
Constrain the distance to prevent large values when the mover gets
really close.
F = G (m1 * m2) / r^2 | (defpackage :nature-of-code.forces.exercise-7
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :cl-bodge :vector-length :normalize))
(in-package :nature-of-code.forces.exercise-7)
(defvar *width* 600)
(defvar *height* 400)
(defvar *black* (vec4 0 0 0 1))
(defvar *gray* (vec4 0.5 0.5 0.5 0.4))
... |
3a0f160064dd0d27a87c5425cb4de80200888f0689561c58d1f47c4a32d57b5e | cac-t-u-s/om-sharp | sound-pack.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/8a05ac060e2cf62d3b8d6846fb4e464f754771a6/src/packages/sound/sound-pack.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(omNG-make-package
"Audio"
:container-pack *om-package-tree*
:doc "Sound/DSP objects and support"
:classes '(sound)
:functions '(sound-dur sound-dur-ms sound-samples save-sound)
:subpackages (list (omNG-make-package
"Processing"
:fun... |
60c5b1e7232f976921c007a54d1333d427bd62f6cda7efbbf53b6236eef214cf | Shinmera/vpetjam | keymap.lisp | (trigger toggle-fullscreen
(key :one-of (:f11)))
(trigger toggle-menu
(key :one-of (:tab))
(button :one-of (:home :start)))
(trigger screenshot
(key :one-of (:print-screen)))
(trigger previous
(key :one-of (:left :up :w :a))
(button :one-of (:dpad-l :dpad-u))
... | null | https://raw.githubusercontent.com/Shinmera/vpetjam/6117fc2882d1ce1d7f221f67f500490e2d9058fd/keymap.lisp | lisp | (trigger toggle-fullscreen
(key :one-of (:f11)))
(trigger toggle-menu
(key :one-of (:tab))
(button :one-of (:home :start)))
(trigger screenshot
(key :one-of (:print-screen)))
(trigger previous
(key :one-of (:left :up :w :a))
(button :one-of (:dpad-l :dpad-u))
... | |
8cdd5f7f30c20006b3eec72b7a66316b80ad0364ef158e33a0fa9ef38a1288b6 | serokell/o-clock | Units.hs | SPDX - FileCopyrightText : 2019 >
--
SPDX - License - Identifier : MPL-2.0
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGene... | null | https://raw.githubusercontent.com/serokell/o-clock/665459fce96231c3f25a1bc3dd67b595069b6f47/src/Time/Units.hs | haskell |
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExplicitForAll #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
| This module contains time unit data ... | SPDX - FileCopyrightText : 2019 >
SPDX - License - Identifier : MPL-2.0
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE NoStarIsType ... |
a4816f8601f2f2253ab8eefd56549e58e29b36aa20846397629700797f474616 | jimcrayne/jhc | DocLike.hs | module Util.DocLike(module Util.DocLike, module Data.Monoid) where
simplified from Doc . DocLike
import Control.Applicative
import Data.Monoid(Monoid(..),(<>))
import Data.Traversable as T
import qualified Text.PrettyPrint.HughesPJ as P
import qualified Text.PrettyPrint.Leijen as L
infixr 5 < $ > -- , < //>,<$>,<$... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/Util/DocLike.hs | haskell | , < //>,<$>,<$$ >
we expect a monoid instance with <>
----------------------
Basic building blocks
----------------------
---------------------------------------------------------
punctuate p [d1,d2,...,dn] => [d1 <> p,d2 <> p, ... ,dn]
---------------------------------------------------------
-------------------
... | module Util.DocLike(module Util.DocLike, module Data.Monoid) where
simplified from Doc . DocLike
import Control.Applicative
import Data.Monoid(Monoid(..),(<>))
import Data.Traversable as T
import qualified Text.PrettyPrint.HughesPJ as P
import qualified Text.PrettyPrint.Leijen as L
infixr 6 <+>, <->
infixl 5 $$, $... |
1e784293f3d8c1f9ecd87a5358990a5943d10e0628b72723d6440804efa62671 | reactiveml/rml | main.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/main.ml | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
2be595f67a0942be8c8f035bf2fc0f952885c8bead858d23a1aa78c1378d0f43 | iamaleksey/common_lib | cl_stats.erl | Copyright ( C ) 2009 ,
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% o Redistributions of source code must retain the above copyright notice,
%%% this list of conditions ... | null | https://raw.githubusercontent.com/iamaleksey/common_lib/250d965d5accaad8aa1e2c7bbf4ac691aa94ca93/src/cl_stats.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:
o Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
o Redistributions ... | Copyright ( C ) 2009 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,... |
5d08644771553ad2ab370a25141087113c95d398563ad78aa2f1c712c21d42ef | ChristopherBiscardi/snap-for-beginners | Application.hs | # LANGUAGE TemplateHaskell #
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
------------------------------------------------------------------------------
import Contro... | null | https://raw.githubusercontent.com/ChristopherBiscardi/snap-for-beginners/d35a4bbdd0a459983e2f37400fbc2bf8c8bf6239/code/scaffold-app/src/Application.hs | haskell | ----------------------------------------------------------------------------
| This module defines our application's state type and an alias for its
handler monad.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
... | # LANGUAGE TemplateHaskell #
module Application where
import Control.Lens
import Snap.Snaplet
import Snap.Snaplet.Heist
import Snap.Snaplet.Auth
import Snap.Snaplet.Session
in the ` routes ` function in Site.hs
data App = App
{ _heist :: Snaplet (Heist App)
, _sess :: Snaplet SessionManager
, _auth :: ... |
621d3964cd5c90f4db407386421cdc865d37037149414180e07a0e3a1aa185bf | facebookarchive/pfff | function_typed.ml |
let (f: int -> int) = fun x -> x + 1
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/parsing/function_typed.ml | ocaml |
let (f: int -> int) = fun x -> x + 1
| |
1f63b4da04bc9d91fe272579f9ad3260e02908f62de25784012a42d95e8e5bc4 | fulcrologic/fulcro-native-template | middleware.clj | (ns app.server-components.middleware
(:require
[app.server-components.config :refer [config]]
[app.server-components.pathom :refer [parser]]
[mount.core :refer [defstate]]
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request
... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-native-template/2c0a331c722af7df15a7e80c88d224db00f234b3/src/main/app/server_components/middleware.clj | clojure | ================================================================================
Dynamically generated HTML. We do this so we can safely embed the CSRF token
in a js var for use by the client.
================================================================================
If you want to set something like session... | (ns app.server-components.middleware
(:require
[app.server-components.config :refer [config]]
[app.server-components.pathom :refer [parser]]
[mount.core :refer [defstate]]
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request
... |
28d91d5b554d02f2b5521f5be61642dda10787de9766a4f9051f4119b871d387 | serokell/importify | 26-Z01-IOFullyQualifiedAllUnused.hs | module IOFullyQualfiedAllUnused where
import qualified System.IO
main = return ()
| null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/test/test-data/base%40basic/26-Z01-IOFullyQualifiedAllUnused.hs | haskell | module IOFullyQualfiedAllUnused where
import qualified System.IO
main = return ()
| |
e979f83dfc2187f8a41858357856e72ed330a8c304aa9bc09fceba9503fc1ab9 | BillHallahan/G2 | M37.hs | {-@ LIQUID "--no-termination" @-}
module M2 (main) where
data List = Cons Bool List | Nil
@ main : : List - > Int - > { b : | b } @
main :: List -> Int -> Bool
main xs n =
case while xs n (0, 0) of
(x, m) -> if n > 0 then 0 <= m && m < n else True
{-@ while :: List -> Int -> (Int, Int) -> (Int, Int) @-... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M37.hs | haskell | @ LIQUID "--no-termination" @
@ while :: List -> Int -> (Int, Int) -> (Int, Int) @ |
module M2 (main) where
data List = Cons Bool List | Nil
@ main : : List - > Int - > { b : | b } @
main :: List -> Int -> Bool
main xs n =
case while xs n (0, 0) of
(x, m) -> if n > 0 then 0 <= m && m < n else True
while :: List -> Int -> (Int, Int) -> (Int, Int)
while xs n (x, m) =
if x < n
... |
6e93602ef8fc1b8ed64c7943a75ca7447bd2b08a10b224bb1887c54bb03421d9 | hiposfer/hive | core.cljs | (ns hive.screens.home.core
(:require [reagent.core :as r]
[react-native :as React]
[expo :as Expo]
[clojure.string :as str]
[hive.state.queries :as queries]
[hive.utils.miscelaneous :as tool]
[hive.services.mapbox :as mapbox]
[hive.se... | null | https://raw.githubusercontent.com/hiposfer/hive/f17a5a1d0e17f719487d5b7375aefd8dc07f64e1/src/hive/screens/home/core.cljs | clojure | NOTE: this is the way to remove all routes ... not sure where to do this
(for [r (data/q queries/routes-ids (state/db))]
[:db.fn/retractEntity [:route/uuid r]])
note - we assume that no position means no GPS enabled ...
remove tracker on component will unmount
(state/transact! [[:db.fn/retractEntity [:route/uuid "... | (ns hive.screens.home.core
(:require [reagent.core :as r]
[react-native :as React]
[expo :as Expo]
[clojure.string :as str]
[hive.state.queries :as queries]
[hive.utils.miscelaneous :as tool]
[hive.services.mapbox :as mapbox]
[hive.se... |
8c4123a781a4b5e50d32c06b4634c52898eb331a3518dbefcabd2fb2c2c9c88b | herd/herdtools7 | langUtils.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/0bb3c6f7ad432478d7ff1338d22f0ac567f1b1af/litmus/langUtils.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2014 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
a7125e19f06923b007f595cbbb17e543086ee0395267e332d481781427e66510 | jsthomas/tidy_email | test_send.ml | Note : The responses and status codes in this test suite are
realistic examples of 's API , as of August , 2021 . Test data
was gathered by making requests via Insomnia .
realistic examples of Sendgrid's API, as of August, 2021. Test data
was gathered by making requests via Insomnia. *)
open Lwt.Inf... | null | https://raw.githubusercontent.com/jsthomas/tidy_email/7ead0e446c2f22808332964870fc2356deb9c8bb/sendgrid/test/test_send.ml | ocaml | Note : The responses and status codes in this test suite are
realistic examples of 's API , as of August , 2021 . Test data
was gathered by making requests via Insomnia .
realistic examples of Sendgrid's API, as of August, 2021. Test data
was gathered by making requests via Insomnia. *)
open Lwt.Inf... | |
c4e6a579e3d048af8373029267700ee7cc9c66487e7086f2f3c528358ffb0939 | mransan/raft-udp | raft_srv_storage.ml | open Lwt.Infix
open !Lwt_log_core
module Conf = Raft_com_conf
module Rocks = Raft_rocks
module RTypes = Raft_types
module RLog = Raft_log
module RProtocol = Raft_protocol
let section = Section.make (Printf.sprintf "%10s" "LogRecord")
type t = {
rocksdb_db : Rocks.db;
configuration : Conf.t;
server_id : int;... | null | https://raw.githubusercontent.com/mransan/raft-udp/ffa307fa6d8bdaa3133f3cc66149ac7dfda5fc7c/src/srv/raft_srv_storage.ml | ocaml | fold-function which keeps building the log data structure
* and record the latest commit log (ie the commit index)
initial value for the fold over log record
commit_index | open Lwt.Infix
open !Lwt_log_core
module Conf = Raft_com_conf
module Rocks = Raft_rocks
module RTypes = Raft_types
module RLog = Raft_log
module RProtocol = Raft_protocol
let section = Section.make (Printf.sprintf "%10s" "LogRecord")
type t = {
rocksdb_db : Rocks.db;
configuration : Conf.t;
server_id : int;... |
5407fddd0fa7eed9b503d3104e3ac1b71e4910dbd897547b4daa5c1746a6812a | naproche/naproche | Library.hs | {- generated by Isabelle -}
Title : Isabelle / Library.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Basic library of Isabelle idioms .
See " $ ISABELLE_HOME / src / Pure / General / basics . ML "
and " $ ISABELLE_HOME / src / Pure / library . ML " .
Author: ... | null | https://raw.githubusercontent.com/naproche/naproche/fe4da26afbaeb506b24a73cc2ad390b7953deb79/Isabelle/src/Isabelle/Library.hs | haskell | generated by Isabelle
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
functions
lists
string-like interfaces
strings
getenv |
Title : Isabelle / Library.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Basic library of Isabelle idioms .
See " $ ISABELLE_HOME / src / Pure / General / basics . ML "
and " $ ISABELLE_HOME / src / Pure / library . ML " .
Author: Makarius
LICENSE: BS... |
7f20affe98f16a00cbc27f6ee4ab987d8fe7352c935d7a1fdcc54c451ad4cc76 | cornell-pl/forest | Quote.hs |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* This software is part of the pads package *
* Copyrigh... | null | https://raw.githubusercontent.com/cornell-pl/forest/3772c1f44cdee0b705e927a14b54d84e60e224e6/src/Language/Forest/Quote.hs | haskell |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* This software is part of the pads package *
* Copyrigh... | |
45680074fdb2c228de83b11fa89686451e1d4eace57ffc8294dac3051896d5eb | FlowForwarding/lincx | linc_us4_flow_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_us4/test/linc_us4_flow_tests.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us4_flow_tests).
-include_lib("eunit/include/eunit.hrl").
-inc... |
76416d4dde08c6696bcda105f6a70b3860b16c8aa640cfb832b166004bdb04a4 | Clozure/ccl-tests | copy-alist.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 07:29:07 2003
;;;; Contains: Tests of COPY-ALIST
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest copy-alist.1
(let* ((x (copy-tree '((a . b) (c . d) nil (e f) ((x) ((y z)) w)
("foo" . "bar") (#\w . 1.234)
(1/3 . 4123.4d... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/copy-alist.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of COPY-ALIST
Error tests | Author :
Created : Sun Apr 20 07:29:07 2003
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest copy-alist.1
(let* ((x (copy-tree '((a . b) (c . d) nil (e f) ((x) ((y z)) w)
("foo" . "bar") (#\w . 1.234)
(1/3 . 4123.4d5))))
(xcopy (make-scaffold-copy x))
(result (copy-... |
9a79e9e1008d628b8519a4daab0d2439c6baec12ddfc623ee46b4ee058cf32dd | b1412/clojure-web-admin | user.clj | (ns clojure-web.routes.user
(:require [clojure-web.common.crud :refer [defcrud-routes]]
[clojure-web.db.entity :refer [user]]
[clojure-web.render :as render]))
(defcrud-routes user-routes user)
| null | https://raw.githubusercontent.com/b1412/clojure-web-admin/018161dcdb364cc168d6f5a56ceb798005a0701f/src/clj/clojure_web/routes/user.clj | clojure | (ns clojure-web.routes.user
(:require [clojure-web.common.crud :refer [defcrud-routes]]
[clojure-web.db.entity :refer [user]]
[clojure-web.render :as render]))
(defcrud-routes user-routes user)
| |
7fd0ad559f31a3e4f0ddf45c2b5bb83b069b5e867a73c3659f44bd4a78783a58 | cse-bristol/110-thermos-ui | queue.clj | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.queue
(:require [thermos-backend.db :as db]
[thermos-backend.config :refer [config]]
[honeysql... | null | https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/0456995dc12aeba6b00ccc3174a8d87d9c140407/src/thermos_backend/queue.clj | clojure | {queue {job-id thread}}
while we have the read lock let's update them to be in
at this point we could check for too many jobs and return the job to queue
if we don't want it.
can-cancel is a convenience for when there have been
no side-effects and it is safe to just die
update the job with progress message and p... | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.queue
(:require [thermos-backend.db :as db]
[thermos-backend.config :refer [config]]
[honeysql... |
3edfa9416bcf0328fc83f4f28533b152717e1ffd934aed11a5196c30422656af | NalaGinrut/artanis | commands.scm | -*- indent - tabs - mode : nil ; coding : utf-8 -*-
Copyright ( C ) 2015
" Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License published by the Free Softw... | null | https://raw.githubusercontent.com/NalaGinrut/artanis/3412d6eb5b46fde71b0965598ba085bacc2a6c12/artanis/commands.scm | scheme | coding : utf-8 -*-
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License and GNU Lesser General Public License
for more details.
and GNU Lesser General Public License along with this program... | Copyright ( C ) 2015
" Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License published by the Free Software
Foundation , either version 3 of the License , or ... |
08e27ab2d4f47d1652820430f6550b9db08fe47b8e2ce9167326f469e41b44a2 | MaskRay/OJHaskell | Reverse polish notation calculator.hs | module RPN where
calc :: String -> Double
calc line = f [] $ words line
where
f [] [] = 0
f (x:_) [] = x
f xs'@ ~(y:x:xs) (o:os) =
case o of
"+" -> f ((x+y):xs) os
"-" -> f ((x-y):xs) os
"*" -> f ((x*y):xs) os
"/" -> f ((x/y):xs) os
_ -> f (rea... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Codewars/Reverse%20polish%20notation%20calculator.hs | haskell | module RPN where
calc :: String -> Double
calc line = f [] $ words line
where
f [] [] = 0
f (x:_) [] = x
f xs'@ ~(y:x:xs) (o:os) =
case o of
"+" -> f ((x+y):xs) os
"-" -> f ((x-y):xs) os
"*" -> f ((x*y):xs) os
"/" -> f ((x/y):xs) os
_ -> f (rea... | |
b98f58b0945ccae89960a870200756e7b878535bb03114453e3747fe28e1f954 | lfe/lfe | lfe_macro_include.erl | Copyright ( c ) 2013 - 2020
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed... | null | https://raw.githubusercontent.com/lfe/lfe/dbfd16af065b12d2dbce26ff1fbad151765243fd/src/lfe_macro_include.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2013 - 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
Purpose : Lisp Flavoured Erlang macro expander for include macros .
if they are LFE syntax files or erlang syntax files . Er... |
9b704337d6b32b994d90c137cd5fe8471a52e6edf38d3fe6dfa5d8afb8d354e7 | erlanglab/elab | elab_bcc_profile_plugin.erl | -module(elab_bcc_profile_plugin).
-define(RESET_BG, <<"\e[49m">>).
-define(RESET, <<"\e[0m">>).
-define(GRAY_BG, <<"\e[7m">>).
-define(YELLOW, <<"\e[33m">>).
-define(RED, <<"\e[31m">>).
-define(L_RED, <<"\e[48m">>).
-define(GREEN, <<"\e[32;1m">>).
-define(L_GREEN, <<"\e[92m">>).
-define(CHOOSE_BG, <<"\e[42m">>).
-defi... | null | https://raw.githubusercontent.com/erlanglab/elab/8822c986c33c12540b8b5b9727a4d3532801d6f6/src/elab_bcc_profile_plugin.erl | erlang | observer_cli_plugin Callback API | -module(elab_bcc_profile_plugin).
-define(RESET_BG, <<"\e[49m">>).
-define(RESET, <<"\e[0m">>).
-define(GRAY_BG, <<"\e[7m">>).
-define(YELLOW, <<"\e[33m">>).
-define(RED, <<"\e[31m">>).
-define(L_RED, <<"\e[48m">>).
-define(GREEN, <<"\e[32;1m">>).
-define(L_GREEN, <<"\e[92m">>).
-define(CHOOSE_BG, <<"\e[42m">>).
-defi... |
e4dcfd901935ad4d30983f8d81c3177277852b252aa09255dcbc050d1726b9b7 | TDacik/Deadlock | eva_wrapper_instance.ml | Instance of wrapper that uses results computed by EVA
*
* Author : ( ) , 2020
*
* Author: Tomas Dacik (), 2020
*)
open! Deadlock_top
open Locations
open Cil_types
module AI = Abstract_interp
(* Cache of results computed by EVA *)
module Cache = Map.Make
(struct
type t = Thread.t
let... | null | https://raw.githubusercontent.com/TDacik/Deadlock/9e1b954deb5ab62d0d422dbe4d2d9138eeee5477/src/eva_wrapper/eva_wrapper_instance.ml | ocaml | Cache of results computed by EVA
Imperative state
Store computed results
==== Internal functions ====
* Simplification of Cvalue.State to pairs (varinfo, offset)
==== Implementation of wrapper signature ==== | Instance of wrapper that uses results computed by EVA
*
* Author : ( ) , 2020
*
* Author: Tomas Dacik (), 2020
*)
open! Deadlock_top
open Locations
open Cil_types
module AI = Abstract_interp
module Cache = Map.Make
(struct
type t = Thread.t
let compare = Thread.compare_with_states
... |
6aa1f464c0832da96722733b73cc819add4841c22c4619284c5df6dbf6c5f65a | grin-compiler/ghc-wpc-sample-programs | Org.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Tests.Writers.Org (tests) where
import Prelude
import Test.Tasty
import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder
infix 4 =:
(=:) :: (ToString a, ToPandoc a)
=> String -> (a, String) -> Test... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/test/Tests/Writers/Org.hs | haskell | # LANGUAGE OverloadedStrings #
See -links.html#Internal-links | # LANGUAGE NoImplicitPrelude #
module Tests.Writers.Org (tests) where
import Prelude
import Test.Tasty
import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder
infix 4 =:
(=:) :: (ToString a, ToPandoc a)
=> String -> (a, String) -> TestTree
(=:) = test (purely (writeOrg ... |
e7822f7802a0b727a13c4a07c24554817619fc7ca0307d17e3b852de5a6efb0e | jonathan-laurent/KaFlow | graph.ml | module Make (Node : Set.OrderedType) = struct
module S = Set.Make(Node)
module M = Map.Make(Node)
type node = Node.t
type t = {
nodes : S.t ;
edges : S.t M.t }
let empty = { nodes = S.empty ; edges = M.empty }
let add_node n g =
{ g with nodes = S.add n g.nodes }
let direct_successors x... | null | https://raw.githubusercontent.com/jonathan-laurent/KaFlow/e81cfbe4f270b9f0c94b7002b02dd5be61041ab8/src/graph.ml | ocaml | Gives the set of reachable nodes from [n] | module Make (Node : Set.OrderedType) = struct
module S = Set.Make(Node)
module M = Map.Make(Node)
type node = Node.t
type t = {
nodes : S.t ;
edges : S.t M.t }
let empty = { nodes = S.empty ; edges = M.empty }
let add_node n g =
{ g with nodes = S.add n g.nodes }
let direct_successors x... |
8ca4fa5716d5ce8056af5c887f4d95b6f8379173d97b4f85cccbcf0f1da90235 | SahilKang/cl-avro | decimal.lisp | Copyright 2021 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro 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 version.
;... | null | https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/src/logical/decimal.lisp | lisp |
This file is part of cl-avro.
cl-avro is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-avro 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 t... | Copyright 2021 Google LLC
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
(in-package #:cl-user)
(defpackage #:cl-avro.internal.decimal
(:use #:cl)
(:lo... |
3860607d1818e9216ea792d12e3bcd1024751ba120337c2f5fd43260e7fde38e | metabase/metabase | fixed_hive_connection.clj | (ns metabase.driver.hive-like.fixed-hive-connection
(:import
(java.sql Connection ResultSet SQLException)
(java.util Properties)
(org.apache.hive.jdbc HiveConnection)))
(set! *warn-on-reflection* true)
(defn fixed-hive-connection
"Subclass of [[org.apache.hive.jdbc.HiveConnection]] has a few special over... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/modules/drivers/sparksql/src/metabase/driver/hive_like/fixed_hive_connection.clj | clojure | (ns metabase.driver.hive-like.fixed-hive-connection
(:import
(java.sql Connection ResultSet SQLException)
(java.util Properties)
(org.apache.hive.jdbc HiveConnection)))
(set! *warn-on-reflection* true)
(defn fixed-hive-connection
"Subclass of [[org.apache.hive.jdbc.HiveConnection]] has a few special over... | |
42c2f86b2be755b43387b238cb307a1dad4b5cf755307ecb86af8da7ac9bbec3 | jumarko/clojure-experiments | todo_exercises.clj | (ns clojure-experiments.books.sicp.ch2-abstractions-data.todo-exercises)
;;;; This is alist of exercises that I intentionally left out
;;;; The idea is to revisit them after I finish the chapter
;;;; and try at least some of them; perhaps to verify my knowledge of the subject
Ex . 2.20 ( p. 104 ) ?
Ex . 2.29 (... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/books/sicp/ch2_abstractions_data/todo_exercises.clj | clojure | This is alist of exercises that I intentionally left out
The idea is to revisit them after I finish the chapter
and try at least some of them; perhaps to verify my knowledge of the subject
binary mobile | (ns clojure-experiments.books.sicp.ch2-abstractions-data.todo-exercises)
Ex . 2.20 ( p. 104 ) ?
Ex . 2.29 ( p. 111 )
This should n't be hard but I do n't need to do every exercises the first time
|
dffa34af9abfa29f31c2464fafe97a55d05a61abe92d1e3bdbe3e0d1615cedea | noir-clojure/noir | test.clj | (ns noir.util.test
"A set of utilities for testing a Noir project"
(:use clojure.test
[clojure.pprint :only [pprint]])
(:require [noir.server :as server]
[noir.session :as session]
[noir.validation :as vali]
[noir.cookies :as cookies]
[noir.options :as optio... | null | https://raw.githubusercontent.com/noir-clojure/noir/bd3d13430ab75613b753bbc1e31a1b5f737fb3b6/src/noir/util/test.clj | clojure | (ns noir.util.test
"A set of utilities for testing a Noir project"
(:use clojure.test
[clojure.pprint :only [pprint]])
(:require [noir.server :as server]
[noir.session :as session]
[noir.validation :as vali]
[noir.cookies :as cookies]
[noir.options :as optio... | |
4bd419f2f954f66301fad67c047396605fcbe6be0962f7fc04826a11d43a797b | lpgauth/swirl | swirl_utils.erl | -module(swirl_utils).
-include("swirl.hrl").
%% public
-export([
lookup/2,
lookup/3,
new_timer/2,
new_timer/3,
proplist_to_record/2,
record_to_proplist/1,
safe_dict_fetch/2,
safe_ets_delete/1,
safe_ets_increment/3,
safe_ets_lookup_element/2,
tab2list/1,
unix_tstamp_ms/0,... | null | https://raw.githubusercontent.com/lpgauth/swirl/0b6cbe6979d65d28c17fa13b7dbc798e9413806a/src/swirl_utils.erl | erlang | public
public
private | -module(swirl_utils).
-include("swirl.hrl").
-export([
lookup/2,
lookup/3,
new_timer/2,
new_timer/3,
proplist_to_record/2,
record_to_proplist/1,
safe_dict_fetch/2,
safe_ets_delete/1,
safe_ets_increment/3,
safe_ets_lookup_element/2,
tab2list/1,
unix_tstamp_ms/0,
updat... |
f4940456111b54fdbb27927266deb33ed13dcf975b2ac7f03cb675222ece60b3 | synduce/Synduce | search_v4.ml | (* Trees *)
type 'a tree =
| Empty
| Node of 'a * 'a tree * 'a tree
(* Lists *)
type 'a list =
| Nil
| Cons of 'a * 'a list
(* Representation function from tree to list *)
let rec repr = function
| Empty -> Nil
| Node (a, l, r) -> Cons (a, dec (repr l) r)
and dec li = function
| Empty -> li
| Node (a... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/list_to_tree/search_v4.ml | ocaml | Trees
Lists
Representation function from tree to list | type 'a tree =
| Empty
| Node of 'a * 'a tree * 'a tree
type 'a list =
| Nil
| Cons of 'a * 'a list
let rec repr = function
| Empty -> Nil
| Node (a, l, r) -> Cons (a, dec (repr l) r)
and dec li = function
| Empty -> li
| Node (a, ll, lr) -> Cons (a, dec (dec li ll) lr)
;;
let target x t =
let rec... |
f46ffe3c64eb01fab8d8e94ec77e3bb14835d331d45c03fd71cbe14a0b782df7 | Clozure/ccl-tests | synonym-stream-symbol.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Jan 29 21:21:06 2004
Contains : Tests of SYNONYM - STREAM - SYMBOL
(in-package :cl-test)
(deftest synonym-stream-symbol.1
(synonym-stream-symbol (make-synonym-stream '*standard-input*))
*standard-input*)
(deftest synonym-stream-symbol.error.1
(signals... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/synonym-stream-symbol.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Thu Jan 29 21:21:06 2004
Contains : Tests of SYNONYM - STREAM - SYMBOL
(in-package :cl-test)
(deftest synonym-stream-symbol.1
(synonym-stream-symbol (make-synonym-stream '*standard-input*))
*standard-input*)
(deftest synonym-stream-symbol.error.1
(signals-error (synonym-stream-s... |
9cbaa7819b466ef1d0e695b25770b29e5757d6c03bd4f2af81dcfdeb890b5704 | emqx/emqx | ee_connector_clickhouse_SUITE.erl | % %%--------------------------------------------------------------------
% % Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
% %%
% % Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% %% you may not use this file except in compliance with the License.
% %% You may... | null | https://raw.githubusercontent.com/emqx/emqx/a638cc65666110ccfab832669c4a4fd1f411639a/lib-ee/emqx_ee_connector/test/ee_connector_clickhouse_SUITE.erl | erlang | %%--------------------------------------------------------------------
% Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
% Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a ... |
-module(ee_connector_clickhouse_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include("emqx_connector.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("emqx/include/emqx.hrl").
-include_lib("stdlib/include/assert.hrl").
-define(CLICKHOUSE_HOST, "clickhouse").
-define(CLICKHOUSE_RESOURCE_MO... |
bdd0e7184c9f19026e9ac4ff90c470525f6180de5ef8498eb637612120611cbc | williamleferrand/accretio | cron.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program 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 version 3 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/app/server/cron.ml | ocaml | our representation of the crontab *****************************************
some utils ****************************************************************
an example ****************************************************************
now, our dates utils ******************************************************
this is pro... |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program 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 version 3 o... |
91747c6ca646bff2df64c3a74f805d0ea6d8f88aaaf4fb229212a4922d04ebfe | RefactoringTools/HaRe | Arrow.hs | {-# LANGUAGE Arrows #-}
module Layout.Arrow where
import Control.Arrow
import qualified Control.Category as Cat
addA :: Arrow a => a b Int -> a b Int -> a b Int
addA f g = proc x -> do
y <- f -< x
z <- g -< x
returnA -< y + z
newtype Circuit a b = Circuit { unCircuit :... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Layout/Arrow.hs | haskell | # LANGUAGE Arrows #
| Accumulator that outputs a value determined by the supplied function.
| Accumulator that outputs the accumulator value. | module Layout.Arrow where
import Control.Arrow
import qualified Control.Category as Cat
addA :: Arrow a => a b Int -> a b Int -> a b Int
addA f g = proc x -> do
y <- f -< x
z <- g -< x
returnA -< y + z
newtype Circuit a b = Circuit { unCircuit :: a -> (Circuit a b, b) ... |
93c92b5b98040d80b879bb5d405fcd98b831097758349dbbfe22fb354278fc95 | coq-tactician/coq-tactician | tactic_sexpr.ml | open Ltac_plugin
open Monad_util
open Map_all_the_things
open Mapping_helpers
open Tacexpr
open Sexpr
open Constrexpr
open Glob_term
open Pattern
let constr_pattern_name (pat : constr_pattern) = match pat with
| PRef _ -> ["PRef"]
| PVar _ -> ["PVar"]
| PEvar (_, _) -> ["PEvar"]
| PRel i -> ["PRel"; string_of_... | null | https://raw.githubusercontent.com/coq-tactician/coq-tactician/989067831f1ab76d0676e8ddcdd3c963a2335de7/src/tactic_sexpr.ml | ocaml | TODO: For now, this function is only for debugging purposes. Many syntactic elements from the AST
are missing. In particular, non-recursive information is mostly not included. This includes no-recursive
tactic extensions, binders, etc. | open Ltac_plugin
open Monad_util
open Map_all_the_things
open Mapping_helpers
open Tacexpr
open Sexpr
open Constrexpr
open Glob_term
open Pattern
let constr_pattern_name (pat : constr_pattern) = match pat with
| PRef _ -> ["PRef"]
| PVar _ -> ["PVar"]
| PEvar (_, _) -> ["PEvar"]
| PRel i -> ["PRel"; string_of_... |
5f79f10703918ddbd6b6f0de01e7ca77aee0862c9a801e241bd1684d3820be68 | ucsd-progsys/dsolve | isortset.ml | let rec partition f xs =
match xs with
| [] -> ([],[])
| x::xs' -> let (ys,zs) = partition f xs' in
if f x then x::ys, zs else ys, x::zs
let rec append xs ys =
match xs with
| [] -> ys
| x::xs' -> x::(append xs' ys)
(************************* InsertSort *... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/isortset.ml | ocaml | ************************ InsertSort ************************
************************ Quicksort *************************
************************ Mergesort *************************
************************** Tests *************************** | let rec partition f xs =
match xs with
| [] -> ([],[])
| x::xs' -> let (ys,zs) = partition f xs' in
if f x then x::ys, zs else ys, x::zs
let rec append xs ys =
match xs with
| [] -> ys
| x::xs' -> x::(append xs' ys)
let rec ins x ys =
match ys with
... |
d38e142611b3e7c50911a12a5324dcf216d6ba27d826c7cc20c4a69795dfb8fc | larcenists/larceny | mem-ref.scm | (
(add eax (& ecx))
(add eax (& ebp))
(add eax (& esp))
(add eax (& #x64))
(add eax (& #x640))
(add eax (& (* ecx 1)))
(add eax (& (* ecx 2)))
(add eax (& (* ecx 4)))
(add eax (& (* ecx 8)))
(add eax (& (* ebp 1)))
(add eax (& (* ebp 2)))
(add eax (& (* ebp 4)))
(add eax (& (* ebp 8)))
(add eax (& ecx 184... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/mem-ref.scm | scheme | (
(add eax (& ecx))
(add eax (& ebp))
(add eax (& esp))
(add eax (& #x64))
(add eax (& #x640))
(add eax (& (* ecx 1)))
(add eax (& (* ecx 2)))
(add eax (& (* ecx 4)))
(add eax (& (* ecx 8)))
(add eax (& (* ebp 1)))
(add eax (& (* ebp 2)))
(add eax (& (* ebp 4)))
(add eax (& (* ebp 8)))
(add eax (& ecx 184... | |
b3ca9c73b0e5d9d68f7e99859994d7d23f8a03cd7903f819066c232e89a30163 | haskell-CI/haskell-ci | Auxiliary.hs | {-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module HaskellCI.Auxiliary (
Auxiliary (..),
auxiliary,
pkgNameDirVariable',
pkgNameDirVariable,
) where
import HaskellCI.Prelude
import Prelude (head)
imp... | null | https://raw.githubusercontent.com/haskell-CI/haskell-ci/bf3416439f3b00f0ee14130f9efe93e63345ca51/src/HaskellCI/Auxiliary.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
| Auxiliary definitions, probably useful for all backends
version range which has tests
copy fields from original cabal.project
raw-project is after local-ghc-options so we can override per package. | # LANGUAGE RecordWildCards #
module HaskellCI.Auxiliary (
Auxiliary (..),
auxiliary,
pkgNameDirVariable',
pkgNameDirVariable,
) where
import HaskellCI.Prelude
import Prelude (head)
import qualified Data.Set as S
import qualified Distribution.CabalSpecVe... |
51a2e5204b6af07e5099ac064ed4b14e9a384055a2d926ce6f779b971814cb29 | malcolmreynolds/GSLL | elliptic-functions.lisp | Jacobian elliptic functions
, Mon Mar 20 2006 - 22:21
Time - stamp : < 2008 - 11 - 15 22:31:54EST elliptic-functions.lisp >
$ Id$
(in-package :gsl)
(defmfun jacobian-elliptic-functions (u m)
"gsl_sf_elljac_e"
((u :double) (m :double) (sn sf-result) (cn sf-result) (dn sf-result))
:return ((val sn) (val... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/special-functions/elliptic-functions.lisp | lisp | ;;;error | Jacobian elliptic functions
, Mon Mar 20 2006 - 22:21
Time - stamp : < 2008 - 11 - 15 22:31:54EST elliptic-functions.lisp >
$ Id$
(in-package :gsl)
(defmfun jacobian-elliptic-functions (u m)
"gsl_sf_elljac_e"
((u :double) (m :double) (sn sf-result) (cn sf-result) (dn sf-result))
:return ((val sn) (val... |
84e5c94f2f1ea3f4f2a51c1158945028346f30fd01692cc026cc8ede5c447ad4 | haskell/text | StripTags.hs | -- | Program to replace HTML tags by whitespace
--
This program was originally contributed by .
--
-- Tested in this benchmark:
--
-- * Reading the file
--
-- * Replacing text between HTML tags (<>) with whitespace
--
-- * Writing back to a handle
--
# OPTIONS_GHC -fspec - constr - count=5 #
module Benchmarks.Progr... | null | https://raw.githubusercontent.com/haskell/text/ca73ae38ed3744ec930cbfdb706147ec29d5a185/benchmarks/haskell/Benchmarks/Programs/StripTags.hs | haskell | | Program to replace HTML tags by whitespace
Tested in this benchmark:
* Reading the file
* Replacing text between HTML tags (<>) with whitespace
* Writing back to a handle
| This program was originally contributed by .
# OPTIONS_GHC -fspec - constr - count=5 #
module Benchmarks.Programs.StripTags
( benchmark
) where
import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO)
import System.IO (Handle)
import qualified Data.ByteString as B
import qualified Data.Text as T
import q... |
5787c9c3f41b1b4d03c00d7974b47712f870b2eeccb904f0573697a0cbf3047e | oakes/Nightcode | start.cljs | (ns {{name}}.start
(:require [{{name}}.{{core-name}} :as c]
[play-cljc.gl.core :as pc]
[goog.events :as events])
(:require-macros [{{name}}.music :refer [build-for-cljs]]))
(defn game-loop [game]
(let [game (c/tick game)]
(js/requestAnimationFrame
(fn [ts]
(let [ts (* ts... | null | https://raw.githubusercontent.com/oakes/Nightcode/2e112c59cddc5fdec96059a08912c73b880f9ae8/resources/leiningen/new/play_cljc/start.cljs | clojure | start the game
build music, put it in the audio tag, and make the button toggle it on and off | (ns {{name}}.start
(:require [{{name}}.{{core-name}} :as c]
[play-cljc.gl.core :as pc]
[goog.events :as events])
(:require-macros [{{name}}.music :refer [build-for-cljs]]))
(defn game-loop [game]
(let [game (c/tick game)]
(js/requestAnimationFrame
(fn [ts]
(let [ts (* ts... |
7f0a51c7fb3e01853c1a93d19716a02762955674f92bd4159a96a630a91cb4fb | the-dr-lazy/cascade | Scrypt.hs | |
Module : Cascade . Api . Effect . Scrypt
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTION ! ! !... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Effect/Scrypt.hs | haskell | # COMPLETE Encrypted # | |
Module : Cascade . Api . Effect . Scrypt
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCRIPTION ! ! !... |
8f111eb59f384f2b5fedf4bf07d45bbd7dfb73a26ca1bcdbbab53fa294b42dd0 | nuprl/gradual-typing-performance | mred-extensions.rkt | #lang racket/base
(require racket/gui
(prefix-in f: framework)
racket/pretty
"syntax-property.rkt"
images/compile-time
string-constants
(for-syntax images/icons/control images/icons/style))
(provide
step-img
stepper-canvas%
stepper-text%
snip?
stepper-warning... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/stepper/private/mred-extensions.rkt | racket | this can't be right...?
end of vertical snip-stuff
;; ;
; ; ; ; ; ;
;;;; ;;; ; ;;; ; ;;; ;;; ; ;; ;;; ; ; ; ;;; ;;;; ;;; ; ; ;;;;; ; ;
; ; ;... | #lang racket/base
(require racket/gui
(prefix-in f: framework)
racket/pretty
"syntax-property.rkt"
images/compile-time
string-constants
(for-syntax images/icons/control images/icons/style))
(provide
step-img
stepper-canvas%
stepper-text%
snip?
stepper-warning... |
eecfcbd1141d7d7ca6ade6ffec215b3969f6e734422059d7284214252fc6ee00 | master/ejabberd | sha.erl | %%%----------------------------------------------------------------------
%%% File : sha.erl
Author : < >
%%% Purpose :
Created : 20 Dec 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the ... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/sha.erl | erlang | ----------------------------------------------------------------------
File : sha.erl
Purpose :
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 WITHOUT ANY WARRANTY; without ev... | Author : < >
Created : 20 Dec 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2012 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... |
6b00ddcf659857bba93fd13a98083cc0b75ab415758e7eb815ee91e345836c28 | aria42/infer | core_test.clj | (ns infer.core-test
(:use clojure.test)
(:use infer.core))
(deftest sort-seq-of-maps-by-key
(is (= '({:a 1} {:a 5})
(sort-maps-by :a [{:a 5} {:a 1}]))))
(deftest test-sort-maps-by
(is (= [{:a 1} {:a 2} {:a 3}]
(sort-maps-by :a [{:a 2} {:a 3} {:a 1}]))))
(deftest compare-heterogenious-keys
(is (= 1
(k... | null | https://raw.githubusercontent.com/aria42/infer/9849325a27770794b91415592a8706fd90777469/test/infer/core_test.clj | clojure | (ns infer.core-test
(:use clojure.test)
(:use infer.core))
(deftest sort-seq-of-maps-by-key
(is (= '({:a 1} {:a 5})
(sort-maps-by :a [{:a 5} {:a 1}]))))
(deftest test-sort-maps-by
(is (= [{:a 1} {:a 2} {:a 3}]
(sort-maps-by :a [{:a 2} {:a 3} {:a 1}]))))
(deftest compare-heterogenious-keys
(is (= 1
(k... | |
0b95898fb1611c8c26970a799eb21b856a556c4390199c7df1d192e059814ca1 | mschuldt/ga144 | ga.rkt | #lang racket ;; -*- lexical-binding: t -*-
(require compatibility/defmacro
"compiler/compile.rkt"
"el.rkt")
(provide (all-defined-out))
(define ret 'ret)
(define ex 'ex)
(define jump 'jump)
(define call 'call)
(define unext 'unext)
(define next 'next)
;(define if 'if)
(define -if '-f)
(define @p '@... | null | https://raw.githubusercontent.com/mschuldt/ga144/5b327b958f5d35cf5a015044e6ee62f46446169f/src/ga.rkt | racket | -*- lexical-binding: t -*-
(define if 'if)
(define - '-)
(define + '+)
(define drop 'drop)
(define for 'for) ;X
else: numbers |
(require compatibility/defmacro
"compiler/compile.rkt"
"el.rkt")
(provide (all-defined-out))
(define ret 'ret)
(define ex 'ex)
(define jump 'jump)
(define call 'call)
(define unext 'unext)
(define next 'next)
(define -if '-f)
(define @p '@p)
(define @+ '@+)
(define @b '@b)
(define @ '@)
(define !p ... |
c2a6305fea3658c48d285e262266efdc1d1d888568593ed45c33c5285761ff5f | vaibhavsagar/experiments | XmlDataType.hs | module Dotnet.System.Xml.XPath.XmlDataType where
import Dotnet
import qualified IOExts
import qualified Dotnet.System.Type
import qualified Dotnet.System.Enum
data XmlDataType_ a
type XmlDataType a = Dotnet.System.Enum.Enum (XmlDataType_ a)
data XmlDataTypeTy
= Text
| Number
deriving ( Enum, Show, Read )
toXmlDa... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/lib/Dotnet/System/Xml/XPath/XmlDataType.hs | haskell | module Dotnet.System.Xml.XPath.XmlDataType where
import Dotnet
import qualified IOExts
import qualified Dotnet.System.Type
import qualified Dotnet.System.Enum
data XmlDataType_ a
type XmlDataType a = Dotnet.System.Enum.Enum (XmlDataType_ a)
data XmlDataTypeTy
= Text
| Number
deriving ( Enum, Show, Read )
toXmlDa... | |
4b6466f6409827b1ccbf3411244ce3a251cca90c84259d5687126270ad7d7e9d | 8c6794b6/guile-tjit | mutable-pairs.scm | ;;; mutable-pairs.scm --- The R6RS mutable pair library
Copyright ( C ) 2010 Free Software Foundation , Inc.
;;
;; This library 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 ; either
version... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/rnrs/mutable-pairs.scm | scheme | mutable-pairs.scm --- The R6RS mutable pair library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... |
Copyright ( C ) 2010 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(library (rnrs mutable-pairs (6))
(export... |
e2d6b52c95da7f911ed8d78772f3c07b236051213753fbe69bb4ac06f5826ad8 | hakaru-dev/hakaru | Summary.hs | # LANGUAGE TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, DeriveDataTypeable
, CPP
, GADTs
, , OverloadedStrings
, ScopedTypeVariables
, TypeOperators
#
, FlexibleInstances
... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Summary.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
2017.06.19
|
Module : Language.Hakaru.Summary
License : BSD3
Maintainer :
Stability : experimental
-------------------------------------------------... | # LANGUAGE TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, DeriveDataTypeable
, CPP
, GADTs
, , OverloadedStrings
, ScopedTypeVariables
, TypeOperators
#
, FlexibleInstances
... |
baf3404d8c14e6be9340cadf5c87b2e32685a8af688a35446ed651268b39123b | kubernetes-client/haskell | Client.hs | module Kubernetes.Client
( module Kubernetes.Client.Config
, module Kubernetes.Client.KubeConfig
, module Kubernetes.Client.Watch
) where
import Kubernetes.Client.Config
import Kubernetes.Client.KubeConfig
import Kubernetes.Client.Watch
| null | https://raw.githubusercontent.com/kubernetes-client/haskell/e848bc0c5c8d4fe4d2c9e8555331c219814c8ec9/kubernetes-client/src/Kubernetes/Client.hs | haskell | module Kubernetes.Client
( module Kubernetes.Client.Config
, module Kubernetes.Client.KubeConfig
, module Kubernetes.Client.Watch
) where
import Kubernetes.Client.Config
import Kubernetes.Client.KubeConfig
import Kubernetes.Client.Watch
| |
d8723eb52399f3d508fdb1d821b51b0508891897e5cc615544ddcbd8e3bbb28d | overtone/overtone | ex02_bday.clj | (ns
^{:doc "Exploration of musical degrees & scales."
:author "Karsten Schmidt"}
overtone.examples.workshops.resonate2013.ex02_bday
(:use
[overtone.live]
[overtone.inst.piano]))
(defn bpm
"Higher order function. Returns another fn to compute the
time offset in milliseconds for a beat at given `temp... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/examples/workshops/resonate2013/ex02_bday.clj | clojure | Next we encode a well know melody in an abstract manner
using musical degrees. Read this if you're unfamiliar with the concept:
(music)
Also highly recommended is this book for further contextualization:
-Number-Geometry-Music-Heaven/dp/190715504X
Hap py birth day to you
Hap py ... | (ns
^{:doc "Exploration of musical degrees & scales."
:author "Karsten Schmidt"}
overtone.examples.workshops.resonate2013.ex02_bday
(:use
[overtone.live]
[overtone.inst.piano]))
(defn bpm
"Higher order function. Returns another fn to compute the
time offset in milliseconds for a beat at given `temp... |
8b5a23fc423b9f00c5adf02603f20975adbb5f9c86173638db34a76749319d91 | lolepezy/rpki-prover | Map.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
module RPKI.Store.Base.Map where
import GHC.TypeLits
import Data.Typeable
import Data.Maybe (isJust)
import RPKI.Store.Base.Storable
import RPKI.S... | null | https://raw.githubusercontent.com/lolepezy/rpki-prover/4edc5a08e9183e63d6264a1a736b8698ca627135/src/RPKI/Store/Base/Map.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
module RPKI.Store.Base.Map where
import GHC.TypeLits
import Data.Typeable
import Data.Maybe (isJust)
import RPKI.Store.Base.Storable
import RPKI.S... | |
ee69cf3251637fe86d636247f5bbe825be025968240026e94113eccae0a53dac | glguy/advent | 25.hs | {-# Language QuasiQuotes #-}
|
Module : Main
Description : Day 25 solution
Copyright : ( c ) , 2019
License : ISC
Maintainer :
< >
@
# - # # - #
| |
# #
| |
# -#-S-#-#- #
|
# -#- #
|
# -#-#- #
... | null | https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2019/25.hs | haskell | # Language QuasiQuotes #
electromagnet
photons
molten lava
infinite loop
attempt
action
inverse action
items
search instructions
direct :: [String]
direct =
[north, north, take_ "space heater",
east, take_ "semiconductor",
west, south, south, east, ... | |
Module : Main
Description : Day 25 solution
Copyright : ( c ) , 2019
License : ISC
Maintainer :
< >
@
# - # # - #
| |
# #
| |
# -#-S-#-#- #
|
# -#- #
|
# -#-#- #
|
... |
dfb314b2a6845cbbe045016c9cbca85d05915f8fd0448ddcdf8b6dcb4cbce8e7 | ruhler/smten | IntegerF.hs |
module Smten.Runtime.Formula.IntegerF (
IntegerF, integerF, var_IntegerF, ite_IntegerF,
eq_IntegerF, leq_IntegerF, add_IntegerF, sub_IntegerF,
deIntegerF, finite_IntegerF, unreachable_IntegerF,
) where
import Smten.Runtime.FreeID
import Smten.Runtime.Formula.BoolF
import Smten.Runtime.Formula.Finite
imp... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Runtime/Formula/IntegerF.hs | haskell | We need to use a newtype instead of a type synonym to get around annoying
| Decompose an IntegerF into finite and possibly not finite parts.
where x = if p then a else b_
b_ possibly not finite. |
module Smten.Runtime.Formula.IntegerF (
IntegerF, integerF, var_IntegerF, ite_IntegerF,
eq_IntegerF, leq_IntegerF, add_IntegerF, sub_IntegerF,
deIntegerF, finite_IntegerF, unreachable_IntegerF,
) where
import Smten.Runtime.FreeID
import Smten.Runtime.Formula.BoolF
import Smten.Runtime.Formula.Finite
imp... |
0446f3330c1bf482bd6658158e39e02d151ed5a892d6aeb56afd3ad5fe8520e2 | cmsc430/www | ast.rkt | #lang racket
(provide (all-defined-out))
type Prog = ( Prog ( ) Expr )
(struct Prog (ds e) #:prefab)
type = ( Defn I d ( I d ) Expr )
(struct Defn (f xs e) #:prefab)
type = ( Eof )
;; | (Empty)
;; | (Int Integer)
| ( )
| ( )
| ( )
|... | null | https://raw.githubusercontent.com/cmsc430/www/ad689ce49eaa12270ff56c595e69a4cbff12e0b2/langs/mug/ast.rkt | racket | | (Empty)
| (Int Integer)
| (Var Id)
type Id = Symbol
type Op0 = 'read-byte
| 'write-byte | 'eof-object?
| 'box | 'car | 'cdr | 'unbox
| 'empty? | 'cons? | 'box?
| 'vector? | 'vector-length
| 'string? | 'string-length
... | #lang racket
(provide (all-defined-out))
type Prog = ( Prog ( ) Expr )
(struct Prog (ds e) #:prefab)
type = ( Defn I d ( I d ) Expr )
(struct Defn (f xs e) #:prefab)
type = ( Eof )
| ( )
| ( )
| ( )
| ( )
| ( )
| ( Prim1 )... |
2c8c3bea037ebd933642784fe201f7bc8022e6d78d5fac4ad0d240ebd652b504 | ptressel/LISPSearch | blind-search.lsp | ;*******************************************************************************
; BLIND SEARCH PACKAGE, blind-search.lsp
;*******************************************************************************
; This collection of functions provides various types of blind search.
It includes four search schemes : breadth f... | null | https://raw.githubusercontent.com/ptressel/LISPSearch/791c0eb65d6be9d232143795adba2e5b8057f61d/blind-search.lsp | lisp | *******************************************************************************
BLIND SEARCH PACKAGE, blind-search.lsp
*******************************************************************************
This collection of functions provides various types of blind search.
methods of excluding repeated states: exclude id... |
It includes four search schemes : breadth first , depth first , depth limited
depth first , and iterative deepening depth first . It includes three
first argument , and can take three additional keyword arguments . The keywords
maximum depth of 12 , that excludes identical states along the current path ... |
2384ea1c2bdc42e53a09ee206af199a66bea286dcad34d5eb48898607ff6aa78 | autotaker/smopeck | Regex.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Smopeck.Logic.Regex where
imp... | null | https://raw.githubusercontent.com/autotaker/smopeck/7e4ab8bf716125783ccaaf84076c992c2bca5c7f/src/Smopeck/Logic/Regex.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Smopeck.Logic.Regex where
import Control.Arrow (first, second)
import Control.Monad.Primitive
import Control.Monad.State.Strict
im... |
206a246d0be2a433f728168a02d94a0e408ce48f6a01ffe081a15fce5dc4908d | ktakashi/sagittarius-scheme | algorithms.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
sagittarius / crypto / pkix / algorithms.scm - X.509 algorithm identifier
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; a... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/d5576b376ddd25a5b2ccf3294ba612c2f07d8f53/ext/crypto/sagittarius/crypto/pkix/algorithms.scm | scheme | coding : utf-8 ; -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2... | sagittarius / crypto / pkix / algorithms.scm - X.509 algorithm identifier
Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILIT... |
0651195938b6c4830800e73b59343ab334e9db94cdddc3f2374098d1f40ed5e0 | project-oak/hafnium-verification | IExn.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/istd/IExn.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
b0ee67c812bb8231c005619f2c2fc0ea1427e3fefd02de6df904b1191e2739ba | LightTable/LightTable | editor.cljs | (ns lt.objs.editor
"Provide fns and behaviors for interfacing with a CodeMirror editor
object. Also manage defining and loading [CodeMirror]().
Editor objects are frequently used as arguments for functions, but often only the internal
CodeMirror object is actually used. Where the following documentation refere... | null | https://raw.githubusercontent.com/LightTable/LightTable/3b36b7bbf3737e1fdace5beb72b92f2d5fbe01e7/src/lt/objs/editor.cljs | clojure | *********************************************************
commands
*********************************************************
*********************************************************
Creating
*********************************************************
*********************************************************
Params
**... | (ns lt.objs.editor
"Provide fns and behaviors for interfacing with a CodeMirror editor
object. Also manage defining and loading [CodeMirror]().
Editor objects are frequently used as arguments for functions, but often only the internal
CodeMirror object is actually used. Where the following documentation refere... |
3ac82d0cc891b12fa9362ebbbe6ae95a08b3e8b82cb5b701fc3c8c0eecc72c33 | patricoferris/opam-github-workflow | ci.ml | open Lwt.Infix
open Workflow
open Yaml_util
(* General idea from the ocurrent docker plugin *)
(* open Lwt.Infix *)
module Dd = Dockerfile_distro
module Ov = Ocaml_version
type job = { job : Types.job }
module Docker = struct
let mk_docker_tag distro ocv =
Fmt.str "ocaml/opam:%s-ocaml-%s" (Dd.tag_of_distro d... | null | https://raw.githubusercontent.com/patricoferris/opam-github-workflow/6fe36af331853152da5a78b9bbc9a9ecd48b5160/bin/ci.ml | ocaml | General idea from the ocurrent docker plugin
open Lwt.Infix
Command line values | open Lwt.Infix
open Workflow
open Yaml_util
module Dd = Dockerfile_distro
module Ov = Ocaml_version
type job = { job : Types.job }
module Docker = struct
let mk_docker_tag distro ocv =
Fmt.str "ocaml/opam:%s-ocaml-%s" (Dd.tag_of_distro distro)
(Ov.to_string ocv)
let mk_docker_sha = Fmt.str "ocaml/opa... |
c9f92bc2620cf94394742ea36977bc930116332dc925ae4690a534b140d47ada | uswitch/bifrost | version.clj | (ns uswitch.bifrost.version
(:require [clojure.java.io :refer (resource)]
[clojure.string :refer (trim)]))
(defn current-build-number []
(if-let [build-number-res (resource "BUILD_NUMBER")]
(Integer/parseInt (trim (slurp build-number-res)))))
(defn current-version []
(let [base-version (slurp (r... | null | https://raw.githubusercontent.com/uswitch/bifrost/40a2bbb8af5c3b6d65930511c141c777a9585942/src/uswitch/bifrost/version.clj | clojure | (ns uswitch.bifrost.version
(:require [clojure.java.io :refer (resource)]
[clojure.string :refer (trim)]))
(defn current-build-number []
(if-let [build-number-res (resource "BUILD_NUMBER")]
(Integer/parseInt (trim (slurp build-number-res)))))
(defn current-version []
(let [base-version (slurp (r... | |
09b735f2c1f7c26a0fb52928a586ad3ed8d5ef51b9e4e40f6011e5fcad8bacb1 | jarohen/advent-of-code | day22.clj | (ns advent-of-code.day22
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn parse-grid [grid-str]
(let [cells (filter #{\# \.} (str/trim grid-str))
grid-size (int (Math/sqrt (count cells)))
offset (quot grid-size 2)]
(->> cells
(into {} (map-indexed (fn [id... | null | https://raw.githubusercontent.com/jarohen/advent-of-code/3fa1d87a539fb9163b05b732973bbd415dd21312/2017/src/advent_of_code/day22.clj | clojure | (ns advent-of-code.day22
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn parse-grid [grid-str]
(let [cells (filter #{\# \.} (str/trim grid-str))
grid-size (int (Math/sqrt (count cells)))
offset (quot grid-size 2)]
(->> cells
(into {} (map-indexed (fn [id... | |
b4ed2c47562343128a09be51b3b180a2888c85bd868584180f66fc3e703c0186 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] inh
[ @ISO639 - 3@ ] inh
[ @Native name@ ] -
[ @English name@ ] Ingush
[@ISO639-1@] -
[@ISO639-2@] inh
[@ISO639-3@] inh
[@Native name@] -
[@English name@] Ingush
-}
module Text.Numeral.Language.INH.Tes... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/INH/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] inh
[ @ISO639 - 3@ ] inh
[ @Native name@ ] -
[ @English name@ ] Ingush
[@ISO639-1@] -
[@ISO639-2@] inh
[@ISO639-3@] inh
[@Native name@] -
[@English name@] Ingush
-}
module Text.Numeral.Language.INH.Tes... |
33ec5545bd9a3609f1fef05f70adf68c32b2d64360587a46bcf994430b7a98a9 | janestreet/hardcaml_of_verilog | test_interface.ml | open! Core
open Hardcaml_of_verilog
open Expect_test_helpers_core
module I = struct
type 'a t = { a : 'a } [@@deriving sexp_of, hardcaml]
end
module O = struct
type 'a t = { b : 'a } [@@deriving sexp_of, hardcaml]
end
module Conv = With_interface.Make (I) (O)
let verilog = {| module testme (input [2:0] a, outpu... | null | https://raw.githubusercontent.com/janestreet/hardcaml_of_verilog/c1d4e5abe18a1b15e8858151a43aa69efcbbe07b/test/lib/test_interface.ml | ocaml | open! Core
open Hardcaml_of_verilog
open Expect_test_helpers_core
module I = struct
type 'a t = { a : 'a } [@@deriving sexp_of, hardcaml]
end
module O = struct
type 'a t = { b : 'a } [@@deriving sexp_of, hardcaml]
end
module Conv = With_interface.Make (I) (O)
let verilog = {| module testme (input [2:0] a, outpu... | |
a3b858713fe4dc7175c9d3283ab54805f5b82cd664ffe16b613d1cf2262a812c | josefs/Gradualizer | case_of_record_with_user_defined.erl | -module(case_of_record_with_user_defined).
-export([foo/2]).
-type pred() :: fun((term()) -> boolean()).
-record(state, { pred :: pred()}).
-spec foo(term(), #state{}) -> boolean().
foo(Event, State) ->
#state{ pred = Pred} = State,
case Pred(Event) of
true -> true;
_ -> false
end.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_pass/case_of_record_with_user_defined.erl | erlang | -module(case_of_record_with_user_defined).
-export([foo/2]).
-type pred() :: fun((term()) -> boolean()).
-record(state, { pred :: pred()}).
-spec foo(term(), #state{}) -> boolean().
foo(Event, State) ->
#state{ pred = Pred} = State,
case Pred(Event) of
true -> true;
_ -> false
end.
| |
26381d0dd44a1e65917d69f6d69a1d18835495e4a7571e3d7955f1989a8e26f2 | turtl/api | keychain.lisp | (in-package :turtl)
(defvalidator validate-keychain-entry
(("id" :type id :required t)
("user_id" :type id :required t)
("type" :type string :required t :max-length 24)
("item_id" :type string :required t)
("body" :type string :required t))
:old t)
(defafun get-keychain-entry-by-id (future) (key-id)
... | null | https://raw.githubusercontent.com/turtl/api/20ab4cc91128921300913b885eb1e201a5e0fc3f/models/keychain.lisp | lisp | TODO: compound index maybe??
no entry? fail silently
remove any boards we still have some level of
permissions for. this includes the board being
unshared
return the sync id(s) | (in-package :turtl)
(defvalidator validate-keychain-entry
(("id" :type id :required t)
("user_id" :type id :required t)
("type" :type string :required t :max-length 24)
("item_id" :type string :required t)
("body" :type string :required t))
:old t)
(defafun get-keychain-entry-by-id (future) (key-id)
... |
f82652a3601dcc033837a146eacbb201f3cfb54578cddaf6c653a525f33054ad | Clozure/ccl-tests | search-string.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Aug 25 13:06:54 2002
;;;; Contains: Tests for SEARCH on strings
(in-package :cl-test)
(compile-and-load "search-aux.lsp")
;;; The next test was busted due to to a stupid cut and paste
;;; error. The loop terminates immediately, doing nothing
useful . -- PF... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/search-string.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for SEARCH on strings
The next test was busted due to to a stupid cut and paste
error. The loop terminates immediately, doing nothing
(deftest search-string.1
(let ((target *searched-string*)
(pat #(a)))
(loop for i from 0 to (1- (length target))
for tail on target
... | Author :
Created : Sun Aug 25 13:06:54 2002
(in-package :cl-test)
(compile-and-load "search-aux.lsp")
useful . -- PFD
(deftest search-string.2
(let ((target *searched-string*)
(pat #(a)))
(loop for i from 1 to (length target)
always
(let ((pos (search pat target :end2 i :from-end t)))
... |
ce0b305e3891a90c0f113ff2868fe89f8b718ab4a5de153f264e3637728074d5 | INRIA/zelus | oprinter.ml | (***********************************************************************)
(* *)
(* *)
(* Zelus, a synchronous language for hybrid systems *)
(* ... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/compiler/gencode/oprinter.ml | ocaml | *********************************************************************
Zelus, a synchronous language for hybrid systems
... | ( c ) 2020 Paris ( see the file )
Automatique . All rights reserved . This file is distributed under
the terms of the INRIA Non - Commercial License Agreement ( see the
open Zmisc
open Zlocation
open Zident
open Obc
open Format
open Pp_tools
open Printer
let rec priori... |
0f75b5a272fd2dce81fc9e72f9a8bba42b5dd409fc6ce6b6460644d6c4620864 | dmitryvk/sbcl-win32-threads | globals.lisp | ;;;; This file contains special proclamations for variables that are
;;;; referenced in the code sources before they are defined. There are
;;;; also function proclamations to make some common functions be
;;;; known, avoiding work in recording the calls that are done before
;;;; the definition.
This software is par... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/globals.lisp | lisp | This file contains special proclamations for variables that are
referenced in the code sources before they are defined. There are
also function proclamations to make some common functions be
known, avoiding work in recording the calls that are done before
the definition.
more information.
public domain. The sof... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
(declaim (special *keyword-package* *cl-package*
original-lisp-environment
... |
9824fd31de96cbfe97e770e7cee3c2f4db5194d9f2f122240d8ce428578caa5f | pmundkur/flowcaml | parse.ml | (**************************************************************************)
(* *)
(* *)
, Projet C... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/parsing/parse.ml | ocaml | ************************************************************************
et en Automatique. All ri... |
, Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the Q Public License version 1.0 .
$ I d : parse.ml , v 1.2 2003/06/26 13:... |
3256174ebad694543fdc6a444c1979b428ce34cd3d046f225b697e9a16e1b2f5 | AccelerateHS/accelerate-fft | Native.hs | # LANGUAGE GADTs #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
-- |
-- Module : Data.Array.Accelerate.Math.FFT.LLVM.Native
Copyright : [ 2017 .. 2020 ] The Accelerate ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-fft/3c195de6a4528071388d817f55b0a7adf0547cc6/src/Data/Array/Accelerate/Math/FFT/LLVM/Native.hs | haskell | # LANGUAGE TypeOperators #
|
Module : Data.Array.Accelerate.Math.FFT.LLVM.Native
License : BSD3
Stability : experimental
| # LANGUAGE GADTs #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
Copyright : [ 2017 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Acc... |
883b129b22a9d35917cf8357f015cd1e87f6a69370565162579c3b24963f9897 | MatthewRock/cl-trie | basic.lisp | Copyright ( c ) 2017
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
;; to use, copy, modify, merge, publish, distribute,... | null | https://raw.githubusercontent.com/MatthewRock/cl-trie/14edddf0d977231db16d0218c1253fecce3d5b33/examples/basic/basic.lisp | lisp | Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice an... | Copyright ( c ) 2017
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
f996ce3c52a822484c5ba8731aefca880649017eea398ce1d220bd561e4a2157 | GaloisInc/haskell-tor | DH.hs | |Handy Diffie - Hellman constants
module Tor.Link.DH(
oakley2
)
where
import Crypto.PubKey.DH
|The second Oakley group from RFC 2409 , which provides ~1024 bits of
-- security.
oakley2 :: Params
oakley2 = Params {
params_p = 0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC740... | null | https://raw.githubusercontent.com/GaloisInc/haskell-tor/e5bfe82f63722292df5634686195f85e3a7857b2/src/Tor/Link/DH.hs | haskell | security. | |Handy Diffie - Hellman constants
module Tor.Link.DH(
oakley2
)
where
import Crypto.PubKey.DH
|The second Oakley group from RFC 2409 , which provides ~1024 bits of
oakley2 :: Params
oakley2 = Params {
params_p = 0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B... |
6cd9be9c36fe3373905e0ba9182dcaa09fd18b9cf9261836411a2bb4257759c6 | zyrolasting/racket-vulkan | minimal.rkt | #lang racket/base
(require vulkan/unsafe
ffi/unsafe)
(define appinfo
(make-VkApplicationInfo VK_STRUCTURE_TYPE_APPLICATION_INFO
#f
#"Minimal Vulkan"
0
#"Engine"
0
... | null | https://raw.githubusercontent.com/zyrolasting/racket-vulkan/4f743b4b2933173ee4f141e5ae94739895c54b67/examples/minimal.rkt | racket | #lang racket/base
(require vulkan/unsafe
ffi/unsafe)
(define appinfo
(make-VkApplicationInfo VK_STRUCTURE_TYPE_APPLICATION_INFO
#f
#"Minimal Vulkan"
0
#"Engine"
0
... | |
53414b85e5352305b59678b918020341565075388a89a1f2c98e8e5b2f2d4456 | papertrail/slack-hooks | travis.clj | (ns slack-hooks.service.travis
(:require [clojure.data.json :as json]
[slack-hooks.slack :as slack]
[clj-time.core :as time]
[clj-time.format :as time-format]
[clojure.string :as str]))
(def travis-username
(or
(System/getenv "TRAVIS_USERNAME")
"travis-ci"))
... | null | https://raw.githubusercontent.com/papertrail/slack-hooks/e9cfdbfee40e678be956416366684ee22d6cb282/src/slack_hooks/service/travis.clj | clojure | (prn (-> request :params :payload)) | (ns slack-hooks.service.travis
(:require [clojure.data.json :as json]
[slack-hooks.slack :as slack]
[clj-time.core :as time]
[clj-time.format :as time-format]
[clojure.string :as str]))
(def travis-username
(or
(System/getenv "TRAVIS_USERNAME")
"travis-ci"))
... |
1c75594ee275bb020927e1b038663d9d14aa4ce6c0d0bf30fcf65be9779b813a | amnh/PCG | Memoized.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.TCM.Memoized
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-----------------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/tcm-memo/src/Data/TCM/Memoized.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.TCM.Memoized
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
|
generating function for unam... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
module Data.TCM.Memoized
( FFI.MemoizedCostMatrix
, generateMemoizedTransitionCostMatrix
, FFI.getMedianAndCost2D
, FFI.getMedianAndCost3D
) where
import qualified Data.TCM.Memoized.FFI as FFI
/O(n^2)/ where @n@ is the alphabet size .
Generate a memoiz... |
4850e74f01edbf783a1722157a9934c03cbed18bd13ab06471b2d42dc26707ce | s0kil/000-rip | New.hs | module Web.View.Links.New where
import Web.View.Prelude
data NewView = NewView { link :: Link }
instance View NewView where
html NewView { .. } = [hsx|
{breadcrumb}
<div class="h-100" id="sessions-new">
<div class="d-flex align-items-center">
<div class="w-100">
... | null | https://raw.githubusercontent.com/s0kil/000-rip/00eea161cf522cc9618195c83661914453ab210f/Web/View/Links/New.hs | haskell | module Web.View.Links.New where
import Web.View.Prelude
data NewView = NewView { link :: Link }
instance View NewView where
html NewView { .. } = [hsx|
{breadcrumb}
<div class="h-100" id="sessions-new">
<div class="d-flex align-items-center">
<div class="w-100">
... | |
4c438e670eff10814c95e7c8f109342760ad18f86d7a4d39abbf4d5bdd7a6f65 | mishun/tangles | PlanarAlgebra.hs | # LANGUAGE TypeFamilies #
module Math.Topology.KnotTh.Algebra.PlanarAlgebra
( PlanarAlgebra(..)
, DartDiagram'(..)
, DartDiagram(..)
, hasDarts
, VertexDiagram'(..)
, VertexDiagram(..)
, hasVertices
, allOutcomingDarts
, LeggedDiagram(..)
, hasLegs
, firstLeg
, lastLeg
... | null | https://raw.githubusercontent.com/mishun/tangles/9af39dd48e3dcc5e3944f8d060c8769ff3d81d02/src/Math/Topology/KnotTh/Algebra/PlanarAlgebra.hs | haskell | | Never call it. Default horizontalComposition and horizontalLooping call it after all bound checks.
TODO: remove it?
TODO: remove it?
forMOutcomingDarts :: (Monad m) => Vertex d a -> (Dart d a -> m ()) -> m ()
foldMOutcomingDarts :: (Monad m) => Vertex d a -> (s -> Dart d a -> m s) -> s -> m s
foldMOutcomi... | # LANGUAGE TypeFamilies #
module Math.Topology.KnotTh.Algebra.PlanarAlgebra
( PlanarAlgebra(..)
, DartDiagram'(..)
, DartDiagram(..)
, hasDarts
, VertexDiagram'(..)
, VertexDiagram(..)
, hasVertices
, allOutcomingDarts
, LeggedDiagram(..)
, hasLegs
, firstLeg
, lastLeg
... |
a1749f8ba4c09bf7fb7af3d105c16678b8801cc05eb3e80f9e9e08d9772f12f8 | tfeb/dsm | test-ll.lisp | ;;;; Test lambda list interpretation for dsm
;;;
;;; Note that 'lambda list' means 'destructuring-match lambda list'.
;;; These should be the same as destructuring-match lambda lists with
;;; the exception that 'lambda lists' which are symbols work like
;;; &rest (this was an accident, but its a nice one).
;;;
;;; This... | null | https://raw.githubusercontent.com/tfeb/dsm/4ff10b817797073a67ac10fd00ddd68c4e8869f9/test/test-ll.lisp | lisp | Test lambda list interpretation for dsm
Note that 'lambda list' means 'destructuring-match lambda list'.
These should be the same as destructuring-match lambda lists with
the exception that 'lambda lists' which are symbols work like
&rest (this was an accident, but its a nice one).
This is not complete by any m... |
(in-package :org.tfeb.dsm/test)
(define-test ("org.tfeb.dsm" "org.tfeb.dsm.ll"))
(define-test ("org.tfeb.dsm.ll" "required")
(is equal '(1) (match-one '(a) '(1)))
(false (match-one '(a) '()))
(false (match-one '(a) '(1 2)))
(let ((ll '(a b c)))
(is equal '(1 2 3) (match-one ll '(1 2 3)))
(false (matc... |
d8fc58e254284110564f6a06ddd985b42d9bacfed1e8eb79b58abb5fa1180b49 | jiesoul/soul-talk | spec.clj | (ns soul-talk.site-info.spec
(:require [soul-talk.spec.core :as spec]
[spec-tools.data-spec :as ds]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]))
(def update-site-info
(ds/spec {:name :site-info/update
:spec {:id spec/id
:na... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/site_info/spec.clj | clojure | (ns soul-talk.site-info.spec
(:require [soul-talk.spec.core :as spec]
[spec-tools.data-spec :as ds]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]))
(def update-site-info
(ds/spec {:name :site-info/update
:spec {:id spec/id
:na... | |
a1ac3a037c709099ba09fa610681077b9190ef648a5dba6802e1358881cdfe3b | basho/riak_cs | riak_cs_manifest_fsm.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 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 . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_manifest_fsm.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 permiss... | Copyright ( c ) 2007 - 2013 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
... |
996d15256936ab3be62a8803e74498ca723796cc2bc4682a7c34a4afd0da5e8e | vlaaad/reveal | e09_results_panel_tree_view.clj | (ns e09-results-panel-tree-view
(:require [vlaaad.reveal :as r]
[cljfx.ext.tree-view :as fx.ext.tree-view]
[cljfx.api :as fx])
(:import [javafx.scene.input KeyEvent KeyCode]
[javafx.scene.control TreeView]
[javafx.event EventDispatcher]))
JavaFX TreeView consumes som... | null | https://raw.githubusercontent.com/vlaaad/reveal/2c4e6ec40b4e8c9ebce1cc2cf1f4a35dc1ea5666/examples/e09_results_panel_tree_view.clj | clojure | you are creating custom actions that produce tree views, you might want to
make TreeView ignore these.
This function initializes tree view and reconfigures event dispatcher to
ignore some key presses:
Ignore Escape (to allow closing results panel tab) and Space (so
it's impossible to have no rows selected in tree... | (ns e09-results-panel-tree-view
(:require [vlaaad.reveal :as r]
[cljfx.ext.tree-view :as fx.ext.tree-view]
[cljfx.api :as fx])
(:import [javafx.scene.input KeyEvent KeyCode]
[javafx.scene.control TreeView]
[javafx.event EventDispatcher]))
JavaFX TreeView consumes som... |
658e3087e7917e23295e4f7ad7ed61c45770a4786ecadfeb2f45111f61848afd | cbaggers/rtg-math | common.lisp | (in-package :%rtg-math.matrix2.common)
;;----------------------------------------------------------------
(defn melm ((mat-a mat2) (row (integer 0 1)) (col (integer 0 1))) single-float
"Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in
column major order... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/matrices/matrix2/common.lisp | lisp | ----------------------------------------------------------------
---------------------------------------------------------------- | (in-package :%rtg-math.matrix2.common)
(defn melm ((mat-a mat2) (row (integer 0 1)) (col (integer 0 1))) single-float
"Provides access to data in the matrix by row
and column number. The actual data is stored in a 1d list in
column major order, but this abstraction means we only have
to think in row major ... |
4c5f4149e078dd8362fc1e51356fd865a91c7928aa7903a6c889f1dcc1260f25 | input-output-hk/cardano-wallet-legacy | EosWallets.hs | # OPTIONS_GHC -fno - warn - unused - imports #
module Test.Integration.Scenario.EosWallets
( spec
) where
import Universum
import qualified Data.List.NonEmpty as NE
import Cardano.Wallet.API.V1.Types
import Cardano.Wallet.Client.Http (ClientError, Wallet)
import qualified Carda... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/integration/Test/Integration/Scenario/EosWallets.hs | haskell | updated
not updated | # OPTIONS_GHC -fno - warn - unused - imports #
module Test.Integration.Scenario.EosWallets
( spec
) where
import Universum
import qualified Data.List.NonEmpty as NE
import Cardano.Wallet.API.V1.Types
import Cardano.Wallet.Client.Http (ClientError, Wallet)
import qualified Carda... |
cec898a16cc8b5ff0d17f7af13312e50b3b175148d35e50b57fc07965b4131f9 | jaked/ocamljs | raiseargs.ml | open OUnit
type 'a triple = Smaller of 'a * 'a * 'a | Bigger of 'a * 'a * 'a
let print_triple tr = match tr with
| Smaller(l,m,s)
| Bigger (s,m,l) ->
s ^ " " ^ m ^ " " ^ l
let tests = "Raisargs" >:: begin fun () ->
assert_equal (print_triple (Smaller("Large", "Medium", "Small"))) "Small Medium Large";
... | null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/test/ocamljs/raiseargs.ml | ocaml | open OUnit
type 'a triple = Smaller of 'a * 'a * 'a | Bigger of 'a * 'a * 'a
let print_triple tr = match tr with
| Smaller(l,m,s)
| Bigger (s,m,l) ->
s ^ " " ^ m ^ " " ^ l
let tests = "Raisargs" >:: begin fun () ->
assert_equal (print_triple (Smaller("Large", "Medium", "Small"))) "Small Medium Large";
... | |
70b695b8c50e0dc3a4e01698ea79e29e6a1399ef08629bbcf77a1735fce70eac | facebookarchive/pfff | test_parsing_text.ml | open Common
(*****************************************************************************)
(* Subsystem testing *)
(*****************************************************************************)
let test_parse_org file =
let org = Org_mode.parse file in
pr2_gen org
(********************************************... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_text/test_parsing_text.ml | ocaml | ***************************************************************************
Subsystem testing
***************************************************************************
***************************************************************************
Main entry for Arg
***************************************************... | open Common
let test_parse_org file =
let org = Org_mode.parse file in
pr2_gen org
let actions () = [
"-parse_org", " <file>",
Common.mk_action_1_arg test_parse_org;
]
|
57e9dcee2f86f96cfb0256f9bad8b47fae1fa25be760c2b0ca808a74d5c0b1a2 | dom8509/logseq-to-markdown | utils.cljs | (ns logseq-to-markdown.utils
(:require [cljs-time.coerce :as tc]
[cljs-time.core :as t]
[clojure.string :as s]))
(defn- format-date
[date]
(if (< date 10)
(str "0" date)
(str date)))
(defn ->hugo-date
[timestamp]
(let [date (tc/from-long timestamp)
year (t/year date)
... | null | https://raw.githubusercontent.com/dom8509/logseq-to-markdown/897a5e4c9bb338d56fb09a3ce2681510475b3bb2/src/logseq_to_markdown/utils.cljs | clojure | (ns logseq-to-markdown.utils
(:require [cljs-time.coerce :as tc]
[cljs-time.core :as t]
[clojure.string :as s]))
(defn- format-date
[date]
(if (< date 10)
(str "0" date)
(str date)))
(defn ->hugo-date
[timestamp]
(let [date (tc/from-long timestamp)
year (t/year date)
... | |
5e2ed4e858c8df5a186ca2cc5d2e39f47bf90842917401b6bd13860b1b421c6b | noinia/hgeometry | IpeOut.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
--------------------------------------------------------------------------------
-- |
Module : Ipe . IpeOut
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
Functions that help drawing geometric valu... | null | https://raw.githubusercontent.com/noinia/hgeometry/ddc7d456cbee3e2cd998857780089e1469ba81ba/hgeometry-ipe/src/Ipe/IpeOut.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
|
License : see the LICENSE file
conversion function from a geometry type g to an ipe type.
------------------------------------------------------------------------------
----------------------------... | # LANGUAGE ScopedTypeVariables #
Module : Ipe . IpeOut
Copyright : ( C )
Maintainer :
Functions that help drawing geometric values in ipe . An " IpeOut " is
essenitally a function that converts a geometric type g into an IpeObject .
We also proivde a " " typeclass that defines a defaul... |
fddc06bc5e5d40c9e15fec487ae9eb71023a0d1000e86b4c72071b9089edd1a8 | reborg/clojure-essential-reference | 4.clj | < 1 >
produce 4
produce 3
produce 2
produce 1
produce 0 ; ... wait 2 seconds ; < 2 >
consume 4 ; ... wait 2 seconds
consume 3 ; ... wait 2 seconds
consume 2 ; ... wait 2 seconds
consume 1 ; ... wait 2 seconds
;; consume 0 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/SequentialGeneration/FromCollections/seque/4.clj | clojure | ... wait 2 seconds ; < 2 >
... wait 2 seconds
... wait 2 seconds
... wait 2 seconds
... wait 2 seconds
consume 0 | < 1 >
produce 4
produce 3
produce 2
produce 1 |
bca764c187490e2c18ea20c7402a2f417f3f8952de006bc1457e079b12f9a981 | cabol/west | west_cowboy_ws_json_handler.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 , 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 may obtain
%% a copy of ... | null | https://raw.githubusercontent.com/cabol/west/c3c31dff9ad727ce9b82dde6eb690f7b11cd4d24/src/endpoints/cowboy/west_cowboy_ws_json_handler.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 , 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
@author < >
( C... |
d07caa942eb94693c6eb364df1956ff9abd53e8c5f61c609c6d650422c8a3423 | alanz/ghc-exactprint | MultiLineWarningPragma.hs |
# WARNING Logic
, mkSolver
, mkSimpleSolver
, mkSolverForLogic
, solverSetParams
, solverPush
, solverPop
, solverReset
, solverGetNumScopes
, solverAssertCnstr
, solverAssertAndTrack
, s... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/MultiLineWarningPragma.hs | haskell |
# WARNING Logic
, mkSolver
, mkSimpleSolver
, mkSolverForLogic
, solverSetParams
, solverPush
, solverPop
, solverReset
, solverGetNumScopes
, solverAssertCnstr
, solverAssertAndTrack
, s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.