Skip to content

Instantly share code, notes, and snippets.

View cloudlakecho's full-sized avatar
🙂
Good Day

Cloud Cho cloudlakecho

🙂
Good Day
View GitHub Profile
@cloudlakecho
cloudlakecho / camera_usb.py
Created March 25, 2020 03:00
Read USB Camera in Nvidia Jetson TX2 Development Board
from PIL import Image
import sys
import os
import pdb
import urllib
from posix_ipc import *
from mmap import *
import subprocess
# Python modules
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: GPL-3.0
#
# Rx_Warmup_Automated.py - To warm up USRP
#
# GNU Radio Python Flow Graph
# Title: Warmup Receiver
@cloudlakecho
cloudlakecho / test_kafka_producer.py
Created February 25, 2023 05:29
Producer using Kafka and ZooKeeper
# Steven Van Dorpe, Aug 13, 2018
#
# Reference:
# https://towardsdatascience.com/kafka-python-explained-in-10-lines-of-code-800e3e07dad1
from time import sleep
from json import dumps
from kafka import KafkaProducer
@cloudlakecho
cloudlakecho / test_kafka_consumer.py
Created February 25, 2023 05:30
Consumer using Kafka and ZooKeeper
# test_kafka_consumer.py - Receiving data and save in database
# Steven Van Dorpe
#
# How to run this code:
# (1) Run Zookeeper
# $ cd /usr/local/bin/kafka_2.13-3.4.0/
# $ bin/zookeeper-server-start.sh config/zookeeper.properties
# (2) Run Kafka server
# $ bin/kafka-server-start.sh config/server.properties
@cloudlakecho
cloudlakecho / text_generation_with_mini_gpt.py
Created June 4, 2023 00:46
Rocket Room Script Wiriting
"""
Title: Text generation with a miniature GPT
Author: [Apoorv Nandan](https://twitter.com/NandanApoorv)
Date created: 2020/05/29
Last modified: 2020/05/29
Description: Implement a miniature version of GPT and train it to generate text.
Accelerator: GPU
"""
# Reference:
# code: https://github.com/keras-team/keras-io/blob/master/examples/generative/text_generation_with_miniature_gpt.py