Creating a new environment. In this example, the environment is setup to use python 3.10
$ conda create --name py10 python=3.10
Activating an environment
$ conda activate py10
#ifndef _TIMESTAMP_H_ | |
#define _TIMESTAMP_H_ | |
static inline uint64_t timestamp_start(void) | |
{ | |
union { | |
uint64_t tsc_64; | |
struct { | |
uint32_t lo_32; | |
uint32_t hi_32; |
def mpps(gbps, size): | |
return (gbps / (size * 8)) * 1000 | |
def gbps(mpps, size): | |
return mpps * size * 8 / 1000; | |
def pkt_size(gbps, mpps): | |
return (gbps * 1000) / mpps / 8 | |
################################################## |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
~=
&&
Task | Command |
---|---|
Fetch for later merging | git fetch [remote name] |
Pull and merge | git pull [remote name] |
Pull and rebase local changes on top (instead of merging) | git pull --rebase [remote name] |
Clone only a subset of files | git init repo cd repo git remote add origin url git config core.sparsecheckout true echo "path/*" >> .git/info/sparse-checkout git pull --depth=1 origin master |
p = [(1,2,3), (2,4), (1,6)] | |
set(itertools.chain(*p)) | |
=> {1,2,3,4,5,6} | |
where: | |
*p expands the list elements into separate arguments | |
itertools.chain() chains all of the individual elements of each parameter (the tuple from p in this case) into a single iterable stream. |