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 glob | |
import sys | |
import csv | |
print( "\n>> beginning process" ) | |
# find and print list of files in directory | |
filenamesList = glob.glob("catalina.*") | |
print(">> found "+str(len(filenamesList))+" file(s) in this directory matching \"catalina.*\"") | |
# if none, say so and end |
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
version: '3.7' | |
services: | |
sonarqube: | |
image: sonarqube:7.9.1-community | |
ports: | |
- "9000:9000" | |
networks: | |
- sonarnet | |
environment: | |
- sonar.jdbc.url=jdbc:postgresql://db:5432/sonar |
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 | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
from pymongo import MongoClient | |
# insert your connection details here | |
MONGO_URL = 'mongodb://<dbuser>:<pass>@<database URL>' | |
# connect to the MongoDB server | |
client = MongoClient(MONGO_URL) | |
# connect to the default database within the server |
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 pymongo import MongoClient | |
# insert your connection details here | |
MONGO_URL = 'mongodb://<dbuser>:<pass>@<database URL>' | |
# connect to the MongoDB server | |
client = MongoClient(MONGO_URL) | |
# connect to the default database within the server | |
db = client.get_default_database() | |
db.profiles.insert( {"_id":"jmclane","name":"John McLane", |
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 pymongo import MongoClient | |
# insert your connection details here | |
MONGO_URL = 'mongodb://<dbuser>:<pass>@<database URL>' | |
# connect to the MongoDB server | |
client = MongoClient(MONGO_URL) | |
# connect to the default database within the server | |
db = client.get_default_database() |
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 | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
@app.route("/", methods=['GET']) | |
def hello_world(): | |
return( "Hello world. Try /api/profiles or /api/companies for data." ) | |
# listing all profiles | |
@app.route("/api/profiles", methods=['GET']) |
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
Flask==0.10.1 | |
Flask-SQLAlchemy==2.0 | |
Flask-WTF==0.12 | |
itsdangerous==0.24 | |
Jinja2==2.8 | |
MarkupSafe==0.23 | |
pymongo==3.0.3 | |
Werkzeug==0.10.4 | |
WTForms==2.0.2 |
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
web: python app.py |
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 | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
# listing all items | |
@app.route("/api/items", methods=['GET']) | |
def list_items(): | |
fake_data = { "items": [ {"name":"Widget","id":42,"price":49.95}, | |
{"name":"Doodad","id":43,"price":19.95}, | |
{"name":"Gizmo","id":44,"price":99.95} ] |
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
"""""""""""""""""""""""""""""""""""""""" | |
" settings from here on are Joe's custom settings | |
"""""""""""""""""""""""""""""""""""""""" | |
" convert all tabs/indents to four regular spaces | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab |
NewerOlder