I am a passionate Software developer. I love to read and also have a keen interest in Chess and Photography. Please look at my resume or get in touch if you're looking for someone building impactful and efficient solutions.
Relevant Projects
Chehra
Facial Recognition based Attendance Management System
- Supports recognition of multiple faces
- Android application for Students
- Complete dashboard for Teachers
- IoT Camera connected to the board
Encrypto
An Android App designed for Virtual Stock Market Fun Event.
- Realtime stock price updates
- Efficient Concurrency management
- Live leaderboard
- DB using Firebase CloudFirestore
Coral
Style Transfering app to turn your photos into awesome artwork
- Supports transfer of artwork style to your image
- Supports background blurring (Bokeh Mode)
- Edge Detection
- Ran using Django Rest Framwork
FoodMart
A Demo Food E-commerce written in Angular
- Realtime Database & hosting via Firebase
- Simple UI using bootstrap framework
- Faster performance using Typescript
GameDB
Informative app for games written in Kotlin
- Get latest updates of the games
- Manage your favorite, via Firebase
- Supports sorting by popularity, rating.
Matrix 17
Official App for Matrix Tech festival 2017
- Explore various events at festival
- Save events schedule
- Connect with the event organizers
Check out my Github for more open sources.
Professional Experience
Senior Associate
Jun 2021 - Jul 2022Worked as a Full Stack Developer on an in-house Java-based reconciliation platform, with several features like many-to-many matching, filters, translators & lookups, configurable through Angular-based GUI. Responsible for phases of SDLC.
Summer Intern
May 2018 - Jul 2018Worked as an intern for 2 months under Institutional Securities Business. Rewrote a Web application for Exchange Traded Products (ETP) platform.
Used RxJS to handle live streaming data, optimized several UI components of the web app.
Technology Analyst
Aug 2019 - Jul 2021Worked on multiple microservices in Post-Trade engines responsible for processing as well as reporting of trades to various regulators thus assisting the business to increase revenue post MIFID-II regulations.
Optimized application workflows using concepts of multi-threading, process synchronization & parallel processing.
Education
-
2015 - 2019
Sardar Patel Institute of Technology, Mumbai
Bachelors of Engineering in Computer Science
-
2022 - 2023
State University of New York, Buffalo
Masters in Computer Science


Designing the API – Identifying the resource types
Before I jump directly into my version of "Donny Do" and "Donny Don't" for APIs, I'll give a bit of background as...
Before I jump directly into my version of "Donny Do" and "Donny Don't" for APIs, I'll give a bit of background as...
In 2011 my boss came to me and asked me to design an API for our product. My response. API? Sure! What’s that? Although I...


--- title: Some Core Utilities keywords: fastai sidebar: home_sidebar summary: "A place to keep some common code" description: "A place to keep some common code" nb_path: "notebooks/00_core.ipynb" ---
Cells can be hidden (with #hide). Cells with code that we want to export get an #export flag and will be placed into whatever file is specified in the first cell (core.py
in this case). All other cells are treated as tests and will be executed as part of the CI included with NBDEV. In some cases we don't want to run cells every time - they can be marked with #slow or #skiptest and going forward will then only be run if we explicitly decide to do this.
Let's start by exporting some demo code:
We can run this code:
demo_code()
To make this a 'test' is simple:
assert str(demo_code()) == 'demo'
Here's a cell that I want to run now but would be too slow for testing. In fact, it's one I never want to run:
import time # This import should really be in a separate cell, especially if time is used elsewhere
time.sleep(10)
We can export the code from these notebooks and build the docs from the command line, but it is also useful to export the code from within the notebook. So the last cell here does just that:
from nbdev.export import notebook2script; notebook2script()


