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
#define VULKAN_ENABLE_LUNARG_VALIDATION | |
#include <stdarg.h> | |
#include <stdint.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_syswm.h> | |
#include <SDL2/SDL_timer.h> | |
#define VK_USE_PLATFORM_LINUX_KHR |
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 pandas as pd | |
import numpy as np | |
from typing import Dict, List, Union, Tuple, Optional | |
df1 = pd.read_parquet("smartphone_acceleration.parquet") | |
df2 = pd.read_parquet("wearable_acceleration.parquet") | |
df1.set_index("timestamp", inplace=True) | |
df2.set_index("timestamp", inplace=True) | |
df1.rename(columns={str(x) : str(x) + "_A" for x in df1.columns}, inplace=True) | |
df2.rename(columns={str(x) : str(x) + "_B" for x in df2.columns}, inplace=True) |
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
#!/bin/bash | |
if [ -e /usr/local/bin/youtube-dl ]; then | |
echo "Already installed" | |
else | |
#sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl | |
#sudo chmod a+rx /usr/local/bin/youtube-dl | |
sudo pip3 install --upgrade youtube_dl | |
fi |
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
#!/bin/bash | |
xmodmap -e "keycode 94 = at numbersign" | |
xmodmap -e "keycode 49 = less greater" |
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(CMakeParseArguments) | |
function(halide_use_image_io TARGET) | |
target_include_directories(${TARGET} PRIVATE "${HALIDE_ROOT_DIR}/tools") | |
foreach(PKG PNG JPEG) | |
# It's OK to call find_package() for the same package multiple times. | |
find_package(${PKG} QUIET) | |
if(${PKG}_FOUND) | |
target_compile_definitions(${TARGET} PRIVATE ${${PKG}_DEFINITIONS}) | |
target_include_directories(${TARGET} PRIVATE ${${PKG}_INCLUDE_DIRS}) |
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
use std::collections::HashSet; | |
use std::iter::FromIterator; | |
pub fn reduce(cycles : &Vec<Vec<usize>>, node_size : usize) -> Vec<usize> { | |
let mut set : Vec<HashSet<usize>> = cycles.iter().map(|v| HashSet::from_iter(v.iter().map(|&a| a))).collect(); | |
let mut importance : Vec<usize> = set.iter().map(|v| v.len()).collect(); | |
let mut counter = node_size; | |
let mut res = Vec::new(); | |
while counter > 0 { | |
let max_index = importance.iter().enumerate().map(|(n, &s)| (s, n)).max().unwrap().1; |
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 <chrono> | |
#include <cmath> | |
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <thread> | |
#include <vector> | |
struct light_dev { | |
virtual void set_brighness(float fraction) = 0; |