[["\n\n\n\t\n\t\n\t\n\n\tColVis example - Custom button text\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\n\n\t
\n\t\t
\n\t\t\t

ColVis example Custom button text

\n\n\t\t\t
\n\t\t\t\t

You may wish to use your own text in the ColVis button - this is done by making use of the buttonText initialisation option, as shown in this\n\t\t\t\texample.

\n\n\t\t\t\t

For full information about the ColVis options, please refer to the ColVis options documentation.

\n\t\t\t
\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\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t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
NamePositionOfficeAgeStart dateSalary
NamePositionOfficeAgeStart dateSalary
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
Jena GainesOffice ManagerLondon302008/12/19$90,560
Quinn FlynnSupport LeadEdinburgh222013/03/03$342,000
Charde MarshallRegional DirectorSan Francisco362008/10/16$470,600
Haley KennedySenior Marketing DesignerLondon432012/12/18$313,500
Tatyana FitzpatrickRegional DirectorLondon192010/03/17$385,750
Michael SilvaMarketing DesignerLondon662012/11/27$198,500
Paul ByrdChief Financial Officer (CFO)New York642010/06/09$725,000
Gloria LittleSystems AdministratorNew York592009/04/10$237,500
Bradley GreerSoftware EngineerLondon412012/10/13$132,000
Dai RiosPersonnel LeadEdinburgh352012/09/26$217,500
Jenette CaldwellDevelopment LeadNew York302011/09/03$345,000
Yuri BerryChief Marketing Officer (CMO)New York402009/06/25$675,000
Caesar VancePre-Sales SupportNew York212011/12/12$106,450
Doris WilderSales AssistantSidney232010/09/20$85,600
Angelica RamosChief Executive Officer (CEO)London472009/10/09$1,200,000
Gavin JoyceDeveloperEdinburgh422010/12/22$92,575
Jennifer ChangRegional DirectorSingapore282010/11/14$357,650
Brenden WagnerSoftware EngineerSan Francisco282011/06/07$206,850
Fiona GreenChief Operating Officer (COO)San Francisco482010/03/11$850,000
Shou ItouRegional MarketingTokyo202011/08/14$163,000
Michelle HouseIntegration SpecialistSidney372011/06/02$95,400
Suki BurksDeveloperLondon532009/10/22$114,500
Prescott BartlettTechnical AuthorLondon272011/05/07$145,000
Gavin CortezTeam LeaderSan Francisco222008/10/26$235,500
Martena MccrayPost-Sales supportEdinburgh462011/03/09$324,050
Unity ButlerMarketing DesignerSan Francisco472009/12/09$85,675
Howard HatfieldOffice ManagerSan Francisco512008/12/16$164,500
Hope FuentesSecretarySan Francisco412010/02/12$109,850
Vivian HarrellFinancial ControllerSan Francisco622009/02/14$452,500
Timothy MooneyOffice ManagerLondon372008/12/11$136,200
Jackson BradshawDirectorNew York652008/09/26$645,750
Olivia LiangSupport EngineerSingapore642011/02/03$234,500
Bruno NashSoftware EngineerLondon382011/05/03$163,500
Sakura YamamotoSupport EngineerTokyo372009/08/19$139,575
Thor WaltonDeveloperNew York612013/08/11$98,540
Finn CamachoSupport EngineerSan Francisco472009/07/07$87,500
Serge BaldwinData CoordinatorSingapore642012/04/09$138,575
Zenaida FrankSoftware EngineerNew York632010/01/04$125,250
Zorita SerranoSoftware EngineerSan Francisco562012/06/01$115,000
Jennifer AcostaJunior Javascript DeveloperEdinburgh432013/02/01$75,650
Cara StevensSales AssistantNew York462011/12/06$145,600
Hermione ButlerRegional DirectorLondon472011/03/21$356,250
Lael GreerSystems AdministratorLondon212009/02/27$103,500
Jonas AlexanderDeveloperSan Francisco302010/07/14$86,500
Shad DeckerRegional DirectorEdinburgh512008/11/13$183,000
Michael BruceJavascript DeveloperSingapore292011/06/27$183,000
Donna SniderCustomer SupportNew York272011/01/25$112,000
\n\n\t\t\t\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

The Javascript shown below is used to initialise the table shown in this example:

$(document).ready(function() {\n\t$('#example').DataTable( {\n\t\t"dom": 'C<"clear">lfrtip',\n\t\t"colVis": {\n\t\t\t"buttonText": "Change columns"\n\t\t}\n\t} );\n} );\n\n\t\t\t\t\t

In addition to the above code, the following Javascript library files are loaded for use in this example:

\n\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t

The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:

\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The\n\t\t\t\t\t\tadditional CSS used is shown below:

\n\t\t\t\t\t
\n\n\t\t\t\t\t

The following CSS library files are loaded for use in this example to provide the styling of the table:

\n\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t

This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is\n\t\t\t\t\tloaded.

\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t

The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side\n\t\t\t\t\tprocessing scripts can be written in any language, using the protocol described in the DataTables\n\t\t\t\t\tdocumentation.

\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\n\t
\n\t\t
\n\t\t\t
\n\n\t\t\t
\n\t\t\t\t

Other examples

\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

Examples

\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t

Please refer to the DataTables documentation for full information about its API properties and methods.
\n\t\t\t\t\tAdditionally, there are a wide range of extras and plug-ins\n\t\t\t\t\twhich extend the capabilities of DataTables.

\n\n\t\t\t\t\t

DataTables designed and created by SpryMedia Ltd © 2007-2015
\n\t\t\t\t\tDataTables is licensed under the MIT license.

\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t
\n\n"], ["framework 'Cocoa'\n\nclass CustomView < NSView\n\n def drawRect(rect)\n NSColor.whiteColor.set\n NSBezierPath.fillRect(rect)\n img_url = NSURL.URLWithString('http://bit.ly/apple_logo_png')\n img = NSImage.alloc.initWithContentsOfURL(img_url)\n img.drawAtPoint([0,0], fromRect: NSZeroRect, operation: NSCompositeSourceOver, fraction: 1)\n end\n \nend\n\napplication = NSApplication.sharedApplication\n\n# create the window\nframe = [100, 100, 152, 186]\nmask = NSTitledWindowMask | NSClosableWindowMask\nwindow = NSWindow.alloc.initWithContentRect(frame,\n styleMask:mask,\n backing:NSBackingStoreBuffered,\n defer:false)\n\n# assign a content view instance\ncontent_view = CustomView.alloc.initWithFrame(frame)\nwindow.contentView = content_view\n\n# show the window\nwindow.display\nwindow.makeKeyAndOrderFront(nil)\nwindow.orderFrontRegardless\n\napplication.run"], [".TH trick-killsim 1 \"August 1, 2016\" \"Trick\" \"Trick User's Manual\"\n.SH NAME\ntrick-killsim \\- Kill Trick simulations\n.SH SYNOPSIS\n\\fBtrick-killsim\\fP\n.SH DESCRIPTION\n\\fBtrick-killsim\\fP is a bourne shell script whick kills all Trick simulation processes for\na user.\n.SH \"SEE ALSO\"\nAll Trick model developers and users should go through the tutorial found\nin the \\fITrick Simulation Environment User Training Materials\\fP.\nThe canonical reference for all Trick commands, files and utilities is the\n\\fITrick Simulation Environment User's Guide\\fP. Information specific to a\ngiven release of Trick tools is contained in the \\fITrick Simulation\nEnvironment Version Description\\fP for that release.\n.SH HISTORY\n1997-present : \\fBtrick-killsim\\fP was written by Greg Alexander\n\n"], ["/*\n * Copyright (C) 2015, Bin Meng \n *\n * SPDX-License-Identifier:\tGPL-2.0+\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nDECLARE_GLOBAL_DATA_PTR;\n\nbool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq)\n{\n\tstruct irq_router *priv = dev_get_priv(dev);\n\tu8 pirq;\n\tint base = priv->link_base;\n\n\tif (priv->config == PIRQ_VIA_PCI)\n\t\tdm_pci_read_config8(dev->parent, LINK_N2V(link, base), &pirq);\n\telse\n\t\tpirq = readb((uintptr_t)priv->ibase + LINK_N2V(link, base));\n\n\tpirq &= 0xf;\n\n\t/* IRQ# 0/1/2/8/13 are reserved */\n\tif (pirq < 3 || pirq == 8 || pirq == 13)\n\t\treturn false;\n\n\treturn pirq == irq ? true : false;\n}\n\nint pirq_translate_link(struct udevice *dev, int link)\n{\n\tstruct irq_router *priv = dev_get_priv(dev);\n\n\treturn LINK_V2N(link, priv->link_base);\n}\n\nvoid pirq_assign_irq(struct udevice *dev, int link, u8 irq)\n{\n\tstruct irq_router *priv = dev_get_priv(dev);\n\tint base = priv->link_base;\n\n\t/* IRQ# 0/1/2/8/13 are reserved */\n\tif (irq < 3 || irq == 8 || irq == 13)\n\t\treturn;\n\n\tif (priv->config == PIRQ_VIA_PCI)\n\t\tdm_pci_write_config8(dev->parent, LINK_N2V(link, base), irq);\n\telse\n\t\twriteb(irq, (uintptr_t)priv->ibase + LINK_N2V(link, base));\n}\n\nstatic struct irq_info *check_dup_entry(struct irq_info *slot_base,\n\t\t\t\t\tint entry_num, int bus, int device)\n{\n\tstruct irq_info *slot = slot_base;\n\tint i;\n\n\tfor (i = 0; i < entry_num; i++) {\n\t\tif (slot->bus == bus && slot->devfn == (device << 3))\n\t\t\tbreak;\n\t\tslot++;\n\t}\n\n\treturn (i == entry_num) ? NULL : slot;\n}\n\nstatic inline void fill_irq_info(struct irq_router *priv, struct irq_info *slot,\n\t\t\t\t int bus, int device, int pin, int pirq)\n{\n\tslot->bus = bus;\n\tslot->devfn = (device << 3) | 0;\n\tslot->irq[pin - 1].link = LINK_N2V(pirq, priv->link_base);\n\tslot->irq[pin - 1].bitmap = priv->irq_mask;\n}\n\nstatic int create_pirq_routing_table(struct udevice *dev)\n{\n\tstruct irq_router *priv = dev_get_priv(dev);\n\tconst void *blob = gd->fdt_blob;\n\tint node;\n\tint len, count;\n\tconst u32 *cell;\n\tstruct irq_routing_table *rt;\n\tstruct irq_info *slot, *slot_base;\n\tint irq_entries = 0;\n\tint i;\n\tint ret;\n\n\tnode = dev_of_offset(dev);\n\n\t/* extract the bdf from fdt_pci_addr */\n\tpriv->bdf = dm_pci_get_bdf(dev->parent);\n\n\tret = fdt_stringlist_search(blob, node, \"intel,pirq-config\", \"pci\");\n\tif (!ret) {\n\t\tpriv->config = PIRQ_VIA_PCI;\n\t} else {\n\t\tret = fdt_stringlist_search(blob, node, \"intel,pirq-config\",\n\t\t\t\t\t \"ibase\");\n\t\tif (!ret)\n\t\t\tpriv->config = PIRQ_VIA_IBASE;\n\t\telse\n\t\t\treturn -EINVAL;\n\t}\n\n\tret = fdtdec_get_int(blob, node, \"intel,pirq-link\", -1);\n\tif (ret == -1)\n\t\treturn ret;\n\tpriv->link_base = ret;\n\n\tpriv->irq_mask = fdtdec_get_int(blob, node,\n\t\t\t\t\t\"intel,pirq-mask\", PIRQ_BITMAP);\n\n\tif (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) {\n\t\t/* Reserve IRQ9 for SCI */\n\t\tpriv->irq_mask &= ~(1 << 9);\n\t}\n\n\tif (priv->config == PIRQ_VIA_IBASE) {\n\t\tint ibase_off;\n\n\t\tibase_off = fdtdec_get_int(blob, node, \"intel,ibase-offset\", 0);\n\t\tif (!ibase_off)\n\t\t\treturn -EINVAL;\n\n\t\t/*\n\t\t * Here we assume that the IBASE register has already been\n\t\t * properly configured by U-Boot before.\n\t\t *\n\t\t * By 'valid' we mean:\n\t\t * 1) a valid memory space carved within system memory space\n\t\t * assigned to IBASE register block.\n\t\t * 2) memory range decoding is enabled.\n\t\t * Hence we don't do any santify test here.\n\t\t */\n\t\tdm_pci_read_config32(dev->parent, ibase_off, &priv->ibase);\n\t\tpriv->ibase &= ~0xf;\n\t}\n\n\tpriv->actl_8bit = fdtdec_get_bool(blob, node, \"intel,actl-8bit\");\n\tpriv->actl_addr = fdtdec_get_int(blob, node, \"intel,actl-addr\", 0);\n\n\tcell = fdt_getprop(blob, node, \"intel,pirq-routing\", &len);\n\tif (!cell || len % sizeof(struct pirq_routing))\n\t\treturn -EINVAL;\n\tcount = len / sizeof(struct pirq_routing);\n\n\trt = calloc(1, sizeof(struct irq_routing_table));\n\tif (!rt)\n\t\treturn -ENOMEM;\n\n\t/* Populate the PIRQ table fields */\n\trt->signature = PIRQ_SIGNATURE;\n\trt->version = PIRQ_VERSION;\n\trt->rtr_bus = PCI_BUS(priv->bdf);\n\trt->rtr_devfn = (PCI_DEV(priv->bdf) << 3) | PCI_FUNC(priv->bdf);\n\trt->rtr_vendor = PCI_VENDOR_ID_INTEL;\n\trt->rtr_device = PCI_DEVICE_ID_INTEL_ICH7_31;\n\n\tslot_base = rt->slots;\n\n\t/* Now fill in the irq_info entries in the PIRQ table */\n\tfor (i = 0; i < count;\n\t i++, cell += sizeof(struct pirq_routing) / sizeof(u32)) {\n\t\tstruct pirq_routing pr;\n\n\t\tpr.bdf = fdt_addr_to_cpu(cell[0]);\n\t\tpr.pin = fdt_addr_to_cpu(cell[1]);\n\t\tpr.pirq = fdt_addr_to_cpu(cell[2]);\n\n\t\tdebug(\"irq_info %d: b.d.f %x.%x.%x INT%c PIRQ%c\\n\",\n\t\t i, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf),\n\t\t PCI_FUNC(pr.bdf), 'A' + pr.pin - 1,\n\t\t 'A' + pr.pirq);\n\n\t\tslot = check_dup_entry(slot_base, irq_entries,\n\t\t\t\t PCI_BUS(pr.bdf), PCI_DEV(pr.bdf));\n\t\tif (slot) {\n\t\t\tdebug(\"found entry for bus %d device %d, \",\n\t\t\t PCI_BUS(pr.bdf), PCI_DEV(pr.bdf));\n\n\t\t\tif (slot->irq[pr.pin - 1].link) {\n\t\t\t\tdebug(\"skipping\\n\");\n\n\t\t\t\t/*\n\t\t\t\t * Sanity test on the routed PIRQ pin\n\t\t\t\t *\n\t\t\t\t * If they don't match, show a warning to tell\n\t\t\t\t * there might be something wrong with the PIRQ\n\t\t\t\t * routing information in the device tree.\n\t\t\t\t */\n\t\t\t\tif (slot->irq[pr.pin - 1].link !=\n\t\t\t\t\tLINK_N2V(pr.pirq, priv->link_base))\n\t\t\t\t\tdebug(\"WARNING: Inconsistent PIRQ routing information\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t} else {\n\t\t\tslot = slot_base + irq_entries++;\n\t\t}\n\t\tdebug(\"writing INT%c\\n\", 'A' + pr.pin - 1);\n\t\tfill_irq_info(priv, slot, PCI_BUS(pr.bdf), PCI_DEV(pr.bdf),\n\t\t\t pr.pin, pr.pirq);\n\t}\n\n\trt->size = irq_entries * sizeof(struct irq_info) + 32;\n\n\t/* Fix up the table checksum */\n\trt->checksum = table_compute_checksum(rt, rt->size);\n\n\tgd->arch.pirq_routing_table = rt;\n\n\treturn 0;\n}\n\nstatic void irq_enable_sci(struct udevice *dev)\n{\n\tstruct irq_router *priv = dev_get_priv(dev);\n\n\tif (priv->actl_8bit) {\n\t\t/* Bit7 must be turned on to enable ACPI */\n\t\tdm_pci_write_config8(dev->parent, priv->actl_addr, 0x80);\n\t} else {\n\t\t/* Write 0 to enable SCI on IRQ9 */\n\t\tif (priv->config == PIRQ_VIA_PCI)\n\t\t\tdm_pci_write_config32(dev->parent, priv->actl_addr, 0);\n\t\telse\n\t\t\twritel(0, (uintptr_t)priv->ibase + priv->actl_addr);\n\t}\n}\n\nint irq_router_common_init(struct udevice *dev)\n{\n\tint ret;\n\n\tret = create_pirq_routing_table(dev);\n\tif (ret) {\n\t\tdebug(\"Failed to create pirq routing table\\n\");\n\t\treturn ret;\n\t}\n\t/* Route PIRQ */\n\tpirq_route_irqs(dev, gd->arch.pirq_routing_table->slots,\n\t\t\tget_irq_slot_count(gd->arch.pirq_routing_table));\n\n\tif (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE))\n\t\tirq_enable_sci(dev);\n\n\treturn 0;\n}\n\nint irq_router_probe(struct udevice *dev)\n{\n\treturn irq_router_common_init(dev);\n}\n\nulong write_pirq_routing_table(ulong addr)\n{\n\tif (!gd->arch.pirq_routing_table)\n\t\treturn addr;\n\n\treturn copy_pirq_routing_table(addr, gd->arch.pirq_routing_table);\n}\n\nstatic const struct udevice_id irq_router_ids[] = {\n\t{ .compatible = \"intel,irq-router\" },\n\t{ }\n};\n\nU_BOOT_DRIVER(irq_router_drv) = {\n\t.name\t\t= \"intel_irq\",\n\t.id\t\t= UCLASS_IRQ,\n\t.of_match\t= irq_router_ids,\n\t.probe\t\t= irq_router_probe,\n\t.priv_auto_alloc_size = sizeof(struct irq_router),\n};\n\nUCLASS_DRIVER(irq) = {\n\t.id\t\t= UCLASS_IRQ,\n\t.name\t\t= \"irq\",\n};\n"], ["{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"colab_type\": \"text\",\n \"id\": \"view-in-github\"\n },\n \"source\": [\n \"\\\"Open\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# Goals\\n\",\n \"\\n\",\n \"\\n\",\n \"### Learn how to use hyper parameter analyser for learning rates\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# Table of Contents\\n\",\n \"\\n\",\n \"\\n\",\n \"## [Install](#0)\\n\",\n \"\\n\",\n \"\\n\",\n \"## [Load experiment in default mode](#1)\\n\",\n \"\\n\",\n \"\\n\",\n \"## [Run Analyser](#2)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"\\n\",\n \"# Install Monk\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"## Using pip (Recommended)\\n\",\n \"\\n\",\n \" - colab (gpu) \\n\",\n \" - All bakcends: `pip install -U monk-colab`\\n\",\n \" \\n\",\n \"\\n\",\n \" - kaggle (gpu) \\n\",\n \" - All backends: `pip install -U monk-kaggle`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cuda 10.2\\t\\n\",\n \" - All backends: `pip install -U monk-cuda102`\\n\",\n \" - Gluon bakcned: `pip install -U monk-gluon-cuda102`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cuda102`\\n\",\n \" - Keras backend: `pip install -U monk-keras-cuda102`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cuda 10.1\\t\\n\",\n \" - All backend: `pip install -U monk-cuda101`\\n\",\n \"\\t - Gluon bakcned: `pip install -U monk-gluon-cuda101`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cuda101`\\n\",\n \"\\t - Keras backend: `pip install -U monk-keras-cuda101`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cuda 10.0\\t\\n\",\n \" - All backend: `pip install -U monk-cuda100`\\n\",\n \"\\t - Gluon bakcned: `pip install -U monk-gluon-cuda100`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cuda100`\\n\",\n \"\\t - Keras backend: `pip install -U monk-keras-cuda100`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cuda 9.2\\t\\n\",\n \" - All backend: `pip install -U monk-cuda92`\\n\",\n \"\\t - Gluon bakcned: `pip install -U monk-gluon-cuda92`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cuda92`\\n\",\n \"\\t - Keras backend: `pip install -U monk-keras-cuda92`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cuda 9.0\\t\\n\",\n \" - All backend: `pip install -U monk-cuda90`\\n\",\n \"\\t - Gluon bakcned: `pip install -U monk-gluon-cuda90`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cuda90`\\n\",\n \"\\t - Keras backend: `pip install -U monk-keras-cuda90`\\n\",\n \" \\n\",\n \"\\n\",\n \" - cpu \\t\\t\\n\",\n \" - All backend: `pip install -U monk-cpu`\\n\",\n \"\\t - Gluon bakcned: `pip install -U monk-gluon-cpu`\\n\",\n \"\\t - Pytorch backend: `pip install -U monk-pytorch-cpu`\\n\",\n \"\\t - Keras backend: `pip install -U monk-keras-cpu`\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"## Install Monk Manually (Not recommended)\\n\",\n \" \\n\",\n \"### Step 1: Clone the library\\n\",\n \" - git clone https://github.com/Tessellate-Imaging/monk_v1.git\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"### Step 2: Install requirements \\n\",\n \" - Linux\\n\",\n \" - Cuda 9.0\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cu90.txt`\\n\",\n \" - Cuda 9.2\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cu92.txt`\\n\",\n \" - Cuda 10.0\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cu100.txt`\\n\",\n \" - Cuda 10.1\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cu101.txt`\\n\",\n \" - Cuda 10.2\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cu102.txt`\\n\",\n \" - CPU (Non gpu system)\\n\",\n \" - `cd monk_v1/installation/Linux && pip install -r requirements_cpu.txt`\\n\",\n \" \\n\",\n \" \\n\",\n \" - Windows\\n\",\n \" - Cuda 9.0 (Experimental support)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cu90.txt`\\n\",\n \" - Cuda 9.2 (Experimental support)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cu92.txt`\\n\",\n \" - Cuda 10.0 (Experimental support)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cu100.txt`\\n\",\n \" - Cuda 10.1 (Experimental support)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cu101.txt`\\n\",\n \" - Cuda 10.2 (Experimental support)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cu102.txt`\\n\",\n \" - CPU (Non gpu system)\\n\",\n \" - `cd monk_v1/installation/Windows && pip install -r requirements_cpu.txt`\\n\",\n \" \\n\",\n \" \\n\",\n \" - Mac\\n\",\n \" - CPU (Non gpu system)\\n\",\n \" - `cd monk_v1/installation/Mac && pip install -r requirements_cpu.txt`\\n\",\n \" \\n\",\n \" \\n\",\n \" - Misc\\n\",\n \" - Colab (GPU)\\n\",\n \" - `cd monk_v1/installation/Misc && pip install -r requirements_colab.txt`\\n\",\n \" - Kaggle (GPU)\\n\",\n \" - `cd monk_v1/installation/Misc && pip install -r requirements_kaggle.txt`\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"### Step 3: Add to system path (Required for every terminal or kernel run)\\n\",\n \" - `import sys`\\n\",\n \" - `sys.path.append(\\\"monk_v1/\\\");`\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"## Dataset - Caltech-256\\n\",\n \" - https://www.kaggle.com/jessicali9530/caltech256\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"! wget --load-cookies /tmp/cookies.txt \\\"https://docs.google.com/uc?export=download&confirm=$(wget --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Lltrl2U4L8WJkyBjMBFHSaoK8dLhoItl' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\\\1\\\\n/p')&id=1Lltrl2U4L8WJkyBjMBFHSaoK8dLhoItl\\\" -O caltech256.zip && rm -rf /tmp/cookies.txt\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"! unzip -qq caltech256.zip\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# Imports\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"#Using gluon backend \\n\",\n \"\\n\",\n \"# When installed using pip\\n\",\n \"from monk.gluon_prototype import prototype\\n\",\n \"\\n\",\n \"\\n\",\n \"# When installed manually (Uncomment the following)\\n\",\n \"#import os\\n\",\n \"#import sys\\n\",\n \"#sys.path.append(\\\"monk_v1/\\\");\\n\",\n \"#sys.path.append(\\\"monk_v1/monk/\\\");\\n\",\n \"#from monk.gluon_prototype import prototype\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"\\n\",\n \"# Load experiment in default mode\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Mxnet Version: 1.5.0\\n\",\n \"\\n\",\n \"Experiment Details\\n\",\n \" Project: Project\\n\",\n \" Experiment: analyser_lr\\n\",\n \" Dir: /home/abhi/Desktop/Work/tess_tool/gui/v0.3/finetune_models/Organization/development/v5.3_roadmaps/1_getting_started_roadmap/6_hyperparameter_tuning/workspace/Project/analyser_lr/\\n\",\n \"\\n\"\n ]\n }\n ],\n \"source\": [\n \"gtf = prototype(verbose=1);\\n\",\n \"gtf.Prototype(\\\"Project\\\", \\\"analyser_lr\\\");\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Dataset Details\\n\",\n \" Train path: caltech256/train\\n\",\n \" Val path: None\\n\",\n \" CSV train path: None\\n\",\n \" CSV val path: None\\n\",\n \"\\n\",\n \"Dataset Params\\n\",\n \" Input Size: 224\\n\",\n \" Batch Size: 4\\n\",\n \" Data Shuffle: True\\n\",\n \" Processors: 4\\n\",\n \" Train-val split: 0.7\\n\",\n \"\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Pre-Composed Train Transforms\\n\",\n \"[{'RandomHorizontalFlip': {'p': 0.8}}, {'Normalize': {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}}]\\n\",\n \"\\n\",\n \"Pre-Composed Val Transforms\\n\",\n \"[{'RandomHorizontalFlip': {'p': 0.8}}, {'Normalize': {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}}]\\n\",\n \"\\n\",\n \"Dataset Numbers\\n\",\n \" Num train images: 21424\\n\",\n \" Num val images: 9183\\n\",\n \" Num classes: 257\\n\",\n \"\\n\",\n \"Model Params\\n\",\n \" Model name: resnet18_v1\\n\",\n \" Use Gpu: True\\n\",\n \" Use pretrained: True\\n\",\n \" Freeze base network: False\\n\",\n \"\\n\",\n \"Model Details\\n\",\n \" Loading pretrained model\\n\",\n \" Model Loaded on device\\n\",\n \" Model name: resnet18_v1\\n\",\n \" Num of potentially trainable layers: 41\\n\",\n \" Num of actual trainable layers: 41\\n\",\n \"\\n\",\n \"Optimizer\\n\",\n \" Name: sgd\\n\",\n \" Learning rate: 0.01\\n\",\n \" Params: {'lr': 0.01, 'momentum': 0, 'weight_decay': 0, 'momentum_dampening_rate': 0, 'clipnorm': 0.0, 'clipvalue': 0.0}\\n\",\n \"\\n\",\n \"\\n\",\n \"\\n\",\n \"Learning rate scheduler\\n\",\n \" Name: steplr\\n\",\n \" Params: {'step_size': 1, 'gamma': 0.98, 'last_epoch': -1}\\n\",\n \"\\n\",\n \"Loss\\n\",\n \" Name: softmaxcrossentropy\\n\",\n \" Params: {'weight': None, 'batch_axis': 0, 'axis_to_sum_over': -1, 'label_as_categories': True, 'label_smoothing': False}\\n\",\n \"\\n\",\n \"Training params\\n\",\n \" Num Epochs: 5\\n\",\n \"\\n\",\n \"Display params\\n\",\n \" Display progress: True\\n\",\n \" Display progress realtime: True\\n\",\n \" Save Training logs: True\\n\",\n \" Save Intermediate models: True\\n\",\n \" Intermediate model prefix: intermediate_model_\\n\",\n \"\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"monk_v1/monk/system/imports.py:160: UserWarning: ArgumentWarning: clipnorm and clipvalue are active only for keras in current version of Monk\\n\",\n \" warnings.warn(msg)\\n\",\n \"monk_v1/monk/system/imports.py:160: UserWarning: ArgumentWarning: momentum_dampening_rate is active only for pytorch in current version of Monk\\n\",\n \" warnings.warn(msg)\\n\"\n ]\n }\n ],\n \"source\": [\n \"gtf.Default(dataset_path=\\\"caltech256/train\\\", \\n\",\n \" model_name=\\\"resnet18_v1\\\", \\n\",\n \" freeze_base_network=False,\\n\",\n \" num_epochs=5);\\n\",\n \"\\n\",\n \"#Read the summary generated once you run this cell. \"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"\\n\",\n \"# Analyse Learning Rates\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"# Analysis Project Name\\n\",\n \"analysis_name = \\\"analyse_learning_rates\\\"\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"# Learning rates to explore\\n\",\n \"lrs = [0.1, 0.05, 0.01, 0.005, 0.0001];\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"# Num epochs for each sub-experiment to run\\n\",\n \"epochs=10\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"# Percentage of original dataset to take in for experimentation\\n\",\n \"percent_data=10\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"\\n\",\n \"Running Learning rate analysis\\n\",\n \"Analysis Name : analyse_learning_rates\\n\",\n \"\\n\",\n \"Running experiment : 1/5\\n\",\n \"Experiment name : Learning_Rate_0.1\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Estimated time : 3 min\\n\",\n \"Experiment Complete\\n\",\n \"\\n\",\n \"\\n\",\n \"Running experiment : 2/5\\n\",\n \"Experiment name : Learning_Rate_0.05\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Estimated time : 3 min\\n\",\n \"Experiment Complete\\n\",\n \"\\n\",\n \"\\n\",\n \"Running experiment : 3/5\\n\",\n \"Experiment name : Learning_Rate_0.01\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Estimated time : 3 min\\n\",\n \"Experiment Complete\\n\",\n \"\\n\",\n \"\\n\",\n \"Running experiment : 4/5\\n\",\n \"Experiment name : Learning_Rate_0.005\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Estimated time : 3 min\\n\",\n \"Experiment Complete\\n\",\n \"\\n\",\n \"\\n\",\n \"Running experiment : 5/5\\n\",\n \"Experiment name : Learning_Rate_0.0001\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Estimated time : 3 min\\n\",\n \"Experiment Complete\\n\",\n \"\\n\",\n \"\\n\",\n \"Comparing Experiments\\n\",\n \"Comparison ID: Comparison_analyse_learning_rates\\n\",\n \"Generated statistics post all epochs\\n\",\n \"| Experiment Name | Train Acc | Val Acc | Train Loss | Val Loss |\\n\",\n \"|----------------------+-------------+-----------+--------------+------------|\\n\",\n \"| Learning_Rate_0.1 | 0.0746437 | 0.0639731 | 5.10316 | 5.27679 |\\n\",\n \"| Learning_Rate_0.05 | 0.358965 | 0.23569 | 2.78242 | 3.77081 |\\n\",\n \"| Learning_Rate_0.01 | 0.978995 | 0.47138 | 0.2577 | 2.3881 |\\n\",\n \"| Learning_Rate_0.005 | 0.945611 | 0.491582 | 0.599715 | 2.53947 |\\n\",\n \"| Learning_Rate_0.0001 | 0.0982746 | 0.0808081 | 5.119 | 5.32924 |\\n\",\n \"\\n\"\n ]\n },\n {\n \"data\": {\n \"text/plain\": [\n \"
\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n },\n {\n \"data\": {\n \"text/plain\": [\n \"
\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n },\n {\n \"data\": {\n \"text/plain\": [\n \"
\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n },\n {\n \"data\": {\n \"text/plain\": [\n \"
\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n },\n {\n \"data\": {\n \"text/plain\": [\n \"
\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"# \\\"keep_all\\\" - Keep all the sub experiments created\\n\",\n \"# \\\"keep_non\\\" - Delete all sub experiments created\\n\",\n \"analysis = gtf.Analyse_Learning_Rates(analysis_name, lrs, percent_data, \\n\",\n \" num_epochs=epochs, state=\\\"keep_none\\\"); \"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"## Analysis\\n\",\n \"\\n\",\n \" - LR as 0.1 doesnt work\\n\",\n \" - Same is the case with 0.0001\\n\",\n \" \\n\",\n \" - Of the other's lr as 0.01 produces least validation loss\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"## Update learning rate\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 10,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Update: Learning Rate - 0.01\\n\",\n \"\\n\"\n ]\n },\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/home/abhi/.virtualenvs/finetune_py36/lib/python3.6/site-packages/mxnet/gluon/data/vision/datasets.py:312: UserWarning: Ignoring caltech256/train/198.spider/RENAME2 of type . Only support .jpg, .jpeg, .png\\n\",\n \" filename, ext, ', '.join(self._exts)))\\n\"\n ]\n },\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"Pre-Composed Train Transforms\\n\",\n \"[{'RandomHorizontalFlip': {'p': 0.8}}, {'Normalize': {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}}]\\n\",\n \"\\n\",\n \"Pre-Composed Val Transforms\\n\",\n \"[{'RandomHorizontalFlip': {'p': 0.8}}, {'Normalize': {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}}]\\n\",\n \"\\n\",\n \"Dataset Numbers\\n\",\n \" Num train images: 21424\\n\",\n \" Num val images: 9183\\n\",\n \" Num classes: 257\\n\",\n \"\\n\",\n \"Model Details\\n\",\n \" Loading pretrained model\\n\",\n \" Model Loaded on device\\n\",\n \" Model name: resnet18_v1\\n\",\n \" Num of potentially trainable layers: 41\\n\",\n \" Num of actual trainable layers: 41\\n\",\n \"\\n\"\n ]\n }\n ],\n \"source\": [\n \"gtf.update_learning_rate(0.01);\\n\",\n \"\\n\",\n \"# Very important to reload post updates\\n\",\n \"gtf.Reload();\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"#Start Training\\n\",\n \"gtf.Train();\\n\",\n \"\\n\",\n \"#Read the training summary generated once you run the cell and training is completed\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# Goals Completed\\n\",\n \"\\n\",\n \"### Learn how to use hyper parameter analyser for learning rates\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.6.9\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"], ["// Copyright 2013 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef V8_CRANKSHAFT_HYDROGEN_OSR_H_\n#define V8_CRANKSHAFT_HYDROGEN_OSR_H_\n\n#include \"src/ast.h\"\n#include \"src/crankshaft/hydrogen.h\"\n#include \"src/zone.h\"\n\nnamespace v8 {\nnamespace internal {\n\n// Responsible for building graph parts related to OSR and otherwise\n// setting up the graph to do an OSR compile.\nclass HOsrBuilder : public ZoneObject {\n public:\n explicit HOsrBuilder(HOptimizedGraphBuilder* builder)\n : unoptimized_frame_slots_(0),\n builder_(builder),\n osr_entry_(NULL),\n osr_loop_entry_(NULL),\n osr_values_(NULL) { }\n\n // Creates the loop entry block for the given statement, setting up OSR\n // entries as necessary, and sets the current block to the new block.\n HBasicBlock* BuildOsrLoopEntry(IterationStatement* statement);\n\n // Process the hydrogen graph after it has been completed, performing\n // any OSR-specific cleanups or changes.\n void FinishGraph();\n\n // Process the OSR values and phis after initial graph optimization.\n void FinishOsrValues();\n\n // Return the number of slots in the unoptimized frame at the entry to OSR.\n int UnoptimizedFrameSlots() const {\n return unoptimized_frame_slots_;\n }\n\n bool HasOsrEntryAt(IterationStatement* statement);\n\n private:\n int unoptimized_frame_slots_;\n HOptimizedGraphBuilder* builder_;\n HBasicBlock* osr_entry_;\n HBasicBlock* osr_loop_entry_;\n ZoneList* osr_values_;\n};\n\n} // namespace internal\n} // namespace v8\n\n#endif // V8_CRANKSHAFT_HYDROGEN_OSR_H_\n"], ["\n\n\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\n"], ["# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-\n# ***** BEGIN LICENSE BLOCK *****\n# Version: MPL 1.1/GPL 2.0/LGPL 2.1\n#\n# The contents of this file are subject to the Mozilla Public License Version\n# 1.1 (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n# http://www.mozilla.org/MPL/\n#\n# Software distributed under the License is distributed on an \"AS IS\" basis,\n# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n# for the specific language governing rights and limitations under the\n# License.\n#\n# The Original Code is mozilla.org code.\n#\n# The Initial Developer of the Original Code is\n# Netscape Communications Corporation.\n# Portions created by the Initial Developer are Copyright (C) 1998\n# the Initial Developer. All Rights Reserved.\n#\n# Contributor(s):\n# Alec Flett (original author of history.js)\n# Seth Spitzer (port to Places)\n# Asaf Romano \n#\n# Alternatively, the contents of this file may be used under the terms of\n# either the GNU General Public License Version 2 or later (the \"GPL\"), or\n# the GNU Lesser General Public License Version 2.1 or later (the \"LGPL\"),\n# in which case the provisions of the GPL or the LGPL are applicable instead\n# of those above. If you wish to allow use of your version of this file only\n# under the terms of either the GPL or the LGPL, and not to allow others to\n# use your version of this file under the terms of the MPL, indicate your\n# decision by deleting the provisions above and replace them with the notice\n# and other provisions required by the GPL or the LGPL. If you do not delete\n# the provisions above, a recipient may use your version of this file under\n# the terms of any one of the MPL, the GPL or the LGPL.\n#\n# ***** END LICENSE BLOCK *****\n\nvar gHistoryTree;\nvar gSearchBox;\nvar gHistoryGrouping = \"\";\nvar gSearching = false;\n\nfunction HistorySidebarInit()\n{\n gHistoryTree = document.getElementById(\"historyTree\");\n gSearchBox = document.getElementById(\"search-box\");\n\n gHistoryGrouping = document.getElementById(\"viewButton\").\n getAttribute(\"selectedsort\");\n\n if (gHistoryGrouping == \"site\")\n document.getElementById(\"bysite\").setAttribute(\"checked\", \"true\");\n else if (gHistoryGrouping == \"visited\") \n document.getElementById(\"byvisited\").setAttribute(\"checked\", \"true\");\n else if (gHistoryGrouping == \"lastvisited\")\n document.getElementById(\"bylastvisited\").setAttribute(\"checked\", \"true\");\n else if (gHistoryGrouping == \"dayandsite\")\n document.getElementById(\"bydayandsite\").setAttribute(\"checked\", \"true\");\n else\n document.getElementById(\"byday\").setAttribute(\"checked\", \"true\");\n \n searchHistory(\"\");\n}\n\nfunction GroupBy(groupingType)\n{\n gHistoryGrouping = groupingType;\n searchHistory(gSearchBox.value);\n}\n\nfunction searchHistory(aInput)\n{\n var query = PlacesUtils.history.getNewQuery();\n var options = PlacesUtils.history.getNewQueryOptions();\n\n const NHQO = Ci.nsINavHistoryQueryOptions;\n var sortingMode;\n var resultType;\n\n switch (gHistoryGrouping) {\n case \"visited\":\n resultType = NHQO.RESULTS_AS_URI;\n sortingMode = NHQO.SORT_BY_VISITCOUNT_DESCENDING;\n break; \n case \"lastvisited\":\n resultType = NHQO.RESULTS_AS_URI;\n sortingMode = NHQO.SORT_BY_DATE_DESCENDING;\n break; \n case \"dayandsite\":\n resultType = NHQO.RESULTS_AS_DATE_SITE_QUERY;\n break;\n case \"site\":\n resultType = NHQO.RESULTS_AS_SITE_QUERY;\n sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;\n break;\n case \"day\":\n default:\n resultType = NHQO.RESULTS_AS_DATE_QUERY;\n break;\n }\n\n if (aInput) {\n query.searchTerms = aInput;\n if (gHistoryGrouping != \"visited\" && gHistoryGrouping != \"lastvisited\") {\n sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;\n resultType = NHQO.RESULTS_AS_URI;\n }\n }\n\n options.sortingMode = sortingMode;\n options.resultType = resultType;\n\n // call load() on the tree manually\n // instead of setting the place attribute in history-panel.xul\n // otherwise, we will end up calling load() twice\n gHistoryTree.load([query], options);\n}\n\nwindow.addEventListener(\"SidebarFocused\",\n function()\n gSearchBox.focus(),\n false);\n"], ["package accounting\n\nimport (\n\t\"math/big\"\n\t\"testing\"\n\n\t\"github.com/cockroachdb/apd\"\n\t\"github.com/shopspring/decimal\"\n)\n\nfunc TestFormatNumber(t *testing.T) {\n\tAssertEqual(t, FormatNumber(123456789.213123, 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumber(123456789.213123, 3, \".\", \",\"), \"123.456.789,213\")\n\tAssertEqual(t, FormatNumber(-12345.123123, 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumber(-1234.123123, 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumber(-123.123123, 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumber(-12.123123, 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumber(-1.123123, 5, \",\", \".\"), \"-1.12312\")\n\tAssertEqual(t, FormatNumber(-1, 3, \",\", \".\"), \"-1.000\")\n\tAssertEqual(t, FormatNumber(-10, 3, \",\", \".\"), \"-10.000\")\n\tAssertEqual(t, FormatNumber(-100, 3, \",\", \".\"), \"-100.000\")\n\tAssertEqual(t, FormatNumber(-1000, 3, \",\", \".\"), \"-1,000.000\")\n\tAssertEqual(t, FormatNumber(-10000, 3, \",\", \".\"), \"-10,000.000\")\n\tAssertEqual(t, FormatNumber(-100000, 3, \",\", \".\"), \"-100,000.000\")\n\tAssertEqual(t, FormatNumber(-1000000, 3, \",\", \".\"), \"-1,000,000.000\")\n\tAssertEqual(t, FormatNumber(1, 3, \",\", \".\"), \"1.000\")\n\tAssertEqual(t, FormatNumber(10, 3, \",\", \".\"), \"10.000\")\n\tAssertEqual(t, FormatNumber(100, 3, \",\", \".\"), \"100.000\")\n\tAssertEqual(t, FormatNumber(1000, 3, \",\", \".\"), \"1,000.000\")\n\tAssertEqual(t, FormatNumber(10000, 3, \",\", \".\"), \"10,000.000\")\n\tAssertEqual(t, FormatNumber(100000, 3, \",\", \".\"), \"100,000.000\")\n\tAssertEqual(t, FormatNumber(1000000, 3, \",\", \".\"), \"1,000,000.000\")\n\tAssertEqual(t, FormatNumber(1000000, 10, \" \", \".\"), \"1 000 000.0000000000\")\n\tAssertEqual(t, FormatNumber(1000000, 10, \" \", \".\"), \"1 000 000.0000000000\")\n\tAssertEqual(t, FormatNumber(uint(1000000), 3, \",\", \".\"), \"1,000,000.000\")\n\n\tAssertEqual(t, FormatNumber(big.NewRat(77777777, 3), 3, \",\", \".\"), \"25,925,925.667\")\n\tAssertEqual(t, FormatNumber(big.NewRat(-77777777, 3), 3, \",\", \".\"), \"-25,925,925.667\")\n\tAssertEqual(t, FormatNumber(big.NewRat(-7777777, 3), 3, \",\", \".\"), \"-2,592,592.333\")\n\tAssertEqual(t, FormatNumber(big.NewRat(-777776, 3), 3, \",\", \".\"), \"-259,258.667\")\n\n\tAssertEqual(t, FormatNumber(apd.New(123456789213123, -6), 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumber(apd.New(-12345123123, -6), 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumber(apd.New(-1234123123, -6), 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumber(apd.New(-123123123, -6), 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumber(apd.New(-12123123, -6), 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumber(apd.New(-1123123, -6), 5, \",\", \".\"), \"-1.12312\")\n\n\td1 := decimal.New(123456789213123, -6)\n\td2 := decimal.New(-12345123123, -6)\n\td3 := decimal.New(-1234123123, -6)\n\td4 := decimal.New(-123123123, -6)\n\td5 := decimal.New(-12123123, -6)\n\td6 := decimal.New(-1123123, -6)\n\n\tAssertEqual(t, FormatNumber(d1, 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumber(d2, 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumber(d3, 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumber(d4, 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumber(d5, 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumber(d6, 5, \",\", \".\"), \"-1.12312\")\n\n\tAssertEqual(t, FormatNumber(&d1, 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumber(&d2, 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumber(&d3, 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumber(&d4, 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumber(&d5, 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumber(&d6, 5, \",\", \".\"), \"-1.12312\")\n\n\tfunc() {\n\t\tdefer func() {\n\t\t\trecover()\n\t\t}()\n\t\tFormatNumber(false, 3, \",\", \".\") // panic: Unsupported type - bool\n\t}()\n\tfunc() {\n\t\tdefer func() {\n\t\t\trecover()\n\t\t}()\n\t\tFormatNumber(big.NewInt(1), 3, \",\", \".\") // panic: Unsupported type - *big.Int\n\t}()\n\tfunc() {\n\t\ttype demo struct {\n\t\t\tValue int\n\t\t}\n\t\tdefer func() {\n\t\t\trecover()\n\t\t}()\n\t\tFormatNumber(demo{Value: 1}, 3, \",\", \".\") // panic: Unsupported type - *big.Int\n\t}()\n}\n\nfunc TestFormatNumberInt(t *testing.T) {\n\tAssertEqual(t, FormatNumberInt(-1, 3, \",\", \".\"), \"-1.000\")\n\tAssertEqual(t, FormatNumberInt(-10, 3, \",\", \".\"), \"-10.000\")\n\tAssertEqual(t, FormatNumberInt(-100, 3, \",\", \".\"), \"-100.000\")\n\tAssertEqual(t, FormatNumberInt(-1000, 3, \",\", \".\"), \"-1,000.000\")\n\tAssertEqual(t, FormatNumberInt(-10000, 3, \",\", \".\"), \"-10,000.000\")\n\tAssertEqual(t, FormatNumberInt(-100000, 3, \",\", \".\"), \"-100,000.000\")\n\tAssertEqual(t, FormatNumberInt(-1000000, 3, \",\", \".\"), \"-1,000,000.000\")\n\tAssertEqual(t, FormatNumberInt(1, 3, \",\", \".\"), \"1.000\")\n\tAssertEqual(t, FormatNumberInt(10, 3, \",\", \".\"), \"10.000\")\n\tAssertEqual(t, FormatNumberInt(100, 3, \",\", \".\"), \"100.000\")\n\tAssertEqual(t, FormatNumberInt(1000, 3, \",\", \".\"), \"1,000.000\")\n\tAssertEqual(t, FormatNumberInt(10000, 3, \",\", \".\"), \"10,000.000\")\n\tAssertEqual(t, FormatNumberInt(100000, 3, \",\", \".\"), \"100,000.000\")\n\tAssertEqual(t, FormatNumberInt(1000000, 3, \",\", \".\"), \"1,000,000.000\")\n\tAssertEqual(t, FormatNumberInt(1000000, 10, \" \", \".\"), \"1 000 000.0000000000\")\n\tAssertEqual(t, FormatNumberInt(1000000, 10, \" \", \".\"), \"1 000 000.0000000000\")\n}\n\nfunc TestFormatNumberFloat64(t *testing.T) {\n\tAssertEqual(t, FormatNumberFloat64(123456789.213123, 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumberFloat64(-12345.123123, 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumberFloat64(-1234.123123, 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumberFloat64(-123.123123, 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumberFloat64(-12.123123, 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumberFloat64(-1.123123, 5, \",\", \".\"), \"-1.12312\")\n}\n\nfunc TestFormatNumberBigRat(t *testing.T) {\n\tAssertEqual(t, FormatNumberBigRat(big.NewRat(77777777, 3), 3, \",\", \".\"), \"25,925,925.667\")\n\tAssertEqual(t, FormatNumberBigRat(big.NewRat(-77777777, 3), 3, \",\", \".\"), \"-25,925,925.667\")\n\tAssertEqual(t, FormatNumberBigRat(big.NewRat(-7777777, 3), 3, \",\", \".\"), \"-2,592,592.333\")\n\tAssertEqual(t, FormatNumberBigRat(big.NewRat(-777776, 3), 3, \",\", \".\"), \"-259,258.667\")\n}\n\nfunc TestFormatNumberBigDecimal(t *testing.T) {\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(123456789213123, -6), 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(-12345123123, -6), 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(-1234123123, -6), 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(-123123123, -6), 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(-12123123, -6), 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumberBigDecimal(apd.New(-1123123, -6), 5, \",\", \".\"), \"-1.12312\")\n}\n\nfunc TestFormatNumberDecimal(t *testing.T) {\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(123456789213123, -6), 3, \",\", \".\"), \"123,456,789.213\")\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(-12345123123, -6), 5, \",\", \".\"), \"-12,345.12312\")\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(-1234123123, -6), 5, \",\", \".\"), \"-1,234.12312\")\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(-123123123, -6), 5, \",\", \".\"), \"-123.12312\")\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(-12123123, -6), 5, \",\", \".\"), \"-12.12312\")\n\tAssertEqual(t, FormatNumberDecimal(decimal.New(-1123123, -6), 5, \",\", \".\"), \"-1.12312\")\n}\n"], ["/*\n * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nnamespace TencentCloud.Billing.V20180709.Models\n{\n using Newtonsoft.Json;\n using System.Collections.Generic;\n using TencentCloud.Common;\n\n public class BillTagInfo : AbstractModel\n {\n \n /// \n /// \u5206\u8d26\u6807\u7b7e\u952e\n /// \n [JsonProperty(\"TagKey\")]\n public string TagKey{ get; set; }\n\n /// \n /// \u6807\u7b7e\u503c\n /// \n [JsonProperty(\"TagValue\")]\n public string TagValue{ get; set; }\n\n\n /// \n /// For internal usage only. DO NOT USE IT.\n /// \n internal override void ToMap(Dictionary map, string prefix)\n {\n this.SetParamSimple(map, prefix + \"TagKey\", this.TagKey);\n this.SetParamSimple(map, prefix + \"TagValue\", this.TagValue);\n }\n }\n}\n\n"]]