Skip to content

Instantly share code, notes, and snippets.

View amaarora's full-sized avatar
🎯
Focusing

Aman Arora amaarora

🎯
Focusing
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
"""
NSW Property Sales Data Analysis
Analyzes Valuer General NSW sales data to identify investment hotspots and trends
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
@amaarora
amaarora / claudette_in_slack.py
Last active June 24, 2024 00:05
Claudette in Slack
import os
from slack_sdk.web import WebClient
from slack_sdk.socket_mode import SocketModeClient
from slack_sdk.socket_mode.response import SocketModeResponse
from slack_sdk.socket_mode.request import SocketModeRequest
import dotenv
import logging
from src.utils import (
get_thread,
apply_chat_template,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"id": "abstract-destruction",
"metadata": {},
"source": [
"# Exploratory Data Analysis (EDA) on Property Sales Dataset\n",
"\n",
"This Jupyter notebook presents an exploratory data analysis (EDA) of a property sales dataset. <br/>\n",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"id": "3344492e",
"metadata": {},
"outputs": [],
"source": [
"# get dataset\n",
class FeatureExtractor(nn.Module):
def __init__(self, model, layer_names):
super().__init__()
self.model = model
self.layer_names = layer_names
self._features = defaultdict(list)
layer_dict = dict([*self.model.named_modules()])
for layer_name in layer_names:
layer = layer_dict[layer_name]