All Posts

图片剪贴板

剪贴板自动管理图片 当复制一张图片时,使用CopyQ自动将图片存储在指定位置,并生成MIME text。 执行粘贴动作时,如果支持图片粘贴,则粘贴图片,否则粘贴对应的图片文件名。 用途 截图,迅速拷贝图片至对应目录 各类文本编辑器粘图 图片检索 等等 /home/amos/Pictures/Screenshots/img-2017-09-11-220938.png fwe wefwef fff fwef 代码 [Command] Automatic=true Command=" copyq: var imageDir = Dir().homePath() + '/Pictures/copyq/' var imageFileName = 'copied-' + dateString('yyyy-MM-dd-HH_mm_ss') + '.png' var imagePath = imageDir + '/' + imageFileName if (!Dir().mkpath(imageDir)) { popup('Failed to create directory for images') abort() } var f = new File(imagePath) if (!f.openWriteOnly() || f.write(input()) == -1) { popup('Failed to save image', f.

ClickHouse 测试

机器配置 测试环境 Linux Kernel: 3.10.0-514.26.2.el7.x86_64 x86_64 System: Dell product: PowerEdge R720xd CPU: 2 Hexa core Intel Xeon E5-2620 0s (-HT-MCP-SMP-) cache: 30720 KB Network: Intel I350 Gigabit Network Connection driver: igb Drive: Raid-5 12 SATA 3TB disks Memory: 80GB ClickHouse Commit Hash: df42f234f19ad21c0507d29185cdc1dc5ca4ce8f OnTime 测试集 原始 CSV 文件大小:65GB 数据量:175043894 条 加载时间:(24m 28s 262ms) 磁盘占用量:14.17GB SELECT formatReadableSize(sum(bytes)) FROM system.parts WHERE table = 'ontime_merge' AND active 建表语句 CREATE TABLE ontime_merge ( `Year` UInt16, `Quarter` UInt8, `Month` UInt8, `DayofMonth` UInt8, `DayOfWeek` UInt8, `FlightDate` Date, `UniqueCarrier` FixedString(7), `AirlineID` Int32, `Carrier` FixedString(2), `TailNum` String, `FlightNum` String, `OriginAirportID` Int32, `OriginAirportSeqID` Int32, `OriginCityMarketID` Int32, `Origin` FixedString(5), `OriginCityName` String, `OriginState` FixedString(2), `OriginStateFips` String, `OriginStateName` String, `OriginWac` Int32, `DestAirportID` Int32, `DestAirportSeqID` Int32, `DestCityMarketID` Int32, `Dest` FixedString(5), `DestCityName` String, `DestState` FixedString(2), `DestStateFips` String, `DestStateName` String, `DestWac` Int32, `CRSDepTime` Int32, `DepTime` Int32, `DepDelay` Int32, `DepDelayMinutes` Int32, `DepDel15` Int32, `DepartureDelayGroups` String, `DepTimeBlk` String, `TaxiOut` Int32, `WheelsOff` Int32, `WheelsOn` Int32, `TaxiIn` Int32, `CRSArrTime` Int32, `ArrTime` Int32, `ArrDelay` Int32, `ArrDelayMinutes` Int32, `ArrDel15` Int32, `ArrivalDelayGroups` Int32, `ArrTimeBlk` String, `Cancelled` UInt8, `CancellationCode` FixedString(1), `Diverted` UInt8, `CRSElapsedTime` Int32, `ActualElapsedTime` Int32, `AirTime` Int32, `Flights` Int32, `Distance` Int32, `DistanceGroup` UInt8, `CarrierDelay` Int32, `WeatherDelay` Int32, `NASDelay` Int32, `SecurityDelay` Int32, `LateAircraftDelay` Int32, `FirstDepTime` String, `TotalAddGTime` String, `LongestAddGTime` String, `DivAirportLandings` String, `DivReachedDest` String, `DivActualElapsedTime` String, `DivArrDelay` String, `DivDistance` String, `Div1Airport` String, `Div1AirportID` Int32, `Div1AirportSeqID` Int32, `Div1WheelsOn` String, `Div1TotalGTime` String, `Div1LongestGTime` String, `Div1WheelsOff` String, `Div1TailNum` String, `Div2Airport` String, `Div2AirportID` Int32, `Div2AirportSeqID` Int32, `Div2WheelsOn` String, `Div2TotalGTime` String, `Div2LongestGTime` String, `Div2WheelsOff` String, `Div2TailNum` String, `Div3Airport` String, `Div3AirportID` Int32, `Div3AirportSeqID` Int32, `Div3WheelsOn` String, `Div3TotalGTime` String, `Div3LongestGTime` String, `Div3WheelsOff` String, `Div3TailNum` String, `Div4Airport` String, `Div4AirportID` Int32, `Div4AirportSeqID` Int32, `Div4WheelsOn` String, `Div4TotalGTime` String, `Div4LongestGTime` String, `Div4WheelsOff` String, `Div4TailNum` String, `Div5Airport` String, `Div5AirportID` Int32, `Div5AirportSeqID` Int32, `Div5WheelsOn` String, `Div5TotalGTime` String, `Div5LongestGTime` String, `Div5WheelsOff` String, `Div5TailNum` String ) ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192) 测试结果 QueryID SQL Text Query Time (Seconds) Query Time Hot (Seconds) Q0 SELECT avg(c1) from (select Year, Month, count(*) as c1 from ontime group by Year, Month); 1.