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 java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
class FizzBuzz { | |
private static class P { | |
final int divisor; | |
final String val; | |
P(int divisor, String val) { |
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 rx.Observable; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import static java.util.Arrays.asList; | |
public class ParseWithRx { | |
public static void main(String[] args) { | |
String[][] sourceData = { |
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 com.microsoft.windowsazure.services.core.Configuration; | |
import com.microsoft.windowsazure.services.core.ServiceException; | |
import com.microsoft.windowsazure.services.serviceBus.ServiceBusConfiguration; | |
import com.microsoft.windowsazure.services.serviceBus.ServiceBusContract; | |
import com.microsoft.windowsazure.services.serviceBus.ServiceBusService; | |
import com.microsoft.windowsazure.services.serviceBus.models.BrokeredMessage; | |
import com.microsoft.windowsazure.services.serviceBus.models.CreateQueueResult; | |
import com.microsoft.windowsazure.services.serviceBus.models.QueueInfo; | |
/** |
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
(ns fixxer.dadata | |
(:require [clj-http.client :as http] | |
[cheshire.core :as json])) | |
(def api-key "your-api-key") | |
(def secret-key "your-secret-key") | |
(defn clean [request] | |
(->> request | |
json/generate-string |
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
input = read.csv("input.csv", sep=";", colClasses=rep("character", 12), col.names=rep("c", 12)) | |
output = result[,c("c.1", "c.7", "c")] # take second, eighth and first columns | |
output["new"] <- "" # append new empty column | |
colnames(output) <- c("Column 1", "Column 2", "Column 3", "Column 4") # rename columns | |
write.table(output, "output.csv", sep=";", quote=FALSE, row.names=FALSE) |