Skip to content

Instantly share code, notes, and snippets.

You: Can you write a Program in Rust that performs a chirp-z transformation ?
ACTOR: Certainly! I'll break down the process into several steps:
1. Understanding the Chirp-Z Transform: The Chirp-Z transform is a mathematical technique used to analyze and design digital filters. It is a frequency-domain representation of a discrete-time signal. The Chirp-Z transform is a generalization of the Z-transform, which is used to analyze and design discrete-time systems.
2. Implementing the Chirp-Z Transform in Rust: Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. It is a great choice for implementing the Chirp-Z transform because it provides a safe and efficient environment for working with low-level code.
3. Writing the Code: To implement the Chirp-Z transform in Rust, we need to define a function that takes a vector of complex numbers as input and returns a vector of complex numbers as output. The function should use the Z-transform to convert th
@juhasch
juhasch / text.txt
Created November 8, 2023 20:15
Mistral-7B: Actor - critique - regenerate (HelixNet)
You: Will Rust programmers be replaced by AI in 5 years ?
ACTOR: As an AI language model, I cannot predict the future with absolute certainty. However, I can provide a thoughtful analysis of the current state of AI and its potential impact on the Rust programming community.
1. Rust is a relatively new programming language, released in 2010. It has gained popularity in recent years due to its focus on safety, speed, and concurrency.
2. AI has made significant progress in recent years, particularly in the areas of machine learning and natural language processing. However, there are still many challenges to overcome, such as ensuring the safety and reliability of AI systems.
3. The Rust programming language is well-suited for developing AI systems due to its focus on safety and concurrency. As such, it is likely that Rust programmers will continue to play a significant role in the development of AI systems.
@juhasch
juhasch / zarr_benchmark.py
Created August 28, 2023 18:15
Zarr benchmark
"""
Benchmark for reading and writing zarr datasets
"""
import zarr
import numpy as np
from tqdm import tqdm
from time import time
num = 1000
filename = 'zarr_test'
@juhasch
juhasch / cfarunfold.md
Last active August 27, 2023 12:05
CFAR using unfold

Question:

Can you give me an example how I can implement a CFAR algorithm for radar using torch.nn.functional.unfold ?

Answer:

Certainly, let's dive right into how one might implement a Constant False Alarm Rate (CFAR) algorithm for radar data using PyTorch's torch.nn.functional.unfold. The CFAR algorithm is primarily used in radar systems to detect objects by varying the threshold dynamically, which allows for maintaining a constant false alarm rate.

Assumptions and Setup

  1. You're familiar with the basics of radar signal processing and the CFAR algorithm.
  2. You have a working knowledge of PyTorch and its functionalities.
@juhasch
juhasch / mypyc.ipynb
Last active August 27, 2023 08:13
Mypy compilation example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juhasch
juhasch / nbextensions_contrib_json_config.py
Created January 28, 2018 18:25
Check integrity of JSON config files and remove entries for loading contrib extensions
"""Cleanup nbconfig files from notebook extension configurations
Gets list of notebook extensions from jupyter_contrib_nbextensions and removes the 'require' entry for
each found extension from the 'load_extensions' dict entry.
"""
import sys
import glob
import os
@juhasch
juhasch / demonotebook.ipynb
Created April 29, 2016 18:00
Notebook for toc2 testing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juhasch
juhasch / mylatex.tplx
Last active June 26, 2017 16:36
Template for generating PDF output from nbconvert (via latex)
((= IPython input/output style =))
((*- extends 'base.tplx' -*))
%===============================================================================
% Custom definitions
%===============================================================================
((* block definitions *))
((( super() )))
@juhasch
juhasch / gist:ea56dc964638933aa6a9
Created February 23, 2015 18:02
Add rulers to codecells
// Add rulers to a codecell
//
define([
'base/js/namespace',
'jquery',
'require',
'base/js/events',
'codemirror/lib/codemirror',
'codemirror/addon/display/rulers'
@juhasch
juhasch / Untitled2.ipynb
Created December 27, 2014 09:13
Defective Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.