The resource for this talk will be updated here soon.
View music.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View query.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
"""The database interface. | |
Please see schema.sql for the schema of the tables. | |
""" | |
from pathlib import Path | |
import sqlite3 | |
import sys | |
from . import config | |
def query(q, parameters=[]): |
View main.aum
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 Square (square); | |
module body Main is | |
function main(): ExitCode is | |
let n: Int32 := 5; | |
let n2:Int32 := square(n); | |
printLn(n2); | |
return ExitSuccess(); |
View bootstrap.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
from kutty import Page, Table, Code, html | |
from _demo import Demo | |
page = Page("Bootstrap") | |
page << html.p(""" | |
bootstrap experiments. | |
""") |
View reduction-game.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
from functools import reduce | |
LEN = lambda items: reduce(lambda n, _: n + 1, items, 0) | |
REVERSE = lambda items: reduce(lambda rev, item: [item, *rev], items, []) | |
MAP = lambda func, items: reduce(lambda result, item: [*result, func(item)], items, []) | |
FILTER = lambda func, items: reduce(lambda result, item: [*result, item] if func(item) else result, items, []) | |
APPEND = lambda items, value: reduce(lambda result, item: [*result, item], [value], items) |
View schema.sql
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
create table station ( | |
code text primary key, | |
name text, | |
zone text, | |
state text, | |
address text, | |
latitude real, | |
longitude real | |
); |
View api-v1.md
API - V1
Basic Types
Create a circle:
circle()
circle(r=50)
circle(cx=100, cy=100, r=50)
View test_email_queue.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
def test_sendmail(monkeypatch): | |
emails = [] | |
def mock_sendmail(self, from_addr, to_addrs, msg, mail_options=(), rcpt_options=()): | |
emails.append(dict(from_addr=from_addr, to_addrs=to_addrs, msg=msg)) | |
monkeypatch.setattr(smtplib.SMTP, "sendmail", mock_sendmail) | |
frappe.sendmail( |
View README.md
This gist demonstrates one of the issues with the new build system of Frappe.
How to reproduce
Step 1
Add the sq.js
and square.bundle.js
from gist to apps/frappe/frappe/public/js
in your bench.
Step 2
NewerOlder