Skip to content

Instantly share code, notes, and snippets.

View hackintoshrao's full-sized avatar
📚
Exploring AI agents on code search and understanding

Karthic Rao hackintoshrao

📚
Exploring AI agents on code search and understanding
View GitHub Profile
@hackintoshrao
hackintoshrao / tweets.json
Created July 15, 2019 07:47
Tweet Json from twitter API
{
"created_at": "Wed Jul 03 18:51:49 +0000 2019",
"id": 1146491754239033300,
"id_str": "1146491754239033344",
"text": "RT @manishrjain: Contains my favorite StreamWriter API -- At 1.6 Gbps, it's the fastest way to bootstrap a new badger instance. https://t.c…",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [
version: "3.5"
services:
alpha1:
image: dgraph/dgraph:v1.0.13
container_name: alpha1
working_dir: /working/alpha1
labels:
cluster: flock-cluster
ports:
- 8180:8180
version: "3.2"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
@hackintoshrao
hackintoshrao / mat_mul.py
Created April 30, 2019 04:54
Tensorflow code to multiply two matrices
import tensorflow as tf
import numpy as np
# Allow data to be supplied later during execution.
A = tf.placeholder(tf.int32, shape=(2, 2))
x = tf.placeholder(tf.int32, shape=(2, 1) )
# Define the matrix multiplication operation.
@hackintoshrao
hackintoshrao / core-site-xml
Created November 30, 2018 16:44
Minio configuration for spark
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.s3a.endpoint</name>
<description>AWS S3 endpoint to connect to. An up-to-date list is
provided in the AWS Documentation: regions and endpoints. Without this
property, the standard region (s3.amazonaws.com) is assumed.
</description>
@hackintoshrao
hackintoshrao / Kredaro.md
Created November 28, 2018 22:13
Kredaro Description

Who are we?

We are Kredaro, an early stage startup focussed on solution offering on these following broad areas and their respective sub-categories, our core competency revolves around tailoring solutions for challenges @Scale.

Infrastructure @ Scale

  • Building Cloud Native, Scalable, Resilient infrastructure/applications on Kubernetes.
  • Systematic performance and resiliency enhancement of complex distributed systems driven by analytics and observability.

Analytics @Scale

compute_rmse = """
#standardSQL
SELECT
IF(MOD(ABS(FARM_FINGERPRINT(date)), 10) < 8, 'train', 'eval') AS dataset,
SQRT(AVG((arrival_delay - ALPHA * departure_delay)*(arrival_delay - ALPHA * departure_delay))) AS rmse,
COUNT(arrival_delay) AS num_flights
FROM
`bigquery-samples.airline_ontime_data.flights`
WHERE
departure_airport = 'DEN'
@hackintoshrao
hackintoshrao / gateway.yaml
Created July 24, 2018 13:23
Yaml config fpr gateway and service entry for new istio config
piVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: up-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
@hackintoshrao
hackintoshrao / tf_dropout.py
Created June 22, 2018 11:02
Tensorflow dropout layer
import tensorflow as tf
hidden_layer_weights = [
[0.1, 0.2, 0.4],
[0.4, 0.6, 0.6],
[0.5, 0.9, 0.1],
[0.8, 0.2, 0.8]]
out_weights = [
[0.1, 0.6],