Skip to content

Instantly share code, notes, and snippets.

View Dayof's full-sized avatar
🏠
Working from home

Dayanne Fernandes Dayof

🏠
Working from home
  • Landing AI
  • Anápolis, GO, Brasil
  • X @daayoff
View GitHub Profile
@hzxie
hzxie / PointCloud2Voxel.py
Created September 22, 2018 06:34
Convert Point Cloud to Voxels
import numpy as np
import pandas as pd
from pyntcloud import PyntCloud
import binvox_rw
cloud = PyntCloud.from_file("test/00000.txt",
sep=" ",
header=0,
@mikaelmello
mikaelmello / draft.md
Last active April 25, 2018 17:01
Draft of GSoC 2018 proposal for Rocket.Chat

"Improve the integration of bots on Rocket.Chat" proposal for Google Summer of Code 2018

Personal Details

@jlblancoc
jlblancoc / Install_gcc7_ubuntu_16.04.md
Last active April 29, 2024 23:21
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

@IgniparousTempest
IgniparousTempest / Ubuntu_16.06_PCL_1.8.0_install.sh
Last active June 2, 2021 07:28
Install PCL 1.8.0 on Ubuntu 16.04
# Clone latest PCL
sudo apt-get update
sudo apt-get install git
cd ~/Documents
git clone https://github.com/PointCloudLibrary/pcl.git pcl-trunk
ln -s pcl-trunk pcl
cd pcl
# Install prerequisites
@dschep
dschep / py-comp-to-js.md
Last active June 2, 2023 15:57
Python Comprehensions to JS

Python list & dict comprehensions translated to JavasScript

Comprehensions are a really useful feature of Python that aren't available in JavaScript (or many languages). These concepts of course can be tranlsated into using map instead. But especially the dictionaries are a bit trickier.

Lists / Arrays

>>> foobar = range(5)
>>> [x + 1 for x in foobar]
[1, 2, 3, 4, 5]
@ronrest
ronrest / kitti_lidar.py
Last active August 14, 2023 03:12
Visualize Lidar Data in Kitti Data
"""
VISUALISE THE LIDAR DATA FROM THE KITTI DATASET
Based on the sample code from
https://github.com/utiasSTARS/pykitti/blob/master/demos/demo_raw.py
And:
http://stackoverflow.com/a/37863912
Contains two methods of visualizing lidar data interactively.
- Matplotlib - very slow, and likely to crash, so only 1 out of every 100
@michaelkeevildown
michaelkeevildown / credit-card-regex.md
Last active April 17, 2024 20:36
Credit Card Regex Patterns

Credit Card Regex

  • Amex Card: ^3[47][0-9]{13}$
  • BCGlobal: ^(6541|6556)[0-9]{12}$
  • Carte Blanche Card: ^389[0-9]{11}$
  • Diners Club Card: ^3(?:0[0-5]|[68][0-9])[0-9]{11}$
  • Discover Card: ^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
  • Insta Payment Card: ^63[7-9][0-9]{13}$
  • JCB Card: ^(?:2131|1800|35\d{3})\d{11}$
  • KoreanLocalCard: ^9[0-9]{15}$
@danni
danni / fields.py
Created March 8, 2016 08:52
Multi Choice Django Array Field
from django import forms
from django.contrib.postgres.fields import ArrayField
class ChoiceArrayField(ArrayField):
"""
A field that allows us to store an array of choices.
Uses Django 1.9's postgres ArrayField
and a MultipleChoiceField for its formfield.
@vidavidorra
vidavidorra / auto-deploy_documentation.md
Last active February 19, 2023 17:37
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th

@claudiosanches
claudiosanches / test.php
Last active February 22, 2024 19:39
Regex for test credit card brand
<?php
// Test cards
$cards = array(
'378282246310005', // American Express
'371449635398431', // American Express
'5078601870000127985', // Aura
'5078601800003247449', // Aura
'30569309025904', // Diners Club
'38520000023237', // Diners Club