Skip to content

Instantly share code, notes, and snippets.

View valentina-s's full-sized avatar

Valentina Staneva valentina-s

View GitHub Profile

Project Name


One line description


Collaborators


Background

Goals

@valentina-s
valentina-s / CitySimilarity.py
Created May 9, 2019 22:04
A sript for extracting satellite images of city capitals using the HERE api.
import math
def calculate_xy(lat,lon,z):
latRad = lat * math.pi / 180;
n = math.pow(2, z);
xTile = n * ((lon + 180) / 360);
yTile = n * (1-(math.log(math.tan(latRad) + 1/math.cos(latRad))/math.pi)) / 2;
return(xTile,yTile)
def get_api_keys(keys_file):
keys = []
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@valentina-s
valentina-s / viewSTL.py
Last active February 2, 2018 05:35
view stl file with vtk module; >python viewSTL.py file.stl
#!/usr/bin/env python
import vtk
import sys
filename = sys.argv[1]
reader = vtk.vtkSTLReader()
reader.SetFileName(filename)
import numpy as np
import matplotlib.pyplot as plt
im = plt.imread('cells.png')
fig = plt.figure()
ax = fig.add_subplot(111)
# ax.add_image(im)
plt.imshow(im)
coords = []
import cell_magic_wand
@valentina-s
valentina-s / jupyter-google-cloud.md
Created October 10, 2016 01:53
Jupyter Notebook on Google Cloud Compute Instance

On Instance:

pip install jupyter[notebook]

jupyter notebook --generate-config

# nano .jupyter/jupyter_notebook_config.py

echo "c = get_config()
c.NotebookApp.ip = '*'
@valentina-s
valentina-s / GettingStartedWithAllenBrainOservatory.md
Last active July 11, 2017 16:03
Instructions to run the tutorial notebooks for the Allen Brain Observatory dataset.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>NumberOfTopicsSelection</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.