Skip to content

Instantly share code, notes, and snippets.

View tobegit3hub's full-sized avatar

tobe tobegit3hub

View GitHub Profile
@yrezgui
yrezgui / filesize-filter.js
Created May 26, 2013 18:22
This is a custom filter to show a bytes filesize in better way.
// add the filter to your application module
angular.module('myApp', ['filters']);
/**
* Filesize Filter
* @Param length, default is 0
* @return string
*/
angular.module('filters', [])
.filter('Filesize', function () {
#!/bin/bash
rediscli=`which redis-cli`
lsave=`$rediscli lastsave`
echo "LASTSAVE $lsave"
saved="`$rediscli config get dir | xargs | cut -d ' ' -f 2`/`$rediscli config get dbfilename | xargs | cut -d ' ' -f 2`"
$rediscli bgsave
while [ $lsave -eq `$rediscli lastsave` ]; do
sleep 5
@soellman
soellman / easy-k8s-coreos.md
Last active July 22, 2019 14:10
Easy Kubernetes on CoreOS

Easy Kubernetes Installation on CoreOS

At Timeline Labs, we are continuously looking at new technologies to see what fits our needs. We are especially excited about Kubernetes from Google to manage our services atop Docker and CoreOS.

This process for installing Kubernetes on CoreOS uses Flannel for Kubernetes networking and should be cloud provider agnostic. To deploy the Kubernetes master functionality into the cluster, it uses fleetctl.

Thanks to Kelsey Hightower and his blog posts! They served as a great starting point for this process.

How do I get this running?

Add the cloud config below to your own and bring up your cluster using a CoreOS version with Docker 1.3 (currently v472.0.0 in alpha). During that initial boot, the download-kubernetes and download-flannel units will download binaries from the latest project release and use those.

@yuanying
yuanying / create-dev-env-magnum.md
Last active March 11, 2019 09:16
Develop Magnum with Devstack

Develop Magnum with Devstack

Vagrant

I'm using vagrant (parallels on Mac) to boot a devstack. Vagrantfile is below. Devstack IP Address is 192.168.11.197.

Vagrant.configure('2') do |config|

config.vm.box = "trusty64"

@fromradio
fromradio / Python版Kaggle教程.md
Last active February 3, 2018 05:40
Python版Kaggle教程

Python版Kaggle教程

Kaggle https://www.kaggle.com/ 是机器学习相关人士获取数据,验证算法的地方。上面有一块是Getting Started,里面有一个First Steps With Julia,旨在教会大家使用Julia语言进行机器学习。在尝试时候发现并不好用,这个教程所使用的Julia版本比较低,有些函数已经有了较大的改变。在纠结了半天Julia之后,决定使用已经比较熟悉的Python重实现了该教程 首先,该教程针对的问题是从谷歌街景的图片中鉴定字母。

谷歌街景字母

这个问题有别于传统的字母识别,因为每个字母的字体和背景都是不同的,该问题的训练集和测试集的下载请前往[数据集][1]。 下面我从Python的角度去完成Kaggle的Julia版教程。当然教程中也会使用到第三方库,有opencv,numpy,pandas和scikit-learn,这里暂时不介绍各个库的安装。 ##图片读取## 首先我们读取需要使用的库