conda create -n this_env
source activate this_env
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
// run on ROOT 6.28+ built with -Droofit_multiprocess=ON | |
// root -l demo.cpp | |
// or call `demo(YOUR FAVORITE NUMBER OF CPUS)` inside root | |
#include "RooWorkspace.h" | |
#include "RooAbsPdf.h" | |
#include "RooDataSet.h" | |
#include "RooMinimizer.h" | |
void demo(int number_of_workers = 2) |
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
import pandas as pd | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
data = pd.read_csv('google_api_frame_dec6.csv') | |
# We can look at unique labels for each video, or take into account that | |
# labels may occur multiple times in a single video (in different frames | |
# for instance). In this dataset, there are no separate frames, the labels | |
# are already unique, so this will work. In case there is per frame data | |
# for each video, groupby+unique should be replaced by something like |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
struct plan_pkg { | |
unsigned N1, N2, N3; | |
ULONG N; | |
ULONG Nhalf; | |
complex_prec *C; | |
real_prec *R; | |
#ifdef SINGLE_PREC | |
fftwf_plan plan; | |
#endif | |
#ifdef DOUBLE_PREC |
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 <complex> | |
#include <iostream> | |
template <typename T> using real_t = T; | |
template < typename precision, template <typename> class input_t, template <typename> class output_t > | |
void do_stuff(input_t<precision> a, output_t<precision> b) { | |
std::cout << a + b << std::endl; | |
} |
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
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
def remove_text(figure): | |
figure.suptitle("") | |
for ax in figure.get_axes(): | |
ax.set_title("") | |
ax.xaxis.set_major_formatter(mpl.ticker.NullFormatter()) | |
ax.xaxis.set_minor_formatter(mpl.ticker.NullFormatter()) |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import collections | |
import networkx as nx |