use https for features.
text: sort by
tags: modified
type: chronology
{517} is owned by tlh24.
hide / / print
ref: -0 tags: python timelapse script date: 07-30-2019 20:45 gmt revision:3 [2] [1] [0] [head]

Edited Terrence Eden's script to average multiple frames when producing a time-lapse video from a continuous video. Frames are averaged together before decimation, rather than pure decimation, as with ffmpeg. Produces appealing results on subjects like water. Also, outputs a video directly, without having to write individual images.

import cv2
import sys

#   Video to read
print str(sys.argv[1])
vidcap = cv2.VideoCapture(sys.argv[1])

#   Which frame to start from, how many frames to go through
start_frame = 0
frames = 61000

#   Counters
count = 0
save_seq = 0
decimate = 10
rolling = 16 # average over N output frames
transpose = False

	h = vidcap.get(3)
	w = vidcap.get(4)
	w = vidcap.get(3)
	h = vidcap.get(4)

fourcc = cv2.VideoWriter_fourcc(*'mp4v')
writer = cv2.VideoWriter("timelapse.mp4", fourcc, 30, (int(w), int(h)), True)

avglist = []

while True:
	#   Read a frame
	success,image = vidcap.read()
	if not success:
	if count > start_frame+frames:
	if count >= start_frame:
		if (count % decimate == 0):
			#   Extract the frame and convert to float
			avg = image.astype('uint16') # max 255 frames averaged. 
		if (count % decimate > 0 and count % decimate <= (decimate-1)):
			avg = avg + image.astype('uint16')
		if (count % decimate == (decimate-1)):
			#   Every 100 frames (3 seconds @ 30fps)
			avg = avg / decimate
				avg = cv2.transpose(avg)
				avg = cv2.flip(avg, 1)
			avg2 = avg; 
			for a in avglist:
				avg2 = avg2 + a
			avg2 = avg2 / rolling; 
			if len(avglist) >= rolling:
				avglist.pop(0) # remove the first item. 
			avg2 = avg2.astype('uint8')
			print("saving "+str(save_seq))
			#   Save Image
			# cv2.imwrite(filename+str('{0:03d}'.format(save_seq))+".png", avg)
			save_seq += 1
			if count == frames + start_frame:
	count += 1

hide / / print
ref: -0 tags: perl directory descent script remove date: 01-10-2014 06:12 gmt revision:0 [head]

Simple perl scrip for removing duplicate files within sub-directories of a known depth:

#!/usr/bin/perl -w

@files = <*>;
foreach $file (@files) {
	@files2 = <$file/*>;
	foreach $file2 (@files2) {
		print $file2 . "\n";
		`rm -rf $file2/*_1.jpg`; 
		`rm -rf $file2/*_2.jpg`; 

hide / / print
ref: -0 tags: entropy life proteonomics transcription factors date: 07-08-2011 22:42 gmt revision:0 [head]

Reduction in Structural Disorder and Functional Complexity in the Thermal Adaptation of Prokaryotes -- read the article. These are my disordered, mesothermophylic notes.

  • Low and high temperature prokaryotes seem to have less protein disorder (as estimated by amino acid content, mostly, not actual structure) called IDR/IDP (intrinsically disordered regions or proteins).
  • IDR / IDPs seem essential in certain protein functions, such as transcription factors and ribosomal proteins.
  • hyperthermophyles have low genomic complexity and low protein disorder, possibly to combat the high disorder of their environment.
  • "life appears to be incompatible with less than about 1.5% disorder ". I would say that this is a rather conservative threshold.
  • transcription factors: "disorder is correlated with the number of genes they regulate, which suggests that their disorder is directly linked with functional complexity of the organism"
  • Transcription factor disorder is higher in psychrophiles (low temp) than hyperthermophiles, even though both show decreased genome size. Furthermore, disordered regions may confer temperature robustness at 40-50C as well as at low temperatures.
  • "...there is many evidence in the literature that structural disorder and complexity are correlated, both at the level of individual proteins, where IDP functions correlate with signaling and regulation, and whole genomes, where the frequency of disorder increases with increasing complexity of the organism [24], [25], [41], [52]. Thus, evolutionary changes (point mutations, deletions of regions, silencing of genes, etc…) that reduce disorder will tend to strip the organism of functions that increase its complexity, and leave functions that are required for its basic, non-regulated existence. In this sense, reduction in disorder is not a side-effect of selection for reduced complexity, rather the mechanism of this evolutionary drive."

hide / / print
ref: -0 tags: processing javascript vector graphics web date: 05-03-2009 18:20 gmt revision:0 [head]

http://www.mattryall.net/blog/2008/11/wiki-visualisations-with-javascript -- way cool!!

hide / / print
ref: bookmark-0 tags: tab textarea javascript date: 08-02-2007 23:11 gmt revision:0 [head]


how to make a text area where tab key inserts 'tab' into the text (like here - for tables!) "