This file contains hidden or 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 subprocess | |
import time | |
def automate_cli_input(cli_command, input_values): | |
# Start the CLI subprocess | |
cli_process = subprocess.Popen(cli_command.split(), stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, universal_newlines=True) | |
# Iterate over the expected input prompts | |
for prompt, value in input_values.items(): |
This file contains hidden or 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 shutil | |
import os | |
import json | |
from PIL import Image | |
def copy_from_to(file_path_from, file_path_to): | |
shutil.copy(file_path_from, file_path_to) | |
def copy_subset_of_kitti(input_folder_path, output_folder_path, idx_begin='000000', idx_end='001000'): | |
# Improvements: |
This file contains hidden or 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 roboflow_datasets as roboflow | |
import os | |
import shutil | |
def make_dir(new_dir_path): | |
if not os.path.exists(new_dir_path): | |
os.makedirs(new_dir_path) | |
print(f'{new_dir_path} created') | |
def copy_from_to(file_path_from, file_path_to): |
This file contains hidden or 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
THIS WORKS! | |
import subprocess | |
cmd = ['tao', 'yolo_v4_tiny', 'export', '-m', | |
'/workspace/tao-experiments/yolo_v4_tiny/experiment_dir_retrain/weights/yolov4_cspdarknet_tiny_epoch_005.tlt', | |
'-k', 'YOUR_KEY', | |
'-e', '/workspace/tao-experiments/yolo_v4_tiny/specs/yolo_v4_tiny_retrain_kitti.txt', | |
'-o', '/workspace/tao-experiments/yolo_v4_tiny/export/yolov4_cspdarknet_tiny_epoch_005.etlt', | |
'--data_type', 'fp32', | |
'--gen_ds_config'] |
This file contains hidden or 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
# For the best DCGAN generator | |
# 1. covid small | |
# 2. rsna_10 | |
# 3. rsna_50 | |
noise = np.random.normal(0, 1, (100, 128)) | |
gen_sample = generator.predict([noise, label]) # e.g. label is 0 or 1 in RSNA | |
# gen_sample in keras outputs (100, 64, 64, 3) | |
# e.g. for rsna_10 i need two vectors (100, 64, 64, 3), one for each lass |
This file contains hidden or 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
# Note: 1 and 2 are simplifications to be more clear | |
# 1. Generate distribution: simplification | |
data_from_distribution = generate_rayleigh_CSI(parameter_1, parameter_2, parameter_3, ...) | |
# 2 Loop over data to compute wwmse: simplification | |
for sample in range(data_from_distribution): | |
wwmse = WMMSE(number_of_transceivers, sample, max_power_budget, noise) | |
# ==Parameters==: | |
# |
This file contains hidden or 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
package my.index; | |
import java.io.*; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.mapreduce.Job; | |
import org.apache.hadoop.mapreduce.Mapper; | |
import org.apache.hadoop.mapreduce.Reducer; |
This file contains hidden or 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
package my.midterm; | |
/* | |
'Overview' section provides a concise high level summary of Hadoop - MapReduce: | |
https://hadoop.apache.org/docs/r1.2.1/mapred_tutorial.html | |
*/ | |
import java.io.*; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; |
This file contains hidden or 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
Autodials (Github examples) | |
https://github.com/sloan58/twilio-autodialer | |
https://github.com/cristeab/autodialer | |
Build IVR with Lex | |
https://cogint.ai/conversational-ivr-with-amazons-lex-and-connect/ | |
Amazon Lex Developer Resources | |
https://aws.amazon.com/lex/resources/ | |
https://github.com/awslabs/aws-lex-browser-audio-capture |
This file contains hidden or 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
# Option 1 | |
go mod init | |
go build | |
# Option 2 | |
export GO111MODULE=on | |
go mod init | |
go mod download | |
go mod vendor |
NewerOlder