According to this issue JuliaPy/PyCall.jl#665, we should call PyCall.fixqtpath()
before plt.plot()
This file contains 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
# set element fgcolor,bgcolor | |
set titlecolor brightwhite,blue | |
set statuscolor brightwhite,green | |
set errorcolor brightwhite,red | |
set selectedcolor brightwhite,magenta | |
set stripecolor ,yellow | |
set numbercolor cyan | |
set keycolor cyan | |
set functioncolor green | |
include "/usr/share/nano/*.nanorc" |
This file contains 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 <vector> | |
#include <functional> | |
#include <numeric> | |
#include <cassert> | |
using std::vector; | |
struct Stride { | |
size_t n_dims, n_elem; | |
vector<size_t> dims; |
This file contains 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
# Maintainer: Andrew Sun <adsun701@gmail.com> | |
# Contributor: Benjamin Chretien <chretien dot b +aur at gmail dot com> | |
pkgname=casadi | |
pkgver=3.4.5 | |
pkgrel=1 | |
pkgdesc="Symbolic framework for automatic differentiation and numeric optimization" | |
arch=('i686' 'x86_64') | |
url="https://github.com/casadi/casadi" | |
license=('GPL3') |
This file contains 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 <vector> | |
#include <iostream> | |
#include <algorithm> | |
using std::cout; | |
using std::vector; | |
template <typename T> void printvec(const vector<T> &vec) { | |
cout << "{"; | |
for (const auto &v : vec) { |
This file contains 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
BasedOnStyle: LLVM | |
IndentWidth: 4 | |
SortIncludes: false |
This file contains 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 matplotlib | |
import matplotlib.pyplot as plt | |
import numpy as np | |
matplotlib.rcParams["font.family"] = "Sarasa Gothic SC" | |
plt.style.use("seaborn-poster") | |
fig, ax = plt.subplots(figsize=(15,7.5), facecolor="w", edgecolor="k") | |
fig.savefig("xx.png", dpi=300, bbox_inches="tight") |
This file contains 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 scipy.stats import multivariate_normal as multinorm | |
import numpy as np | |
mean = np.zeros(3) | |
cov = np.eye(3) | |
dist = multinorm(mean=mean, cov=cov) | |
n_samples = 1000 | |
samples = dist.rvs(size=n_samples) | |
samples.shape | |
# = (1000, 3) |
This file contains 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 <concepts> | |
template <typename T> concept CPLEXArrayLite = requires(T o) | |
{ | |
{ | |
o.getEnv() | |
} | |
->std::same_as<int>; | |
{ | |
o.getSize() |
This file contains 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 <windows.h> | |
#include <direct.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#define _OS_WINDOWS_ | |
int isabspath(const char *in) { | |
#ifdef _OS_WINDOWS_ | |
char c0 = in[0]; | |
if (c0 == '/' || c0 == '\\') { |
OlderNewer