Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| import math | |
| from hashlib import blake2b | |
| class BloomFilter: | |
| def __init__(self, elements_count: int, *, error_rate: float = 0.0001) -> None: | |
| byte_count = 1 + int( | |
| -(math.log(error_rate) / math.log(2) ** 2) * elements_count // 8 | |
| ) | |
| digest_size = int(math.log2(elements_count)) + (elements_count % 2) |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| var hrtime = (function(){ | |
| if (typeof window !== 'undefined'){ | |
| // browser | |
| if (typeof window.performance !== 'undefined' && typeof performance.now !== 'undefined'){ | |
| // support hrt | |
| return function(){ | |
| return performance.now(); | |
| }; | |
| }else{ | |
| // oh no.. |
| #!/bin/bash | |
| # Install build dependencies | |
| yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
| # Get GraphicsMagick source | |
| wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz | |
| tar zxvf GraphicsMagick-1.3.9.tar.gz | |
| # Configure and compile |
| https://docs.google.com/document/d/1ZKt6bvgcsS4Bzve8k36FZNmAYrwt8QrSn-wztNpOkhU/edit | |
| 链接是一篇目前为止见过最大而全的教程,如果可以早点看到就好了,你可以理解为是我这篇po和置顶帖另外一篇“数据控”的po的并集的子集。 | |
| 这篇po算是version2了,修正了之前的错误 | |
| 感谢Kururu,米非,howard lee,Shiyuan Chen等人的教授 | |
| 另外经验什么的,在时间这把杀猪刀和汽车飞机等交通工具面前都是浮云 | |
| 关于passcode,可以加入decode ingress这个社群,或者邮件订阅他们的博客,高手可以自己破解media |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
| app.filter('bytes', function() { | |
| return function(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
| number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| } | |
| }); |
Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.