Skip to content

Instantly share code, notes, and snippets.

View melvincabatuan's full-sized avatar
💭
deep learning

Melvin Cabatuan melvincabatuan

💭
deep learning
View GitHub Profile
@melvincabatuan
melvincabatuan / keras_setup_instructions.md
Last active February 13, 2025 03:29 — forked from alecGraves/keras_setup_instructions.md
How to Install Python, Keras and Tensorflow (with GPU) on Windows or Ubuntu

What?

Python, Keras, and Tensorflow have made neural networks easy and accessable to everyone. I personally have had a lot of trouble finding a nice and easy guide detailing how to set up all three on a system. This guide contains simple, step-by-step instructions on how to install these three things.

1. Anaconda

Anaconda is a python package manager that does a lot of stuff for you. It contains many packages including pip, numpy, scipy, etc.

Step one is to install it. Do that by going here, downloading the package for your OS, and installing it.

package ph.edu.dlsu.lbycpei;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// METHOD 1: Hardcoded ASCII Art
import java.util.Scanner;
/*
*
* This program does not work as intended. It contains both
* compile-time errors (errors that prevent the compiler from even
* running the program) and run-time errors (errors where the
* program does not function as intended). Your job is to fix
* this program so that it works correctly. Note that it is *not*
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Jan_28_19:41:49_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.2, V11.2.142
Build cuda_11.2.r11.2/compiler.29558016_0
deviceQuery.exe Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
// prim_demo.cpp by Bo Qian
#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm> // min_element
using namespace std;
struct Edge {
// kruskal_demo.cpp by Bo Qian
#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm> // sort
struct Edge {
char node1;
char node2;
#include <iostream>
#include <string>
int main ()
{
std::string str1 ("The");
std::string str2 ("the");
std::string str3 ("fox");
if (str1.compare(str2) != 0)
@melvincabatuan
melvincabatuan / jaccard.py
Created July 27, 2020 11:26 — forked from ramhiser/jaccard.py
Jaccard cluster similarity in Python
import itertools
def jaccard(labels1, labels2):
"""
Computes the Jaccard similarity between two sets of clustering labels.
The value returned is between 0 and 1, inclusively. A value of 1 indicates
perfect agreement between two clustering algorithms, whereas a value of 0
indicates no agreement. For details on the Jaccard index, see:
http://en.wikipedia.org/wiki/Jaccard_index
(1, 3)
[[0 0 0]]
(6, 3)
(6, 3)
[[ 0 0 0]
[ 0 0 255]
[180 175 0]
[216 0 4]
[255 0 0]
[255 255 255]]
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
tf.config.experimental.set_virtual_device_configuration(gpus[0], [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=1024)])
except RuntimeError as e:
print(e)
or
sudo rm -rf ~/.nv/