Skip to content

Instantly share code, notes, and snippets.

View OlegJakushkin's full-sized avatar
🤩

Oleg Jakushkin OlegJakushkin

🤩
View GitHub Profile
from l3ns.ldc import DockerNode
from l3ns.base.network import Network
from l3ns import defaults
defaults.network = Network('29.0.0.0/8')
n1 = DockerNode('test1', image='alpine', command='ping 8.8.8.8', tty=True, stdin_open=True)
n2 = DockerNode('test2', image='alpine', command='tail -f /dev/null')
n1.connect_to(n2)
#Download from https://www.patreon.com/posts/simulide-0-3-12-35657927 Linux AppImage e.g.:
wget https://c10.patreonusercontent.com/3/eyJhIjoxLCJwIjoxfQ%3D%3D/patreon-media/p/post/35657927/294588e93b0e4a27b4a0b3a2ec160759/1?token-time=1600760417&token-hash=QCTrWrK9-02sFfd2Oqaha0ryr3Nia6D1kXYwoN1mvAw%3D
#allow it to run:
chmod +x ./*.AppImage
#run it
./SimulIDE_0.3.12-SR8.AppImage
import multiprocessing
from math import *
def chunks(l, n):
return [l[i:i+n] for i in range(0, len(l), n)]
def f(x):
print(x)
result = 0
for i in x:
print(i)
/**
* This file is part of ORB-SLAM2.
*
* Copyright (C) 2014-2016 Raúl Mur-Artal <raulmur at unizar dot es> (University of Zaragoza)
* For more information see <https://github.com/raulmur/ORB_SLAM2>
*
* ORB-SLAM2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
#define _USE_MATH_DEFINES
#include <cmath>
#include <fstream>
#include <functional>
#include <iostream>
#include <memory>
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
@OlegJakushkin
OlegJakushkin / ManagedCuda3DComplexFFT.cs
Last active April 28, 2021 07:43
ManagedCuda 3d Complex FFT and reverse fft
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.InteropServices;
using ManagedCuda.BasicTypes;
using ManagedCuda;
using ManagedCuda.CudaFFT;
using ManagedCuda.VectorTypes;
class ManagedCuda3DComplexFFT
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Petri net in dot with Cola</title>
<style>
@import url(../style.css);
.background {
@OlegJakushkin
OlegJakushkin / CmakeLists.txt
Created February 22, 2020 10:58
Stellar CMake
cmake_minimum_required(VERSION 3.7)
project(stellar_core)
# first export CMAKE_C_COMPILER=clang
# first export CMAKE_CXX_COMPILER=clang++
# then
# ./autogen.sh && ./configure
set(CMAKE_CXX_STANDARD 14)
44
46
74
apt update -y && apt upgrade -y && apt install -y ansible openssh-server && ufw allow ssh
MESA_GL_VERSION_OVERRIDE=3.3 python …