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 os | |
import requests | |
### This flow does not include user authorization, | |
### so only endpoints that do not request user information | |
### (e.g. user profile data) can be accessed. | |
### https://developer.spotify.com/documentation/web-api/concepts/authorization | |
SPOTIFY_CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") | |
SPOTIFY_CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") |
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
1. Ask HN: What books changed the way you think about almost everything? - https://news.ycombinator.com/item?id=19087418 | |
2. Ask HN: What are the best MOOCs you've taken? - https://news.ycombinator.com/item?id=16745042 | |
3. Ask HN: How to self-learn electronics? - https://news.ycombinator.com/item?id=16775744 | |
4. Ask HN: Successful one-person online businesses? - https://news.ycombinator.com/item?id=21332072 | |
5. Ask HN: What's the most valuable thing you can learn in an hour? - https://news.ycombinator.com/item?id=21581361 |
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
from ctypes import * | |
import os | |
import json | |
""" | |
The following c structure came from the Zorro manual. | |
See here for the structure of other files: https://manual.zorro-project.com/history.htm | |
""" | |
ZORRO_T6_FILE_TO_READ = os.path.join('.', 'AUDJPY_2009.t6') |
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
sudo apt-get install libgraphicsmagick++1-dev libboost-python-dev | |
pip install pgmagick -U |
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
/* | |
Author: Rich Atkinson hello@piran.com.au | |
*/ | |
// Provides a String.render() method. Similar to String.format() (in c), | |
// except it takes a literal object of name / value pairs, like context in Django. | |
// eg: "Hello {name} welcome to {list}".format({name: 'Joe', list: 'Spam'}) | |
if (!String.prototype.render) { |
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
<script type="text/javascript"> | |
(function() { | |
var config = { | |
kitId: 'fwo5iqk', | |
scriptTimeout: 3000 | |
}; | |
var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wf-loading(\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var tk=document.createElement("script"),d=false;tk.src='//use.typekit.net/'+config.kitId+'.js';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded")return;d=true;clearTimeout(t);try{Typekit.load(config)}catch(b){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(tk,s) | |
})(); | |
</script> |
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
./configure --prefix=/usr/local \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx-error.log \ | |
--http-log-path=/var/log/nginx-access.log \ | |
--pid-path=/var/run/nginx.pid |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7KjcZd8MHJ8aoAdnmKR1zBISmru2VVFl6AVHQPH7s754qKTf43kp4OCjTuefje1NhpBL69MaoK6Y+Fc7gTZOx4Ofny1Ju2L8wViw6bIKdSoTOlD3NRqp28sf3doqOf1LxSXjhFrU50FEP3WhrXypCy70HbjmzN/ZSy8trAY8zsUUpi8gxRmR6KA8wThB2KgR0522X1a3mZANOjWMOhTfcedJwxcPj1ELlB7jycTEZrRuiJL3cltWy26iv4XdwdGa2gKi1HwRROYFW/fu2R6cNz2v34pI+1g2OeXRwJIe9CMQWxyha0YdSVtXVdCjCOU+21ld9baWm7UzU+8aoucUPQ== atkinsonr@gmail.com |
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
class LoginForm(forms.Form): | |
password = PasswordField( | |
label = _("Password")) | |
remember = forms.BooleanField( | |
label = _("Remember Me"), | |
# help_text = _("If checked you will stay logged in for 3 weeks"), | |
required = False | |
) | |
NewerOlder