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 subprocess | |
import re | |
import time | |
def delete(): | |
delete_stmt = [ | |
'mysql', | |
'-h', '...', | |
'-u', '...', | |
'--password=...', |
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 colander | |
class NoneSequence(colander.MappingSchema): | |
foo = colander.SchemaNode(colander.String()) | |
bar = colander.SchemaNode( | |
colander.Sequence(), colander.SchemaNode(colander.String()), | |
missing=None) | |
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
# ... | |
participants_and_editor = text( | |
'ARRAY(SELECT DISTINCT UNNEST(array_cat(' | |
' ARRAY[guidebook.feed_document_changes.user_id], :participants)) ' | |
'ORDER BY 1)') | |
DBSession.execute( | |
DocumentChange.__table__.update(). | |
where(DocumentChange.document_id == outing_id). | |
where(DocumentChange.change_id != existing_change.change_id). | |
values(user_ids=participants_and_editor), |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>windy.js integration example</title> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="chrome=1"> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.15.0/css/ol.css" type="text/css"> | |
<style type="text/css"> | |
#map { |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<!DOCTYPE HTML> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="robots" content="index, all" /> | |
<title>OL3-Google-Maps vector example</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="http://dev5.mapgears.com/ol3-google-maps/node_modules/openlayers/css/ol.css" type="text/css" /> | |
<link rel="stylesheet" href="http://dev5.mapgears.com/ol3-google-maps/css/ol3gm.css" type="text/css" /> |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.13.1/css/ol.css" type="text/css"> | |
<style> | |
.content { |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge"> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.13.1/css/ol.css" type="text/css"> | |
<style> | |
.content { |
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
from sqlalchemy import Column, String, Integer | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.sql.expression import null | |
Base = declarative_base() | |
class Doc(Base): | |
__tablename__ = 'doc' |
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 map = new ol.Map({ | |
layers: [ | |
new ol.layer.Tile({ | |
source: new ol.source.Stamen({layer: 'toner'}) | |
}) | |
], | |
renderer: 'canvas', | |
target: 'map', | |
view: new ol.View({ | |
center: [0, 0], |
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
#!/bin/bash | |
# run from inside the ol3 directory with e.g.: | |
# ./../update-gh-pages.sh draw-and-modify | |
# | |
# http://tsauerwein.github.io/ol3/draw-and-modify/examples/ | |
if [[ -z $1 ]]; then | |
echo "Usage error." | |
exit 1 |
NewerOlder