Skip to content

Instantly share code, notes, and snippets.

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y autoremove
RUN apt-get -y install aptitude
RUN apt-get -y install nginx php7.4-fpm
RUN apt-get -y install php7.4-opcache php7.4-fpm php7.4 php7.4-common php7.4-gd php7.4-mysql php7.4-imap php7.4-cli php7.4-cgi php-pear mcrypt imagemagick libruby php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl memcached php-memcache php-imagick php7.4-zip php7.4-mbstring
RUN phpenmod mcrypt
// Copyright © 2021 Łukasz Kurowski. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
#![feature(in_band_lifetimes)]
use ocaml::bigarray::Array1;
use zeroize::Zeroize;
struct Keypair(schnorrkel::Keypair);
ocaml::custom!(Keypair);
diff --git a/src/config/discover.ml b/src/config/discover.ml
index 290a3d2..37b2ddc 100644
--- a/src/config/discover.ml
+++ b/src/config/discover.ml
@@ -27,6 +27,7 @@ let torch_flags () =
[ Printf.sprintf "-Wl,-rpath,%s" lib_dir
; Printf.sprintf "-L%s" lib_dir
; "-lc10"
+ ; "-lc10_cuda"
; "-ltorch_cpu"
@crackcomm
crackcomm / nd_sort.ml
Created September 20, 2021 08:52
Slow non dominated sort in OCaml superseded by https://github.com/crackcomm/ocaml-nds/
(* 2020 Łukasz Kurowski *)
(** Non-dominated sort implementation with time complexity O(MN^2) M and N represent the
number of objectives and the population size. *)
open Core
module type I = sig
type t
diff --git a/dune-project b/dune-project
new file mode 100644
index 000000000000..475731075dbd
--- /dev/null
+++ b/dune-project
@@ -0,0 +1,15 @@
+(lang dune 2.9)
+
+(name llvm)
+
{
"dependencies": {
"ocaml": "4.12.x",
"@opam/ocamlfind": "*",
"@opam/dune": "*",
"@opam/core": "v0.14.1",
"@opam/ctypes": "*",
"@opam/ctypes-foreign": "*",
"@opam/async": "v0.14.0",
"@opam/cmdliner": "*",
open Core
open Bigarray
external c_cast
: ('a, 'b, 'c) Bigarray.Genarray.t
-> (char, int8_unsigned_elt, 'c) Bigarray.Genarray.t
= "ba_cast_to_char"
let elems ba = Array.reduce_exn ~f:Int.( * ) (Bigarray.Genarray.dims ba)
==23071== Memcheck, a memory error detector
==23071== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23071== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==23071== Command: _build/default/examples/basics/basics.exe
==23071==
==23071== Source and destination overlap in memcpy_chk(0x1ffeffec00, 0x1ffeffec00, 5)
==23071== at 0x4C37660: __memcpy_chk (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23071== by 0x893E693: cpuinfo_linux_parse_cpulist (in /mnt/d/crypto-market/cxmr/cxmr-master/libtorch/lib/libtorch_cpu.so)
==23071== by 0x893D3A6: cpuinfo_linux_get_max_possible_processor (in /mnt/d/crypto-market/cxmr/cxmr-master/libtorch/lib/libtorch_cpu.so)
==23071== by 0x893B631: cpuinfo_x86_linux_init (in /mnt/d/crypto-market/cxmr/cxmr-master/libtorch/lib/libtorch_cpu.so)
extern crate libc;
use libc::size_t;
#[link(name = "onnx", kind = "static")]
extern "C" {
pub fn onnx_proto_shape_inference(buffer: *const u8, size: size_t, out: *mut u8) -> size_t;
}
#[cfg(test)]
cmd : WARNING:tensorflow:From mnist.py:151: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
At C:\Users\Pah\nni\experiments\zgAa9CvL\trials\RxQ3z\run.ps1:9 char:1
+ cmd /c python mnist.py 2>C:\Users\Pah\nni\experiments\zgAa9CvL\trials ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (WARNING:tensorf...future version.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.