Cache service example. It uses fasthttp as an http server and bigcache as the cache.
External benchmarks are provided.
go run main.go
Server listens on 8080 port.
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
#!/usr/bin/python | |
""" | |
Script to migrate marathon tasks from the host going for maintenance | |
optional arguments: | |
-h, --help show this help message and exit | |
--url URL Marathon URL (http://marathon.example.com) | |
--hosts HOSTS Hosts going to go for maintenance |
#!/usr/bin/env bash | |
COWS_PATH="/usr/local/share/cows" | |
COW_FILES=($(ls $COWS_PATH)) | |
COWS=${#COW_FILES[@]} | |
rand_cow() { | |
#RAND_IDX=$(($RANDOM % $COWS)) | |
RAND_IDX=$((`od -vAn -N4 -tu4 < /dev/urandom` % $COWS)) |
#/bin/sh -f | |
# things to do for travis-ci in the before_install section | |
if ( test "`uname -s`" = "Darwin" ) | |
then | |
#cmake v2.8.12 is installed on the Mac workers now | |
#brew update | |
#brew install cmake | |
echo |
/* | |
* Usage: | |
* all LaTeX source files go in $rawDirectory | |
* base document to 'cook' should match content of $latexFile | |
* build script delivers resulting PDF file to $cookedDirectory | |
*/ | |
defaultTasks 'full' | |
ext { documentBase = 'myBaseLaTeXFileName' } |
package main | |
import ( | |
"log" | |
"math" | |
) | |
func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
var round float64 | |
pow := math.Pow(10, float64(places)) |
<?php | |
/* | |
+----------------------------------------------------------------------+ | |
| APC | | |
+----------------------------------------------------------------------+ | |
| Copyright (c) 2006-2011 The PHP Group | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 3.01 of the PHP license, | | |
| that is bundled with this package in the file LICENSE, and is | | |
| available through the world-wide-web at the following url: | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <cuda.h> | |
#define BLOCKS 10 | |
#define THREADS 100 | |
#define ELEMENTS_COUNT (BLOCKS*THREADS) | |
#define DATA_SIZE (ELEMENTS_COUNT * sizeof(storeElement)) | |
#define COMPRESSED_ELEMENT_SIZE 10 |
#!/bin/bash | |
#Update repositories list | |
sudo apt-get update | |
#Completely remove boost | |
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev | |
sudo rm -f /usr/lib/libboost_* | |
#Install required packages |