Have python 3 installed somewhere
Download gist zip file and extract to a directory of your choosing then open terminal / cmd prompt at that directory
| languages: | |
| en: | |
| menu: | |
| main: | |
| - identifier: menu_home | |
| name: "Home" | |
| url: "/home/" | |
| weight: 10 | |
| - identifier: menu_about | |
| name: "About" |
| from html.parser import HTMLParser | |
| import urllib.request | |
| class LinkParser(HTMLParser): | |
| def __init__(self, *, convert_charrefs=True): | |
| super().__init__(convert_charrefs=convert_charrefs) | |
| self.links = [] | |
| def handle_starttag(self, tag, attrs): |
| // looping a triangle | |
| for(var i=0; i < 8; i++) { | |
| console.log('#'.repeat(i)); | |
| } | |
| // fizzbuzz | |
| for(var i=1; i < 101; i++) { | |
| if(i % 3 == 0 && i % 5 == 0) { | |
| console.log(i + ' FizzBuzz'); | |
| } else if(i % 3 == 0) { |
| // minimum | |
| function min(arg1, arg2) { | |
| return (arg1 < arg2) ? arg1 : arg2; | |
| } | |
| console.log(min(0, 10)); | |
| console.log(min(0, -10)); | |
| // recursion |
| const range = (start, end, step=1) => { | |
| const data = []; | |
| for(let i=start; i <= end; i=i+step) { | |
| data.push(i); | |
| } | |
| return data; | |
| }; | |
| console.log(range(3,6)); | |
| console.log(range(1,100,10)); |
| // Flattening | |
| let arrays = [[1, 2, 3], [4, 5], [6]]; | |
| const data = arrays.reduce((acc, item) => acc.concat(item)); | |
| console.log(data); | |
| // Your own loop | |
| // Everything | |
| // Dominant writing direction |
| from cgi import FieldStorage | |
| from io import BytesIO | |
| def parse_into_field_storage(fp, ctype, clength): | |
| fs = FieldStorage( | |
| fp=fp, | |
| environ={'REQUEST_METHOD': 'POST'}, | |
| headers={ | |
| 'content-type': ctype, |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "gopkg.in/yaml.v2" | |
| ) | |
| var data = ` |
| Invisible Man | |
| gs2v2 codes that i have made the only code i didnt make was flat and holes. just thought id post them | |
| p.s find the (m) code ureself | |
| Never show balance meters | |
| FEAE3986 BCA99B83 | |
| Always show balance meters | |
| FEAE399E BCA99B83 |