Skip to content

Instantly share code, notes, and snippets.

View TrigonaMinima's full-sized avatar

Shivam Rana TrigonaMinima

View GitHub Profile
@mikhailov-work
mikhailov-work / turbo_colormap.py
Created August 8, 2019 23:31
Turbo Colormap Look-up Table
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Author: Anton Mikhailov
turbo_colormap_data = [[0.18995,0.07176,0.23217],[0.19483,0.08339,0.26149],[0.19956,0.09498,0.29024],[0.20415,0.10652,0.31844],[0.20860,0.11802,0.34607],[0.21291,0.12947,0.37314],[0.21708,0.14087,0.39964],[0.22111,0.15223,0.42558],[0.22500,0.16354,0.45096],[0.22875,0.17481,0.47578],[0.23236,0.18603,0.50004],[0.23582,0.19720,0.52373],[0.23915,0.20833,0.54686],[0.24234,0.21941,0.56942],[0.24539,0.23044,0.59142],[0.24830,0.24143,0.61286],[0.25107,0.25237,0.63374],[0.25369,0.26327,0.65406],[0.25618,0.27412,0.67381],[0.25853,0.28492,0.69300],[0.26074,0.29568,0.71162],[0.26280,0.30639,0.72968],[0.26473,0.31706,0.74718],[0.26652,0.32768,0.76412],[0.26816,0.33825,0.78050],[0.26967,0.34878,0.79631],[0.27103,0.35926,0.81156],[0.27226,0.36970,0.82624],[0.27334,0.38008,0.84037],[0.27429,0.39043,0.85393],[0.27509,0.40072,0.86692],[0.27576,0.41097,0.87936],[0.27628,0.42118,0.89123],[0.27667,0.43134,0.90254],[0.27691,0.44145,0.913
@dufferzafar
dufferzafar / CV of failures - Melanie Stefan.md
Last active September 3, 2018 07:27
Notes on failure by other people

Taken from: https://www.nature.com/naturejobs/science/articles/10.1038/nj7322-467a

A couple of months ago, I received a letter informing me that my fellowship application had failed. On the same day, Brazil's World Cup squad announced that football phenomenon Ronaldinho had not been selected. “Cool,” I thought. “I am like Ronaldinho.” But that thought offered only little consolation. No scientist enjoys such failures, but too often we hide them.

In a way, a fellowship rejection is to be expected. Most of these fellowships have success rates of about 15%, meaning that an applicant might be successful in only one out of every seven tries. For every hour I've spent working on a successful proposal, I've spent six hours working on ones that will be rejected. I don't mind the extra work — after all, if I abhorred tedious tasks with low chances of success, I would not be in research.

Even so, this means that for every endorsement, there are about six challenges to my ability, my determination and my visi

@howardhamilton
howardhamilton / pitch.py
Last active January 4, 2021 13:06
Normalized football pitch written with matplotlib package
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as pch
import matplotlib.image as img
def create_normalized_pitch(size=(12.5, 8.0), pcolor='none', ecolor='black'):
"""
Create figure that has football pitch lines drawn on it. Figure coordinates are normalized to a 100x100 grid.
If aspect ratio of figure is not equal to 1.5625 (12.5 in / 8.0 in), the figure width is
@agentcooper
agentcooper / 0.README.md
Last active April 9, 2024 19:27
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@ayman
ayman / .hadoop_alias
Last active August 12, 2017 08:25
My friend Jake hates typing `hdfs dfs -` so he made these aliases. Enjoy!
alias happendToFile='hdfs dfs -appendToFile'
alias hcat='hdfs dfs -cat'
alias hchecksum='hdfs dfs -checksum'
alias hchgrp='hdfs dfs -chgrp'
alias hchmod='hdfs dfs -chmod'
alias hchown='hdfs dfs -chown'
alias hcopyFromLocal='hdfs dfs -copyFromLocal'
alias hcopyToLocal='hdfs dfs -copyToLocal'
alias hcount='hdfs dfs -count'
alias hcp='hdfs dfs -cp'
@aparrish
aparrish / spacy_intro.ipynb
Last active August 9, 2023 01:41
NLP Concepts with spaCy. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1. 52°North Initiative for Geospatial Open Source Software GmbH (Applying)

  • No. of proj accepted - 6

  • difficulty level/Desc - Difficult (GeoInformation stuff)

  • tags - geo , geospatial , java , gis , spatiotemporal , geoprocessing , traffic , environment , R , R-project , earth observation , geoprocessing , spatial data , geostatistics , sensor web , search , mobile , eventing , database

  • ideas - SPARQL endpoint and InterOperability for EnviroCar data Social Driving Stats

@mbejda
mbejda / Indian-Female-Names.csv
Created November 3, 2015 15:12
Dataset of ~14,000 Indian female names for NLP training and analysis. The names have been retrieved from public records. (name,gender,race)
name gender race
shivani f indian
isha f indian
smt shyani devi f indian
divya f indian
mansi f indian
mazida f indian
pooja f indian
kajal f indian
meena f indian
@tkrotoff
tkrotoff / RemoveWin10DefaultApps.ps1
Last active July 12, 2024 09:05
Remove Windows 10 default apps
# See Remove default Apps from Windows 10 https://thomas.vanhoutte.be/miniblog/delete-windows-10-apps/
# See Debloat Windows 10 https://github.com/W4RH4WK/Debloat-Windows-10
# Command line to list all packages: Get-AppxPackage -AllUsers | Select Name, PackageFullName
Get-AppxPackage Microsoft.Windows.ParentalControls | Remove-AppxPackage
Get-AppxPackage Windows.ContactSupport | Remove-AppxPackage
Get-AppxPackage Microsoft.Xbox* | Remove-AppxPackage
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage # Mail and Calendar
#Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage
Get-AppxPackage Microsoft.WindowsCamera | Remove-AppxPackage
@karpathy
karpathy / min-char-rnn.py
Last active July 24, 2024 18:36
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)