conda env config vars set PATH=$PATH;<yourpath>
in windows use $PATH instead of %PATH%
| # Excercise sent by friend - I dont know the source | |
| # fo is dict with fileowners - objective is to transfer it to fg (file group) where user (ie Randy) is unique key | |
| # and hold list of files | |
| # fo = {"input.txt":"Randy","code.py":"Stan","Output.txt":"Randy"} -> fg = {"Randy":["input.txt","Output.txt"],"Stan":["code.py"]} | |
| fo = {"input.txt":"Randy","code.py":"Stan","Output.txt":"Randy"} | |
| fg = dict() | |
| kelse = lambda fo,fg,k : fg.update({fo[k]:[k]}) | |
| kif = lambda fo,fg,k : fg[fo[k]].append(k) |
| # gnu radia meta file load | |
| from gnuradio.blocks import parse_file_metadata as pfm | |
| from gnuradio.gr import pmt | |
| import numpy as np | |
| import scipy | |
| # segment, index and length is only required if you want to access specific chunk of data. You will always get info for that chuck | |
| # Setting segment specify which segment you want get, index specify from which index from that segment function should start reading, | |
| # and length specify how long the function should od reading |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <sys/time.h> | |
| #include <sys/ioctl.h> | |
| #include <netdb.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <sys/time.h> | |
| #include <sys/ioctl.h> | |
| #include <netdb.h> | |
| #include <netinet/in.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> |
| #prepare OFDM | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| import scipy | |
| import scipy.signal | |
| fs = 20e6 | |
| class OFDM: |
| use serde_json::{Map, Value}; | |
| fn main() | |
| { | |
| let mut map = Map::new(); | |
| let mut map2 = Map::new(); | |
| // assuming keys_vals is a Vec<(String, String)> | |
| map.insert("key1".to_string(), Value::String("val".to_string())); | |
| map.insert("key2".to_string(), Value::String("val2".to_string())); |
| #ifndef _RING_BUFFER_H_ | |
| #define _RING_BUFFER_H_ | |
| #include <stdint.h> | |
| #define RING_BUFFER_MAX_SIZE 255 | |
| #define INIT_RING_BUFFER(_NAME,_SIZE,_DATATYPE,NULLTYPE)\ | |
| typedef struct _NAME ## _s_ring_buffer _NAME ## _s_ring_buffer;\ | |
| typedef struct _NAME ## _s_ring_buffer\ |
| class BezierCurve | |
| { | |
| constructor(x1, y1, x2, y2, id) { | |
| this.p1 = {x: x1, y: y1}; | |
| this.p2 = {x: x2, y: y2}; | |
| } | |
| updatePoint1(x1, y1) { | |
| this.p1 = {x: x1, y: y1}; |
| #include <functional> | |
| #include <chrono> | |
| #include <iostream> | |
| using namespace std::chrono; | |
| void timeit(std::function<void(void)> fn) | |
| { | |
| auto start = high_resolution_clock::now(); | |
| fn(); | |
| auto stop = high_resolution_clock::now(); |
conda env config vars set PATH=$PATH;<yourpath>
in windows use $PATH instead of %PATH%