Skip to content

Instantly share code, notes, and snippets.

View ankurs's full-sized avatar

Ankur Shrivastava ankurs

View GitHub Profile
#sms archiver for pys60 - Project 21
# sms.py
import inbox
import urllib,urllib2
i = inbox.Inbox()
m = i.sms_messages()
print 'hello'
for a in m:
post = {'number' : i.address(a).encode('utf-8'),
#!/usr/bin/perl
use strict;
use File::Glob ':glob'; # for whitespace problem with normal glob
use File::Copy; # for copying files
use strict;
my @dir; # will hold all original dirs
my @files; # will hold all original files
my @ndir; # will hold all new dirs
my @nfiles; # will hold all new files
#!/usr/bin/perl
use strict;
## use this for any help --> http://search.cpan.org/~adamk/Archive-Zip-1.28/lib/Archive/Zip.pm
use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); # we are using the Archive::Zip module, if its not there download it using ppm
my $zipfile = "abc.zip"; # name of the zip file
my @files = qw( a b c ); # list of files to be zipped
my $zip = Archive::Zip->new(); # just creating the object
foreach (@files)
{
$zip->addFile($_); # adding individual files from @files
#!/usr/bin/perl
use File::Glob ':glob';
use strict;
my $dir =$ARGV[0];
my @dir;
my @virus;
push @dir,$dir;
foreach(@dir)
{
my @in =<$_/*>;