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
Usage: rpm [OPTION...] | |
Query/Verify package selection options: | |
-a, --all query/verify all packages | |
-f, --file query/verify package(s) owning file | |
-g, --group query/verify package(s) in group | |
-p, --package query/verify a package file | |
--pkgid query/verify package(s) with package identifier | |
--hdrid query/verify package(s) with header identifier | |
--triggeredby query the package(s) triggered by the package |
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 <sys/types.h> | |
#include <sys/param.h> | |
#include <sys/kernel.h> | |
#include <sys/module.h> | |
#include <sys/errno.h> | |
#include <sys/systm.h> | |
#include <sys/conf.h> | |
#include <sys/uio.h> | |
static d_open_t hello_open; |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
"encoding/json" | |
"strconv" | |
"sync" | |
) |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"encoding/json" | |
) | |
func main() { | |
req, _ := http.NewRequest("GET", "https://api.clever.com/v1.1/sections", nil) |
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
#define PACKAGE "bfd_test" | |
#include <iostream> | |
#include <bfd.h> | |
int main(int argc, char** argv) | |
{ | |
if (argc == 1) | |
{ | |
std::cout << "Lack input file!\n"; | |
return 1; |
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
/* compile: | |
* /opt/cuda/bin/nvcc -ccbin g++ -gencode=arch=compute_60,code=sm_60 -std=c++11 -O3 -I/usr/local/nccl/include/ -L/opt/cuda/lib64 -lcudart -lrt -L/usr/local/nccl/lib -lcurand -lnccl -lnvToolsExt -o nccl_ex nccl_ex.cu | |
*/ | |
#include "nccl.h" | |
#include <stdio.h> | |
#define GPU_COUNT (4) | |
#define CUDACHECK(cmd) do { \ |
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 <stdio.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
#define CPU_NUM (104) | |
#define LOOP_NUM (100) | |
#define ARRAY_SIZE (CPU_NUM * LOOP_NUM) | |
double a[ARRAY_SIZE], b[ARRAY_SIZE], c[ARRAY_SIZE]; |
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
A non-maskable interrupt (NMI) is an interrupt type which differs from standard interrupt mechanism by enforcing attention from the interrupt processor (usually the CPU). This solution discusses an NMI is in more depth and how they are handled. | |
### What is an Interrupt ? ### | |
Modern systems architecture has created tightly coupled connect between system components. Work for components can be handed off to a component for completion. Rather than wait for the component the main CPU can be tasked to do other pending work. | |
When the component has completed its work it will raise a signal to the main processor. The main processor considers this signal an "interrupt", as the current work on the CPU will be interrupted immediately Each component has a number assigned to it. | |
### Why "mask" an interrupt ? ### |
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 <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
int main() | |
{ | |
const std::string meminfo_file("/proc/meminfo"); | |
std::ifstream ifs(meminfo_file); |
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
# If you're looking into the C10M problem (10 million concurrent connections) | |
# you might want to play with DPDK (Originally proprietry Intel, now open source) | |
# | |
# C10M: http://c10m.robertgraham.com/ | |
# DPDK: http://dpdk.org/ | |
# | |
# This is a quick summary how to install dpdk on ubuntu | |
# running inside virtualbox on a mac | |
# On my Mac: |
OlderNewer