Skip to content

Instantly share code, notes, and snippets.

View rnd-forests's full-sized avatar

Vinh Nguyen rnd-forests

View GitHub Profile
@rnd-forests
rnd-forests / gradient_clipping.py
Created October 26, 2017 08:19
Gradient Clipping
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
n_inputs = 784
n_hidden1 = 300
n_hidden2 = 50
n_hidden3 = 50
n_hidden4 = 50
n_hidden5 = 50
n_outputs = 10
@rnd-forests
rnd-forests / batch_normalization.py
Created October 26, 2017 08:38
Batch Normalization
import numpy as np
import tensorflow as tf
from datetime import datetime
from functools import partial
from tensorflow.examples.tutorials.mnist import input_data
n_inputs = 784
n_hidden1 = 300
n_hidden2 = 100
n_outputs = 10
<?php
namespace Framgia\Viblo\Components\Ml;
use Framgia\Viblo\Exceptions\TokenException;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Config\Repository as Config;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Support\Facades\Log;
package subscriptions
import (
"strings"
"time"
"bitbucket.org/uiza-team/uiza-billing-api-server/internal/contracts"
"bitbucket.org/uiza-team/uiza-billing-api-server/internal/dispatcher"
"bitbucket.org/uiza-team/uiza-billing-api-server/internal/dispatcher/events"
stripedtos "bitbucket.org/uiza-team/uiza-billing-api-server/internal/dtos/payment/stripe"
@rnd-forests
rnd-forests / script.js
Created August 8, 2023 02:25
K6 sample constant rate
import http from 'k6/http';
import { sleep, check } from 'k6';
function hitAPIWithRate(config) {
const {
baseUrl,
endpoint,
method, // Only support GET and POST for now...
data,
requestsPerHour,