Skip to content

Instantly share code, notes, and snippets.

View rajeevprasanna's full-sized avatar

Rajeev Kumar kallempudi rajeevprasanna

View GitHub Profile
curl --request POST \
--url http://localhost:8090/druid/indexer/v1/supervisor \
--header 'content-type: application/json' \
--data '{
"type": "kafka",
"dataSchema": {
"dataSource": "meetup-kafka",
"parser": {
"type": "string",
"parseSpec": {
/* Software License Agreement (BSD License)
*
* Copyright (c) 2010-2011, Rustici Software, LLC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
import cats.effect.{ExitCode, IO, IOApp, Resource}
import cats.implicits._
import config.DataBaseConfig
import doobie.hikari.HikariTransactor
import doobie.implicits._
import doobie.util.ExecutionContexts
object Test extends IOApp {
val dbConfig = DataBaseConfig()
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using Microsoft.Exchange.WebServices.Data;
using System.Linq;
using System.Net;
using System.Security;
using System.Text;
/**
* Hacky Workaround for Getting the Current Context Classloader
* Executing Some arbitrary Sync with the Hbase Classloader
* Then reseting that thread to how it was previously.
*
* The moments I believe this is neccessary is when connections or
* configurations are being created to HBase. At these times it
* needs to have the hbase-default.xml which it will be lacking
* otherwise.
*
//Lmabda function1
//API1 : takes feature names as user input and returns all sub processses running status in response.
def lambda_handler(event, context):
config = load config from env variable.
take service names from user input(event)
extract corresponding micro services names mapped to feature name.
now we hit all machines where these micro services are running aggregate the status and return.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<!-- Office JavaScript API -->
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"> </script>
@rajeevprasanna
rajeevprasanna / Forcomptran.md
Created November 22, 2017 10:41 — forked from loicdescotte/Forcomptran.md
Scala for comprehension translation helper

#Scala for comprehension translation helper

"For comprehension" is a another syntaxe to use map, flatMap and withFilter (or filter) methods.

yield keyword is used to aggregate values in the resulting structure.

This composition can be used on any type implementing this methods, like List, Option, Future...

@rajeevprasanna
rajeevprasanna / Test.scala
Created November 2, 2017 06:42
roman to integer conversion
/**
* Created by rajeevprasanna on 11/2/17.
*/
object test extends App {
// I -> 1
// V -> 5
// X -> 10
// L -> 50
// C -> 100