Simplest way to add pan/zoom to a d3js visualisation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""File format conversion | |
category: vtk, file conversion, tomb""" | |
import os, sys | |
import vtk | |
def vtk2vtp(invtkfile, outvtpfile, binary=False): | |
"""What it says on the label""" | |
reader = vtk.vtkPolyDataReader() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import busio | |
import digitalio | |
import board | |
import adafruit_mcp3xxx.mcp3008 as MCP | |
from adafruit_mcp3xxx.analog_in import AnalogIn | |
# create the spi bus | |
spi = busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------- | |
# USER-SPECIFIED DATA | |
#-------------------------- | |
# Tune these parameters | |
num_classes = 2 | |
image_shape = (160, 576) | |
EPOCHS = 40 | |
BATCH_SIZE = 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SOLRUPDATE='http://localhost:8983/solr/testingCore/update?wt=json&commit=true' | |
export SOLRQUERY='http://localhost:8983/solr/testingCore/select?wt=json&q=*:*' | |
curl $SOLRUPDATE --data-binary '[{"id": "1"},{"id": "2"}]' -H 'Content-Type: application/json' -X POST -H "Transfer-Encoding: chunked" | |
#>> response {"responseHeader":{"status":0,"QTime":295}} | |
curl $SOLRQUERY | |
#>> {"responseHeader":{"status":0,"QTime":15,"params":{"q":"*:*","wt":"json"}},"response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[{"id":"1","_version_":1570026155898044416},{"id":"2","_version_":1570026155878121472}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geo_usstates = { | |
"type": "FeatureCollection", | |
"features": [{ | |
"type": "Feature", | |
"id": "01", | |
"properties": { | |
"name": "AL" | |
}, | |
"geometry": { |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -S passport-ldapauth |
NewerOlder