Skip to content

Instantly share code, notes, and snippets.

View ramyaragupathy's full-sized avatar
🗺️

Ramya ramyaragupathy

🗺️
View GitHub Profile
# Secondary table defining many-to-many join for private projects that only defined users can map on
project_allowed_users = db.Table(
'project_allowed_users',
db.metadata,
db.Column('project_id', db.Integer, db.ForeignKey('projects.id')),
db.Column('user_id', db.BigInteger, db.ForeignKey('users.id'))
)
class ProjectTeams(db.Model):
__tablename__ = 'project_teams'
class TeamMembers(db.Model):
__tablename__ = 'team_members'
team_id = db.Column(db.Integer, db.ForeignKey('teams.id', name='fk_teams'), primary_key=True)
user_id = db.Column(db.BigInteger, db.ForeignKey('users.id', name='fk_users'), primary_key=True)
function = db.Column(db.Integer, nullable=False)
member = db.relationship(User, backref='teams')
team = db.relationship('Team', backref='members')
# Secondary table defining many-to-many relationship between organisations and admins
organisation_admins = db.Table(
'organisation_admins',
db.metadata,
db.Column('organisation_id', db.Integer, db.ForeignKey('organisations.id'), nullable=False),
db.Column('user_id', db.BigInteger, db.ForeignKey('users.id'), nullable=False)
)
class Organisation(db.Model):
@willemarcel
willemarcel / countries.json
Created June 20, 2018 12:38
hot website countries.json
---
layout:
---
{% capture countries_list %}
{% for country in site.where-we-work %}
{{ country.title }}::
{% for project in site.projects %}
{% if project.Country contains country.title %}
@DevKhokhar
DevKhokhar / indian_women_in_data.md
Last active December 23, 2021 09:22
List of Indian women who represent the data space in India and globally

Below is a list of Indian women who have contributed it to the data space in India and globally - be it Data Strategy, Data Engineering, Machine Learning, Artificial Intelligence, Data and Public Policy, or any other related field. Please feel free to add in the missing names. I have arranged the names alphabetically for easy searchability. Please do add the name, twitter handle (if available), linkedin profile (if available), link(s) to their public blogs/videos (if available) and the area of specialization. Also, don't forget to add in your name below to the link of contributors. This isn't an individual's effort - this will work only if more and more people contribute. Thanks!

*Note: I have started with just the Indian women here because I wanted to bring attention to some of the inspirational women at the national level. However, if you want to replicate it for any other country or even at a global level, please feel free to either add in into the same list (adding an additional column of course) or cr

@tmcw
tmcw / README.md
Created March 31, 2017 02:01
Managing GitHub Watching en masse

Managing GitHub Watching

I decided to unwatch many repos in multiple organizations. Here are two scripts that I wrote to make that possible. It works like:

  1. I load GitHubAccessToken in my environment, an environment variable that gives these access
  2. I run node get-all-watched.js > all-watching.txt to dump all watching into a text file
  3. Run grep "^developmentseed" all-watching > developmentseed.txt, for instance, to make a text file of only repos in the developmentseed org that I'm watching
  4. Run node unwatch-file-of-repos.js developmentseed.txt to unwatch all those repos.
@kepta
kepta / linter.md
Last active September 15, 2016 17:09

Setting up linters

Pre requisites

Basic setup

To setup a new project.

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.17.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.17.0/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; font: 15px/20px sans-serif; }
@ajzeigert
ajzeigert / index.html
Created January 21, 2016 21:56
Pulsing markers in Mapbox GL JS
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.2/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.2/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@inosaint
inosaint / An incomplete list of Indian data viz enthusiasts.md
Last active May 27, 2016 05:27
An attempt to compile a directory of indians working in the world of data visualization