conda env config vars set PATH=$PATH;<yourpath>
in windows use $PATH instead of %PATH%
| module Main exposing (main) | |
| import Browser | |
| import Html exposing (Html, Attribute, p, span, input, text) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (onInput) | |
| -- MAIN |
| import Browser | |
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (onInput) | |
| -- MAIN | |
| #define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" | |
| #define PBWIDTH 60 | |
| void printProgress(double percentage) { | |
| int val = (int) (percentage * 100); | |
| int lpad = (int) (percentage * PBWIDTH); | |
| int rpad = PBWIDTH - lpad; | |
| printf("\r%3d%% [%.*s%*s]", val, lpad, PBSTR, rpad, ""); | |
| fflush(stdout); | |
| } |
conda env config vars set PATH=$PATH;<yourpath>
in windows use $PATH instead of %PATH%
| #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(); |
| 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}; |
| #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\ |
| 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())); |
| #prepare OFDM | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| import scipy | |
| import scipy.signal | |
| fs = 20e6 | |
| class OFDM: |
| #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> |