On command lines:
sudo systemctl disable apt-daily.timerthen edit 2 files:
sudo systemctl disable apt-daily-upgrade.timer
sudo vi /etc/apt/apt.conf.d/10periodicIn both files, change "1" to "0".
sudo vi /etc/apt/apt.conf.d/20auto-upgrades
sudo systemctl disable apt-daily.timerthen edit 2 files:
sudo systemctl disable apt-daily-upgrade.timer
sudo vi /etc/apt/apt.conf.d/10periodicIn both files, change "1" to "0".
sudo vi /etc/apt/apt.conf.d/20auto-upgrades
ffmpeg -f concat -i files.txt -vf "select=not(mod(n\,30)),setpts=N/(FRAME_RATE*TB)" -vcodec rawvideo -pix_fmt yuv420p -an raw.yuvBecause this is uncompressed raw video, its size will be huge, probably tens of GigBytes. You probably don't want to play it on your computer, let alone uploaded to youtube. To make it playable, we need to compress it to mp4 format:
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 1920x1080 -i raw.yuv -vcodec libx264 video.mp4You can see an example of the time lapsed video here:
I run it with "uvicorn example:app", then measure rps using 'ab':from starlette.responses import PlainTextResponse async def app(scope, receive, send): assert scope['type'] == 'http' response = PlainTextResponse('Hello, world!') await response(scope, receive, send)
ab -n 1000 -c 10 127.0.0.1:8000/The result is on average 4200 requests per second.
Using the same measurement, the ab result is a average 1900 requests/second.import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": app = make_app() app.listen(8888) tornado.ioloop.IOLoop.current().start()
(and put "from tornado.httpserver import HTTPServer" at the beginning of the file), its performance increases to 4700 requests/second, actually faster than Starlette.server = HTTPServer(app) server.bind(8888) server.start(0)
uvicorn --workers 4 example:appThe result now is 7500 requests/second, surpassing multi-process Tornado again.
cd drjava/drjava
ant jar
return DateTime::TimeZone->new(name => 'Asia/Shanghai');(Replace 'Asia/Shanghai' with your own timezone.)
use List::Util 1.31 ();Just delete '1.31'.
vboxmanage modifyhd u140464-02-disk1.vmdk --resize 30000What?!
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!
vboxmanage clonehd u140464-02-disk1.vmdk u140464-02-disk1.vdi --format vdiThen detach vmdk disk from the VM and attach the vdi.
vboxmanage modifyhd u140464-02-disk1.vdi --resize 30000
sudo fdisk /dev/sdathen enter p, it showed:
Device Boot Start End Blocks Id SystemEnter n to create a new partition, press enter 2 times to accept default partition size. For some reason, there was a stray segment, so I have to enter n again to create a new partition. 2 partitions were created, after a p, my partition table looked like this:
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 33552383 16525313 5 Extended
/dev/sda5 501760 33552383 16525312 8e Linux LVM
Device Boot Start End Blocks Id Systemsda3 is useless, so I deleted it by a 'd' followed by a '3'. sda4 is the one I will use. Enter 'w' to write to disk. Then reboot the VM.
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 33552383 16525313 5 Extended
/dev/sda3 499712 501757 1023 83 Linux
/dev/sda4 33552384 61439999 13943808 83 Linux
/dev/sda5 501760 33552383 16525312 8e Linux LVM
sudo mkfs.ext4 /dev/sda4My /opt was not used, so I just mount sda4 as /opt
sudo mount /dev/sda4 /optAdd "/dev/sda4 /opt ext4 defaults 0 2" to the end of /etc/fstab so it was mounted automatically at boot.
"sudo service network-manager restart"Now both vpn and ethernet connections are managed by NetworkManager, turning on VPN just works.