metadata

How to handle meta data associated with a pandas dataframe?

荒凉一梦 提交于 2019-12-10 17:49:25
问题 What is the best practice for saving meta information to a dataframe? I know of the following coding practice import pandas as pd df = pd.DataFrame([]) df.currency = 'USD' df.measure = 'Price' df.frequency = 'daily' But as stated in this post Adding meta-information/metadata to pandas DataFrame this is associated with the risk of losing the information by appling functions such as "groupby, pivot, join or loc" as they may return "a new DataFrame without the metadata attached". Is this still

Adding custom namespace to metadata (BitmapMetadata)

百般思念 提交于 2019-12-10 17:39:50
问题 Here's a quick question: how to correctly add a custom namespace to XMP using BitmapMetadata ? Let's say I want the namespace to look like this: xmlns:MyNamespace="http://test" There's no clear way how to add the namespace in the BitmapMetadata , so I tried this: //I retrieve the image frame (Frame[0]), then: var metadata = (BitmapMetadata) frame.Metadata.Clone(); //Covering all bases metadata.SetQuery("/app1/ifd/PaddingSchema:Padding", 4096); metadata.SetQuery("/app1/ifd/exif/PaddingSchema

jclouds : how do I update metadata for an existing blob?

孤街醉人 提交于 2019-12-10 16:39:57
问题 I've got a few thousand blobs at Rackspace's Cloud Files which I need to update content type for. However, I can't figure out how I do that using the jclouds API. How can I go about to update metadata on an existing blob? 回答1: Assuming you have the whole set up running for your rackspace, using jclouds is easy: First initialize with the following details: BlobStoreContext context = ContextBuilder.newBuilder(provider) .credentials(username, apiKey) .buildView(BlobStoreContext.class); BlobStore

how to get a video file's orientation in Python

半世苍凉 提交于 2019-12-10 16:33:45
问题 I would like to load a video file's frames into a numpy array. I want the frames to be properly upright, which means I need to read the orientation metadata in the video file, and rotate the loaded frames accordingly. I have a means of loading the frames (opencv's python bindings), so all I need is a way to read the video file's orientation metadata. I'm trying to read a .MOV file recorded off my iPhone, in python running on an Ubuntu 14.04 machine. Stuff I've looked at: opencv: no way of

How can i access JPEG COM segment in iOS?

痴心易碎 提交于 2019-12-10 16:22:26
问题 JPEG has many Marker Segment Levels, I want to read and write Comment marker segment level - COM (read/write). It needs low level programming. How can i access it in iOS ? References - http://help.accusoft.com/ImageGear/v18.1/Mac/IGDLL-10-05.html https://www.npmjs.com/package/jpeg-com-segment http://www.sno.phy.queensu.ca/~phil/exiftool/ 回答1: IOS allows you to open files. Read the JPEG file. Search the stream for the COM marker. Read the length. Read the data. It's basic [objective] C

Get column type using teradata system tables

余生颓废 提交于 2019-12-10 16:10:34
问题 I want to get the actual column type from teradata system tables like dbc.columns. This table have column columntype but it does not give the actual datatype. I can get output with select type(columnname) from table output: varchar2(20) but there are 1000 tables and 50000 columns. Please suggest some query that can give me actual column type of column from metadata itself 回答1: For views the columntype will be NULL, because it's resolved at runtime. For a single table you can do a HELP COLUMN

dsofile c# API / NTFS custom file properties

有些话、适合烂在心里 提交于 2019-12-10 15:55:57
问题 I'm searching for a good way to add meta data to a file. dsofile.dll works fine for NTFS. The meta data is lost, when one drops a copy on a FAT32 share (it uses NTFS hidden streams I guess). Microsoft Word documents contain meta data that are not lost, how do they do it? Similiar to FAT, sending the file via E-Mail strips of all meta data created with dsofile (and also meta data created by hand with Windows Explorer). Separate meta data files are not an option. It must be compatible with

how to tell if a photo was taken in landscape or portrait? JPEG .NET metadata orientation

家住魔仙堡 提交于 2019-12-10 15:14:26
问题 Thru VB.net/C# is there any way to read any metadata of off a JPEG to tell if the photo was taken in landscape or portrait? I would assume a camera would need an accelerometer first of all to even tell what direction is up...correct? Assuming there is that kind of intelligence to detect the angle of tilt, how would I go about reading that info from a JPEG? I found some samples online to read metadata with vb/.net not sure what to read to find the info i need. Appreciate any pointers..... 回答1:

Getting unique constraint column names from oracle database

时光怂恿深爱的人放手 提交于 2019-12-10 14:27:22
问题 I am implementing a search functionality from UI for this I want to give a drop down of column names which have unique constraints along with any primary key column if present, so user can search with any of these selected column relate data. I have searched for such query but haven't found Something like: SELECT COLUMN_NAMEs FROM TABLE WHERE CONSTRAINTS UNIQUE OR PRIMARY Is there any query to achieve this ... 回答1: USER_CONSTRAINTS would return foreign keys also. You need only primary and

Is XMP metadata supported in PNG images?

情到浓时终转凉″ 提交于 2019-12-10 14:17:13
问题 I've been trying to understand how XMP metadata worked on PNG files for the last few hours but couldn't quite wrap my head around it. If I create a PNG image with Photoshop, save it and open the File Info dialog (File > File Info or Ctrl+Alt+Shift+I), I can see some XMP properties like CreateDate , CreatorTool or ModifyDate . Now if I try to open the file with exiv2 and read the metadata it seems to not find anything: auto image = Exiv2::ImageFactory::open(imagePath); image->readMetadata();