So, according to the imposm docs:
Imposm runs with Python 2.5, 2.6 and 2.7 and is tested on Linux and Mac OS X. Other dependencies are:
psycopg2: PostgreSQL adapter for Python
Tokyo Cabinet: File-based key-value database for the internal cache
import requests | |
from io import open as iopen | |
from urlparse import urlsplit | |
def requests_image(file_url): | |
suffix_list = ['jpg', 'gif', 'png', 'tif', 'svg',] | |
file_name = urlsplit(file_url)[2].split('/')[-1] | |
file_suffix = file_name.split('.')[1] | |
i = requests.get(file_url) | |
if file_suffix in suffix_list and i.status_code == requests.codes.ok: |
#!/usr/bin/env python | |
"""Command line script to convert a file, usually an image, into a data URI | |
for use on the web.""" | |
import base64 | |
import mimetypes | |
import os | |
import sys | |
(function() { | |
var s=document.createElement('script'); | |
s.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'); | |
if(typeof jQuery!='undefined') { | |
var msg='This page already using jQuery v' + jQuery.fn.jquery; | |
} else { | |
document.getElementsByTagName('head')[0].appendChild(s); | |
var msg='This page is now jQuerified' | |
} | |
def java_string_hashcode(s): | |
h = 0 | |
for c in s: | |
h = (31 * h + ord(c)) & 0xFFFFFFFF | |
return ((h + 0x80000000) & 0xFFFFFFFF) - 0x80000000 |
{ | |
"id": "1.5.1", | |
"time": "Apr 28, 2013 3:09:12 PM", | |
"releaseTime": "Mar 20, 2013 12:00:00 PM", | |
"type": "release", | |
"processArguments": "legacy", | |
"libraries": [ | |
{ | |
"name" : "net.minecraft.src.ModLoader", | |
// is this the directory the files are in? |
body { | |
font-size: 16px; | |
line-height: 24px; | |
} | |
article { | |
max-width: 944px; | |
margin: auto; | |
} | |
h1 { | |
font-size: 68px; |
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |
from django.contrib.auth.models import User | |
from django.conf import settings | |
import ldap | |
from baseauth import BaseAuthenticationBackend | |
import logging | |
class LdapAuthenticationBackend(BaseAuthenticationBackend): | |
def authenticate(self, username=None, password=None): | |
for ldap_auth in settings.LDAP_AUTH: |
from django.contrib import admin | |
# from django.contrib.sites.models import Site | |
from models import MetadataStandard, Field, FieldSet, FieldSetField, Record, FieldValue, Collection, Vocabulary, VocabularyTerm | |
class MetadataStandardAdmin(admin.ModelAdmin): | |
pass | |
class FieldAdmin(admin.ModelAdmin): |
So, according to the imposm docs:
Imposm runs with Python 2.5, 2.6 and 2.7 and is tested on Linux and Mac OS X. Other dependencies are:
psycopg2: PostgreSQL adapter for Python
Tokyo Cabinet: File-based key-value database for the internal cache