Skip to content

Instantly share code, notes, and snippets.

@MSAdministrator
MSAdministrator / iranian_apit_groups_possible_commands.md
Last active April 10, 2024 14:30
Iranian APT Groups & Possible Commands Used By These Groups

Overview

The following content is generated using a preview release of Swimlane's pyattck.

This snippet of data is scoped to the following actor groups:

  • APT33
  • APT34
  • APT39
  • Charming Kitten
@cpsievert
cpsievert / europe.R
Last active December 1, 2017 23:05 — forked from halhen/europe.R
library(tidyverse)
library(plotly)
# I'm being lazy, please don't do this
# setwd("~/Downloads/Version 2_0_1/")
d <- read_csv('GEOSTAT_grid_POP_1K_2011_V2_0_1.csv') %>%
rbind(read_csv('JRC-GHSL_AIT-grid-POP_1K_2011.csv') %>%
mutate(TOT_P_CON_DT = '')) %>%
mutate(

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer

@johnmccabe
johnmccabe / gist_tag.rb
Created January 26, 2016 22:12 — forked from imathis/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers. [Working as of 26/01/2016]
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
from datetime import datetime, timedelta
import urllib
import re
from lxml.html import fromstring
from cssselect import GenericTranslator, SelectorError
import os
import json
base_url = 'http://apims.doe.gov.my/v2/'
HOURS = {
@awreece
awreece / perf_post_process.sh
Last active August 29, 2015 14:27
[WORK IN PROGRESS] automatically generate latency graphs
#!/bin/bash
#
# Generates a "latency heat map", showing both on-CPU and off-CPU stacks. In addition,
# attempts to color code on-CPU based on CPI by diffling the on-CPU stacks sampled
# at ~1000 Hz and every ~3e6 instructions. Intuitively, if a stack is more common in
# frequency stacks than in count stacks, than it represents a "slower" stack.
#
perf_data_dir=$1
dest_dir=$2
@robcowie
robcowie / spark_notes.md
Last active April 11, 2022 22:30
Apache Spark Notes

Install Apache Spark (OSX)

$ brew install apache-spark

Run the Spark python shell

A python shell with a preconfigured SparkContext (available as sc). It is

@thvasilo
thvasilo / TestNgrams.scala
Created March 23, 2015 11:09
Simple job to ensure LZO compressed Google Ngrams data can be read
import org.apache.spark._
import org.apache.spark.SparkContext._
import org.apache.spark.rdd.RDD
import scala.util.Random
import java.io._
import java.util.Properties
import org.apache.hadoop.fs._;
import org.apache.hadoop.conf._;
import org.apache.hadoop.io._;
@cszang
cszang / build_adv-r.R
Created February 20, 2015 12:16
Build Advanced R Book as Epub.
## we need the libraries bookdown, knitr, inline, markdown, pryr
system("git clone https://github.com/hadley/adv-r.git")
setwd("adv-r")
library(knitr)
embed_png <- bookdown:::embed_png
rmds <- list.files(pattern = "^.*rmd$")
sapply(rmds, function(x) knit(x))
cat("---\ntitle: Advanced R\nauthor: Hadley Wickham\nlanguage: en-US\n...\n",
file = "front_matter.txt")
## assuming we installed pandoc via cabal