Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"name": "medium_electron", | |
"version": "1.0.0", | |
"description": "Hello World for Medium Article", | |
"main": "index.js", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"author": "", | |
"license": "ISC", |
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 { app, BrowserWindow } = require('electron') | |
const createWindow = () => { | |
const win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
}) | |
win.loadFile('index.html') | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta | |
http-equiv="Content-Security-Policy" | |
content="default-src 'self'; script-src 'self'" | |
/> | |
<meta |
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 networkx as nx | |
import matplotlib.pyplot as plt | |
# Extract all simple paths from | |
# one town to another and calculate | |
# some basic statistics. | |
# Init A Graph in networkx | |
G = nx.Graph() |
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 networkx as nx | |
import matplotlib.pyplot as plt | |
# Simple Two Town graph in networkx with weight data and random graph | |
# Init A Graph in networkx | |
G = nx.Graph() | |
# Townspeople and towns |
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 networkx as nx | |
import matplotlib.pyplot as plt | |
# Simple Two Town graph in networkx with weight data | |
# Init A Graph in networkx | |
G = nx.Graph() | |
# Townspeople and towns |
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 networkx as nx | |
import matplotlib.pyplot as plt | |
# Simple Two Town graph in networkx | |
# Init A Graph in networkx | |
G = nx.Graph() | |
# Townspeople and towns |
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 networkx as nx | |
import matplotlib.pyplot as plt | |
# Basic Example for networkx | |
# Init A Graph in networkx | |
G = nx.Graph() | |
# Add Single Node: | |
G.add_node(1) |
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 pycoingecko import CoinGeckoAPI | |
import datetime as dt | |
# today in Timestamp | |
today = dt.datetime.today() | |
today_unix = today.timestamp() | |
# today minus 100 days in Timestamp | |
today_minus_100 = today - dt.timedelta(days=100) | |
today_minus_100_unix = today_minus_100.timestamp() |
NewerOlder