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
using System; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Diagnostics.CodeAnalysis; | |
using System.IO; | |
using System.Net.Http; | |
using System.Net.Http.Formatting; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http.ModelBinding; |
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
$(document).ready(function() { | |
console.log("Ready!"); | |
}); | |
$("#target").submit(function(event){ | |
event.preventDefault(); | |
}); | |
function parseBuffer(key, buffer){ | |
var index = buffer.indexOf(key); |
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
CREATE | |
ALGORITHM = UNDEFINED | |
DEFINER = `rt_user`@`localhost` | |
SQL SECURITY DEFINER | |
VIEW `TicketBaseProperties` AS | |
SELECT | |
`t`.`id` AS `TicketId`, | |
`q`.`id` AS `QueueId`, | |
`q`.`Name` AS `Queue`, | |
`t`.`Owner` AS `OwnerId`, |
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
Show hidden characters
[ | |
{"keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/User/insert-date.sublime-macro"}} | |
] |
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
SELECT sysobjects.Name, sysindexes.Rows | |
FROM sysobjects | |
INNER JOIN sysindexes ON sysobjects.id = sysindexes.id | |
WHERE type = 'U' | |
AND sysindexes.IndId < 2 | |
-- AND sysobjects.name LIKE 'SOMENAME_%' | |
ORDER BY sysindexes.Rows DESC |
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
DECLARE @search VARCHAR(1000) | |
SET @search = '%friendly%' | |
SELECT v.name, c.[Text] | |
FROM dbo.sysobjects AS v | |
INNER JOIN dbo.syscomments c ON c.id = v.id | |
AND CASE WHEN c.Number > 1 THEN c.Number | |
ELSE 0 END = 0 | |
WHERE v.type = 'V' AND c.[Text] LIKE '%' + @search + '%' |
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
DECLARE @find VARCHAR(1000) | |
SET @find = '%search string%' | |
SELECT | |
sp.name, | |
ISNULL(smsp.definition, ssmsp.definition) AS [Definition] | |
FROM | |
sys.all_objects AS sp | |
LEFT OUTER JOIN sys.sql_modules AS smsp ON smsp.object_id = sp.object_id | |
LEFT OUTER JOIN sys.system_sql_modules AS ssmsp ON ssmsp.object_id = sp.object_id |
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
# Written by Adam Acosta | |
randomProjection <- function(A, k) { | |
if (!is.matrix(A)) { | |
tmp <- as.matrix(A) | |
} else { | |
tmp <- A | |
} | |
p <- ncol(tmp) | |
set.seed(as.numeric(format(Sys.time(), '%S'))) | |
R <- matrix(data = rnorm(k), nrow = k, ncol = p) |
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
library(MDPtoolbox) | |
library(Matrix) | |
library(ggplot2) | |
library(grid) | |
library(gridExtra) | |
library(doMC) | |
cores <- detectCores() - (detectCores() / 2) / 2 | |
registerDoMC(cores=cores) | |
set.seed(1234) |
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
#!/bin/bash | |
# 1. Install CUDA | |
echo "Installing CUDA..." | |
# Only install if CUDA is not already installed. | |
if ! dpkg-query -W cuda; then | |
# The 16.04 installer works with 16.10. | |
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb | |
apt-get update | |
apt-get install cuda -y |