The resource for this talk will be updated here soon.
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
View notes.md
Trying to install Lineage OS on MI A2 (jasmine_sprout) follow the instructions from:
https://wiki.lineageos.org/devices/jasmine_sprout/install
Unlocking the bootloader
- Enable OEM unlock - done
fastboot oem unlock
- done
Temporarily booting a custom recovery using fastboot
View grid.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
function grid() { | |
push(); | |
noFill(); | |
stroke(200); | |
for (var x=0; x<width; x+=50) { | |
line(x, 0, x, height); | |
} | |
for (var y=0; y<height; y+=50) { | |
line(0, y, width, y); |
View cli.md
Write a CLI application to list the number of covid19 cases and deaths in India.
You can use the following API for getting that data:
https://github.com/anandology/covid19
The required interface is:
$ python covid19.py cases
STATE CONFIRMED ACTIVE DEATHS
View covid19-thehindu.json
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
{ | |
"india": { | |
"confirmed": 586, | |
"active": 534, | |
"deaths": 10, | |
"recovered": 42, | |
"indians": 543, | |
"foreigners": 43 | |
}, | |
"states": { |
View custom.css
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
/* | |
FILE: ~/.jupyter/custom/custom.css | |
Custom CSS to optimize the notebook presentation in full-screen when zoomed in. | |
*/ | |
@media all and (max-width: 800px) { | |
.prompt { | |
display: none !important; | |
} | |
#header-container, #maintoolbar, #menubar { |
View app_foo.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
# import pandas as pd | |
from .heavy_modules import pandas as pd | |
# from google.cloud import bigquery | |
from .heavy_modules import google_cloud_bigquery as bigquery | |
def foo(path): | |
df = pd.read_csv(path) | |
... |
NewerOlder