Profile cover photo
Profile photo
René Nyffenegger
14 followers
14 followers
About
René's posts

Post has attachment
Trying to understand the RSA algorithm with a Perl script
I tried to understand the RSA encryption algorithm and wrote two Perl scripts. Maybe someone else finds this useful, so I share it. The first script ( generate_keys.pl ) creates the public and the private key. It takes two prime numbers as arguments, in thi...

Post has attachment
Using birdy to tweet a message
birdy makes it easy to tweet a message: u:\20-birdy> tweet.py "Hello World!" Here's the script ( tweet.py ): import os
import sys
from birdy.twitter import UserClient

if len(sys.argv) < 2:
print "specify text to tweet"
sys.exit()

tweet_text = sys.ar...

Post has attachment
Experimenting with the twitter API client birdy
I stumbled upon the twitter API client birdy whose description reads a super awesome Twitter API client for Python . Of course, inquiring minds want to know, so I wrote a little script ( account_info.py ). The script takes one argument: the name of a twitte...

Post has attachment
Oracle: Turning a select statement into an Excel file
I don't know how many times a CFO has approached me and asked I know, the data for XYZ is somewhere in the database. Could you quickly get me XYZ and send it to me as Excel . Usually, getting the data out of the database was fairly easy with a SQL select st...

Post has attachment
Writing a blob into a file with PL/SQL with a single line of code.
I have updated my blob_wrapper so that it can write a blob with a single line: blob_wrapper.to_file('c:\temp\abc.txt', my_blob); This creates the file c:\temp\abc.txt and fills it with the content of my_blob A varchar2 can be converted into a blob and then ...

Post has attachment
Creating Excel (.xlsx) files with Oracle PL/SQL
The XLSX Excel file format is actually a zipped archive of some xml files with the suffix .xlsx rather than .zip This makes it possible to create XLSX files with (almost) any programming language that can create files and zip them. Since I am working with P...

Post has attachment
Using Apophysis to create background images
With Apophysis , it is possible to create wallpapers or background images such as the following image: I have produced this image with a variation of this script . Unfortunatly, I lost the script that created the picture above, but this script sort of comes...

Post has attachment
Whether you like it or not, no one should ever claim to be a data analyst until he or she has done string manipulation.
I am reading Gaston Sanchez' book Handling and Processing Strings in R (pdf). In the preface, I found the following quote, to which I wholeheartedly agree: Perhaps even worse is the not so uncommon believe that string manipulation is a secondary
non-relevan...

Post has attachment
Little things that make life easier #9: Using data.entry in r
With data.entry() , it's easy to visually fill (small) matrices in r. Let's see it in action. First, I create a 4x3 matrix: mx <- matrix(nrow=4, ncol=3)
show(mx) [,1] [,2] [,3]
[1,] NA NA NA
[2,] NA NA NA
[3,] NA NA NA
[4,] NA NA NA ...

Post has attachment
Is a sequence incremented in a failed insert?
Here's a sequence create sequence tq84_failed_insert_seq start with 1 increment by 1; And an insert statement: insert into tq84_failed_insert values(
tq84_failed_insert_seq.nextval,
lpad('-', i, '-')
); If the insert statement fails, is the sequence sti...
Wait while more posts are being loaded