Skip to content

Instantly share code, notes, and snippets.

View datduyng's full-sized avatar

Dominic Nguyen datduyng

View GitHub Profile
@datduyng
datduyng / conditionals-H.md
Created October 12, 2018 05:06 — forked from cbourke/conditionals-H.md
auto-posted gist

Conditionals

CSCE 155H - Fall 2018

  • Normally, programs have sequential control flow
  • However, more complex problems require decisions
  • Conditionals are how we can make some code execute under some condition(s) and/or other, different code to execute under other conditions
  • if-statements, if-else statements, if-else-if statements
  • Conditionals rely on some logical condition
@datduyng
datduyng / introduction-H.md
Created October 12, 2018 05:06 — forked from cbourke/introduction-H.md
auto-posted gist

Introduction

CSCE 155H, Fall 2018

An overview of basics including variables, input and output in C and Java.

Programming, Compiling & Running Process

  • Source file are plain text files containing source code
  • Source files are assembled and compiled:
@datduyng
datduyng / circleIntersection.c
Created October 12, 2018 05:03 — forked from cbourke/circleIntersection.c
auto-posted gist
/**
* Name: Chris Bourke
*
* CSCE 155E Midterm
*
* Write a full program to determine if two circles intersect.
* Details are provided in the midterm handout.
*/
#include <stdlib.h>
#include <stdio.h>

Microcontroller communication protocol

Goal: overviewing over I2c, serial, and SPI communication protocol. Impotance of communication protocol

Overall idea

  • There are multiple microcontroller, and programming language like C, Java, C++,...
  • Each has it own strength and weaknesses.
  • Question arrive: How can all programming language and microcontroller be unite? How can they work together to create one piece of technology?
  • follow up example: If one person is good at C programming languague(Arduino), and one is good at Python(raspberry pi) then how can they work together to create one piece of technology?
  • Through universal communication. 3 main:

ORB (Oriented FAST and Rotated BRIEF)

  • COmbination of FAST feature detector and BRIEF descriptor algorithm

    • FAST(Features from Accelerated Segment Test) is a corner deteion algorithm that helps find keypoint.
    • BRIEF is a feature descriptor calculation and matching.(descriptor tell what is unique about a keypoint)
  • Theory behind FAST: choose a pixel p. check n surrounding pixels(see image below). p is a corner if there exist a set of n-numbers contigous pixel in the circle which are brighter than p. The idea is that outer corner is brighter than p

    asdf

@datduyng
datduyng / cs156-java-note.md
Last active June 7, 2019 22:58
cs156-java-note
@ Author Dat Nguyen. Last modified date. 5/17/19

Introduction

  • PHP/java
  • Method are part of class.

helloWorld.

package unl.cse // package declaration

/*csce155e Cbourke

C introduction

1/11/17

  • Programming, compiling and running process
  • Source files are plain text
  • Have to be compile into an excutable program
  • Source – assembly – machine code(binary)
@datduyng
datduyng / cnn-model.txt
Created July 13, 2018 13:54
cnn model - tutorial 2 - cv trick
classes = ['dogs','cats']
num_classes = len(classes)
# refer to this link for why need this complicated path declaration
# https://stackoverflow.com/questions/37619246/python-glob-glob-always-returns-empty-list
train_path = '/home/*datduyn/*Documents/*dataset/*dog-cat/*training_set/'
#validation split
/**
* This program interact the electron with thingspeak, send data
* @author Dat Nguyen
* Date: 3/7/18
*/
#include <ThingSpeak.h>
#include <Wire.h>
#include "Particle.h"
#include <stdlib.h>