Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
slow to respond

maz-1 maz-1

🐢
slow to respond
View GitHub Profile
View gist:602a2219b16ce07647226e4a67e0a8d0
@echo off
for %%f in (*.pts) do (
"C:\Program Files\CloudCompare\CloudCompare.exe" -SILENT -O "%%~nf.pts" -C_EXPORT_FMT E57 -SAVE_CLOUDS FILE out.e57
del /Q "%%~nf.pts"
move out.e57 "%%~nf.e57"
)
rem pause
View cyclone_export.js
var format = ".pts";
var filepath = new String();
filepath = "C:\\Users\\benoit.passot\\Documents\\";
var arrayCloudToExport=SCloud.FromSel();
for (i=0; i<arrayCloudToExport.length;i=i+1)
{
var myCloudToExport=arrayCloudToExport[i];
var myAlignedCloudName=myCloudToExport.GetName();
var myFilePath1 = filepath;
myFilePath1 += myAlignedCloudName;
View qfile_openmesh_vtk.cpp
const float resize_ratio = 2.0;
actorDroneMesh = vtkSmartPointer<vtkLODActor>::New ();
auto sharedData = SharedData::getSharedData(this->window());
OpenMesh::PolyMesh_ArrayKernelT< > mesh_out;
OpenMesh::IO::Options OptionRead(OpenMesh::IO::Options::Binary);
QFile file_model(":/models/drone.stl");
file_model.open(QIODevice::ReadOnly);
QStdIStream drone_model_data(&file_model);
OpenMesh::IO::read_mesh(mesh_out, drone_model_data, "stl", OptionRead);
View openmesh_assimp.cpp
// assimp
#include <assimp/Importer.hpp> // C++ importer interface
#include <assimp/scene.h> // Output data structure
#include <assimp/postprocess.h> // Post processing flags
#include <assimp/Exporter.hpp>
// openmesh
#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
@maz-1
maz-1 / pcl_mesh_to_cgal_v1.cpp
Last active Jun 15, 2020
pcl_mesh_to_cgal_v1
View pcl_mesh_to_cgal_v1.cpp
// https://stackoverflow.com/questions/61318623/how-can-i-convert-cgal-points-into-pcl-point-cloud
template<class Pt>
static int convert_mesh_from_PCL_to_CGAL(pcl::PolygonMesh::Ptr PCL_mesh, CGAL::Surface_mesh<Pt>& CGAL_mesh, bool flipNormal = false)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr mesh_cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::fromPCLPointCloud2( PCL_mesh->cloud, *mesh_cloud );
// clear and reserve the
CGAL_mesh.clear();
int n = mesh_cloud->size();
int f = PCL_mesh->polygons.size();
View emoji-active-network-interface.sh
#!/bin/bash
# <bitbar.title>Emoji Active Network Interface Indicator</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Zachary O. Toups</bitbar.author>
# <bitbar.author.github>toupsz</bitbar.author.github>
# <bitbar.desc>Displays an emoji to indicate if the active network interface is wifi or another connection.</bitbar.desc>
# <bitbar.image>https://dept-wp.nmsu.edu/pixl/files/2018/06/EANII-image.png</bitbar.image>
# <bitbar.dependencies>bash</bitbar.dependencies>
# <bitbar.abouturl>https://github.com/toupsz/emoji-active-network-interface-indicator</bitbar.abouturl>
View FeelUOwn.c
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <signal.h>
#include <string.h>
//#define LIB_PYTHON_PATH "/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/Python"
typedef void (*PY_SETPROGNAME)(char *);
typedef void (*PY_INIT)();
View panic.log
Anonymous UUID: 804731C5-9F3B-E3A6-54C3-9863724E2424
Sun Feb 24 00:57:20 2019
*** Panic Report ***
panic(cpu 4 caller 0xffffff8002ada29d): Kernel trap at 0xffffff7f874595de, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x0000000000000000, CR3: 0x000000001a647000, CR4: 0x00000000003626e0
RAX: 0x0000000000000000, RBX: 0xffffff8201598160, RCX: 0xffffff81f3b03d78, RDX: 0x00000000015d0000
RSP: 0xffffff81f3b03e20, RBP: 0xffffff81f3b03e50, RSI: 0xffffff8036648630, RDI: 0x0000000000000000
R8: 0xffffff800329e0a0, R9: 0x0000000000000000, R10: 0xffffff800329e100, R11: 0xffffff80033edc80
@maz-1
maz-1 / PKGBUILD
Created Sep 20, 2018
python-pycrypto
View PKGBUILD
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
pkgbase=python-pycrypto
pkgname=('python-pycrypto' 'python2-pycrypto')
pkgver=2.6.1
pkgrel=2
license=('BSD')
arch=('x86_64')
url='http://www.pycryptodome.org/'
View photo_to_fax.sh
#!/bin/sh
convert $input -colorspace gray ( +clone -blur 15,15 ) -compose Divide_Src -composite -normalize -threshold 80% $output
convert $input -colorspace gray ( +clone -blur 15,15 ) -compose Divide_Src -composite -normalize $output
convert $input -colorspace RGB ( +clone -blur 15,15 ) -compose Divide_Src -composite -normalize -threshold 80% $output
convert $input -colorspace RGB ( +clone -blur 15,15 ) -compose Divide_Src -composite -normalize $output