Skip to content

Instantly share code, notes, and snippets.

View anshumankmr's full-sized avatar
:shipit:
Busy pretending to be busy🤓

Anshuman Kumar anshumankmr

:shipit:
Busy pretending to be busy🤓
View GitHub Profile
@yoavg
yoavg / stochastic-critique.md
Last active November 9, 2023 04:32
A criticism of Stochastic Parrots

A criticism of "On the Dangers of Stochastic Parrots: Can Languae Models be Too Big"

Yoav Goldberg, Jan 23, 2021.

The FAccT paper "On the Dangers of Stochastic Parrots: Can Languae Models be Too Big" by Bender, Gebru, McMillan-Major and Shmitchell has been the center of a controversary recently. The final version is now out, and, owing a lot to this controversary, would undoubtly become very widely read. I read an earlier draft of the paper, and I think that the new and updated final version is much improved in many ways: kudos for the authors for this upgrade. I also agree with and endorse most of the content. This is important stuff, you should read it.

However, I do find some aspects of the paper (and the resulting discourse around it and around technology) to be problematic. These weren't clear to me when initially reading the first draft several months ago, but they became very clear to me now. These points are for the most part

@arnaldog12
arnaldog12 / BalancedDataGenerator.py
Last active July 9, 2022 03:32
BalancedDataGenerator
from keras.utils.data_utils import Sequence
from imblearn.over_sampling import RandomOverSampler
from imblearn.keras import balanced_batch_generator
class BalancedDataGenerator(Sequence):
"""ImageDataGenerator + RandomOversampling"""
def __init__(self, x, y, datagen, batch_size=32):
self.datagen = datagen
self.batch_size = min(batch_size, x.shape[0])
datagen.fit(x)
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active June 14, 2024 21:49
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@koshian2
koshian2 / mobilenet.py
Last active April 23, 2020 09:31
Insert dropout to MobileNet
import tensorflow as tf
from tensorflow.keras.applications import MobileNet
from tensorflow.keras.layers import GlobalAveragePooling2D, Dense, Dropout
from tensorflow.keras.models import Model
from tensorflow.keras.callbacks import History
from tensorflow.contrib.tpu.python.tpu import keras_support
import tensorflow.keras.backend as K
from keras.datasets import cifar10
from keras.utils import to_categorical
@kyamagu
kyamagu / dogs-vs-cats.ipynb
Last active June 17, 2019 20:29
Example of Caffe2 fine-tuning
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@researchranks
researchranks / flower-and-plant-names.csv
Created April 18, 2017 23:09
flower and plant names
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
alder
african rice
african violet
algerian oak quercus
almond
ambrosia
american cress
american dogwood
american nightshade
american white hellebore
@greyli
greyli / index.html
Last active May 16, 2022 12:58
Photo upload demo with Flask-Uploads and Flask-WTF.
<!-- create a folder named templates, put this file into it -->
<!DOCTYPE html>
<title>Upload File</title>
<h1>Photo Upload</h1>
<form method="POST" enctype="multipart/form-data">
{{ form.hidden_tag() }}
{{ form.photo }}
{% for error in form.photo.errors %}
<span style="color: red;">{{ error }}</span>
{% endfor %}
@soxofaan
soxofaan / README.md
Last active January 19, 2024 17:48
Simple pretty CSV and TSV file viewer.
@sedovolosiy
sedovolosiy / install-opencv-2.4.13-in-ubuntu.sh
Created August 9, 2016 22:03 — forked from arthurbeggs/install_opencv2_ubuntu.sh
Install opencv-2.4.13 in Ubuntu 16.04
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 15, 2024 13:00
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites