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 <papi.h> | |
#define NUM_EVENTS 1 | |
int main ( int argc, char ** argv ) { | |
int Events[NUM_EVENTS] = {PAPI_TLB_DM}; //Data TLB misses | |
<your code> | |
PAPI_read_counters(values, NUM_EVENTS); |
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
# https://github.com/jiaaro/pydub | |
from pydub import AudioSegment | |
files_path = '' | |
file_name = '' | |
startMin = 9 | |
startSec = 50 |
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
// g++ -std=c++11 testTimer.cpp -o testTimer.out | |
// ./testTimer.out | |
#include <iostream> | |
#include <chrono> | |
#include <ctime> | |
long fibonacci(unsigned n) | |
{ | |
if (n < 2) return n; |
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
g++ -E helloworld.cpp > helloworld.txt |
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 "misc/TaskTimer.hpp" | |
{ | |
timer.start(); | |
// CODE here | |
if (!mpi_rank()) | |
cout << "# time = " << timer.elapsed() << endl; |
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
brew install mongodb | |
mkdir -p /Users/gichavez/Documents/Github/data | |
echo "mongod --dbpath=/Users/gichavez/Documents/Github/data --nojournal" > mongod | |
chmod a+x mongod | |
./mongod |
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
conda info --envs | |
conda create --name mongo_py_env | |
source activate mongo_py_env | |
source deactivate | |
conda install <package> | |
conda install pymongo |
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 pymongo import MongoClient | |
import datetime | |
from datetime import timedelta | |
import pprint | |
client = MongoClient('mongodb://localhost:27017/') | |
db = client['demodb'] | |
collection = db['test_collection'] |
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
<html> | |
<header> | |
<title>Form with bootstrap</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<style> | |
body {background-color: #ddd;} | |
strong { font-size: 1.3em; } |
OlderNewer