public class RelationalGroupedDataset
extends Object
DataFrame
, created by Dataset.groupBy
.
The main method is the agg function, which has multiple variants. This class also contains convenience some first order statistics such as mean, sum for convenience.
This class was named GroupedData
in Spark 1.x.
| Modifier and Type | Class and Description |
|---|---|
static class |
RelationalGroupedDataset.CubeType$
To indicate it's the CUBE
|
static class |
RelationalGroupedDataset.GroupByType$
To indicate it's the GroupBy
|
static class |
RelationalGroupedDataset.PivotType$ |
static class |
RelationalGroupedDataset.RollupType$
To indicate it's the ROLLUP
|
| Modifier and Type | Method and Description |
|---|---|
Dataset<Row> |
agg(Column expr,
Column... exprs)
Compute aggregates by specifying a series of aggregate columns.
|
Dataset<Row> |
agg(Column expr,
scala.collection.Seq<Column> exprs)
Compute aggregates by specifying a series of aggregate columns.
|
Dataset<Row> |
agg(scala.collection.immutable.Map<String,String> exprs)
(Scala-specific) Compute aggregates by specifying a map from column name to
aggregate methods.
|
Dataset<Row> |
agg(java.util.Map<String,String> exprs)
(Java-specific) Compute aggregates by specifying a map from column name to
aggregate methods.
|
Dataset<Row> |
agg(scala.Tuple2<String,String> aggExpr,
scala.collection.Seq<scala.Tuple2<String,String>> aggExprs)
(Scala-specific) Compute aggregates by specifying the column names and
aggregate methods.
|
static RelationalGroupedDataset |
apply(Dataset<Row> df,
scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> groupingExprs,
org.apache.spark.sql.RelationalGroupedDataset.GroupType groupType) |
Dataset<Row> |
avg(scala.collection.Seq<String> colNames)
Compute the mean value for each numeric columns for each group.
|
Dataset<Row> |
avg(String... colNames)
Compute the mean value for each numeric columns for each group.
|
Dataset<Row> |
count()
Count the number of rows for each group.
|
Dataset<Row> |
max(scala.collection.Seq<String> colNames)
Compute the max value for each numeric columns for each group.
|
Dataset<Row> |
max(String... colNames)
Compute the max value for each numeric columns for each group.
|
Dataset<Row> |
mean(scala.collection.Seq<String> colNames)
Compute the average value for each numeric columns for each group.
|
Dataset<Row> |
mean(String... colNames)
Compute the average value for each numeric columns for each group.
|
Dataset<Row> |
min(scala.collection.Seq<String> colNames)
Compute the min value for each numeric column for each group.
|
Dataset<Row> |
min(String... colNames)
Compute the min value for each numeric column for each group.
|
RelationalGroupedDataset |
pivot(String pivotColumn)
Pivots a column of the current
DataFrame and perform the specified aggregation. |
RelationalGroupedDataset |
pivot(String pivotColumn,
java.util.List<Object> values)
Pivots a column of the current
DataFrame and perform the specified aggregation. |
RelationalGroupedDataset |
pivot(String pivotColumn,
scala.collection.Seq<Object> values)
Pivots a column of the current
DataFrame and perform the specified aggregation. |
Dataset<Row> |
sum(scala.collection.Seq<String> colNames)
Compute the sum for each numeric columns for each group.
|
Dataset<Row> |
sum(String... colNames)
Compute the sum for each numeric columns for each group.
|
public static RelationalGroupedDataset apply(Dataset<Row> df, scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> groupingExprs, org.apache.spark.sql.RelationalGroupedDataset.GroupType groupType)
public Dataset<Row> agg(Column expr, Column... exprs)
spark.sql.retainGroupColumns
to false.
The available aggregate methods are defined in functions
.
// Selects the age of the oldest employee and the aggregate expense for each department
// Scala:
import org.apache.spark.sql.functions._
df.groupBy("department").agg(max("age"), sum("expense"))
// Java:
import static org.apache.spark.sql.functions.*;
df.groupBy("department").agg(max("age"), sum("expense"));
Note that before Spark 1.4, the default behavior is to NOT retain grouping columns. To change
to that behavior, set config variable spark.sql.retainGroupColumns
to false
.
// Scala, 1.3.x:
df.groupBy("department").agg($"department", max("age"), sum("expense"))
// Java, 1.3.x:
df.groupBy("department").agg(col("department"), max("age"), sum("expense"));
expr
- (undocumented)exprs
- (undocumented)public Dataset<Row> mean(String... colNames)
avg
.
The resulting DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the average values for them.
colNames
- (undocumented)public Dataset<Row> max(String... colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the max values for them.
colNames
- (undocumented)public Dataset<Row> avg(String... colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the mean values for them.
colNames
- (undocumented)public Dataset<Row> min(String... colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the min values for them.
colNames
- (undocumented)public Dataset<Row> sum(String... colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the sum for them.
colNames
- (undocumented)public Dataset<Row> agg(scala.Tuple2<String,String> aggExpr, scala.collection.Seq<scala.Tuple2<String,String>> aggExprs)
DataFrame
will also contain the grouping columns.
The available aggregate methods are avg
, max
, min
, sum
, count
.
// Selects the age of the oldest employee and the aggregate expense for each department
df.groupBy("department").agg(
"age" -> "max",
"expense" -> "sum"
)
aggExpr
- (undocumented)aggExprs
- (undocumented)public Dataset<Row> agg(scala.collection.immutable.Map<String,String> exprs)
DataFrame
will also contain the grouping columns.
The available aggregate methods are avg
, max
, min
, sum
, count
.
// Selects the age of the oldest employee and the aggregate expense for each department
df.groupBy("department").agg(Map(
"age" -> "max",
"expense" -> "sum"
))
exprs
- (undocumented)public Dataset<Row> agg(java.util.Map<String,String> exprs)
DataFrame
will also contain the grouping columns.
The available aggregate methods are avg
, max
, min
, sum
, count
.
// Selects the age of the oldest employee and the aggregate expense for each department
import com.google.common.collect.ImmutableMap;
df.groupBy("department").agg(ImmutableMap.of("age", "max", "expense", "sum"));
exprs
- (undocumented)public Dataset<Row> agg(Column expr, scala.collection.Seq<Column> exprs)
spark.sql.retainGroupColumns
to false.
The available aggregate methods are defined in functions
.
// Selects the age of the oldest employee and the aggregate expense for each department
// Scala:
import org.apache.spark.sql.functions._
df.groupBy("department").agg(max("age"), sum("expense"))
// Java:
import static org.apache.spark.sql.functions.*;
df.groupBy("department").agg(max("age"), sum("expense"));
Note that before Spark 1.4, the default behavior is to NOT retain grouping columns. To change
to that behavior, set config variable spark.sql.retainGroupColumns
to false
.
// Scala, 1.3.x:
df.groupBy("department").agg($"department", max("age"), sum("expense"))
// Java, 1.3.x:
df.groupBy("department").agg(col("department"), max("age"), sum("expense"));
expr
- (undocumented)exprs
- (undocumented)public Dataset<Row> count()
DataFrame
will also contain the grouping columns.
public Dataset<Row> mean(scala.collection.Seq<String> colNames)
avg
.
The resulting DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the average values for them.
colNames
- (undocumented)public Dataset<Row> max(scala.collection.Seq<String> colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the max values for them.
colNames
- (undocumented)public Dataset<Row> avg(scala.collection.Seq<String> colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the mean values for them.
colNames
- (undocumented)public Dataset<Row> min(scala.collection.Seq<String> colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the min values for them.
colNames
- (undocumented)public Dataset<Row> sum(scala.collection.Seq<String> colNames)
DataFrame
will also contain the grouping columns.
When specified columns are given, only compute the sum for them.
colNames
- (undocumented)public RelationalGroupedDataset pivot(String pivotColumn)
DataFrame
and perform the specified aggregation.
There are two versions of pivot function: one that requires the caller to specify the list
of distinct values to pivot on, and one that does not. The latter is more concise but less
efficient, because Spark needs to first compute the list of distinct values internally.
// Compute the sum of earnings for each year by course with each course as a separate column
df.groupBy("year").pivot("course", Seq("dotNET", "Java")).sum("earnings")
// Or without specifying column values (less efficient)
df.groupBy("year").pivot("course").sum("earnings")
pivotColumn
- Name of the column to pivot.public RelationalGroupedDataset pivot(String pivotColumn, scala.collection.Seq<Object> values)
DataFrame
and perform the specified aggregation.
There are two versions of pivot function: one that requires the caller to specify the list
of distinct values to pivot on, and one that does not. The latter is more concise but less
efficient, because Spark needs to first compute the list of distinct values internally.
// Compute the sum of earnings for each year by course with each course as a separate column
df.groupBy("year").pivot("course", Seq("dotNET", "Java")).sum("earnings")
// Or without specifying column values (less efficient)
df.groupBy("year").pivot("course").sum("earnings")
pivotColumn
- Name of the column to pivot.values
- List of values that will be translated to columns in the output DataFrame.public RelationalGroupedDataset pivot(String pivotColumn, java.util.List<Object> values)
DataFrame
and perform the specified aggregation.
There are two versions of pivot function: one that requires the caller to specify the list
of distinct values to pivot on, and one that does not. The latter is more concise but less
efficient, because Spark needs to first compute the list of distinct values internally.
// Compute the sum of earnings for each year by course with each course as a separate column
df.groupBy("year").pivot("course", Arrays.<Object>asList("dotNET", "Java")).sum("earnings");
// Or without specifying column values (less efficient)
df.groupBy("year").pivot("course").sum("earnings");
pivotColumn
- Name of the column to pivot.values
- List of values that will be translated to columns in the output DataFrame.


| DOSE: T+ 0:00 |
1 line |
insufflated |
Cocaine |
(powder / crystals) |
| T+ 1:00 |
0.5 lines |
insufflated |
Cocaine |
(powder / crystals) |
| T+ 0:00 |
0.5 lines |
insufflated |
Cocaine |
(powder / crystals) |
My husband, Eric from here on out, and I moved back to our old hometown three months ago. Since then we have both been very busy establishing ourselves at our new workplaces, and have not really had time to do any drugging beyond the usual Friday night drinking and smoking. But two weeks ago we got the urge to get hyped up on coke, something we like to do once every 2 months or so. The few friends we still have here arenít users, and after several days of searching we gave up. Last night Eric decided to take a ride to one of our old haunts in hopes of spotting someone we knew and scoring (this particular haunt was a drug area). I stayed home to finish some work. Forty minutes later Eric returned with a baggie, but it was filled with crack rather than coke.
Now, we have dabbled in crack before, with starkly different reactions, neither of which I wish to repeat. I found the high of crack to be disappointing. There was immediate euphoria yes, but it was a hazy, chaotic type of euphoria. Thoughts and emotions were all jumbled, resulting in an odd mix of exhilaration and uneasiness. And only minutes afterward the downturn began, characterized by restlessness and confusion that was not enjoyable. All in all I felt it was a waste of good coke. I had a similar reaction to smoking methamphetamine after having insufflated and injected the substance. Though smoked methamphetamine has a much more lucid feel, I see clear parallels in terms of a less enjoyable come-up, shorter peak, and more drastic comedown.
My husband on the other hand enjoyed crack a bit too much. He ended up going on a bit of a binge that scared me and, after he sobered up, him. Luckily he realized what was happening and stopped. That was several years ago, but I was still very apprehensive about the idea of him smoking it again. So when he returned with the crack I insisted we convert it to powder cocaine.
I scanned my favorite website on psychoactives for a conversion method, but saw none. Knowing that the basic difference between freebase cocaine and cocaine hydrochloride (standard cocaine) was the pH, I decided to experiment. I placed the $20 rock in a dipping dish (the kind you put olive oil in for dipping bread) and sliced open a lemon. I gently squeezed the lemon over the dish adding perhaps a dozen drops of lemon juice to the freebase cocaine. Next I stirred the lemon juice and the crack, using the back of the spoon to break the rock up, until the crack had completely dissolved. Now I had a milky white puddle of liquid, which I placed in the microwave and heated for 15 seconds to evaporate the water.
When I took the dish out of the microwave I found a very pale yellow paste surrounded by a white powdery substance. I stirred again and the paste almost instantly turned white and powdery as well. I assume the yellowish tinge to the paste was the lemon juice since the resulting powder and the crack were both white. The powder was still a bit sticky, but with the edge of the spoon I was able to scrap it off onto a larger plate for cutting into lines. By the time the substance was cut into lines it was identical in appearance to mid-grade street cocaine HCL. The $20 rock made four lines of what I would consider standard size, approximately 1.5 inches long and 10mm thick.
I took the first line, half up each nostril as is my habit. It did not burn at all, as usual with mid-grade cocaine. I tend to notice the burn only with high potency cocaine. Almost instantly I felt an increase in heart rate and respiration, paired with a sense of mental as well as physical stimulation. I informed Eric that it felt like cocaine HCL and he did his line. We then went onto the balcony to share a cigarette, and I continued to feel a strongly physical come-up, which slowly settled to the more steady and balanced high that I expect from cocaine.
When we returned to the living room we were both enjoying the high, just discussing our days but in that effusive coked up type way. After about half an hour I returned to my paperwork since I needed to get it done. As I would expect on a coke high I found the work more interesting and was able to focus well without the tunnel vision type focus of amphetamines. Approximately one hour after doing my first line I did half of my second line. Ericís second line was gone though I didnít notice when he did it. The come-up from this line was similar to the first, more physical then usual but well within the range of response for me to cocaine. I noticed after a few minutes that my lips felt numb, making talking even more enjoyable. This often happens to me on coke but usually the numbness starts with the back of my throat and moves out, this time it was only my lips.
After some chit-chat with my husband I completed my paperwork (I only had about 20 minutes of work left) and then we retired to the bedroom. I gave Eric a long backrub while we continued to talk of life, and eventually the mood turned toward the erotic. It was a very enjoyable love making session. The cocaine didnít affect sensation much but I was perhaps less inhibited and found, as I often have on cocaine, that my gag reflex was relaxed so I was able to enjoy fellatio more than usual. I had three orgasms, one during manual stimulation and two during intercourse. I rarely have trouble orgasming on cocaine.
After my last orgasm I felt totally, completely, blissfully, done. Eric on the other hand, was having trouble orgasming. Usually I would make an effort to help him out, but this time I felt too blissed out to care, which lead to a comical finish of me lying motionlessly and Eric waxing off using my butt crack. I continued to lie there, enjoying the melting into the sheets after-orgasm glow until Eric feel asleep. I was too up to fall out right away but remained in a less intense version of that blissful state for an hour and then, finally, fell asleep.
I believe the conversion of freebase cocaine to cocaine HCL was successful. The appearance, effects, and timing were identical to my experiences with street cocaine. It is important to note that I have never tried to insufflate freebase, and some of the differences in my experiences with crack compared to cocaine are likely a result of the method of administration. However, I would expect a distinct difference between insufflating freebase and insufflating cocaine HCL. Therefore I conclude that all or most of the crack was converted into cocaine HCL.
For those that are wondering, I used the other half of my second line as a wake-up in the morning.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.