Skip to content

Instantly share code, notes, and snippets.

@ferayebend
ferayebend / csv2wordl.py
Created February 10, 2012 13:52
kok verisi bulunan csvleri wordl'a yollar (cakma yontemler reloaded) (stemming şuradan http://nlp.ceng.fatih.edu.tr/~metinanaliz/ )
import webbrowser
import sys
def send2wordl(text):
result_file_name = "/tmp/hede.html"
result_file = open(result_file_name, "w")
html_template = """
<form action="http://www.wordle.net/advanced" method="POST">
@ferayebend
ferayebend / KAT.py
Last active December 13, 2016 12:14
KAT versiyon -0.1 (kaypakkaya analiz toolkit)
#!/usr/bin/jython
# -*- coding: utf-8 -*-
import sys
import os
import java.lang.System.out
import java.util.Arrays
import java.util.List
sys.path.append('~/social_data/zemberek2src/jar/zemberek-tr-2.1.1.jar')
#bideb arastirmaci destekleri
#yil harcama(milyon tl)
2003 4.9
2004 5.3
2005 12.3
2006 24.3
2007 58.1
2008 69.9
2009 69.2
2010 65.1
@ferayebend
ferayebend / list_objects_short.txt
Created March 15, 2013 18:55
mine ESO instrument simulator
#Name V RA DEC Paper
WD0030+44 16.59 00 33 02.78 +44 44 13.2 Zhao et al.(2012)
WD0315-011 10.03 03 18 25.0 -00 55 12 Catalan et al. (2008)
WD0413-077 9.50 04 15 21.786 -07 39 29.22 40 EriB Catalan et al. (2008) Zhao et al.(2012)
WD0615-591 14.09 06 16 14.26 -59 12 27.5 Zhao et al.(2012)
WD0642-285 15.2 06 44 28.727 -28 32 37.99 Zhao et al.(2012)
WD0845-188 15.68 08 47 29.44 -18 59 49.8 Zhao et al.(2012)
WD1354+340 16.20 13 57 06 +33 48.8 Catalan et al. (2008)
WD1544-374 12.80 15 47 30.11 -37 55 08.3 Zhao et al.(2012)
WD1544-377 12.80 15 47 30.11 -37 55 08.3 same as -374 Catalan et al. (2008)
@ferayebend
ferayebend / kokbul.jy
Created April 7, 2013 17:16
zemberek kullanarak kok bulma denemesi
#!/usr/bin/jython
# -*- coding: utf-8 -*-
import sys
import os
import java.lang.System.out
import java.util.Arrays
import java.util.List
zembereksourcedir = ?
@ferayebend
ferayebend / mineSDSS.py
Created May 8, 2013 11:40
downloads SDSS spectrum of a given sql query result which includes specobjid
#!/usr/bin/python
from os import popen
def loadData(inputFile,delimiter):
data = []
for line in inputFile:
if line.startswith("#"):
continue
data.append([str(v) for v in line.strip().split(delimiter)])
@ferayebend
ferayebend / disk_spek.f90
Last active December 17, 2015 15:08
Calculates disk spectrum using Frank, King, Raine 2002
module Kind_Types
implicit none
save
integer, parameter, public:: &
single = selected_real_kind(p=6,r=37), &
double = selected_real_kind(p=13,r=200)
! p = precision
! r = range
! return smallest kind of real value with a minimum
! of p decimal digits and maximum range >10^r
@ferayebend
ferayebend / streaming.py
Last active March 7, 2020 00:29
twitter streaming
#!/usr/bin/python
# -*- encoding: utf-8 -*-
#from tweepy.streaming import StreamListener
#from tweepy import OAuthHandler
#from tweepy import Stream
import tweepy
import json
import codecs
import os
@ferayebend
ferayebend / berkin_toolkit.py
Last active August 29, 2015 13:57
ascii json olarak yazılmış tweetleri okumak/işlemek için bir grup edevat
#!/usr/bin/python
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import json
import codecs
import sys
import os
def getOldTweets(filename):
input_file = file(filename, "r")
@ferayebend
ferayebend / streaming.py
Created September 6, 2014 23:42
tweepy streaming
#!/usr/bin/python
# -*- encoding: utf-8 -*-
#from tweepy.streaming import StreamListener
#from tweepy import OAuthHandler
#from tweepy import Stream
import tweepy
import json
import codecs
import os
import sys