Skip to content

Instantly share code, notes, and snippets.

View wujun's full-sized avatar

lzwujun wujun

View GitHub Profile
@rxwen
rxwen / main.dart
Created April 11, 2020 14:09
sampe for demo flutter http slow response
import 'package:flutter/material.dart';
import 'dart:io';
import 'dart:async';
import 'dart:core';
void main() async {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@ashvayka
ashvayka / demo-tool.js
Last active August 12, 2021 12:48
Thingsboard Getting Started demo tool
var mqtt = require('mqtt');
// Don't forget to update accessToken constant with your device access token
const thingsboardHost = "demo.thingsboard.io";
const accessToken = "YOUR_DEVICE_ACCESS_TOKEN";
const minTemperature = 17.5, maxTemperature = 30, minHumidity = 12, maxHumidity = 90;
// Initialization of temperature and humidity data with random values
var data = {
temperature: minTemperature + (maxTemperature - minTemperature) * Math.random() ,
# Copyright 2014 Google Inc. All Rights Reserved.
# 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
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@nikitakit
nikitakit / tf_beam_decoder.py
Last active January 6, 2024 08:48
Tensorflow Beam Search
"""
Beam decoder for tensorflow
Sample usage:
```
from tf_beam_decoder import beam_decoder
decoded_sparse, decoded_logprobs = beam_decoder(
cell=cell,
@cescoffier
cescoffier / my-vertx-application
Last active February 26, 2018 18:52
Vert.x init.d service script
#!/bin/bash
###
# chkconfig: 345 20 80
# description: Vert.x application service script
# processname: java
#
# Installation (CentOS):
# copy file to /etc/init.d
# chmod +x /etc/init.d/my-vertx-application
@kidpixo
kidpixo / jupyter_shortcuts.md
Last active April 7, 2024 12:18
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.

Toc

Keyboard shortcuts

@ebenolson
ebenolson / draw_net.py
Created March 27, 2015 23:01
Functions to draw Lasagne networks with graphviz, like Caffe's draw_net.py
"""
Functions to create network diagrams from a list of Layers.
Examples:
Draw a minimal diagram to a pdf file:
layers = lasagne.layers.get_all_layers(output_layer)
draw_to_file(layers, 'network.pdf', output_shape=False)
Draw a verbose diagram in an IPython notebook:
@staltz
staltz / introrx.md
Last active May 18, 2024 05:17
The introduction to Reactive Programming you've been missing
@jaderberg
jaderberg / gputest.lua
Created September 4, 2013 12:40
GPU Torch Benchmark
-- Max Jaderberg 4/9/13
-- GPU Effectiveness test
require 'torch'
require 'sys'
require 'nn'
require 'xlua'
cmd = torch.CmdLine()
cmd:text()
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 19, 2024 13:25
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname