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 sys | |
from django.db.models import CharField | |
class CharFieldUnlimited(CharField): | |
"""Postgres specific varchar field | |
Use this over models.TextField when you want a one line input in the django | |
admin instead of the multi-line TextArea input widget. | |
Using this field gives you unlimited length CharFields, whilst still using |
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 sys | |
import glob | |
import pygame | |
scale_factor = 4 | |
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 random import randint | |
from microbit import * | |
import neopixel | |
np = neopixel.NeoPixel(pin0, 512) | |
# Merry Christmas |
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
<html> | |
<body> | |
<div class="search"> | |
<input type="text" id="search-box" placeholder="Dataset" /> | |
<div id="matches"></div> | |
</div> | |
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script src="dataset.js"></script> | |
</body> | |
</html> |
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
{% ckan_extends %} | |
{% block heading_meta %} | |
{% if package.get('state', '').startswith('draft') %} | |
<span class="label label-info">{{ _('Draft') }}</span> | |
{% elif package.get('state', '').startswith('deleted') %} | |
<span class="label label-important">{{ _('Deleted') }}</span> | |
{% endif %} | |
( {{ h.link_to(h.truncate(package.organization.title, truncate_title), h.url_for(controller='organization', action='read', id=package.organization.name)) }} ) |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
[ | |
{ | |
"is_osi_compliant": false, | |
"od_conformance": "not reviewed", | |
"maintainer": "", | |
"is_generic": true, | |
"id": "notspecified", | |
"family": "", | |
"is_okd_compliant": false, | |
"url": "", |
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
---- Trouble in Terrorist Town | |
AddCSLuaFile("cl_init.lua") | |
AddCSLuaFile("shared.lua") | |
AddCSLuaFile("cl_hud.lua") | |
AddCSLuaFile("cl_msgstack.lua") | |
AddCSLuaFile("cl_hudpickup.lua") | |
AddCSLuaFile("cl_keys.lua") | |
AddCSLuaFile("cl_wepswitch.lua") | |
AddCSLuaFile("cl_awards.lua") |
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 itertools import takewhile, dropwhile | |
from functools import partial | |
#... some other imports | |
def some_table(context, series, format_string): | |
table_options = format_string.split() | |
is_same_date = lambda date, i: i.datestamp > date | |
is_same_week = partial(is_same_date, context['date'] - timedelta(weeks=1)) |