This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <thread> | |
#include <atomic> | |
#include <unistd.h> | |
#include <mutex> | |
std::atomic<bool> end_flag = false; | |
std::atomic<bool> out_flag = false; | |
std::atomic<double> current_time = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
template <class T> | |
class Node | |
{ | |
public: | |
Node(T value_, Node *parent_ = nullptr) : value(value_), parent(parent_) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def merge(left, right) | |
merged = [] | |
first_index = 0 | |
second_index = 0 | |
while first_index < left.length || second_index < right.length | |
if first_index == left.length | |
merged << right[second_index] | |
second_index += 1 | |
next | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
#include <cmath> | |
template<typename T, typename U, size_t DATA_NUM> | |
using dataType = std::array<std::pair<T, U>, DATA_NUM>; | |
template<typename Array = std::array<double, 2>> | |
using Array = Array; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const twitter = require('twitter'); | |
const redis = require('redis'); | |
class RedisClient { | |
constructor() { | |
this.client = redis.createClient(); | |
this.key = "medium"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Convolution2D, MaxPooling2D | |
from keras.layers import Dense, Dropout, Flatten | |
from keras.utils import np_utils | |
from keras.datasets import mnist | |
from keras.callbacks import TensorBoard | |
import keras.backend.tensorflow_backend as KTF | |
import tensorflow as tf | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Activation | |
from keras.layers.recurrent import LSTM | |
from keras.utils import np_utils | |
from keras.callbacks import ModelCheckpoint | |
from sklearn.model_selection import train_test_split | |
from sklearn import preprocessing | |
import GPy, GPyOpt | |
import pandas as pd | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the server logic of a Shiny web application. You can run the | |
# application by clicking 'Run App' above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the user-interface definition of a Shiny web application. You can | |
# run the application by clicking 'Run App' above. | |
# | |
# Find out more about building applications with Shiny here: | |
# | |
# http://shiny.rstudio.com/ | |
# | |
library(shiny) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Z <- sqrt(input$dispersion)*sqrt(-2*log(runif(sample)))*cos(2*pi*runif(sample))+input$mean |