Animation-Text
class Signal: go = True
def spin(msg, signal): write, flush = sys.stdout.write, sys.stdout.flush for char in itertools.cycle('|/-\\'): status = char + ' ' + msg write(status) flush() time.sleep(.1) write('\x08' * len(status)) if not signal.go: break write(' ' * len(status) + '\x08' * len(status))
def slow_function(): time.sleep(3) return 42
def supervisor(): signal = Signal() spinner = threading.Thread(target=spin, args=('thinking!', signal)) print('spinner object:', spinner) spinner.start() result = slow_function() signal.go = False spinner.join() return result
def main(): result = supervisor() print('Answer:', result)
if __name__ == '__main__': main()
|
PaddleGAN
python -m pip install munch scikit-image
python -m pip install paddlepaddle-gpu==2.2.2
|
import paddle
paddle.set_device('gpu') from ppgan.apps import DeOldifyPredictor deoldify = DeOldifyPredictor() pred = deoldify.run_image("/mnt/8A26661926660713/Deng/Cell_segmentation/lgl4wd5d1_c2.tif") pred.save('deoldify_result.jpg')
|
$$\frac{r_C×C +rG×G}{(1-r_{CG})(C+G)}=r_T$$
$C=53012;\ r_C=38.27%$
$G=19742.5;\ r_G=13%$
$TM=73304;\ r_{T}=36.7%$
$r_{CG}=10.725%$
$(G+C)*(1-r_{CG})=64951.58$
$\frac{38.27%×53012 + 13%19742.5}{(1-10.725%)(53012+19742.5)}≈38.811%$