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
server { | |
listen 80; | |
listen [::]:80; | |
root /usr/share/nginx/html; | |
index index.html; | |
location / { |
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 sys | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
import community as community_louvain | |
from community import generate_dendrogram, best_partition, partition_at_level | |
from pymongo import MongoClient | |
import matplotlib.cm as cm | |
import pprint, json | |
import matplotlib.colors as colors | |
import matplotlib.cm as cmx |
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 sys, csv, pprint, json | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
import community as community_louvain | |
import matplotlib.cm as cm | |
from community import generate_dendrogram, best_partition, partition_at_level | |
from pymongo import MongoClient | |
from networkx.readwrite import json_graph | |
import threading |
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 sys, csv, pprint, json | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
import community as community_louvain | |
import matplotlib.cm as cm | |
from community import generate_dendrogram, best_partition, partition_at_level | |
from pymongo import MongoClient | |
from networkx.readwrite import json_graph | |
# Connecting to the 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
import got from "got/dist/source"; | |
import { JSDOM } from "jsdom"; | |
export default async (req, res) => { | |
let images = []; | |
const response = await got(`https://unsplash.com/@${req.query.userHandle}`); | |
if (response.statusCode === 200) { | |
const dom = new JSDOM(response.body); | |
let allA = dom.window.document.querySelectorAll( | |
'[itemProp="contentUrl"] img' |
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, pandas and matplotlib | |
import tqdm, re, pandas as pd, random | |
import matplotlib.pyplot as plt | |
# Import wordcloud library | |
from wordcloud import WordCloud, STOPWORDS | |
stopwords= set(STOPWORDS) | |
# Define the colors for grayscale | |
def grey_color_func(word, font_size, position, orientation, random_state=None, **kwargs): |
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
# Process.py | |
# The repaired version of https://gist.github.com/shreevatsa/4d476ac26a367fa68984d8c06867d7dd#file-get-dn-py | |
from __future__ import unicode_literals | |
import os | |
import re | |
import subprocess | |
import sys |
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
// This file was added by layer0 init. | |
// You should commit this file to source control. | |
const { Router } = require("@layer0/core/router") | |
const { nuxtRoutes } = require("@layer0/nuxt") | |
module.exports = new Router() | |
.match("/service-worker.js", ({ serviceWorker }) => { | |
serviceWorker(".nuxt/dist/client/service-worker.js"); | |
}) |
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
const { Router } = require('@layer0/core/router') | |
new Router() | |
.get("/:route", ({ setResponseHeader }) => { | |
setResponseHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains") | |
} | |
) |
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
const { Router } = require('@layer0/core/router') | |
new Router() | |
.get("/:route", ({ setResponseHeader }) => { | |
setResponseHeader("Cross-Origin-Opener-Policy", "same-origin-allow-popups") | |
} | |
) |
OlderNewer