Activates a service immediately:
systemctl start foo.serviceDeactivates a service immediately:
| # Use this script to test that your Telegram bot works. | |
| # | |
| # Install the dependency | |
| # | |
| # $ gem install telegram_bot | |
| # | |
| # Run the bot | |
| # | |
| # $ ruby bot.rb | |
| # |
Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
| import numpy as np | |
| from statsmodels.regression.linear_model import OLS | |
| from statsmodels.tsa.tsatools import lagmat, add_trend | |
| from statsmodels.tsa.adfvalues import mackinnonp | |
| def adf(ts): | |
| """ | |
| Augmented Dickey-Fuller unit root test | |
| """ | |
| # make sure we are working with an array, convert if necessary |
| // Doing the operation: | |
| // | |
| // | a a a a | | y | | |
| // x * A * y = [ x x x x ] | a a a a | | y | | |
| // | a a a a | | y | | |
| // | a a a a | | y | | |
| // | |
| // with SIMD intrinics (specifically AVX). | |
| // | |
| // adapted from https://gist.github.com/rygorous/4172889 |
| #include <stdio.h> | |
| #include <gmmintrin.h> | |
| // x4 ~ x0 must have either value 0 or 1. | |
| #define MM256_SHUFFLE(x3, x2, x1, x0) \ | |
| ((x3 << 3) | (x2 << 2) | (x1 << 1) | (x0)) | |
| void | |
| test() | |
| { |
| #include <iostream> | |
| #include <immintrin.h> | |
| inline void transpose_kernel(double *A, int lda, double *B, int ldb) { | |
| __m256d row0, row1, row2, row3; | |
| row0 = _mm256_load_pd(A + 0 * lda); | |
| row1 = _mm256_load_pd(A + 1 * lda); | |
| row2 = _mm256_load_pd(A + 2 * lda); | |
| row3 = _mm256_load_pd(A + 3 * lda); |
| //---------------------------------------------------------------------- | |
| #include <stdio.h> | |
| #include <emmintrin.h> | |
| #include <immintrin.h> | |
| //---------------------------------------------------------------------- | |
| void | |
| printm256(__m256d r){ | |
| double *a = (double*)(&r); | |
| printf("%f %f %f %f\n",a[0],a[1],a[2],a[3]); | |
| } |
| /* | |
| * A simple libpng example program | |
| * http://zarb.org/~gc/html/libpng.html | |
| * | |
| * Modified by Yoshimasa Niwa to make it much simpler | |
| * and support all defined color_type. | |
| * | |
| * To build, use the next instruction on OS X. | |
| * $ brew install libpng | |
| * $ clang -lz -lpng16 libpng_test.c |
This is a comparison of the different formatting styles including with clang-format.
Generated via:
styles=( LLVM Google Chromium Mozilla WebKit )
for style in $styles
do
clang-format -style=$style ChLcpIterativeAPGD.h > ChLcpIterativeAPGD.$style.h
done