This file contains hidden or 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
//CHECK ishassan/build.sbt as well | |
import org.apache.hadoop.hbase.client._ | |
import org.apache.hadoop.hbase.util.Bytes | |
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration, TableName} | |
import org.apache.hadoop.conf.Configuration | |
import scala.collection.JavaConverters._ | |
object ScalaHBaseExample extends App{ | |
def printRow(result : Result) = { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 requests | |
from io import open as iopen | |
from urlparse import urlsplit | |
def requests_image(file_url): | |
suffix_list = ['jpg', 'gif', 'png', 'tif', 'svg',] | |
file_name = urlsplit(file_url)[2].split('/')[-1] | |
file_suffix = file_name.split('.')[1] | |
i = requests.get(file_url) | |
if file_suffix in suffix_list and i.status_code == requests.codes.ok: |