This file contains hidden or 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
// https://stackoverflow.com/questions/13379220/generating-nanosecond-delay-in-c-on-stm32 | |
uint32_t m_nStart; //DEBUG Stopwatch start cycle counter value | |
uint32_t m_nStop; //DEBUG Stopwatch stop cycle counter value | |
#define DEMCR_TRCENA 0x01000000 | |
/* Core Debug registers */ | |
#define DEMCR (*((volatile uint32_t *)0xE000EDFC)) | |
#define DWT_CTRL (*(volatile uint32_t *)0xE0001000) |
pkg install apt-transport-https curl gnupg pkg-config clang
pkg install freetype freetype-dev libpng libpng-dev libzmq-dev libzmq
mkdir $PREFIX/etc/apt/sources.list.d
echo "deb [trusted=yes] https://its-pointless.github.io/files/ termux extras" > $PREFIX/etc/apt/sources.list.d/pointless.list
curl -O https://its-pointless.github.io/pointless.gpg
This file contains hidden or 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
# Create matrix | |
matrix = np.array([[1, 2, 3], | |
[4, 5, 6], | |
[7, 8, 9]]) | |
# Create a function that adds 100 to something | |
add_100 = lambda i: i + 100 | |
# Create a vectorized function | |
vectorized_add_100 = np.vectorize(add_100) |
This file contains hidden or 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
import cv2 | |
import os | |
# ref. : http://blog.csdn.net/carryheart/article/details/61937872 | |
# https://stackoverflow.com/questions/541390/extracting-extension-from-filename-in-python/ | |
# image: image to be saved | |
# filename: filename with absolute path | |
cv2.imencode(os.path.splitext(filename)[1], image)[1].tofile(filename) |
This file contains hidden or 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 "stdio.h" | |
// mac : gcc -dynamiclib -o ctype_test.dylib ctype_test.c | |
/* | |
two dimensional pointer | |
*/ | |
void ctype_test(void *pa, int num, int size) | |
{ |
As of 20/10/2017, a release file for Ubuntu 17.10 Artful Aardvark is not available on Download Docker.
If you are used to installing Docker to your development machine with get-docker
script, that won't work either. So the solution is to install Docker CE from the zesty
package.
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
This file contains hidden or 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
# -*- coding: utf8 -*- | |
from kivy.app import App | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.graphics import Line | |
from kivy.uix.label import Label | |
from kivy.core.window import Window | |
from kivy.clock import Clock | |
import serial |
pip install tensorflow --ignore-installed six --user
This file contains hidden or 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
# Project Structure | |
# [D]src: all source files here | |
# [D]inc: all headers | |
# [D]obj: objects, binary, out | |
# [F]makefile | |
# [D]: derectory | |
# [F]: file | |
# Note:no need to add include directory in any header or source file | |
vpath %.h inc |
NewerOlder