Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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::time::Instant; | |
use std::fs::File; | |
use std::io::{self, prelude::*, BufReader}; | |
let file = File::open("examples/WDC_tickbidask.csv")?; | |
let mut reader = BufReader::new(file); | |
let mut line = String::new(); | |
let mut lines = 0; | |
let start = Instant::now(); | |
while reader.read_line(&mut line).unwrap() > 0 { |
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 sklearn | |
import numpy as np | |
import math | |
import pickle | |
import collections | |
class DGA: | |
def __init__(self): | |
self.model = { 'clf': pickle.loads(open('./dga_model_random_forest.model','rb').read()) | |
, 'alexa_vc': pickle.loads(open('./dga_model_alexa_vectorizor.model','rb').read()) | |
, 'alexa_counts': pickle.loads(open('./dga_model_alexa_counts.model','rb').read()) |
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
#!/usr/bin/env bash | |
touch build.sbt ; touch README.md; mkdir -p project; touch project/plugins.sbt; mkdir -p src/{main/{scala,resources,java},test/{scala,resources,java}}/ |
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 javax.crypto.Cipher; | |
class Test { | |
public static void main(String[] args) { | |
try { | |
System.out.println("Hello World!"); | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
System.out.println(maxKeyLen); | |
} catch (Exception e){ | |
System.out.println("Sad world :("); |