Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ The simplest data structure which can be used to store such results is an Array.

---


*How to store a two (or more) digit number in an Array (one digit per index) ?*

We need to store the input ‘n’ (1-100) into an array to find it’s Factorial To store a Number in an array, we can grab the digits from least significant position (For Example 1456) one by one and put it into the array. For example: To put 123 into an array (let say a[50]), we will grab the last digits one by one, final array would be given as a[] = {3,2,1} i.e. a[0]=3, a[1]=2, a[2]=1 & so on…

**LOGIC used for this**: Let n = 123 then 1). let rem = n%10 (this means remainder when n is divided by 10) 2. a[index] = rem 3. n = n/10 (this removes the last digit from n, Now we are ready to grab the second last digit & so on) Repeating this step iteratively, we can save n into an array.
---

*How To Find the Factorial of the Number stored in array?*

After we have put the input number (1-100) into an array, we have to now find its Factorial. To do that we have to multiply the number ‘n’ with (n-1), (n-2) … & so on …3.2.1 . Now we need to find an Algorithm for multiplying an Integer with a number stored into an array & we can use that algorithm for all multiplications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Out[0]: [0, 1, -2]
Note: abs is the absolute value function. i.e. `abs(-3) = 3`

## map

*Takes an input iterable of values and return a list with different values. Same order, same length, but mapped via a function.*

`map(function, iterable)`
Expand Down Expand Up @@ -94,6 +95,7 @@ filter(None, ['a','', 'b' ])

reduce takes an iterable of input data and consumes it to come up with a single value.


*The function we have to write is different too - the function will take two values and typically reduce will consume the first two values from the iterable then consume one value at a time from the list using the return value from the previous call.*

![reduce](/assets/reduce/reduce.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The main functions, I would be implementing are:


* `eq_to_matrix` :

*method to convert system of Equations to Matrix Form.*

* `linsolve`: *It's the General Linear System solver.*
Expand Down
3 changes: 3 additions & 0 deletions content/blog/2020-03-22-Year-2019-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TL;DR : I had a great time there, would highly recommend them.

<img src="/assets/2019_review/tnt_st_pauls.jpg" width="700">


*The office is located right next to St. Paul's. The above photo (of St. Paul's) was taken on 20th Feb, 2019.*

