Tag: Format
Posts of Tag: Format
  1. Difference between format specifiers %i and %d in printf

    What is the difference between %d and %i when used as format specifiers in printf? ...Learn More
    Formatc++printf
  2. How can I print a literal "{}" characters in python string and also use .format on it?

    x = " \{ Hello \} {0} " print x.format(42) gives me : Key Error: Hello\\ I want to print the output: {Hello} 42...Learn More
    PythonStringFormat
  3. Is it possible to read Fortran formatted data in Python?

    I get output files from very old Fortran programs, which look like: 0.81667E+00 -0.12650E+01 -0.69389E-03 0.94381E+00 -0.11985E+01 -0.11502E+00 0.96064E+00 -0.11333E+01 -0.17616E+00 0.10202E+01 -0.12...Learn More
    PythonFormatFortranfloating-point
  4. python format datetime with "st", "nd", "rd", "th" (english ordinal suffix) like PHP's "S"

    I would like a python datetime object to output (and use the result in django) like this: Thu the 2nd at 4:30 But I find no way in python to output st, nd, rd, or th like I can with PHP datetime format with th...Learn More
    PythonPHPDjangoDateTimeFormat
  5. how to write into XLS with python with format unchanged?

    Is there a way to write something into an XLS file with python while keeping the initial format of this XLS file unchanged (such as font size, cell background color, etc)Thanks!...Learn More
    PythonFormatxls
  6. Python 2.6+ str.format() and regular expressions

    Using str.format() is the new standard for formatting strings in Python 2.6, and Python 3. I've run into an issue when using str.format() with regular expressions. I've written a regular expression to return al...Learn More
    PythonregexFormatstring-formatting
  7. How to display date format using Python logging module

    I am trying to setup a format for logging in python: import logging,logging.handlers FORMAT = "%(asctime)-15s %(message)s" logging.basicConfig(format=FORMAT,level=logging.INFO) logger = logging.getLogger("twitt...Learn More
    PythonLoggingFormat
  8. URL query string convention for multiple sort

    I have a RESTful web application that supports multiple sort fields on a collection of items. Is there a common convention for encoding these sort fields into the query string of a URL? I'm considering a patter...Learn More
    URLFormatquery-string
  9. sas date - convert today() into yyyymmdd format

    How do I convert a SAS date such as "30JUL2009"d into YYYYMMDD format (eg 20090730)? So for instance: data _null_; format test ?????; test=today(); put test=; run; Would give me "test=20090730" in the lo...Learn More
    FormatDateSas
  10. Medium Story Curation Checklist

    Importance of Medium Curation/Role of Curators Who Are Medium’s Curators and What Do They Do? Medium’s editorial curation team is tasked with reviewing thousands of stories every day. They have 30–50 curators...Learn More
    NewsWritingWriting TipsMediumCurationFormat
  11. Output in two rows for multiple columns in python

    I'm working with an output list that contains the following information: [start position, stop position, chromosome, [('sample name', 'sample value'), ('sample name','sample value')...]] [[59000, 5...Learn More
    PythonBioinformaticsFormatfile
  12. How to format date when I load data from google-app-engine

    I use remote_api to load data from google-app-engine. appcfg.py download_data --config_file=helloworld/GreetingLoad.py --filename=a.csv --kind=Greeting helloworld the setting is: class AlbumExporter(bulkloade...Learn More
    PythonFormatLoadgoogle-app-engine