Pymark.

Python Flavored °´Ã¼ ¸¶Å© ¾÷
Áö±Ý ´Ù¿î·Îµå

Pymark. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • BSD License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Daniel Holden
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • https://github.com/orangeduck/

Pymark. ű×


Pymark. ¼³¸í

PyMark´Â PythonÀ» °­·ÂÇÑ ÇÁ·±Æ® ¿£µå·Î ¸¶Å© ¾÷À¸·Î »ç¿ëÇÏ°í ÀÀ¿ë ÇÁ·Î±×·¥À¸·Î °£´ÜÇÑ ¹ÙÀ̳ʸ® Çü½ÄÀ¸·Î µ¥ÀÌÅ͸¦ ÄÄÆÄÀÏÇÏ´Â ¸ðµâÀÔ´Ï´Ù. °­·ÂÇÑ ÇÁ·±Æ® ¿£µå¿¡ ÃÊÁ¡À» ¸ÂÃá ´Ù¸¥ °´Ã¼ ¸¶Å© ¾÷ ±â¼úÀÌ ºÎÁ·ÇÑ ¸¹Àº ÀÌÁ¡ÀÌ ÀÖ½À´Ï´Ù. - Bad Syntax ¸¶Å© ¾÷Àº ÄÄÆÄÀÏ Å¸ÀÓ¿¡ °É·Á ÀÖ½À´Ï´Ù. Á¶ÀÛ / ÆÐÄ¡´Â ½±°Ô ¼öÇà ÇÒ ¼ö ÀÖÀ¸¸ç Á¶±â¿¡ °£´ÜÇÑ ¹é¿£µå¸¦ °®´Â °ÍÀÌ ¾à°£ÀÇ ÀÌÁ¡ÀÌ ÀÖ½À´Ï´Ù. ´ÜÁ¡ ÇÁ·ÐÆ® ¿£µå¿¡¼­ ¸¹Àº ÀϾ´Â °ÍÀº ½Ã½ºÅÛÀ» ´Ù¼Ò ÀϹæÇâÀ¸·Î ¸¸µì´Ï´Ù. Àΰ£ÀÇ ÀÐÀ» ¼öÀÖ´Â ¼Ò½º´Â ¾î¶² Àǹ̿¡¼­ À籸¼º µÉ ¼ö ÀÖÀ¸¸ç, ÄÚ¸àÆ®¿Í ´Ù¸¥ ¸¶Å© ¾÷°ú °°Àº µ¥ÀÌÅÍ´Â ÄÄÆÄÀÏ¿¡¼­ ¼Õ½ÇµË´Ï´Ù. ¹èÆ÷ ¹× °øµ¿ ÀÛ¾÷ÀÇ °æ¿ì ¼Ò½º ÆÄÀÏÀ» °øÀ¯ÇÏ´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù .Data EntryThe ù ¹ø° ÀÛ¾÷Àº ½ÇÁ¦·Î µ¥ÀÌÅ͸¦ ÀÔ·ÂÇÏ´Â °ÍÀÔ´Ï´Ù. À̸¦ À§ÇØ ÆÄÀÏ°ú µ¿ÀÏÇÑ À̸§ÀÇ °´Ã¼°¡ÀÖ´Â ÆÄÀ̽㠸ðµâÀ» ¸¸µì´Ï´Ù. ´ç½ÅÀº ÀÌ°ÍÀ» ±¸Á¶È­ ÇÒ ¼ö ÀÖ½À´Ï´Ù. JSON FAN ÀÎ °æ¿ì ´ÙÀ½°ú °°ÀÌ ¾µ ¼ö ÀÖ½À´Ï´Ù. "" "³»°¡ ÁÁ¾ÆÇÏ´Â ¾Ö¿Ï µ¿¹° - ±âº» ¿¹" "" "" "" "": { "À¯Çü": "°³", "À̸§": "Benny Boos" , "color": "°¥»ö", "Àå³­°¨": }, "Roger": { "": "¸»", "À̸§": "Roger Horse", "Color": "Èò»ö", "Àå³­°¨": }, "ij¼­¸°": { "À¯Çü": "cat", "name": "catherine", "color": "»ý°­", "Àå³­°¨", " ": }}} ±×·¯³ª ÆÄÀ̽ãÀ» °¡Áö°í ÀÖÀ¸¸é ÈξÀ ´õ Ç¥Çö·ÂÀÌ ÀÖ½À´Ï´Ù. ¿©·¯ °¡Áö ¹æ¹ýÀ¸·Î µ¥ÀÌÅÍ Ç׸ñÀ» ¿©·¯ °¡Áö ¹æ¹ýÀ¸·Î Á¶Á¤ÇÏ¿© ´õ °£´ÜÇÏ°í ¸í½Ã ÀûÀ̰ųª ´õ ¹ÌÇØÇØ Áöµµ·Ï "" "Pymark.Util °¡Á® ¿À±â ¿­°Å Çü, ¸ðµâ, ±¸Á¶Ã¼"ÇÔ¼ö "¿¡¼­ °¡Àå ÁÁ¾ÆÇÏ´Â ¾Ö¿Ï µ¿¹°" "" "DEF PET (** kwargs) : kwargsdef »ö»ó (R, G, B)À» ¹ÝȯÇÕ´Ï´Ù : ¹Ýȯ (R, G, B)" "»ó¼ö" ""À¯Çü = enum ( "Dog", "¸»", "°í¾çÀÌ" ) TOYS = enum ( "¹®ÀÚ¿­", "¸¶¿ì½º", "ºê·¯½Ã", "»À", "°ø") »ö»ó = ±¸Á¶¹° (Brown = color (94, 83, 51), Èò»ö = »ö»ó (255, 255, 255) , »ý°­ = »ö»ó (237, 133, 14),) "" "¸ðµâ" "PETS_TWO = ¸ðµâ (BENNY = PET (type = type.dog, name ="Benny Boos ", Color = Colors.Brown, Toys = ), roger = pet (type = types.horse, name = "Roger ¸»", color = color.white, ¿Ï±¸ = ), ij¼­¸° = ij¼­¸° = PET ( type = types.cat, name = "catherine", color = color.gginer, toys = ) À§ÀÇ ¿¹Á¦´Â Á¶±Ý¸¸ ¾û¸ÁÀ̵Ǵ °Íó·³ º¸ÀÔ´Ï´Ù. ±×·¯³ª ±×°ÍÀº °¡´É¼º. ³ª´Â ½ºÅ¸ÀÏ Áß Çϳª¸¦À§ÇÑ ½ÇÁ¦ ȯ°æ ¼³Á¤ÀÌ ¾øÁö¸¸ PythonÀ» »ç¿ëÇÏ´Â °ÍÀº ȯ°æ ¼³Á¤À̳ª domain.compilingonce¿¡ µû¶ó ¸¶Å© ¾÷À» Àû¿ë ÇÒ ¼öÀÖ´Â ¿É¼ÇÀÌ ÀÖ½À´Ï´Ù. Pymark.Pymark PetS_TWO.PY> PETS_TWO.PMKAPPLICATIONÀ» »ç¿ëÇØ º¸¾Ò½À´Ï´Ù. API´Â ·±Å¸ÀÓ¿¡ µ¥ÀÌÅ͸¦ »ó´çÈ÷ ´Ü¼øÇÏ°í ºÐ¸íÇÏ°Ô Ã³¸®ÇÏ°í À¯Çü ¾ÈÀü ¾ð¾î·Î ½±°Ô ¾×¼¼½º ÇÒ ¼öÀÖ°Ô ¸¸µå´Â °ÍÀÌ Ç×»ó ²ûÂïÇÒ °ÍÀÔ´Ï´Ù. º°µµÀÇ ¾ð¾î·Î °´Ã¼ ¸¶Å© ¾÷À» ¼öÇàÇÏ´Â ÁÖ¿ä ¹®Á¦ Áß ÇϳªÀÌ¸ç ±× ÁÖÀ§¿¡´Â ¾à°£ÀÇ ¹æ¹ýÀÌ °ÅÀÇ ¾ø½À´Ï´Ù. C¿¡¼­ ÀÌ·± ÀÏÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù. # #include "pymark.h"int main (int argc, char ** argv) {pymarkobject * pets = pymark_unpack ( "pets_two.pmk"); pymarkobject * cath = ¾Ö¿Ï µ¿¹° -> get (¾Ö¿Ï µ¿¹°, "ij¼­¸°"); pymarkobject * cath_color = cath-> get (cath, "color"); pymarkobject * cath_toys = cath-> get (cath, "Àå³­°¨"); printf ( "TypeID : % i \ n", cath-> get (cath, "À¯Çü") -> as_int); printf ( "À̸§ : % s \ n", cath-> get (cath, "À̸§") -> as_string); printf ( "»ö»ó : (% i, % i, % i, % i)", cath_color-> Ç׸ñ .as_int, cath_color-> Ç׸ñ .as_int, cath_color-> Ç׸ñ .as_int); PRINTF ( "TOYIDS :"); (int i = 0; i ±æÀÌ; i ++) {printf ( "% i,", cath_toys-> -> as_int); } printf ( "\ n"); pymark_delete (¾Ö¿Ï µ¿¹°); Return 0;} C ++ ±¸¹®Àº ±¸ÇöÀÌ ÀüüÀûÀ¸·Î û¼Ò±â°¡ ¾Æ´Ñ ±¸ÇöÀÌ ¾Æ´Ñ Á¶±Ý ´õ ¸¹Àº »ùÆ®ÀÔ´Ï´Ù. # #include "pymark.hpp"int main (int argc, char ** argv) {pymark : : pymarkobject * pets = pymark :: funcack ( "pets_two.pmk"); pymark :: pymarkobject * cath = ¾Ö¿Ï µ¿¹° -> get ( "ij¼­¸°"); printf ( "TypeID : % i \ n", cath-> get ( "À¯Çü") -> asint ()); printf ( "À̸§ : % s \ n", cath-> get ( "name") -> asstring ()); printf ( "»ö»ó : (% i, i, % i, i, % i) \ n", cath-> get ( "»ö»ó") -> at (0) -> asint (), cath-> get (»ö»ó ") - > (1) -> asint (), Cath-> Get ( "Color") -> at (2) -> asint ()); ¾Ö¿Ï µ¿¹° »èÁ¦; Return 0;} Èñ¸ÁÀ» °®´Â ¾ð¾î°¡ °ð Áö¿øµÇ´Â ¾ð¾î¸¦ Áö¿øÇÕ´Ï´Ù ... Á¦Ç° ȨÆäÀÌÁö


Pymark. °ü·Ã ¼ÒÇÁÆ®¿þ¾î