Turner and Townsend is a construction consulting company i.e. they basically do consulting
Expand Down Expand Up @@ -58,6 +59,7 @@ We used [Apache Airflow](https://airflow.apache.org/) to create, schedule and mo

<img src="/assets/2019_review/tnt_airflow.png" width="700">


*A screenshot of a pipeline, from Airflow's dashboard.*

One of the cool things about this application is that it was written in a very declarative way
Expand Down Expand Up @@ -153,6 +155,7 @@ in future blog posts.
<iframe width="700" height="315" src="https://www.youtube.com/embed/VaAglrOKfus" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>


*This is a video of me in the spectators behind, clapping after Bumrah takes the wicket of Usman Khawaja.*

<img src="/assets/2019_review/cwc_2019.jpg">
Expand Down
6 changes: 6 additions & 0 deletions content/blog/2020-12-25-Year-2020-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope;
picture-in-picture" allowfullscreen></iframe>

<img src="/assets/2020_review/yt-comment-2020.png" width="400">

*This comment really nailed it!*

---
Expand All @@ -47,6 +48,7 @@ contract I took, over the years, here is a brief list of the same:


<img src="/assets/2020_review/desk.jpg" width="600">

*My office for most of 2020*

### Aire
Expand Down Expand Up @@ -143,6 +145,7 @@ The Act I am most proud of was the Cell Block Tango, I played "Lipchitz" in that
Cell Block Tango is a musical from a 2002 movie named "Chicago".

<img src="/assets/2020_review/theatre.jpg" width="700">

*That's the Cell Block Tango in Action*

### Gliding
Expand All @@ -160,11 +163,13 @@ a basis for learning to fly engine planes.
Granada, Isle of Wight

<img src="/assets/2020_review/isle-of-wight.jpg" width="700">

*View from a bridge on the Isle of Wight*

#### Spain

<img src="/assets/2020_review/jaen.jpg" width="700">

*View of the mountains around the beautiful city of Jaen from my terrace.*

I lived in Jaen, Spain for a couple of months, with my sister. I picked up some
Expand All @@ -179,6 +184,7 @@ beautiful and the weather is the best I have seen anywhere in the last few years
- Did some hiking in Salzburg, Austria

<img src="/assets/2020_review/hiking.jpg" width="300">

*Start of the hike to Nockstein*


Expand Down
4 changes: 4 additions & 0 deletions content/blog/2022-10-05-Year-2021-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ I was looking to stay in a city, reasonably far from London. Birmingham was
too close to London and Edinburgh was too far, so Manchester made the cut.

<img src="/assets/2021_review/manchester_25_jan_2021.jpg" width="700">

*Manchester on a winter morning in January*


Expand All @@ -36,6 +37,7 @@ implementing pairwise distance between all the samples in genomics analysis. In
terms the problem reduces to finding pairwise distance between all the row vectors in
a 2D Matrix.


*More information in the blogpost [here](https://quansight.com/post/dask-on-coiled). Relevant tweet [here](https://twitter.com/quansightai/status/1423394705560141824)*

## Making GPUs accessible via Array API
Expand All @@ -53,6 +55,7 @@ This work achieved this via [Array API](https://data-apis.org/array-api/latest/)

Making GPUs accessible to the PyData Ecosystem via the Array API Standard.


*More information in the blogpost [here](https://labs.quansight.org/blog/2022/03/making-gpus-accessible-to-pydata-ecosystem-via-array-api). Relevant tweet [here](https://twitter.com/iaktech/status/1512056428743512066)*

# Personal Work
Expand Down Expand Up @@ -84,6 +87,7 @@ Personal life hasn't been very exciting in the first half of 2021, due to
pandemic and the new city that I moved into.

<img src="/assets/2021_review/oval_vitality.jpeg" width="800">

*A cricket game between Manchester Originals vs Oval Invincibles @ Oval 21st July, 2021*

- Saw some cricket:
Expand Down
1 change: 1 addition & 0 deletions content/blog/2023-12-3-Year-2022-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ url: /blog/year-2022-review
---

<center><img src="/assets/2022-review/maldives.jpg" width="900"></center>

*An ordinary soda during sunset in Maldives*

Year 2022 was quite an year for me. Apart from travelling around the world twice,
Expand Down
4 changes: 4 additions & 0 deletions content/blog/2023-12-30-Year-2023-Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ url: /blog/year-2023-review
Your browser does not support the video tag.
</video>


*A walk along the river Thames on my 2 hour journey to the Riverside Arts center for theatre rehearsals.*

After writing the year [2022's review blog post](/blog/year-2022-review) in December 2023,
Expand Down Expand Up @@ -127,6 +128,7 @@ It was really an excellent learning experience.
- England vs Afghanistan

<img src="/assets/2023-review/dharamshala.jpeg" width="600">

*Probably one of the most scenic cricket grounds in the world*

- Travelled to a few places:
Expand All @@ -135,9 +137,11 @@ It was really an excellent learning experience.
- Italy

<img src="/assets/2023-review/peak-walk.jpeg" width="400">

*Peak walk between two mountains at Glacier 3000*

<img src="/assets/2023-review/castle-howard.jpeg" width="400">

*Castle Howard, York*

- Saw Kaifi Khalil and Shae Gill live in concert
Expand Down
21 changes: 21 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@

{{ partial "sidebar.html" . }}

<!-- Theme Toggle Button -->
<button id="theme-toggle" aria-label="Toggle dark mode">
<svg id="theme-toggle-light-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun">
<circle cx="12" cy="12" r="4"/>
<path d="M12 2v2"/>
<path d="M12 20v2"/>
<path d="m4.93 4.93 1.41 1.41"/>
<path d="m17.66 17.66 1.41 1.41"/>
<path d="M2 12h2"/>
<path d="M20 12h2"/>
<path d="m6.34 17.66-1.41 1.41"/>
<path d="m19.07 4.93-1.41 1.41"/>
</svg>
<svg id="theme-toggle-dark-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" style="display: none;">
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>
</svg>
</button>

<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
content to avoid any CSS collisions with our real content. -->
<div class="wrap">
Expand Down Expand Up @@ -39,5 +57,8 @@ <h3 class="masthead-title">
<!-- Google Analytics -->
{{ partial "ga.html" . }}

<!-- Scripts -->
{{ partial "scripts.html" . }}

</body>
</html>
14 changes: 13 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,28 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}/public/css/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/public/css/syntax.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/public/css/lanyon.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}/public/theme/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Newsreader:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap">

<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ .Site.BaseURL }}public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ .Site.BaseURL }}public/favicon.ico">

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
<link rel="alternate" type="application/rss+xml" title="RSS" href="/index.xml">

<!-- mixpanel -->
{{ partial "mixpanel.html" . }}

<!-- Dark mode theme switcher -->
<script>
// Load theme before page renders to prevent flash
(function() {
const theme = localStorage.getItem('theme') || 'light';
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
}
})();
</script>

</head>
43 changes: 43 additions & 0 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,46 @@
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<!-- Theme toggle functionality -->
<script>
document.addEventListener('DOMContentLoaded', function() {
const themeToggle = document.getElementById('theme-toggle');
const lightIcon = document.getElementById('theme-toggle-light-icon');
const darkIcon = document.getElementById('theme-toggle-dark-icon');
const html = document.documentElement;

// Get current theme
let currentTheme = localStorage.getItem('theme') || 'light';

// Update icon visibility based on current theme
function updateToggleButton(theme) {
if (theme === 'dark') {
// In dark mode, show sun icon (click to go to light)
lightIcon.style.display = 'inline-block';
darkIcon.style.display = 'none';
} else {
// In light mode, show moon icon (click to go to dark)
lightIcon.style.display = 'none';
darkIcon.style.display = 'inline-block';
}
}

// Set initial button state
updateToggleButton(currentTheme);

// Toggle theme on button click
themeToggle.addEventListener('click', function() {
currentTheme = currentTheme === 'light' ? 'dark' : 'light';

if (currentTheme === 'dark') {
html.setAttribute('data-theme', 'dark');
} else {
html.removeAttribute('data-theme');
}

localStorage.setItem('theme', currentTheme);
updateToggleButton(currentTheme);
});
});
</script>
Loading