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
var spooky = new Spooky({ | |
child: { | |
transport: 'http' | |
}, | |
casper: { | |
logLevel: 'debug', | |
verbose: true, | |
pageSettings: { | |
loadImages: true, // The WebPage instance used by Casper | |
loadPlugins: false, // use these settings |
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 selenium import webdriver | |
driver = webdriver.Firefox() | |
driver.get('https://www.facebook.com/') | |
with open('jquery-1.9.1.min.js', 'r') as jquery_js: | |
jquery = jquery_js.read() #read the jquery from a file | |
driver.execute_script(jquery) #active the jquery lib | |
driver.execute_script("$('#email').text('anhld')") |
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 python | |
from pyvirtualdisplay import Display | |
from selenium import webdriver | |
display = Display(visible=0, size=(800, 600)) | |
display.start() | |
# now Firefox will run in a virtual display. | |
# you will not see the browser. |
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 requests | |
r = requests.get(r'http://jsonip.com') | |
ip= r.json()['ip'] | |
print 'Your IP is', ip |
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
$ sudo yum install rubygems | |
$ sudo yum install gcc-c++ | |
$ sudo yum install ruby-devel | |
$ sudo gem install less | |
$ sudo gem install therubyracer | |
$ lessc yourLessFile.less > yourCssFile.css |
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
# Modify file /etc/nginx/sites-enabled/default | |
server { | |
listen 80; | |
server_name data.com; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; |
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 org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.vertx.java.core.Handler; | |
import org.vertx.java.core.Vertx; | |
import org.vertx.java.core.VertxFactory; | |
import org.vertx.java.core.buffer.Buffer; | |
import org.vertx.java.core.http.HttpServerRequest; | |
import org.vertx.java.core.http.RouteMatcher; | |
import java.io.IOException; |
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 cc.mallet.pipe.Input2CharSequence; | |
import cc.mallet.pipe.Pipe; | |
import cc.mallet.pipe.SerialPipes; | |
import cc.mallet.types.Instance; | |
import cc.mallet.types.SingleInstanceIterator; | |
import cc.mallet.types.TokenSequence; | |
import vn.hus.nlp.tokenizer.VietTokenizer; | |
import vn.viettel.cyberspace.commons.Utils; | |
import java.io.*; |
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
group 'TeeRunner' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'java' | |
apply plugin: 'application' | |
sourceSets.main.java.srcDirs = ['src'] | |
mainClassName = "com.bigsonata.tee.Runner" | |
sourceCompatibility = 1.5 | |
repositories { |
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
conda create -n python2 python=2.7 anaconda | |
source activate python2 |
OlderNewer