670 karma · joined July 13, 2016
Here's a sample of some ratios from random git repos:
158.25:jgthms/bulma
2.37:dthree/cash
32.49:Rochester-NRT/AlphaGo
7.04:apple/swift
5.00:robbyrussell/oh-my-zsh
108.86:github/gitignore
10.17:facebook/draft-js
12.77:matryer/bitbar
7.47:Microsoft/vscode
9.42:ptmt/react-native-desktop
6.06:p-e-w/maybe
1.00:parkjs814/AlgorithmVisualizer
9.54:hollance/swift-algorithm-club
17.63:alexjc/neural-doodle
4.55:fbsamples/f8app
8.80:nodejs/node
10.64:jiahaog/nativefier
325.12:Microsoft/CNTK
28.56:atom/atom
3.21:jcjohnson/neural-style
40.01:tensorflow/models
TOTAL_CHANGES="$(git log --all --numstat --pretty="%H" | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("%d\n", plus+minus)}')"
TOTAL_LINES="$(cloc . | tail -n 2 | head -n 1 | awk '{print $NF}')"
echo "scale=2 ; $TOTAL_CHANGES / $TOTAL_LINES" | bc
echo -n ":1"
pwd
One snippet from https://gist.github.com/sephiroth74/d3ce654dcaefe1d2c4cd (modified)
How to run:
1. Clone a Git repo
2. cd into it
3. run bash ../script.sh
Output something like this:
polygot@server:~/tinkerpop$ bash ../script.sh
14.17:1/home/polygot/tinkerpop
Granted, this is my very limited experience. Perhaps this could be a competing way to help communicate in foreign languages.
Photoshop unveiled a similar temporally stable algorithm which does just that (provided that you select a marquee selection around the object.) I can't find the link though. Perhaps those two algorithms can be combined to first locate the object then remove it.
> "at the factory"
I suppose the secret key is erased at the factory, however, what if it isn't? Or, is the secret key generated on-chip via a random number generator? If it were stored at the factory somewhere then it would be possible to link it to each iPhone. I'm not familiar with cryptography, so I think it's just a misunderstanding on my part, and I'm not sure if this would be a weakness in the Touch ID sensor.
For example, the CPU percentage counter in Activity Monitor was around 3,000,000. If there was a loop to increment the CPU usage counter, it sounds like it incremented it so fast that the thread that reset it didn't run since it wasn't scheduled to run (as it only runs every few seconds.) Again, this is just pure speculation and if anyone knows otherwise please let me know!
On 10.6, when I ran Windows in a virtual machine while it was doing windows update, and left it running in the background for a few minutes and returned to it, sometimes I would get 60fps in the machine for a few seconds and it updated very very fast, and then it went back to 15fps (seemingly getting more CPU power.)
On 10.7 (if I recall) if I left Activity Monitor running in the background for a few minutes and returned to it, I would get nonsensical values for the CPU usage for a few seconds (e.g. 398423.34%) but then it would return to normal. Perhaps this error has been accumulating over the years.
stty sane; printf '\033k%s\033\\\033]2;%s\007' "`basename "$SHELL"`" "`uname -n`"; tput reset; tmux refresh
Maybe have something like "when I run the cat command, ignore all commands to the terminal until cat finishes".
I wanted to make a GIF of another user's Google Slide, but with the webapp it looks like I only have access to my own slides, and only google slides. I whipped up a quick API to generate a GIF of any Google Slide URL or of any PPTX file available on the web: http://159.203.37.136/
You can use the API like this: http://159.203.37.136/?url=xyz&delay=100 which would make a GIF of the URL pptx file. For example, it could be https://docs.google.com/presentation/d/13838392jfdjkfsd/edit... or https://scholar.harvard.edu/files/torman_personal/files/samp... or any ppt or pptx url of your choosing. It works with any public google slides too.
As a sample, you can try http://159.203.37.136/?url=https://scholar.harvard.edu/files...
Abstract:
Books are a rich source of both fine-grained information, how a character, an object or a scene looks like, as well as high-level semantics, what someone is thinking, feeling and how these states evolve through a story. This work aims to align books to their movie releases in order to provide rich descriptive explanations for visual content that go semantically far beyond the captions available in current datasets. To align movies and books we propose a neural sentence embedding that is trained in an unsupervised way from a large corpus of books, as well as a video-text neural embedding for computing similarities between movie clips and sentences in the book. We propose a context-aware CNN to combine information from multiple sources. We demonstrate good quantitative performance for movie/book alignment and show several qualitative examples that showcase the diversity of tasks our model can be used for.
Bit hacky, but uses the HN API to get a comment based on their ID (scraping the new comments page for ids), and then extracts the id from the comment and checks if the parent comment is the same as your username (by querying the API again), and if it is, then it sends a notification.
Just run it with: while true; do python HNgetCommentReplies.py | mail -s "new hn reply" me@example.com; sleep 1m; done;
(e.g. check every minute for new comment replies and mail output.) It will output "Reply to comment: hn-url" if there is a reply, otherwise it will output nothing. Unfortunately it doesn't save any state, so it doesn't know if it already emailed you a reply. This can be easily fixed but I don't have too much time right now. Also, it makes one query at a time, which is a bit slow (as it takes around 20 seconds to check for replies.) This can be parallelized to make it much faster.
Benefits of this script is that if it were centralized, n users could be subscribed to get notifications (e.g. a million users) it would only use one query to the hacker news server every 30 seconds or so. It just looks to see if all recent comments have a parent whose name matches yours.
I'll dogfood it for a while and see if any replies to this comment works.
Perhaps that could be useful when having to write pep8 compliant code but don't want to manually format everything.
I had a pain point a few days ago when I had to delete a few thousand files from my VPS over SFTP (it took forever.) This project looks like it could help out a lot in that regard because it uses rsync, which should be much faster than FTP's method of deleting the files one by one.
In the footnote, it says that it corrects BIOS corruption every 15 minutes. I'd be interested to see how this works and what technology they are using. What happens if my BIOS is corrupted within the 15 minute window and I reboot?