I hereby claim:
- I am mintchaos on github.
- I am mintchaos (https://keybase.io/mintchaos) on keybase.
- I have a public key ASCg6wI5OTSM4VDENWg0HqV3Jd7h6DLTTkx0plNZvsP58Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Find all of the boxes with totals | |
$$('.wht_total') | |
// Take off the $ and turn it into a number (instead of a word made out of digits) | |
.map(el => Number(el.innerText.slice(1))) | |
// Remove any that aren't numbers (the "Total" at the top is included) | |
.filter(n => !isNaN(n)) | |
// Add everything together | |
.reduce((t, c) => t+c) |
Had a tough day at work? Feel like you're unable to contribute? Dota 2 can help by showing you how your personal failures and inadequacies actually make your opposition stronger and cause your friends to suffer. With gorgeous graphics and beautifully detailed heroes, there's never been a more vibrant way experience your own impotence.
— @mjmetts on unwinding with video games.
The legendary #django-social
channel was once a lovely place of vibrant, cheerful discussion. I miss that.
This experimental channel is a place for off-topic, positive conversation. IRC is a great place to bitch and vent, but #positivepython
is not the place for it.
Feel free to invite anyone that you feel should be a part of the group. We want to be selective, not exclusive.
tweet = Tweet() # new django object | |
tweet.content = item.content, | |
tweet.save() | |
tweet.content == "('%s',)" % item.content # True | |
# Don't accidentally end your lines with commas kids. |
""" | |
I have data like this. | |
I want to uniquify it based in the url. I have written code that works. | |
But it just seems gross. Is there a straightforward way to do this that I'm missing? | |
""" | |
embed_list = [ | |
{ |
javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i%3Ca.length;i++){s=a[i];if(s.rel.toLowerCase().indexOf('stylesheet')%3E=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s.href=h+(h.indexOf('?')%3E=0?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})(); |
@register.filter | |
def exclude_fields(form, field_names): | |
""" | |
Returns the fields of a Form excluding the named fields. Usage: | |
{% for field in form|exclude_fields:"field1,field2,field3" %} | |
""" | |
fields = [] | |
if isinstance(form, BaseForm): | |
field_names = field_names.split(',') | |
for field in form.fields: |
<li class="formrow formrow_{{ field.name }}{% if errors %} has_errors{% endif %}{% if not field.field.required %} optional{% else %} required{% endif %}"> | |
<label for="{{ field.auto_id }}">{{ field.label }}{% if not field.field.required %}<em> (optional)</em>{% endif %}</label> | |
{{ errors }} | |
{{ field }} | |
<small class="help_text">{{ help_text }}</small>{{ hiddenfields }} | |
</li> |