This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function _xcdall() | |
{ | |
#enter below space separated your commands | |
eval "$1='pd1 xxx u14'" | |
} | |
function xcd() { | |
local arrIN sep before after what | |
what=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
list | |
(defun makefactor (n) | |
(define q dict) | |
(set! q.vars dict) | |
(set! q.uS dict) | |
(set! q.Jhg (gaussianc n)) | |
q | |
) | |
(define f1 (makefactor 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
#include <vector> | |
#include <iostream> | |
#include <list> | |
template <class T> | |
class VectorPool | |
{ | |
public: | |
~VectorPool() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo pip install --upgrade git+https://github.com/dav1dde/glad.git#egg=glad | |
#python main.py --api gl=3.3 --generator=c --out-path=GL | |
find_package(CUDA) | |
find_package(GLFW) | |
include_directories(${GLFW_INCLUDE_DIRS}) | |
include_directories(GL/include) | |
cuda_add_executable(main main.c assert_cuda.c interop.c GL/src/glad.c kernel.cu) | |
target_link_libraries(main ${GLFW_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pygame always background | |
# Emanuele Ruffaldi 2016 | |
import sys, pygame | |
import win32gui, win32con | |
import sys, ctypes | |
class WINDOWPOS(ctypes.Structure): | |
_fields_ = [ | |
('hwnd', ctypes.c_ulong), | |
('hwndInsertAfter', ctypes.c_ulong), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(version 1) | |
(deny default) | |
(allow file-read*) | |
(allow process-exec) | |
(allow sysctl-read) | |
(allow signal) | |
(allow file-write* (regex (string-append "^" (regex-quote (param "target")) ".*"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct List | |
{ | |
ListNode * first = 0, * last = 0; | |
void append(ListNode*p) | |
{ | |
if(first) | |
{ | |
last->next = p; | |
last = p; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A little exercise on stack_array | |
* | |
* FOUND (too late) https://tlzprgmr.wordpress.com/2008/04/02/c-how-to-create-variable-length-arrays-on-the-stack/ | |
* - desctruction removal | |
* - note about parameter issue | |
* - alignment management | |
* - generic construction | |
* - hybrid version using a fixed buffer Q and then heap | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emanuele Ruffaldi line pattern generator using De Bruij sequences 2016 | |
# | |
# Supports arithmetic, geometric and custom alphabet | |
# Supports also basic uniform for comparison | |
from PIL import Image, ImageDraw | |
def colorparse(s): | |
try: | |
x, y, z = map(int, s.split(',')) | |
return x, y, z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Catking Subfolders creator => FOCUS | |
# Emanuele Ruffaldi @ SSSA 2016 | |
import argparse | |
import xml.etree.ElementTree as ET | |
import os,sys | |
known = "catkin,roscpp,cmake_modules,geometry_msgs,tf,message_generation,urdf,xacro,message_runtime,std_msgs,std_srvs" | |
def commonpath(path1,path2): |