wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-3-local/7fa2af80.pub
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 flow.core.params import VehicleParams | |
from flow.controllers import IDMController, ContinuousRouter | |
from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams | |
from flow.envs.ring.accel import AccelEnv, ADDITIONAL_ENV_PARAMS | |
from flow.core.experiment import Experiment | |
from flow.networks import Network | |
from numpy import pi, sin, cos, linspace | |
vehicles = VehicleParams() |
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
# the TestEnv environment is used to simply simulate the network | |
from flow.envs import TestEnv | |
# the Experiment class is used for running simulations | |
from flow.core.experiment import Experiment | |
# all other imports are standard | |
from flow.core.params import VehicleParams | |
from flow.core.params import NetParams | |
from flow.core.params import InitialConfig |
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
# the TestEnv environment is used to simply simulate the network | |
from flow.envs import TestEnv | |
import os | |
# the Experiment class is used for running simulations | |
from flow.core.experiment import Experiment | |
# all other imports are standard | |
from flow.core.params import VehicleParams | |
from flow.core.params import NetParams |
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
diff --git a/LibCarla/source/test/common/test_streaming.cpp b/LibCarla/source/test/common/test_streaming.cpp | |
index ad4f35c3..e5183e43 100644 | |
--- a/LibCarla/source/test/common/test_streaming.cpp | |
+++ b/LibCarla/source/test/common/test_streaming.cpp | |
@@ -55,12 +55,12 @@ TEST(streaming, low_level_sending_strings) { | |
io_context_running io; | |
- Server<tcp::Server> srv(io.service, TESTING_PORT); | |
+ carla::streaming::low_level::Server<tcp::Server> srv(io.service, TESTING_PORT); |
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 <Eigen/Dense> | |
#include <iostream> | |
#include <cmath> | |
#include <vector> | |
#include <Eigen/QR> | |
void polyfit( const std::vector<double> &t, | |
const std::vector<double> &v, | |
std::vector<double> &coeff, | |
int order |
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 scipy as sp | |
import numpy as np | |
import matplotlib.pylab as pl | |
from mpl_toolkits.mplot3d import Axes3D # noqa | |
import ot | |
n_samples = 50 # nb samples | |
mu_s = np.array([0, 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
C1 = sp.spatial.distance.cdist(xs, xs) | |
C2 = sp.spatial.distance.cdist(xt, xt) | |
C1 /= C1.max() | |
C2 /= C2.max() | |
pl.figure() | |
pl.subplot(121) | |
pl.imshow(C1) | |
pl.subplot(122) |
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
p = ot.unif(n_samples) | |
q = ot.unif(n_samples) | |
gw0, log0 = ot.gromov.gromov_wasserstein( | |
C1, C2, p, q, 'square_loss', verbose=True, log=True) | |
print('Gromov-Wasserstein distances: ' + str(log0['gw_dist'])) | |
pl.figure(1, (10, 5)) | |
pl.imshow(gw0, cmap='jet') | |
pl.title('Gromov Wasserstein') | |
pl.colorbar() |
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 scanpy as sc | |
import pandas as pd | |
datafolder = "scRNAseqData/GSE146590" | |
adata = anndata.read_mtx(datafolder+'/GSM4396313_Ctrl_matrix.mtx.gz') | |
adata = adata1.T | |
adata.obs.index = pd.read_csv(datafolder+'/GSM4396313_Ctrl_barcodes.tsv.gz', header=None, index_col=0).index | |
genes = pd.read_csv(datafolder+'/GSM4396313_Ctrl_features.tsv.gz', header=None, index_col=0, sep='\t')[1].values |