Scripts posted recently in Kelpi

1-10 of 455.

Simple Twitter poster written in Python (with CLI)

to twitter python by saghul , 0 comments

1 2 4 5 6 ...
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib
import urllib2
import httplib

Simple Twitter poster written in Python

to twitter python by saghul , 1 comments

1 2 4 5 6 ...
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib
import urllib2
import httplib

Concatenar PDFs con pdftk

to bash pdftk pdf by nando.quintana , 0 comments

1 2 ...
#!/bin/bash
pdftk uno.pdf dos.pdf tres.pdf cuatro.pdf cinco.pdf cat output definitivo.pdf

dibistuff

to dibi stuff by cheVron , 0 comments

1 ...
http://www.imagingbook.com/index.php?id=98

Case-insensitive containment test - django

to icontains django by kere , 0 comments

1 2 3 4 5 ...
icontains

Case-insensitive containment test.

Example:

lucene merging index

to java lucene by anonymous , 0 comments

1 2 3 4 5 ...
import java.io.StringReader;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriter;

lucene merging index

to java lucene by anonymous , 0 comments

1 2 3 4 5 ...
public static void main (String ... args) throws Exception{
		
		IndexWriter iw_temp = new IndexWriter("i.temp",new StandardAnalyzer());
		IndexWriter iw = new IndexWriter("i",new StandardAnalyzer());
		

Create database and grant privileges to use

to sql mysql by aitzol , 0 comments

1 2 ...
create database database_name;
grant all on database_name.* to 'user_name'@'host_name' [identified by 'user_password']

create a widget in init forms

to forms widget by kere , 0 comments

1 3 5 6 7 ...
  class selectHomeForm(forms.Form):
    title = forms.CharField(max_length=50, label = 'Select homes:')  
    def __init__ (self, *args, **kwargs):
        super(selectHomeForm, self).__init__(*args, **kwargs)
        homes =  homeMap.objects.all()

Get filtered first element order by random

to random django by kere , 0 comments

1 2 3 ...
# filter elements by selected and randomize that list and take the first one.

cover_values = CoverMap.objects.filter(selected = True).order_by('?')[0]