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
rm -rf build | |
mkdir build | |
cd build | |
cmake \ | |
-G "Unix Makefiles" \ | |
-D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D CUDA_FAST_MATH=1 \ | |
-D WITH_CUBLAS=1 \ |
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
cmake_minimum_required(VERSION 3.5) | |
project(Test) | |
set(the_target "Test") | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
# CUDA | |
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/cuda" ${CMAKE_MODULE_PATH}) | |
FIND_PACKAGE(CUDA) | |
LIST(APPEND CUDA_NVCC_FLAGS "-arch=compute_30") |
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
from django import forms | |
class PersonForm(forms.Form): | |
name = forms.CharField(required=True) | |
## Initial data = valid | |
f = PersonForm({'name': 'Alex'}) | |
f.is_valid() |
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
aws_security_group.worker | |
2015/05/28 11:48:42 [TRACE] Graph after step *terraform.RootTransformer: | |
aws_security_group.worker | |
2015/05/28 11:48:42 [DEBUG] vertex root.mymodule.aws_security_group.worker: walking | |
* DependencyViolation: resource sg-api has a dependent object | |
2015/05/28 11:48:42 [DEBUG] vertex root.mymodule.aws_security_group.worker: evaluating | |
2015/05/28 11:48:42 [DEBUG] root.mymodule: eval: *terraform.EvalSequence | |
2015/05/28 11:48:42 [DEBUG] root.mymodule: eval: terraform.EvalNoop |
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
// Replace outline with box-shadow | |
// because it was wrapping around after psudo element border | |
outline: 0 | |
// white rectangle inside grey rectangle | |
// 2px offset down to center | |
// 1px blur | |
box-shadow: 0 2px 1px 3px white, 0 2px 1px 6px rgba(119, 119, 119, 0.4) |
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
::-webkit-scrollbar | |
width: 10px | |
height: 10px | |
::-webkit-scrollbar-thumb | |
background-color: rgba(50,50,50,.25) | |
border: 2px solid transparent | |
border-radius: 10px | |
background-clip: padding-box |
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
from gensim.models import Phrases | |
from nltk.tokenize import word_tokenize | |
creed = """This is my rifle. There are many like it, but this one is mine. | |
My rifle is my best friend. It is my life. I must master it as I must master my life. | |
My rifle, without me, is useless. Without my rifle, I am useless. I must fire my rifle true. I must shoot straighter than my enemy who is trying to kill me. I must shoot him before he shoots me. I will... | |
My rifle and I know that what counts in war is not the rounds we fire, the noise of our burst, nor the smoke we make. We know that it is the hits that count. We will hit... | |
My rifle is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its parts, its accessories, its sights and its barrel. I will keep my rifle clean and ready, even as I am clean and ready. We will become part of each other. We will... | |
Before God, I swear this creed. My rifle and I are the defenders of my country. We are the masters of our ene |
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
(function($) { | |
$.fn.textfill = function(maxFontSize) { | |
maxFontSize = parseInt(maxFontSize, 10); | |
return this.each(function(){ | |
var ourText = $("span", this), | |
parent = ourText.parent(), | |
maxHeight = parent.height(), | |
maxWidth = parent.width(), | |
fontSize = parseInt(ourText.css("fontSize"), 10), | |
multiplier = maxWidth/ourText.width(), |
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
d3.select('#path4').node().getTotalLength() |