Instantly share code, notes, and snippets.

View gist:a34a24cc3abc79ae783dc657d70c93e3
// game.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <cstdlib>
#include <time.h>
using namespace std;
View gist:819fd94c4cc32950831aa02472641dc4

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
View gist:e832b7570559f228bd7fcec73c83cd6c
from __future__ import absolute_import, division, print_function
import numpy as np
import tensorflow as tf
from tensorflow.contrib.layers import xavier_initializer
def cos_loss(x, y, emb_dim, num_classes, s=30, m=0.35, scope=None):
"""
Large margin cosine loss from CosFace (https://arxiv.org/abs/1801.09414)
"""
View gpx_to_html_map.py
import glob
import gpxpy
import folium
points = []
# create map
my_map = folium.Map(location=[38.2586, 137.6850], zoom_start=6)
# add map tiling options
folium.TileLayer('Mapbox Bright').add_to(my_map)
folium.TileLayer('cartodbdark_matter').add_to(my_map)
View books2sell.org

売却待ちの理工書リスト

実家で親の蔵書を整理していく中で、程度のよさそうなものをいくつかピックアップして、中古で買うぜって人がいればとっておきますよー、というリストです

すでに結構な量を処理していますが、残っているものの分野はおおむね、

  • 数学、物理、その他自然科学
  • 組み込み開発 (PIC,ラズパイ,ARM,電子工作など……。CQ出版社率高め)

あたりです

想定していること

View magicalList.py
'''
Given a list of numbers, the following operation is performed when the list is folded
into half.
Ex: if numbers are 3 14 15 9 26 53 5
step 1> (3+5) (14+53) (15+26) 9
List: 8 67 41 9
step 2> (8+9) (67+41)
List: 17 108
step 3> (17+108)
List: 125
View .lldbinit
command regex xc 's/(.*)?-op(.*)/ exp -l objc %2 -- %1/' 's/(.*)/ exp -l objc -- %1/'
command regex xoc 's/(.*)?-op(.*)/ exp -l objc -O %2 -- %1/' 's/(.*)/ exp -l objc -O -- %1/'
command regex xs 's/(.*)?-op(.*)/ exp -l swift %2 -- %1/' 's/(.*)/ exp -l swift -- %1/'
command regex xos 's/(.*)?-op(.*)/ exp -l swift -O %2 -- %1/' 's/(.*)/ exp -l swift -O -- %1/'
command regex vinfo 's/\(\((\w+)\.([a-zA-Z_0-9]+)\s\*\)(\w+?)\)/exp -l swift -- unsafeBitCast(%3,to:%1.%2.self);/' 's/\(\(([a-zA-Z_0-9]+)\s\*\)(\w+?)\)/exp -l objc++ -- *(%1 *)%2/'
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View commands-for-sakurafrost225.md

shigebot 2.1

by Franc[e]sco/lolisamurai

Available commands for channel #sakurafrost225 (+ = mod only):

  • +!cmdadd command_name command_text
  • +!cmdremove command_name
  • +!cmdedit command_name new_command_text
  • +!modonly command_name yes/no
View printARG.awk
#! /usr/bin/awk -f
BEGIN {
for(i = 1; i < ARGC; i++){
print ARGV[i]
}
}