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
// | |
// ProgrammaticalDemo.swift | |
// PieCharts | |
// | |
// Created by Hyun Min Choi on 2017. 1. 23.. | |
// Copyright © 2017년 Ivan Schuetz. All rights reserved. | |
// | |
import UIKit | |
import PieCharts |
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
16/08/02 23:50:06 INFO TaskSetManager: Finished task 0.0 in stage 2.0 (TID 2) in 7401 ms on mesos-slave9-qa-uswest2.qasql.opentable.com (1/1) | |
16/08/02 23:50:06 INFO TaskSchedulerImpl: Removed TaskSet 2.0, whose tasks have all completed, from pool | |
16/08/02 23:50:06 INFO DAGScheduler: ResultStage 2 (parquet at GLMClassificationModel.scala:77) finished in 7.402 s | |
16/08/02 23:50:06 INFO DAGScheduler: Job 2 finished: parquet at GLMClassificationModel.scala:77, took 7.474796 s | |
Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: file://spark-warehouse, expected: file:/// | |
at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:647) | |
at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:466) | |
at org.apache.hadoop.fs.FilterFileSystem.makeQualified(FilterFileSystem.java:119) | |
at org.apache.spark.sql.catalyst.catalog.SessionCatalog.makeQualifiedPath(SessionCatalog.scala:116) | |
at org.apache.spark.sql.catalyst.catalog.SessionCatalog.createDatabase(SessionCatalog.scala:145) |
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
<!-- Source: http://www.mkyong.com/maven/create-a-fat-jar-file-maven-assembly-plugin --> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mkyong.core.utils</groupId> | |
<artifactId>dateUtils</artifactId> | |
<packaging>jar</packaging> |
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
echo $(ioreg -l -n AppleSmartBattery -r | grep MaxCapacity | awk '{print $3}') / $(ioreg -l -n AppleSmartBattery -r | grep DesignCapacity | awk '{print $3}') \* 100 | bc -l |
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
""" | |
The function checks correctness of a routing number using the Checksum algorithm. | |
Checksum algorithm: http://en.wikipedia.org/wiki/Routing_transit_number#Check_digit | |
""" | |
def validate(routing_number): | |
if len(s) != 9: | |
return False | |
n = 0 | |
for i in xrange(0, len(s), 3): |
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
from math import radians, cos, sin, asin, sqrt | |
def haversine(lon1, lat1, lon2, lat2): | |
""" | |
Calculate the great circle distance between two points | |
on the earth (specified in decimal degrees) | |
""" | |
# convert decimal degrees to radians | |
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2]) |
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
// | |
// Wikipedia.m | |
// yoda | |
// | |
// Created by Utkarsh Sengar on 2/9/14. | |
// Copyright (c) 2014 area42. All rights reserved. | |
// | |
#import "Wikipedia.h" | |
#import "AFNetworking.h" |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="prodinfo" version="1.1"> | |
<types> | |
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> | |
<fieldType name="string" class="solr.StrField"/> | |
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.StandardTokenizerFactory"/> | |
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> | |
<filter class="solr.LowerCaseFilterFactory"/> |
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
// $(element).center(); | |
jQuery.fn.center = function () | |
{ | |
this.css("position","absolute"); | |
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); | |
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); | |
return this; | |
} |
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.rl.hadoopjobs; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.util.StringTokenizer; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.LongWritable; |
NewerOlder