Skip to content

Instantly share code, notes, and snippets.

<div id="canvas"></div>
<style>
#canvas {
width: 500px;
height: 300px;
border: 5px solid black;
position: relative;
box-sizing: content-box;
}
@adrianhajdin
adrianhajdin / alanStudio.js
Created August 4, 2020 09:56
Alan Studio Code Materials
intent('What does this app do?', 'What can I do here?',
reply('This is a news project.'));
const API_KEY = '7bdfb1b10aca41c6becea47611b7c35a';
let savedArticles = [];
// News by Source
intent('Give me the news from $(source* (.*))', (p) => {
let NEWS_API_URL = `https://newsapi.org/v2/top-headlines?apiKey=${API_KEY}`;
@adrianhajdin
adrianhajdin / materials.js
Created August 4, 2020 09:52
Alan AI News Project Materials
// 1. NewsCard/styles.js:
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles({
media: {
height: 250,
},
border: {
border: 'solid',
},
App.css
html, body, #root {
font: 0.9rem sans-serif;
background: #0a1f44;
color: #1e2432;
height: 100%;
margin: 0;
}
.main-container {
@adameubanks
adameubanks / PyDa.py
Created April 11, 2020 01:21
Code for the video where we build a Jarvis like virtual assistant in python 3
import wolframalpha
client = wolframalpha.Client("lilpumpsaysnopeeking")
import wikipedia
import PySimpleGUI as sg
sg.theme('DarkPurple')
layout =[[sg.Text('Enter a command'), sg.InputText()],[sg.Button('Ok'), sg.Button('Cancel')]]
window = sg.Window('PyDa', layout)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bradtraversy
bradtraversy / python_heroku.MD
Created August 16, 2019 16:38
Python & Postgres Heroku Deployment

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active November 7, 2025 12:11
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@ttt733
ttt733 / MeanReversionPaperOnly.cs
Last active July 17, 2022 16:19
Mean Reversion Trading Algorithm (Alpaca)
using Alpaca.Markets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Examples
{
class MeanReversionPaperOnly
{