Skip to content

Instantly share code, notes, and snippets.

View arulalant's full-sized avatar

Arulalan.T arulalant

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arulalant
arulalant / IMD India Map GeoJSON
Last active November 13, 2021 16:52 — forked from planemad/README.md
Shapefiles of districts of India used by the India Meteorological Department (IMD)
- Source: [India Meteorological Department (IMD)](https://mausam.imd.gov.in/imd_latest/contents/districtwise-warning.php)
- Districts https://mausam.imd.gov.in/imd_latest/contents/district_shapefiles/sd_boundary_rainfall.json
- Subdivisions https://mausam.imd.gov.in/imd_latest/contents/district_shapefiles/sd_boundary.json
- License: Unknown
- Data quality: 675 districts, so maybe from 2015-2018. Shapefile accuracy is 1-5kms
## Cleanup
- The district shape has been joined with properties from the subdivision shape
- Names have been correcte to title case
@arulalant
arulalant / trapjail.sh
Last active June 4, 2022 00:44
cd JAIL TRAP; User gets trap into particular top level directory path; remove cmd works only inside trapped folder, not outside.
#!/bin/bash
## CD JAIL TRAP
## store this bash script into /etc/profile/trapjail.sh and add "source /etc/profile/trapjail.sh" in user's .bashrc file
## Author: Arulalan.T <arulalant@gmail.com>
## 08-May-2020
## Purpose: User gets trap into particular top level directory path.
## User allowed traverse inside "top level directory's sub directories, but nothing else"
## here we can change the trap top level directory path length.
## if it is 4, then once user entered "cd /home/arulalan/Downloads/test" then they will be trapped forever within that directory only. They can not come outside that directory.
## this is useful for conducting classes for mutiple person but login into single user mode.
@arulalant
arulalant / weighted_kde.ipynb
Created July 6, 2017 13:03 — forked from tillahoffmann/weighted_kde.ipynb
Weighted kernel density estimation based on `scipy.stats.gaussian_kde`.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arulalant
arulalant / overlap.py
Last active August 29, 2015 14:05
Get common or overlap values among two list values
import numpy
def getOverlap(a, b):
"""
Inputs : a, b are lists of input values
Returns : Return numpy.ma array with values common or overlap between a and b.
If common is not found among a and b, then that indecies values
will be masked.
@arulalant
arulalant / uvcdat-gui-error.log
Created July 25, 2014 18:22
uvcdat gui shows error in UVCDAT-2.0.beta
arulalan@arulalan-desktop:/usr/local/uvcdat/2.0.beta/bin$ ./uvcdat
Generic Warning: In /home/doutriaux1/build_2.0.beta/build/VTK/Rendering/OpenGL/vtkOpenGLPolyDataMapper.cxx, line 69
vtkOpenGLPolyDataMapper::vtkOpenGLPolyDataMapper was deprecated for VTK 6.2 and will be removed in a future version.
Warning: In /home/doutriaux1/build_2.0.beta/build/VTK/Common/Math/vtkFastNumericConversion.cxx, line 60
vtkFastNumericConversion (0x5f01690): Class vtkFastNumericConversion was depecated for VTK 6.0 and will be removed in a future version.
Generic Warning: In /home/doutriaux1/build_2.0.beta/build/VTK/Rendering/OpenGL/vtkOpenGLPolyDataMapper.cxx, line 69
vtkOpenGLPolyDataMapper::vtkOpenGLPolyDataMapper was deprecated for VTK 6.2 and will be removed in a future version.
@arulalant
arulalant / vcs.error.log
Created July 25, 2014 18:20
import vcs fails in UVCDAT-2.0.beta
arulalan@arulalan-desktop:/usr/local/uvcdat/2.0.beta/bin$ ./python
Python 2.7.7 (default, Jul 24 2014, 08:18:52)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cdms2
>>> import vcs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/uvcdat/2.0.beta/lib/python2.7/site-packages/vcs/__init__.py", line 30, in <module>
from utils import *