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
package co.nuwira.nwrandroiddev; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.TextView; | |
import android.widget.Toast; |
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
package co.nuwira.nwrandroiddev; | |
import android.content.Intent; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.util.Log; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.HttpClient; |
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
package com.myapplication; | |
import android.location.Location; | |
import android.support.v4.app.FragmentActivity; | |
import android.os.Bundle; | |
import com.google.android.gms.location.DetectedActivity; | |
import com.google.android.gms.maps.GoogleMap; | |
import com.google.android.gms.maps.SupportMapFragment; | |
import com.google.android.gms.maps.model.LatLng; |
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
package com.myapplication; | |
import android.location.Location; | |
import android.support.v4.app.FragmentActivity; | |
import android.os.Bundle; | |
import com.google.android.gms.location.DetectedActivity; | |
import com.google.android.gms.maps.GoogleMap; | |
import com.google.android.gms.maps.SupportMapFragment; | |
import com.google.android.gms.maps.model.LatLng; |
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 mindwave, time | |
headset = mindwave.Headset('/dev/tty.MindWaveMobile-DevA', '8FA4') | |
time.sleep(5) | |
headset.connect() | |
print "Connecting..." | |
#print headset.status | |
#print headset | |
#print headset.rawValue() |
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 select, serial, threading | |
# Byte codes | |
CONNECT = '\xc0' | |
DISCONNECT = '\xc1' | |
AUTOCONNECT = '\xc2' | |
SYNC = '\xaa' | |
EXCODE = '\x55' | |
POOR_SIGNAL = '\x02' | |
ATTENTION = '\x04' |
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 | |
''' | |
stemmer porting from ivanlanin stemmer (php script) | |
https://github.com/ivanlanin/pengakar | |
''' | |
import sys | |
import re |
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 wand.image import Image | |
#create class for get exif data from image | |
class ExifData: | |
key_exif = ['date:create', | |
'date:modify', | |
'exif:ApertureValue', |
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 | |
# how to use just create instance from this class, you can set client id or client secret from constructor | |
# Methods | |
# 1. get token get_token() //getting token key | |
# 2. check_token(token) // for checking tokon is valid or not | |
# 3. sending_sms(number, message, token, *args, **kwargs) //sending message => return message id | |
# 4. check_status_message(message_id, token, *args, **kwargs) //check status message | |
# |
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 | |
# how to use just create instance from this class, you can set client id or client secret from constructor | |
# Methods | |
# 1. get token get_token() //getting token key | |
# 2. check_token(token) // for checking tokon is valid or not | |
# 3. sending_sms(number, message, token, *args, **kwargs) //sending message => return message id | |
# 4. check_status_message(message_id, token, *args, **kwargs) //check status message | |
# |