Skip to content

Instantly share code, notes, and snippets.

@ferayebend
ferayebend / OpenSubtitles_ca_cleaned.txt
Last active June 14, 2018 14:10
Open Subtitles Catalan Corpus
This file has been truncated, but you can view the full file.
A Àfrica amb mon pare.
A Àfrica era famós per evitar les drogues.
A Àfrica xafàvem sang a cada petjada.
A això crida supervivent?
A això em refereixo.
A això em refereixo exactament.
A això em referia.
A això és al què em refereixo a l'aigua.
A això es redueix tot?
A això es referia?
import sys
import itertools
import copy
import random
def overlap_rule(l, mi):
desired = []
length = len(l)
c_l = copy.deepcopy(l)
index = random.randint(1,length) - 1
@ferayebend
ferayebend / datab_toolkit.py
Created November 25, 2014 12:53
twitter API tools
#!/usr/bin/python
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from pylab import *
import json
import codecs
import pymongo
import time
@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
@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
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 / 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 / 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 / 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 / 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)