Skip to content

Instantly share code, notes, and snippets.

View masayang's full-sized avatar

Masa Nakamura masayang

View GitHub Profile
@masayang
masayang / D-Wave
Created January 5, 2015 07:45
TD D-Wave for StockFinder
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:TD D-Wave
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
Static Wave As Integer
Static MinA As Single
@masayang
masayang / H.csv
Created February 17, 2015 07:12
timestamps of H's tweets as well as Y's tweets
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
2015-02-14 11:33:06
2015-02-14 11:29:04
2015-02-14 11:25:04
2015-02-14 09:46:53
2015-02-14 09:40:55
2015-02-14 09:31:07
2015-02-14 09:09:58
2015-02-14 08:51:48
2015-02-14 08:48:22
2015-02-14 08:46:36
import logging
from pylons import config, request, response, session, tmpl_context as c
from pylons.controllers.util import abort, redirect_to, url_for
from rpxclock.lib.base import BaseController, render
log = logging.getLogger(__name__)
import urllib2
from sforce.enterprise import SforceEnterpriseClient
h = SforceEnterpriseClient('/home/user/.conf/enterprise.wsdl.xml')
h.login('user1@yourdomain.com', 'password', 'securitytoken')
lead = h.generateObject('Lead')
lead.FirstName = 'Masayoshi'
lead.LastName = 'Nakamura'
lead.Company = 'Masasushi, Inc.'
lead.Email = 'masayang@hogehogehoge.com'
result = h.create(lead)
@masayang
masayang / Git練習用.txt
Created October 4, 2012 23:08
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
Git練習用
@masayang
masayang / indent.py
Created October 5, 2012 00:23
インデント重要
sum = 0
for i in range(1, 11):
sum = sum + i
print sum
@masayang
masayang / virtualenv.sh
Created October 5, 2012 01:48
Virtualenv
$ source virtualenvwrapper.sh
$ lsvirtualenv
bootcamp1
$ workon bootcamp1
(bootcamp1)$ lssitepackages
dateutil pylab.pyc
easy-install.pth pytz
matplotlib scikit_learn-0.12-py2.7.egg-info
matplotlib-1.1.1-py2.7.egg-info scipy
mpl_toolkits scipy-0.11.0-py2.7.egg-info
@masayang
masayang / classes.py
Created October 5, 2012 01:35
関数とクラス
class Stuffy(object):
def __init__(self, s = None):
self.buffer = s
def eek(self):
return self.buffer
if __name__ == '__main__':
s1 = Stuffy(10)
s2 = Stuffy(20)
@masayang
masayang / module.py
Created October 5, 2012 01:39
モジュールの使い方例
import sys
if __name__ == '__main__':
print sys.argv
@masayang
masayang / Iris.txt
Created October 6, 2012 02:12
Ggobiの導入とIrisデータセットの取得
Irisデータセットの取得
Shellから
$ wget http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data
GUIから
ブラウザで http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data を開き、データをダウンロード