diff --git a/_site/2024/08/21/sprint1_plan_IPYNB_2_.html b/_site/2024/08/21/sprint1_plan_IPYNB_2_.html index 548d838..ca90519 100644 --- a/_site/2024/08/21/sprint1_plan_IPYNB_2_.html +++ b/_site/2024/08/21/sprint1_plan_IPYNB_2_.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/404.html b/_site/404.html index de0f0ab..eecc60c 100644 --- a/_site/404.html +++ b/_site/404.html @@ -40,6 +40,11 @@ + + /Cookie Clicker + + + diff --git a/_site/README4YML.html b/_site/README4YML.html index 2edcbf6..cc7c0ed 100644 --- a/_site/README4YML.html +++ b/_site/README4YML.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/about/index.html b/_site/about/index.html index c175aed..f5f104b 100644 --- a/_site/about/index.html +++ b/_site/about/index.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/assets/js/search-data.json b/_site/assets/js/search-data.json index 91d1e69..9ba2ce2 100644 --- a/_site/assets/js/search-data.json +++ b/_site/assets/js/search-data.json @@ -173,6 +173,17 @@ ,"page4": { + "title": "Cookie Clicker", + "content": "Cookie Clicker . Cookies: 0 . . Shop . Buy Clicker (Cost: 10 Clickers) . You have 0 workers. . Buy Factory (Cost: 500 Cookies) . You have 0 factories. .", + "url": "http://localhost:4100/adi_student/cookie/", + "relUrl": "/cookie/", + "date": "" + } + + + + + ,"page5": { "title": "", "content": ". . Click here to view my journey setting up GitHub Pages: . My Journey . . Jupyter Notebooks . Notebooks Fruits Model Emoji Fun! . Rooooooooooter1!!!! . Enter first number: . . Enter second number: . . Add Subtract Divide Multiply . . The links are not switched. . Click me to switch links! Link #1 Link #2 .", "url": "http://localhost:4100/adi_student/", @@ -183,7 +194,7 @@ - ,"page5": { + ,"page6": { "title": "My Journey", "content": "Introduction . Welcome to my adventure through the jungle of development tools and the setup of Nighthawk Pages. Just like a monkey swinging from vine to vine, I navigated through the dense forest of code, tools, and technologies, each step bringing me closer to mastering my digital environment. . 🖥️ The Setup . 🐾 The Jungle Path: Initial Setup . My journey began with setting up the basic tools needed to survive in this coding jungle: . Laptop Ready: My trusty laptop, the basecamp of my journey, was prepped and ready. Whether swinging on MacOS trees or scaling Windows cliffs, I ensured it was equipped with all necessary tools. | GitHub Account: The first vine I swung onto was creating a GitHub account, my central hub for all coding activities. This would be where I store my bananas of code and collaborate with other jungle explorers. | Visual Studio Code: My machete in the jungle, Visual Studio Code, was installed. With its various extensions, I was able to cut through the thick undergrowth of coding challenges. | . 🍌 Navigating the Code Canopy . Next, I began exploring the canopy of coding languages: . JavaScript, Python, and Java: Like a monkey with a banana, I quickly grasped the essentials of these languages, each providing a different flavor of coding. I learned to create, analyze, and deploy my projects with agility. | Jupyter Notebooks: A clearing in the jungle where I could pause, reflect, and document my journey. Jupyter Notebooks became my journal, where I captured the intricacies of my coding adventures. | . 🚀 Deploying in the Jungle . 🦜 Flying High: Publishing with GitHub Pages . Once my coding tools were sharp and ready, it was time to deploy my creations. With the help of GitHub Pages, I showcased my projects, swinging through the vines of the web, leaving a trail of my progress for others to see. . 🐍 Python Packages and 🧩 Java Packages . The jungle is full of hidden treasures—Python and Java packages. With the pip and pom.xml tools, I added these pre-written codes to my arsenal, making my journey more efficient and enjoyable. . 💬 Collaborating with Fellow Explorers . 🦁 Roar of the Jungle: Communication and Collaboration . No monkey survives alone. Through constant communication in Slack, I kept in touch with my fellow explorers, sharing tips and strategies on how to navigate this jungle. We worked together, just like a troop of monkeys, ensuring that no one was left behind. . 🛠️ Tools and Projects: Agile/Scrum Methodology . Understanding the importance of collaboration, I dived into Agile/Scrum methodologies. By using GitHub Issues and Projects, I learned how to work effectively within a team, planning our journey and making sure we reached our goals together. . Conclusion . My monkey-and-jungle-themed journey through the setup of Nighthawk Pages has been an exhilarating experience. From swinging through the vines of code to exploring the depths of collaboration, I’ve learned how to survive and thrive in this digital jungle. This journey is just the beginning, and I’m excited to continue exploring and mastering new territories in the vast jungle of technology. .", "url": "http://localhost:4100/adi_student/journey/", @@ -202,7 +213,7 @@ - ,"page9": { + ,"page10": { "title": "", "content": "@charset “utf-8”; . // Our variables $base-font-family: “PT Sans”, Helvetica, Arial, sans-serif; $base-font-size: 16px; $base-font-weight: 400; $small-font-size: $base-font-size * 0.875; $base-line-height: 1.5; . $spacing-unit: 30px; // Width of the content area $content-width: 800px; . $on-palm: 600px; $on-laptop: 800px; . // Use media queries like this: // @include media-query($on-palm) { // .wrapper { // padding-right: $spacing-unit / 2; // padding-left: $spacing-unit / 2; // } // } @mixin media-query($device) { @media screen and (max-width: $device) { @content; } } . // Import partials from sass_dir (defaults to _sass) @import “base”, “layout”, “syntax-highlighting”, “color” ; . /** . Reset some basic elements */ body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure { margin: 0; padding: 0; } | . /** . Basic styling */ body { font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; -webkit-text-size-adjust: 100%; -webkit-font-feature-settings: “kern” 1; -moz-font-feature-settings: “kern” 1; -o-font-feature-settings: “kern” 1; font-feature-settings: “kern” 1; font-kerning: normal; } | . /** . Set margin-bottom to maintain vertical rhythm */ h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure, %vertical-rhythm { margin-bottom: $spacing-unit / 2; } | . /** . Images */ img { max-width: 100%; vertical-align: middle; } | . /** . Figures */ figure > img { display: block; } | . figcaption { font-size: $small-font-size; } . /** . Lists */ ul, ol { margin-left: $spacing-unit; } | . li { > ul, > ol { margin-bottom: 0; } } . /** . Headings */ h1, h2, h3, h4, h5, h6 { font-weight: $base-font-weight; } | . /** . Links */ a { text-decoration: none; . &:hover { border-bottom: 1px dotted; } . &.page-link:hover { border-bottom: 1px dotted; } &.postLink:hover{ border-bottom: 1px dotted; } &.post-title-link:hover{ border-bottom: 1px dotted !important; } } . | . /** . Blockquotes */ blockquote { border-left: 4px solid; padding-left: $spacing-unit / 2; font-size: 18px; letter-spacing: -1px; font-style: italic; . :last-child { margin-bottom: 0; } } . | . /** . Code formatting */ pre, code { font-size: 15px; border: 1px solid; border-radius: 3px; } | . code { padding: 1px 5px; } . pre { padding: 8px 12px; overflow-x: auto; . > code { border: 0; padding-right: 0; padding-left: 0; } } . /** . Wrapper */ .wrapper { max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); margin-right: auto; margin-left: auto; padding-right: $spacing-unit; padding-left: $spacing-unit; @extend %clearfix; . @include media-query($on-laptop) { max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); max-width: calc(#{$content-width} - (#{$spacing-unit})); padding-right: $spacing-unit / 2; padding-left: $spacing-unit / 2; } } . | . /** . Clearfix */ %clearfix { . &:after { content: “”; display: table; clear: both; } } . | . /** . Icons */ .icon { . svg { display: inline-block; width: 16px; height: 16px; vertical-align: middle; } } . | . .post { font-family: “Source Sans Pro”; font-size: 18px; font-weight: 300; padding-top: 0; } .home{ padding-bottom: 5em; } .download { padding: 10px; } .authorKeyword { text-transform: uppercase; font-size: 16px; letter-spacing: 2px; text-indent: 2px; padding-top:0.5em; } .writtenBy { letter-spacing: 0; text-indent: 0; text-transform: uppercase; } .archive-intro { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; text-indent: 2px; } .archiveIntro { text-align: center; } .hint { text-transform: uppercase; font-size: 11px; letter-spacing: 2px; text-indent: 2px; } .example { font-family: ‘Menlo’; padding: 10px; } .manual { text-transform: uppercase; font-size: 16px; letter-spacing: 2px; text-indent: 2px; } .postContent { padding-top: 3.5em; text-align: center; } .postDate { float: left; text-transform: uppercase; font-family: “Source Sans Pro”; font-size: 16px; font-weight: 300; letter-spacing: 2px; text-indent: 2px; } .postTag { float: right; } .postTitle { font-weight: 400; text-align: center; text-transform: uppercase; letter-spacing: 3px; text-indent: 3px; } /** . Site header */ .site-header { border-top: 5px solid; border-bottom: 1px solid; min-height: 56px; // Positioning context for the mobile navigation icon position: relative; } .site-title { font-size: 64px; font-weight: 100; font-family: ‘PT Sans’; text-transform: capitalize; font-weight: 500; margin-top: 1em; } .site-description { font-size: 14px; letter-spacing: 2px; text-indent: 6px; font-family: ‘Josefin Sans’; } .exclamationMark { padding-left: 2em; padding-right: 2em; } .site-navigation { text-transform: uppercase; font-size: 14px; letter-spacing: 2px; text-indent: 6px; font-family: ‘Josefin Sans’; font-weight: 300; padding-top: 5em; } .page-title { text-transform: uppercase; letter-spacing: 2px; text-indent: 2px; font-family: “PT Sans”; font-size: 12px; text-align:center; } .page-tagline { font-size: 18px; font-family: “PT Sans”; text-align: center; text-transform: lowercase; } .site-nav { .page-link { line-height: $base-line-height; // Gaps between nav items, but not on the last one &:not(:last-child) { margin-right: 20px; } } @include media-query($on-palm) { position: absolute; top: 9px; right: $spacing-unit / 2; border-radius: 5px; text-align: right; .menu-icon { display: block; float: right; width: 36px; height: 26px; line-height: 0; padding-top: 10px; text-align: center; svg { width: 18px; height: 15px; } } .trigger { clear: both; display: none; } &:hover .trigger { display: block; padding-bottom: 5px; } .page-link { display: block; padding: 5px 10px; &:not(:last-child) { margin-right: 0; } margin-left: 20px; } } } /** . | Site footer */ .site-footer { border-top: 1px solid; padding: $spacing-unit 0; } .footer-heading { font-size: 18px; margin-bottom: $spacing-unit / 2; } .contact-list, .social-media-list { list-style: none; margin-left: 0; } .small-site-title { font-family: “PT Sans”; } .footer-col-wrapper { font-size: 15px; margin-left: -$spacing-unit / 2; @extend %clearfix; } .footer-content { font-family: “Josefin Sans”; font-weight: 300; letter-spacing: 1px; } .footer-col { float: left; margin-bottom: $spacing-unit / 2; padding-left: $spacing-unit / 2; } .footer-col-1 { width: -webkit-calc(35% - (#{$spacing-unit} / 2)); width: calc(35% - (#{$spacing-unit} / 2)); } .footer-col-2 { width: -webkit-calc(20% - (#{$spacing-unit} / 2)); width: calc(20% - (#{$spacing-unit} / 2)); } .footer-col-3 { width: -webkit-calc(45% - (#{$spacing-unit} / 2)); width: calc(45% - (#{$spacing-unit} / 2)); } @include media-query($on-laptop) { .footer-col-1, .footer-col-2 { width: -webkit-calc(50% - (#{$spacing-unit} / 2)); width: calc(50% - (#{$spacing-unit} / 2)); } .footer-col-3 { width: -webkit-calc(100% - (#{$spacing-unit} / 2)); width: calc(100% - (#{$spacing-unit} / 2)); } } @include media-query($on-palm) { .footer-col { float: none; width: -webkit-calc(100% - (#{$spacing-unit} / 2)); width: calc(100% - (#{$spacing-unit} / 2)); } } /** | Page content */ .page-content { padding: 0; } .page-heading { font-size: 20px; } .post-list { margin-left: 0; list-style: none; li { margin-bottom: $spacing-unit; } } .post-meta { font-size: $small-font-size; text-transform: uppercase; font-size: 16px; } .post-link { display: block; font-size: 24px; } /** . | Posts */ .post-header { margin-bottom: $spacing-unit; } .post-title { font-size: 62px; | . text-align: center; font-family: “PT Sans”; font-weight: 900; @include media-query($on-laptop) { font-size: 36px; } } .post-content { margin-bottom: $spacing-unit; padding-bottom: 3em !important; p { font-size: 1.5rem; } h2 { font-size: 32px; @include media-query($on-laptop) { font-size: 28px; } } h3 { font-size: 26px; @include media-query($on-laptop) { font-size: 22px; } } h4 { font-size: 20px; @include media-query($on-laptop) { font-size: 18px; } } } . /** . Pagination */ .pagination { padding-top: 3.5em; text-align: center; } .paginationLink { border: 0; display: inline-block; padding: 5px; text-decoration: none; transition: color 200ms ease-out; . &:hover, &:active, &:focus { border: 0; } } .paginationLinkCurrent { font-style: normal; } . | . .postNavigation { align-items: center; display: flex; justify-content: space-between; padding-bottom: 3em; . a:only-child { width: 100%; } } .postPrev, .postNext { display: inline-block; width: 49%; &:hover, &:active, &:focus { border: 0; } } .postNext { text-align: right; } . /** . Syntax highlighting styles */ .highlight { @extend %vertical-rhythm; . .c { color: #998; font-style: italic } // Comment .err { color: #a61717; background-color: #e3d2d2 } // Error .k { font-weight: bold } // Keyword .o { font-weight: bold } // Operator .cm { color: #998; font-style: italic } // Comment.Multiline .cp { color: #999; font-weight: bold } // Comment.Preproc .c1 { color: #998; font-style: italic } // Comment.Single .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special .gd { color: #000; background-color: #fdd } // Generic.Deleted .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific .ge { font-style: italic } // Generic.Emph .gr { color: #a00 } // Generic.Error .gh { color: #999 } // Generic.Heading .gi { color: #000; background-color: #dfd } // Generic.Inserted .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific .go { color: #888 } // Generic.Output .gp { color: #555 } // Generic.Prompt .gs { font-weight: bold } // Generic.Strong .gu { color: #aaa } // Generic.Subheading .gt { color: #a00 } // Generic.Traceback .kc { font-weight: bold } // Keyword.Constant .kd { font-weight: bold } // Keyword.Declaration .kp { font-weight: bold } // Keyword.Pseudo .kr { font-weight: bold } // Keyword.Reserved .kt { color: #458; font-weight: bold } // Keyword.Type .m { color: #099 } // Literal.Number .s { color: #d14 } // Literal.String .na { color: #008080 } // Name.Attribute .nb { color: #0086B3 } // Name.Builtin .nc { color: #458; font-weight: bold } // Name.Class .no { color: #008080 } // Name.Constant .ni { color: #800080 } // Name.Entity .ne { color: #900; font-weight: bold } // Name.Exception .nf { color: #900; font-weight: bold } // Name.Function .nn { color: #555 } // Name.Namespace .nt { color: #000080 } // Name.Tag .nv { color: #008080 } // Name.Variable .ow { font-weight: bold } // Operator.Word .w { color: #bbb } // Text.Whitespace .mf { color: #099 } // Literal.Number.Float .mh { color: #099 } // Literal.Number.Hex .mi { color: #099 } // Literal.Number.Integer .mo { color: #099 } // Literal.Number.Oct .sb { color: #d14 } // Literal.String.Backtick .sc { color: #d14 } // Literal.String.Char .sd { color: #d14 } // Literal.String.Doc .s2 { color: #d14 } // Literal.String.Double .se { color: #d14 } // Literal.String.Escape .sh { color: #d14 } // Literal.String.Heredoc .si { color: #d14 } // Literal.String.Interpol .sx { color: #d14 } // Literal.String.Other .sr { color: #009926 } // Literal.String.Regex .s1 { color: #d14 } // Literal.String.Single .ss { color: #990073 } // Literal.String.Symbol .bp { color: #999 } // Name.Builtin.Pseudo .vc { color: #008080 } // Name.Variable.Class .vg { color: #008080 } // Name.Variable.Global .vi { color: #008080 } // Name.Variable.Instance .il { color: #099 } // Literal.Number.Integer.Long } . | .", "url": "http://localhost:4100/adi_student/css/style.css", @@ -219,7 +230,7 @@ - ,"page12": { + ,"page13": { "title": "", "content": "Silk icon set 1.3 by Mark James mjames@gmail.com . http://www.famfamfam.com/lab/icons/silk/ . License: CC-BY-2.5 or CC-BY-3.0 .", "url": "http://localhost:4100/adi_student/venv/lib/python3.10/site-packages/werkzeug/debug/shared/ICON_LICENSE.html", @@ -230,7 +241,7 @@ - ,"page13": { + ,"page14": { "title": "", "content": "Silk icon set 1.3 by Mark James mjames@gmail.com . http://www.famfamfam.com/lab/icons/silk/ . License: CC-BY-2.5 or CC-BY-3.0 .", "url": "http://localhost:4100/adi_student/venv/lib64/python3.10/site-packages/werkzeug/debug/shared/ICON_LICENSE.html", @@ -241,7 +252,7 @@ - ,"page14": { + ,"page15": { "title": "Implementation Notes for Internationalization of Jupyter Notebook", "content": "Implementation Notes for Internationalization of Jupyter Notebook . The implementation of i18n features for jupyter notebook is still a work-in-progress: . User interface strings are (mostly) handled | Console messages are not handled (their usefulness in a translated environment is questionable) | Tooling has to be refined | . However… . How the language is selected ? . jupyter notebook command reads the LANG environment variable at startup, (xx_XX or just xx form, where xx is the language code you’re wanting to run in). | Hint: if running Windows, you can set it in PowerShell with ${Env:LANG} = "xx_XX". if running Ubuntu 14, you should set environment variable LANGUAGE="xx_XX". . The preferred language for web pages in your browser settings (xx) is also used. At the moment, it has to be first in the list. | Contributing and managing translations . Requirements . pybabel (could be installed pip install babel) | po2json (could be installed with npm install -g po2json) | . All i18n-related commands are done from the related directory : . cd notebook/i18n/ . Message extraction . The translatable material for notebook is split into 3 .pot files, as follows: . notebook/i18n/notebook.pot - Console and startup messages, basically anything that is produced by Python code. | notebook/i18n/nbui.pot - User interface strings, as extracted from the Jinja2 templates in notebook/templates/*.html | noteook/i18n/nbjs.pot - JavaScript strings and dialogs, which contain much of the visible user interface for Jupyter notebook. | . To extract the messages from the source code whenever new material is added, use the pybabel command: . pybabel extract -F babel_notebook.cfg -o notebook.pot --no-wrap --project Jupyter . pybabel extract -F babel_nbui.cfg -o nbui.pot --no-wrap --project Jupyter . pybabel extract -F babel_nbjs.cfg -o nbjs.pot --no-wrap --project Jupyter . . After this is complete you have 3 .pot files that you can give to a translator for your favorite language. . Messages compilation . After the source material has been translated, you should have 3 .po files with the same base names as the .pot files above. Put them in notebook/i18n/${LANG}/LC_MESSAGES, where ${LANG} is the language code for your desired language ( i.e. German = “de”, Japanese = “ja”, etc. ). . notebook.po and nbui.po need to be converted from .po to .mo format for use at runtime. . pybabel compile -D notebook -f -l ${LANG} -i ${LANG}/LC_MESSAGES/notebook.po -o ${LANG}/LC_MESSAGES/notebook.mo pybabel compile -D nbui -f -l ${LANG} -i ${LANG}/LC_MESSAGES/nbui.po -o ${LANG}/LC_MESSAGES/nbui.mo . nbjs.po needs to be converted to JSON for use within the JavaScript code, with po2json, as follows: . po2json -p -F -f jed1.x -d nbjs ${LANG}/LC_MESSAGES/nbjs.po ${LANG}/LC_MESSAGES/nbjs.json . When new languages get added, their language codes should be added to notebook/i18n/nbjs.json under the supported_languages element. . Tips for Jupyter developers . The biggest “mistake” I found while doing i18n enablement was the habit of constructing UI messages from English “piece parts”. For example, code like: . var msg = "Enter a new " + type + "name:"; . where type is either “file”, “directory”, or “notebook”…. . is problematic when doing translations, because the surrounding text may need to vary depending on the inserted word. In this case, you need to switch it and use complete phrases, as follows: . var rename_msg = function (type) { switch (type) { case "file": return _("Enter a new file name:"); case "directory": return _("Enter a new directory name:"); case "notebook": return _("Enter a new notebook name:"); default: return _("Enter a new name:"); } }; . Also you need to remember that adding an “s” or “es” to an English word to create the plural form doesn’t translate well. Some languages have as many as 5 or 6 different plural forms for differing numbers, so using an API such as ngettext() is necessary in order to handle these cases properly. . Known issues and future evolutions . Right now there are two different places where the desired language is set. At startup time, the Jupyter console’s messages pay attention to the setting of the ${LANG} environment variable as set in the shell at startup time. Unfortunately, this is also the time where the Jinja2 environment is set up, which means that the template stuff will always come from this setting. We really want to be paying attention to the browser’s settings for the stuff that happens in the browser, so we need to be able to retrieve this information after the browser is started and somehow communicate this back to Jinja2. So far, I haven’t yet figured out how to do this, which means that if the ${LANG} at startup doesn’t match the browser’s settings, you could potentially get a mix of languages in the UI ( never a good thing ). . | We will need to decide if console messages should be translatable, and enable them if desired. . | The keyboard shortcut editor was implemented after the i18n work was completed, so that portion does not have translation support at this time. . | Babel’s documentation has instructions on how to integrate messages extraction into your setup.py so that eventually we can just do: . ./setup.py extract_messages . | I hope to get this working at some point in the near future. 5. The conversions from .po to .mo probably can and should be done using setup.py install. . Any questions or comments please let me know @JCEmmons on github (emmo@us.ibm.com) .", "url": "http://localhost:4100/adi_student/venv/lib/python3.10/site-packages/jupyter_server/i18n/", @@ -252,7 +263,7 @@ - ,"page15": { + ,"page16": { "title": "README FIRST", "content": "README FIRST . Please do not add new templates for nbconvert here. . In order to speed up the distribution of nbconvert templates and make it simpler to share such contributions, we encourage sharing those links on our wiki page. .", "url": "http://localhost:4100/adi_student/venv/lib/python3.10/site-packages/nbconvert/templates/", @@ -263,7 +274,7 @@ - ,"page16": { + ,"page17": { "title": "Template skeleton", "content": "Template skeleton . This directory contains the template skeleton files. . Do not modify the contents of the ../latex/skeleton folder. Instead, if you need to, make modifications to the files in this folder and then run make to generate the corresponding latex skeleton files in the ../latex/skeleton folder. . If you would like to share your resulting templates with others, we encourage sharing those links on our wiki page. .", "url": "http://localhost:4100/adi_student/venv/lib/python3.10/site-packages/nbconvert/templates/skeleton/", @@ -274,7 +285,7 @@ - ,"page17": { + ,"page18": { "title": "", "content": "PyZMQ’s CFFI support is designed only for (Unix) systems conforming to have_sys_un_h = True. .", "url": "http://localhost:4100/adi_student/venv/lib/python3.10/site-packages/zmq/backend/cffi/", @@ -285,7 +296,7 @@ - ,"page18": { + ,"page19": { "title": "Implementation Notes for Internationalization of Jupyter Notebook", "content": "Implementation Notes for Internationalization of Jupyter Notebook . The implementation of i18n features for jupyter notebook is still a work-in-progress: . User interface strings are (mostly) handled | Console messages are not handled (their usefulness in a translated environment is questionable) | Tooling has to be refined | . However… . How the language is selected ? . jupyter notebook command reads the LANG environment variable at startup, (xx_XX or just xx form, where xx is the language code you’re wanting to run in). | Hint: if running Windows, you can set it in PowerShell with ${Env:LANG} = "xx_XX". if running Ubuntu 14, you should set environment variable LANGUAGE="xx_XX". . The preferred language for web pages in your browser settings (xx) is also used. At the moment, it has to be first in the list. | Contributing and managing translations . Requirements . pybabel (could be installed pip install babel) | po2json (could be installed with npm install -g po2json) | . All i18n-related commands are done from the related directory : . cd notebook/i18n/ . Message extraction . The translatable material for notebook is split into 3 .pot files, as follows: . notebook/i18n/notebook.pot - Console and startup messages, basically anything that is produced by Python code. | notebook/i18n/nbui.pot - User interface strings, as extracted from the Jinja2 templates in notebook/templates/*.html | noteook/i18n/nbjs.pot - JavaScript strings and dialogs, which contain much of the visible user interface for Jupyter notebook. | . To extract the messages from the source code whenever new material is added, use the pybabel command: . pybabel extract -F babel_notebook.cfg -o notebook.pot --no-wrap --project Jupyter . pybabel extract -F babel_nbui.cfg -o nbui.pot --no-wrap --project Jupyter . pybabel extract -F babel_nbjs.cfg -o nbjs.pot --no-wrap --project Jupyter . . After this is complete you have 3 .pot files that you can give to a translator for your favorite language. . Messages compilation . After the source material has been translated, you should have 3 .po files with the same base names as the .pot files above. Put them in notebook/i18n/${LANG}/LC_MESSAGES, where ${LANG} is the language code for your desired language ( i.e. German = “de”, Japanese = “ja”, etc. ). . notebook.po and nbui.po need to be converted from .po to .mo format for use at runtime. . pybabel compile -D notebook -f -l ${LANG} -i ${LANG}/LC_MESSAGES/notebook.po -o ${LANG}/LC_MESSAGES/notebook.mo pybabel compile -D nbui -f -l ${LANG} -i ${LANG}/LC_MESSAGES/nbui.po -o ${LANG}/LC_MESSAGES/nbui.mo . nbjs.po needs to be converted to JSON for use within the JavaScript code, with po2json, as follows: . po2json -p -F -f jed1.x -d nbjs ${LANG}/LC_MESSAGES/nbjs.po ${LANG}/LC_MESSAGES/nbjs.json . When new languages get added, their language codes should be added to notebook/i18n/nbjs.json under the supported_languages element. . Tips for Jupyter developers . The biggest “mistake” I found while doing i18n enablement was the habit of constructing UI messages from English “piece parts”. For example, code like: . var msg = "Enter a new " + type + "name:"; . where type is either “file”, “directory”, or “notebook”…. . is problematic when doing translations, because the surrounding text may need to vary depending on the inserted word. In this case, you need to switch it and use complete phrases, as follows: . var rename_msg = function (type) { switch (type) { case "file": return _("Enter a new file name:"); case "directory": return _("Enter a new directory name:"); case "notebook": return _("Enter a new notebook name:"); default: return _("Enter a new name:"); } }; . Also you need to remember that adding an “s” or “es” to an English word to create the plural form doesn’t translate well. Some languages have as many as 5 or 6 different plural forms for differing numbers, so using an API such as ngettext() is necessary in order to handle these cases properly. . Known issues and future evolutions . Right now there are two different places where the desired language is set. At startup time, the Jupyter console’s messages pay attention to the setting of the ${LANG} environment variable as set in the shell at startup time. Unfortunately, this is also the time where the Jinja2 environment is set up, which means that the template stuff will always come from this setting. We really want to be paying attention to the browser’s settings for the stuff that happens in the browser, so we need to be able to retrieve this information after the browser is started and somehow communicate this back to Jinja2. So far, I haven’t yet figured out how to do this, which means that if the ${LANG} at startup doesn’t match the browser’s settings, you could potentially get a mix of languages in the UI ( never a good thing ). . | We will need to decide if console messages should be translatable, and enable them if desired. . | The keyboard shortcut editor was implemented after the i18n work was completed, so that portion does not have translation support at this time. . | Babel’s documentation has instructions on how to integrate messages extraction into your setup.py so that eventually we can just do: . ./setup.py extract_messages . | I hope to get this working at some point in the near future. 5. The conversions from .po to .mo probably can and should be done using setup.py install. . Any questions or comments please let me know @JCEmmons on github (emmo@us.ibm.com) .", "url": "http://localhost:4100/adi_student/venv/lib64/python3.10/site-packages/jupyter_server/i18n/", @@ -296,7 +307,7 @@ - ,"page19": { + ,"page20": { "title": "README FIRST", "content": "README FIRST . Please do not add new templates for nbconvert here. . In order to speed up the distribution of nbconvert templates and make it simpler to share such contributions, we encourage sharing those links on our wiki page. .", "url": "http://localhost:4100/adi_student/venv/lib64/python3.10/site-packages/nbconvert/templates/", @@ -307,7 +318,7 @@ - ,"page20": { + ,"page21": { "title": "Template skeleton", "content": "Template skeleton . This directory contains the template skeleton files. . Do not modify the contents of the ../latex/skeleton folder. Instead, if you need to, make modifications to the files in this folder and then run make to generate the corresponding latex skeleton files in the ../latex/skeleton folder. . If you would like to share your resulting templates with others, we encourage sharing those links on our wiki page. .", "url": "http://localhost:4100/adi_student/venv/lib64/python3.10/site-packages/nbconvert/templates/skeleton/", @@ -318,7 +329,7 @@ - ,"page21": { + ,"page22": { "title": "", "content": "PyZMQ’s CFFI support is designed only for (Unix) systems conforming to have_sys_un_h = True. .", "url": "http://localhost:4100/adi_student/venv/lib64/python3.10/site-packages/zmq/backend/cffi/", diff --git a/_site/blogs/index.html b/_site/blogs/index.html index beb0e32..117f871 100644 --- a/_site/blogs/index.html +++ b/_site/blogs/index.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/github/pages/play.html b/_site/devops/github/pages/play.html index 29895e3..2b75cb4 100644 --- a/_site/devops/github/pages/play.html +++ b/_site/devops/github/pages/play.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/hacks.html b/_site/devops/hacks.html index 5b1fc23..152eef9 100644 --- a/_site/devops/hacks.html +++ b/_site/devops/hacks.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/tools/accounts.html b/_site/devops/tools/accounts.html index 9994e5b..7b4c10d 100644 --- a/_site/devops/tools/accounts.html +++ b/_site/devops/tools/accounts.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/tools/home.html b/_site/devops/tools/home.html index 53c50e5..009f881 100644 --- a/_site/devops/tools/home.html +++ b/_site/devops/tools/home.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/tools/setup.html b/_site/devops/tools/setup.html index 33f5031..cf07180 100644 --- a/_site/devops/tools/setup.html +++ b/_site/devops/tools/setup.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/devops/tools/verify.html b/_site/devops/tools/verify.html index 4d04346..9fce199 100644 --- a/_site/devops/tools/verify.html +++ b/_site/devops/tools/verify.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/index.html b/_site/index.html index 4b58f66..a1c5d39 100644 --- a/_site/index.html +++ b/_site/index.html @@ -40,6 +40,11 @@ + + /Cookie Clicker + + + diff --git a/_site/journey/index.html b/_site/journey/index.html index 1ecf721..faf5eb7 100644 --- a/_site/journey/index.html +++ b/_site/journey/index.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/pair/habits.html b/_site/pair/habits.html index 1d78d93..25f2344 100644 --- a/_site/pair/habits.html +++ b/_site/pair/habits.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/pair/programming.html b/_site/pair/programming.html index 00169ac..c8edc69 100644 --- a/_site/pair/programming.html +++ b/_site/pair/programming.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/pair/showcase.html b/_site/pair/showcase.html index a8b72e0..b42974c 100644 --- a/_site/pair/showcase.html +++ b/_site/pair/showcase.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/posts/fruits.html b/_site/posts/fruits.html index 28ec156..9bb1ca4 100644 --- a/_site/posts/fruits.html +++ b/_site/posts/fruits.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/posts/hello.html b/_site/posts/hello.html index c4ca7aa..e5f542d 100644 --- a/_site/posts/hello.html +++ b/_site/posts/hello.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/_site/search/index.html b/_site/search/index.html index 9512030..80185f8 100644 --- a/_site/search/index.html +++ b/_site/search/index.html @@ -43,6 +43,11 @@ + + /Cookie Clicker + + + diff --git a/images/cookie.png b/images/cookie.png new file mode 100644 index 0000000..d3c3ba2 Binary files /dev/null and b/images/cookie.png differ diff --git a/navigation/cookie.md b/navigation/cookie.md new file mode 100644 index 0000000..06a7ded --- /dev/null +++ b/navigation/cookie.md @@ -0,0 +1,107 @@ +--- +layout: page +title: Cookie Clicker +permalink: /cookie/ +image: ../images/cookie.png +--- + + +# Cookie Clicker + +

Cookies: 0

+ +Cookie + + + +## Shop + + + +

You have 0 workers.

+ + + +

You have 0 factories.

+ + + + + + diff --git a/sounds/click.mp3 b/sounds/click.mp3 new file mode 100644 index 0000000..b8040cf Binary files /dev/null and b/sounds/click.mp3 differ