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 <stdio.h> | |
int subtraction(int num1, int num2) { | |
int num2_inverted = ~num2; // invert num2 variable | |
int twos_complement_of_num2 = num2_inverted + 1; // create variable of which | |
// value is twos complement of num2 | |
return twos_complement_of_num2 + num1; // add twos complement of num2 and num1 | |
} | |
int main() { |
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 <stdio.h> | |
int division(int num1, int num2); | |
int main() { | |
printf("%d", division(300, 5)); | |
return 0; | |
} | |
int division(int num1, int num2) { |
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 <stdio.h> | |
int multiplication(int num1, int num2); | |
int multiplication_loop(int num1, int num2, int tmp); | |
// Multiplication function | |
int multiplication(int num1, int num2) { | |
return multiplication_loop(num1, num2, 0); | |
} |
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 <SoftwareSerial.h> | |
SoftwareSerial BTSerial(2, 3); //Connect HC-06. Use your (TX, RX) settings | |
char buf[50]; | |
void setup() | |
{ | |
pinMode(8, OUTPUT); | |
digitalWrite(8,HIGH); |
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 | |
# initiate | |
# docker | |
sudo wget -qO- https://get.docker.com/ | sh | |
sudo docker rm `sudo docker ps -aq` | |
sudo docker rmi hello-world | |
sudo systemctl enable docker.service |
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
import gym | |
import tflearn | |
from gym import wrappers | |
import numpy as np | |
# build nueral network | |
input_layer = tflearn.input_data(shape = [None, 4], name='input') |
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
# image classifier using nearest neighbor and cifar 10 dataset | |
import numpy as np | |
import pickle | |
# sort dictionary by key | |
def sort_key(dictionary): | |
keys = list(dictionary.keys()) | |
keys.sort() |
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
# image classifier using KNN and cifar 10 dataset | |
import numpy as np | |
import pickle | |
# sort dictionary by key | |
def sort_key(dictionary): | |
keys = list(dictionary.keys()) | |
keys.sort() |
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
# Image Classifier using Linear Classification method with Softmax and CIFAR 10 dataset | |
import numpy as np | |
import pickle | |
import matplotlib.pyplot as plt | |
# get batches from file | |
def get_batches(filename): | |
with open(filename, 'rb') as file: | |
data = pickle.load(file, encoding='bytes') |
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
FROM ubuntu:latest | |
MAINTAINER Jeong Ukjae <jeongukjae@gmail.com> | |
RUN apt-get update | |
RUN apt-get upgrade -y --fix-missing | |
RUN apt-get install build-essential nasm -y |
OlderNewer