Skip to content

Instantly share code, notes, and snippets.

@FWidm
FWidm / dwd.json
Created August 21, 2017 11:19
Lib Outputs
{
"values": {
"air_temperature": [
{
"temperature2m_degC": "15.0",
"relativeHumidity_percent": "70.0",
"stationId": 2886,
"date": "2016-06-19T10:00:00+00:00",
"description": {
"qualityBit": "QN_9: Quality bit refer to ftp:\/\/ftp-cdc.dwd.de\/pub\/CDC\/observations_germany\/climate\/hourly\/air_temperature\/historical\/BESCHREIBUNG_test_obsgermany_climate_hourly_tu_historical_de.pdf",
Checking for Coordinates: {"type":"Point","coordinates":[9.9823,48.4391]}, @ 2017-06-29T12:47:00+02:00
{
"values": {
"air_temperature": [
{
"temperature2m_degC": " 18.1",
"relativeHumidity_percent": " 67.0",
"stationId": 15444,
"date": "2017-06-29T11:00:00+00:00",
"description": {
import os
import time
import winsound
import sys
class Watcher(object):
def __init__(self, filepath, search_keys):
self._cached_stamp = 0
self.filepath = filepath
5 7
5
3
16
2
0
0 1 3
0 2 1
0 3 6
1 3 2
@Security.Authenticated(ActionAuthenticator.class)
public Result upload() {
Logger.debug("upload!");
Http.MultipartFormData<File> body = request().body().asMultipartFormData();
Http.MultipartFormData.FilePart<File> picture = body.getFile("picture");
Logger.debug("picture="+picture);
if (picture != null) {
String fileName = picture.getFilename();
String contentType = picture.getContentType();
String fileType = determineFileType(fileName);
public boolean checkRights(UserRights neededRight, Object manipulated){
final int RATING_CREATE_CATEGORY=1000;
final int RATING_DELETE_CARD=100;
switch(neededRight){
case CREATE_CATEGORY:{
if(rating>RATING_CREATE_CATEGORY){
return true;
}
return false;
}