Skip to content

Instantly share code, notes, and snippets.

View makaveli10's full-sized avatar
💭
I may be slow to respond.

makaveli makaveli10

💭
I may be slow to respond.
View GitHub Profile
@makaveli10
makaveli10 / checkCudaMem.cu
Last active February 12, 2021 05:50
Check GPU Memory Usage (Jetson Nano)
#include <iostream>
#include <unistd.h>
#include "cuda.h"
int main()
{
// show memory usage of GPU
size_t free_byte ;
size_t total_byte ;
@makaveli10
makaveli10 / gist:9a660cd9c87579cf32ec5c294252c744
Created April 8, 2019 18:11
Read and transfor dataset using tensorflow transform and beam, cloud dataflow; Example of reading taxifare dataset
import google.datalab.bigquery as bq
def create_query(phase, EVERY_N):
"""
phase: 1=train 2=valid
"""
base_query = """
WITH daynames AS
(SELECT ['Sun', 'Mon', 'Tues', 'Wed', 'Thurs', 'Fri', 'Sat'] AS daysofweek)
SELECT
(tolls_amount + fare_amount) AS fare_amount,