_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 |
|---|---|---|---|---|---|---|---|---|
0aadb9afb8f01f7725cf62092a177dbad7df2c85df18ab0b9d4abb6761f0794a | takikawa/sweet-racket | paren-shape.rkt | #lang sweet-exp racket/base
require rackunit
for-syntax racket/base
racket/match
define-syntax get-paren-shape
lambda (stx)
#`#,(or (syntax-property stx 'paren-shape) #\( )
check-equal? (get-paren-shape) #\(
check-equal? [get-paren-shape] #\[
check-equal? get-paren-shape() #\(
check-... | null | https://raw.githubusercontent.com/takikawa/sweet-racket/a3c1ae74c2e75e8d6164a3a9d8eb34335a7ba4de/sweet-exp-test/sweet-exp/tests/paren-shape.rkt | racket | #lang sweet-exp racket/base
require rackunit
for-syntax racket/base
racket/match
define-syntax get-paren-shape
lambda (stx)
#`#,(or (syntax-property stx 'paren-shape) #\( )
check-equal? (get-paren-shape) #\(
check-equal? [get-paren-shape] #\[
check-equal? get-paren-shape() #\(
check-... | |
5103e59d7c225e2e994d8bce72e80936fdef106fbb5b6b6fe214a3944b635161 | kupl/LearnML | patch.ml | let rec iter ((n : int), (f : int -> int)) : int -> int =
let f2 (x : int) : int =
match n with 0 -> f x | 1 -> f x | _ -> f (iter (n - 1, f) x)
in
match n with
| 0 -> fun (__s5 : int) -> __s5
| __s6 -> fun (__s7 : int) -> iter (n - 1, f) (f __s7)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub44/patch.ml | ocaml | let rec iter ((n : int), (f : int -> int)) : int -> int =
let f2 (x : int) : int =
match n with 0 -> f x | 1 -> f x | _ -> f (iter (n - 1, f) x)
in
match n with
| 0 -> fun (__s5 : int) -> __s5
| __s6 -> fun (__s7 : int) -> iter (n - 1, f) (f __s7)
| |
e4ffe0ba8ca90438c8b9518a75be0f83b7a7edd25557e3b5efc3b61d362259d1 | umd-cmsc330/fall2022 | nfa.ml | open List
open Sets
(*********)
(* Types *)
(*********)
type ('q, 's) transition = 'q * 's option * 'q
type ('q, 's) nfa_t = {
sigma: 's list;
qs: 'q list;
q0: 'q;
fs: 'q list;
delta: ('q, 's) transition list;
}
(***********)
(* Utility *)
(***********)
(* explode converts a string to a character list *)... | null | https://raw.githubusercontent.com/umd-cmsc330/fall2022/7106b342a8fc46c4c17744152880f59dc28ea7ca/project3/src/nfa.ml | ocaml | *******
Types
*******
*********
Utility
*********
explode converts a string to a character list
**************
**************
*****************************
***************************** | open List
open Sets
type ('q, 's) transition = 'q * 's option * 'q
type ('q, 's) nfa_t = {
sigma: 's list;
qs: 'q list;
q0: 'q;
fs: 'q list;
delta: ('q, 's) transition list;
}
let explode (s: string) : char list =
let rec exp i l =
if i < 0 then l else exp (i - 1) (s.[i] :: l)
in
exp (String.le... |
5cc4329cff14d50b772cb5bd43c39279a616196173d0b3d1020cfd69b40dc679 | rongarret/ergolib | bootstrap.lisp | (define-class panel name content)
(define-method (label (p panel name)) name)
(define-method (html-render (p panel content)) (html-render content))
(defmacro panel (name &rest content)
`(make-panel :name ,name :content (html-string (whos ,@content))))
(define-class panelgroup name panels)
(define-method (html-re... | null | https://raw.githubusercontent.com/rongarret/ergolib/757e67471251ed1329e5c35c008fb69964567994/web/bootstrap.lisp | lisp | ID links to label, name links to panelgroup, value links to panel
});
For accessibility
Experiments | (define-class panel name content)
(define-method (label (p panel name)) name)
(define-method (html-render (p panel content)) (html-render content))
(defmacro panel (name &rest content)
`(make-panel :name ,name :content (html-string (whos ,@content))))
(define-class panelgroup name panels)
(define-method (html-re... |
3ab5d23335c2bbfee33a63418508c27c9b6d22c98ce4d77a22b362b51e35f170 | cjlarose/de-jong | points_calculator.cljs | (ns de-jong.points-calculator)
(defn- vertex-array [length]
(js/Float32Array. (* 3 length)))
(defn random-vals [minimum maximum]
(repeatedly #(+ (rand (- maximum minimum)) minimum)))
(defn- write-random-values! [minimum maximum vertices]
(let [length (.-length vertices)]
(loop [i 0
values (... | null | https://raw.githubusercontent.com/cjlarose/de-jong/b627e46e3e3c42ca3fa3cf786218086211a1e6d7/src/de_jong/points_calculator.cljs | clojure | (ns de-jong.points-calculator)
(defn- vertex-array [length]
(js/Float32Array. (* 3 length)))
(defn random-vals [minimum maximum]
(repeatedly #(+ (rand (- maximum minimum)) minimum)))
(defn- write-random-values! [minimum maximum vertices]
(let [length (.-length vertices)]
(loop [i 0
values (... | |
a3e8efff16ca4cd5728d157a05d9804e873c0cf399ffe2ec3331409ec4893c5d | nikita-volkov/graph-db | Demo.hs |
import BasicPrelude
import GHC.Generics (Generic)
import qualified GraphDB as G
import qualified Data.Text as Text
-- * Model
-------------------------
data Catalogue = Catalogue deriving (Show, Eq, Generic)
data Artist = Artist Name deriving (Show, Eq, Generic)
data Genre = Genre Name deriving (Show, Eq, Generic)
... | null | https://raw.githubusercontent.com/nikita-volkov/graph-db/3e886f6b298d2b2b09eb94c2818a7b648f42cb0a/executables/Demo.hs | haskell | * Model
-----------------------
* Relations
----------------------- |
import BasicPrelude
import GHC.Generics (Generic)
import qualified GraphDB as G
import qualified Data.Text as Text
data Catalogue = Catalogue deriving (Show, Eq, Generic)
data Artist = Artist Name deriving (Show, Eq, Generic)
data Genre = Genre Name deriving (Show, Eq, Generic)
type Name = Text
instance G.Edge Ca... |
70275951b87e6bb2822bb3b26ea298830f21c4d7ee01ff43aaa47d0c18c89ccb | karlhof26/gimp-scheme | FU_artist_palette-knife.scm | ; FU_artist_palette-knife.scm
version 2.9 [ gimphelp.org ]
last modified / tested by
02/15/2014 on GIMP-2.8.10
;
; 02/15/2014 - work with non-rgb, merge option and install info added
;==============================================================
;
; Installation:
; This script should be placed in the user or s... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/50d5917de653ad15747da554f58884174c4bb652/FU_artist_palette-knife.scm | scheme | FU_artist_palette-knife.scm
02/15/2014 - work with non-rgb, merge option and install info added
==============================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 10
or
C:\Documents and Settings\yourname\.gimp-2.10\script... | version 2.9 [ gimphelp.org ]
last modified / tested by
02/15/2014 on GIMP-2.8.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\.gimp-2.10\scripts
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
/home / yourname/.gimp-2.8 / scripts
C:\Program Files\GIMP 2\share\gimp\2.0\gimpressi... |
0c058d311b74fd51bdeca970e60c5600c9e56610d38131fe1d182368e62ed8f4 | cnuernber/dtype-next | double_ops.clj | (ns tech.v3.datatype.double-ops
(:require [clj-commons.primitive-math :as pmath]))
(defmacro SIGNIFICAND-BITS
[]
`52)
(defmacro SIGNIFICAND-MASK [] `0x000fffffffffffff)
(defmacro IMPLICIT-BIT [] `(pmath/+ (SIGNIFICAND-MASK) 1))
(defmacro is-finite?
[x]
`(<= (Math/getExponent ~x)
Double/MAX_EXPONEN... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/7f3d85d159c3a74d5fca53c8c50243812e0da4e2/src/tech/v3/datatype/double_ops.clj | clojure | (ns tech.v3.datatype.double-ops
(:require [clj-commons.primitive-math :as pmath]))
(defmacro SIGNIFICAND-BITS
[]
`52)
(defmacro SIGNIFICAND-MASK [] `0x000fffffffffffff)
(defmacro IMPLICIT-BIT [] `(pmath/+ (SIGNIFICAND-MASK) 1))
(defmacro is-finite?
[x]
`(<= (Math/getExponent ~x)
Double/MAX_EXPONEN... | |
5a120e7b570ae38ea39e58513c92d1cc2e3501cd41eb80108297a9b7a51f6261 | fizruk/snakes-demo | Snakes.hs | module Snakes (
module Snakes.Bot,
module Snakes.Config,
module Snakes.Control,
module Snakes.Model,
module Snakes.Render,
) where
import Snakes.Bot
import Snakes.Config
import Snakes.Control
import Snakes.Model
import Snakes.Render
| null | https://raw.githubusercontent.com/fizruk/snakes-demo/1844a047ccebfb2d9753530ccb3d9f51aa1b42b2/src/Snakes.hs | haskell | module Snakes (
module Snakes.Bot,
module Snakes.Config,
module Snakes.Control,
module Snakes.Model,
module Snakes.Render,
) where
import Snakes.Bot
import Snakes.Config
import Snakes.Control
import Snakes.Model
import Snakes.Render
| |
c5097122dea1831a8005d88098249a30da9ec799d790dbf16240c0c942f77a2b | fukamachi/docker-cl-example | application.lisp | (defpackage #:docker-cl-example/config/application
(:use #:cl
#:utopian)
(:import-from #:lack.component
#:to-app
#:call)
(:import-from #:lack
#:builder)
(:import-from #:cl-ppcre)
(:export #:docker-cl-example-app))
(in-package #:docker-cl-example/config/a... | null | https://raw.githubusercontent.com/fukamachi/docker-cl-example/dccaf44ea71dab730ce74097990c36ec275ff69c/standard/config/application.lisp | lisp | (defpackage #:docker-cl-example/config/application
(:use #:cl
#:utopian)
(:import-from #:lack.component
#:to-app
#:call)
(:import-from #:lack
#:builder)
(:import-from #:cl-ppcre)
(:export #:docker-cl-example-app))
(in-package #:docker-cl-example/config/a... | |
34e959e5881c9869bab9ccbab1eace0105d2a59ae0cf3599010cad77c6f7354d | LaurentRDC/pandoc-plot | Logging.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : $header$
Copyright : ( c ) , 2019 - present
License : GNU GPL , version 2 or above
-- Maintainer :
-- Stability : internal
-- Portability : portable
--
-- Logging primitives.
module Text.Pandoc.Filter.Plot.Monad.Loggi... | null | https://raw.githubusercontent.com/LaurentRDC/pandoc-plot/af88b7e8a330a6964ba5979e71ff84af2da9944a/src/Text/Pandoc/Filter/Plot/Monad/Logging.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : $header$
Maintainer :
Stability : internal
Portability : portable
Logging primitives.
* Logging messages
| Verbosity of the logger.
| Log all messages, including debug messages.
| Log information, warning, and error messages.
| Log warning and error message... | # LANGUAGE LambdaCase #
Copyright : ( c ) , 2019 - present
License : GNU GPL , version 2 or above
module Text.Pandoc.Filter.Plot.Monad.Logging
( MonadLogger (..),
Verbosity (..),
LogSink (..),
Logger (..),
withLogger,
terminateLogging,
debug,
err,
warning,
info,
... |
5f2d39bfea4ffe0039060bda1eb12d40c781669ab53f8ee8318fd4f395bf457b | m-2k/erlach | db_user.erl | -module(db_user).
% -include_lib("kvs/include/kvs.hrl").
-include_lib("kvs/include/metainfo.hrl").
% -include_lib("kvs/include/feed.hrl").
% -include_lib("db/include/db.hrl").
-include_lib("db/include/user.hrl").
-compile(export_all).
%% rr(kvs), rr("apps/db/include/thread.hrl").
{ ok , P } = kvs : get(post , 1 ) , ... | null | https://raw.githubusercontent.com/m-2k/erlach/ce0a19a0550c3457a1fc1d7c40e4f1cb577d7924/apps/db/src/db_user.erl | erlang | -include_lib("kvs/include/kvs.hrl").
-include_lib("kvs/include/feed.hrl").
-include_lib("db/include/db.hrl").
rr(kvs), rr("apps/db/include/thread.hrl"). | -module(db_user).
-include_lib("kvs/include/metainfo.hrl").
-include_lib("db/include/user.hrl").
-compile(export_all).
{ ok , P } = kvs : get(post , 1 ) , kvs : put(P#post{message="AAA " } ) .
metainfo() ->
#schema{name=kvs,tables=[
#table{name=user3,container=feed,fields=record_info(fields,user3),keys=... |
215798bbcb8b4058412b093b1c32061224b6200de66517de62f7b687568a1701 | startling/partly | MBR.hs | | Types for dealing with the old - fasioned and modern Master Boot Records .
This does not cover things like the GUID partition table or any of the
weird variations like AAP or NEWLDR .
module System.Disk.Partitions.MBR where
-- base:
import Prelude hiding (head)
import Control.Applicative
import Control.Monad
im... | null | https://raw.githubusercontent.com/startling/partly/d23b27910084eede0828bc421d7c1923660826b2/System/Disk/Partitions/MBR.hs | haskell | base:
bytestring:
binary:
in fact, they're a timestamp and a drive number.
See <>.
| A representation of the cylinder\/head\/sector addresses in MBRs.
| The head number.
Haskell doesn't have a convenient way to deal with those.
Mask away the high byte of c.
| Partition entries themselves are somewhat intric... | | Types for dealing with the old - fasioned and modern Master Boot Records .
This does not cover things like the GUID partition table or any of the
weird variations like AAP or NEWLDR .
module System.Disk.Partitions.MBR where
import Prelude hiding (head)
import Control.Applicative
import Control.Monad
import Data... |
df59438fca320db2951e9401fcaa6d8615f33d264bf07bbbb3b1bd5a9843045f | dyzsr/ocaml-selectml | printclambda_primitives.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/middle_end/printclambda_primitives.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Asttypes
let boxed_integer_name = function
| Lambda.Pnativeint -> "nativeint"
| La... |
a206a9a0a37391c081aef53cf8b77fc2fe65ee278e1629f35708e9cf26c48a55 | bsless/clj-fast | concurrent_map.clj | (ns clj-fast.collections.concurrent-map
(:refer-clojure :exclude [get memoize])
(:require
[clj-fast
[util :as u]
[lens :as lens]])
(:import
[java.util Map]
[java.util.concurrent
ConcurrentMap ;; interface
ConcurrentHashMap
ConcurrentSkipListMap]))
(def ^:const t {:tag 'java.util.conc... | null | https://raw.githubusercontent.com/bsless/clj-fast/2e9ea92428a4f3e75c23c767c43f0079b6a1a1ce/src/clj_fast/collections/concurrent_map.clj | clojure | interface | (ns clj-fast.collections.concurrent-map
(:refer-clojure :exclude [get memoize])
(:require
[clj-fast
[util :as u]
[lens :as lens]])
(:import
[java.util Map]
[java.util.concurrent
ConcurrentHashMap
ConcurrentSkipListMap]))
(def ^:const t {:tag 'java.util.concurrent.ConcurrentMap})
(defn -... |
1d58be55b06d3c8670360b7049cd872e0ce3caaa061d8fc45f49b036b690748c | EFanZh/EOPL-Exercises | exercise-5.15-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-5.15.rkt")
(check-equal? (run "2") (num-val 2))
(check-equal? (run "-(3, 3)") (num-val 0))
(check-equal? (run "-(3, 4)") (num-val -1))
(check-equal? (run "-(4, 3)") (num-val 1))
(check-equal? (run "zero?(0)") (bool-val #t))
(check-equal? (run "zero?... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-5.15-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-5.15.rkt")
(check-equal? (run "2") (num-val 2))
(check-equal? (run "-(3, 3)") (num-val 0))
(check-equal? (run "-(3, 4)") (num-val -1))
(check-equal? (run "-(4, 3)") (num-val 1))
(check-equal? (run "zero?(0)") (bool-val #t))
(check-equal? (run "zero?... | |
d47a40a089bf88776f13ef9e23ce0fea8ed73c227a6a40d0a16ca15112ae7d9d | clckwrks/clckwrks | URL.hs | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
module Clckwrks.ProfileData.URL where
import Data.Data (Data, Typeable)
import Data.SafeCopy (SafeCopy(..), base, deriveSafeCopy)
import Data.UserId (UserId)
import Web.Routes.TH (derivePathInfo)
data Profi... | null | https://raw.githubusercontent.com/clckwrks/clckwrks/dd4ea1e2f41066aa5779f1cc22f3b7a0ca8a0bed/Clckwrks/ProfileData/URL.hs | haskell | # LANGUAGE DeriveDataTypeable , TemplateHaskell #
module Clckwrks.ProfileData.URL where
import Data.Data (Data, Typeable)
import Data.SafeCopy (SafeCopy(..), base, deriveSafeCopy)
import Data.UserId (UserId)
import Web.Routes.TH (derivePathInfo)
data Profi... | |
48de77f3df9d1849c85604ef3ecd280a5b984b3438c9618de29bb7fa9c6e4e05 | haskus/haskus-system | MicroArch.hs | -- | X86 Archtiectures and micro-architectures
module Haskus.Arch.X86_64.ISA.MicroArch
( X86Arch(..)
)
where
-- | X86 micro-architecture
data X86Arch
= Intel486
| IntelPentium
| IntelP6
deriving (Show,Eq)
| null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Arch/X86_64/ISA/MicroArch.hs | haskell | | X86 Archtiectures and micro-architectures
| X86 micro-architecture | module Haskus.Arch.X86_64.ISA.MicroArch
( X86Arch(..)
)
where
data X86Arch
= Intel486
| IntelPentium
| IntelP6
deriving (Show,Eq)
|
f35f47acdb44497176a466497ec40e6e56ba53ca3b1c7f6943fd46ca91b674bf | rmloveland/scheme48-0.53 | current-port.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Current input, output, error, and noise ports.
These two ports are needed by the VM for the READ - CHAR and WRITE - CHAR
; opcodes.
(define $current-input-port (enum current-port-marker current-input-port))
(define $current-output-port (enum current-p... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/current-port.scm | scheme | Current input, output, error, and noise ports.
opcodes.
defaults to the error port
----------------
Procedures with default port arguments. | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
These two ports are needed by the VM for the READ - CHAR and WRITE - CHAR
(define $current-input-port (enum current-port-marker current-input-port))
(define $current-output-port (enum current-port-marker current-output-port))
(define $current-error-por... |
94ef8fd00ca46aab226ba57c06b9989fc19508679f3562b90b086975157b59ca | bobzhang/fan | ast_inject.ml | open Astf
open Util
type key = string
let inject_exp_tbl: (key,exp) Hashtbl.t = Hashtbl.create 40
let inject_stru_tbl: (key,stru) Hashtbl.t = Hashtbl.create 40
let inject_clfield_tbl: (key,clfield)Hashtbl.t = Hashtbl.create 40
let register_inject_exp (k,f)=
Hashtbl.replace inject_exp_tbl k f
let registe... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/main/ast_inject.ml | ocaml | local variables:
end: | open Astf
open Util
type key = string
let inject_exp_tbl: (key,exp) Hashtbl.t = Hashtbl.create 40
let inject_stru_tbl: (key,stru) Hashtbl.t = Hashtbl.create 40
let inject_clfield_tbl: (key,clfield)Hashtbl.t = Hashtbl.create 40
let register_inject_exp (k,f)=
Hashtbl.replace inject_exp_tbl k f
let registe... |
3d06efafb66075c01f0d52a1e7a9d5c270aa6105498075407761e3398b25e2f8 | prathyvsh/the-little-schemer | 07-friends-and-relations.rkt | #lang racket
(define (atom? x) (or (symbol? x) (number? x) (boolean? x)))
(define (eqan? a1 a2)
(cond
((and (number? a1) (number? a2)) (= a1 a2))
((or (number? a1) (number? a2)) #f)
(else (eq? a1 a2))))
(define (eqlist? l1 l2)
(cond
((and (null? l1) (null? l2)) #t)
((or (null? l1) (null? l2)) #f)
... | null | https://raw.githubusercontent.com/prathyvsh/the-little-schemer/02a6bdb0ef51969471811dd6cbe310dea09bcf64/07-friends-and-relations.rkt | racket | (eq? (rel? '((apples peaches) (pumpkin pie))) false) | #lang racket
(define (atom? x) (or (symbol? x) (number? x) (boolean? x)))
(define (eqan? a1 a2)
(cond
((and (number? a1) (number? a2)) (= a1 a2))
((or (number? a1) (number? a2)) #f)
(else (eq? a1 a2))))
(define (eqlist? l1 l2)
(cond
((and (null? l1) (null? l2)) #t)
((or (null? l1) (null? l2)) #f)
... |
a48397d32b0fb3614836280ab8a7fb8b9961a6b3e54b8527c29d06a4b54c62b6 | facebook/flow | proc_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/789a748ce801e7a25a852c6079395281d9343573/src/hack_forked/test/utils/sys/proc_test.ml | ocaml | Note: if you're running the tests with the default dependency injector,
you need to remember to pass false to setup() because it's not
possible to write to files in procfs. |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
aff763ab55293a88dd5096c565fa974c66b4db1914b052d25f33abeea97e7ca9 | larcenists/larceny | if1.scm | (text
(seq (nop)
(if (alt z! a!)
(nop)
(inv (nop)))
(nop)))
00000000 90 nop
00000001 7402 jz 0x5
00000003 7603 jna 0x8
00000005 90 nop
00000006 EB03 short 0xb
00000008 90 nop
00000009... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/if1.scm | scheme | (text
(seq (nop)
(if (alt z! a!)
(nop)
(inv (nop)))
(nop)))
00000000 90 nop
00000001 7402 jz 0x5
00000003 7603 jna 0x8
00000005 90 nop
00000006 EB03 short 0xb
00000008 90 nop
00000009... | |
9905c7f5bcfdcdebc6932ff7970e794134107eb31819ef78d5bcbd7e27cb16a6 | cldwalker/logseq-query | util.cljs | (ns cldwalker.logseq-query.util
(:require [clojure.pprint :as pprint]
[clojure.edn :as edn]
[clojure.string :as str]
["fs" :as node-fs]
["child_process" :as child-process]
[nbb.classpath :as classpath]
[cldwalker.logseq-query.logseq-rules :as rul... | null | https://raw.githubusercontent.com/cldwalker/logseq-query/064700384723b9c4934e0e73cc75d35f5fd255c3/src/cldwalker/logseq_query/util.cljs | clojure | Misc utils
Config fns
TODO: Debug issues with upstream property | (ns cldwalker.logseq-query.util
(:require [clojure.pprint :as pprint]
[clojure.edn :as edn]
[clojure.string :as str]
["fs" :as node-fs]
["child_process" :as child-process]
[nbb.classpath :as classpath]
[cldwalker.logseq-query.logseq-rules :as rul... |
5d96b998b74972fc91d5dc4d0b4616c92fd55f33551fd150e838e0a8a4b0c809 | eholk/harlan | expand-primitives.scm | (library
(harlan front expand-primitives)
(export expand-primitives)
(import
(rnrs)
(elegant-weapons helpers)
(elegant-weapons compat))
;; This pass macro-expands primitives. It also inserts fresh region
;; variables.
(define-match expand-primitives
((module ,[expand-prim-decl -> decl*] ... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/front/expand-primitives.scm | scheme | This pass macro-expands primitives. It also inserts fresh region
variables.
For now we guard for simple enum types. The region calling
convention doesn't work very well with print the way it
currently works.
end library | (library
(harlan front expand-primitives)
(export expand-primitives)
(import
(rnrs)
(elegant-weapons helpers)
(elegant-weapons compat))
(define-match expand-primitives
((module ,[expand-prim-decl -> decl*] ...)
`(module ,(apply append decl*) ...)))
(define-match expand-prim-decl
... |
76bf540ece94bde4b6cefea413562ff98184665198ea2980f0470c8604a9d4da | eholk/elegant-weapons | graphviz.scm | (library (elegant-weapons graphviz)
(export dot->string write-dot)
(import
(rnrs)
(elegant-weapons helpers))
(define dot->string
(case-lambda
((g) (dot->string g '()))
((g c)
(string-append
"digraph G {\n"
(join ""
(map (lambda (n)
... | null | https://raw.githubusercontent.com/eholk/elegant-weapons/ce51432c614cdba5d2f12c7b5451af01095257a4/lib/elegant-weapons/graphviz.scm | scheme | \n")) | (library (elegant-weapons graphviz)
(export dot->string write-dot)
(import
(rnrs)
(elegant-weapons helpers))
(define dot->string
(case-lambda
((g) (dot->string g '()))
((g c)
(string-append
"digraph G {\n"
(join ""
(map (lambda (n)
... |
c75dc27e920ff0a960438a0c8d5d154c22d7f190995c3fa7ce96f149488ad123 | disco-lang/disco | Atoms.hs | module Atoms where
| null | https://raw.githubusercontent.com/disco-lang/disco/68b96b233b04f26229fe6277678eeb8710422523/explore/sub2/Atoms.hs | haskell | module Atoms where
| |
543b857354cf711440c089af969a6493bb42b6c4faa9d6a9aa1b24a28842c1c6 | clyfe/clara-eav | store.cljc | (ns ^:no-doc clara-eav.store
"A store keeps track of max-eid and maintains an EAV index."
(:require [clara-eav.eav :as eav]
[medley.core :as medley]
#?(:clj [clojure.spec.alpha :as s]
:cljs [cljs.spec.alpha :as s])))
(def ^:dynamic *store*
"Dynamic atom of store to be used in rule producti... | null | https://raw.githubusercontent.com/clyfe/clara-eav/1a2255a3aaac303f71a2867998453853673bc6ce/src/clara_eav/store.cljc | clojure | keywords, | (ns ^:no-doc clara-eav.store
"A store keeps track of max-eid and maintains an EAV index."
(:require [clara-eav.eav :as eav]
[medley.core :as medley]
#?(:clj [clojure.spec.alpha :as s]
:cljs [cljs.spec.alpha :as s])))
(def ^:dynamic *store*
"Dynamic atom of store to be used in rule producti... |
93c373ad05f94ae2d1fd831751dbb61c0605d8db595a8565cd59076cdc425aab | oakes/Nightlight | ajax.cljs | (ns nightlight.ajax
(:require [cljs.reader :refer [read-string]]
[nightlight.state :as s]
[nightlight.constants :as c])
(:import goog.net.XhrIo))
(defn download-tree [cb]
(.send XhrIo
"tree"
(fn [e]
(when (.isSuccess (.-target e))
(cb (read-string (.. e -target getRe... | null | https://raw.githubusercontent.com/oakes/Nightlight/51ed9bcd7286c2833bb48daf9cb0624e4e7b0e14/src/nightlight/ajax.cljs | clojure | (ns nightlight.ajax
(:require [cljs.reader :refer [read-string]]
[nightlight.state :as s]
[nightlight.constants :as c])
(:import goog.net.XhrIo))
(defn download-tree [cb]
(.send XhrIo
"tree"
(fn [e]
(when (.isSuccess (.-target e))
(cb (read-string (.. e -target getRe... | |
aa8d451b96cdca043682822b2b1a083134869fd0cf6b4c8d2257f4cbd17f646a | DSLsofMath/DSLsofMath | P1.hs | module P1 where
import Prelude
-- a)
class Field f where
mul :: f -> f -> f
add :: f -> f -> f
zer :: f
one :: f
neg :: f -> f
rec :: f -> f
-- b)
data F v = Mul (F v) (F v) | Rec (F v) | One
| Add (F v) (F v) | Neg (F v) | Zer
| V v deriving Show
{... | null | https://raw.githubusercontent.com/DSLsofMath/DSLsofMath/216464afda03c54709fae39e626ca19e8053444e/Exam/2018-08/P1.hs | haskell | a)
b)
Or, with {-# LANGUAGE GADTs #
c)
instance Fractional a => Field a where
d)
e) | module P1 where
import Prelude
class Field f where
mul :: f -> f -> f
add :: f -> f -> f
zer :: f
one :: f
neg :: f -> f
rec :: f -> f
data F v = Mul (F v) (F v) | Rec (F v) | One
| Add (F v) (F v) | Neg (F v) | Zer
| V v deriving Show
data F v wher... |
1935eafe324b54134b65694962f137d10f59023ca5438597a8ed1a8e2ac4f2cb | rpav/cl-freetype2 | bitmap.lisp | (in-package :freetype2)
;; Basic bitmap functions
(defun bitmap-new (&optional (library *library*))
"=> BITMAP
Create a new FT_Bitmap."
(make-wrapper (bitmap &bitmap ft-bitmap (:struct foreign-ft-bitmap))
(progn (ft-bitmap-new &bitmap) :ok)
(ft-bitmap-done library &bitmap)))
(export 'bitmap-new)
(def... | null | https://raw.githubusercontent.com/rpav/cl-freetype2/96058da730b4812df916c1f4ee18c99b3b15a3de/src/bitmap.lisp | lisp | Basic bitmap functions
String utility
Bitmap | (in-package :freetype2)
(defun bitmap-new (&optional (library *library*))
"=> BITMAP
Create a new FT_Bitmap."
(make-wrapper (bitmap &bitmap ft-bitmap (:struct foreign-ft-bitmap))
(progn (ft-bitmap-new &bitmap) :ok)
(ft-bitmap-done library &bitmap)))
(export 'bitmap-new)
(defun bitmap-convert (bitmap al... |
53acd316554ce114a1e1d3b6864a160a5630552e52cf4539fffce911f0c0a01b | igorhvr/bedlam | wttest.scm | ;;; "wttest.scm" Test Weight balanced trees -*-Scheme-*-
Copyright ( c ) 1993 - 1994
;;;
Copyright ( c ) 1993 - 94 Massachusetts Institute of Technology
;;;
;;; This material was developed by the Scheme project at the
Massachusetts Institute of Technology , Department of Electrical
Engineering and Computer... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/wttest.scm | scheme | "wttest.scm" Test Weight balanced trees -*-Scheme-*-
This material was developed by the Scheme project at the
this software, to redistribute either the original software or a
modified version, and to use this software for any purpose is
granted, subject to the following restrictions and understandings.
notic... | Copyright ( c ) 1993 - 1994
Copyright ( c ) 1993 - 94 Massachusetts Institute of Technology
Massachusetts Institute of Technology , Department of Electrical
Engineering and Computer Science . Permission to copy and modify
1 . Any copy made of this software must include this copyright
2 . Users of this ... |
097f3c82adf72bc58f9d123e4657bceb65b98c74837d1db1df76788c7aef944d | haskell-github/github | PullRequestsSpec.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TemplateHaskell #-}
module GitHub.PullRequestsSpec where
import qualified GitHub as GH
import Prelude ()
import Prelude.Compat
import Data.Aes... | null | https://raw.githubusercontent.com/haskell-github/github/d9ac0c7ffbcc720a24d06f0a96ea4e3891316d1a/spec/GitHub/PullRequestsSpec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
Draft Pull Requests
-----------------------------------------------------------------------------
| @application/vnd.github.shadow-cat-preview+json@ </#draft-pull-request... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module GitHub.PullRequestsSpec where
import qualified GitHub as GH
import Prelude ()
import Prelude.Compat
import Data.Aeson
(FromJSON (..), eitherDecodeStrict, withObject, (.:))
impo... |
1d7f79116faeac5636e80bbe82f55d7b91d105ef4a21936046dcc2f740eb8e16 | lojic/RacketChess | global.rkt | #lang racket
#;(begin
(require racket/fixnum)
(provide (all-from-out racket/fixnum)
get-square
set-square!
vecref
vecset!)
(define-syntax-rule (get-square squares idx) (bytes-ref squares idx))
(define-syntax-rule (set-square! squares idx piece) (bytes-set! square... | null | https://raw.githubusercontent.com/lojic/RacketChess/115ca7fecca9eaf31f9b2f4ef59935372c9920c8/src/global.rkt | racket | (begin | #lang racket
(require racket/fixnum)
(provide (all-from-out racket/fixnum)
get-square
set-square!
vecref
vecset!)
(define-syntax-rule (get-square squares idx) (bytes-ref squares idx))
(define-syntax-rule (set-square! squares idx piece) (bytes-set! squares idx pie... |
b179e7956035acf01a39acf76dda24e185d3e00944fa73827e0a9f69a908d9d1 | jazzytomato/hnlookup | core.cljs | (ns hnlookup.popup.core
(:import [goog.dom query])
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async :refer [<!]]
[cljs-http.client :as http]
[chromex.logging :refer-macros [log info warn error group group-end]]
[chromex.protocols :refer ... | null | https://raw.githubusercontent.com/jazzytomato/hnlookup/c29c5a417bdf8756a2a747d89dbc41ab4b012c75/src/popup/hnlookup/popup/core.cljs | clojure | React components
-- main entry point ------------------------------------------------------------------------------------------------------- | (ns hnlookup.popup.core
(:import [goog.dom query])
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [cljs.core.async :refer [<!]]
[cljs-http.client :as http]
[chromex.logging :refer-macros [log info warn error group group-end]]
[chromex.protocols :refer ... |
e688d636e3053b9efdac294310b368fff0addc5dfb639d23ebd1c6ba0e5ac146 | ghc/nofib | RC.hs | #include "unboxery.h"
module RC(rC,rCs) where
import Types
rC
= Nuc
(Tfo FL_LIT(-0.0359) FL_LIT(-0.8071) FL_LIT(0.5894) -- dgf_base_tfo
FL_LIT(-0.2669) FL_LIT(0.5761) FL_LIT(0.7726)
FL_LIT(-0.9631) FL_LIT(-0.1296) FL_LIT(-0.2361)
FL_LIT(0.1584) FL_LIT(8.3434) FL... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/hartel/nucleic2/RC.hs | haskell | dgf_base_tfo
p_o3'_275_tfo
p_o3'_180_tfo
p_o3'_60_tfo
P
O1P
O2P
H5'
H5''
C4'
H4'
C1'
H1'
H2''
H2'
C3'
H3'
O3'
N1
C4
O2
H41
H42
H5
dgf_base_tfo
p_o3'_275_tfo
p_o3'_180_tfo
p_o3'_60_tfo
P
O1P
O2P
H5'
H5''
C4'
H4'
C1'
H1'
H2''
H2'
C3'
H3'
O3'
N1
C4
O2
H41
H42
H5
dgf_base_tf... | #include "unboxery.h"
module RC(rC,rCs) where
import Types
rC
= Nuc
FL_LIT(-0.2669) FL_LIT(0.5761) FL_LIT(0.7726)
FL_LIT(-0.9631) FL_LIT(-0.1296) FL_LIT(-0.2361)
FL_LIT(0.1584) FL_LIT(8.3434) FL_LIT(0.5434))
FL_LIT(0.0649) FL_LIT(0.4366) FL_LIT(-0.8973)
... |
9ceba7c7fac1a3297aeb0d269fc8fcb3420d8792e79b1f2d48dbe1347d7e7fce | helium/blockchain-core | blockchain_sync_SUITE.erl | -module(blockchain_sync_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("blockchain.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
basic/1
]).
%%--------------------------... | null | https://raw.githubusercontent.com/helium/blockchain-core/2e5a2d1f7d7baa79500b09c70c2a9af9b9577eab/test/blockchain_sync_SUITE.erl | erlang | --------------------------------------------------------------------
COMMON TEST CALLBACK FUNCTIONS
--------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Running tests for this suite
@end
-------------------------------------... | -module(blockchain_sync_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("blockchain.hrl").
-export([
all/0,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
end_per_testcase/2
]).
-export([
basic/1
]).
@public
all() ->
[
... |
65f3df0d2eb33b144f676c89db0d1d773c76aae98f4cb2d334d2104058466902 | mfoemmel/erlang-otp | ex_popupMenu.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/examples/demo/ex_popupMenu.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ex_popupMenu).
-behaviour(wx_object).
-... |
b92faac0526ddc0dc67a4598d3aa2cb08b5f6c0fef9e70d946ec2bfe29b50a88 | osstotalsoft/functional-guy | 01.Map.hs | incAll' [] = []
incAll' (x : xs) = x + 1 : incAll' xs
doubleAll' [] = []
doubleAll' (x : xs) = x * 2 : doubleAll' xs
map' _ [] = []
map' f (x : xs) = f x : map' f xs
incAll = map (+ 1)
doubleAll = map (* 2) | null | https://raw.githubusercontent.com/osstotalsoft/functional-guy/c02a8b22026c261a9722551f3641228dc02619ba/Chapter2.%20The%20foundation/Exercises/02.Hofs/01.Map.hs | haskell | incAll' [] = []
incAll' (x : xs) = x + 1 : incAll' xs
doubleAll' [] = []
doubleAll' (x : xs) = x * 2 : doubleAll' xs
map' _ [] = []
map' f (x : xs) = f x : map' f xs
incAll = map (+ 1)
doubleAll = map (* 2) | |
91ea77d75301773f1a692e696d4041403f8ac0d1cf637cdde070bba149993e87 | redbadger/karma-tracker | project.clj | (defproject karma-tracker-ui "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229"]
[com.andrewmcveigh/cljs-time "0.4.0"]
[kibu/pushy "0.3.6"]
[reagent "0.6.0"]
[re-frame "0.9.2"]
... | null | https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/ui/project.clj | clojure | (defproject karma-tracker-ui "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229"]
[com.andrewmcveigh/cljs-time "0.4.0"]
[kibu/pushy "0.3.6"]
[reagent "0.6.0"]
[re-frame "0.9.2"]
... | |
221c2fbf4fd3ce9e8aab0bdc5f1cd905d886b60be930f4e51dec224f825501c2 | wellposed/numerical | Phased.hs |
module Numerical.Array.Phased where
An array storage type + world pair is said to have Phased instance
when there are both Array and MArray instances for that storage + world pair .
it is only when we have both mutable and immutable array variants
with the same storage rep , in the same world , that we can ... | null | https://raw.githubusercontent.com/wellposed/numerical/6b458232760b20674487bd9f8442b0991ce59423/src/Numerical/Array/Phased.hs | haskell |
module Numerical.Array.Phased where
An array storage type + world pair is said to have Phased instance
when there are both Array and MArray instances for that storage + world pair .
it is only when we have both mutable and immutable array variants
with the same storage rep , in the same world , that we can ... | |
f15faa59bcbc286d69edc022adc642fc458bdb33dfb3e5083d36920d597d79fc | ulricha/dsh | Lang.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- | Definition of the Segment Language (SL): The Segment Language defines
-- operations over flat segment vectors.
module Database.... | null | https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Lang.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
| Definition of the Segment Language (SL): The Segment Language defines
operations over flat segment vectors.
------------------------------------------------------------------------... | # LANGUAGE FlexibleInstances #
module Database.DSH.SL.Lang where
import Data.Aeson.TH
import Database.Algebra.Dag.Common
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.VectorLang
Vector Language operators . Documentation can be found in module
... |
162c5e0ff8f01e38178ecd9d5c1cff3124ecab793284049d18d857f58f88188a | ml4tp/tcoq | index.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tools/coqdoc/index.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* refers to the file being parsed
*... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Printf
open Cdglobals
t... |
019a801ded3aa2ace3c90f22dca9749fa0bb25d05129f06d86785106f209ff33 | clojure/core.rrb-vector | long_test.cljs | (ns clojure.core.rrb-vector.long-test
(:require [clojure.test :as test :refer [deftest testing is are]]
[clojure.core.rrb-vector.test-utils :as u]
[clojure.core.rrb-vector :as fv]
[clojure.core.rrb-vector.debug :as dv]
[clojure.core.rrb-vector.debug-platform-dependent :... | null | https://raw.githubusercontent.com/clojure/core.rrb-vector/88c2f814b47c0bbc4092dad82be2ec783ed2961f/src/test/cljs/clojure/core/rrb_vector/long_test.cljs | clojure | The intent is to keep this file as close to
src/test/clojure/clojure/core/rrb_vector/long_test.clj as possible,
so that when we start requiring Clojure 1.7.0 and later for this
library, this file and that one can be replaced with a common test
Note that the namespace of this file _intentionally_ does not match
th... | (ns clojure.core.rrb-vector.long-test
(:require [clojure.test :as test :refer [deftest testing is are]]
[clojure.core.rrb-vector.test-utils :as u]
[clojure.core.rrb-vector :as fv]
[clojure.core.rrb-vector.debug :as dv]
[clojure.core.rrb-vector.debug-platform-dependent :... |
31332e6b848eeb79343c288672705287cdb2f815670f981ca0cb30d4448a756c | na4zagin3/satyrographos | mode.ml | open Core
(** SATySFi typesetting mode. *)
type t =
| Pdf
| Text of string
| Generic
[@@deriving sexp, compare, hash, equal]
let of_string_opt = function
| "pdf" -> Some Pdf
| "generic" -> Some Generic
| s ->
String.chop_prefix ~prefix:"text-" s
|> Option.map ~f:(fun m -> Text m)
let of_string_ex... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/src/satysfi/mode.ml | ocaml | * SATySFi typesetting mode. | open Core
type t =
| Pdf
| Text of string
| Generic
[@@deriving sexp, compare, hash, equal]
let of_string_opt = function
| "pdf" -> Some Pdf
| "generic" -> Some Generic
| s ->
String.chop_prefix ~prefix:"text-" s
|> Option.map ~f:(fun m -> Text m)
let of_string_exn str =
of_string_opt str
|> ... |
7b20c37d238bccd52bad258d0798a7563710b69ac3b75c3bf34541b00f708ece | tdrhq/fiveam-matchers | has-length.lisp | (defpackage :fiveam-matchers/has-length
(:use #:cl
#:fiveam-matchers/core)
(:local-nicknames (#:a #:alexandria))
(:export
#:has-length))
(in-package :fiveam-matchers/has-length)
(defclass has-length (matcher)
((expected :initarg :expected
:accessor expected)))
(defun has-length (expect... | null | https://raw.githubusercontent.com/tdrhq/fiveam-matchers/79ba2144eee821f7be084d6ba7b90c83994d8ca8/has-length.lisp | lisp | (defpackage :fiveam-matchers/has-length
(:use #:cl
#:fiveam-matchers/core)
(:local-nicknames (#:a #:alexandria))
(:export
#:has-length))
(in-package :fiveam-matchers/has-length)
(defclass has-length (matcher)
((expected :initarg :expected
:accessor expected)))
(defun has-length (expect... | |
e1cea8df79aa972059446894ed464d600be3ef366bd0554461f88a8bc10e52c8 | exoscale/clojure-kubernetes-client | v2beta1_pods_metric_source.clj | (ns clojure-kubernetes-client.specs.v2beta1-pods-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
)
(:import (java.io File)))
(declare v2beta1-pods-metric-source-data v2beta1-pods-me... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v2beta1_pods_metric_source.clj | clojure | (ns clojure-kubernetes-client.specs.v2beta1-pods-metric-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-label-selector :refer :all]
)
(:import (java.io File)))
(declare v2beta1-pods-metric-source-data v2beta1-pods-me... | |
89cf971760c009c7934f4b60977816223c992b6299996657cda4fcd5e1e4706a | soegaard/metapict | gradient.rkt | #lang racket/base
(require "def.rkt" "structs.rkt" "color.rkt" "pt-vec.rkt"
racket/format racket/match racket/class racket/draw)
;;;
;;; Color Gradients
;;;
;; A color gradient consists of a list of colors and a list of numbers
from 0 to 1 .
(provide gradient ; create a color transisition
... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/gradient.rkt | racket |
Color Gradients
A color gradient consists of a list of colors and a list of numbers
create a color transisition
create a color transition in a direction
give color transition a direction
give color transition a center
convert to racket/draw class gradients
transition from: white to color to black
convert a ... | #lang racket/base
(require "def.rkt" "structs.rkt" "color.rkt" "pt-vec.rkt"
racket/format racket/match racket/class racket/draw)
from 0 to 1 .
create a color transition between two circles
color-stops
)
(define (color-stops colors [stops #f])
(when stops
(unless (andmap (λ (x... |
dbbc3196b987c53c56b27f92d8365cdcdcbde0249f77fb4028d6c6cf971dc2cf | basho/riak_kv | riak_kv_vnode_status_mgr.erl | %% -------------------------------------------------------------------
%%
%% riak_kv_vnode_status_mgr: Manages persistence of vnode status data
like vnodeid , vnode op counter etc
%%
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache Lice... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_vnode_status_mgr.erl | erlang | -------------------------------------------------------------------
riak_kv_vnode_status_mgr: Manages persistence of vnode status data
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 imp... | like vnodeid , vnode op counter etc
Copyright ( c ) 2007 - 2015 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 , WIT... |
6003ffb311499268a0b44b61150189935f6a619313d202a649bc82756a51b784 | thattommyhall/offline-4clojure | p107.clj | ;; Simple closures - Easy
< p > Lexical scope and first - class functions are two of the most basic building blocks of a functional language like Clojure . When you combine the two together , you get something very powerful called < strong > lexical closures</strong > . With these , you can exercise a great deal of c... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p107.clj | clojure | Simple closures - Easy
<p>It can be hard to follow in the abstract, so let's build a simple closure. Given a positive integer <i>n</i>, return a function <code>(f x)</code> which computes <i>x<sup>n</sup></i>. Observe that the effect of this is to preserve the value of <i>n</i> for use outside the scope in which it i... | < p > Lexical scope and first - class functions are two of the most basic building blocks of a functional language like Clojure . When you combine the two together , you get something very powerful called < strong > lexical closures</strong > . With these , you can exercise a great deal of control over the lifetime o... |
1a0bdab741849e376cd01bdc8dae9070a1050746d670bf2e5ed6a48cc46b2ac3 | mzp/coq-ruby | dumpglob.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/interp/dumpglob.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Dump of globalization (to be used b... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : dumpglob.ml 11582... |
29222bc956487ef705d92c9c148c881a0a0a393618f228aa159fd14affac0300 | tommaisey/aeon | c-setn.help.scm | ; /c_setn Set ranges of bus value(s)
; [
; int - starting bus index
; int - number of sequential buses to change (M)
; [
; float - a control value
; ] * M
; ] * N
; Set contiguous ranges of buses to sets of values. For each range, the
; starting bus index is given followed by the num... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/server-command/c-setn.help.scm | scheme | /c_setn Set ranges of bus value(s)
[
int - starting bus index
int - number of sequential buses to change (M)
[
float - a control value
] * M
] * N
Set contiguous ranges of buses to sets of values. For each range, the
starting bus index is given followed by the number of chann... | |
996595a0282204ebc70feaaa9d67a8f343df57feff49d0498af7b737aae25bca | crategus/cl-cffi-gtk | rtest-gtk-box.lisp | (def-suite gtk-box :in gtk-suite)
(in-suite gtk-box)
GtkPrinterOptionWidget is a child of GtkBox
#-win32
(eval-when (:compile-toplevel :load-toplevel :execute)
; (foreign-funcall "gtk_places_view_get_type" g-size)
(foreign-funcall "gtk_printer_option_widget_get_type" g-size))
;;; --- Types and Values -----------... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gtk-box.lisp | lisp | (foreign-funcall "gtk_places_view_get_type" g-size)
--- Types and Values -------------------------------------------------------
Type check
Check the registered name
Check the type initializer
Check the parent
Check the children
Check the interfaces
Check the class properties
Get the names of the style prope... | (def-suite gtk-box :in gtk-suite)
(in-suite gtk-box)
GtkPrinterOptionWidget is a child of GtkBox
#-win32
(eval-when (:compile-toplevel :load-toplevel :execute)
(foreign-funcall "gtk_printer_option_widget_get_type" g-size))
(test gtk-box-class
(is (g-type-is-object "GtkBox"))
(is (eq 'gtk-box
(regis... |
f532b41d67280c66dfbad0ca399d8a96d42c617ca93649c1e8da5b6b23a95f12 | diffusionkinetics/open | KNN.hs | {-# LANGUAGE ScopedTypeVariables, TypeFamilies #-}
module Fuml.Base.KNN where
import qualified Data.Vector.Storable as VS
import Numeric.LinearAlgebra
import Data.List (nub, sortBy)
import Data.Ord (comparing)
euclideanDistance :: Vector Double -> Vector Double -> Double
euclideanDistance v1 v2 = sqrt $ VS.sum $ VS.... | null | https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/fuml/lib/Fuml/Base/KNN.hs | haskell | # LANGUAGE ScopedTypeVariables, TypeFamilies # |
module Fuml.Base.KNN where
import qualified Data.Vector.Storable as VS
import Numeric.LinearAlgebra
import Data.List (nub, sortBy)
import Data.Ord (comparing)
euclideanDistance :: Vector Double -> Vector Double -> Double
euclideanDistance v1 v2 = sqrt $ VS.sum $ VS.map (^2) $ VS.zipWith (-) v1 v2
weightedBoolVote :... |
f9561e5d039e1c825c467a8f915f9c15e4790f3f96dce4c80ba98d62d8023fda | hellonico/origami-dnn | agecam.clj | (ns origami-dnn.demo.agecam
(:require [opencv4.dnn.core :as origami-dnn]
[opencv4.utils :as u]
[origami-dnn.draw :as d]
[origami-dnn.net.core :as net]))
(defn -main [& args]
(let [[net opts labels] (origami-dnn/read-net-from-repo "networks.caffe:convnet-age:1.0.0")]
(u/simp... | null | https://raw.githubusercontent.com/hellonico/origami-dnn/f55a32d0d3d528fcf57aaac10cfb20c7998b380c/src/origami_dnn/demo/agecam.clj | clojure | (ns origami-dnn.demo.agecam
(:require [opencv4.dnn.core :as origami-dnn]
[opencv4.utils :as u]
[origami-dnn.draw :as d]
[origami-dnn.net.core :as net]))
(defn -main [& args]
(let [[net opts labels] (origami-dnn/read-net-from-repo "networks.caffe:convnet-age:1.0.0")]
(u/simp... | |
e471cab12cb1bc3c12bc00d4cfe6b8227679ed377d4fbd452a55efd24a6cb88b | abarbu/haskell-torch | IsString.hs | # LANGUAGE TemplateHaskell #
module Data.String.InterpolateIO.IsString (c, fromStringIO) where
import Data.String.ShowIO(fromStringIO)
import Language.Haskell.TH.Quote (QuasiQuoter(..))
import qualified Data.String.InterpolateIO as I
-- |
-- Like `I.c`, but constructs a value of type
--
-- > IsSt... | null | https://raw.githubusercontent.com/abarbu/haskell-torch/03b2c10bf8ca3d4508d52c2123e753d93b3c4236/interpolateIO/src/Data/String/InterpolateIO/IsString.hs | haskell | |
Like `I.c`, but constructs a value of type
> IsString a => a | # LANGUAGE TemplateHaskell #
module Data.String.InterpolateIO.IsString (c, fromStringIO) where
import Data.String.ShowIO(fromStringIO)
import Language.Haskell.TH.Quote (QuasiQuoter(..))
import qualified Data.String.InterpolateIO as I
c :: QuasiQuoter
c = QuasiQuoter {
quoteExp = \s -> [|fromS... |
dce823dc6e5b595aaea54ea743e55869d2aacb878318abba11ea945205cb5386 | vlstill/hsExprTest | GenConvertible.hs | # LANGUAGE CPP #
module Test.QuickCheck.GenConvertible where
( c ) 2018
import Prelude ( Int, map, ($), (<$>), pure, foldl, foldr, zipWith, Maybe (..) )
import Language.Haskell.TH ( Exp (..), Type (..), Dec (..), Pat (..), Q
, mkName, newName, tupleTypeName
, ... | null | https://raw.githubusercontent.com/vlstill/hsExprTest/cdb522bf86f61e94ff7b9cb6045823d0df0f74f3/testlib/Test/QuickCheck/GenConvertible.hs | haskell | instance {-# OVERLAPS #-} (Convertible a a', Convertible b b') => Convertible (Fun a' b) (a -> b') where
convert' (Fun _ f) x = convert' (f (convert' x))
| For each n >= 0 build an
@instance OVERLAPS … => Convertible (Fun (a1', a2', …) b) (a1 -> a2 -> … -> b')@
original tuple of input types
(Fun (a1', a2', …)... | # LANGUAGE CPP #
module Test.QuickCheck.GenConvertible where
( c ) 2018
import Prelude ( Int, map, ($), (<$>), pure, foldl, foldr, zipWith, Maybe (..) )
import Language.Haskell.TH ( Exp (..), Type (..), Dec (..), Pat (..), Q
, mkName, newName, tupleTypeName
, ... |
eb921ecff9249319912762ec4e4f19df19e1de5b221d3d9d01515a27c4b3a800 | moby/vpnkit | slirp_stack.ml | open Lwt.Infix
let src =
let src = Logs.Src.create "test" ~doc:"Test the slirp stack" in
Logs.Src.set_level src (Some Logs.Debug);
src
module Log = (val Logs.src_log src : Logs.LOG)
module Dns_policy = struct
let config_of_ips ips =
let open Dns_forward.Config in
let servers =
Server.Set.of_lis... | null | https://raw.githubusercontent.com/moby/vpnkit/6039eac025e0740e530f2ff11f57d6d990d1c4a1/src/hostnet_test/slirp_stack.ml | ocaml | open Lwt.Infix
let src =
let src = Logs.Src.create "test" ~doc:"Test the slirp stack" in
Logs.Src.set_level src (Some Logs.Debug);
src
module Log = (val Logs.src_log src : Logs.LOG)
module Dns_policy = struct
let config_of_ips ips =
let open Dns_forward.Config in
let servers =
Server.Set.of_lis... | |
40d49cdabe9d3ca30b41cb06c684e7651095f75c4464c53be9143449d8633b7d | skanev/playground | 82-tests.scm | (require rackunit rackunit/text-ui)
(load "../82.scm")
(define sicp-3.82-tests
(test-suite
"Tests for SICP exercise 3.82"
(check-= (estimate-pi 20000) 3.14 0.01)
))
(run-tests sicp-3.82-tests)
| null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/82-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../82.scm")
(define sicp-3.82-tests
(test-suite
"Tests for SICP exercise 3.82"
(check-= (estimate-pi 20000) 3.14 0.01)
))
(run-tests sicp-3.82-tests)
| |
db2f01335cf30dbba8263e3b4c927700415ba240fb708ee674356e62f97f6dc5 | ocaml/ocaml-lsp | lev_fiber.ml | open Stdune
open Fiber.O
open Lev_fiber_util
module Timestamp = Lev.Timestamp
module Signal_watcher = struct
type t = {
thread : Thread.t;
old_sigmask : int list;
old_sigpipe : Sys.signal_behavior option;
old_sigchld : Sys.signal_behavior;
sigchld_watcher : Lev.Async.t;
}
let stop_sig = Sys.... | null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/226ae3e089ec95e8333bc19c9d113a537443412a/submodules/lev/lev-fiber/src/lev_fiber.ml | ocaml | XXX shall we kill the running processes here?
[None] on windows
set whenever the wheel is waiting for a new task
we can always call loop, but we do a little optimization to see if we can
read the line without an extra copy
we can always call loop, but we do a little optimization to see if we... | open Stdune
open Fiber.O
open Lev_fiber_util
module Timestamp = Lev.Timestamp
module Signal_watcher = struct
type t = {
thread : Thread.t;
old_sigmask : int list;
old_sigpipe : Sys.signal_behavior option;
old_sigchld : Sys.signal_behavior;
sigchld_watcher : Lev.Async.t;
}
let stop_sig = Sys.... |
44a0ec77797d9c891b76cef3992fb8e32563382bdb3fafabd1a77979b69dee7a | kmi/irs | heuristic-classifierv2.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
;;;; HEURISTIC-CLASSIFICATION :METHOD ;;;;
(in-package "OCML")
(in-ontology heuristic-classification)
;;;THE-VIRTUAL-SOLUTION-SPACE
(def-function the-virtual-solution-space (?init-space ?refs) -> ?solution-space
"The space generated by... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/methods/heuristic-classification/heuristic-classifierv2.lisp | lisp | Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
HEURISTIC-CLASSIFICATION :METHOD ;;;;
THE-VIRTUAL-SOLUTION-SPACE
CLASS CANDIDATE-EXCLUSION-CRITERION
INSTANCE DEFAULT-CANDIDATE-EXCLUSION-CRITERION
RELATION DEFAULT-CANDIDATE-EXCLUSION-RELATION
RELATION RULED-OUT-SOLUTION
AXIOM EXCLUSION-IS-MONOTONIC
HEURISTI... |
(in-package "OCML")
(in-ontology heuristic-classification)
(def-function the-virtual-solution-space (?init-space ?refs) -> ?solution-space
"The space generated by refinement application from an initial solution space"
:constraint (and (every ?refs refiner)
(solution-space ?init-space))
:de... |
80706c3717afc462d4c38c1bb66939ff4908a364f97cc189e707ba1af33b0f79 | RYTong/erlmail-client | imapc_fsm.erl | -module(imapc_fsm).
-include("imap.hrl").
-behaviour(gen_fsm).
%% api
-export([connect/2 , connect_ssl/2 , login/3 , logout/1 , noop/1 , ,
% list/3, status/3,
select/2 , examine/2 , append/4 , expunge/1 ,
% search/2, fetch/3, store/4, copy/3
% ]).
%% callbacks
-export([init/1... | null | https://raw.githubusercontent.com/RYTong/erlmail-client/039b9e43d9c78a4d0aab0e1b6dcc5eb50e9658f2/src/imapc_fsm.erl | erlang | api
list/3, status/3,
search/2, fetch/3, store/4, copy/3
]).
callbacks
state funs
--- TODO TODO TODO -------------------------------------------------------------------
--------------------------------------------------------------------------------------
--- TODO TODO TODO ------------... | -module(imapc_fsm).
-include("imap.hrl").
-behaviour(gen_fsm).
-export([connect/2 , connect_ssl/2 , login/3 , logout/1 , noop/1 , ,
select/2 , examine/2 , append/4 , expunge/1 ,
-export([init/1, handle_event/3, handle_sync_event/4, handle_info/3,
code_change/4, terminate/3]).
-export([server... |
83bc304111267e52bc9f8dac43cb9f5696f692deefc6d08802cbbf11ad1201f8 | helium/router | router_sup.erl | %%%-------------------------------------------------------------------
%% @doc router top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(router_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(... | null | https://raw.githubusercontent.com/helium/router/117cf4240cdd742eb6fb20db8ec1d6a63f64bd95/src/router_sup.erl | erlang | -------------------------------------------------------------------
@doc router top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
================================... |
-module(router_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SUP(I, Args), #{
id => I,
start => {I, start_link, Args},
restart => permanent,
shutdown => 5000,
type => supervisor,
modules => [I]
}).
-define(WORKER(I, Args), #{
id => I,
start => {I... |
15347b45355c6a19241a0b4d8314b778ed6fb9fd6f072602b50f6104189774de | yetanalytics/dave | select.cljs | (ns com.yetanalytics.dave.ui.views.form.select
(:require ["@material/select" :refer [MDCSelect]]
[reagent.core :as r]))
TODO : Proper wrapping for MDC , this tends to leave at the bottom of the page
(defn select [& {:keys [handler]}]
(r/create-class
{:component-did-mount
(fn [c]
(let [m... | null | https://raw.githubusercontent.com/yetanalytics/dave/7a71c2017889862b2fb567edc8196b4382d01beb/src/com/yetanalytics/dave/ui/views/form/select.cljs | clojure | ordered list of {:value <> :label <>}
handler ;; handler callback | (ns com.yetanalytics.dave.ui.views.form.select
(:require ["@material/select" :refer [MDCSelect]]
[reagent.core :as r]))
TODO : Proper wrapping for MDC , this tends to leave at the bottom of the page
(defn select [& {:keys [handler]}]
(r/create-class
{:component-did-mount
(fn [c]
(let [m... |
52c4ea3717e68ba041af36df1342a24c1a95925ed7ffc2c7e57239d901938df5 | weavejester/build | git.clj | (ns weavejester.build.git
(:require [clojure.string :as str]
[clojure.java.shell :as sh]))
(defn- git [& args]
(some-> (apply sh/sh "git" args) :out str/trim))
(defn default-version []
(git "describe" "--exact-match" "--abbrev=0"))
(defn git-head []
(git "rev-parse" "HEAD"))
(defn git-origin []
... | null | https://raw.githubusercontent.com/weavejester/build/712a1d267e1deb2e2bd041ee8ef20f2453685ced/src/weavejester/build/git.clj | clojure | (ns weavejester.build.git
(:require [clojure.string :as str]
[clojure.java.shell :as sh]))
(defn- git [& args]
(some-> (apply sh/sh "git" args) :out str/trim))
(defn default-version []
(git "describe" "--exact-match" "--abbrev=0"))
(defn git-head []
(git "rev-parse" "HEAD"))
(defn git-origin []
... | |
ea5efc96e7c9b31a5763ebe8b34163744dc6e7604a337307a4d39147ddc0b1cf | brown/swank-crew | package.lisp | Copyright 2011 Google Inc. All Rights Reserved
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions are
;;;; met:
;;;; * Redistributions of source code must retain the above copyright
;;;; notice, this list of condition... | null | https://raw.githubusercontent.com/brown/swank-crew/af5a78678247cdceec79c9c58c238a9a735de2f9/package.lisp | lisp | Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form mus... | Copyright 2011 Google Inc. All Rights Reserved
* Neither the name of Google Inc. nor the names of its
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY O... |
5ec1e7af31adc1c696a0eeefa614790df6909b92680321acc36628dc9bad8846 | collaborativetrust/WikiTrust | downloadwp.ml |
Copyright ( c ) 2009 The Regents of the University of California
All rights reserved .
Authors : , , 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 copyrigh... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/remote/analysis/downloadwp.ml | ocaml | Prepares the database connection information
Sets up the db
Note that here it does not make sense to use the wikipedia API |
Copyright ( c ) 2009 The Regents of the University of California
All rights reserved .
Authors : , , 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 copyrigh... |
f5bca493e73c61ed308f8c922040cf86a40aadd163ded918e73f4d974f3b064c | elaforge/karya | Extract_test.hs | Copyright 2017
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Cmd.Ruler.Extract_test where
import qualified Cmd.Create as Create
import qualified Cmd.Ruler.Extract as Extract
import qualified Cmd.Ruler.RulerUtil as RulerUtil
import ... | null | https://raw.githubusercontent.com/elaforge/karya/a6638f16da9f018686023977c1292d6ce5095e28/Cmd/Ruler/Extract_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
extract (t, m) = (Mark.mark_rank m, Mark.mark_duration m) | Copyright 2017
module Cmd.Ruler.Extract_test where
import qualified Cmd.Create as Create
import qualified Cmd.Ruler.Extract as Extract
import qualified Cmd.Ruler.RulerUtil as RulerUtil
import Cmd.TestInstances ()
import qualified Ui.Meter.Meter as Meter
import qualified Ui.Ui as Ui
import qualified Ui.U... |
ec329773314c0cbcc87dba42f521d38f03e3332e41bd35d78a1f290fb11d0ca8 | MargaretKrutikova/me-learning-erlang | raindrops_tests.erl | %% Based on canonical data version 1.1.0
-specifications/raw/master/exercises/raindrops/canonical-data.json
%% This file is automatically generated from the exercises canonical data.
-module(raindrops_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_the_sound_... | null | https://raw.githubusercontent.com/MargaretKrutikova/me-learning-erlang/501f9256e332f4d48a74098fe49fcde203e53475/raindrops/test/raindrops_tests.erl | erlang | Based on canonical data version 1.1.0
This file is automatically generated from the exercises canonical data. | -specifications/raw/master/exercises/raindrops/canonical-data.json
-module(raindrops_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_the_sound_for_1_is_1_test'() ->
?assertEqual("1", (raindrops:convert(1))).
'2_the_sound_for_3_is_pling_test'() ->
?as... |
cb9766d1ffb7fe325d2da65103a098b65054a7a97459eafc801b48c0c59663ad | bondy-io/bondy | bondy_session_counter.erl | -module(bondy_session_counter).
-include_lib("wamp/include/wamp.hrl").
-define(TAB, ?MODULE).
-type key() :: message_id.
-export([init/0]).
-export([incr/2]).
-export([delete_all/1]).
%% =============================================================================
%% API
%% ==================================... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_session_counter.erl | erlang | =============================================================================
API
=============================================================================
-----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------... | -module(bondy_session_counter).
-include_lib("wamp/include/wamp.hrl").
-define(TAB, ?MODULE).
-type key() :: message_id.
-export([init/0]).
-export([incr/2]).
-export([delete_all/1]).
-spec init() -> ok.
init() ->
Opts = [
ordered_set,
{keypos, 1},
named_table,
public,
... |
e800d3f2194d9453700c61ec1ee7d66a9deb6903480f1c880bcc9035e639f43a | ghc/ghc | Lit.hs | # LANGUAGE LambdaCase #
-----------------------------------------------------------------------------
--
Stg to C-- code generation : literals
--
( c ) The University of Glasgow 2004 - 2006
--
-----------------------------------------------------------------------------
module GHC.StgToCmm.Lit (
cgLit, mkSimp... | null | https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/compiler/GHC/StgToCmm/Lit.hs | haskell | ---------------------------------------------------------------------------
code generation : literals
---------------------------------------------------------------------------
^ Make a global definition for the string,
and return its label
Note [Post-unarisation invariants]
ditto
TODO: Literal labels might ... | # LANGUAGE LambdaCase #
( c ) The University of Glasgow 2004 - 2006
module GHC.StgToCmm.Lit (
cgLit, mkSimpleLit,
newStringCLit, newByteStringCLit
) where
import GHC.Prelude
import GHC.Platform
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Env
import GHC.Cmm
import GHC.Cmm.CLabel
import GHC.Cmm.Utils
i... |
5e6dd77df985f0267028b1477e990cbe8561fee380845a63f163c9f0c1b03235 | ocaml/opam | opamUrl.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/b001e6e214f1593c80996b5015e90dcc9948435d/src/core/opamUrl.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamStd.Op
type version_control = [ `git | `darcs | `hg ]
type backend = [ `http | `rsy... |
48b6521a63b21389620e18695fa50b2f4a70f1f55ca901d00656891e86349f39 | benzap/fif | prepl.clj | (ns fif.server.prepl)
(defn prepl [])
| null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/src/fif/server/prepl.clj | clojure | (ns fif.server.prepl)
(defn prepl [])
| |
e801fe15ce4ba0c4fa95025195fd8149826e448c2248b9bd9ff4703de7abb9ee | mrosset/nomad | curl.scm | ;; Curl --- download things from network protocols
Copyright ( C ) 2019 Amar Singh< >
This file is part of Nomad .
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of th... | null | https://raw.githubusercontent.com/mrosset/nomad/c94a65ede94d86eff039d2ef62d5ef3df609568a/scheme/nomad/curl.scm | scheme | Curl --- download things from network protocols
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P... |
Copyright ( C ) 2019 Amar Singh< >
This file is part of Nomad .
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
(define-module (nomad curl)
#:use-m... |
8c1d3bd86ac6b2450c052644c520e547cdbd8d099dbd189d90ecb295accb2f40 | tezos/tezos-mirror | operation_selection.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/e5ca6c3e274939f1206426962aa4c02e1a1d5319/src/proto_016_PtMumbai/lib_delegate/operation_selection.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
1d38d83fa19a82ac778ac7fa05321395cfb1d3466856cc07d1c97f983436a780 | jrh13/hol-light | lists.ml | (* ========================================================================= *)
(* Theory of lists, plus characters and strings as lists of characters. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/f25b1592a72d8c1c2666231645cff4809aed1ce4/lists.ml | ocaml | =========================================================================
Theory of lists, plus characters and strings as lists of characters.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
( c ) Copyright , 2014
needs "ind_types.ml";;
Standard ... |
36c1488ebceabe382dee189107f7730544b57cecaf31664ee9821534265b3d3b | rhaberkorn/ermacs | edit_display.erl | -module(edit_display).
-include("edit.hrl").
-compile(export_all).
%%-export([Function/Arity, ...]).
draw_window(Window) when Window#window.minibuffer == true,
Window#window.status_text /= undefined ->
?EDIT_TERMINAL:move_to(0, Window#window.y),
draw_line(Window#window.status_text),
Window#window{stat... | null | https://raw.githubusercontent.com/rhaberkorn/ermacs/35c8f9b83ae85e25c646882be6ea6d340a88b05b/src/edit_display.erl | erlang | -export([Function/Arity, ...]).
draw mode line
The point wasn't inside the area we drew, so we
recenter the display with the point in the middle and
then draw again.
Returns the location of the point in a tuple {X, Y}, or undefined
if it wasn't in the area drawn.
draw empty lines until the end
Update the displa... | -module(edit_display).
-include("edit.hrl").
-compile(export_all).
draw_window(Window) when Window#window.minibuffer == true,
Window#window.status_text /= undefined ->
?EDIT_TERMINAL:move_to(0, Window#window.y),
draw_line(Window#window.status_text),
Window#window{status_text=undefined};
draw_window(Wi... |
bd2623f86ee8c1cd1b9488b996976c7fcd0151678c9fff725a0af2c14f203a3b | JHU-PL-Lab/jaylang | dotprod.ml |
let make_array n = n
let arraysize src = src
let update des i x = assert (0 <= i && i < des)
let sub src i = assert (0 <= i && i < src); 0
let rec dotprod_aux n v1 v2 i sum =
if i = n
then sum
else dotprod_aux n v1 v2 (i+1) (sum + (sub v1 i) * (sub v2 i))
let dotprod v1 v2 = dotprod_aux (arraysize v1) v1 v2 0 ... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/dotprod.ml | ocaml |
let make_array n = n
let arraysize src = src
let update des i x = assert (0 <= i && i < des)
let sub src i = assert (0 <= i && i < src); 0
let rec dotprod_aux n v1 v2 i sum =
if i = n
then sum
else dotprod_aux n v1 v2 (i+1) (sum + (sub v1 i) * (sub v2 i))
let dotprod v1 v2 = dotprod_aux (arraysize v1) v1 v2 0 ... | |
077461d756bbec357280ad34c07a99756a688e517e8c1321c864c84727c21b4d | onedata/op-worker | gs_share_logic_test_SUITE.erl | %%%--------------------------------------------------------------------
@author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% This module tests share logic AP... | null | https://raw.githubusercontent.com/onedata/op-worker/7b0a47224e596c091169dd69aae69244abbc73b6/test_distributed/suites/graph_sync/gs_share_logic_test_SUITE.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
This module tests share logic API using mocked gs_client module.
@end
--------------------------------------------------------------------
export for ct
==============... | @author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(gs_share_logic_test_SUITE).
-author("Lukasz Opiola").
-include("logic_tests_common.hrl").
-export([all/0, init_per_suite/1, init_per_testcase/2, end_per_testcase/2, end_per_suite/1]).
-ex... |
1b829f5f0b97eed24afc5cdc37c56397fd84cb797ae137f7a8c9b6e4aa7890eb | graninas/Functional-Design-and-Architecture | Control.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
module Control where
import Control.Monad.Trans.Free
import qualified Control.Monad.Free as F
import ScriptingDSL
data Control a = forall b. EvalScript (Script b) (b -> a)
instance Functor Control where
fmap f (EvalScript scr g) = EvalScript sc... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/6fd7b0b04e6f6dc8cc110b6f3a87f6dc7a1ef97d/First-Edition/BookSamples/CH04/ArrowizedDSL/Control.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE ExistentialQuantification #
module Control where
import Control.Monad.Trans.Free
import qualified Control.Monad.Free as F
import ScriptingDSL
data Control a = forall b. EvalScript (Script b) (b -> a)
instance Functor Control where
fmap f (EvalScript scr g) = EvalScript scr (f . g)
type DeviceContro... |
a2c506369b3687ce79cf0780acd7e08f88a81ffcb1c23966862d7320ce41d588 | facebook/infer | int.mli |
* 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/facebook/infer/f1d1b105ed07c543d7596765eb2291a335513318/sledge/nonstdlib/int.mli | 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
... | |
152c0fdd54a40216e5c7934118d38be7617c8f02e2328dd3d180a71ec452e680 | exercism/erlang | phone_number_tests.erl | -module(phone_number_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
cleans_number_test() ->
?assertEqual("1234567890", phone_number:number("(123) 456-7890")).
cleans_number_with_dots_test() ->
?assertEqual("1234567890", phone_number:number("123.456.7890")).
v... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/phone-number/test/phone_number_tests.erl | erlang | -module(phone_number_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
cleans_number_test() ->
?assertEqual("1234567890", phone_number:number("(123) 456-7890")).
cleans_number_with_dots_test() ->
?assertEqual("1234567890", phone_number:number("123.456.7890")).
v... | |
bb1f1ba1be2e37dae697218973d36cb7db31b6bd80cd063aec5405457aed5201 | Octachron/tensority | signatures.ml | module type base_operators =
sig
type 'a t
val ( + ) : 'a t -> 'a t -> 'a t
val ( - ) : 'a t -> 'a t -> 'a t
val ( |*| ) : 'a t -> 'a t -> float
val ( *. ) : float -> 'a t -> 'a t
val ( /. ) : 'a t -> float -> 'a t
val ( ~- ) : 'a t -> 'a t
end
module type vec_operators=
sig
include base_operators
va... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/signatures.ml | ocaml | module type base_operators =
sig
type 'a t
val ( + ) : 'a t -> 'a t -> 'a t
val ( - ) : 'a t -> 'a t -> 'a t
val ( |*| ) : 'a t -> 'a t -> float
val ( *. ) : float -> 'a t -> 'a t
val ( /. ) : 'a t -> float -> 'a t
val ( ~- ) : 'a t -> 'a t
end
module type vec_operators=
sig
include base_operators
va... | |
3a9eafd3fbe5c05fd50f18825d91aba19ea1c9121691dd5cfc80a8b9aa849378 | sirherrbatka/statistical-learning | functions.lisp | (cl:in-package #:sl.som)
| null | https://raw.githubusercontent.com/sirherrbatka/statistical-learning/491a9c749f0bb09194793bc26487a10fae69dae0/source/self-organizing-map/functions.lisp | lisp | (cl:in-package #:sl.som)
| |
ec397fba8267eedf232574d3e27a3050ff1225356cf4ee9adf99198580ff628d | static-analysis-engineering/codehawk | jCHSignature.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHSignature.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
ec6d78e5361c2baf520983cce64a0ede7a14c70314c41e5b6536a067ea5e3db9 | originrose/cortex | cpu_driver_test.clj | (ns cortex.compute.cpu-driver-test
(:require [cortex.compute.cpu.driver :as cpu]
[cortex.compute.driver :as drv]
[think.datatype.core :as dtype]
[think.resource.core :as resource]
[clojure.test :refer :all]
[cortex.compute.verify.utils :refer [def-all-dtype-... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/test/clj/cortex/compute/cpu_driver_test.clj | clojure | (ns cortex.compute.cpu-driver-test
(:require [cortex.compute.cpu.driver :as cpu]
[cortex.compute.driver :as drv]
[think.datatype.core :as dtype]
[think.resource.core :as resource]
[clojure.test :refer :all]
[cortex.compute.verify.utils :refer [def-all-dtype-... | |
9c893c830840cd340c33e907be4bf6d8fc651d7b14bcc4fd7da14473d4950ed7 | argp/bap | batIO.mli |
* BatIO - Abstract input / output
* Copyright ( C ) 2003
* 2008 ( contributor )
* 2008 ( contributor )
* 2008 ( contributor )
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gene... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batIO.mli | ocaml | * The abstract input type.
* The abstract output type, ['a] is the accumulator data, it is returned
when the [close_out] function is called.
* The type of a printing function to print a ['a] to an output that
produces ['b] as result.
* This exception is raised when reading on a closed input.
* This exception i... |
* BatIO - Abstract input / output
* Copyright ( C ) 2003
* 2008 ( contributor )
* 2008 ( contributor )
* 2008 ( contributor )
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Gene... |
f196399faca387536e24f63e13c481fd8ff73d6abfae5bbb9983af5b71736ae4 | fakedata-haskell/fakedata | Volleyball.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
| @since 1.0
module Faker.Sport.Volleyball where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Volleyball
import Faker.TH
$(generateFakeField "volleyball" "team")
$(generateFakeField "volleyball" "player")
$(generateFakeField... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/src/Faker/Sport/Volleyball.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
| @since 1.0
module Faker.Sport.Volleyball where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Volleyball
import Faker.TH
$(generateFakeField "volleyball" "team")
$(generateFakeField "volleyball" "player")
$(generateFakeField "volleyball" "coach")
$(generateF... |
d45803f94fb3e51ae357c5cb6af83275d445c2210c3be48d8948a9bd2975d98d | scrintal/heroicons-reagent | receipt_refund.cljs | (ns com.scrintal.heroicons.outline.receipt-refund)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/receipt_refund.cljs | clojure | (ns com.scrintal.heroicons.outline.receipt-refund)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | |
8932a17487e34ab1adb3bb46d7baf2e8e03086e87e4264b424e6d3dae80b36d5 | reach-sh/reach-lang | EmbeddedFiles.hs | module Reach.EmbeddedFiles (runtime_smt2, runtime_bt_smt2, stdlib_sol, stdlib_rsh) where
import Data.ByteString (ByteString)
import Data.FileEmbed
runtime_smt2 :: ByteString
runtime_smt2 = $(makeRelativeToProject "./smt2/runtime.smt2" >>= embedFile)
runtime_bt_smt2 :: ByteString
runtime_bt_smt2 = $(makeRelativeToPro... | null | https://raw.githubusercontent.com/reach-sh/reach-lang/8f41a2ae17220041ba365274dd32ae7c96b11f2e/hs/src/Reach/EmbeddedFiles.hs | haskell | module Reach.EmbeddedFiles (runtime_smt2, runtime_bt_smt2, stdlib_sol, stdlib_rsh) where
import Data.ByteString (ByteString)
import Data.FileEmbed
runtime_smt2 :: ByteString
runtime_smt2 = $(makeRelativeToProject "./smt2/runtime.smt2" >>= embedFile)
runtime_bt_smt2 :: ByteString
runtime_bt_smt2 = $(makeRelativeToPro... | |
559dc65d83e8cd99b30f092f7a68dc90afd88d9e115530f76b9542e8ac9aab78 | cfpb/qu | main.clj | (ns ^:integration integration.test.main
(:require [clojure.test :refer :all]
[qu.test-util :refer :all]))
(use-fixtures :once (mongo-setup-fn "integration_test"))
(deftest ^:integration test-index-url
(testing "it redirects to /data"
(does-contain (GET "/") {:status 302})
(does-contain (:heade... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/test/integration/test/main.clj | clojure | (run-tests) | (ns ^:integration integration.test.main
(:require [clojure.test :refer :all]
[qu.test-util :refer :all]))
(use-fixtures :once (mongo-setup-fn "integration_test"))
(deftest ^:integration test-index-url
(testing "it redirects to /data"
(does-contain (GET "/") {:status 302})
(does-contain (:heade... |
9e671a6040c69f311cd4a427134f7463a32f3d37ad5f34239ae5f14bfa02a913 | project-oak/hafnium-verification | ClangPointers.mli |
* 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/clang/ClangPointers.mli | ocaml | * map pointer to its type |
* 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
... |
f1a9101e598a40379214f81c7a7d035ff1ac0de3cf3ab695aba66fb3519c1042 | bootstrapworld/curr | info.rkt | #lang setup/infotab
(define name "scribble-bootstrap curriculum")
(define categories '(misc))
(define can-be-loaded-with 'all)
(define required-core-version "5.1.1")
(define version "1.0")
(define repositories '("4.x"))
(define scribblings '(("manual.scrbl")))
| null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/lib/info.rkt | racket | #lang setup/infotab
(define name "scribble-bootstrap curriculum")
(define categories '(misc))
(define can-be-loaded-with 'all)
(define required-core-version "5.1.1")
(define version "1.0")
(define repositories '("4.x"))
(define scribblings '(("manual.scrbl")))
| |
4cddf411d148c78ec2643eb4d4a0030383da2ae583a43ce4263de3df6edb3c2d | leptonyu/boots | Swagger.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Boots.Endpoint.Swagger where
import qualified Data.Swagger as S
import Data.Text (Text, pack)
import Data.Version (Version, showVersion)
import ... | null | https://raw.githubusercontent.com/leptonyu/boots/335d58baafb1e0700b1a7dbe595a7264bd4d83ba/boots-web/src/Boots/Endpoint/Swagger.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
| Swagger modification
^ Hostname
^ Server Name
^ Server version
^ Port
^ Old swagger | # LANGUAGE CPP #
# LANGUAGE DataKinds #
module Boots.Endpoint.Swagger where
import qualified Data.Swagger as S
import Data.Text (Text, pack)
import Data.Version (Version, showVersion)
import Data.Word
import Lens.Micro
import Servant
#i... |
37abe41233b7084854e23da7cefd212fa3edadc401ddc4d8ad5469f43cc7b80d | axelarge/advent-of-code | day04.clj | (ns advent-of-code.y2020.day04
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2020 4))
(defn parse-passport [line]
(->> (str/split line #"(?m)[:\s]")
(partition 2)
(map (fn [[k v]] [(keyword k) v]))
(into {})))
(defn parse [input]
... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2020/day04.clj | clojure | (ns advent-of-code.y2020.day04
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2020 4))
(defn parse-passport [line]
(->> (str/split line #"(?m)[:\s]")
(partition 2)
(map (fn [[k v]] [(keyword k) v]))
(into {})))
(defn parse [input]
... | |
24ef538151dc3a23b1e583c269d582eac5f6dbd8905502d0ced4c74ab021873b | lispnik/cl-http | format.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : USER ; Base : 10 -*-
(in-package "USER")
Minimal update to .
Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved .
See copyright notice in CLIM;CLIM - SYS;MINIPROC file .
;;;
;;; This will support the missing readably keyword for now
;;;
(defi... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/acl/aclpc/format.lisp | lisp | Syntax : ansi - common - lisp ; Package : USER ; Base : 10 -*-
CLIM - SYS;MINIPROC file .
This will support the missing readably keyword for now
This allows compiling of most format calls containing
depending on the OS)...
Enable read-line across from non dos file servers!
This patches the macro DESTRUCTURING... |
(in-package "USER")
Minimal update to .
Copyright ( C ) 1994 , 1995 ( OBC ) all rights reserved .
(define-function write :redefine (object &rest options)
(remf options :readably)
(apply (original-function) object options))
the non portable Tilde - Return directive ( or Tilde - Linefeed
(define-function ... |
897fddf1756cfc2acf48c403e55d9a4a9080049ea47302b480429ac2d5c082c2 | microsoft/SLAyer | NSLib.mli | Copyright ( c ) Microsoft Corporation . All rights reserved .
(** Extensions of the standard library. *)
(*============================================================================
Combinators
============================================================================*)
(*... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSLib.mli | ocaml | * Extensions of the standard library.
============================================================================
Combinators
============================================================================
* {3 Combinators }
* [x &> f] applies [f] to [x] and returns [x], left associat... | Copyright ( c ) Microsoft Corporation . All rights reserved .
* { 4 Function combinators }
val id : 'a -> 'a
val const : 'a -> 'b -> 'a
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
val ( &> ) : 'a -> ('a -> unit) ... |
3fe5cf55ebdbe4386c781aef1cbc142787e3c8e97b00168877f701324d18db30 | mindreframer/clojure-stuff | compiler.clj | Copyright ( c ) and . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;;... | null | https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/tailrecursion/hoplon/src/tailrecursion/hoplon/compiler/compiler.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) and . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns tailrecursion.hoplon.compiler.compiler
(:require
[clojure.pprint :as pp]
[clojure.java.io :as io]
[clojure.string :as str]
[tailrecurs... |
b8cfe40d0783de109a5d07ab8ca088c8eac03fe76373ae015dfea3665a009f76 | astro/hashvortex | ControlSocket.hs | module ControlSocket (listenSocket) where
import Data.IORef
import Control.Monad.State.Lazy
import qualified System.Event as Ev
import Network.Socket
import System.Directory (removeFile)
import InState
type ControlHandler = [String] -> IO String
listenSocket :: Ev.EventManager -> FilePath -> ControlHandler -> IO (... | null | https://raw.githubusercontent.com/astro/hashvortex/ccf32d13bd6057b442eb50c087c43c3870bb5be2/ControlSocket.hs | haskell | module ControlSocket (listenSocket) where
import Data.IORef
import Control.Monad.State.Lazy
import qualified System.Event as Ev
import Network.Socket
import System.Directory (removeFile)
import InState
type ControlHandler = [String] -> IO String
listenSocket :: Ev.EventManager -> FilePath -> ControlHandler -> IO (... | |
dd4f8eded7cdbebd79da997425aa9eb7ba352def3b20a0d9baeab2a92cf095a9 | chris-taylor/SICP-in-Haskell | Section2.hs | The Environment Model of Evaluation
3.9
-- no code
3.10
-- no code | null | https://raw.githubusercontent.com/chris-taylor/SICP-in-Haskell/d0a10b5c5990081b4acaaae9f01ced5513ea9368/ch3/Section2.hs | haskell | no code
no code | The Environment Model of Evaluation
3.9
3.10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.