Skip to content

Instantly share code, notes, and snippets.

View kalmarek's full-sized avatar

Marek Kaluba kalmarek

View GitHub Profile
@kalmarek
kalmarek / build.log
Created January 16, 2020 16:50
GAP.jl build.log
Already on 'stable-4.11'
Your branch is up to date with 'origin/stable-4.11'.
From https://github.com/gap-system/gap
* branch stable-4.11 -> FETCH_HEAD
Already up to date.
+ autoconf -Wall -f
+ autoheader -Wall -f
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
@kalmarek
kalmarek / build_scs_for_julia.sh
Last active October 15, 2021 20:36
custom build of scs (SCS.jl)
#!/bin/bash
JULIA_HOME="/opt/julias/julia-1.6"
JULIA_LD_PATH="$JULIA_HOME/lib/julia"
BLASLDFLAGS="-L$JULIA_LD_PATH -lopenblas64_"
SCSFLAGS="USE_OPENMP=1 BLAS64=1 BLASSUFFIX=_64_"
make purge
make -j4 CFLAGS="-march=native" DLONG=1 ${SCSFLAGS} BLASLDFLAGS="${BLASLDFLAGS}" direct
make -j4 CFLAGS="-march=native" DLONG=1 ${SCSFLAGS} BLASLDFLAGS="${BLASLDFLAGS}" indirect
@kalmarek
kalmarek / Positivity of Adj_n + kOp_n in ISL(n,Z).ipynb
Created July 4, 2019 14:48
Positivity of Adj_n + kOp_n in ISL(n,Z)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module Groups
using AbstractAlgebra
const Group = AbstractAlgebra.Group
const GroupElement = AbstractAlgebra.GroupElem
export hasgens, hasorder, rand_pseudo,
direct_product, semidirect_product,
one!, conj, conj!, comm, comm!, div_left!, div_right!
using Test
using AbstractAlgebra
has_base_ring(R::AbstractAlgebra.NCRing) = base_ring(R) != Union{}
function AbstractAlgebra.promote_rule(::Type{S}, ::Type{T}) where {S <: Real, T <: Real}
return Base.promote_rule(S, T)
end
function test_data_type(f,g)
@kalmarek
kalmarek / fsalib_wrapper.c
Created January 18, 2019 22:26
fsalib dynamic lib
/* file fsalib_wrapper.c 18/01/19
*
* This file is a wrapper for a shared and a static library. It provides
* proper definitions used while linking a library.
*
*/
#include "defs.h"
#include "../src/definitions.h"
@kalmarek
kalmarek / wrapping_new_type.md
Created November 16, 2018 16:06
Wrapping a new type to Polymake.jl

So here You are, our promises led you to a land flowing with julia and Polymake, and yet when You tried our new fancy stuff, instead of getting a new shiny result You slam into a warning, which reads

┌ Warning: The return value contains (pm::SomeType<pm::with::parameters>) which has not been wrapped yet
└ @ Polymake ~/.julia/dev/Polymake/src/functions.jl:75
(insert some string representation here)

In this document we will guide You what does this warning mean, how to make use of the retured object and how to become a Polymake.jl contributor who wrapped yet another small object from the polymake small objects zoo.

Do I really need to wrap the the thing?

@kalmarek
kalmarek / Positivity of Adj_n + kOp_n in ISL(n,Z).ipynb
Last active July 5, 2019 21:07
Positivity of Adj_n + kOp_n in ISL(n,Z)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kalmarek
kalmarek / demo_socp_gpu.log
Created September 30, 2018 14:29
SCS on GPU
seed : 1538317385
A is 30 by 10, with 4 nonzeros per column.
A has 40 nonzeros (13.333333% dense).
Nonzeros of A take 0.000000 GB of storage.
Row idxs of A take 0.000000 GB of storage.
doc"""
elements!(G::PermGroup)
> Return an unsafe iterator over all permutations in `G`. Only one permutation
> is allocated and then modified in-place using the non-recursive
> [Heaps algorithm](https://en.wikipedia.org/wiki/Heap's_algorithm).
>
> Note: you need to explicitely copy permutations intended to be stored or
> modified.
# Examples: