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
/* | |
** | |
** Example of Interprocess communication in Node.js through a UNIX domain socket | |
** | |
** Usage: | |
** server> MODE=server node ipc.example.js | |
** client> MODE=client node ipc.example.js | |
** | |
*/ |
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
# 1. install java | |
# 2. install ant | |
# 3. install npm and nodejs | |
# 4. install android sdk | |
# 5. install phonegap | |
# 6. create a hello world phonegap app | |
# 7. lunch android avd(emulator) | |
# 8. run the app | |
# 9. add pluins |
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 | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
driver = webdriver.Firefox() | |
driver.get("http://www.google.com") | |
input_element = driver.find_element_by_name("q") | |
input_element.send_keys("python") |
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 python2 | |
# -*- coding: utf-8 -*- | |
from __future__ import division | |
import numpy as np | |
from math import cos, sin, pi, sqrt, atan2 | |
d2r = pi/180 | |
class Geometry(object): | |
def circle_intersection(self, circle1, circle2): |
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
<?php | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); | |
/************************************************ | |
ATTENTION: Fill in these values, or make sure you | |
have set the GOOGLE_APPLICATION_CREDENTIALS |
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
<?php | |
// apitest.php | |
// by Karl Kranich - karl.kranich.org | |
// version 3.1 - edited query section | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); |
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
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
sudo apt-get update | |
sudo apt-get install wkhtmltox | |
sudo apt-get -f install | |
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb | |
wkhtmltopdf -V | |
rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb |
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 fast_fits as extract | |
from datatypes import FitsImage, ExtractedSpectrum, Robust2D | |
import sys | |
from kivy.garden.graph import Graph, SmoothLinePlot | |
from custom_widgets import ImagePane | |
from kivy.base import runTouchApp | |
from image_arithmetic import im_divide, im_subtract | |
if __name__ == '__main__': | |
widget = ImagePane() |
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 kivy.lang import Builder | |
from kivy.uix.gridlayout import GridLayout | |
from kivy.properties import DictProperty, NumericProperty, StringProperty, \ | |
BooleanProperty, ObjectProperty | |
from operator import itemgetter | |
from kivy.uix.button import Button | |
from kivy.uix.textinput import TextInput | |
from kivy.uix.label import Label | |
Builder.load_string(""" |
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/python3 | |
import sys | |
import pyvips | |
im = pyvips.Image.new_from_file(sys.argv[1], access="sequential") | |
text = pyvips.Image.text(sys.argv[3], width=500, dpi=300, align="centre") | |
text = (text * 0.3).cast("uchar") | |
text = text.rotate(45) |