m8ta
You are not authenticated, login. |
|
{1509} | ||
Finding frequent items in data streams
Mission: Ultra large-scale feature selection using Count-Sketches
| ||
{1353} |
ref: -0
tags: PEDOT electropolymerization electroplating gold TFB borate counterion acetonitrile
date: 10-18-2016 07:49 gmt
revision:3
[2] [1] [0] [head]
|
|
PMID-20715789 Investigation of near ohmic behavior for poly(3,4-ethylenedioxythiophene): a model consistent with systematic variations in polymerization conditions.
PMID-24576579 '''Improving the performance of poly(3,4-ethylenedioxythiophene) for brain–machine interface applications"
PEDOT-modified integrated microelectrodes for the detection of ascorbic acid, dopamine and uric acid
| ||
{91} | ||
to remove lines beginning with a question mark (e.g. from subversion) svn status | perl -nle 'print if !/^?/' here's another example, for cleaning up the output of ldd: ldd kicadocaml.opt | perl -nle '$_ =~ /^(.*?)=>/; print $1 ;' and one for counting the lines of non-blank source code: cat *.ml | perl -e '$n = 0; while ($k = <STDIN>) {if($k =~ /\w+/){$n++;}} print $n . "\n";' By that metric, kicadocaml (check it out!), which I wrote in the course of learning Ocaml, has about 7500 lines of code. Here is one for resizing a number of .jpg files in a directory into a thumb/ subdirectory: ls -lah | perl -nle 'if( $_ =~ /(\w+)\.jpg/){ `convert $1.jpg -resize 25% thumb/$1.jpg`;}'or, even simpler: ls *.JPG | perl -nle '`convert $_ -resize 25% thumb/$_`;' Note that -e command line flag tells perl to evaluate the expression, -n causes the expression to be evaluated once per input line from standard input, and -l puts a line break after every print statement. reference For replacing charaters in a file, do something like: cat something | perl -nle '$_ =~ s/,/\t/g; print $_' | ||
{464} | ||
The problem: I have an interrupt status routine (ISR) which can interrupt the main, radio-servicing routine at any time. To keep the ISR from corrupting the register values of the main routine while it works, these registers must be pushed, and later popped, to the stack. Now, doing this takes time, so I'd prefer to pop / push as few registers as possible. Namely, I don't want to push/pop the hardware loop registers - LC0 (loop counter 0), LB0 (loop bottom 0, where the hardware loop starts) & LT0 (loop top 0, where the hardware loop ends). Gcc seems to only touch bank 1, never bank 0, so I don't have to save the 3 regs above. However, to make sure, I've written a perl file to examine the assembled code: my $file = "decompile.asm"; open(FH, $file); @j = <FH>; my $i=0; my @badregs = ("LC0", "LB0", "LT0"); foreach $reg (@badregs){ foreach $k (@j){ if($k =~ /$reg/){ $i++; print "touch register $reg : $k"; } } } #tell make if we found problems or not. if($i>0){ exit 1; }else{ exit 0; } 'make' looks at the return value perl outputs, as instructed via the makefile (relevant portion below): headstage.ldr:headstage.dxe rm -f *.ldr $(LDR) -T BF532 -c headstage.ldr $< bfin-elf-objdump -d headstage.dxe > decompile.asm perl register_check.pl if it finds assembly which accesses the 'bad' registers, make fails. | ||
SELECT file, COUNT(file) FROM info2 WHERE unit>1 AND maxinfo/infoshuf > 10 AND analog < 5 GROUP BY file ORDER BY COUNT(file) DESC to count the number of files matching the criteria.. and get aggregate frequentist statistics. |