Skip to content

Instantly share code, notes, and snippets.

Mark Betz Markbnj

Block or report user

Report or block Markbnj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am markbnj on github.
  • I am markbnj (https://keybase.io/markbnj) on keybase.
  • I have a public key ASAurAAcEgjhAvcXHWw1ujCICb_8e98HV3FWERnAIkDu5go

To claim this, I am signing this object:

View validator.py
import json
import os
from bravado_core.spec import Spec
from bravado_core.validate import validate_object
from yaml import load, Loader, dump, Dumper
def validate_car(car):
validate_object(spec, Car, car)
View mycars_app.py
import json
import os
import syslog
import validator
from flask import Flask, request, make_response
from jsonschema.exceptions import ValidationError
class BadRequestError(Exception):
""" Signals a malformed request body
View mysql_data_size.sql
SELECT table_schema "DB Name", sum(data_length + index_length) / 1024 / 1024 "Data Size (MB)", sum(data_free) / 1024 / 1024 "Free space (MB)" from information_schema.tables GROUP BY table_schema;
@Markbnj
Markbnj / gist:0e4695cd36305ccfff1f4b0274d868fb
Last active May 5, 2016
Semantic web/NLP/natural language links
View gist:0e4695cd36305ccfff1f4b0274d868fb
http://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web.html
http://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga/yago/faq/
http://www.bioontology.org/wiki/images/6/6a/Triple_Stores.pdf
https://people.mpi-inf.mpg.de/~kberberi/publications/2015-www2015-q2g.pdf
http://autumnai.com/leaf/book/leaf.html
http://benjaminbolte.com/blog/2016/keras-language-modeling.html
View swagger-spec-4.yaml
paths:
/swagger:
get:
summary: Return swagger API specification
description: |
Returns the My Cars API spec as a json swagger doc.
tags:
- Meta
responses:
'200':
View swagger-spec-3.yaml
Car:
type: object
required:
...
properties:
...
registration:
$ref: '#/definitions/Registration'
View swagger-spec-2.yaml
definitions:
Registration:
type: object
required:
- state
- plate_number
properties:
state:
type: string
description: Two letter state abbreviation code
View swagger-spec-1.yaml
swagger: '2.0'
info:
title: My Cars API
description: Simple API for demonstrating json validation
version: 1.0.0
host: localhost
schemes:
- http
produces:
- application/json
View download.py
import threading
from contextlib import closing
import requests
from Queue import Queue
input_file = u"test_input.txt"
def on_download_complete(url, file_name):
You can’t perform that action at this time.