_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 |
|---|---|---|---|---|---|---|---|---|
de61491e937f9adc3fdb0c94dc7761405936b4c26dc7d5bad8680e8100b46e06 | xapi-project/xen-api | smint.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/90eb1cb9b98d4ec7646679a5138c23afbcc52213/ocaml/xapi/smint.ml | ocaml | *
* @group Storage
stdout
stderr
stdout
stderr
Raised by clone at least
* Identifies where a request should go to (i.e. a URI) or None if unknown |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
45dbcbb19225701c6941f61899c60edbb7283e89b56d009e7362473f6cd1b50f | alesaccoia/festival_flinger | cmu_us_bdl_statenames.scm | Autogenerated file from EHMM state labels
(set! cmu_us_bdl::phone_to_states '(
( aa aa_1 aa_2 aa_3 )
( ae ae_1 ae_2 ae_3 )
( ah ah_1 ah_2 ah_3 )
( ao ao_1 ao_2 ao_3 )
( aw aw_1 aw_2 aw_3 )
( ax ax_1 ax_2 ax_3 )
( ay ay_1 ay_2 ay_3 )
( b b_1 b_2 b_3 )
( ch ch_1 ch_2 ch_3 )
... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_bdl_cg/festvox/cmu_us_bdl_statenames.scm | scheme | Autogenerated file from EHMM state labels
(set! cmu_us_bdl::phone_to_states '(
( aa aa_1 aa_2 aa_3 )
( ae ae_1 ae_2 ae_3 )
( ah ah_1 ah_2 ah_3 )
( ao ao_1 ao_2 ao_3 )
( aw aw_1 aw_2 aw_3 )
( ax ax_1 ax_2 ax_3 )
( ay ay_1 ay_2 ay_3 )
( b b_1 b_2 b_3 )
( ch ch_1 ch_2 ch_3 )
... | |
102ef2ac7526272339cfbc359aa068b2184209d9149fe67cd509b986acc965fc | Clozure/ccl-tests | pprint.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Jul 25 11:42:48 2004
Contains : Tests of
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
;;; This function is mostly tested elsewhere
(deftest pprint.1
(random-pprint-test 1000)
nil)
(deftest pprint.2
(with-standard-io-syntax
(with-ou... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/pprint.lsp | lisp | -*- Mode: Lisp -*-
This function is mostly tested elsewhere
Error tests | Author :
Created : Sun Jul 25 11:42:48 2004
Contains : Tests of
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(deftest pprint.1
(random-pprint-test 1000)
nil)
(deftest pprint.2
(with-standard-io-syntax
(with-output-to-string
(os)
(with-input-from-string
(is "")
... |
6e98eddcf1c4f62763aa835d1cd490bdb74829a2b6c3b0b18349baf065954b28 | naryl/cl-tui | 2frame.lisp |
(defpackage cl-tui.examples
(:use :cl :cl-tui))
(in-package cl-tui.examples)
;; Rendering function for the frame defined below. Frame's contents
;; are cleared before this function is called
;; h and w are the frame's height and width. They may be different
;; each call which is demonstrated by this example too
(d... | null | https://raw.githubusercontent.com/naryl/cl-tui/4e8a06f50c682fba48884e5a35a6d16101298c08/examples/2frame.lisp | lisp | Rendering function for the frame defined below. Frame's contents
are cleared before this function is called
h and w are the frame's height and width. They may be different
each call which is demonstrated by this example too
This call defines a frame and paces it on :root frame.
There are several types of frames. ... |
(defpackage cl-tui.examples
(:use :cl :cl-tui))
(in-package cl-tui.examples)
(defun main-render (&key frame h w)
(put-text frame 1 1 "Try resizing the window and press space when done...")
(put-text frame 2 2 "Window size: ~Ax~A" h w)
(put-char frame 0 0 #\+)
(put-char frame 0 (1- w) #\+)
(put-char frame... |
eb56254946e5f63cd09d42cbfa5c0903e7ffb2c98cb023a611623702d490676f | bdeket/rktsicm | rz-test-cases.rkt | #lang s-exp "../../generic.rkt"
(require rackunit
"../../rkt/glue.rkt"
"../../general/assert.rkt"
"../../simplify.rkt"
"../helper.rkt")
(define (gcd-test d f g)
(let ((pd (pcf:expression-> d (lambda (p v) p)))
(pf (pcf:expression-> f (lambda (p v) p)))
(pg (pcf:expression-> g (... | null | https://raw.githubusercontent.com/bdeket/rktsicm/9a6177d98040f058214add392bd791f5259b83b5/rktsicm/sicm/tests/simplify/rz-test-cases.rkt | racket | #lang s-exp "../../generic.rkt"
(require rackunit
"../../rkt/glue.rkt"
"../../general/assert.rkt"
"../../simplify.rkt"
"../helper.rkt")
(define (gcd-test d f g)
(let ((pd (pcf:expression-> d (lambda (p v) p)))
(pf (pcf:expression-> f (lambda (p v) p)))
(pg (pcf:expression-> g (... | |
91d6eadeee128f07662ae720285953e60c6b513dddedcba51a2e161d93bf7398 | binsec/haunted | ida_options.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/ida/ida_options.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
df31cbcd9c515db822bdc95fb44fefe28b6e332f571560466a21c74179aea1c6 | clojureverse/clojurians-log-app | slack_msg_test.clj | (ns clojurians-log.slack-msg-test
(:require [clojurians-log.db.queries :as queries]
[time-literals.data-readers]
[clojure.test :refer :all]))
(deftest filter-channel-day-messages-test
(testing "thread messages should be removed"
(is (= [] (queries/filter-channel-day-messages [{:message/... | null | https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/test/clojurians_log/slack_msg_test.clj | clojure | (ns clojurians-log.slack-msg-test
(:require [clojurians-log.db.queries :as queries]
[time-literals.data-readers]
[clojure.test :refer :all]))
(deftest filter-channel-day-messages-test
(testing "thread messages should be removed"
(is (= [] (queries/filter-channel-day-messages [{:message/... | |
2d5cdb125480daf3392d321626a376af46ef7209a92025abf020bb214e73003c | logicmoo/wam_common_lisp | gcontext.lsp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
GContext
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individual or institu... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/clx/gcontext.lsp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
GContext
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
GContext values are usually cached locally in the GContext object .
This is required because the X.11 se... |
16b339b2b2a359d3e451d2115f36bc9649612cec97b380b92e400b3d11eeec66 | jgdavey/kevin | user.clj | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.zip :as zip]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[ring.server.standalone :refer (ser... | null | https://raw.githubusercontent.com/jgdavey/kevin/b4263c932b733c4e0b7729573cdc4550e69ddfa2/dev/user.clj | clojure | movies an actor was in
movies an actor with name like query was in
number of movies, total
number of movies with actors
number of movies with no actors
retract video games
zipper
bi-directional bfs
queue-based search
history-graham?
using path from rule
export movies and actors
quick n dirty profiling
Fil... | (ns user
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.pprint :refer (pprint)]
[clojure.repl :refer :all]
[clojure.zip :as zip]
[clojure.tools.namespace.repl :refer (refresh refresh-all)]
[ring.server.standalone :refer (ser... |
6c9567d05425893229ab8b89c474d61d250e375bd80cdde21b31f1590c54e21e | helium/ebus-gatt | gatt_application.erl | @doc Represents a GATT application as described by a " Profile " in
%% [-attributes-overview]
-module(gatt_application).
-include_lib("ebus/include/ebus.hrl").
-include("gatt.hrl").
-behavior(ebus_object).
-callback bus() -> {ok, ebus:bus()} | {error, term()}.
-callback path() -> ebus:object_path().
-callback ada... | null | https://raw.githubusercontent.com/helium/ebus-gatt/92732d7d7c153e46f4a7b9bde46c676b8d8476fd/src/gatt_application.erl | erlang | [-attributes-overview]
called back for our managed objects.
Ignore normal exits from registration
Private
TODO: Move this to gatt_appliation_sup? | @doc Represents a GATT application as described by a " Profile " in
-module(gatt_application).
-include_lib("ebus/include/ebus.hrl").
-include("gatt.hrl").
-behavior(ebus_object).
-callback bus() -> {ok, ebus:bus()} | {error, term()}.
-callback path() -> ebus:object_path().
-callback adapter_path() -> ebus:object... |
1a36dcf208359015a1d7a1ba1a82a83c0bbd51b18d4dea896e1c1b47f47a0743 | tonyrog/i2c | i2c_sd3078.erl | @author < >
( C ) 2020 ,
%%% @doc
RTC sd3078 for piSugar2
%%% @end
Created : 15 Nov 2020 by < >
-module(i2c_sd3078).
-export([open/1, open/2, open1/1, open1/2]).
-export([read_battery_low_flag/1]).
-export([read_battery_high_flag/1]).
-export([read_battery_charging_flag/1]).
-export([toggle_chargi... | null | https://raw.githubusercontent.com/tonyrog/i2c/1e3b2133b9276550c95e90ef19af11f7e33f5106/src/i2c_sd3078.erl | erlang | @doc
@end
debug/test
alarm time
ALARM bits
toggle?
read time
write time
Read alarm time
Check alarm enabled
Read alarm flag
Clear alarm flag
Disable alarm
disable alarm
set alarm time
set (byte) register bit
clear (byte) register bit | @author < >
( C ) 2020 ,
RTC sd3078 for piSugar2
Created : 15 Nov 2020 by < >
-module(i2c_sd3078).
-export([open/1, open/2, open1/1, open1/2]).
-export([read_battery_low_flag/1]).
-export([read_battery_high_flag/1]).
-export([read_battery_charging_flag/1]).
-export([toggle_charging/2]).
-export([r... |
7a2410210f8a958b6eb285f96fe430d82e57dd27619dc2b303736974aad2e7e0 | leandrosilva/cameron | misultin_echo.erl | % ==========================================================================================================
MISULTIN - Example : Echoes inputted GET variables into an XML .
%
% >-|-|-(°>
%
Copyright ( C ) 2011 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in source and binary forms, ... | null | https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/deps/misultin/examples/misultin_echo.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistribu... | MISULTIN - Example : Echoes inputted GET variables into an XML .
Copyright ( C ) 2011 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRECT , INDIRECT , INCIDENT... |
e7e06d7ea766eeda29672bba0c3d059b813b2fd88e8c80dceb9e9f6413cdaaf5 | haskell-tools/haskell-tools | References.hs | do n't show warnings , generated code contains unused variables
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - unused - matches #
-- | Generated references for AST elements.
module Language.Haskell.Tools.AST.References where
import Control.Reference hiding (element)
import ... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/ast/Language/Haskell/Tools/AST/References.hs | haskell | | Generated references for AST elements.
* Modules
* Declarations
* Binds
* Kinds
* Types
* Expressions
* Statements
* Patterns
* Template Haskell
* Literals
* Names | do n't show warnings , generated code contains unused variables
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - unused - matches #
module Language.Haskell.Tools.AST.References where
import Control.Reference hiding (element)
import Language.Haskell.Tools.AST.MakeASTReferences... |
109cfe200010c338769b6215858a994875e4a3f09809d4b94303392e317a0a46 | Workiva/eva | chaos_utils.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/test/eva/test/chaos_utils.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.test.chaos-utils
(:require [eva.v2.storage.value-store]
[clojure.test.check.generators :as gen]
[clojure.spec.alpha :as s]))
(defn- frequency-mock-spec->gen
"Converts mock sp... |
ca21fd0cb2d727f535d511d77b322c16e7fa2ace6f22a04139e0a9d74c70a715 | clojure-emacs/clj-suitable | test_ns.cljs | (ns ^{:doc "A test namespace"} suitable.test-ns
(:refer-clojure :exclude [unchecked-byte while])
(:require [clojure.string]
[suitable.test-ns-dep :as test-dep :refer [foo-in-dep]])
(:require-macros [suitable.test-macros :as test-macros :refer [my-add]])
(:import [goog.ui IdGenerator]))
(defrecord T... | null | https://raw.githubusercontent.com/clojure-emacs/clj-suitable/b472be03a44b2898a07663d62ccb68f8bff24e14/resources/suitable/test_ns.cljs | clojure | (ns ^{:doc "A test namespace"} suitable.test-ns
(:refer-clojure :exclude [unchecked-byte while])
(:require [clojure.string]
[suitable.test-ns-dep :as test-dep :refer [foo-in-dep]])
(:require-macros [suitable.test-macros :as test-macros :refer [my-add]])
(:import [goog.ui IdGenerator]))
(defrecord T... | |
50124dbcb106b1f0d97a1e47bcd63daf159f154677d916af0341f8273a6f1e0a | HaskellEmbedded/data-stm32 | IWDG.hs | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module {{ modns }}
( iwdgTower
, iwdgTowerManual
, IWDG()
) where
import Control.Monad (when)
import Data.List (findIndex)
import Ivory.Language
import Ivory.Tower
import Ivory.HW
import Ivory.BSP.STM32.ClockConfig
import I... | null | https://raw.githubusercontent.com/HaskellEmbedded/data-stm32/204aff53eaae422d30516039719a6ec7522a6ab7/templates/STM32/Driver/IWDG.hs | haskell | watchdog timeout
watchdog timeout
for example
according to this formula
| # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module {{ modns }}
( iwdgTower
, iwdgTowerManual
, IWDG()
) where
import Control.Monad (when)
import Data.List (findIndex)
import Ivory.Language
import Ivory.Tower
import Ivory.HW
import Ivory.BSP.STM32.ClockConfig
import I... |
09692108b9a12e287131f20c6f1e7a5600145ef40acdfb7c68faff672b78dc58 | elarous/O2SN | events.cljs | (ns o2sn.profile.events
(:require [kee-frame.core :refer [reg-event-fx
reg-event-db]]
[re-frame.core :refer [reg-fx dispatch]]
[ajax.core :as ajax]
[o2sn.common.interceptors :refer [server auth]]))
(reg-event-fx
:profile/load
(fn [{db :db} _]
... | null | https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/profile/events.cljs | clojure | (ns o2sn.profile.events
(:require [kee-frame.core :refer [reg-event-fx
reg-event-db]]
[re-frame.core :refer [reg-fx dispatch]]
[ajax.core :as ajax]
[o2sn.common.interceptors :refer [server auth]]))
(reg-event-fx
:profile/load
(fn [{db :db} _]
... | |
c6f4365fbdefa0ec383633e87e1e9b7834964f31023ec8b618f6d145169f16c6 | onedata/op-worker | node_manager_plugin.erl | %%%-------------------------------------------------------------------
@author
( C ) 2013 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Plugin which extends node manager ... | null | https://raw.githubusercontent.com/onedata/op-worker/953ce8c4b769c4380ae235457abe26520a2782ab/src/plugins/node_manager_plugin.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Plugin which extends node manager for op_worker
@end
-------------------------------------------------------------------
node_manager_plugin_behaviour callbacks
List of... | @author
( C ) 2013 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(node_manager_plugin).
-author("Michal Zmuda").
-include("global_definitions.hrl").
-include("graph_sync/provider_graph_sync.hrl").
-include_lib("ctool/include/errors.hrl").
-include_lib("ct... |
8444883a4f732e33ad226b799d529af4313eb9de8a0a0880e80d869678ba97ee | adamwalker/clash-utils | PipelineSpec.hs | {-# LANGUAGE RankNTypes #-}
module Stream.PipelineSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/96dbb94db9c2502687a6b909f8f6ff89da7c1eeb/tests/Stream/PipelineSpec.hs | haskell | # LANGUAGE RankNTypes # | module Stream.PipelineSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
Hidd... |
7afcff359cf2a26d6dd1bf7bd25544cb7bae2942bf37e5b76172fb68fef6e595 | racket/typed-racket | struct.rkt | #lang typed/racket/shallow
;; Test structs: definition, creation, accessors
(struct A ((x : Integer) (y : (Listof Integer)) (z : (-> Integer Integer))))
(define a (A 1 '(1) (lambda ((x : Integer)) (+ x x))))
(+ ((A-z a) (A-x a)) (car (A-y a)))
((lambda (x) x) 3)
(: f (-> (Listof A) Integer))
(define (f x)
(def... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/struct.rkt | racket | Test structs: definition, creation, accessors | #lang typed/racket/shallow
(struct A ((x : Integer) (y : (Listof Integer)) (z : (-> Integer Integer))))
(define a (A 1 '(1) (lambda ((x : Integer)) (+ x x))))
(+ ((A-z a) (A-x a)) (car (A-y a)))
((lambda (x) x) 3)
(: f (-> (Listof A) Integer))
(define (f x)
(define mya (car x))
(A-x mya))
(f (list a))
|
66d1e41cf3b0f405393b560018207cb9d9f6ced69a2ea2e8fd339c74344e1c93 | mentat-collective/functional-numerics | substitute_test.cljc | ;;
Copyright © 2020 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;;
;; This 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 ;... | null | https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/test/numerical/quadrature/substitute_test.cljc | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2020 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numerical.quadrature... |
bf2a60550342abc836feb260b06779457a5c4b73ef8f9febb31fd232a12cb7d5 | samrocketman/home | strBlinking.scm | (define (apply-strBlinking-effect img logo-layer bcolor npix spat numframe style fcolor fgrad fpat
shadow? bgshadow fgshadow xshadow yshadow opacity)
(let* (
(old-gradient (car (gimp-context-get-gradient)))
(old-pat (car (gimp-context-get-pattern)))
(old-fg (car (gimp-context-get-foreground)))
(widt... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/strBlinking.scm | scheme | (gimp-selection-none img)
end of cond
(gimp-context-set-foreground bcolor) | (define (apply-strBlinking-effect img logo-layer bcolor npix spat numframe style fcolor fgrad fpat
shadow? bgshadow fgshadow xshadow yshadow opacity)
(let* (
(old-gradient (car (gimp-context-get-gradient)))
(old-pat (car (gimp-context-get-pattern)))
(old-fg (car (gimp-context-get-foreground)))
(widt... |
6b4f63abc7d9bf13094dcde5b52226e2b18e276807fbb9ba5b563340411d9d85 | GavinMendelGleason/Cocktail | CTree.hs | data Void
void :: Void -> a
void _ = error "I will never be here"
instance Show Void where
show = void
data CTree a = Var a
| Leaf
| Bin Int (CTree (Maybe a)) (CTree (Maybe a)) deriving Show
shiftT :: CTree a -> CTree (Maybe a)
shiftT (Var a) = Var (Just a)
shiftT Leaf = Leaf
shiftT... | null | https://raw.githubusercontent.com/GavinMendelGleason/Cocktail/5828a3269d8f59b3af549f1a6998f32bf7d15b65/CTree.hs | haskell | data Void
void :: Void -> a
void _ = error "I will never be here"
instance Show Void where
show = void
data CTree a = Var a
| Leaf
| Bin Int (CTree (Maybe a)) (CTree (Maybe a)) deriving Show
shiftT :: CTree a -> CTree (Maybe a)
shiftT (Var a) = Var (Just a)
shiftT Leaf = Leaf
shiftT... | |
bc1453f36f8ef5abd3850f3547d89b7179b0653dbfc639d804c9da6767e22d2b | protz/mezzo | Driver.ml | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/parsing/Driver.ml | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
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
open Lexer
open Types
let chop_mz_or... |
1e8a204cbb1e28d5cfbc0ae0ec9fa456b6b1ed733a6f6f27f5b9d42f1040700f | synduce/Synduce | nestedl_pyramid.ml | * @synduce -s 2 -NB -n 30 --no - lifting
type list =
| Elt of int
| Cons of int * list
type nested_list =
| Line of list
| NCons of list * nested_list
let rec is_sorted = function
| Line x -> true
| NCons (hd, tl) -> aux (lmax hd) tl
and lmax = function
| Elt x -> x
| Cons (hd, tl) -> max (lmax tl) ... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/sortedlist/nestedl_pyramid.ml | ocaml | * @synduce -s 2 -NB -n 30 --no - lifting
type list =
| Elt of int
| Cons of int * list
type nested_list =
| Line of list
| NCons of list * nested_list
let rec is_sorted = function
| Line x -> true
| NCons (hd, tl) -> aux (lmax hd) tl
and lmax = function
| Elt x -> x
| Cons (hd, tl) -> max (lmax tl) ... | |
64d77c9658634f601fc37fc5c75efefda515ebd9ed37ce12e1cd1488abeeaf0f | babashka/babashka | error_test.clj | (ns babashka.error-test
{:clj-kondo/config '{:linters {:unresolved-symbol {:exclude [match?]}}}}
(:require
[babashka.test-utils :as tu]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is testing]]
[matcher-combinators.test]))
(defn process-difference [line]
(-... | null | https://raw.githubusercontent.com/babashka/babashka/3ad043769c16162abf33c58ad7068fb8ebc6679f/test/babashka/error_test.clj | clojure | take into account JDK14+ and native image differences
ensure that exception is thrown and we don't get here | (ns babashka.error-test
{:clj-kondo/config '{:linters {:unresolved-symbol {:exclude [match?]}}}}
(:require
[babashka.test-utils :as tu]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :as t :refer [deftest is testing]]
[matcher-combinators.test]))
(defn process-difference [line]
(-... |
79e011b5519a53aa2c0de7ae1a8794d444a32a82e5adb6a4627495779d61bb72 | Smart-Sql/smart-sql | smart_func.clj | (ns org.gridgain.plus.smart-func
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[org.gridgain.plus.dml.my-select-plus :as my-select-plus]
[org.gridgain.plus.dml.my-insert :as my-insert]
[org.gridgain.plus.dml.my-update :as my-update]
[org.gridgain.plus.dml.my... | null | https://raw.githubusercontent.com/Smart-Sql/smart-sql/d2f237f935472942a143816925221cdcf8246aff/src/main/clojure/org/gridgain/plus/smart_func.clj | clojure | 生成 class 的类名
(my-lexical/is-eq? schema_name "my_meta") -1
(first rs)))
)
(let [ast (my-select-plus/sql-to-ast lst)]
(if-not (Strings/isNullOrEmpty schema_name)
(if-let [my_data_set_id (get-data-set-id-by-ds-name ignite schema_nam... | (ns org.gridgain.plus.smart-func
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[org.gridgain.plus.dml.my-select-plus :as my-select-plus]
[org.gridgain.plus.dml.my-insert :as my-insert]
[org.gridgain.plus.dml.my-update :as my-update]
[org.gridgain.plus.dml.my... |
5602b57ef5f2f865ef47c97fb3f0ba60bb004866ee3592df06db7223648b0e57 | fetburner/Coq2SML | option.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/option.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Module implementing basic combinat... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let has_some = function
| ... |
897767a874a824cf67936ee6092ed988fe7cb0b2f9737c7e2c92b781e33d944a | esl/MongooseIM | mod_vcard_backend.erl | -module(mod_vcard_backend).
-define(MAIN_MODULE, mod_vcard).
-export([init/2]).
-export([remove_user/3]).
-export([get_vcard/3]).
-export([set_vcard/5]).
-export([search/3]).
-export([search_fields/2]).
-export([search_reported_fields/3]).
-export([remove_domain/2]).
-export([tear_down/1]).
%%-----------------------... | null | https://raw.githubusercontent.com/esl/MongooseIM/64d10a08d8e4700027734ec49ce4c4014b41b34b/src/vcard/mod_vcard_backend.erl | erlang | --------------------------------------------------------------------
callbacks
--------------------------------------------------------------------
--------------------------------------------------------------------
specs
-------------------------------------------------------------------- | -module(mod_vcard_backend).
-define(MAIN_MODULE, mod_vcard).
-export([init/2]).
-export([remove_user/3]).
-export([get_vcard/3]).
-export([set_vcard/5]).
-export([search/3]).
-export([search_fields/2]).
-export([search_reported_fields/3]).
-export([remove_domain/2]).
-export([tear_down/1]).
-callback init(HostType, ... |
7080d7377ce89af99b36c2c75446156bfff76cec278bd1fbe58b240b9cf5756d | arttuka/astar | core_test.cljc | (ns astar.core-test
(:require #?(:clj [clojure.test :refer [deftest is]]
:cljs [cljs.test :refer-macros [deftest is]])
[astar.core :refer [route]]))
(def graph {:a [:b :c]
:b [:a :d :e]
:c [:a :d :e]
:d [:b :c :f]
:e [:b :c :f]
:... | null | https://raw.githubusercontent.com/arttuka/astar/99d769100fad1bf409ced48c7f265cd449a564ac/test/astar/core_test.cljc | clojure | (ns astar.core-test
(:require #?(:clj [clojure.test :refer [deftest is]]
:cljs [cljs.test :refer-macros [deftest is]])
[astar.core :refer [route]]))
(def graph {:a [:b :c]
:b [:a :d :e]
:c [:a :d :e]
:d [:b :c :f]
:e [:b :c :f]
:... | |
396d217479461fef8a2602c437d08555919f02870c88d242cdaf792f73e53a00 | sdiehl/bulletproofs | Internal.hs | {-# LANGUAGE ViewPatterns, RecordWildCards, ScopedTypeVariables #-}
{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-}
module Bulletproofs.ArithmeticCircuit.Internal where
import Protolude hiding (head)
import Data.List (head)
import qualified Data.List as List
import qualified Data.Map as Map
import Test.QuickCheck
impo... | null | https://raw.githubusercontent.com/sdiehl/bulletproofs/6cb356a2ad44dea139abb81214f1babab8456b91/Bulletproofs/ArithmeticCircuit/Internal.hs | haskell | # LANGUAGE ViewPatterns, RecordWildCards, ScopedTypeVariables #
# LANGUAGE DeriveAnyClass, DeriveGeneric #
^ The number of gates is too high
^ Blinding factor of the T1 and T2 commitments,
combined into the form required to make the committed version of the x-polynomial add up
^ Blinding factor required for the Ver... |
module Bulletproofs.ArithmeticCircuit.Internal where
import Protolude hiding (head)
import Data.List (head)
import qualified Data.List as List
import qualified Data.Map as Map
import Test.QuickCheck
import Data.Curve.Weierstrass.SECP256K1 (PA, Fr, _r, mul)
import Bulletproofs.Utils
import qualified Bulletproofs.Inne... |
0c6877d9b8b9b26857b0cb6299537912705ffa2737f46eaa10ca86a2e9a2a892 | the-real-blackh/sodium-2d-game-engine | Platform.hs | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , FlexibleInstances ,
MultiParamTypeClasses , FlexibleContexts , StandaloneDeriving ,
UndecidableInstances #
MultiParamTypeClasses, FlexibleContexts, StandaloneDeriving,
UndecidableInstances #-}
module FRP.Sodium.GameEngine2D.Platf... | null | https://raw.githubusercontent.com/the-real-blackh/sodium-2d-game-engine/fb765eb50d39f0297274c2d24cd71dcec2dc2c2a/FRP/Sodium/GameEngine2D/Platform.hs | haskell | | Like 'gate' except it only blocks mouse down events, otherwise we get weird
effects.
Normally the bounding rectangle (used in caching) is caculated from all components.
This allows you to set it explicitly.
uncachedLabel :: Rect -> Color4 GLfloat -> Text -> Sprite p
Make this sprite invisible, but allow it to ca... | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving , FlexibleInstances ,
MultiParamTypeClasses , FlexibleContexts , StandaloneDeriving ,
UndecidableInstances #
MultiParamTypeClasses, FlexibleContexts, StandaloneDeriving,
UndecidableInstances #-}
module FRP.Sodium.GameEngine2D.Platf... |
5acaab8f7253b05af4a45a44922ad32e75cde5954cfe0bb32c671b0f199d998d | jmorag/mcc | Main.hs | module Main where
import Microc hiding ( Parser )
import Options.Applicative
import LLVM.Pretty
import Data.String.Conversions
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Pretty.... | null | https://raw.githubusercontent.com/jmorag/mcc/d412eec5e3783873ad42b74b837ed0f1047c2fde/app/Main.hs | haskell | running the file to see the expected output is default | module Main where
import Microc hiding ( Parser )
import Options.Applicative
import LLVM.Pretty
import Data.String.Conversions
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Pretty.... |
9249d6403bab3215afecd4f3ebba07546841210378b5a45c37c1a2c7e54f1b45 | facebook/flow | flow_build_id.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/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/build_id/flow_build_id.ml | ocaml |
* 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... | |
516f1fef2d0df9f4be5c28bbef11219f99239457e358b881bd6bb5660bef3c9d | alphagov/govuk-guix | rabbitmq.scm | (define-module (gds services utils databases rabbitmq)
#:use-module (ice-9 match)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu packages rabbitmq)
#:export (<rabbitmq-connection-config>
rabbitmq-connection-config
rabbitmq-connection-config?
rabbitmq... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/services/utils/databases/rabbitmq.scm | scheme | Set the correct value for the .erlang-cookie
Set the correct value for the .erlang-cookie
Use en_US, as this is in the
glibc-utf8-locales package | (define-module (gds services utils databases rabbitmq)
#:use-module (ice-9 match)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu packages rabbitmq)
#:export (<rabbitmq-connection-config>
rabbitmq-connection-config
rabbitmq-connection-config?
rabbitmq... |
58aa953b4cb407e4180c18c0736822baab6b93b5e9969813839cc39a791c5d28 | monadbobo/ocaml-core | core_set_intf.ml | open Sexplib
module type Elt = Comparator.Pre
module type Elt_binable = Comparator.Pre_binable
module type Accessors = sig
include Container.Generic_phantom
val mem : ('a, _) t -> 'a elt -> bool (* override [Container]'s [mem] *)
val add : ('a, 'comparator) t -> 'a elt -> ('a, 'comparator) t
val remove : ... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/core_set_intf.ml | ocaml | override [Container]'s [mem]
[subset x y] returns true iff [x] is a subset of [y].
* if [res = partition_tf set ~f] then [fst res] are the elements on which [f]
produced [true], and [snd res] are the elements on which [f] produces [false]
returns an arbitrary element, or None if the set is empty
* [split x... | open Sexplib
module type Elt = Comparator.Pre
module type Elt_binable = Comparator.Pre_binable
module type Accessors = sig
include Container.Generic_phantom
val add : ('a, 'comparator) t -> 'a elt -> ('a, 'comparator) t
val remove : ('a, 'comparator) t -> 'a elt -> ('a, 'comparator) t
val union : ('a, '... |
ff2f14e9ca570e2bdcf75b8af5f7f0548af948ea6f72e65e69724b07616aeb77 | Smoltbob/Caml-Est-Belle | array.ml | let x = Array.create 3 3 in
let t1 = x.(0) <- 3 in
let t2 = x.(1) <- 3 in
print_int (x.(1)) | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/valid/array.ml | ocaml | let x = Array.create 3 3 in
let t1 = x.(0) <- 3 in
let t2 = x.(1) <- 3 in
print_int (x.(1)) | |
36cddeed5ec1eee3c2b12e6d5bc05726b34fa931c174d2f1ed775bf6f4840797 | janestreet/merlin-jst | mconfig.ml | open Std
(** {1 OCaml commandline parsing} *)
let {Logger. log} = Logger.for_section "Mconfig"
type ocaml = {
include_dirs : string list;
no_std_include : bool;
unsafe : bool;
classic : bool;
principal : bool;
real_paths : bool;
threads ... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/9c3b60c98d80b56af18ea95c27a0902f0244659a/src/kernel/mconfig.ml | ocaml | * {1 OCaml commandline parsing}
* Some paths can be resolved relative to a current working directory
* {1 Merlin high-level settings}
flambda-backend specific
Jane Street specific
flambda-backend specific | open Std
let {Logger. log} = Logger.for_section "Mconfig"
type ocaml = {
include_dirs : string list;
no_std_include : bool;
unsafe : bool;
classic : bool;
principal : bool;
real_paths : bool;
threads : [ `None | `Threads | `Vmth... |
9304a733bbbc85be8b8c2cd03204e752f703154a85b8724a8a4f36512a7849dc | couchbase/couchdb | couch_replicator_utils.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/couchbase/couchdb/8a75fd2faa89f95158de1776354ceccf3e762753/src/couchdb/couch_replicator_utils.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_replicator_utils).
-export([parse_rep_doc/2]).
-export([open_db/1, close_db/1]).
-export([start_db_compaction_notifier/2, stop_db_compaction_... |
b2f73f5f621d710619366483e6bf2f138a72edd21e30cc78c798acd6080b409c | binaryage/cljs-devtools | issue24.cljs | (ns devtools-sample.tests.issue24
(:import [goog.date Date DateTime UtcDateTime])
(:require-macros [devtools-sample.logging :refer [log info]])
(:require [devtools-sample.boot :refer [boot!]]))
(boot! "/src/tests/devtools_sample/tests/issue24.cljs")
(enable-console-print!)
; --- MEAT STARTS HERE -->
(log fals... | null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/examples/lein/src/tests/devtools_sample/tests/issue24.cljs | clojure | --- MEAT STARTS HERE -->
<-- MEAT STOPS HERE --- | (ns devtools-sample.tests.issue24
(:import [goog.date Date DateTime UtcDateTime])
(:require-macros [devtools-sample.logging :refer [log info]])
(:require [devtools-sample.boot :refer [boot!]]))
(boot! "/src/tests/devtools_sample/tests/issue24.cljs")
(enable-console-print!)
(log false)
(log {:x false :y true})... |
9b0c3c2c9db84a2c440533d765f7ec2531a4e4edb76468dd90663304f564b54b | vincentdchan/ocaml-binaryen-dsl | stub_gen.ml | open Core
open Bindings
let codegen =
let sys_argvs = Sys.get_argv() in
let last = Array.last sys_argvs in
if String.equal last "-c" then (
printf "gen C\n";
Format.fprintf Format.str_formatter "#include <binaryen-c.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <f... | null | https://raw.githubusercontent.com/vincentdchan/ocaml-binaryen-dsl/9fb72fce16e311a638ef29426bcd3978860a6fd1/stub_gen/stub_gen.ml | ocaml | open Core
open Bindings
let codegen =
let sys_argvs = Sys.get_argv() in
let last = Array.last sys_argvs in
if String.equal last "-c" then (
printf "gen C\n";
Format.fprintf Format.str_formatter "#include <binaryen-c.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <f... | |
d0267d4c58bfce3f96027228d3e749903d94651a2b268d4b3f73337dfb3e7600 | gvannest/piscine_OCaml | main.ml | let rec print_mol_list (lst : (Molecule.molecule * int) list) = match lst with
| (mol, count) :: n :: t when count = 1 -> Printf.printf "%s + " (mol#formula) ; print_mol_list (n :: t)
| (mol, count) :: n :: t -> Printf.printf "%d%s + " count (mol#formula) ; print_mol_list (n :: t)
| (mol, count) :: t when c... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d08/ex04/main.ml | ocaml | let rec print_mol_list (lst : (Molecule.molecule * int) list) = match lst with
| (mol, count) :: n :: t when count = 1 -> Printf.printf "%s + " (mol#formula) ; print_mol_list (n :: t)
| (mol, count) :: n :: t -> Printf.printf "%d%s + " count (mol#formula) ; print_mol_list (n :: t)
| (mol, count) :: t when c... | |
ddd31272fa9d124385803fd81b6aab669385bd20215a320c9edbbab1ffcfb51a | input-output-hk/nix-tools | Stack.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Stack2nix.Stack
( Resolver
, Name
, Compiler
, Sha256
, CabalRev
, URL
, Rev
, Stack(..)
, Dependency(..)
, Location(..)
, StackSnapshot(..)
, PackageFlags
, GhcOptions
, parsePackageIdentifier
) where
impo... | null | https://raw.githubusercontent.com/input-output-hk/nix-tools/c9c10ab889a7b7f2f5f4bb71e8786fc01d49e53e/lib/Stack2nix/Stack.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
The stack.yaml file
------------------------------------------------------------------------------
------------------------------------------------------------------------------
packages
- ./site1
- ./... | # LANGUAGE GeneralizedNewtypeDeriving #
module Stack2nix.Stack
( Resolver
, Name
, Compiler
, Sha256
, CabalRev
, URL
, Rev
, Stack(..)
, Dependency(..)
, Location(..)
, StackSnapshot(..)
, PackageFlags
, GhcOptions
, parsePackageIdentifier
) where
import Data.Char (isDigit)
import Data.... |
fe2bf2f986f13026f683db82a3dac47d606df1a6395a89061f268c19efa2320c | nasser/magic | sparse_case.clj | (ns magic.spells.sparse-case)
(defn sparse-case
"Forces case expressions to compile sparsely when not switching on
integers. Avoids embedding hash results in the bytecode which breaks
across runtimes."
[compilers]
(update
compilers
:case
(fn
[old-case-compiler]
(fn sparse-case-compiler
... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/src/magic/spells/sparse_case.clj | clojure | (ns magic.spells.sparse-case)
(defn sparse-case
"Forces case expressions to compile sparsely when not switching on
integers. Avoids embedding hash results in the bytecode which breaks
across runtimes."
[compilers]
(update
compilers
:case
(fn
[old-case-compiler]
(fn sparse-case-compiler
... | |
439da86ff85397275ff4808537075c06c7dc72020b5a8f8d911c8b18605676ca | fdopen/uwt | log.ml | open Lwt.Infix
let section =
let s = Uwt_log.Section.make "uwt" in
Uwt_log.Section.set_level s Lwt_log_core.Info;
s
let init_logging () =
let id = Unix.getpid () in
let file_name =
Filename.concat
(Filename.get_temp_dir_name ())
("uwt-" ^ string_of_int id ^ ".log")
in
let template =
... | null | https://raw.githubusercontent.com/fdopen/uwt/44276aa6755b92eddc9ad58662a968afad243e8b/examples/log.ml | ocaml | Not useful, not portable, but it works :)
let sys_log = Uwt_log.syslog ~facility:`Auth () in
| open Lwt.Infix
let section =
let s = Uwt_log.Section.make "uwt" in
Uwt_log.Section.set_level s Lwt_log_core.Info;
s
let init_logging () =
let id = Unix.getpid () in
let file_name =
Filename.concat
(Filename.get_temp_dir_name ())
("uwt-" ^ string_of_int id ^ ".log")
in
let template =
... |
632a964976053a07ec606b333eb570f80e983f1ccca576a4e1bc9c6cbf4cf66c | jamshidh/ethereum-client-haskell | BlockSynchronizer.hs |
module Blockchain.BlockSynchronizer (
handleNewBlockHashes,
handleNewBlocks
) where
import Control.Monad.IO.Class
import Control.Monad.State
import qualified Data.Binary as Bin
import qualified Data.ByteString as B
import qualified Data.Byte... | null | https://raw.githubusercontent.com/jamshidh/ethereum-client-haskell/6f02781ff661b6a9687fd6fe0f3e0d99d1eacc6b/src/Blockchain/BlockSynchronizer.hs | haskell | import Debug.Trace
Only use for debug purposes, to trick the peer to rerun VM code for a particular block
items <- lift $ filterM (fmap (not . isNothing) . debug_blockDBGet . BL.toStrict . Bin.encode) hashes
error "handleNewBlockHashes called with empty list"
liftIO $ putStrLn "Requesting more block hashes"
head OK, []... |
module Blockchain.BlockSynchronizer (
handleNewBlockHashes,
handleNewBlocks
) where
import Control.Monad.IO.Class
import Control.Monad.State
import qualified Data.Binary as Bin
import qualified Data.ByteString as B
import qualified Data.Byte... |
353922a3382b67ecef4b6e8558b1509e2f6f55ea04962ed3e8e58455d2386e08 | S8A/htdp-exercises | ex388.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex388) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (h... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex388.rkt | racket | about the language level of this file in a form that our tools can easily process.
.: Data definitions :.
An Employee is a structure:
- n: the employee's name
- s: the employee's social security number
A Work Record (WR) is a structure:
(make-wr String Number)
interpretation (make-wr n h) combines:
- n: the ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex388) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "batch-io.rkt" "te... |
44c29caba31363fa32cec426143907c760e4cf96b45ed162eca88758e8552e8b | tallaproject/talla | talla_core_app.erl | %%%
Copyright ( c ) 2015 The Talla Authors . All rights reserved .
%%% Use of this source code is governed by a BSD-style
%%% license that can be found in the LICENSE file.
%%%
%%% -----------------------------------------------------------
@author < >
@doc The Talla Core Application .
%%% @end
%%% -----------... | null | https://raw.githubusercontent.com/tallaproject/talla/72cfbd8f48705a7a390cac2b8310ab7550c21c15/apps/talla_core/src/talla_core_app.erl | erlang |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-----------------------------------------------------------
@end
-----------------------------------------------------------
API. | Copyright ( c ) 2015 The Talla Authors . All rights reserved .
@author < >
@doc The Talla Core Application .
-module(talla_core_app).
-behaviour(application).
-export([start/2, stop/1]).
-spec start(normal | {takeover, node()} | {failover, node()}, term()) -> {ok, pid()} | {error, term()}.
start(_Type, _Args... |
88ce0642cf732ae394b53aae693282f9be1666a897a79ac899f0296f90bec000 | cffi/cffi | uffi-compat.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
uffi-compat.lisp --- UFFI compatibility layer for CFFI .
;;;
Copyright ( C ) 2005 - 2006 , < >
Copyright ( C ) 2005 - 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated docume... | null | https://raw.githubusercontent.com/cffi/cffi/677cabae64b181330a3bbbda9c11891a2a8edcdc/uffi-compat/uffi-compat.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to... | uffi-compat.lisp --- UFFI compatibility layer for CFFI .
Copyright ( C ) 2005 - 2006 , < >
Copyright ( C ) 2005 - 2007 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of t... |
8a230852fef53eaa83910d931f8aa66783e52e1b162cd1aff31b3dfa5b9238d1 | numberten/genetic_library | Genetics.hs | module Genetics (
Configuration (..),
defaultConfig,
Gene(Val,BitString),
Chromosome,
runGA
)
where
import System.Random
import Data.List
data Configuration = Config { geneSize :: Int... | null | https://raw.githubusercontent.com/numberten/genetic_library/b16f57115ee26adced963884e4d21d1faab37dc0/old/Genetics.hs | haskell | where
where
Generate Functions -- | module Genetics (
Configuration (..),
defaultConfig,
Gene(Val,BitString),
Chromosome,
runGA
)
where
import System.Random
import Data.List
data Configuration = Config { geneSize :: Int... |
f7e01ca618aa084f2a81abf9238c85e2ce3ae0038b99d00b641bee3fc0ea8afa | mbutterick/beautiful-racket | test-sources.rkt | #lang br
(require br/test rackunit)
(check-equal? (run-source "stackerizer-test.rkt") "4
8
+
3
*
")
| null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/stackerizer-demo/test-sources.rkt | racket | #lang br
(require br/test rackunit)
(check-equal? (run-source "stackerizer-test.rkt") "4
8
+
3
*
")
| |
2c95ec2ac2aa60899927c40bfcce816ba56644cb1e1e0a93c672e84ee54fc899 | hellonico/origami-fun | roi.clj | (ns opencv4.roi
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
(def original
(imread "resources/images/bizcard.png"))
(def work
(-> original
clone
(cvt-color! COLOR_RGB2GRAY)
(gaussian-blur! (new-size 15 15) 50)
(threshold! -1 200 (+ THRESH_BINARY_INV THRESH_OTSU))
(dilate! (get-stru... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/roi.clj | clojure | (ns opencv4.roi
(:require
[opencv4.core :refer :all]
[opencv4.utils :as u]))
(def original
(imread "resources/images/bizcard.png"))
(def work
(-> original
clone
(cvt-color! COLOR_RGB2GRAY)
(gaussian-blur! (new-size 15 15) 50)
(threshold! -1 200 (+ THRESH_BINARY_INV THRESH_OTSU))
(dilate! (get-stru... | |
ae5806db5d6fdefa9bd5d0d2e2ce796729845f559b6c3813e74a67b83c5f3cac | jaspervdj/number-six | Http.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Handlers.Http
( handler
) where
--------------------------------------------------------------------------------
import Control.Exception (SomeException (..), handl... | null | https://raw.githubusercontent.com/jaspervdj/number-six/1aba681786bd85bd20f79406c681ea581b982cd6/src/NumberSix/Handlers/Http.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | module NumberSix.Handlers.Http
( handler
) where
import Control.Exception (SomeException (..), handle)
import Control.Monad.Trans (liftIO)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified... |
59ba4b7dd321d58127044ad4d8cdd952f16b98f2162f4f4ac784dc602dd4ab2f | clojurebook/ClojureProgramming | project.clj | (defproject com.clojurebook/rdbms "1.0.0"
:description "Examples for working with relational databases using Clojure.
SQLite is assumed here, but everything should translate to your
preferred database with a minimal of hassle."
:dependencies [[org.clojure/clojure "1.3.0"]
... | null | https://raw.githubusercontent.com/clojurebook/ClojureProgramming/bcc7c58862982a5793e22788fc11a9ed7ffc548f/ch14-rdbms/project.clj | clojure | only needed for korma
only needed for hibernate
only needed for hibernate | (defproject com.clojurebook/rdbms "1.0.0"
:description "Examples for working with relational databases using Clojure.
SQLite is assumed here, but everything should translate to your
preferred database with a minimal of hassle."
:dependencies [[org.clojure/clojure "1.3.0"]
... |
7d90b0641b512fd5348a2d710b3e5af0ff75b92065c526be7db65a280b22128b | iij/lmq | lmq_handler.erl | -module(lmq_handler).
-behaviour(gen_event).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
code_change/3, terminate/2]).
%% ==================================================================
%% gen_event callbacks
%% ==================================================================
init([]) ->... | null | https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/src/lmq_handler.erl | erlang | ==================================================================
gen_event callbacks
================================================================== | -module(lmq_handler).
-behaviour(gen_event).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
code_change/3, terminate/2]).
init([]) ->
{ok, []}.
handle_event({local, {new_message, _}}, State) ->
{ok, State};
handle_event({remote, {new_message, QName}}, State) ->
lager:debug("new mes... |
a19394cceec94eaa02d3b8dc850ce7ab57cfd51152b5b4125b51d56f64245e0a | janestreet/mlt_parser | mlt_parser.mli | (** Code for parsing toplevel expect test files *)
open Ppxlib
open Expect_test_common
open Expect_test_matcher
type chunk =
{ part : string option (** The part the chunk is in, None if it's not in any
part. *)
; phrases : toplevel_phrase list
; expectation : Fmt.t... | null | https://raw.githubusercontent.com/janestreet/mlt_parser/ea93374613056b86cf0a53ad59c684398f387ae6/src/mlt_parser.mli | ocaml | * Code for parsing toplevel expect test files
* The part the chunk is in, None if it's not in any
part. |
open Ppxlib
open Expect_test_common
open Expect_test_matcher
type chunk =
; phrases : toplevel_phrase list
; expectation : Fmt.t Cst.t Expectation.t
; phrases_loc : Location.t
}
* Recursively parses toplevel phrases ( i.e. , contiguous units of code separated by
[ ; ; ] ) into " chunks " , one chun... |
3a39cd4d2aeb2526f1e9fe67b29d6e229d98b34bb4da255ce46ed300744f4009 | realark/vert | convex-polygon.lisp | (in-package :recurse.vert)
;; Note: Currently Dead code
(defclass convex-polygon (obb)
((local-points
:initarg :local-points
:initform (error ":local-points required")
:documentation "The polygon's local points."))
(:documentation "A convex polygon with [3,) points."))
(defmethod initialize-instance ... | null | https://raw.githubusercontent.com/realark/vert/4cb88545abc60f1fba4a8604ce85e70cbd4764a2/src/physics/convex-polygon.lisp | lisp | Note: Currently Dead code | (in-package :recurse.vert)
(defclass convex-polygon (obb)
((local-points
:initarg :local-points
:initform (error ":local-points required")
:documentation "The polygon's local points."))
(:documentation "A convex polygon with [3,) points."))
(defmethod initialize-instance :after ((polygon convex-polyg... |
c3589da5d46a4bb4fd7b5ca98da1667862579eedceedd0d2f012b63f48166b96 | codinuum/cca | lib.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/lib.ml | ocaml | lib.ml
| t ->
DEBUG_MSG "parser for %s not found" (C.tag_to_string t);
raise Not_found
for head-less main_program
of Lib.parser_c |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required b... |
bd823d36e3390c519d6528e5ee3246b8b36998b876dba956383f0891b44988af | evturn/haskellbook | 18.03-do-syntax-and-monads.hs | import Control.Applicative ((*>))
sequencing :: IO ()
sequencing = do
putStrLn "blah"
putStrLn "another thing"
sequencing' :: IO ()
sequencing' =
putStrLn "blah" >>
putStrLn "another thing"
sequencing'' :: IO ()
sequencing'' =
putStrLn "blah" *>
putStrLn "another thing"
binding :: IO ()
bindi... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/18/18.03-do-syntax-and-monads.hs | haskell | import Control.Applicative ((*>))
sequencing :: IO ()
sequencing = do
putStrLn "blah"
putStrLn "another thing"
sequencing' :: IO ()
sequencing' =
putStrLn "blah" >>
putStrLn "another thing"
sequencing'' :: IO ()
sequencing'' =
putStrLn "blah" *>
putStrLn "another thing"
binding :: IO ()
bindi... | |
c6287d432ee2dd9d1321f261f4a79941e03c25c3c024cd6ceba2d52b3dda289e | GaloisInc/parameterized-utils | Some.hs | ------------------------------------------------------------------------
-- |
-- Module : Data.Parameterized.Some
Copyright : ( c ) Galois , Inc 2014 - 2019
Maintainer : < >
Description : a GADT that hides a type parameter
--
This module provides ' Some ' , a GADT that hides a type p... | null | https://raw.githubusercontent.com/GaloisInc/parameterized-utils/1b2073d49f29b53454dda1f7abe51b762a8d1eda/src/Data/Parameterized/Some.hs | haskell | ----------------------------------------------------------------------
|
Module : Data.Parameterized.Some
----------------------------------------------------------------------
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Project out of Some.
| Apply function to inner value.
| Modify the inner value.
# ... | Copyright : ( c ) Galois , Inc 2014 - 2019
Maintainer : < >
Description : a GADT that hides a type parameter
This module provides ' Some ' , a GADT that hides a type parameter .
# LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
module Data.Parameterized.Some
( Some(..)
, viewSome
, mapS... |
4893716d58bf79e197233ed9bcd2ab68eec2fcb050759d5001543f763e697f24 | artyom-poptsov/guile-smc | log.scm | log.scm -- Guile - SMC logging facilities .
Copyright ( C ) 2021 - 2022 Artyom V. Poptsov < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-smc/bfee22bf82ff54c4c83924c611f4671e3aee8049/modules/smc/core/log.scm | scheme |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public ... | log.scm -- Guile - SMC logging facilities .
Copyright ( C ) 2021 - 2022 Artyom V. Poptsov < >
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
This ... |
a7b8b115e042d7da722ef7e86874962686e08c07c563bb35f1172c4605cccc45 | fons/cl-twitter | package.lisp | (in-package :cl-user)
(defpackage :twitter
(:use :cl :drakma :json :anaphora); :trivial-http)
(:nicknames :cl-twitter :twit)
(:export
;;helper functions
#:twitter-oauth-uri
#:show
;;------revised api -------
;;----lisp rest api ------
Time line resources as per
#:home-timeline
#:user-ti... | null | https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/package.lisp | lisp | :trivial-http)
helper functions
------revised api -------
----lisp rest api ------
Tweets resources
Tweets resources: app api
Trends resources
Direct Messages resources
Direct Messages resources api
Favorites resources
Favorites resources api
Block resources
Block resources api
Account resources : pa... | (in-package :cl-user)
(defpackage :twitter
(:nicknames :cl-twitter :twit)
(:export
#:twitter-oauth-uri
#:show
Time line resources as per
#:home-timeline
#:user-timeline
#:mentions-timeline
#:retweeted-by-me
#:retweeted-to-me
#:retweets-of-me
Time Line Resources api
#:collect-home-t... |
95936ed8791e15a25aa9546ce127ae7f5d659862e6849c1647a97ea683e592e5 | hargettp/courier | TestMailbox.hs | -----------------------------------------------------------------------------
-- |
Module : TestMailbox
Copyright : ( c ) 2014
License : MIT ( see LICENSE file )
--
-- Maintainer :
-- Stability : experimental
Portability : non - portable ( requires STM )
--
-- (..... module descri... | null | https://raw.githubusercontent.com/hargettp/courier/88a3b2aff4aefb21783555756c447b617fdd077e/tests/TestMailbox.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
(..... module description .....)
---------------------------------------------------------------------------
local imports
external imports
------------------------------------------------... | Module : TestMailbox
Copyright : ( c ) 2014
License : MIT ( see LICENSE file )
Portability : non - portable ( requires STM )
module TestMailbox (tests) where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.Mailbox
import Control.Concurrent.STM
imp... |
e2470a4283857726ae6a843f408746098bb185319869a933f97b44df6e7c1984 | gonimo/gonimo | Entities.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
# LANGUAGE GADTs #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE StandaloneDeriving #-}
module Gonimo.Db.Entities where
import Database... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Gonimo/Db/Entities.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE StandaloneDeriving #
TODO: Should really by "lastModified", fix it once we have db migrations and smart client updates.
Use DeviceId here as it is the most precise information about the sender.
or more precise: a browser on a device
... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE GADTs #
# LANGUAGE FlexibleInstances #
module Gonimo.Db.Entities where
import Database.Persist.TH
import Data.Aeson.Types (FromJSON, ToJSON (..), defaultOptions,
... |
02cc303639d173170bb1b9a642a80c6efc0424d19cceeaac4deafd59b611141f | brendanhay/amazonka | InsightSummary.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/InsightSummary.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
| Information that describes an insight.
/See:/ 'newInsightSummary' smart constructor.
| Categories The categories that label and describe the type of insight.
| The impact statistics of the client side service. This includes t... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Mo... |
a59a8b6a6dbf75de22c621027227d97865790e65265bdb4582f46aae1fe0ec52 | sqd/araneaSS | Manager.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE PatternGuards #
module Manager (
ManagerConfig (..),
defaultConfig,
runManager
) where
import Control.Monad
import Control.Monad.Trans
import Data.Conduit
import Data.Conduit.Attoparsec
import D... | null | https://raw.githubusercontent.com/sqd/araneaSS/f573a27a94b48587456d0622b27e2e53589b8217/Manager.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
module Manager (
ManagerConfig (..),
defaultConfig,
runManager
) where
import Control.Monad
import Control.Monad.Trans
import Data.Conduit
import Data.Conduit.Attoparsec
import Data.Conduit.Combinators as CC
import Data.Conduit.Network
impor... |
18a04a1b94279a406bf14828e7a48502496cf5ac30805ba3146724eae83364ed | 40ants/ci | workflow.lisp | (defpackage #:40ants-ci/workflow
(:use #:cl)
(:import-from #:40ants-ci/github
#:*current-system*)
(:import-from #:40ants-ci/utils
#:ensure-primary-system)
(:import-from #:40ants-ci/vars)
(:import-from #:alexandria
#:with-output-to-file)
(:export
#:defworkfl... | null | https://raw.githubusercontent.com/40ants/ci/f8de02181e78a610d928187c7fd642dac352560d/src/workflow.lisp | lisp | ignore-critiques: evil-eval
For system, we try to find all system packages
and execute generate for each of them: | (defpackage #:40ants-ci/workflow
(:use #:cl)
(:import-from #:40ants-ci/github
#:*current-system*)
(:import-from #:40ants-ci/utils
#:ensure-primary-system)
(:import-from #:40ants-ci/vars)
(:import-from #:alexandria
#:with-output-to-file)
(:export
#:defworkfl... |
dd9f5b24ce2623da639086bfc26af2f70a31a02a2958b9d8e701440a924c7c43 | ledyba/language-krkr | KagParserSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module KagParserSpec where
import Prelude hiding (readFile)
import qualified Language.KAG.Parser as P
import Language.KAG.Tree
import Text.ParserCombinators.Parsec.Error (ParseError)
import Data.Text hiding (filter,concat)
import Control.Monad
im... | null | https://raw.githubusercontent.com/ledyba/language-krkr/da01694ff6322fe187ca1be8eedc378e4c5d9a8c/test/KagParserSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -fno - warn - orphans #
module KagParserSpec where
import Prelude hiding (readFile)
import qualified Language.KAG.Parser as P
import Language.KAG.Tree
import Text.ParserCombinators.Parsec.Error (ParseError)
import Data.Text hiding (filter,concat)
import Control.Monad
import Test.Hspec
import System.Direc... |
a3244443c32844c33f6fc21c70f199f540626214d8ec1985927a01765981001b | locusmath/locus | field_element.clj | (ns locus.additive.field.element.field-element
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.cor... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/additive/field/element/field_element.clj | clojure | General abstract class for ring elements
This will allow us to integrate rings into our generic arithmetic system | (ns locus.additive.field.element.field-element
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.cor... |
f946c37c90a3bbabc94fcf8b4f6c9a655228e29da478cfb0e732a6f61ecc4bd8 | digitallyinduced/ihp-forum | New.hs | module Web.View.Users.New where
import Web.View.Prelude
data NewView = NewView { user :: User }
instance View NewView where
html NewView { .. } = [hsx|
<div id={currentViewId}>
<h1>Register</h1>
<p>
Here you can create a new account for the IHP Forum.
</... | null | https://raw.githubusercontent.com/digitallyinduced/ihp-forum/ac36ad4ab5dfe7b3aa85ea92d642aec12e4fa6ad/Web/View/Users/New.hs | haskell | module Web.View.Users.New where
import Web.View.Prelude
data NewView = NewView { user :: User }
instance View NewView where
html NewView { .. } = [hsx|
<div id={currentViewId}>
<h1>Register</h1>
<p>
Here you can create a new account for the IHP Forum.
</... | |
35801a9a1eaa47536e05140ca01c2d8b4d803c71845d39f75dd21746a9ae29f6 | dinosaure/prettym | test.ml | external random_seed : unit -> int array = "caml_sys_random_seed"
let seed = "90EMsUCFv4vRTbJGY+Y3ijLDsMBPDx7DH85k5CwdYfE="
let seed = Base64.decode_exn seed
let seed =
let res = Array.make (String.length seed / 2) 0 in
for i = 0 to (String.length seed / 2) - 1 do
res.(i) <- (Char.code seed.[i * 2] lsl 8) lor... | null | https://raw.githubusercontent.com/dinosaure/prettym/5068eead308db4b730959d9794e0f3d0275d99fe/test/test.ml | ocaml | XXX(dinosaure): instead to cut at [&], it unroll the [tbox] and print elements to the new line. | external random_seed : unit -> int array = "caml_sys_random_seed"
let seed = "90EMsUCFv4vRTbJGY+Y3ijLDsMBPDx7DH85k5CwdYfE="
let seed = Base64.decode_exn seed
let seed =
let res = Array.make (String.length seed / 2) 0 in
for i = 0 to (String.length seed / 2) - 1 do
res.(i) <- (Char.code seed.[i * 2] lsl 8) lor... |
f750a80153202c75bd8a1017f9697f401bd6e1e76adf89490881039242a85155 | antifuchs/cl-stripe | charge_steps.lisp | ;; -*- lisp -*-
(defun lookup-currency-symbol (currency-symbol)
(values
(cdr (assoc currency-symbol '(("$" . "usd")
("ct" . "usd"))
:test 'string-equal))
(if (string-equal currency-symbol "$")
100
1)))
;; TODO: generate the card number randomly
(de... | null | https://raw.githubusercontent.com/antifuchs/cl-stripe/9a857682a13dac1a392cbf635faa256630e40311/features/step_definitions/charge_steps.lisp | lisp | -*- lisp -*-
TODO: generate the card number randomly |
(defun lookup-currency-symbol (currency-symbol)
(values
(cdr (assoc currency-symbol '(("$" . "usd")
("ct" . "usd"))
:test 'string-equal))
(if (string-equal currency-symbol "$")
100
1)))
(defvar *random-card* (list :number "4242424242424242" :exp_mo... |
a3234cd50544e45be14fa4d7b2566078066a33780026e7e9b582c21f3da0c5c8 | input-output-hk/ouroboros-network | Compat.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE EmptyCase #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Ouroboros.Consensus.HardFork.Combinator.Compat (
HardFor... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/437d7160079c83c4632fe0a42c596e5105c59a4d/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Compat.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE EmptyCase #
# LANGUAGE KindSignatures #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
* Convenience constructors
* Wrappers
------------------------------------------------------------------------------
Query language
-------------------... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Consensus.HardFork.Combinator.Compat (
HardForkCompatQuery (..)
, compatGetEraStart
, compatGetInterpreter
, compatIfCurrent
, forwardCompatQuery
, singleEraCompatQuery
) where
import Data.Kind (Type)
import ... |
1c7e4518dd9e901d294a94a3ea2e79f4293b3fd8e2666c19c9bf4952912e2ee1 | shuieryin/wechat_mud | look.erl | %%%-------------------------------------------------------------------
@author shuieryin
( C ) 2015 , Shuieryin
%%% @doc
%%%
%%% Look module. This module returns the current scene content to
%%% player when no arugments provided, or returns specific character
%%% or object vice versa.
%%%
%%% @end
Created : 20 .... | null | https://raw.githubusercontent.com/shuieryin/wechat_mud/b2a9251a9b208fee5cd8c4213759750b95c8b8aa/src/commands/look.erl | erlang | -------------------------------------------------------------------
@doc
Look module. This module returns the current scene content to
player when no arugments provided, or returns specific character
or object vice versa.
@end
-------------------------------------------------------------------
API
generic inte... | @author shuieryin
( C ) 2015 , Shuieryin
Created : 20 . Sep 2015 8:19 PM
-module(look).
-author("shuieryin").
-export([
exec/3,
exec/4,
being_look/3,
feedback/3,
look_scene/3
]).
-include("../data_type/scene_info.hrl").
-include("../data_type/player_profile.hrl").
-include("../data_type/np... |
90065e273f63bfec93cb00935288ce9ad93bb945ac0f7e9321e219b72b91a490 | Decentralized-Pictures/T4L3NT | block_forge.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_delegate/block_forge.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
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 , WHETHER IN AN... |
7d4956a14e090ec8ced90182fcd90441187762b05360031fb27d3abbb9749788 | CloudI/CloudI | epgsql_codec_postgis.erl | %%% @doc
%%% Codec for `geometry' PostGIS umbrella datatype.
%%%
XXX : PostGIS is not a Postgres 's built - in datatype ! It should be instaled
%%% separately and enabled via `CREATE EXTENSION postgis'.
%%% <ul>
%%% <li>[-2.4/geometry.html]</li>
%%% <li>$POSTGIS$/postgis/lwgeom_inout.c</li>
%%% </ul>
%%% @end
%%% @... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/src/epgsql_codec_postgis.erl | erlang | @doc
Codec for `geometry' PostGIS umbrella datatype.
separately and enabled via `CREATE EXTENSION postgis'.
<ul>
<li>[-2.4/geometry.html]</li>
<li>$POSTGIS$/postgis/lwgeom_inout.c</li>
</ul>
@end
@see ewkb
@end | XXX : PostGIS is not a Postgres 's built - in datatype ! It should be instaled
Created : 14 Oct 2017 by < >
-module(epgsql_codec_postgis).
-behaviour(epgsql_codec).
-export([init/2, names/0, encode/3, decode/3, decode_text/3]).
-export_type([data/0]).
-type data() :: ewkb:geometry().
init(_, _) -> [].
name... |
12eacc740296e86e31eec40e97b958b52dddd05661eaf4cefbbc2f9285549389 | hipsleek/hipsleek | hsprinter.ml | #include "xdebug.cppo"
open VarGen
open Format
open Globals
open Exc.GTable
open Lexing
open Cast
open Iformula
open Cformula
open Mcpure_D
open Gen.Basic
open Label_only
module Cprinter =
struct
let string_of_typed_spec_var (x: Cpure.spec_var) =
Format.printf "%s" (Cprinter.string_of_typed_spec_var x)
le... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/hsprinter.ml | ocaml | let string_of_int_label (i,s) s2 =
Format.printf "%s" (Cprinter.string_of_int_label (i,s) s2)
let string_of_int_label_opt h s2 =
Format.printf "%s" (Cprinter.string_of_int_label_opt h s2)
Format.printf "%s" (Cprinter.string_of_formula_label (i, s) s2)
... | #include "xdebug.cppo"
open VarGen
open Format
open Globals
open Exc.GTable
open Lexing
open Cast
open Iformula
open Cformula
open Mcpure_D
open Gen.Basic
open Label_only
module Cprinter =
struct
let string_of_typed_spec_var (x: Cpure.spec_var) =
Format.printf "%s" (Cprinter.string_of_typed_spec_var x)
le... |
cf93ef5aae56a19d5b519fe9db46d3c544e82406ac8e2949cec7d1f01e6e59ec | Seggan/Fig | compression.clj | (ns fig.compression
(:require [clojure.string :as str]
[fig.chars :as chars]))
< = > ? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " )
(def compressionCodepage " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
(def compressableChars ... | null | https://raw.githubusercontent.com/Seggan/Fig/5a66f525440c34028e723cf05339cfa13ef4aec1/src/fig/compression.clj | clojure | <=>?@[\\]^_`{|}~")
Confirm compression was successful | (ns fig.compression
(:require [clojure.string :as str]
[fig.chars :as chars]))
< = > ? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " )
(def compressionCodepage " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
(def dictionary (str/s... |
5516c1cfa4970add79c9e04ec1bc8a81dd02728f9dc877545b629b1e00b192d6 | pierre-lecocq/pml | parse.lisp | ;;;; parse.lisp
Time - stamp : < 2017 - 02 - 14 14:31:35 >
Copyright ( C ) 2017
(defvar *log-parser-data* '((remote-addr . '((index . 0)
(eq-func . string=)
(regex . "(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d... | null | https://raw.githubusercontent.com/pierre-lecocq/pml/16c565fe22eb973989d90cbca60699d21e865b78/src/parse.lisp | lisp | parse.lisp
2 & 3
4 & 5
8 & 9
10 & 11 |
Time - stamp : < 2017 - 02 - 14 14:31:35 >
Copyright ( C ) 2017
(defvar *log-parser-data* '((remote-addr . '((index . 0)
(eq-func . string=)
(regex . "(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})+")
... |
6f70a4432c97a2e7f1c6caa66473ce9faeedf4ff4563b965394acd99279207f2 | Gbury/dolmen | expr_intf.ml | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Expressions
This modules defines the smallest signatures for expressions that allow
to isntantiates the {Pipes.Make} functor. *)
module type S = sig
type ty
type ty_var
type ty_cst
type term
type term_var... | null | https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/loop/expr_intf.ml | ocaml | * Expressions
This modules defines the smallest signatures for expressions that allow
to isntantiates the {Pipes.Make} functor. | This file is free software , part of Archsat . See file " LICENSE " for more details .
module type S = sig
type ty
type ty_var
type ty_cst
type term
type term_var
type term_cst
type formula
end
module type Print = sig
include S
val ty : Format.formatter -> ty -> unit
val ty_var : Format.f... |
474bb832d9eb948453fe27d6e91e8861ad24c2ea3b1573644f200bdd96af86dc | rowangithub/DOrder | flow.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/flow.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
module ty... |
d9e4e35a5332c8be7d22eb5fd51e7b83f579c5f4e1d6353b8b98525e8c17f097 | OCamlPro/drom | lenses.mli | * Partial lenses ( returns [ option ] ) for accessing TOML structures . They make
it possible to read / write deeply nested immutable values .
it possible to read/write deeply nested immutable values. *)
type ('a, 'b) lens =
{ get : 'a -> 'b option;
set : 'b -> 'a -> 'a option
}
* Extracts a value f... | null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/toml.7.1.0/lenses.mli | ocaml | * Add 'int=42' to each table which doesn't already have an 'int' key | * Partial lenses ( returns [ option ] ) for accessing TOML structures . They make
it possible to read / write deeply nested immutable values .
it possible to read/write deeply nested immutable values. *)
type ('a, 'b) lens =
{ get : 'a -> 'b option;
set : 'b -> 'a -> 'a option
}
* Extracts a value f... |
49f532fefe8a3aa54869cee403f048074aad8db18cce1359dd2715f89cf0ffb6 | dextroamphetamine/nuko | Fields.hs | module Nuko.Typer.Infer.Fields (
assertFields
) where
import Relude
import Nuko.Names (Name, Qualified, TyName, ValName)
import Nuko.Report.Range (HasPosition (getPos), Range (..))
import Nuko.Tree (Re)
import Nuko.Tree.Expr (RecordBinder, rbName)
import Nuko.Typer.Env (FieldInfo (_fi... | null | https://raw.githubusercontent.com/dextroamphetamine/nuko/1b6f960eeeebbfcbfb5700279c39758f82e7df28/src/Nuko/Typer/Infer/Fields.hs | haskell | Removes duplicated fields and things that does not belongs to the type | module Nuko.Typer.Infer.Fields (
assertFields
) where
import Relude
import Nuko.Names (Name, Qualified, TyName, ValName)
import Nuko.Report.Range (HasPosition (getPos), Range (..))
import Nuko.Tree (Re)
import Nuko.Tree.Expr (RecordBinder, rbName)
import Nuko.Typer.Env (FieldInfo (_fi... |
96ac801b3e098aca4f54156cf342e4caae41b22140e7e4ee47e2082965a2b3bd | richhickey/clojure-contrib | applet.clj | Copyright ( c ) , Jan 2009 . 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 b... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/clojurescript/src/clojure/contrib/clojurescript/applet.clj | clojure | 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
the terms of this license.
You must not remove ... | Copyright ( c ) , Jan 2009 . All rights reserved .
Applet that provides Clojure - to - JavaScript functionality to a browser
(ns clojure.contrib.clojurescript.applet
(:import (java.io PrintWriter StringReader))
(:gen-class
:extends java.applet.Applet
:methods [[tojs [String] Object]])
(:use [c... |
2dde1ade587178eb0ff67f712cc57f2ec253ad9695347339805aaa2b5af3aa03 | TrustInSoft/tis-interpreter | Callgraph.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/callgraph/Callgraph.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
19c68a1ee2a0a60658cfae78ba03b658c8a5e3264432e03b959469072cc781fa | tschady/advent-of-code | d11.clj | (ns aoc.2020.d11
(:require [aoc.coll-util :as coll-util]
[aoc.file-util :as file-util]
[aoc.grid :as grid]
[clojure.core.matrix :as mat]))
(def input (file-util/read-lines "2020/d11.txt"))
(def glyph->val {\. :floor
\# :occupied
\L :empty})
(def... | null | https://raw.githubusercontent.com/tschady/advent-of-code/7edcbffb407898c9def443856e039a8079d46131/src/aoc/2020/d11.clj | clojure | (ns aoc.2020.d11
(:require [aoc.coll-util :as coll-util]
[aoc.file-util :as file-util]
[aoc.grid :as grid]
[clojure.core.matrix :as mat]))
(def input (file-util/read-lines "2020/d11.txt"))
(def glyph->val {\. :floor
\# :occupied
\L :empty})
(def... | |
53cf70f2c9e4c2694a8b784d32916b6f954f5ef29a64e2479745bbc264896ff3 | wireapp/servant-uverb | UVerb.hs | # LANGUAGE AllowAmbiguousTypes #
# OPTIONS_GHC -Wno - orphans #
module Servant.Client.UVerb
( collapseUResp,
extractUResp,
ClientParseError (..),
)
where
import Control.Arrow ((+++), left)
import Control.Monad (unless)
import qualified Data.ByteString.Lazy as LB
import Data.Either (partitionEithers)
impor... | null | https://raw.githubusercontent.com/wireapp/servant-uverb/a2d445e05f9e470590dcbec80db8959bcfb89b43/servant-uverb-client/src/Servant/Client/UVerb.hs | haskell | | convenience function to extract an unknown union element using a type class.
| convenience function to extract an unknown union element using 'cast'.
supported by the api, so we don't have to parse all of them, no? not sure i'm
missing anything here.
failures it encountered along the way
| Given a list of type... | # LANGUAGE AllowAmbiguousTypes #
# OPTIONS_GHC -Wno - orphans #
module Servant.Client.UVerb
( collapseUResp,
extractUResp,
ClientParseError (..),
)
where
import Control.Arrow ((+++), left)
import Control.Monad (unless)
import qualified Data.ByteString.Lazy as LB
import Data.Either (partitionEithers)
impor... |
5b19e4c408c3bf76528c5f967a61b6dacc41ef71b559a3a04af64f19ff9c9914 | bufferswap/ViralityEngine | dquat.lisp | (in-package #:vorigin.dquat)
(u:fn-> = (quat quat &key (:rel u:f64) (:abs u:f64)) boolean)
(declaim (inline =))
(defun = (quat1 quat2 &key (rel 1d-7) (abs rel))
(declare (optimize speed))
(com:cwcmp 4 (quat1 quat2) (com:= quat1 quat2 rel abs)))
(u:fn-> id! (quat) quat)
(declaim (inline id!))
(defun id! (quat)
(... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/operations/dquat.lisp | lisp | (in-package #:vorigin.dquat)
(u:fn-> = (quat quat &key (:rel u:f64) (:abs u:f64)) boolean)
(declaim (inline =))
(defun = (quat1 quat2 &key (rel 1d-7) (abs rel))
(declare (optimize speed))
(com:cwcmp 4 (quat1 quat2) (com:= quat1 quat2 rel abs)))
(u:fn-> id! (quat) quat)
(declaim (inline id!))
(defun id! (quat)
(... | |
b0b1f12adf57ea71b6417e6768ae1d112f17f68c51329baa263c4ea4b5aa2182 | srid/neuron | Html.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
module Neuron.Frontend.Static.Html where
import Cont... | null | https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/src/Neuron/Frontend/Static/Html.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Render the given route | # LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
module Neuron.Frontend.Static.Html where
import Control.Monad.Fix (MonadFix)
import Neuron.Frontend.Manifest (renderManifest)
import Neuron.Fro... |
c5d8bda60aca32c188674c82236422d8ca6e92cafc3b5d0dbf4c2ca7a0ba9c4d | Vortecsmaster/EmurgoAcademyPlutusExamples | UsingSCvalidator.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-#... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/e1398dc4ad9e06ff9fd75e0d87db3218db749966/V2_110/LendingPlatform/src/UsingSCvalidator.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
Ledger
import for Serialization
THE ON-CHAIN CODE
New wrapper function for typed validators
Get the untyped validator script of the wrapped ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module UsingSCvalidator where
PlutusTx
import PlutusTx (Data (..))
import qualified PlutusTx
import qualified Plutus... |
284c885ae0c67ff4646969168cdb8078fa836fb07323d32b007603ebd9776044 | JacquesCarette/Drasil | Print.hs | | Defines main LaTeX printer functions . For more information on each of the helper functions , please view the [ source files]( / / docs / full / drasil - printers-0.1.10.0 / src / Language . . TeX.Print.html ) .
module Language.Drasil.TeX.Print(genTeX, pExpr, pUnit, spec) where
import Prelude hiding (print)
impo... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/93cb12d84e35a938aaa20d27da9c16504dc37f59/code/drasil-printers/lib/Language/Drasil/TeX/Print.hs | haskell | | Helper to build the document.
| Helper for converting layout objects into a more printable form.
| Converts layout objects into a document form.
| Determine wether braces and brackets are opening or closing.
---------------------------------------------------------------
---------------- EXPRESSION PRINTING------... | | Defines main LaTeX printer functions . For more information on each of the helper functions , please view the [ source files]( / / docs / full / drasil - printers-0.1.10.0 / src / Language . . TeX.Print.html ) .
module Language.Drasil.TeX.Print(genTeX, pExpr, pUnit, spec) where
import Prelude hiding (print)
impo... |
8f6349e7cd796760dcf210cab9d6a55c1815ea9f3e85f130102d6947f65d8b00 | b0-system/brzo | brzo_c.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... | null | https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/src-c/brzo_c.mli | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... | |
3e95cf95b62b672bf167f78726091d6c1568bfd1ea439039922765c5c7510663 | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2015 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns xmltest06.core)
(use '[clojure.... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/xmltest06/src/xmltest06/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2015 , 2020
-v10.html
(ns xmltest06.core)
(use '[clojure.xml])
(use '[clojure.pprint])
(use '[clojure.zip])
(defn xmltest06
[]
(let [parsed-xml (clojure.xml/parse "nested.xml")
zipper (clojure.zip/xml-zip parsed-xml)]
(clojure.pprint/pprint parsed-xml)... |
cd9d1c9dd1de00be9f7b2a6eaaa5cd914a6745778387aab4187673e35d399eae | hiroshi-unno/coar | solutionTemplate.ml | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open PCSatCommon
open Template.Function
type cand = (Ident.tvar, Logic.Sort.t * Logic.term) Map.Poly.t
type candidate =
| Cands of cand * (cand * Ident.tvar) list
| OutSpace of Ident.tvar list
type candidate_or_unsat_core =
| Cand... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/synthesis/solutionTemplate.ml | ocaml | Debug.print @@ lazy (Logic.ExtTerm.str_of term);
Debug.print @@ lazy (Logic.ExtTerm.str_of term');
TODO: generate fenv
Debug.print @@ lazy (Formula.str_of phi ^ " couldn't be evaluated. This may cause a violation of the progress property.");
never use
Debug.print @@ lazy (ExAtom.str_of atom ^ " on " ^ Formula.str_... | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open PCSatCommon
open Template.Function
type cand = (Ident.tvar, Logic.Sort.t * Logic.term) Map.Poly.t
type candidate =
| Cands of cand * (cand * Ident.tvar) list
| OutSpace of Ident.tvar list
type candidate_or_unsat_core =
| Cand... |
56dede54a544dcde5a3ccc424c934b8e13f322561bd6672df288a7233d2ae926 | technomancy/syme | web.clj | (ns syme.web
(:require [cheshire.core :as json]
[clj-http.client :as http]
[compojure.route :as route]
[noir.util.middleware :as noir]
[ring.adapter.jetty :as jetty]
[ring.middleware.file-info :as file-info]
[ring.middleware.resource :as resource... | null | https://raw.githubusercontent.com/technomancy/syme/3bf5a92181e040692a4fe9f26f089670d95e2c6e/src/syme/web.clj | clojure | pre-registered for :5000
For interactive development:
(.stop server)
(def server (-main)) | (ns syme.web
(:require [cheshire.core :as json]
[clj-http.client :as http]
[compojure.route :as route]
[noir.util.middleware :as noir]
[ring.adapter.jetty :as jetty]
[ring.middleware.file-info :as file-info]
[ring.middleware.resource :as resource... |
d39a9bfd99e07c0be7af9b9b94d6351da6b721fa9a009a54cf15eefe437eb3c3 | manavpatnaik/haskell | 6.hs | sumEvenNums [] = 0
sumEvenNums (x : xs)
| even x = x + sumEvenNums xs
| otherwise = sumEvenNums xs
main = do
print(sumEvenNums [1,2,3,4,5,6]) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/bb4d09c75a2894469d870408be5b0051a225366c/practice-set-3-miscellaneous/5_lists/6.hs | haskell | sumEvenNums [] = 0
sumEvenNums (x : xs)
| even x = x + sumEvenNums xs
| otherwise = sumEvenNums xs
main = do
print(sumEvenNums [1,2,3,4,5,6]) | |
5d79ec7225994381a90c340fea825961fb152990791133f3996c441fafc13c11 | skanev/playground | 39-tests.scm | (require rackunit rackunit/text-ui)
(load "helpers/compiler.scm")
(load "../39.scm")
(define (env mappings)
(if (null? mappings)
the-empty-environment
(extend-environment (caar mappings)
(cadar mappings)
(env (cdr mappings)))))
(define sicp-5.39-tests
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/39-tests.scm | scheme | (test-case "setting a lexical variable in a frame, other than the top") | (require rackunit rackunit/text-ui)
(load "helpers/compiler.scm")
(load "../39.scm")
(define (env mappings)
(if (null? mappings)
the-empty-environment
(extend-environment (caar mappings)
(cadar mappings)
(env (cdr mappings)))))
(define sicp-5.39-tests
... |
70a7e9e6201cebf629f3f95e478d005efc6d4b13c6c530de841d7767541c7088 | SquidDev/urn | base.lisp | (import test ())
(describe "The base library"
(it "can unwrap values"
(affirm (eq? 23 (const-val (struct :tag "number" :value 23)))
(eq? "foo" (const-val (struct :tag "string" :value "foo")))
(eq? 'foo (const-val 'foo))
(neq? false (const-val (struct :tag "boolean" :value fals... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/tests/lib/core/base.lisp | lisp | (import test ())
(describe "The base library"
(it "can unwrap values"
(affirm (eq? 23 (const-val (struct :tag "number" :value 23)))
(eq? "foo" (const-val (struct :tag "string" :value "foo")))
(eq? 'foo (const-val 'foo))
(neq? false (const-val (struct :tag "boolean" :value fals... | |
dab9f0bad95e48a22c8b2f47df5a30faa9f8eb40704ccb9348cc9e2c8b4c336a | scalaris-team/scalaris | db_ets_SUITE.erl | 2010 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/db_ets_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2010 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(db_ets_SUITE).
-author('').
-compile(export_all).
-define(TEST_DB, db_ets).
-define(CLOSE, close).
-inclu... |
17698b8dd8ed2fc2e3c7f91083d9f026a10c9d7ab32d5f51efd389320e3069f0 | sneeuwballen/zipperposition | Scoped.ml |
This file is free software , part of Logtk . See file " license " for more details .
(** {1 Scoped Value} *)
type scope = int
type +'a t = 'a * scope
let[@inline] make x i : _ t = x, i
let[@inline] get ((x,_): _ t) = x
let[@inline] scope ((_,sc):_ t) = sc
let[@inline] set (_,s) x : _ t = x, s
let[@inline] same... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/71798cc0559d2c365ad43a0a54e204a2d079cebd/src/core/Scoped.ml | ocaml | * {1 Scoped Value} |
This file is free software , part of Logtk . See file " license " for more details .
type scope = int
type +'a t = 'a * scope
let[@inline] make x i : _ t = x, i
let[@inline] get ((x,_): _ t) = x
let[@inline] scope ((_,sc):_ t) = sc
let[@inline] set (_,s) x : _ t = x, s
let[@inline] same_scope (v1:_ t) (v2:_ t)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.