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
for x in range(int(data["block_number"]), 1, -1): | |
line = line + "<url>\n" | |
line = line + "<loc>http://inkl.in/"+str(x)+ "</loc>\n" | |
line = line + "<changefreq>never</changefreq>" | |
line = line + "</url>\n" | |
counter=counter+1 | |
if counter == 50000: | |
counter = 1 | |
print("Writing " + str(filename)) |
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
sitemapindex = '<?xml version="1.0" encoding="UTF-8"?>\n' | |
sitemapindex = sitemapindex + '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n' | |
for file in glob.glob('*.xml'): | |
sitemapindex = sitemapindex + '<sitemap>\n' | |
sitemapindex = sitemapindex + ' <loc>http://inkl.in/sitemaps/' + file + '</loc>\n' | |
sitemapindex = sitemapindex + '</sitemap>\n' | |
sitemapindex = sitemapindex + '</sitemapindex>' |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: sitemap | |
spec: | |
template: | |
spec: | |
restartPolicy: OnFailure | |
containers: | |
- name: sitemap |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: frontend | |
labels: | |
name: frontend | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: http |
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 flask import Flask, make_response | |
from pymongo import MongoClient | |
import numpy as np | |
import talib | |
from talib import abstract | |
from talib.abstract import * | |
import json | |
import datetime | |
import numpy as np | |
import StringIO |
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 pymongo | |
from pymongo import MongoClient | |
import csv | |
import urllib2 | |
import sys | |
import os.path | |
from datetime import datetime, timedelta | |
QUANDL_API_KEY = "YOUR_API_KEY" |
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 pymongo | |
from pymongo import MongoClient | |
import urllib2 | |
import csv | |
# Are we using development or Production ? | |
# uri = "mongodb://USERNAME:PASSWORD@INSTANCE.documents.azure.com:10255/?ssl=true&replicaSet=globaldb" |
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 urllib, json | |
import glob | |
import os | |
import pymongo | |
from pymongo import MongoClient | |
# Set the latest Block form the API | |
client = MongoClient(os.environ["DB"]) |
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 nginx | |
RUN mkdir /usr/share/nginx/html/sitemaps | |
COPY *.xml /usr/share/nginx/html/sitemaps/ |
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: api-ingress | |
annotations: | |
nginx.ingress.kubernetes.io/ssl-redirect: "false" | |
nginx.ingress.kubernetes.io/enable-cors: "true" | |
nginx.ingress.kubernetes.io/use-regex: "true" | |