Skip to content

Instantly share code, notes, and snippets.

View yingfeng's full-sized avatar
🎯
Focusing

Yingfeng yingfeng

🎯
Focusing
View GitHub Profile
--- a/block/blk-throttle.c 2016-08-09 15:48:03.242986929 +0800
+++ b/block/blk-throttle.c 2016-08-09 15:53:33.060446303 +0800
@@ -735,7 +735,8 @@
}
/* Calc approx time to dispatch */
- extra_bytes = tg->bytes_disp[rw] + bio->bi_iter.bi_size - bytes_allowed;
+ /* fcicq: iops limit not checked and allow smaller request, use the correct wait time here */
+ extra_bytes = tg->bytes_disp[rw] + max(bio->bi_iter.bi_size, 32768U) - bytes_allowed;
jiffy_wait = div64_u64(extra_bytes * HZ, tg->bps[rw]);
@MishaelRosenthal
MishaelRosenthal / FCBF.scala
Last active September 25, 2018 11:24
Implements the Fast Correlation Based Filter algorithm for feature selection.Conference version: http://machinelearning.wustl.edu/mlpapers/paper_files/icml2003_YuL03.pdfJournal version: http://machinelearning.wustl.edu/mlpapers/paper_files/YuL04.pdf
package com.liveperson.lpbt.research.hadoop.examples
import scala.annotation.tailrec
/**
* User: mishaelr
* Date: 7/11/13
* Time: 10:33 AM
*/
object FCBF extends App{
@ryantanner
ryantanner / AnalyticsLeader.scala
Last active March 19, 2021 18:27
Conspire's implementation of work pulling
class AnalyticsLeader(supervisor: ActorRef) extends Leader[ProcessUser, AnalyticsNode, AnalyticsMessage](supervisor)
@mems
mems / gist:5301297
Last active February 23, 2022 13:12
How to convert a (simple) SWF to PDF

Convert (simple) SWF to PDF

In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.

It can convert SWF, PDF or image to SWF, PDF, ebook or image.

For discard downscaling for rasterized image (default: 72dpi) we use the provided by @m-p-y: add -r attribute to increase maxdpi

Requirements