Skip to content

Instantly share code, notes, and snippets.

@overvenus
overvenus / corplink-rs.rb
Last active July 23, 2024 15:48
corplink-rs brew formula
#! /usr/bin/env perl
# Copyright (c) 1998-2007, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
/*
*
* Copyright 2017 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@overvenus
overvenus / readme.md
Created March 1, 2017 08:02 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

#![feature(test)]
extern crate test;
extern crate fnv;
extern crate rand;
use std::collections::{BTreeMap, HashMap};
use std::cell::RefCell;
use test::Bencher;
@overvenus
overvenus / Cargo.toml
Last active July 7, 2016 03:34
BlockUdpMetric VS NonBlockUdpMetric
[package]
name = "bench_metric"
version = "0.1.0"
authors = ["overvenus <overvenus@gmail.com>"]
[dependencies]
cadence = "0.5.0"
log = "0.3"
quick-error = "0.2"
@overvenus
overvenus / NoPause.user.js
Last active November 17, 2015 12:53
解除尔雅公开课暂停限制
// ==UserScript==
// @name Erya100 No Pause
// @author neilsh.me
// @namespace http://neilsh.me/userjs
// @description Erya100 No Pause
// @version 0.1
// @include http://*.tsk.erya100.com/*
// @run-at document-end
// @license MIT
// ==/UserScript==
@overvenus
overvenus / make.go
Created November 13, 2015 02:20
slice, map and channel at runtime
package main
import "fmt"
import "log"
import "unsafe"
import "runtime"
func main() {
log.SetFlags(0)
log.Println("GOOS", runtime.GOOS)
@overvenus
overvenus / NumbSwipeRefreshLayout.java
Created August 15, 2015 07:26
A numb version SwipeRefreshLayout with an adjustable trigger angle.
package org.overvenus.android;
import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
/**
/**
* Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable).
* In the ghost bitmap, the RGB values take on the values from the 'color' argument, while
* the alpha values are derived from the source's grayscaled RGB values. The effect is that
* you can see through darker parts of the source bitmap, while lighter parts show up as
* the given color. The 'invert' argument inverts the computation of alpha values, and looks
* best when the given color is a dark.
*/
private Bitmap createGhostIcon(Drawable src, int color, boolean invert) {
int width = src.getIntrinsicWidth();