Skip to content

Instantly share code, notes, and snippets.

View settinghead's full-sized avatar

Xiyang Chen settinghead

View GitHub Profile
@sorrycc
sorrycc / loop.txt
Created March 7, 2026 14:31
/loop command implementation analysis in Claude Code 2.1.71
/loop — Detailed Implementation in versions/2.1.71/cli.js
Overview
/loop is a slash command (skill) that schedules a prompt to run on a recurring
interval. It is syntactic sugar over the internal Kairos Cron scheduling
system (CronCreate / CronDelete / CronList tools).
---
@Grsmto
Grsmto / react-table.d.ts
Created March 6, 2019 12:59
React Table v7 TS typings definition
// Type definitions for react-table 7
// Project: https://github.com/tannerlinsley/react-table#readme
// Definitions by: Grsmto <https://github.com/grsmto>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
declare module 'react-table' {
export type Cell = {
render: (type: string) => any;
getCellProps: () => any;
column: Column;
/*
* Usage:
* <PopoverStickOnHover
* component={<div>Holy guacamole! I'm Sticky.</div>}
* placement="top"
* onMouseEnter={() => { }}
* delay={200}
* >
* <div>Show the sticky tooltip</div>
* </PopoverStickOnHover>
@aleksandar-babic
aleksandar-babic / nginx-vhost.conf
Created June 20, 2018 09:20
Wordpress behind NGINX reverse proxy
location /blog/ {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass https://test-blog.bitstarz.com/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
@crypticmind
crypticmind / README.md
Last active August 23, 2025 10:36
Setup lambda + API Gateway using localstack
@mvsusp
mvsusp / keras_embeddings.py
Created February 28, 2018 04:19
keras_embeddings
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import print_function
import sys
import numpy as np
import os
import tensorflow as tf
@richardxiong
richardxiong / Nvidia GTX 1080 Ti on MacBook Pro (Akitio Node) with TF.md
Last active November 15, 2023 23:19
Setup Nvidia GPU [GTX 1080 ti] + CUDA 8.0 on MacBook for Deep Learning
pragma solidity ^0.4.0;
import "SafeMath.sol";
import "IERC20Token.sol";
/**
* @dev Implements a capped token sale using a second-price auction.
*
* @author Nick Johnson <arachnid@notdot.net>
*
/**
* Johannes Zweng <john@zweng.at>, 2017
*
* This simple script just loads the 2 bancor contracts (Crowdsale and BNT Token)
* into the geth client and then provides a single status function which you
* can call on the geth console to query the current status of the crowdsale.
*
* Usage:
* ------
* 1) Start geth instance
@spitis
spitis / bnlstm.py
Created February 2, 2017 03:05
Batch normalized LSTM Cell for Tensorflow
"""adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state"""
import tensorflow as tf, numpy as np
RNNCell = tf.nn.rnn_cell.RNNCell
class BNLSTMCell(RNNCell):
'''Batch normalized LSTM as described in arxiv.org/abs/1603.09025'''
def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95):
"""
* max bn steps is the maximum number of steps for which to store separate population stats
"""