_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 |
|---|---|---|---|---|---|---|---|---|
34b75c7d8e76359bee8ae59e57b5b483d39c3a33f347fa448abb19e5062abb75 | ocsigen/ocsimore | forum_sql0.ml | Ocsimore
* Copyright ( C ) 2005
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* 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 2 of the License , or
... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/forum/forum_sql0.ml | ocaml | This file is here to remove a circular dependancy of Forum_sql
tree_min and tree_max are here only for the interface to be
compatible with get_thread | Ocsimore
* Copyright ( C ) 2005
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* 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 2 of the License , or
... |
1ebadbfe534cac2fe71fa6a2520d63e0838662164dcd83ae0aeb9ce08c66612d | collaborativetrust/WikiTrust | trust_local_color_analysis.ml |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/trust_local_color_analysis.ml | ocaml | * This class colorizes a wiki dump file according to text trust.
Text trust is computed paying attention to syntactic text units,
such as paragraphs and enumerations.
Signatures of authors who raised the word trust
* This method evaluates the trust of the words of a new revision
Gets the reputation of the ... |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... |
8729326837784de54fe3be15fcfdc276724a9cf9290cee8f0ed5f4cd6fd044ca | ahungry/ahungry-fleece | rotate-byte.lisp | (in-package "af.contrib.sb-rotate-byte")
(defun rotate-byte (count bytespec integer)
"Rotates a field of bits within INTEGER; specifically, returns an
integer that contains the bits of INTEGER rotated COUNT times
leftwards within the byte specified by BYTESPEC, and elsewhere
contains the bits of INTEGER."
(rotate-... | null | https://raw.githubusercontent.com/ahungry/ahungry-fleece/1cef1d3a3aa9cffe9f06b7632006565bbc986814/contrib/sb-rotate-byte/rotate-byte.lisp | lisp | specifically, returns an
inhibit transforms | (in-package "af.contrib.sb-rotate-byte")
(defun rotate-byte (count bytespec integer)
integer that contains the bits of INTEGER rotated COUNT times
leftwards within the byte specified by BYTESPEC, and elsewhere
contains the bits of INTEGER."
(rotate-byte count bytespec integer))
(defun %rotate-byte (count size pos i... |
1180d2cfd6429dc483824d73248908aea0ef0be21de74a372751b2f55802fda4 | mhuebert/chia | hiccup_test.cljs | (ns chia.view.hiccup-test
(:require [cljs.test :refer [deftest is are testing]]
["react" :as react]
["react-dom" :as react-dom]
[chia.view.hiccup :refer [element]]
[chia.view.hiccup.impl :as hiccup]))
(enable-console-print!)
(defn element-args [form]
(let [tag (nth ... | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/view/test/chia/view/hiccup_test.cljs | clojure | (ns chia.view.hiccup-test
(:require [cljs.test :refer [deftest is are testing]]
["react" :as react]
["react-dom" :as react-dom]
[chia.view.hiccup :refer [element]]
[chia.view.hiccup.impl :as hiccup]))
(enable-console-print!)
(defn element-args [form]
(let [tag (nth ... | |
56a22498ea9e74172c603ba218b9b78e2ae4dfbe38d663d78fa0e36bbed184d6 | gergo-/ldrgen | utils.mli | (**************************************************************************)
(* *)
, a generator of random C programs
Copyright ( C ) 2017 - 2013 , < >
(* ... | null | https://raw.githubusercontent.com/gergo-/ldrgen/bb0682945196ec07e52ea3faa40a5334010d86a9/utils.mli | ocaml | ************************************************************************
This program is free software: you can redistribute it and/or modify
(at your option) any later... | , a generator of random C programs
Copyright ( C ) 2017 - 2013 , < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the G... |
f39124ca4501faa5297923b5d3325742bad26dcf772296fc2181dfc21ea33207 | SquidDev/illuaminate | store.ml | open IlluaminateCore
open Lsp
open Lsp.Types
open Data
module Data = IlluaminateData
module UriTbl = Hashtbl.Make (Uri)
module Config = IlluaminateConfigFormat
module FilenameSet = Set.Make (Span.Filename)
module UriMap = Map.Make (struct
type t = Uri.t
let compare l r = String.compare (Uri.to_string l) (Uri.to_s... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/7a6e4bf56f01e81a47c743cb452791c2168ccbda/src/bin/lsp/store.ml | ocaml | TODO: Better error handling. Publish diagnostics or something?
In order to extract a file, we try to read our open files, from disk, and then give up after
that.
Then we use the above key to extract the actual program.
The file list is derived from all matching patterns in the config file for each workspa... | open IlluaminateCore
open Lsp
open Lsp.Types
open Data
module Data = IlluaminateData
module UriTbl = Hashtbl.Make (Uri)
module Config = IlluaminateConfigFormat
module FilenameSet = Set.Make (Span.Filename)
module UriMap = Map.Make (struct
type t = Uri.t
let compare l r = String.compare (Uri.to_string l) (Uri.to_s... |
79ab95bd83efd26060d633283b61a07afbc50f6765105bee175e377ec14ece77 | incoherentsoftware/defect-process | Sprites.hs | module Enemy.All.Hop.Sprites
( EnemySprites(..)
, mkEnemySprites
) where
import Control.Monad.IO.Class (MonadIO)
import Enemy.Util
import FileCache
import Window.Graphics
data EnemySprites = EnemySprites
{ _spawn :: Sprite
, _idle :: Sprite
, _hurt :: Sprite
... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Hop/Sprites.hs | haskell | module Enemy.All.Hop.Sprites
( EnemySprites(..)
, mkEnemySprites
) where
import Control.Monad.IO.Class (MonadIO)
import Enemy.Util
import FileCache
import Window.Graphics
data EnemySprites = EnemySprites
{ _spawn :: Sprite
, _idle :: Sprite
, _hurt :: Sprite
... | |
1158a0545cd7b2d612e7bc5388971eb7450430a3e310b7411bfc8cf18af0aa77 | exercism/racket | word-count.rkt | #lang racket
(provide word-count)
(define (word-count string)
(error "Not implemented yet"))
| null | https://raw.githubusercontent.com/exercism/racket/9aee694e8eeff14cd453502c1a2946745da60fb5/exercises/practice/word-count/word-count.rkt | racket | #lang racket
(provide word-count)
(define (word-count string)
(error "Not implemented yet"))
| |
559eccd4a38a5da7d3b62fae1486af87751645f0b5ffbbed5afeaf92ec94a982 | ghcjs/ghcjs | Prog.hs | module Prog(prog) where
import Board
import Wins
import Game
import Tree
prog :: String -> String
prog _ =
"OXO\n" ++
concat (map showMove game)
where
game = alternate X max' min' testBoard
testBoard = [[Empty,O,Empty],[Empty,X,Empty],[Empty,Empty,Empty]]
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/nofib/spectral/minimax/Prog.hs | haskell | module Prog(prog) where
import Board
import Wins
import Game
import Tree
prog :: String -> String
prog _ =
"OXO\n" ++
concat (map showMove game)
where
game = alternate X max' min' testBoard
testBoard = [[Empty,O,Empty],[Empty,X,Empty],[Empty,Empty,Empty]]
| |
04626966f205842c3533a6a04e43e480fb6c3cfb3f5c26edd62df033b4a7142e | redstarssystems/apptemplate | build.clj | (ns build
(:refer-clojure :exclude [test])
(:require
[clojure.pprint]
[org.corfield.build :as bb]))
(def artifact 'org.rssys/apptemplate)
(def version "0.1.0-SNAPSHOT")
( def version ( format " 1.0.%s " ( System / getenv " git - rev - count " ) ) ) ; ; alternatively , use MAJOR.MINOR.COMMITS :
(def... | null | https://raw.githubusercontent.com/redstarssystems/apptemplate/62d106c5b272eedb6b93ce56730d98e7e1ac6de7/build.clj | clojure | ; alternatively , use MAJOR.MINOR.COMMITS : | (ns build
(:refer-clojure :exclude [test])
(:require
[clojure.pprint]
[org.corfield.build :as bb]))
(def artifact 'org.rssys/apptemplate)
(def version "0.1.0-SNAPSHOT")
(def project-env
{:artifact artifact
:version version
:build-time (System/getenv "build-time")... |
23aea5a0526778cae7b212717edc5db397017a6c922e8a204c7055482e47d312 | fccm/OCamlSDL2 | sdlhat.ml | type positions = {
left: bool;
right: bool;
up: bool;
down: bool;
}
let string_of_pos p =
let lst = [] in
let lst = if p.down then "Down"::lst else lst in
let lst = if p.up then "Up"::lst else lst in
let lst = if p.right then "Right"::lst else lst in
let lst = if p.left then "Left"::lst else lst... | null | https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/src/sdlhat.ml | ocaml | type positions = {
left: bool;
right: bool;
up: bool;
down: bool;
}
let string_of_pos p =
let lst = [] in
let lst = if p.down then "Down"::lst else lst in
let lst = if p.up then "Up"::lst else lst in
let lst = if p.right then "Right"::lst else lst in
let lst = if p.left then "Left"::lst else lst... | |
904bf7bbdd1f9ebb082327198327cd862f390fcb353f502dddf662d7eb07f1f9 | defndaines/meiro | wilson_test.clj | (ns meiro.wilson-test
(:require [clojure.test :refer [deftest testing is]]
[meiro.core :as meiro]
[meiro.wilson :as wilson]))
(deftest walk-test
(testing "Path includes one visited cell."
(let [maze (meiro/init 8 8)]
(is (= [0 0]
(last (#'meiro.wilson/walk
... | null | https://raw.githubusercontent.com/defndaines/meiro/f91d4dee2842c056a162c861baf8b71bb4fb140c/test/meiro/wilson_test.clj | clojure | (ns meiro.wilson-test
(:require [clojure.test :refer [deftest testing is]]
[meiro.core :as meiro]
[meiro.wilson :as wilson]))
(deftest walk-test
(testing "Path includes one visited cell."
(let [maze (meiro/init 8 8)]
(is (= [0 0]
(last (#'meiro.wilson/walk
... | |
f316729ebf99b574537d3aef7a9bde8e8e0a2a20ba22a184a19519e0bf29e576 | noprompt/frak | platform.cljc | (ns frak.platform)
(defn exit [code]
#?(:clj (System/exit code)
:cljs (.exit js/process code)))
(defn printerr [message]
#?(:clj (.println *err* message)
:cljs (.error js/console message)))
(defn log [message]
#?(:clj (println message)
:cljs (.log js/console message)))
| null | https://raw.githubusercontent.com/noprompt/frak/355bf7a39b0cd3fa8714dc602d70b230c189b39c/src/cljc/frak/platform.cljc | clojure | (ns frak.platform)
(defn exit [code]
#?(:clj (System/exit code)
:cljs (.exit js/process code)))
(defn printerr [message]
#?(:clj (.println *err* message)
:cljs (.error js/console message)))
(defn log [message]
#?(:clj (println message)
:cljs (.log js/console message)))
| |
eb0d4cac711ec14f187c61689465940de538525cc4a7c9d352aa4622f3c35aa1 | Ericson2314/lighthouse | Properties.hs | --
-- Must have rules off, otherwise the fusion rules will replace the rhs
with the lhs , and we only end up testing lhs = = lhs
--
import Test.QuickCheck
import Data.List
import Data.Char
import Data.Word
import Data.Maybe
import Data.Int (Int64)
import Text.Printf
import Debug.Trace
import System.Environment
im... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/bytestring/tests/Properties.hs | haskell |
Must have rules off, otherwise the fusion rules will replace the rhs
double check:
Currently there's a bug in the lazy bytestring version of lines, this
catches it:
prop_zipWithPL' = P.zipWith' `eq3` (zipWith :: (W -> W -> W) -> [W] -> [W] -> [W])
--------------------------------------------------------... | with the lhs , and we only end up testing lhs = = lhs
import Test.QuickCheck
import Data.List
import Data.Char
import Data.Word
import Data.Maybe
import Data.Int (Int64)
import Text.Printf
import Debug.Trace
import System.Environment
import System.IO
import System.IO.Unsafe
import System.Random
import Foreign.Pt... |
e9ffbcd23bdff69604cbd782a72ede54123bb006cad543a1ba214e0eac28bbbe | footprintanalytics/footprint-web | index.clj | (ns metabase.server.routes.index
"Logic related to loading various versions of the index.html template. The actual template lives in
`resources/frontend_client/index_template.html`; when the frontend is built (e.g. via `./bin/build frontend`)
different versions that include the FE app are created as `index.html`,... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/server/routes/index.clj | clojure | when the frontend is built (e.g. via `./bin/build frontend`) | (ns metabase.server.routes.index
"Logic related to loading various versions of the index.html template. The actual template lives in
different versions that include the FE app are created as `index.html`, `public.html`, and `embed.html`."
(:require [cheshire.core :as json]
[clojure.java.io :as io]
... |
4064430f8620fec634dedc96dd0617b47a45378a5ae80f645160c6998f72e6ba | clojure-interop/google-cloud-clients | WebSecurityScannerClient$ListScanRunsPage.clj | (ns com.google.cloud.websecurityscanner.v1beta.WebSecurityScannerClient$ListScanRunsPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.websecurityscanner.v1beta WebSecurityScannerClient$ListScanRunsPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
fut... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.websecurityscanner/src/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerClient%24ListScanRunsPage.clj | clojure | (ns com.google.cloud.websecurityscanner.v1beta.WebSecurityScannerClient$ListScanRunsPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.websecurityscanner.v1beta WebSecurityScannerClient$ListScanRunsPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
fut... | |
15f0d4e1c7aaa7860ee257a4bf8c87ebc40a483f5287accc30bada3575669ad4 | haskell-opengl/OpenGLRaw | BlendEquationAdvancedCoherent.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.BlendEquationAdvancedCoherent
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/BlendEquationAdvancedCoherent.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.NV.BlendEquationAdvancedCoherent
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enu... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.BlendEquationAdvancedCoherent (
glGetNVBlendEquationAdvancedCoherent,
gl_NV_blend_equation_advanced_coherent,
pattern GL_BLEND_ADVANCED_COHERENT_NV
) where
import Graphics.GL.ExtensionPredicates
import G... |
a20a41d0a538aa56c949bfb84af98c8beecb72a0f48dcbcb7e5cf4f528570666 | Enecuum/Node | Process.hs | module Enecuum.Framework.Domain.Process
( ProcessId
, ProcessPtr
, ProcessVar
, createProcessPtr
, getProcessId
, getProcessVar
) where
import Enecuum.Prelude
type ProcessVar a = TMVar a
type ProcessId = Int
data ProcessPtr a = ProcessPtr ProcessId (ProcessVar a)
createProcessPtr :: Proce... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Framework/Domain/Process.hs | haskell | module Enecuum.Framework.Domain.Process
( ProcessId
, ProcessPtr
, ProcessVar
, createProcessPtr
, getProcessId
, getProcessVar
) where
import Enecuum.Prelude
type ProcessVar a = TMVar a
type ProcessId = Int
data ProcessPtr a = ProcessPtr ProcessId (ProcessVar a)
createProcessPtr :: Proce... | |
9bc38b445cca9d4d869c34757b7381b17cc5a63a3b9ae9222104fa799c1486f9 | district0x/district-designer | smart_contract_events.cljs | (ns tcr.shared.spec.smart-contract-events
(:require
[cljs.spec.alpha :as s]
[district-designer.shared.spec.ipfs-events :refer [ipfs-hash? address? edn? event-type]]
[district-designer.shared.spec.smart-contract-events]
[tcr.shared.spec.ipfs-events]
[tokens.shared.spec.smart-contract-events]))
(s... | null | https://raw.githubusercontent.com/district0x/district-designer/3f2a585b866b6e173f2cb7b32ecadcffa33e2804/src/tcr/shared/spec/smart_contract_events.cljs | clojure | (ns tcr.shared.spec.smart-contract-events
(:require
[cljs.spec.alpha :as s]
[district-designer.shared.spec.ipfs-events :refer [ipfs-hash? address? edn? event-type]]
[district-designer.shared.spec.smart-contract-events]
[tcr.shared.spec.ipfs-events]
[tokens.shared.spec.smart-contract-events]))
(s... | |
89c5ee731395309de43bf72a5073b75398243303fc664fa237b0c8409dfd294c | mihaiolteanu/youtube | youtube.lisp | (in-package :youtube)
(defparameter *socket* "/tmp/mpv-cl-socket")
(defparameter *playing-url* nil)
(defun youtube-url-p (url-or-song)
"Decide if the string is a youtube url and return it back if it is."
(and (or (scan-to-strings "youtube\.com" url-or-song)
(scan-to-strings "youtu\.be" url-or-song))
... | null | https://raw.githubusercontent.com/mihaiolteanu/youtube/0fde2a5481543fa0a2db0251cb0acc4134d82ac6/youtube.lisp | lisp | Even though the youtube url is valid, some videos are not available;
ignore it and move along
url might happen after playing the video which would result in a state
url for xdg-open must be surrounded by quotes | (in-package :youtube)
(defparameter *socket* "/tmp/mpv-cl-socket")
(defparameter *playing-url* nil)
(defun youtube-url-p (url-or-song)
"Decide if the string is a youtube url and return it back if it is."
(and (or (scan-to-strings "youtube\.com" url-or-song)
(scan-to-strings "youtu\.be" url-or-song))
... |
5cc6d531a4aeb2961c4537b5bac390057370001009ca36ac470b393794b53d4b | mzp/scheme-abc | link.mli | val link : Swflib.Abc.t -> Swflib.Abc.t -> Swflib.Abc.t
| null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/link/link.mli | ocaml | val link : Swflib.Abc.t -> Swflib.Abc.t -> Swflib.Abc.t
| |
f31cea45276afde62e69662b26bca184b0afa86295fdb7a5076bb84fdd769e04 | timbertson/opam2nix | option.ml | let some x = Some x
let map fn = function None -> None | Some x -> Some (fn x)
let tap fn = function None -> None | Some x -> fn x; Some x
let filter fn = function None -> None | Some x -> (if fn x then Some x else None)
let may fn = function None -> () | Some x -> fn x
let bind fn = function None -> None | Some x -> f... | null | https://raw.githubusercontent.com/timbertson/opam2nix/c6120844b07d38646741afc85976b2dcc42246ec/src/option.ml | ocaml | let some x = Some x
let map fn = function None -> None | Some x -> Some (fn x)
let tap fn = function None -> None | Some x -> fn x; Some x
let filter fn = function None -> None | Some x -> (if fn x then Some x else None)
let may fn = function None -> () | Some x -> fn x
let bind fn = function None -> None | Some x -> f... | |
19f9c604523136b4d663133efc602f93b9d8321e6a9e65df74175457c347e3ae | ijvcms/chuanqi_dev | skill_db.erl | %%%-------------------------------------------------------------------
@author zhengsiying
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 11 . 八月 2015 下午6:06
%%%-------------------------------------------------------------------
-module(skill_db).
-include("common.hrl").
-include("cache.hrl").
%% API... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/skill/skill_db.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
==================================================================== | @author zhengsiying
( C ) 2015 , < COMPANY >
Created : 11 . 八月 2015 下午6:06
-module(skill_db).
-include("common.hrl").
-include("cache.hrl").
-export([
select_all/1,
select_row/1,
insert/1,
delete/1,
update/2
]).
select_all({PlayerId, '_'}) ->
case db:select_all(skill, record_info(fields, db_skill), [{pl... |
98ccafb24bfb6972e498b4c550c84ffe56b58799e19afca0e657b6dd96100c83 | esengie/fpl-exploration-tool | Reduction.hs | module AST.Reduction(
Reduction(..)
) where
import Data.List(intercalate)
import AST.Term
import AST.Judgement
data Reduction = Reduction {
name :: Name,
stab :: Stab,
forallVars :: [(MetaVar, Sort)],
premise :: [Judgement],
conclusion :: Judgement
}
instance Show Reduction where
show (... | null | https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/src/specLang/AST/Reduction.hs | haskell | module AST.Reduction(
Reduction(..)
) where
import Data.List(intercalate)
import AST.Term
import AST.Judgement
data Reduction = Reduction {
name :: Name,
stab :: Stab,
forallVars :: [(MetaVar, Sort)],
premise :: [Judgement],
conclusion :: Judgement
}
instance Show Reduction where
show (... | |
6f870c587458cd3b65c27accbee082118e78f8b9c642b789a18694c3c00e75b5 | idubrov/siperl | sip_ua_session.erl | @author < >
@doc Internal module to support sessions from the UA side ( offer / answer interactions )
%%%
%%% @end
2011 - 2012 . See LICENSE file .
-module(sip_ua_session).
-compile({parse_transform, do}).
%% Internal API
-export([process_request/2, process_invite/3, process_response/3]).
%% Include fil... | null | https://raw.githubusercontent.com/idubrov/siperl/251daf3a0d7c7442f56f42cfd6c92764a4f475a7/apps/sip/src/cores/sip_ua_session.erl | erlang |
@end
Internal API
Include files
-----------------------------------------------------------------
Internal API
-----------------------------------------------------------------
@doc Update session based on the offer/answer from the remote side
@end
INVITEs coming outside of the dialog should be processed
throu... | @author < >
@doc Internal module to support sessions from the UA side ( offer / answer interactions )
2011 - 2012 . See LICENSE file .
-module(sip_ua_session).
-compile({parse_transform, do}).
-export([process_request/2, process_invite/3, process_response/3]).
-include("../sip_common.hrl").
-include("si... |
9666855b0160aecafefac38713a9d8a88afa85e03ed275e5e47bdcc1d891e157 | fpco/schoolofhaskell.com | NewGroup.hs | -- | Create a new group.
module Handler.NewGroup where
import Import
import Import.NewContentMember
-- | New group route.
getNewGroupR :: TutorialNames -> Handler Html
getNewGroupR tns = do
Entity _ profile <- requireProfile
getNewHelper profile $ NewHelper form TcontentGroupSum tgroupTitle "group" UserTutor... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/NewGroup.hs | haskell | | Create a new group.
| New group route.
| New group post route.
| New group form. |
module Handler.NewGroup where
import Import
import Import.NewContentMember
getNewGroupR :: TutorialNames -> Handler Html
getNewGroupR tns = do
Entity _ profile <- requireProfile
getNewHelper profile $ NewHelper form TcontentGroupSum tgroupTitle "group" UserTutorialR tns
postNewGroupR :: TutorialNames -> Han... |
079d66321f68fa36e97dfe2b5299acd4daad4c77b7faef69ab010659f4ee8abd | danielsz/system | sente_test.clj | (ns system.components.sente-test
(:require [system.components.sente :refer [new-channel-socket-server]]
[com.stuartsierra.component :as component]
[taoensso.sente :as sente]
[taoensso.sente.server-adapters.http-kit :refer [http-kit-adapter]]
[clojure.test :refer [deftes... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/test/system/components/sente_test.clj | clojure | (ns system.components.sente-test
(:require [system.components.sente :refer [new-channel-socket-server]]
[com.stuartsierra.component :as component]
[taoensso.sente :as sente]
[taoensso.sente.server-adapters.http-kit :refer [http-kit-adapter]]
[clojure.test :refer [deftes... | |
0eae71b83a11fbc467d1081e83d1712249461130e69332b04232808221c4d427 | WJWH/Mytransfer | Types.hs | {-# LANGUAGE OverloadedStrings #-}
module Types where
--module for types and constants
import Control.Concurrent
import Data.IORef
import Data.Pool
import qualified Data.Text as T
import Data.Time
import Database . SQLite . Simple
import Database.PostgreSQL.Simple
import Network.Wai.Handler.Warp (defaultSettings)
impo... | null | https://raw.githubusercontent.com/WJWH/Mytransfer/31eb207b3da0318c3725b8abcc2557b93856b6cd/src/Types.hs | haskell | # LANGUAGE OverloadedStrings #
module for types and constants
don't forget the / at the end!
uploaded files are kept here before they are uploaded, then they are deleted
the directory where images to be used as backgrounds are stored
the interval at which the vacuum function is called
the information required to connec... | module Types where
import Control.Concurrent
import Data.IORef
import Data.Pool
import qualified Data.Text as T
import Data.Time
import Database . SQLite . Simple
import Database.PostgreSQL.Simple
import Network.Wai.Handler.Warp (defaultSettings)
import Web.Scotty
import Secrets
A FID is the T.Text version of a fi... |
b1c45a2b04eac0ef3e17638be1d7fdfc81194f712210e65210711cfad54d52ff | fukamachi/lack | backtrace.lisp | (in-package :cl-user)
(defpackage lack.middleware.backtrace
(:use :cl)
(:import-from :uiop/image
:print-condition-backtrace)
(:export :*lack-middleware-backtrace*))
(in-package :lack.middleware.backtrace)
(defparameter *lack-middleware-backtrace*
(lambda (app &key
(output '*error-ou... | null | https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/src/middleware/backtrace.lisp | lisp | (in-package :cl-user)
(defpackage lack.middleware.backtrace
(:use :cl)
(:import-from :uiop/image
:print-condition-backtrace)
(:export :*lack-middleware-backtrace*))
(in-package :lack.middleware.backtrace)
(defparameter *lack-middleware-backtrace*
(lambda (app &key
(output '*error-ou... | |
e7d7c3bdccd5eb4900b66cf729e971c5ab505cb25e7b6918c47ec7694c8add40 | thomaseding/hearthshroud | HandColumn.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Hearth.Client.Console.Render.HandColumn (
handColumn
) where
----------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/thomaseding/hearthshroud/b21e2f69f394c94a106a3b57b95aa1a76b8d4003/src/Hearth/Client/Console/Render/HandColumn.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Hearth.Client.Console.Render.HandColumn (
handColumn
) where
import Control.Lens hiding (index)
import Data.List
import Data.String
import Hearth.Authored.Cards
import Hearth.Client.Console.SGRString
import Hearth.Engine
impor... |
0be8a6f8929e9e3788c14c64dde9b5fdd94fdf223a6854895b00fbde7c073d70 | haskell/cabal | NoThunks.hs | # LANGUAGE CPP #
#if !(__GLASGOW_HASKELL__ >= 806 && defined(MIN_VERSION_nothunks))
module Main (main) where
main :: IO ()
main = putStrLn "Old GHC, no nothunks"
#else
# LANGUAGE DerivingVia #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving ... | null | https://raw.githubusercontent.com/haskell/cabal/00a2351789a460700a2567eb5ecc42cca0af913f/Cabal-tests/tests/NoThunks.hs | haskell | # LANGUAGE StandaloneDeriving #
ok
found thunk
-----------------------------------------------------------------------------
NoThunks instances
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
NoThunks helper... | # LANGUAGE CPP #
#if !(__GLASGOW_HASKELL__ >= 806 && defined(MIN_VERSION_nothunks))
module Main (main) where
main :: IO ()
main = putStrLn "Old GHC, no nothunks"
#else
# LANGUAGE DerivingVia #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wno - orphans #
mo... |
3eca034423053bd859b4a5fab6845a14a5aeabeec09ee1df75457b7b2b92b96d | drlivingston/kabob | ontology_ice_gen_rules.clj | ;; -------------------------------------------
;; --------- BRENDA Tissue Ontology ----------
;; -------------------------------------------
create ICE URI 's for each term in the BRENDA Tissue Ontology
`{:name "brenda-ontology-ice-gen"
:head ((?/ice obo/IAO_0000219 ?/subclass))
:body ((?/subclass [rdfs/subClas... | null | https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/bio_to_ice/ontology_ice_gen_rules.clj | clojure | -------------------------------------------
--------- BRENDA Tissue Ontology ----------
-------------------------------------------
-------------------------------------------
-------------- Cell Ontology --------------
-------------------------------------------
-------------------------------------------
... | create ICE URI 's for each term in the BRENDA Tissue Ontology
`{:name "brenda-ontology-ice-gen"
:head ((?/ice obo/IAO_0000219 ?/subclass))
:body ((?/subclass [rdfs/subClassOf *] obo/BTO_0000000))
:reify ([?/ice {:ln (:localname ?/subclass)
:ns "iaobto" :prefix "" :suffix "_ICE"}])}
create I... |
c4cce4569383d9033bbf3f02eec175f57522bbc7e642f83c2f100276a5b808a2 | phantomics/seed | extension.lisp | ;;;; extension.lisp
(in-package #:seed.modulate)
(export 'modes-form-base)
| null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.modes.form.base/extension.lisp | lisp | extension.lisp |
(in-package #:seed.modulate)
(export 'modes-form-base)
|
92c2052255237bca53c5edd3ab7feb2b4980e73c76e1902231280cad6d064018 | webyrd/n-grams-for-synthesis | srfi-27-a.scm | MODULE DEFINITION FOR SRFI-27
; =============================
;
, , in Scheme 48 0.57
;
This file contains the top - level definition for the 54 - bit integer - only
implementation of SRFI-27 for the Scheme 48 0.57 system .
;
1 . The core generator is implemented in ' ' .
2 . The generic p... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-27/srfi-27-reference/srfi-27-a.scm | scheme | =============================
creating the module:
,config ,load srfi-27-a.scm
loading the module, once created:
history of this file:
| MODULE DEFINITION FOR SRFI-27
, , in Scheme 48 0.57
This file contains the top - level definition for the 54 - bit integer - only
implementation of SRFI-27 for the Scheme 48 0.57 system .
1 . The core generator is implemented in ' ' .
2 . The generic parts of the interface are in ' mrg32k3a.scm... |
bffb0dea18f290bed6b3b6dae6721b7567e34430d9438f91d0613156b832b8e6 | input-output-hk/cardano-sl | Filesystem.hs | -- | Filesystem-related utilities.
module Pos.Util.Filesystem
(
ls
, lstree
, withTempDir
, directory
, withTempFile
, withSystemTempFile
, withMaybeFile
) where
import Universum hiding (last)
import Control.Concurrent (myThreadId)
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/src/Pos/Util/Filesystem.hs | haskell | | Filesystem-related utilities.
| Lists all immediate children of the given directory, excluding "." and ".."
Returns all the files inclusive of the initial `FilePath`.
| Lists all recursive descendants of the given directory.
| Creates a temporary directory, nuking it after the inner action completes,
even if an... |
module Pos.Util.Filesystem
(
ls
, lstree
, withTempDir
, directory
, withTempFile
, withSystemTempFile
, withMaybeFile
) where
import Universum hiding (last)
import Control.Concurrent (myThreadId)
import qualified Control.Exception.... |
562a2056598a96ed17e4ac1f241483f4557c2fc708f91d9548268bfe9a72225b | vrnithinkumar/ETC | tidy.erl | -module(tidy).
-export([parse_transform/2]).
parse_transform(Forms,_) ->
lists:filter(fun(F) ->
case F of
{attribute,_,etc,skip} -> false;
{attribute,_,etc,pe} -> false;
_ -> true
end
end, Forms). | null | https://raw.githubusercontent.com/vrnithinkumar/ETC/5e5806975fe96a902dab830a0c8caadc5d61e62b/src/tidy.erl | erlang | -module(tidy).
-export([parse_transform/2]).
parse_transform(Forms,_) ->
lists:filter(fun(F) ->
case F of
{attribute,_,etc,skip} -> false;
{attribute,_,etc,pe} -> false;
_ -> true
end
end, Forms). | |
70bf74a4115adac9d9d133eaf091490a2746bfa8e0edbaa2a80d8dcc0b01bfd2 | toothbrush/dotfs | Version.hs | module System.DotFS.Util.Version where
version :: String
version = "0.1"
| null | https://raw.githubusercontent.com/toothbrush/dotfs/36c7e62bda235728ffbb501fe1d2c34210a870a8/System/DotFS/Util/Version.hs | haskell | module System.DotFS.Util.Version where
version :: String
version = "0.1"
| |
fc93e38e27430f94decb163acc1b61ae72f704a77eb3d25895e41ccb5e99318e | LCBH/UKano | pvqueue.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/pvqueue.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
5dd8eb7edf11902e97ac9ce8d78dfc17b667d2d20071c46cfac394ec20ca2b1c | jwiegley/trade-journal | Main.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Main where
import Amount
import Broker.ThinkOrSwim hiding (_account)
import Control.Lens hiding (Context)
import Control.Monad.Except
import Data.List (isSuffixOf)
i... | null | https://raw.githubusercontent.com/jwiegley/trade-journal/b627cfe08e0a527e7dfc3eb61877d70a27b8d112/bin/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Main where
import Amount
import Broker.ThinkOrSwim hiding (_account)
import Control.Lens hiding (Context)
import Control.Monad.Except
import Data.List (isSuffixOf)
import Data.Map (Map)
import qualifi... |
1918f48d86b0f27c501820ae673a471b67fb9962fe395f59f580c3116994fc53 | lambdamikel/DLMAPS | fact-tests.lisp | ;;;-*- Mode: Lisp; Package: CL-USER -*-
(in-package "CL-USER")
(setf (logical-pathname-translations "dl-test")
(list (list "**;*.*.*"
(concatenate 'string
#+:mswindows
(pathname-device (truename *load-pathname*))
#+... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/prover/dl-benchmark-suite/fact-tests.lisp | lisp | -*- Mode: Lisp; Package: CL-USER -*-
Name of the DL system:
Keywords from concept syntax which correspond to KRSS keywords
top, bottom, and, or, not, some, all:
Function to test the coherence of a concept expression without
Function to return the direct subsumers of a concept:
Function to return the direct subsum... |
(in-package "CL-USER")
(setf (logical-pathname-translations "dl-test")
(list (list "**;*.*.*"
(concatenate 'string
#+:mswindows
(pathname-device (truename *load-pathname*))
#+:mswindows
... |
76cb81f1f23f91036273ccafad1bc228fd91caca8d9f4fa6df13c9ce7dbadd1f | ocsigen/wikidoc | odoc_wiki.ml | Ocamldoc : Generation of wikicreole file ( )
, projet Cristal , INRIA Rocquencourt
for wiki files by Ocsigen team
(* (based on odoc_html, keeping the names html_* *)
(* to use late inheritance and late binding... | null | https://raw.githubusercontent.com/ocsigen/wikidoc/8c10fd2998297a15d58b0f8f5c4f31e78376e161/src/odoc_wiki/odoc_wiki.ml | ocaml | (based on odoc_html, keeping the names html_*
to use late inheritance and late binding)
* The functions used for naming files and html marks.
* Return the wiki ident for the given module or class name.
* Return the target for the given prefix and simple name.
* Retur... | Ocamldoc : Generation of wikicreole file ( )
, projet Cristal , INRIA Rocquencourt
for wiki files by Ocsigen team
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file ... |
f96f9b0d35433ec87a77a5109817b33765aa98df80abb5604bdd37dd9b6b6f60 | hipsleek/hipsleek | cjava.ml | #include "xdebug.cppo"
open VarGen
Pretty printing to Java for Cast .
Pretty printing to Java for Cast.
*)
open Globals
open Cast
module CP = Cpure
module H = Hashtbl
type bind_map = (ident, (ident * ident)) H.t
type prim_map = (ident, (ident list -> string)) H.t
let binary_prim op args =
String.co... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/cjava.ml | ocaml | (\* pretty printing for primitive types *\)
| Bool -> "boolean "
| Float -> "float "
| Int -> "int "
| Void -> "void "
| List -> "list"
(\* pretty printing for types *\)
let rec string_of_typ = function
| Prim t -> string_of_prim_type t ... | #include "xdebug.cppo"
open VarGen
Pretty printing to Java for Cast .
Pretty printing to Java for Cast.
*)
open Globals
open Cast
module CP = Cpure
module H = Hashtbl
type bind_map = (ident, (ident * ident)) H.t
type prim_map = (ident, (ident list -> string)) H.t
let binary_prim op args =
String.co... |
0184b70dc06aee5009e007ddde7a2da7f0e1cb2afc5497aabd99f7aa7757d786 | spacegangster/space-ui | components_styles.cljc | (ns space-ui.style.components-styles
"Styles for different manual components")
(def space-lists
(list
[:.space-ul1
{:padding-left :1em
:padding-top :1em
:padding-bottom :1em
:list-style-type :disc}]
[:.space-ul2
{:padding-left :1.5em
:padding-top :0.5em
... | null | https://raw.githubusercontent.com/spacegangster/space-ui/74825c904b6b456d845c3b3d669ce795b33f5ba9/src/space_ui/style/components_styles.cljc | clojure | (ns space-ui.style.components-styles
"Styles for different manual components")
(def space-lists
(list
[:.space-ul1
{:padding-left :1em
:padding-top :1em
:padding-bottom :1em
:list-style-type :disc}]
[:.space-ul2
{:padding-left :1.5em
:padding-top :0.5em
... | |
9e5e81ad77ec9ff37ecd3ee441638d6aaec6a74cbb5cf6987e507ec0fa9ff10e | vikram/lisplibraries | font-loader.lisp | Copyright ( c ) 2006 , All Rights Reserved
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/zpb-ttf-0.7/font-loader.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form ... | Copyright ( c ) 2006 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
font - loader.lisp , v 1.26 2006/03/23 22:21:40 xach Exp
(in-package #:zpb-ttf)
(defclass font-loader ()
((tables :initform (mak... |
f39034acca603d6f7f338e32b4cae4419e6416bc7ed10806db2acae10143371f | roburio/caldav | cohttp_test.ml | open Cohttp
module type S = sig
type 'a io
type ic
type oc
type body
type response_action =
[ `Expert of Cohttp.Response.t
* (ic
-> oc
-> unit io)
| `Response of Cohttp.Response.t * body ]
type spec = Request.t -> body -> response_action io... | null | https://raw.githubusercontent.com/roburio/caldav/badc3268ec40667649a77ce3dea521c47500c02e/app/cohttp_test.ml | ocaml | open Cohttp
module type S = sig
type 'a io
type ic
type oc
type body
type response_action =
[ `Expert of Cohttp.Response.t
* (ic
-> oc
-> unit io)
| `Response of Cohttp.Response.t * body ]
type spec = Request.t -> body -> response_action io... | |
7f7fed9fdc4a6cc384135eec298908fa4303b77683c2da7488b1200adaabcd63 | aryx/yacfe | ocollection.mli | (*s: ocollection.mli *)
type ('a, 'b) view =
| Empty
| Cons of 'a * 'b
class virtual ['a] ocollection :
object ('o)
inherit Objet.objet
method virtual empty : 'o
method virtual add : 'a -> 'o
method virtual iter : ('a -> unit) -> unit
method virtual view : ('a, 'o) view
(* no need virtual, but bette... | null | https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons_ocollection/ocollection.mli | ocaml | s: ocollection.mli
no need virtual, but better to force redefine for efficiency
effect version
e: ocollection.mli | type ('a, 'b) view =
| Empty
| Cons of 'a * 'b
class virtual ['a] ocollection :
object ('o)
inherit Objet.objet
method virtual empty : 'o
method virtual add : 'a -> 'o
method virtual iter : ('a -> unit) -> unit
method virtual view : ('a, 'o) view
method virtual del : 'a -> 'o
method virtual mem : ... |
5b4d6aad75153df11dd5b40e14eed7f3190d4698c2a137d186f4ea04a751928d | nick8325/equinox | Str.hs | module Str
: : * ; Show , Eq , Ord
, str -- :: String -> Str
)
where
Paradox / Equinox -- Copyright ( c ) 2003 - 2007 , , is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the
" Software " ) , to deal in the Software without res... | null | https://raw.githubusercontent.com/nick8325/equinox/67351fbc4358fdea931b4c1dfb659f5527b40917/Haskell/Str.hs | haskell | :: String -> Str
Copyright ( c ) 2003 - 2007 , , is hereby granted , free of charge , to any person obtaining a
Copyright (c) 2003-2007, Koen Claessen, Niklas Sorensson
This module provides an abstract datatype for atoms, such that:
* Each atom string is only in memory once
* O(n) creation time
* O(... | module Str
: : * ; Show , Eq , Ord
)
where
copy of this software and associated documentation files ( the
" Software " ) , to deal in the Software without restriction , including
without limitation the rights to use , copy , modify , merge , publish ,
distribute , sublicense , and/or sell copies of the So... |
2da9248b4e80a2c4f260c9b51f05b254eb374e65af7acd7009aee695fe1e833c | unnohideyuki/bunny | sample169.hs | qsort :: Ord a => [a] -> [a]
qsort [] = []
qsort (x:xs) = qsort smaller ++ [x] ++ qsort larger
where
smaller = [a | a <- xs, a <= x]
larger = [b | b <- xs, b > x]
main :: IO ()
main =
do let helo = "Hello, World!"
putStrLn helo
putStrLn.show $ qsort [3, 1, 4, 1, 5, 9, 2, 6, 5]
putStrLn ... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample169.hs | haskell | qsort :: Ord a => [a] -> [a]
qsort [] = []
qsort (x:xs) = qsort smaller ++ [x] ++ qsort larger
where
smaller = [a | a <- xs, a <= x]
larger = [b | b <- xs, b > x]
main :: IO ()
main =
do let helo = "Hello, World!"
putStrLn helo
putStrLn.show $ qsort [3, 1, 4, 1, 5, 9, 2, 6, 5]
putStrLn ... | |
db3280a1b65bff1f0e25596ee1700c2014ce074d96fcf8b3e6650a31025698b7 | tanakh/Peggy | Bootstrap.hs | # LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts #
import Data.Char
import Numeric
import Language.Haskell.TH
import Language.Haskell.Meta.Utils
import qualified Stage2
import Text.Peggy.Prim
import Text.Peggy.Quote
import Text.Peggy.CodeGen.TH
import Text.Peggy.Syntax
import Text.Peggy.SrcLoc
header :: ... | null | https://raw.githubusercontent.com/tanakh/Peggy/78280548d137c9ada703de0e4c9af1cd3cb8f728/bootstrap/Bootstrap.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes , FlexibleContexts #
import Data.Char
import Numeric
import Language.Haskell.TH
import Language.Haskell.Meta.Utils
import qualified Stage2
import Text.Peggy.Prim
import Text.Peggy.Quote
import Text.Peggy.CodeGen.TH
import Text.Peggy.Syntax
import Text.Peggy.SrcLoc
header :: ... | |
72984063016dc946d0d9333b0ad4662a3b0a80d32645969dd08e8958dcff49c2 | fizruk/lambdaconf-2019-workshop | Server_Stage_5.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE TypeOperators #-}
module ARCube.Server_Stage_5 where
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.STM
import Control.Exception ... | null | https://raw.githubusercontent.com/fizruk/lambdaconf-2019-workshop/1a7caa4dd03ff1b09877b27d8adf79ca35fcc888/project/ar-cube-server/src/ARCube/Server_Stage_5.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
| AR Cube server API specification.
| Term-level representation of 'API'.
| Server implementing 'API'.
^ Where to serve AR static files from?
| Server config.
| A client is represented by its websocket 'Connection'.
| Default server config with initia... | # LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
module ARCube.Server_Stage_5 where
import Control.Concurrent (forkIO, threadDelay)
import Control.Concurrent.STM
import Control.Exception (catch)
import Control.Monad (forev... |
a33c77189d76cfaa96c188593286db98089c7033f5437797a9f5f96982cc01a3 | TristeFigure/shuriken | doo_test.cljs | (ns shuriken.doo-test
(:require [cljs.test :as test]
[doo.runner :refer-macros [doo-tests]]
[shuriken.associative-test]))
(enable-console-print!)
(doo-tests 'shuriken.associative-test
'shuriken.string-test)
| null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/doo_test.cljs | clojure | (ns shuriken.doo-test
(:require [cljs.test :as test]
[doo.runner :refer-macros [doo-tests]]
[shuriken.associative-test]))
(enable-console-print!)
(doo-tests 'shuriken.associative-test
'shuriken.string-test)
| |
97d00da24133064510fd5a2d821e168ac51b476b9ffa58993534c3ab00cb67cb | SKS-Keyserver/sks-keyserver | mList.mli | (***********************************************************************)
(* mList.mli - Various list operations *)
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/mList.mli | ocaml | *********************************************************************
mList.mli - Various list operations
redistribute it and/or modify it under ... | Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free Software Foundation ; either
version 2 of the License , or... |
c6161eefeffd7fed2be09b4d24db7234701d50786f11336482cf848d5e1cb621 | spawnfest/eep49ers | tls_server_sup.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2019 - 2019 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/tls_server_sup.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2019 - 2019 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(tls_server_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link(... |
f8e38796ce4e5fd1ced24a644ce2620cd7a76df297b0c8cf1f26200c14b6902a | aaronc/ClojureClrEx | logging.clj | logging.clj -- delegated logging for Clojure
by
July 27 , 2009
Copyright ( c ) , July 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 thi... | null | https://raw.githubusercontent.com/aaronc/ClojureClrEx/465e05b5872816056544c89b47c1997f6067ae89/src/clojure/tools/logging.clj | clojure | 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 this notice, or any other, from this software.
does not check if
all
optimize... | logging.clj -- delegated logging for Clojure
by
July 27 , 2009
Copyright ( c ) , July 2009 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns ^{:author "Alex Taggart"
:doc "Logging macros which delegate to a specific logging imple... |
12d7366fcb304c5c501930f4c4150790647397a68bee40b116b6c41938f99398 | skanev/playground | 32-tests.scm | (require rackunit rackunit/text-ui)
(load "../32.scm")
(define (increment n)
(+ n 1))
(define (one-over-pow-of-2 n)
(/ 1 (expt 2 n)))
(define sicp-1.32-tests
(test-suite
"Tests for SICP exercise 1.32"
(check-equal? (accumulate * 1 identity 1 increment 5) 120)
(check-equal? (product identity 1 incre... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/01/tests/32-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../32.scm")
(define (increment n)
(+ n 1))
(define (one-over-pow-of-2 n)
(/ 1 (expt 2 n)))
(define sicp-1.32-tests
(test-suite
"Tests for SICP exercise 1.32"
(check-equal? (accumulate * 1 identity 1 increment 5) 120)
(check-equal? (product identity 1 incre... | |
05bb377482af05a5925ae909c27d35fb53438076dccd5e5fdc5f6f31ea2d3642 | MATRIXKOO/test_for_sicp | e1_16.scm.rkt | #lang sicp
(define (square x) (* x x))
(define (fast-expt-iter p n a)
(cond
((= n 0) a)
((even? n) (fast-expt-iter (square p) (/ n 2) a))
(else (fast-expt-iter p (- n 1) (* a p)))))
(define (fast-expt p n)
(fast-expt-iter p n 1))
(fast-expt 2 2) | null | https://raw.githubusercontent.com/MATRIXKOO/test_for_sicp/fe5913c97e4ac96fe69fc750fc92526e9eb7fbef/Chapter1/e1_16.scm.rkt | racket | #lang sicp
(define (square x) (* x x))
(define (fast-expt-iter p n a)
(cond
((= n 0) a)
((even? n) (fast-expt-iter (square p) (/ n 2) a))
(else (fast-expt-iter p (- n 1) (* a p)))))
(define (fast-expt p n)
(fast-expt-iter p n 1))
(fast-expt 2 2) | |
91b8478a13abfcf3792f99b695448b5ea4e5a784a41e28acad42b208e660722f | thheller/shadow-cljs | lib.cljs | (ns demo.lib
(:require ["which" :as w]))
(js/console.log "demo.lib")
(defn hello []
(w/sync "java" #js {:nothrow true}))
| null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/lib.cljs | clojure | (ns demo.lib
(:require ["which" :as w]))
(js/console.log "demo.lib")
(defn hello []
(w/sync "java" #js {:nothrow true}))
| |
b158fd4d1010ae170cae67ea132ab3d2537a37e74aa36ece723048615a05b2c0 | tomgr/libcspm | Monad.hs | # LANGUAGE CPP , OverloadedStrings , ScopedTypeVariables #
module CSPM.Parser.Monad (
ParseMonad, ParserState(..),
FileParserState(..), movePos,
setParserState, getParserState,
FilePosition(..), filePositionToSrcLoc,
modifyTopFileParserState, getTopFileParserState,
addFileContents,
ru... | null | https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Parser/Monad.hs | haskell | *************************************************************************
Parser Support Types
*************************************************************************
TAKEN FROM ALEX
fields: the address (number of chacaters preceding the token), line number
and column of a token within the file. `start_pos' giv... | # LANGUAGE CPP , OverloadedStrings , ScopedTypeVariables #
module CSPM.Parser.Monad (
ParseMonad, ParserState(..),
FileParserState(..), movePos,
setParserState, getParserState,
FilePosition(..), filePositionToSrcLoc,
modifyTopFileParserState, getTopFileParserState,
addFileContents,
ru... |
543f745459bf7947e42ae4ad4275e98e4d5a6e53f6ccae37d832cb4894a982c6 | skogsbaer/HTF | UniqTests1.hs | # OPTIONS_GHC -F -pgmF scripts / local - htfpp #
module UniqTests1 (uniqTests1Main) where
import Test.Framework
import Control.Concurrent
test_fast :: IO ()
test_fast = return ()
uniqTests1Main args = htfMainWithArgs args htf_thisModulesTests
| null | https://raw.githubusercontent.com/skogsbaer/HTF/a42450c89b7a3a3a50e381f36de3ac28faab2a16/tests/real-bbt/UniqTests1.hs | haskell | # OPTIONS_GHC -F -pgmF scripts / local - htfpp #
module UniqTests1 (uniqTests1Main) where
import Test.Framework
import Control.Concurrent
test_fast :: IO ()
test_fast = return ()
uniqTests1Main args = htfMainWithArgs args htf_thisModulesTests
| |
4877bac20b70e01f0316aa1a4448619c2f3cee262376db3f2121bef4cbfb7374 | solita/mnt-teet | core.clj | (ns teet.datasource-import.core
"Main for TEET datasource import."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clj-http.client :as client]
[cheshire.core :as cheshire]
[teet.datasource-import.shp :as shp]
[teet.util.string :as string]
... | null | https://raw.githubusercontent.com/solita/mnt-teet/d0599b8dde6f6582ee5e77b3e8d5de961891405c/app/datasource-import/src/teet/datasource_import/core.clj | clojure | Take all attributes (except :i index)
bad gateway, serv unavailable, gw timeout, payload too large
else
(Thread/sleep delay)
else
Feature as JSON
else | (ns teet.datasource-import.core
"Main for TEET datasource import."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clj-http.client :as client]
[cheshire.core :as cheshire]
[teet.datasource-import.shp :as shp]
[teet.util.string :as string]
... |
6486af8db2fd4be7aa826f1b5efbfd035f7346eb1e1c9462b9139eb5decd2677 | hmage/mp3packer | mp3read.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | null | https://raw.githubusercontent.com/hmage/mp3packer/2afb10dd0451da7359a10e147fd10cd41c1ce5e7/mp3read.ml | ocaml | This function has to be here in order to take advantage of both mp3types and pack
Always invalid
Return this frame
Not LAME
Returns (lame_perhaps, encoder)
NOW with less dependence on strings!
Do the flags
I don't think the specification guarantees this goes in order
(lame_perhaps, encoder
Update the... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... |
2db721255e4c937b791de3826cde842ef8a16b49b4faae98c0a81d4c3cc78690 | ghollisjr/cl-ana | raw-hdf-table-chain.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana 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 Li... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-table/raw-hdf-table-chain.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana 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 License... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
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
... |
a1c4f665420910b4f5eb4fda4a68087c2dda394461be882da225262d98ef25cf | racket/math | vector.rkt | #lang typed/racket/base
(require racket/fixnum
racket/performance-hint
"../unsafe.rkt")
(provide for/vector: for*/vector: vector-ref!)
(begin-encourage-inline
(: vector-ref!
(All (A B) (case-> ((Vectorof (U A False)) Integer (-> A) -> A)
((Vectorof (U A B)) Integer... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/vector/vector.rkt | racket | begin-encourage-inline | #lang typed/racket/base
(require racket/fixnum
racket/performance-hint
"../unsafe.rkt")
(provide for/vector: for*/vector: vector-ref!)
(begin-encourage-inline
(: vector-ref!
(All (A B) (case-> ((Vectorof (U A False)) Integer (-> A) -> A)
((Vectorof (U A B)) Integer... |
58846d26e51a329bd096a675e75c993eb059de2bb9af975eafabfe30765adf07 | scalaris-team/scalaris | rrd_SUITE.erl | 2011 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
distribut... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/rrd_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... | 2011 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(rrd_SUITE).
-author('').
-vsn('$Id$').
-include("types.hrl").
-include("unittest.hrl").
-compile(export_all).
all... |
93867ccc4e37c96696e5f5d149d51ee8362c1834d7a793c840f7d6606fca6b28 | privet-kitty/cl-competitive | sparse-simplex.lisp | (defpackage :cp/test/sparse-simplex
(:use :cl :fiveam :cp/sparse-simplex :cp/test/nearly-equal
:cp/csc :cp/lud :cp/lp-test-tool :cp/shuffle)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/sparse-simplex #:tmat-times-vec!))
(in-package :cp/test/sparse-simplex)
(in-suite base-suite)
(test tmat... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/24699abf6dd4967489c85c29060d00e209f20627/module/test/sparse-simplex.lisp | lisp | trival lp
zero lp
check primal
check dual
original sol
scaled sol
check sparse-primal!
check sparse-dual!
check primal problem
check dual problem
check slp-self-dual!
check primal | (defpackage :cp/test/sparse-simplex
(:use :cl :fiveam :cp/sparse-simplex :cp/test/nearly-equal
:cp/csc :cp/lud :cp/lp-test-tool :cp/shuffle)
(:import-from :cp/test/base #:base-suite)
(:import-from :cp/sparse-simplex #:tmat-times-vec!))
(in-package :cp/test/sparse-simplex)
(in-suite base-suite)
(test tmat... |
3e9472d1f72ad600d928f66e4eda5be04c3858e944feb8459a525c1649523479 | mindreframer/clojure-stuff | core.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by... | null | https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/ztellman/aleph/src/aleph/stomp/core.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 ) . All rights reserved .
(ns aleph.stomp.core
(:use
[potemkin]
[lamina.core])
(:require
[clojure.string :as str]
[aleph.tcp :as tcp]
[aleph.stomp.codec :as codec]
[lamina.cache :as c])
(:import
[lamina.cache IRouter]))
(defn message-destination [msg]
(get-in m... |
1f6fcaeac915aa505455462b7d47cb5aaf95825f921679645acfaecdfdbb4411 | ngrunwald/datasplash | bq_schema_test.clj | (ns datasplash.bq-schema-test
(:require
[clojure.test :refer [deftest is]]
[datasplash.bq :as sut])
(:import
(com.google.api.services.bigquery.model TableSchema)))
(defn get-names-from-converted-schema
[schema]
(map #(.getName %) (.getFields schema)))
(defn get-record-fields-from-converted-schema
... | null | https://raw.githubusercontent.com/ngrunwald/datasplash/2275ea15b6c906a234b4455cd94926d8b2d54b41/test/datasplash/bq_schema_test.clj | clojure | (ns datasplash.bq-schema-test
(:require
[clojure.test :refer [deftest is]]
[datasplash.bq :as sut])
(:import
(com.google.api.services.bigquery.model TableSchema)))
(defn get-names-from-converted-schema
[schema]
(map #(.getName %) (.getFields schema)))
(defn get-record-fields-from-converted-schema
... | |
ed829b83ed75b0d992d65415298f351e03ed985d5c2634db703b564f753bde2e | nurpax/sqlite-simple | ParamConv.hs | # LANGUAGE ScopedTypeVariables , OverloadedStrings , CPP #
#if MIN_VERSION_base(4,9,0)
{-# OPTIONS_GHC -Wno-overflowed-literals #-}
#endif
module ParamConv (
testParamConvNull
, testParamConvInt
, testParamConvIntWidths
, testParamConvIntWidthsFromField
, testParamConvFloat
, testParamConvBools
, test... | null | https://raw.githubusercontent.com/nurpax/sqlite-simple/49390582cb090fc1ef95988dab9ecc8ebb32251b/test/ParamConv.hs | haskell | # OPTIONS_GHC -Wno-overflowed-literals #
wrap around
wrap around
wrap around
wrap around
wrap around
wrap around
returned data? | # LANGUAGE ScopedTypeVariables , OverloadedStrings , CPP #
#if MIN_VERSION_base(4,9,0)
#endif
module ParamConv (
testParamConvNull
, testParamConvInt
, testParamConvIntWidths
, testParamConvIntWidthsFromField
, testParamConvFloat
, testParamConvBools
, testParamConvDateTime
, testParamConvFromRow
... |
411a21fa8feea28570a53abe3d2c38d0de5cee02be8526852650ceaef1e62317 | ndmitchell/tagsoup | CodeGen.hs |
module Compiler.CodeGen where
import Compiler.Type
import Data.List
import Data.Char
codeGen :: Program2 -> String
codeGen x = unlines $ [warning,"{-",showProgram2 x ++ "-}"] ++ concatMap genStmt x
where warning = "-- AUTO-GENERATED CODE, DO NOT MODIFY"
indent n = (++) (replicate n ' ')
spw n = concat $ inter... | null | https://raw.githubusercontent.com/ndmitchell/tagsoup/e116d3b965e4f149581bd55e45a05661b1113536/dead/parser/Compiler/old/CodeGen.hs | haskell |
module Compiler.CodeGen where
import Compiler.Type
import Data.List
import Data.Char
codeGen :: Program2 -> String
codeGen x = unlines $ [warning,"{-",showProgram2 x ++ "-}"] ++ concatMap genStmt x
where warning = "-- AUTO-GENERATED CODE, DO NOT MODIFY"
indent n = (++) (replicate n ' ')
spw n = concat $ inter... | |
1d7a20fbd7bbc71ff59efe668392a286c0566241bd1ce50d07b049698ff49beb | Clozure/ccl-tests | round.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Aug 21 13:39:56 2003
;;;; Contains: Tests of ROUND
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "round-aux.lsp")
(deftest round.error.1
(signals-error (round) program-error)
t)
(deftest round.error.2
(signals-error (roun... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/round.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of ROUND
| Author :
Created : Thu Aug 21 13:39:56 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "round-aux.lsp")
(deftest round.error.1
(signals-error (round) program-error)
t)
(deftest round.error.2
(signals-error (round 1.0 1 nil) program-error)
t)
(deftest round.1
... |
fa2b099e827ea9169dd0df0796885f6ad4655594fa4a2f2b138917e44bb2b8de | ocaml-sf/learn-ocaml-corpus | foreach_env_by_induction.ml | (* ------------------------------------------------------------------------------ *)
(* Building formulae. *)
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
(* [FConst sense] would work too, but would allocate memory *)
let neg ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/right/foreach_env_by_induction.ml | ocaml | ------------------------------------------------------------------------------
Building formulae.
[FConst sense] would work too, but would allocate memory
------------------------------------------------------------------------------
Evaluating formulae.
------------------------------------------------------... |
let var x =
FVar x
let falsity =
FConst false
let truth =
FConst true
let const sense =
if sense then truth else falsity
let neg f =
match f with
| FConst sense ->
const (not sense)
| FNeg f ->
f
| _ ->
FNeg f
let conn sense f1 f2 =
match f1, f2 with
| FConst sense', f
| f... |
8a32e32d21360fe105e37a67b9eb5c0f02b310724da5f5d13dd32da41ccfe261 | ayazhafiz/plts | typecheck.ml | (** Module [typecheck] performs type inference (including constraint) of a
user-supplied program. This is the "typechecking frontend"; i.e. work that
must be done before we can begin type simplification. *)
open Language
open Print
let tyvar_of_uid uid = TyVar ("'fresh" ^ string_of_int uid)
let coalesce ty =... | null | https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/simple_sub/lib/typecheck.ml | ocaml | * Module [typecheck] performs type inference (including constraint) of a
user-supplied program. This is the "typechecking frontend"; i.e. work that
must be done before we can begin type simplification. |
open Language
open Print
let tyvar_of_uid uid = TyVar ("'fresh" ^ string_of_int uid)
let coalesce ty =
let recursives = ref [] in
let rec coalesce inProcess ty isPos =
match ty with
| STyPrim n -> TyPrim n
| STyFn (pTy, rTy) ->
let pTy = coalesce inProcess pTy (not isPos) in
let rTy =... |
21dcf3cb47bad50e408c2b0fe0d6c1a54f8e3a6c1abe3160057e5a875e166f25 | radicle-dev/radicle-alpha | GithubIssues.hs | # LANGUAGE QuasiQuotes #
module GithubIssues (main) where
import Protolude hiding (state)
import qualified Data.Map.Strict as Map
import Data.Time
import GitHub.Data.Issues
import GitHub.Data.Name (Name(..))
import qualified GitHub.Data.Options as GH
import qualified GitHub.En... | null | https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/exe/GithubIssues.hs | haskell | We reverse to produce a list in chronological order
That would be too easy!
(This will probably be fixed upstream, soon, by me.)
CLI | # LANGUAGE QuasiQuotes #
module GithubIssues (main) where
import Protolude hiding (state)
import qualified Data.Map.Strict as Map
import Data.Time
import GitHub.Data.Issues
import GitHub.Data.Name (Name(..))
import qualified GitHub.Data.Options as GH
import qualified GitHub.En... |
5293859820c32dc0e89381e0f7cf18dc31e95c0713891daff60e7d522170c3f6 | WormBase/wormbase_rest | origin.clj | (ns rest-api.classes.strain.widgets.origin
(:require
[clojure.string :as str]
[rest-api.formatters.date :as dates]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn substrate [s]
{:data (when-let [s (:strain/substrate s)]
(str/capi... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/strain/widgets/origin.clj | clojure | this is not found in the database | (ns rest-api.classes.strain.widgets.origin
(:require
[clojure.string :as str]
[rest-api.formatters.date :as dates]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn substrate [s]
{:data (when-let [s (:strain/substrate s)]
(str/capi... |
747c00e11b68694a81b06654381c9afcaba26c92125a2ce071e900d0a210c530 | fogfish/datum | traversable.erl | %% @doc
%% Class of data structures that can be traversed.
-module(traversable).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[
%%
%% take collection and return head element of collection
%%
%% -spec head(datum:traversable(_)) -> datum:option(_).
{head, 1},
%%
... | null | https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/src/traversable.erl | erlang | @doc
Class of data structures that can be traversed.
take collection and return head element of collection
-spec head(datum:traversable(_)) -> datum:option(_).
-spec tail(datum:traversable(_)) -> datum:traversable(_).
-spec build([_]) -> datum:traversable(_).
return true if collection is empty
-spe... | -module(traversable).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[
{head, 1},
take collection and return its suffix ( all elements except the first )
{tail, 1},
build a new collection from Erlang list
{build, 1},
converts the collection to Erlang list
-spec list(datum :... |
9f5c07fadafc79a391da2005631e6395d937372e35fc20c926901d511fb7fd34 | skrah/minicaml | nt-queens.ml | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
(** Main **)
let n = 8
let row = [0] ** n
let row = [0] ** n
let col = [0] ** n
let diag1 = [0] ** (n+n-1)
let diag2 = [0] ** (n+n-1)
let printboard () =
for i = 0 to n-1 do
for j = 0 to n-1 do
print_string... | null | https://raw.githubusercontent.com/skrah/minicaml/e5f5cad7fdbcfc11561f717042fae73fa743823f/test/nt-queens.ml | ocaml | * Main * | Example from 's " Modern Compiler Implementation in ML " , translated
to .
to Caml. *)
let n = 8
let row = [0] ** n
let row = [0] ** n
let col = [0] ** n
let diag1 = [0] ** (n+n-1)
let diag2 = [0] ** (n+n-1)
let printboard () =
for i = 0 to n-1 do
for j = 0 to n-1 do
print_string (if col.(i) ... |
b058b41d4579ecda5bb37a10cb4ff4c5cb6479201210195a3325fd3dd7168523 | SRI-CSL/f3d | compat-defs.lisp | (in-package :cme)
(defvar *feet-to-meters* (* 0.0254 12.0))
;;; The cache-p keyword arg is not currently used by any callers of
;;; make-coordinate-transform. The x,y,z keyword args will be eliminated in
;;; the future.
(defun make-coordinate-transform-keyword-form
(&rest args &key from-coordinate-system to... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-tk/cme/compat-defs.lisp | lisp | The cache-p keyword arg is not currently used by any callers of
make-coordinate-transform. The x,y,z keyword args will be eliminated in
the future.
(break)
(defun make-coord-frame-matrix (x y z &rest matrix-or-axis-angle-pairs)
(let ((mat (if (arrayp (car matrix-or-axis-angle-pairs))
(copy-4x4... | (in-package :cme)
(defvar *feet-to-meters* (* 0.0254 12.0))
(defun make-coordinate-transform-keyword-form
(&rest args &key from-coordinate-system to-coordinate-system cache-p
matrix position x y z rotations
omega-radians phi-radians kappa-radians
omega-degrees phi-degrees kappa-degrees
... |
977a0ddce9d90a46bb61b9ffd0a4da9c5fc364455076ab27e1ec547505cb4b2c | facebookarchive/pfff | x.ml | let g x = x
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/cmt/x.ml | ocaml | let g x = x
| |
8301bbe43fd5e1d85edc45114a28159edcd160a875df61e9368d90b55e4c9804 | albertoruiz/easyVision | virtual.hs | # LANGUAGE DoRec #
testing 3ds models
import EasyVision
import Control.Arrow((***))
import Numeric.LinearAlgebra
import Data.List(sortBy,minimumBy)
import Vision
import Util.Misc(posMax,diagl,Mat,debug,slidingPeriodic,rotateLeft)
import Data.Traversable(traverse)
import Graphics.UI.GLUT as GL hiding (Point, Size)
im... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/pose/virtual.hs | haskell | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
f <- prepareModel "../../data/models3ds/STS.3ds"
---------------------------------------------------------------... | # LANGUAGE DoRec #
testing 3ds models
import EasyVision
import Control.Arrow((***))
import Numeric.LinearAlgebra
import Data.List(sortBy,minimumBy)
import Vision
import Util.Misc(posMax,diagl,Mat,debug,slidingPeriodic,rotateLeft)
import Data.Traversable(traverse)
import Graphics.UI.GLUT as GL hiding (Point, Size)
im... |
4e94a16649f934d511604ca35efad0ca1901a5cc993c5f5bcbcc0426b6b27331 | SAP-archive/bosh-kubernetes-cpi-release | Pod.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module CPI.Kubernetes.Resource.Pod(
module Pod
, Pods... | null | https://raw.githubusercontent.com/SAP-archive/bosh-kubernetes-cpi-release/3166a74e118e75bbdedb01cff72cbe52968eee62/src/bosh-kubernetes-cpi/src/CPI/Kubernetes/Resource/Pod.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module CPI.Kubernetes.Resource.Pod(
module Pod
, Pods(..)
, newPod
, newPodFrom
, newContainer
, container
, volumes
, newPersistentVolume
, newEmptyVolume
... |
c1eaf6e561ebbeffa1c11ea9064d22f99d24c09744523d8413851c7b8f52c982 | plumatic/fnhouse | project.clj | (defproject prismatic/fnhouse "0.2.2-SNAPSHOT"
:description "Transform lightly-annotated functions into a full-fledged web service"
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo}
:url ""
:dependencies [[prismatic/plumbing "0.4.3" :exclusions [prism... | null | https://raw.githubusercontent.com/plumatic/fnhouse/e27ec5649a91470b63285ef9e28c6a77494f7ffd/project.clj | clojure | (defproject prismatic/fnhouse "0.2.2-SNAPSHOT"
:description "Transform lightly-annotated functions into a full-fledged web service"
:license {:name "Eclipse Public License - v 1.0"
:url "-v10.html"
:distribution :repo}
:url ""
:dependencies [[prismatic/plumbing "0.4.3" :exclusions [prism... | |
8afa48f8550450cb160e717a3c63c586eb450895f3e662f72aab2077afe3b13c | robert-strandh/SICL | enter-return.lisp | (cl:in-package #:sicl-mir-to-lir)
(defmethod finish-lir-for-instruction
((instruction cleavir-ir:return-instruction))
As per section 27.3 of the SICL specification , we shrink the
;; frame so that the return address will be at the hot end of the
frame before using the RET instruction .
(cleavir-ir:insert-i... | null | https://raw.githubusercontent.com/robert-strandh/SICL/6d6ff68fe61ab9ec00978de604fd28c683fb7bd5/Code/Compiler/MIR-to-LIR/enter-return.lisp | lisp | frame so that the return address will be at the hot end of the
If there are arguments on the stack, the return address will be
on the top of the stack, rather than in its slot.
argument count (to allow for precise collection of arguments). | (cl:in-package #:sicl-mir-to-lir)
(defmethod finish-lir-for-instruction
((instruction cleavir-ir:return-instruction))
As per section 27.3 of the SICL specification , we shrink the
frame before using the RET instruction .
(cleavir-ir:insert-instruction-before
(make-instance 'sicl-ir:load-effective-address-... |
6b66577b0709b4cc211bad0972fa388ae60cbeccc94a4b44881ce2162f1acec1 | bdeket/rktsicm | time-evolution.rkt | #lang s-exp "../generic.rkt"
(provide (all-defined-out))
(require "Hamiltonian.rkt"
"Lagrangian.rkt"
)
bdk ; ; start original file
;;; time evolution transformations
(define ((shift-t delta-t) state)
(->H-state
(+ (time state) delta-t)
(coordinate state)
(momentum state)))
(define ((... | null | https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/mechanics/time-evolution.rkt | racket | ; start original file
time evolution transformations | #lang s-exp "../generic.rkt"
(provide (all-defined-out))
(require "Hamiltonian.rkt"
"Lagrangian.rkt"
)
(define ((shift-t delta-t) state)
(->H-state
(+ (time state) delta-t)
(coordinate state)
(momentum state)))
(define ((C->Cp C) delta-t)
(compose (C delta-t) (shift-t (- delta-t)))... |
610a307bf15afa3ccfb5c0494a430ad27772429b94b5ddba1baa1040162301bb | eugeneia/athens | struct.lisp | ;;;; TRIVIAL-FEED.STRUCT: Structure of feed items.
(in-package :trivial-feed.struct)
(defvar *date* nil
"Fallback date for feed.")
(defun make-feed
(items &key link date title description)
`(:items ,items
:date ,(or date *date*)
,@(and link `(:link ,link))
,@(and title `(:title ,title))
,@(an... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/lib/trivial-feed/struct.lisp | lisp | TRIVIAL-FEED.STRUCT: Structure of feed items. |
(in-package :trivial-feed.struct)
(defvar *date* nil
"Fallback date for feed.")
(defun make-feed
(items &key link date title description)
`(:items ,items
:date ,(or date *date*)
,@(and link `(:link ,link))
,@(and title `(:title ,title))
,@(and description `(:description ,description))))
(def... |
2afde734e422a9eb44c8a7bb19b8bf3023b2e817eab7089a1f19cb975619a877 | Clozure/ccl | action-targets.lisp | (in-package :easygui)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; action/targets
(defclass generic-easygui-target (ns:ns-object)
((handler :initarg :handler :reader target-handler)
(shooter :initarg :shooter :reader target-shooter))
(:metaclass ns:+ns-object))
(objc:defmethod (#/activateAction :void) ... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/cocoa/easygui/action-targets.lisp | lisp |
action/targets | (in-package :easygui)
(defclass generic-easygui-target (ns:ns-object)
((handler :initarg :handler :reader target-handler)
(shooter :initarg :shooter :reader target-shooter))
(:metaclass ns:+ns-object))
(objc:defmethod (#/activateAction :void) ((self generic-easygui-target))
(let* ((sender (target-shoo... |
a4ed0071915a4cb40c15e37a2d1438f615722d6ea681586eb0e0b49aac402636 | xxyzz/SICP | Exercise_5_10.rkt | #lang racket/base
new syntax add1 , add one to register
( add1 register - name )
(define (make-execution-procedure
inst labels machine pc flag stack ops)
(cond [(eq? (car inst) 'assign)
(make-assign inst machine labels ops pc)]
[(eq? (car inst) 'test)
(make-test inst machine l... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/5_Computing_with_Register_Machines/5.2_A_Register-Machine_Simulator/Exercise_5_10.rkt | racket | #lang racket/base
new syntax add1 , add one to register
( add1 register - name )
(define (make-execution-procedure
inst labels machine pc flag stack ops)
(cond [(eq? (car inst) 'assign)
(make-assign inst machine labels ops pc)]
[(eq? (car inst) 'test)
(make-test inst machine l... | |
d5d0e9b1fac98be09c5d1a9a52da56fa8890bdbc69b132598e370d5369b7e92b | wavewave/hoodle | Type.hs | module Hoodle.Type
( module Hoodle.Type.Canvas,
module Hoodle.Type.Coroutine,
module Hoodle.Type.Enum,
module Hoodle.Type.Event,
module Hoodle.Type.HoodleState,
)
where
import Hoodle.Type.Canvas
import Hoodle.Type.Coroutine
import Hoodle.Type.Enum
import Hoodle.Type.Event
import Hoodle.Type.HoodleS... | null | https://raw.githubusercontent.com/wavewave/hoodle/491035a0058ea746c3f130a2bbf638c4b7b8de14/core/src/Hoodle/Type.hs | haskell | module Hoodle.Type
( module Hoodle.Type.Canvas,
module Hoodle.Type.Coroutine,
module Hoodle.Type.Enum,
module Hoodle.Type.Event,
module Hoodle.Type.HoodleState,
)
where
import Hoodle.Type.Canvas
import Hoodle.Type.Coroutine
import Hoodle.Type.Enum
import Hoodle.Type.Event
import Hoodle.Type.HoodleS... | |
908624b5cf1db947372fb452ff5655ef653ffdcd7921078b4fae4baf2014ffb0 | OCamlPro/alt-ergo | why3_ptree.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/plugins/AB-Why3/why3_ptree.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 201... |
03b50946c9831962e381d640f2f7710640da9d6d40e773848d12ee67f6c1a8b4 | ygrek/ocaml-hdfs | example.ml |
open Printf
let error fmt = ksprintf (fun s -> prerr_endline s; exit 1) fmt
let generate n =
let b = Bytes.create n in
for i = 0 to n - 1 do
Bytes.set b i (Char.chr (Char.code 'a' + Random.int 26))
done;
Bytes.unsafe_to_string b
let main user namenode =
let open Hdfs in
Random.self_init ();
Get ... | null | https://raw.githubusercontent.com/ygrek/ocaml-hdfs/2e4f4cc2508464afc29555ebbbe7e15bdc667991/src/example.ml | ocaml | Make a directory /ctest
What we just created better be a directory
Create a file
fd is our file-handle to the file we are creating; this
file handle should be used in subsequent I/O calls on the file.
Use default buffer size, replication factor and block size.
Get the directory listings
write s... |
open Printf
let error fmt = ksprintf (fun s -> prerr_endline s; exit 1) fmt
let generate n =
let b = Bytes.create n in
for i = 0 to n - 1 do
Bytes.set b i (Char.chr (Char.code 'a' + Random.int 26))
done;
Bytes.unsafe_to_string b
let main user namenode =
let open Hdfs in
Random.self_init ();
Get ... |
d04052a90207031fbb068b49002f84bcec42e46a5c52e5c854392aded8034190 | facebook/duckling | ET_XX.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory .
-------------... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/ET_XX.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
---------------------------------------------------------------
Auto-generated by regenClassifiers
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W... | Copyright ( c ) 2016 - present , Facebook , Inc.
of patent rights can be found in the PATENTS file in the same directory .
@generated
module Duckling.Ranking.Classifiers.ET_XX (classifiers) where
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import Duckling.Ranking.Types
cla... |
777c9ae1976a8ca1dc007e5b6ee24039d0fbc41f0b540cd4129c25d3fb7d6c85 | alanb2718/wallingford | compiled-follow-mouse.rkt | #lang s-exp rosette
; hand compiled code for follow-mouse.rkt
(require "../applications/geothings.rkt")
(require "../reactive/reactive.rkt")
(require "../reactive/abstract-reactive-thing.rkt")
(require "compiled-reactive-thing.rkt")
(define compiled-follow-mouse%
(class compiled-reactive-thing%
(inherit seconds ... | null | https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/compiled-reactive/compiled-follow-mouse.rkt | racket | hand compiled code for follow-mouse.rkt
hand written versions of methods intended to be compiled automatically
compiling for this constraint:
(while (button-pressed?)
(assert (equal? (circle-center (image)) (mouse-position))))
So while the button is pressed update the circle's center to follow the ... | #lang s-exp rosette
(require "../applications/geothings.rkt")
(require "../reactive/reactive.rkt")
(require "../reactive/abstract-reactive-thing.rkt")
(require "compiled-reactive-thing.rkt")
(define compiled-follow-mouse%
(class compiled-reactive-thing%
(inherit seconds image button-pressed? button-going-up? mou... |
37977012b4486c08023d6ca9b820a36fbca3a965d1e9a5cc59ba1331cf0533c2 | spurious/sagittarius-scheme-mirror | huffman.scm | #!read-macro=sagittarius/regex
(import (rnrs)
(compression huffman)
(util port)
(srfi :13)
(srfi :64))
(define table-definition
" (65) |0 0 [1]
(66) |10 2 [2]
(67) |1100 c [4]
(68) |11010 1a [5]
(69) |11011 1b [5]
(70) |11100 1c [5]
... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/compression/huffman.scm | scheme | |]))
this doesn't workd because of the filler issue
(see comment on sitelib/compression/huffman.scm
ditto
| #!read-macro=sagittarius/regex
(import (rnrs)
(compression huffman)
(util port)
(srfi :13)
(srfi :64))
(define table-definition
" (65) |0 0 [1]
(66) |10 2 [2]
(67) |1100 c [4]
(68) |11010 1a [5]
(69) |11011 1b [5]
(70) |11100 1c [5]
... |
a36e2beeb8fc75c39230b9fb1d411100ef1fc4d51e1c285848f90cb22fae76b4 | juxt/juxt-accounting | project.clj | Copyright © 2013 - 2014 , JUXT LTD . 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 ... | null | https://raw.githubusercontent.com/juxt/juxt-accounting/745e6f0782a23a398aaa756822917450bf44d890/project.clj | clojure |
The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by the
terms of this license.
You must not remove this notice, or any other, from this software.
... | Copyright © 2013 - 2014 , JUXT LTD . All Rights Reserved .
Eclipse Public License 1.0 ( -1.0.php )
(def jig-version "2.0.3")
(defproject juxt/accounting "0.1.5-SNAPSHOT"
:description "JUXT Accounting"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clo... |
ec98a78a97cae89e3252952eebbfb466e8db012dfbf51dae978c3f38a14324b3 | Reisen/pixel | ChangeTags.hs | module Pixel.Operations.ChangeTags
( appendImageTags
, findTagsByUUID
, removeImageTags
) where
import Protolude
import Pixel.Lens
import Control.Lens
import Data.UUID ( fromText )
import Pixel.Services.Image ( MonadImage(..) )
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/Reisen/pixel/9096cc2c5b909049cdca6d14856ffc1fc99d81b5/src/lib/Pixel/Operations/ChangeTags.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | module Pixel.Operations.ChangeTags
( appendImageTags
, findTagsByUUID
, removeImageTags
) where
import Protolude
import Pixel.Lens
import Control.Lens
import Data.UUID ( fromText )
import Pixel.Services.Image ( MonadImage(..) )
findTagsByUUID
:: Monad m
=> MonadImage m
=> Text
-> m (Maybe ... |
c7680bdf1d08da8702805da1c65d8a2bdc2069f529d866e7f1223eba51e1d477 | yesodweb/wai | FileInfoCache.hs | {-# LANGUAGE RecordWildCards, CPP #-}
module Network.Wai.Handler.Warp.FileInfoCache (
FileInfo(..)
, withFileInfoCache
, getInfo -- test purpose only
) where
import qualified UnliftIO (onException, bracket, throwIO)
import Control.Reaper
import Network.HTTP.Date
import System.PosixCompat.Files
import Netwo... | null | https://raw.githubusercontent.com/yesodweb/wai/052b875effb45fbf7fd3bb9123592fc5002c9763/warp/Network/Wai/Handler/Warp/FileInfoCache.hs | haskell | # LANGUAGE RecordWildCards, CPP #
test purpose only
--------------------------------------------------------------
| File information.
^ Modification time
^ Modification time in the GMT format
--------------------------------------------------------------
| Getting the file information corresponding to the file.
... |
module Network.Wai.Handler.Warp.FileInfoCache (
FileInfo(..)
, withFileInfoCache
) where
import qualified UnliftIO (onException, bracket, throwIO)
import Control.Reaper
import Network.HTTP.Date
import System.PosixCompat.Files
import Network.Wai.Handler.Warp.HashMap (HashMap)
import qualified Network.Wai.Hand... |
46a07a7583ee32ac7ddeb7f593fd13d68d7606310651ffb70ddd7658a1320de7 | discus-lang/ddc | TyConFlow.hs |
module DDC.Core.Flow.Prim.TyConFlow
( TyConFlow (..)
, readTyConFlow
, kindTyConFlow
-- * Predicates
, isRateNatType
, isSeriesType
, isRefType
, isVectorType
, isRateVecType
, isBufferType
, isProcessType
-- * C... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-flow/DDC/Core/Flow/Prim/TyConFlow.hs | haskell | * Predicates
* Compounds
| Read a type constructor name.
Kinds ----------------------------------------------------------------------
| Yield the kind of a primitive type constructor.
Predicates -----------------------------------------------------------------
| Check if some type is a fully applied type of a Bu... |
module DDC.Core.Flow.Prim.TyConFlow
( TyConFlow (..)
, readTyConFlow
, kindTyConFlow
, isRateNatType
, isSeriesType
, isRefType
, isVectorType
, isRateVecType
, isBufferType
, isProcessType
, tTuple1
, tTuple2
... |
19a1452f67544440f503957b424961fe0e7d581bad5e2d838cfc1262bb9095a6 | scrive/monad-time | Time.hs | # LANGUAGE CPP , FlexibleContexts , FlexibleInstances , UndecidableInstances #
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
module Control.Monad.Time (MonadTime(..)) where
import Control.Monad.Trans
import Data.Time
import GHC.Clock (getMonotonicTime)
-- | Class of monads which make it pos... | null | https://raw.githubusercontent.com/scrive/monad-time/1e12534bde825f381a0aaebc822cd7af49d3b730/src/Control/Monad/Time.hs | haskell | | Class of monads which make it possible to measure time.
| Generic, overlapping instance.
# OVERLAPPABLE # | # LANGUAGE CPP , FlexibleContexts , FlexibleInstances , UndecidableInstances #
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
module Control.Monad.Time (MonadTime(..)) where
import Control.Monad.Trans
import Data.Time
import GHC.Clock (getMonotonicTime)
class Monad m => MonadTime m where
c... |
c651436a083a4eda7e885c56e29d02f2b954503c83fdc33d61c579fc0cf6f631 | mlin/PhyloCSF | Code.ml | open Printf
open List
module type S = sig
type t
val dim : int
val index : t -> int
val of_index : int -> t
val compare : t -> t -> int
module DNA = struct
type t = char
let dim = 4
let compare = compare
let is = function
| 'A' | 'a'
| 'C' | 'c'
| 'G' | 'g'
| 'T' | 't' -> true
| _ -> false
... | null | https://raw.githubusercontent.com/mlin/PhyloCSF/6a26e7f7f40b43eac8b76cc1fe295a584d7d8b38/lib/CamlPaml/Code.ml | ocaml | open Printf
open List
module type S = sig
type t
val dim : int
val index : t -> int
val of_index : int -> t
val compare : t -> t -> int
module DNA = struct
type t = char
let dim = 4
let compare = compare
let is = function
| 'A' | 'a'
| 'C' | 'c'
| 'G' | 'g'
| 'T' | 't' -> true
| _ -> false
... | |
d140ec5067817502b609210c82d43f08d288eef84471c34b0a81a9ff3907c78a | globocom/stewie | crypto.clj | (ns stewie.test.crypto
(:use stewie.crypto
midje.sweet))
(fact "always generate the same token for same key"
(token "key") => (token "key"))
(fact "creates different tokens for different keys"
(= (token "key") (token "key2")) => false)
(fact "keys have always the same size"
(count (token "key")) => 40
... | null | https://raw.githubusercontent.com/globocom/stewie/ad74c1b4358189193be5ffeb2e530d167a6662db/test/stewie/test/crypto.clj | clojure | (ns stewie.test.crypto
(:use stewie.crypto
midje.sweet))
(fact "always generate the same token for same key"
(token "key") => (token "key"))
(fact "creates different tokens for different keys"
(= (token "key") (token "key2")) => false)
(fact "keys have always the same size"
(count (token "key")) => 40
... | |
bf5d6397e21c1080df4302d3ece8e7dfa085025e8ba67dd4b273916dff324ea3 | hasktorch/hasktorch | TensorOptions.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Torch.GraduallyTyped.Internal.TensorOptions where
import Data.Singletons (SingKind (..))
import Foreign.ForeignPtr (ForeignPtr)
import System.IO.Unsafe (... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/0da0b85fd402ecf80cc45f153f8a05e5eaf2347f/experimental/gradually-typed/src/Torch/GraduallyTyped/Internal/TensorOptions.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Torch.GraduallyTyped.Internal.TensorOptions where
import Data.Singletons (SingKind (..))
import Foreign.ForeignPtr (ForeignPtr)
import System.IO.Unsafe (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.