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
# -*- coding: utf-8 -*- | |
"""Example how to measure average time taken per batch. | |
""" | |
import time | |
import numpy as np | |
import pandas as pd | |
from tensorflow.keras.models import Model | |
from tensorflow.keras.layers import Input, Dense |
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
%% Global configurations. | |
SOURCE_IMAGE = 'lena.png'; | |
N_CENTROIDS = 3; | |
%% Load source image and pre-processed for KMeans. | |
src = imread(SOURCE_IMAGE); |
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/sh | |
##============================================================================== | |
## PROBLEM STATEMENT | |
## ----------------- | |
## Currently, transfering files between FreeBSD 10.3 computer and iPhone 6 | |
## (IOS 10.3.3) causes Input/Output errors. The errors are randomly occured | |
## during the file transfering process. Whenever the error occured, the file | |
## transfering process will fail and the computer is required to re-mount the | |
## iPhone again before resuming the file transfering. |
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/sh | |
################################################################################ | |
## ## | |
## The Art of Computer Programming by Donald E. Knuth. ## | |
## ## | |
################################################################################ | |
## Volume 1 - Fundamental Algorithms, 3rd Edition |
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
/* 1 2 3 4 5 6 7 | |
345678901234567890123456789012345678901234567890123456789012345678901 | |
+-------------------------------------------------------------------- | |
| BFGS Example 1 | |
+-------------------------------------------------------------------- | |
| This example is based on Example 11.4 from | |
| "Introduction to Optimization" book written by Chong, Edwin K.P., | |
| and Stanislaw H. Zak. | |
| | |
| We are going to minimize this quadratic function f(x) by using |
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/sh | |
################################################################################ | |
## This UNIX Shell script will download most O'Reilly free pdf books | |
## about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps | |
## from http://www.oreilly.com/programming/free/. | |
## There are a few books that are non-free, so I don't list them here. | |
## | |
## --- How to RUN? --- | |
## $ sh -e oreilly-freebooks.sh |
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 | |
#===================================================================== | |
# FILE: compare_float.sh | |
# | |
# USAGE: bash compare_float.sh | |
# | |
# DESCRIPTION: This script shows how to compare float numbers. | |
# | |
# REQUIREMENTS: --- | |
# BUGS: --- |
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
/** | |
* ANSI-C: Nested structure in Linked List. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct subject_t { | |
char name[32]; | |
} subject_t; |
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
////////////////////////////////////////////////////////////////////// | |
// // | |
// Convert integer to string without using any library. // | |
// // | |
////////////////////////////////////////////////////////////////////// | |
#include <iostream> | |
#include <string> | |
using namespace std; |
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 <iostream> | |
using namespace std; | |
double x = 1.25; | |
double result = 0.00; | |
int main() | |
{ | |
asm( |