Tag : files

Title User Language Tags Description Date
A function to get a files contents with curl. o0110o PHP

A handy function to get the contents of a file with curl. Accepts $_path as a parameter.

October 20
A function to get file sizes in multiple formats with curl. o0110o PHP

A function to get a files size via curl. Accepts $path, $unit, $float, $username & $_password; In the listed order.

October 20
A function to see if a file exists with curl. o0110o PHP

This function will use curl to see if a file exists at the location it's provided. It accepts $_path as a parameter.

October 20
GIT - List all the files for a commit in git satie83 Bash

Hash of the commit which you want to show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d

June 21, 2012
Changing permissions recursively by files and directories wnasich Bash

In order to avoid make files executable, you can use these to chmod files and directories differently.

April 27, 2012
Hidden files in MacOSX vaishnavi AppleScript

Hide and show files in MacOSX

April 26, 2012
Show hidden files in Terminal shuchii AppleScript

Replace TRUE with FALSE if you want to hide the hidden files again.

January 23, 2012
Copy Files by Date Modified danfsmith Windows PowerShell July 27, 2011
xjc script to generate bindings for all files in directory b4nd0ler0 is coming for ya Other Shell script to generate java binding classes for all XSD files in directory with JAXB's XJC April 15, 2011
Delete matching lines from files shell script (sed) b4nd0ler0 is coming for ya Other Shell script to delete matching lines from certain files in a directory with find and sed. April 15, 2011
Python reader for spss sav files Albert-Jan Roskam python

Python Program to read Spss system files (.sav)

  • Requires spssio32.dll, which can be freely downloaded from: https://www.ibm.com/developerworks/mydeveloperworks/wikis/home/wiki/We70df3195ec8_4f95_9773_42e448fa9029/page/Downloads%20for%20IBM%C2%AE%20SPSS%C2%AE%20Statistics?lang=en
  • The .dll should be saved in the same location as this program.

  • Parameters: savFileName: the file name of the spss data file; returnHeader: Boolean that indicates whether the first record should be a list of variable names (default is True); recodeSysmisTo: indicates to which value missing values should be recoded (default = ""); selectVars: indicates which variables in the file should be selected.The variables should be specified as a list or a tuple of valid variable names. If None is specified, all variables in the file are used (default is None); verbose: Boolean that indicates whether information about the spss data file (e.g., number of cases, variable names, file size) should be printed on the screen (default: True).

  • Typical use: savFileName = "d:/someFile.sav" with SavReader(savFileName) as sav: header = sav.next() for line in sav: process(line)

  • Note: --this code currently only works on Windows (32 bits). I might make it work on Linux Ubuntu 10 at some point. --date fields in spss are represented as the number of seconds since the Gregorian calendar. The program converts these, wherever possible, to ISO-dates (yyyy-mm-dd). --I tested this on a huge file (10**7 records, 100 vars). It works, but is rather slow. According to cProfile, the functions getValueNumeric() and getValueChar() (and their C equivalents) are the bottleneck. I'd be happy to hear any performance tips (other than, rewrite the code in Cython, C, C++, ... ;-)

Any feedback is welcome! I'm still learning!

April 12, 2011
Find all files bigger than X k TioSolid Bash

In example: find all files (recursively from the current directory) bigger than 20000kb

March 7, 2011
Using Files As Databases nathanpc Bash Simple example of how you can list, add, remove and search on a file, using it like a database. Teaching a bit of how to use the grep function and file I/O March 3, 2011
Nhibernate hbm files Hemant Govekar XML Nhibernate hbm file template March 3, 2011
Nhibernate Config files Hemant Govekar XML hibernate.cfg.xml March 3, 2011