text:
---
layout: post
title: Hacknews2021-09-18新闻
category: Hacknews
tags: hacknews
keywords: hacknews
coverage: hacknews-banner.jpg
---

Hacker News 是一家关于计算机黑客和创业公司的社会化新闻网站，由保罗·格雷厄姆的创业孵化器 Y Combinator 创建。
与其它社会化新闻网站不同的是 Hacker News 没有踩或反对一条提交新闻的选项（不过评论还是可以被有足够 Karma 的用户投反对票）；只可以赞或是完全不投票。简而言之，Hacker News 允许提交任何可以被理解为“任何满足人们求知欲”的新闻。

## HackNews Hack新闻

- [SafeButler (YC S17) Is Hiring Software Engineer (Remote)](https://www.safebutler.com/careers)
- `SafeButler（YC S17）正在招聘一名软件工程师`
- [A search engine that favors text-heavy sites and punishes modern web design](https://search.marginalia.nu/)
- `一个偏爱文本密集型网站并惩罚现代网页设计的搜索引擎`
- [The Surprising Story of the First Microprocessors (2016)](https://spectrum.ieee.org/the-surprising-story-of-the-first-microprocessors)
- `第一个微处理器的惊人故事`
- [Life-size camel sculptures in Saudi Arabia are older than Stonehenge, pyramids](https://www.smithsonianmag.com/smart-news/life-size-camel-sculptures-in-saudi-arabia-are-older-than-stonehenge-pyramids-of-giza-180978693/)
- `沙特阿拉伯真人大小的骆驼雕塑比巨石阵、金字塔还要古老`
- [Taking part in Y Combinator from Europe: is it worth it?](https://sifted.eu/articles/yc-combinator-alum-tips/)
- `参加来自欧洲的 Y Combinator：值得吗？`
- [The Linux Distributions of 1992](https://lunduke.substack.com/p/the-linux-distributions-of-1992)
- `1992 年的 Linux 发行版`
- [Goodhart's Law](https://en.wikipedia.org/wiki/Goodhart%27s_law)
- `古德哈特定律`
- [Scientists say they may have detected dark energy](https://phys.org/news/2021-09-dark-energy-scientists-possibility.html)
- `科学家称他们可能探测到暗能量`
- [The Minimum Viable Testing Process for Evaluating Startup Ideas](https://review.firstround.com/the-minimum-viable-testing-process-for-evaluating-startup-ideas)
- `评估创业想法的最小可行测试过程`
- [Building apps in minutes, not months](https://alexanderobenauer.com/labnotes/001/)
- `在几分钟内构建应用程序，而不是几个月`
- [Gitlab S-1](https://www.sec.gov/Archives/edgar/data/1653482/000162828021018818/gitlab-sx1.htm)
- `Gitlab S-1`
- [Seed – A Rust front-end framework for creating fast and reliable web apps](https://github.com/seed-rs/seed)
- `Seed – 用于创建快速可靠的 Web 应用程序的 Rust 前端框架`
- [Ginkgo Bioworks (YC S14) is going public today](https://blog.ycombinator.com/ginkgo-bioworks-s14-is-going-public-today/)
- `Ginkgo Bioworks (YC S14) 今日上市`
- [On YouTube’s recommendation system](https://blog.youtube/inside-youtube/on-youtubes-recommendation-system/)
- `YouTube：在 YouTube 的推荐系统上`
- [Ambient Chaos](https://neal.fun/ambient-chaos/)
- `环境混乱`
- [Musical components important for the Mozart K448 effect in epilepsy](https://www.nature.com/articles/s41598-021-95922-7)
- `对癫痫中莫扎特 K448 效应很重要的音乐成分`
- [Chery QQ Ice Cream goes on sale in China – a modern electric car for $4,600](https://gadgettendency.com/a-modern-electric-car-for-4600-chery-qq-ice-cream-goes-on-sale-in-china/)
- `奇瑞QQ冰淇淋电动车在中国上市 售价4600美元 可搭载4人`
- [Renting a car will be a pain until at least 2022](https://www.latimes.com/business/story/2021-09-13/car-rental-problems-persist-until-at-least-2022)
- `租车至少要到 2022 年才会痛苦`
- [Transforming OpenStreetMap into thick roads and intersections](https://a-b-street.github.io/docs/tech/map/geometry/index.html)
- `将 OpenStreetMap 转化为粗路和十字路口`
- [Unmanned submarine earmarked for Irish Sea freight crossings](https://www.bbc.co.uk/news/uk-northern-ireland-58571143)
- `无人潜艇指定用于爱尔兰海运过境点`
- [Spherical Gear video](https://www.youtube.com/watch?v=AHUv9Zda_48)
- `球面齿轮视频`
- [I Failed to Transform the Enterprise](https://anonyfox.com/blog/i-failed-to-transform-the-enterprise/)
- `企业转型失败`
- [OECD Releases “Education at a Glance 2021”](https://www.oecd-ilibrary.org/education/education-at-a-glance-2021_b35a14e5-en)
- `经合组织发布“2021 年教育概览”`
- [Tailscale free for open source projects](https://tailscale.com/blog/community-github-pricing/)
- `Tailscale 免费用于开源项目`
- [A Closer Look: How I Created a 248MP Photo of the Sun](https://petapixel.com/2021/09/15/a-closer-look-how-i-created-a-248mp-photo-of-the-sun/)
- `近距离观察：我是如何制作 248MP 的太阳照片的`
- [Headscale: Open-source implementation of the Tailscale control server](https://github.com/juanfont/headscale)
- `Headscale：Tailscale 控制服务器的开源实现`
- [Subscribe to RSS Feeds over Email](https://rssby.email/)
- `通过电子邮件订阅 RSS 提要`
- [Studying the relationship between exception handling and post-release defects](https://neverworkintheory.org/2021/09/16/exception-handling-practices-and-post-release-defects.html)
- `研究异常处理与发布后缺陷的关系`
- [Multiple Games Are Now Working with RADV's Ray-Tracing Code](https://www.phoronix.com/scan.php?page=news_item&px=RADV-Ray-Tracing-Multi-Games)
- `多个游戏现在正在使用 RADV 的光线追踪代码`
- [Justin Trudeau Vows Two-Year Ban on Foreign Home Buyers in Canada Election](https://www.bloomberg.com/news/articles/2021-08-24/trudeau-vows-two-year-ban-on-foreign-home-buyers-if-re-elected)
- `贾斯汀·特鲁多 (Justin Trudeau) 誓言在加拿大选举中禁止外国购房者两年`
- [Chafa 1.8: Terminal graphics with a side of everything](https://hpjansson.org/blag/2021/09/16/chafa-1-8-terminal-graphics-with-a-side-of-everything/)
- `Chafa 1.8：终端图形显示一切`
- [1960s Mouse Utopias Led to Grim Predictions for Future of Humanity](https://www.smithsonianmag.com/smart-news/how-mouse-utopias-1960s-led-grim-predictions-humans-180954423/)
- `1960 年代老鼠乌托邦导致对人类未来的严峻预测`
- [Tim Cook Faces Surprising Employee Unrest at Apple](https://www.nytimes.com/2021/09/17/technology/apple-employee-unrest.html)
- `蒂姆库克在苹果公司面临令人惊讶的员工骚乱`
- [DOS Subsystem for Linux](https://github.com/haileys/doslinux)
- `Linux 的 DOS 子系统`
- [A Review of “Kill It with Fire: Manage Aging Computer Systems”](https://www.usenix.org/publications/loginonline/kill-it-fire)
- `回顾“用火杀死它：管理老化的计算机系统”`
- [Russian Company Develops 32-Bit RISC-V Microcontroller](https://www.tomshardware.com/news/russian-risc-v-microcontroller)
- `俄罗斯公司开发32位RISC-V微控制器`
- [There won’t be a Goddamn creator economy if we don’t invest directly in creators](https://pizzaparty.substack.com/p/there-wont-be-a-goddamn-creator-economy)
- `如果我们不直接投资于创作者，就不会有该死的创作者经济`
- [The whitest paint could eliminate the need for air conditioning](https://news.yahoo.com/scientists-created-worlds-whitest-paint-163538024.html)
- `科学家创造了最白的油漆。`
- [Story of the Flash Fill Feature in Excel](https://blog.sigplan.org/2021/09/14/the-story-of-the-flash-fill-feature-in-excel/)
- `Excel 中的快速填充功能的故事`
- [6th Generation Stealth Fighter: Joint Effort by UK, Japan, Italy and Sweden?](https://www.19fortyfive.com/2021/09/6th-generation-stealth-fighter-joint-effort-by-uk-japan-italy-and-sweden/)
- `第六代隐形战斗机：英国、日本、意大利和瑞典的联合努力？`
- [Tracing SSL/TLS connections using eBPF](https://blog.px.dev/ebpf-openssl-tracing/)
- `使用 eBPF 跟踪 SSL/TLS 连接`
- [Greek Delivery Giant Efood Faces Major Backlash over Worker’s Rights](https://greekreporter.com/2021/09/17/greek-delivery-giant-efood-faces-major-backlash-over-workers-rights/)
- `希腊外卖巨头 Efood 面临工人权利的强烈反对`
- [NASA Is Launching a New Telescope That Could Offer Some Cosmic Eye Candy](https://www.npr.org/2021/09/16/1036600340/nasa-is-launching-a-new-telescope-that-could-offer-some-cosmic-eye-candy)
- `美国宇航局正在发射一种新的望远镜，可以提供一些宇宙的眼睛糖果`
- [ChucK: Strongly-Timed, Concurrent, and On-the-Fly Music Programming Language](https://chuck.cs.princeton.edu/)
- `ChucK：强定时、并发和动态音乐编程语言`
- [Report Details Abuse and Trauma of Immigrant Women in ICE Detention in Georgia](https://projectsouth.org/new-report-details-abuse-and-trauma-of-immigrant-women-in-ice-detention-in-georgia/)
- `报告详细说明乔治亚州 ICE 拘留所中移民妇女遭受的虐待和创伤`
- [Miniaturization and Integration of 3D Printed Microfluidics](https://rdcu.be/cxWVY)
- `3D 打印微流体的小型化和集成化`
- [Wasp-Lang (YC W21) Is Hiring Founding Engineer](item?id=28574293)
- `Wasp-Lang (YC W21) 正在招聘创始工程师`
- [A Pint a Day (1996)](https://www.chemistryworld.com/news/a-pint-a-day--/9706.article)
- `一天一品脱 (1996)`
- [Project 4K77](https://www.thestarwarstrilogy.com/project-4k77/)
- `项目 4K77`
- [A Detailed Guide to Using Feathers and Wedges (2020)](https://thestonetrust.org/guide-to-feathers-and-wedges/)
- `使用羽毛和楔子的详细指南（2020）`
- [Basic Computer Games (1978)](https://www.atariarchives.org/basicgames/)
- `基本电脑游戏`
- [Modifying the Linux Kernel – New Syscalls](https://codingkaiser.blog/2021/07/17/create-your-own-system-calls%e2%80%8a-%e2%80%8aprocess-weights/)
- `修改 Linux 内核 – 新系统调用`
- [Acoup: The Trench Stalemate](https://acoup.blog/2021/09/17/collections-no-mans-land-part-i-the-trench-stalemate/)
- `Acoup：战壕僵局`
- [Borb – A Python library to read, write, and edit PDF files](https://borbpdf.com/)
- `Borb - 一个用于读取、写入和编辑 PDF 文件的 Python 库`
- [What I Learnt Becoming a Tech Lead](https://tomgamon.com/posts/things-i-have-learned-new-tech-lead/)
- `我学到了什么成为技术负责人`
- [Doing a Job – The Management Philosophy of Adm. Hyman G. Rickover](https://govleaders.org/rickover.htm)
- `做一份工作——海曼·G·里科弗海军上将的管理哲学`
- [No-bullshit tenets for faster decision-making](https://www.rubick.com/tenets-for-faster-decisionmaking)
- `快速决策的无废话原则`
- [How I made $50K in 3 days with NFTs](https://paulstamatiou.com/how-i-made-50k-in-3-days-with-nfts/)
- `我如何使用 NFT 在 3 天内赚了 5 万美元`
- [Porter (YC W22) Is Hiring a UX/Product Engineer](https://docs.google.com/spreadsheets/d/1EX95XOnOKJdantxM9VCO68KEE8Tbltvedlzji9KoQhY/edit?usp=sharing)
- `Porter (YC W22) 正在招聘一名用户体验/产品工程师`
- [Python Programming Puzzles](https://github.com/microsoft/PythonProgrammingPuzzles)
- `Python 编程难题`
- [Herbert Gintis on Game Theory, Evolution, and Social Rationality audio](https://www.preposterousuniverse.com/podcast/2021/09/13/164-herbert-gintis-on-game-theory-evolution-and-social-rationality/)
- `Herbert Gintis 关于博弈论、进化和社会理性的音频`
- [Alexa leaks your private wishlists](https://shkspr.mobi/blog/2021/09/alexa-leaks-your-private-wishlists/)
- `Alexa 泄露了你的私人愿望清单`
- [Git Commands Explained with Cats (2017)](https://girliemac.com/blog/2017/12/26/git-purr/)
- `用 Cats 解释 Git 命令（2017 年）`
- [WAGI: WebAssembly Gateway Interface](https://github.com/deislabs/wagi)
- `WAGI：WebAssembly 网关接口`
- [India antitrust probe finds Google abused Android dominance, report shows](https://www.reuters.com/technology/india-antitrust-probe-finds-google-abused-android-dominance-report-shows-2021-09-18/)
- `印度反垄断调查发现谷歌滥用 Android 主导地位，报告显示`
- [Shortcomings of Amazon Mechanical Turk May Threaten Natural Language Generation](https://www.unite.ai/the-shortcomings-of-amazon-mechanical-turk-may-threaten-natural-language-generation-systems/)
- `Amazon Mechanical Turk 的缺点可能会威胁到自然语言生成`
- [Ultrawhite BaSO4 Paints and Films for Daytime Radiative Cooling](https://pubs.acs.org/doi/10.1021/acsami.1c02368)
- `用于日间辐射冷却的超白 BaSO4 涂料和薄膜`
- [Learning Mathematical Properties of Integers](https://arxiv.org/abs/2109.07230)
- `学习整数的数学性质`
- [Anatomy of a Cloud Infrastructure Attack via a Pull Request](https://goteleport.com/blog/hack-via-pull-request/)
- `通过拉取请求剖析云基础设施攻击`
- [Teletransportation Paradox](https://www.wikipedia.org/wiki/Teletransportation_paradox)
- `远程传输悖论`
- [Berlin buys thousands of apartments from corporate landlords](https://thinkpol.ca/2021/09/17/berlin-buys-thousands-of-apartments-from-corporate-landlords/)
- `柏林从企业房东那里购买了数千套公寓`

## HackShows Hacks展示

- [ Eacc - A new manner to write lexers/parsers in Python](https://github.com/iogf/eacc)
- `（Eacc）Python中的PLY Lex-Yacc替代`
- [ JSON Microscope – Create Graph Visualizations with JSON Data](https://nounparse.com/)
- `JSON图–使用JSON数据创建Graphviz可视化`
- [ NFC Passport/ID for remote user registration](https://passportreader.app)
- `NFC护照应用`
- [ a custom Lisp in C](https://github.com/codr7/alisp)
- `用 C 编写的可破解的自定义 Lisp`
- [ Display a bell emoji on HN comments you haven't read yet](https://gist.github.com/linkdd/76fd57d02480c3e36a4e3f8ce39322b1)
- `显示 HN：在您尚未阅读的 HN 评论上显示铃铛表情符号`
- [ Share Your CV as a Timeline](http://puu.world/fe6caea2-dfec-4213-87ce-cacfabb23d70)
- `分享您的简历作为时间表`
- [ Explo Report Builder – Embedded report builder for your application](https://explo.co/report-builder)
- `Explo Report Builder – 适用于您的应用程序的嵌入式报告生成器`
- [ Time travel debugger for web development](https://www.replay.io/)
- `Show HN：时间旅行调试器`
- [ Scriggo – a Go open-source template engine and embeddable interpreter](https://github.com/open2b/scriggo)
- `Scriggo – Go 开源模板引擎和可嵌入的解释器`
- [ Paper to HTML Converter](https://papertohtml.org)
- `纸到 HTML 转换器`
- [ Copy code from coding videos and Search inside it](https://www.blckbx.ai/)
- `从编码视频中复制代码并在其中搜索`
- [ I created a GTK time tracking client for Harvest written in Rust](https://github.com/frenkel/timer-for-harvest)
- `我为用 Rust 编写的 Harvest 创建了一个 GTK 时间跟踪客户端`
- [ Deploy to CPanel with GitHub Actions (FTP)](https://gist.github.com/mahdyar/2b99f57e30ce28a459dcc728a1893e68)
- `使用 GitHub 操作 (FTP) 部署到 CPanel`
- [ Kizie – Twitter for web, reimagined](https://kizie.co)
- `Show HN：我做了一个更好的推特？`
- [ A productivity tool that integrates with your tools and helps you plan](http://taskablehq.com/)
- `与您的工具集成并帮助您计划的生产力工具`
- [ Qsh – Improved database querying from your terminal](https://github.com/muhmud/qsh)
- `Show HN: Qsh – 改进了终端的数据库查询`
- [ Embeddinghub: A vector database built for Machine Learning embeddings](https://github.com/featureform/embeddinghub)
- `Show HN：Embeddinghub：为机器学习嵌入构建的向量数据库`
- [ Liqo v0.3 – Build a K8s super-cluster](https://github.com/liqotech/liqo/)
- `Liqo v0.3 – 搭建K8s超级集群`
- [ A <!new-syntax /> for void tags using custom elements](https://github.com/i5ik/BANG)
- `使用自定义元素的 void 标签的 \u003c!new-syntax /\u003e`
- [ Tiny-vdom – Smallest possible virtual DOM implementation](https://github.com/aidenybai/tiny-vdom)
- `Tiny-vdom – 最小的虚拟 DOM 实现`
- [ Flowbite – Tailwind CSS Components Library](https://flowbite.com/docs/getting-started/introduction/)
- `Show HN: Flowbite – Tailwind CSS 组件库 MIT 许可证`
- [ Forlater.email – an email-based bookmarking service](https://forlater.email)
- `Forlater.email – 基于电子邮件的书签服务`
- [ Monitoring and automation for email servers, starting with Postfix](https://github.com/lightmeterio/ControlCenter)
- `电子邮件服务器的监控和自动化，从 Postfix 开始`
- [ Ishim – find available one-word domain names](https://ish.im/)
- `Ishim – 查找可用的单字域名`
- [ An extension that sometimes whispers your name late at night](https://chrome.google.com/webstore/detail/whispers/cnbiogmmebcodnfckkiipfjmdheklmkk)
- `有时会在深夜低语你名字的分机`
- [ Come play games with me live on stream](https://wimble.io/bram)
- `来和我一起直播玩游戏`
- [ JavaScript sketches from my college years](https://jsfiddle.net/user/victorqribeiro/)
- `我大学时代的 JavaScript 草图`
- [ Notify a PagerDuty user without paying for extra seat](https://pagerduty.disopt.com/)
- `通知 PagerDuty 用户无需支付额外座位费用`
- [ I was playing with fundamental constants and 13.8 b years popped out](item?id=28570546)
- `我在玩基本常数，13.8 b 年突然出现`
- [ Open-Source Orphism Art Generator](https://tool.graphics/orphism)
- `开源 Orphism 艺术生成器`
- [ IoT discovery and security audit using IoTVAS API and InsightVM](https://github.com/firmalyzer/iotvas-rapid7)
- `使用 IoTVAS API 和 InsightVM 进行物联网发现和安全审计`
- [ Search YouTube videos like Google without distractions](https://yougle.page/)
- `像谷歌一样搜索 YouTube 视频，不受干扰`
- [ Variational Auctoenocder: A Simple Illustration](https://www.linkedin.com/pulse/variational-auctoenocder-simple-illustration-sergey-litvinov)
- `变分自编码器：一个简单的说明`


text:
# Help Queue Project v1: React Without create-react-app
### _Revisiting an ancient project to help students learn React_

### Notes
- We'd normally need an index.html file to have our root node that React renders everything to. (The rendering function in index.js looks like this: ReactDOM.render(_myElementToRender, myTargetNodeToRenderTo_)) But this project doesn't have any HTML files because a templating library called EJS was used: see template.ejs file.
- Instead of using the `.jsx` file extension now we usually just use regular `.js`
- JSX isn't a required part of React by the way! It's more readable, but you could just use `React.createElement()`. See the [React docs for details](https://reactjs.org/docs/react-without-jsx.html).
- The Error component gets rendered whenever someone tries to visit a route that doesn't exist (or rather, one that react-router doesn't recognize): see App.jsx and check out react-router's Switch component being used, with the Error component as the default when no other case matches

### Component Hierarchy
- App
  - Admin (lets users close tickets)
  - Error
  - TicketList
  1) Ticket
  - NewTicketControl
  1) ConfirmationQuestions (checks whether student has asked another pair first)
  2) NewTicketForm

### Setup Instructions
Make sure you have [Node](https://nodejs.org/en/download/) installed, which will include npm.
In your terminal, run these commands:
```
$ cd Desktop
$ git clone https://github.com/LeilaniL/react-help-queue.git old-help-queue
$ cd old-help-queue
$ npm i // shortcut for "install," adds the packages listed in package.json
$ npm run start // builds the project and starts a server with hot module replacement (live updates)
```
This clones the project to your Desktop into a new folder called "old-help-queue." You can change that to whatever folder name you'd prefer, or leave it out off the cloning step if "react-help-queue" won't clash with an existing folder in that location.

After running these commands, you should be able to see the project at `http://localhost:8080` in your browser.

### Known Bugs & Needed Improvements
- Selecting a ticket to show details is not finished
- Lots of console logs left in
- Do we really need two stateful, container components? (App and NewTicketControl)
- No styling
- `div`s could be replaced with `React.Fragment` or `<>`

### Tech Used
- React
- Node Package Manager
- react-router
- Babel
- webpack
- [EJS](https://ejs.co/)
- ESLint
- uuid
- Moment.js

### License

MIT License
Copyright (c) 2021 Leilani Leach

license: MIT

repository: LeilaniL/react-help-queue

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: LeilaniL/react-help-queue


text:
/*
Title: Multilanguage sites, different examples!
*/

I was developing a cordova angular/kendo mobile application. One of the user requests was a multilanguage website / mobile application.
I know there are many ways you can do this but I chose angular, and now I will guide you through the process step by step.

| Link  | Description  |
| -------  | ---------------- |
|[I learned it here ](http://www.sitepoint.com/multilingual-support-for-angularjs/ "Start here!")  |  A very good guide explaining everything|

So I started with the guide above, after I finished it I wanted to use what I learned so that I could fortify my knowledge.

.json file
```json
{
  "BANKOMATI": "ATMs",
  "POSLOVNICE": "Branches",
  "NOTIFIKACIJE": "Notifications",
  "CONTACT": "Contact us!",
  "CLOSEST": "Near by",
  "CITY": "Group by city",
  "MAP": "GMap",
  "HOME": "Home",
  "IN": "in",
  "DETAILS": "Details",
  "CALL_CENTER": "Call center",
  "EMAIL_US": "E-mail us",
  "CONTACT_FORM": "Contact form",
  "DETALJI": "Details",
  "FLAG_ICON": "kendo/translations/flags/United-Kingdom.png",
  "FLAG_NAME": "English"
}
```

 **Table of Contents**

1. [Using it as a filter](#filter)
- [Using it as a attribute ](#attribute)

## Filter
The following example shows you how to use $translate filter inside the controller.

I wanted to change the title of one of my kendoAngular mobile views.
```html
<kendo-mobile-view id="kontaktPage"
                   ng-controller="formsController"
                    k-title="langF"
                   k-transition="'slide'"
                  >
```

```js
   function langF() {
            var newVal = $translate.instant('CONTACT');
            console.log(newVal);
            return newVal;
        }

```

## Attribute
I changed my navigation footer using the translate attribute.

```html
    <kendo-mobile-footer>
        <kendo-mobile-tab-strip>
            <a href="/" data-icon="custom"><span translate="HOME"></span></a>

            <a href="kendo/views/najbliziObjekti.html#najbliziObjekti?id={{tip}}" data-icon="action">
                <span translate="CLOSEST"></span>
            </a>
            </a>
            <a href="kendo/views/groupBy.html#groupBy?id={{tip}}" data-icon="favorites">
                <span translate="CITY">
                </span>
            </a>
            <a href="kendo/views/navigacija.html#navigacija?id={{tip}}" data-icon="search">
                <span translate="MAP">

                </span>
            </a>
        </kendo-mobile-tab-strip>
    </kendo-mobile-footer>
```

repository: jerkovicl/SistemiKB

repo_name: jerkovicl/SistemiKB


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.3.0] - 2020-12-08

### Changed

- Switch from Fedora 32 to Fedora 33 (qemu 4.2.0 -> 5.0.0).

## [0.2.0] - 2020-07-01

### Changed

- Switch from Fedora 29 to Fedora 32 (qemu 3.0.0 -> 4.2.0).

## [0.1.0] - 2020-06-30

### Added

- Add github workflows.

### Changed

- Use `architect-orb` `v0.9.0`.

[Unreleased]: https://github.com/giantswarm/k8s-kvm/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/giantswarm/k8s-kvm/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/giantswarm/k8s-kvm/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/giantswarm/k8s-kvm/releases/tag/v0.1.0


text:
# Ionic Futuring Starter

This is an [Ionic](https://ionicframework.com/) starter app with [Jest](https://facebook.github.io/jest/), Crashlytics & Mixpanel.

[Ionic](https://ionicframework.com/) is a great framework for building amazing mobile apps with
[Angular](https://angular.io/), but as you may know, it comes without support for unit tests.
Yes, that's even if it seems incredible in the 21st century :-(

Of course, there are different approaches to have unit tests working with an Ionic 2+ Project, but most
of then require too much configuration and knowledge about the related tooling (jasmine, karma, ...).

[Jest](https://facebook.github.io/jest/) is a complete and easy to set-up JavaScript testing solution
created by Facebook. Some of its benefits are:

- Fast and sandboxed
- Built-in code coverage reports
- Zero configuration

This project tries to illustrate how to add support for unit tests to an Ionic 2+ project with a minimal
configuration. It's based on the awesome article [Testing Angular faster with Jest](https://www.xfive.co/blog/testing-angular-faster-jest/)
by [Michal Pierzchala](https://www.xfive.co/blog/author/michal/) and is a fork of [datencia/ionic2-jest-example](https://github.com/datencia/ionic2-jest-example).

## Summary

- Prerequisites
- Steps to run the example
- Steps to add Jest to your own Ionic 2 project

### Prerequisites

You’ll need to install the latest version of the Ionic CLI and Cordova. Before you do that,
you’ll need a recent version of Node.js. [Download the installer](https://nodejs.org/en/) for
Node.js 6 or greater and then proceed to install the Ionic CLI and Cordova for native app development:

> Verify that you are running at least node v6.x.x and npm 3.x.x by running `node -v` and `npm -v`
in a terminal / console window. Older versions may produce errors.

### Steps to run then example

- Install the latest version of the Ionic CLI and Cordova.
```bash
$ npm install -g cordova ionic
```

 > You may need to add “sudo” in front of these commands to install the utilities globally

 > If you run `ionic -v` it should return 3.0.0 (or greater)

- Clone this repo into a new project folder.
 ```bash
 $ git clone https://github.com/datencia/ionic-futuring-starter.git
 $ cd ionic-futuring-starter
 ```

- Run `npm test` (or `yarn test` if you have [yarn](https://yarnpkg.com/) installed) to run the tests.

- You can also run the command `ionic serve` to get a quick preview of the app in the browser.

repository: Futuring/ionic-futuring-starter

repo_name: Futuring/ionic-futuring-starter


text:
# DroidBoxNG
DroidBoxNG is the result of some modifications of current versions available. I've ported DroidBox to version 4.3 and added additional logging statements to monitor VM evasion attempts. All modified repositories are or will be added here (currently only for DroidBox4.3).

For relevant details about DroidBox visit:
https://code.google.com/p/droidbox/

DroidBox is build on top of a project called Taintdroid. All credits belongs to project members who worked on it. I've used Taintdroid 4.3 for porting DroidBox. Taintdroid is released under the Apache License 2.0. Refer to LICENSE for details. All relevant information about Taintdroid is available under:
http://www.appanalysis.org

repository: ms-dev/DroidBoxNG

repo_name: ms-dev/DroidBoxNG


text:
#     Github

Get SCIM provisioning information for an enterprise user

**Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.

Method: Get

OperationID: enterprise-admin/get-provisioning-information-for-enterprise-user

EndPoint:

/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}

repository: Ayehu/custom-activities

gha_language: C#

repo_name: Ayehu/custom-activities


text:
# Start-Stop-for-Button
Arduino codec program starts and stops running if the same button is pushed.

Made with:
- Arduino Nano
- 10kOhm resistor
- Momentary Button
- Hook-up wires
- Breadboard

Connect the circle following the tutorial: https://www.arduino.cc/en/Tutorial/Button

THX NickPK for share https://forum.arduino.cc/index.php?topic=416216.0


text:
# Welcome to the Simple Login App.

## Prerequisites
1. Ruby 2.x
2. Yarn

## Getting Started
1. Install Bundler at the command prompt if you haven't yet:
```
$ gem install bundle
```
2. In the application directory, install the application dependencies
```
$ bundle install
```
3. Create the database
```
$ bundle exec rails db:setup db:migrate
```
5. Run the application
```
$ bundle exec rails s
```
6. Go to `http://localhost:3000` and you'll see the sign-in page

gha_language: HTML


text:
# Example challenge

*Maintainer: your name here*

*Short description of your challenge.*

## Datasets

*Short description of your data and the task (e.g. object detection) to be performed.*

*Instructions how to generate the data*:

```
python data/generate_data.py
```

## Submissions

*Instructions on scripts/tools/libraries/methods to use to take model predictions and turn them into a valid submission file for the challenge.*

*Example submission file*:

```json
{
    "to do": "make example submission"
}
```

## Baseline

*Short description of the baseline.*

| **model**           | **checkpoint** | **// METRIC //** |
| ------------------- | -------------- | ---------------- |
| YOUR FANCY BASELINE | SOME PATH      | SOME VALUE       |

*Instructions on adapting the baseline*.

gha_license_id: NOASSERTION


text:
commercetools UI Kit 💅

  ✨ Component library based on our design system 🛠

> If you are building **Merchant Center Applications**, be sure to check out our [application-kit](https://github.com/commercetools/merchant-center-application-kit)

## Installation

```bash
$ yarn add @commercetools-frontend/ui-kit

# or

$ npm install --save @commercetools-frontend/ui-kit
```

### Required peer dependencies

UI Kit comes with some [peer dependencies](https://docs.npmjs.com/files/package.json#peerdependencies) which are required to be available in any project consuming it. These include but may not be limited to: `moment`, `moment-timezone`, `react`, `react-dom`, `react-intl` and `react-router-dom`. An up-to-date list with their respective version ranges can be found in the [package.json](https://github.com/commercetools/ui-kit/blob/master/package.json). Please make sure all packages are installed within your application for UI Kit to be able to work as expected.

### Importing

The package's main export contains all UI components.

```js
import {
  Text,
  TextInput,
  PrimaryButton,
  // etc.
} from '@commercetools-frontend/ui-kit';
```

#### Importing CSS variables

When you are developing your application using UI Kit components, chances you want to use the same design tokens as our design system. We provide them through both **CSS variables** and **JavaScript variables**.

Show details

We expose the **CSS variables** from the<EMAIL_ADDRESS>file.

**Importing css variables in css files**

You will need a [postcss-import](https://github.com/postcss/postcss-import) plugin, and a postcss variable plugin: either [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) or [postcss-css-variables](https://github.com/MadLittleMods/postcss-css-variables) would work.

```css
@import<EMAIL_ADDRESS>
.container {
  padding: var(--spacing-l);
}
```

```js
// wherever you process your CSS
postcss([postcssImportPlugin(), postcssCustomProperties()]);
```

**Using postcss-custom-properties and importFrom**

The ui-kit css variables can also be injected using [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties), removing the need to import them directly inside your css files.

```css
/* no import required! */
.container {
  padding: var(--spacing-l);
}
```

```js
// wherever you process your CSS
postcss([
  postcssCustomProperties({
    preserve: false,
    importFrom: require.resolve(
<EMAIL_ADDRESS>    ),
  }),
]);
```

**Accessing JavaScript variables and design tokens**

You can also access the JavaScript variables like this

```js
import { customProperties } from '@commercetools-frontend/ui-kit';

const primary = customProperties.colorPrimary;
```

> Please look at the [file](materials/custom-properties.js) itself to inspect which variables are available (_documentation will be provided in the future_).

## Motivation

- Declarative components serving as a design guide
- Shared independently from the application's code base
- Used across different apps consumed by different teams
- Shared language between developers and designers

## Documentation and Storybook

Available at https://uikit.commercetools.com.

repository: DavideBruner/ui-kit

repo_name: DavideBruner/ui-kit


text:
---
layout: post
title:  "[Panel Session] Meet the games industry"
categories: Event
tags: [panel, games-industry]
mathjax: false
---

* content
{:toc}

## Speakers:

* Nick Slaven [LinkedIn] – Head of Technology at Stainless Games
* Jeff Rollason [LinkedIn] – CEO and Co-Founder of AI Factory

## Date & Time:

4-5:30pm, 28 Nov 2017

## Venue:

Eng3.24, Engineering Building, QMUL Mile End campus (building 15 on the campus map)

Refreshments will be served before and after the panel session.


text:
# hparser.
it parse headers of habr.com and find most common nouns. This script creates two csv-table - 'data.csv' consiste of
nouns in normale form and date of post with this words, 'result.csv' consiste of number of week in year and top-3 most
common noun in this week.

## Requirements
This script uses Pymorphy2 morphAnalizer to analized russian text and finding noun. More about pymorphy2 here https://pymorphy2.readthedocs.io/en/latest

datas represent by pandas series http://pandas.pydata.org/pandas-docs/version/0.22/

For headers parsing it uses BeautyfullSoap 4.0 https://www.crummy.com/software/BeautifulSoup/bs4/doc/

## Installing
To install hparser just clone repository and setup needed requirements

```
git clone https://github.com/masterfocus92/hparser.git
```
in project folder use
```
pip install -r requirements.txt
```

## Launch
To launch script just launch it in console with integer arg <= 100, where arg is number of pages need to parse.
habr.com only keep 100 pages.

### Autor
*masterfocus92* - Dmitry Lomovtsev


text:
CDNMD5
==========

A helful library to allow you to create a unique version of every asset on
a CDN, but renaming the filename (on the CDN) to the md5sum hash of the file.

This means you always defeate browser cache when the file is changed, but also
always utilize browser cache when the file remains unchanged...

No more query string timestamps.

Justification
---------------

File Assets need to be stored on a CDN
but each "specific" version of the files need to be accessed,
and sometimes we are going forward in time, and backward in time,
all versions need to be available, uniquely

As such, the basic plan is:

on file creation/editing:
before you use this library, create the file...
then use this library to:

1. make a md5sum of the file ($md5hash)
2. store the md5sum of the file in a config file (commited to git)
3. make a copy of the file renamed to `"{$filename}_{$md5hash}.{$ext}"`
4. transfer the renamed copy to the CDN

At the time of rendering the file:

`Cdnmd5::url($filename) ==> http://domain/filename_md5hash.ext`

This function looks up the md5hash stored in the config file and returns
the URL to the CDN for the file...

If we are in development mode: `Configure::read('Cdnmd5.disabled') == true`

OR

If that md5hash doesn't exist for some reason (or is empty) we try to just
load the "real" file from the local repository.

Limitations:
---------------

**Filenames must be unique**, all path data is stripped when determining the
md5hash for a file and when transfering files to the CDN.  This means if you
have 'webroot/css/main.css' and 'webroot/plugin/main.css' that they will walk
on top of each other and you'll never get what you want.

I highly recommend you aggregate your assets into one or two files per type,
before you consider the **cdnmd5** processing.

Suggestions

* https://github.com/markstory/asset_compress (cakephp toolkit for all assets)
* https://developers.google.com/closure/ (slow, java, but best compression and good parser warnings)
* https://github.com/mishoo/UglifyJS2 (fast JS aggregation/minification)

Note: This library only works with one CDN at a time (for now).

Requirements:
-------------------

1. php5
2. php5-curl
3. CakePHP (could be decoupled with a little bit of work)

(CakePHP 1.3, CakePHP 2x versions available, switch branches)

NOTE: submodules added for API Libs, inside plugin/vendors

git://github.com/zeroasterisk/php-opencloud.git -> [plugindir]/vendors/php-opencloud

Installation:
-------------------

Put the plugin into the correct place in the CakePHP app:

**CakePHP 1.3**

```
cd repo
git submodule add git://github.com/zeroasterisk/cdnmd5 app/plugins/cdnmd5
cd app/plugins/cdnmd5
git checkout 1.3
cd ../../..
git submodule update --init --recursive
cp app/plugins/cdnmd5/config/cdnmd5.example.php app/config/cdnmd5.php
vim app/config/cdnmd5.php
```

Usage:
-----------------

After you create your CDNable assets (AssetCompress, Closure, Uglify, CssMin, etc)

```
App::Import('Lib', 'Cdnmd5.Cdnmd5');
Cdnmd5::process(APP . $fullPathToFile);
```

And how to render it in your Views

```
App::Import('Lib', 'Cdnmd5.Cdnmd5');
$this->Html->script(Cdnmd5::url($webrootRelativePathTofile));
```

Or with the simple helper:

```
$this->Cdnmd5->script($webrootRelativePathTofile);
```

About / License
----------------

Author: Alan Blount<EMAIL_ADDRESS>
License: MIT (see https://github.com/zeroasterisk/cdnmd5/LICENSE.txt)

(pull requests encouraged)

gha_language: PHP


text:
#Cash-Flows
=======
Our target users are small businesses who want to better manage complexities for their payables and receivables, predict their cash needs, as well as to avoid bad customers/suppliers and/or renegotiate bad terms

##Team Members
- [Alexei Pesic](https://github.com/apesic)
- [Eddie Kim](https://github.com/eddiekimosabe)
- [George Zeng](https://github.com/georgexzeng)
- [Hannan Butt](https://github.com/hab278)

repository: eddiekimosabe/SmallBizHack

repo_name: eddiekimosabe/SmallBizHack


text:
# Thai Satay Cucumber Salad

## Overview

- Yield: 2
- Prep Time: 7 mins
- Total Time: 7 mins

## Ingredients

- 1 quartered and thinly sliced cucumber

- 1 sliced long hot pepper Optional

- 2 thinly sliced shallots

- 1/4 cup sugar

- 1/3 cup vinegar

- 1/3 cup water

## Method

1. Place all ingredients in a serving bowl. Chill and serve.
---

## Notes

- In Thailand, we use long red peppers that are mild, but I have a hard time finding ones that come close in flavor to it here.

- You can cut back on the sugar if you like.

## References and Acknowledgments

[Thai Satay Cucumber Salad](https://www.thaitable.com/thai/recipe/satay)

repository: troyerta/recipes

gha_language: Python

repo_name: troyerta/recipes


text:
First, set up all the data correctly!

Make sure your working directory is:
`new_allen_nlp`.

For instance,
`/scratch/gobi1/johnchen/new_git_stuff/multimodal_fairness/src/models/new_allen_nlp`

Then, `python MortalityModelDemo.py`

# Monitoring
Tensorboard is working for free! In the experiments folder, simply do

`tensorbaord --logdir . `


text:
# Description

Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

#### Describe the solution you'd like
A clear and concise description of what you want to happen.

#### Describe alternatives you've considered(Optional)
A clear and concise description of any alternative solutions or features you've considered.

#### Additional context(Optional)
Add any other context or screenshots about the feature request here.

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My change requires a change to the documentation.
- [ ] I have made corresponding changes to the documentation
- [ ] I have read the **[CONTRIBUTING](https://github.com/we-developers-community/community-website/blob/master/CONTRIBUTING.md)** document.
- [ ] My changes generate no new warnings
- [ ] The title of my pull request is a short description of the requested changes.


text:
---
title: Image
sidebar: home_sidebar
keywords: User, Media, Avatar, Image
permalink: image.html
toc: true
folder: Types
---

## Description

<p> This object represents metadata on a image.
</p>

## Structure

| Variable  | Obligative  |Type| Description
|---|:---:|---|---|
| type  | true |String| Must be filled with "Image" value |
| fileId  | true |String |  Uuid with backend file id of an image|
| mimeType  | true |String| [mimeType](https://www.freeformatter.com/mime-types-list.html) of image |
| name  | true |String |  Backend name of an image|
| size  | true |Int| File size, bytes |
| width  | true |Int |  Image width, px |
| height  | true |Int| Image height, px |

## Sample object

```
{
      "type":"Image",
      "fileId":"Uuid_value",
      "mimeType":"JPEG",
      "name":"test_avatar.jpeg",
      "size":1024,
      "width":800,
      "height":600
   }
```

repository: btsdigital/bot-api-contract

gha_language: Kotlin

repo_name: btsdigital/bot-api-contract


text:
## Steps to run :

1. Install Python on your system -> https://www.python.org/downloads/
2. Check if Python was successfully installed on your system. Execute the command ->
   $ python --version
3. - Save https://bootstrap.pypa.io/get-pip.py as get-pip.py on your local system
   - Execute (from the same directory where get-pip.py was saved) ->
   	 $ python get-pip.py
4. Download all Python dependencies using the command ->
   $ pip install -r requirements.txt

gha_language: Jupyter Notebook


text:
# CM30229 - Circumnavigation using Lejos

## Introduction

The goal of this research is to see the effect of changing the rate of sensing on the navigation capabilities of a rover. The rover is built using parts from the LEGO Mindstorm NXJ kit. Four sensors are utilised for sensing; a Sonar, Light Sensor and Bump Sensor (x2), and three motors provide movement.

The sonar is mounted on a pivot to allow for measurements in multiple directions, as shown in figure 1. Two driven wheels are used for drive and a trolley wheel is placed at the back for stability.

Figure 1: Rover Head Sensor
![Rover Head Sensor](https://github.com/domhauton/CM30229-Intelligent-Control-Systems-Lejos/blob/master/writeup/dominic/img/headshot.JPG)

During development a reactive approach is taken, using the subsumption architecture [Wooldridge, 2009] to allow the rover to determine its current situation.

The use of the subsumption architecture is based on Brooks [1991]’ thesis that Intelligence is an emergent property of certain complex systems. During development this subsumption approach is added into the perception mechanism.

## Approach

The initial design of the rover is a simple reflex agent as described by Russell et al. [1995]. This takes numerical sensor readings, and uses transduction converting them to a qualitative proximity label in every cardinal direction, making immediate decisions based on these readings. This allows the rover to react to a crash but gives no context for recovery.

The final design uses Russell et al. [1995]’s model-based reflex agent. This allows the sensors to modify the state at individual rates. There are two sensing thread loops as shown in figure 2. This is done to prevent the sonar slowing down other sensors.

As the front sensor uses three (Bump, light and sonar) separate sensors for proximity detection the closest, most important, result is taken. To improve sensor quality 15 readings are taken every measurement and any reading more than two standard deviations away from the mean is thrown out. The remainder of the readings are averaged.

To account for arena variances, a calibration routine is used. This requests several rover placements a given distance from the arena wall on each side.

Figure 2: Final Perception Architecture
![Rover Head Sensor](https://github.com/domhauton/CM30229-Intelligent-Control-Systems-Lejos/blob/master/writeup/dominic/img/sensing-diagram.jpg)

A decision loop reads the state and determines a meta-state, (such as TOO_CLOSE_TO_WALL or WALL_NOT_FOUND,) from the current state using a subsumption architecture. If the rover is NEAR something to the front, it has crashed and it does not matter that it is NEAR an object on the side too. This meta-state is then used in the action planner, which selects the best action given a meta-state. If the rover is crashed and it is NEAR an object to the left, it does not try to reverse to the left.

The meta-state also directs the sonar. If it is following a wall on the left and has found the wall, it skips the reading on the right as it is irrelevant to the navigation. This system describes the platform for experimentation. The goal is to find if there is an optimal sensing rate.

The rover is run at a tick rate (measurements per second) of 5, 25 and 45. During a run the rover performs 10 laps of the test track (fig. 3), and the number of bump sensor activations was recorded programmatically.

Each run is done twice. The hypothesis is that the rover will perform better with a higher tick rate, but with diminishing returns. If the rover is stuck in a corner, the experiment is restarted. During each run, the rover is started in the bottom left hand corner of the arena (fig. 3) facing the left wall. The experiment is conducted with a variety of obstacle types and sizes to produce a generalised result.

Figure 3: Test Area Layout
![Rover Head Sensor](https://github.com/domhauton/CM30229-Intelligent-Control-Systems-Lejos/blob/master/writeup/dominic/img/test-area-layout.png)

The rover was shared with Ryan Cullen. Dominic Hauton built the rover itself, optimising it’s design and creating the perception system in the code, which continuously modifies proximity readings in the state, indicating how close the rover is to an object in all four cardinal directions. At this point Ryan forked the code and action selection is developed individually.

Figure 4: Stanley Rover
![Rover Head Sensor](https://github.com/domhauton/CM30229-Intelligent-Control-Systems-Lejos/blob/master/writeup/dominic/img/full.JPG)

## Results

The results of the experiment are consistent with the hypothesis. With this positive result the experiment is also conducted after doubling the rover movement speed. A higher tick rate is found to help the rover at higher speeds, leading to the conclusion that the faster the rover moves, the faster it needs to sense the environment around it.

As the results for one lap are inconsistent, the rover performs two runs of 10 laps. Both 10 lap runs were within 2 bumps per lap of each other on average, which was within the required 0.10 p-value for statistical significance.

Table 1: Bumps per lap at two speeds

| Tickrate |   5   |  25   |  45   |
| -------- |:-----:|:-----:|:-----:|
| Slow     | 23 ±2 | 14 ±0 | 16 ±1 |
| Fast	   | 53 ±3 | 46 ±2 | 26 ±2 |

The video found at [youtu.be/LOPdO0w1Uec](https://youtu.be/LOPdO0w1Uec) depicts the start of a trail run.

## Discussion

The results closely match the hypothesis, however, the sensing speed of the sonar, which is the key part of the navigation logic, is limited due to physical speed. A second sonar that does not require physical movement for sensing may improve the navigation of the rover.

Although the arena environment was kept as consistent as possible, the light sensor is very susceptible to bright light and occasionally reacted to the room light being in front of it. To make sonar readings consistent the arena is covered with hard surfaces, but even with the arena, materials of different hardness result in different distance readings.

The main take away from the research, is that to improve navigation of a rover; sensing should be increased as far as they add a tangible benefit to navigation, and the faster the movement the more important this is. In applications such as quadcopters loop times affect flight characteristics, but enabling faster loop times might mean disabling other features so this left adjustable in drone software for users. [Betaflight, 2017]. It is important for these users to understand the significance of this sensing rate change.

## Conclusion

This research set out to find the impact of sensing speed on the navigation of rovers. The results show that a faster sensing loop results in more accurate navigation with diminishing returns.

When deciding on sensing loop speeds, this level should be reached and not surpassed, as going too high might take compute cycles away from other important parts of the planning loop.

## Bibliography

   Betaflight. Betaflight FAQ. https://github.com/betaflight/betaflight/wiki/Frequently-_Asked-_Questions#what-_is-_2khz-_mode-_, 2017. [Online; accessed 28-Feb-2017].

   Rodney A Brooks. Intelligence without representation. Artificial intelligence, 47 (1-3):139–159, 1991.

   Stuart Russell, Peter Norvig, and Artificial Intelligence. A modern approach. Artificial Intelligence. Prentice-Hall, Egnlewood Cliffs, 25:27, 1995.

   Michael Wooldridge. An introduction to multiagent systems. John Wiley & Sons, 2009.


text:
+++
title = "Video Game Recommender System   Part 2: Classifier"
date = 2019-03-26

# List format.
#   0 = Simple
#   1 = Detailed
#   2 = Stream
list_format = 2

+++

Website: http://discorn.pythonanywhere.com/

# 1.	Hosting, Framework, Language
Hosting: PythonAnywhere
Framework: Flask
Languages: Python 3.6, SQLite, HTML, CSS
Classifier: Multinomial Naive Bayes
# 2.	Functionality
After the user enters the query, the program would run MNB by running NB for every individual tag (Action, Adventure, Strategy, RPG, Sport, Racing). Returning to the user would be the total amount of words for each tag, probability of every tag, number of unique words overall in the dataset, probability of every query word given every tag, and the final probability of every tag given the query.
# 3.	Algorithm
Multinomial Naive Bayes by finding the best tag through P(tag | query) = P(tag)*P(word_1 | tag)*...*P(ward_n | tag)

# Contribution
Adapting the Multinomial Naive Bayes algorithm and classifier to python 3 and accessible through PythonAnywhere without the use of sk-learn and pandas.
# Challenges:
•	Choosing between SVM and MNB for the classifier
•	Deciding which tags to use to build the classifier
# Improvements to be Made:
- [ ] CSS visual aesthetics
- [ ] Add proper accuracy with training and testing data
- [ ] Add stemming function
- [ ] Exclude stop words
- [ ] Expand to more untouched tags such as Indie

# Source Code:
https://github.com/KRT0335/RecSystem
# Dataset:
https://data.world/craigkelly/steam-game-data
# References:
Multinomial Naive Bayes from textbook:
https://nlp.stanford.edu/IR-book/pdf/13bayes.pdf
Multinomial Naive Bayes article by John Michael Kovachi
<EMAIL_ADDRESS>
Multinomial Naive Bayes Classifier for Text Analysis (Python)
https://towardsdatascience.com/multinomial-naive-bayes-classifier-for-text-analysis-python-8dd6825ece67


text:
# ServiceResourceGraphExplorer

```text
azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer
```

```text
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')
```

| Illustration | ServiceResourceGraphExplorer | ServiceResourceGraphExplorerCard | ServiceResourceGraphExplorerGroup |
| :---: | :---: | :---: | :---: |
| ![illustration for Illustration](../../../azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer.png) | ![illustration for ServiceResourceGraphExplorer](../../../azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer.Local.png) | ![illustration for ServiceResourceGraphExplorerCard](../../../azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorerCard.Local.png) | ![illustration for ServiceResourceGraphExplorerGroup](../../../azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorerGroup.Local.png) |

## Sprites
The item provides the following sriptes:

- `<$ServiceResourceGraphExplorerXs>`
- `<$ServiceResourceGraphExplorerSm>`
- `<$ServiceResourceGraphExplorerMd>`
- `<$ServiceResourceGraphExplorerLg>`

## ServiceResourceGraphExplorer

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorer
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorer('ServiceResourceGraphExplorer', 'Service Resource Graph Explorer', 'an optional tech label', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorer
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorer('ServiceResourceGraphExplorer', 'Service Resource Graph Explorer', 'an optional tech label', 'an optional description')
@enduml
```

## ServiceResourceGraphExplorerCard

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorerCard
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorerCard('ServiceResourceGraphExplorerCard', 'Service Resource Graph Explorer Card', 'an optional description')
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorerCard
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorerCard('ServiceResourceGraphExplorerCard', 'Service Resource Graph Explorer Card', 'an optional description')
@enduml
```

## ServiceResourceGraphExplorerGroup

### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorerGroup
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorerGroup('ServiceResourceGraphExplorerGroup', 'Service Resource Graph Explorer Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../.."

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('azure-11/bootstrap')

' loads the Item which embeds the element ServiceResourceGraphExplorerGroup
include('azure-11/Item/ManagementGovernance/ServiceResourceGraphExplorer')

' renders the element
ServiceResourceGraphExplorerGroup('ServiceResourceGraphExplorerGroup', 'Service Resource Graph Explorer Group', 'an optional tech label') {
    note as note
        the content of the group
    end note
}
@enduml
```

repository: tmorin/plantuml-libs

gha_language: TypeScript

repo_name: tmorin/plantuml-libs


text:
## Time to Eat
The main idea of getting the flag is Bruteforce.

#### Step-1:
After I downloaded `eat.py`, I saw the code to understand what was happening.
```py
# I wrote and debugged this code with all the convoluted "EAT" variable names.
# Was it confusing? Yes. Was debugging hard? Yes.
# Did I spend more time than I should have on this problem? Yes

EAT = int
eAT = len
EaT = print
ATE = str
EATEATEATEATEATEAT = ATE.isdigit

def Eating(eat):
    return ATE(EAT(eat)*EATEATEAT)

def EAt(eat, eats):
    print(eat, eats)
    eat1 = 0
    eat2 = 0
    eateat = 0
    eAt = ""
    while eat1 < eAT(eat) and eat2 < eAT(eats):
        if eateat%EATEATEAT == EATEATEATEATEAT//EATEATEATEAT:
            eAt += eats[eat2]
            eat2 += 1
        else:
            eAt += eat[eat1]
            eat1 += 1
        eateat += 1
    return eAt

def aten(eat):
    return eat[::EATEATEAT-EATEATEATEAT]

def eaT(eat):
    return Eating(eat[:EATEATEAT]) + aten(eat)

def aTE(eat):
    return eat#*eAT(eat)

def Ate(eat):
    return "Eat" + ATE(eAT(eat)) + eat[:EATEATEAT]

def Eat(eat):
    if eAT(eat) == 9:
        if EATEATEATEATEATEAT(eat[:EATEATEAT]) and\
            EATEATEATEATEATEAT(eat[eAT(eat)-EATEATEAT+1:]):
                eateat = EAt(eaT(eat), Ate(aTE(aten(eat))))
                if eateat == "E10a23t9090t9ae0140":
                    flag = "eaten_" + eat
                    EaT("absolutely EATEN!!! CTFlearn{",flag,"}")
                else:
                    EaT("thats not the answer. you formatted it fine tho, here's what you got\n>>", eateat)
        else:
            EaT("thats not the answer. bad format :(\
            \n(hint: 123abc456 is an example of good format)")
    else:
        EaT("thats not the answer. bad length :(")

EaT("what's the answer")
eat = input()
EATEATEAT = eAT(eat)//3
EATEATEATEAT = EATEATEAT+1
EATEATEATEATEAT = EATEATEAT-1
Eat(eat)
```

I thought this program sums 5 for 8 times to the dword where <b>jump</b> string is stored.

#### Step-2:
This challenge is more of Bruteforcing as I got fed up with Reversing.
The final string turned out to be `341eat009`

#### Step-3:
When you run the python file by `python3 eat.py`, we get the following output:

```bash
what's the answer
341eat009
1023900tae143 Eat9900
absolutely EATEN!!! CTFlearn{ eaten_341eat009 }
```

#### Step-4:
Finally, the flag becomes:
`CTFlearn{ eaten_341eat009 }`

repository: TomMalvoRiddle/CTFlearn-Writeups

path: /Reverse/Time to Eat/README.md

repo_name: TomMalvoRiddle/CTFlearn-Writeups


text:
# Update Oct 14 2019

Developement of WireGuard support continues in the PiVPN repository [here](https://github.com/pivpn/pivpn/tree/test). This repository will no longer be updated.

# Pi-guard

Modified version of the original [PiVPN](https://github.com/pivpn/pivpn) script that sets up a WireGuard server and provides management scripts.

## Installation
`curl -L https://raw.githubusercontent.com/orazioedoardo/pi-guard/master/auto-install/install.sh | bash`

## Caveats
* Only Raspbian 9 (stretch) is supported.
* WireGuard module needs to be reinstalled on kernel upgrades.
* `pi-guard -c` only runs `wg show`.

repository: orazioedoardo/pi-guard

repo_name: orazioedoardo/pi-guard


text:
rxweb

Clean Code. Built with Purpose

# Contributing to rxweb framework
If you are thinking to make rxweb framework better, that's truly great. You can contribute from a single character to core architectural work or significant documentation – all with the goal of making a robust rxweb framework which helps for everyone in their projects. Even if you are don’t feel up to writing code or documentation yet, there are a variety of other ways that you can contribute like reporting issues to testing patches.

Check out the [docs](https://rxweb.io/community/where_to_start_contributing) on how you can put your precious efforts on the rxweb framework and contribute in the respective area.

# Need Help or Found an Issue
We highly recommend for help please ask your questions on our [gitter/rxweb-project](https://gitter.im/rxweb-project/rxweb?source=orgpage) to get quick response from us. Otherthan our gitter channel you can ask your question on [StackOverflow](https://stackoverflow.com/search?q=rxweb) or [create a new issue](https://github.com/rxweb/rxweb/issues/new/choose) in our Github Repository.

For, issue please refer our [issue workflow wiki](https://github.com/rxweb/rxweb/wiki/rxweb-issue-workflow) for better visibility our issue process.

# Feature request
You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/rxweb/rxweb). If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it.

# Principal Sponsor

# License

The rxweb framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

repository: rxweb/rxweb

repo_name: rxweb/rxweb


text:
# Iris Flower Classification #
## Table of Content ##
- [Overview](#overview)
- [Motivation](#motivation)
- [Installation](#installation)
- [About the Data](#about-the-data)
- [Directory Tree Structure](#directory-tree-structure)
- [Technologies Used](#technologies-used)
- [Packages Used](#packages-used)
- [Data Collection](#data-collection)
- [Data Cleaning](#data-cleaning)
- [Exploratory Data Analysis](#exploratory-data-analysis)
- [Model Fitting](#model-fitting)
- [Accuracy and Prediction Score](#accuracy-and-prediction-score)
- [Deployment](#deployment)
- [Team](#team)

## Overview
This is a simple **Classification** project where we can able to do the classifying the **Iris flowers**.
Create the Machine Learning model that can classify the different species of the Iris flower.

## Motivation
What could be a perfect way to utilize unfortunate lockdown period? Like most of you, I spend my time Gardening, Games, Movies, Coding and read some stories as well as read some of the trending AI Papers through the Google. When i heard about the Iris Flowers Classification i could find my own interset to making this model. So i retrive the dataset form kaggle and making this idea come true.

## Installation
The Code is written in Python 3.7. If you don't have Python installed just [clik here](https://www.python.org/downloads/) and install python on your system.
If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, such as numpy, pandas, matplotlib and sklearn.

## About the Data
The Iris flower data set or Fisher's Iris data set is a multivariate data set introduced by the British statistician, eugenicist, and biologist Ronald Fisher in his 1936 paper the use of multiple measurements in taxonomic problems as an exampleof linear discriminant analysis.His contribution to statistics is way beyond the Fisher's exact test. For example, he developedthe maximum likelihood estimation and the analysis of variance (more commonly known as its acronym ANOVA) test.If you wanna get this data set just [click here](https://www.kaggle.com/arshid/iris-flower-dataset) and you will get it. For these important contributions, he has been highly regarded in the history of modern statistics, as noted on his Wikipedia page.

![Ronald Fisher](Images/Ronald.jpg)

** This is Ronald Fisher If you Wanna know more about him** Just [click here](https://en.wikipedia.org/wiki/Ronald_Fisher)

## **This can be Explain about the Iris Flower Data Measurements** ##
![](Images/1.JPG)

## Directory Tree Structure

## Technologies Used

[![Alt Text](Images/10.JPG)](https://www.python.org/)

## Packages Used

  [![Alt Text](Images/12.png)](https://numpy.org/doc/)  [![Alt Text](Images/11.png)](https://pandas.pydata.org/)

  [![Alt Text](Images/13.png)](https://seaborn.pydata.org/)  [![Alt Text](Images/15.jpg)](https://matplotlib.org/)

  [![Alt Text](Images/sk.JPG)](https://scikit-learn.org/stable/)

## Data Collection

* I got the dataset from Kaggle if you wanaa get it [click here](https://www.kaggle.com/arshid/iris-flower-dataset).
* This dataset consists of 3 categories of species which is setosa, versicolor and virginica.
* We can find two kind of data from kaggle which is CSV data and SQLITE database.
* Each iris species consists of 50 samples.
* The features of iris flower are Sepal Length in cm, Sepal Width in cm, Petal Length in cm and Petal Width in cm.
* In this Iris dataset in avilable on **[sklearn](https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html)** library.
### The following code can help to get the Iris dataset from sklearn

```python
# TODO : Load Iris Dataset

# Load iris Dataset from sklearn
from sklearn import datasets
iris = datasets.load_iris()

# Load Iris csv dataset
iris_csv = pd.read_csv('../data/Iris.csv')

# Load Iris sqlite data
data = sqlite3.connect('../data/database.sqlite')
query = data.execute('SELECT * FROM Iris')
columns = [col[0] for col in query.description]
iris_db = pd.DataFrame.from_records(data = query.fetchall(), columns = columns)
```

## Data Cleaning

We need not to cleaning the data for making the machine learning model. Because we were retrive the data from kaggle and sklearn, is already have the format of csv(Comma Separated File) It's already getting clean data. So We don't put the stuffs for data cleaning. If you wanna more about the Art of Data Cleaning Process in Machine Learning
just [Click Here](https://towardsdatascience.com/the-art-of-cleaning-your-data-b713dbd49726).

## Exploratory Data Analysis

In statistics, exploratory data analysis (EDA) is an approach to analyzing data sets to summarize their main characteristics, often with visual methods.A statistical model can be used or not, but primarily EDA is for seeing what the data can tell us beyond the formal modeling or hypothesis testing task. Here we performed some of the EDA Process to help the audience for visualize the Iris Flower data.

#### Letz Understand the correlation concepts between the data features using heatmap
```python
# TODO : Correlation between the data features
cor = df.drop("Species", axis=1).corr()
sns.heatmap(data=cor,annot = True,cmap="YlGnBu")
```
![](Images/22.JPG)

#### Next we would Understand the data features in Species Column using pairplot
```python
# TODO : Species data features
sns.pairplot(df,hue='Species')
```
![](Images/6.JPG)

#### Let's understand how the Petal length and Petal width contributes together to classify iris species.
```python
# TODO : Sepal and Petal data features
sns.relplot(x = 'PetalLengthCm', y = 'PetalWidthCm', data = df, hue = 'Species', aspect =1.5, height = 4)
```

![](Images/00.JPG)

#### Let's understand how the null values are already cleared and also visualize using the heatmap
```python
# TODO : Checking the null values into the data features
sns.heatmap(df.isnull(),yticklabels=False,cbar=False,cmap='viridis')
```
![](Images/7.JPG)

**There is no null values into the dataset

#### Here we count the each speices values using Boxplot
```python
# TODO : Checking the number of the each species values into the Iris dataset
sns.set_style('whitegrid')
sns.countplot(x='Species',data=df)
```
![](Images/3.JPG)

## Model Fitting
``` python
TODO: Assigning the values for model fitting
X = df.iloc[:,[1,2,3,4]]
y = df.iloc[:,[-1]]

```
```python
# TODO: Train Test Split and Build and Train the model

Since our process involves training and testing, we should split our dataset. It can be executed by the following code.

from sklearn.model_selection import train_test_split
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.3,random_state=0)
```
``` python
TODO: Using SVM Classifier

from sklearn.svm import SVC

svm = SVC()

svm.fit(X_train,y_train)

```
``` python
TODO: Prediciting
pred = svm.predict(X_test)
```

## Accuracy and Prediction Score

#### Using Confusion Matrix for Classification prediction

``` python
from sklearn.metrics import classification_report,confusion_matrix
print(confusion_matrix(y_test,pred))
```
#### Confusion Matrix Result
``` python
[[16  0  0]
 [ 0 17  1]
 [ 0  0 11]]

 ```
 #### Using Classification Reports for prediction

 ``` python
 print(classification_report(y_test,pred))
 ```

 #### Classification Report Results
 ``` python
                  precision    recall  f1-score   support

    Iris-setosa       1.00      1.00      1.00        16
Iris-versicolor       1.00      0.94      0.97        18
 Iris-virginica       0.92      1.00      0.96        11

       accuracy                           0.98        45
      macro avg       0.97      0.98      0.98        45
   weighted avg       0.98      0.98      0.98        45

```
#### Making Sample Prediction

``` python
svm.predict([[5.3,3.4,2.7,3.9]])
```

#### Output for Sample Prediction

``` python
array(['Iris-virginica'], dtype=object)
```

### Prediction Score

``` python
print("Accuracy Score:",svm.score(X_test,y_test) * 100)
```
### Accuracy Score: 97.77777777777777

## Deployment

## Team

![](Images/Niv.JPG)


text:
*Status: DEV*

Publish PINF JavaScript Bundles to AWS CloudFront
=================================================

Use this tool to publish [PINF JavaScript Bundles](https://github.com/pinf/pinf-loader-js) to [AWS CloudFront](http://aws.amazon.com/cloudfront/).

Any portable bundle may be published.

Examples:

  * `./demo/`
    * [d19f07l88787pc.cloudfront.net](http://d19f07l88787pc.cloudfront.net/)
    * [s3.amazonaws.com/pinf-to-aws-cloudfront-demo/index.html](https://s3.amazonaws.com/pinf-to-aws-cloudfront-demo/index.html)

Development
-----------

	npm install
	npm run-script publish
	open ...

License
=======

[UNLICENSE](http://unlicense.org/)

Free code costs money and time to write and maintain so please reciprocate at [pinf.to](http://pinf.to/) and help build a large open community that is sustainable long-term.

license: Unlicense

repository: pinf-to/pinf-to-aws-cloudfront

repo_name: pinf-to/pinf-to-aws-cloudfront


text:
+++
categories = ["Hugo", "Nginx", "Raspberry"]
date = "2020-06-13"
description = ""
featured = ""
featuredalt = ""
featuredpath = ""
linktitle = ""
slug = "Deploying a simple static website using Nginx and Hugo"
title = "Deploying a simple static website using Nginx and Hugo"
type = ["posts","post"]
[ author ]
  name = "nazori"
+++

Throwing together a simple static website is very simple using Hugo and
Nginx. This assumes that you have the following:

-   A Linux box (I’ll be using Raspberry Pi OS).
-   A domain (any domain should work).

Setting up the domain[](#setting-up-the-domain)

Depending on your domain registrar, setting up the DNS records to point
your domain to the IP address of your Linux box might be different. Look
up how to set up DDNS in your provider’s help pages. If you’re running
the server in your home network, you will have to [forward
ports](http://www.wikihow.com/Set-Up-Port-Forwarding-on-a-Router) 80 and
443 in your router and point them at the server. Be sure to configure
the server with a [static IP
address](https://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/)
as well.

Installing the server and
firewall[](#installing-the-server-and-firewall)

First, install the Nginx server, as well as UFW for a simple firewall.

    $ sudo apt install nginx ufw

Set up the firewall[](#set-up-the-firewall)

Before doing anything, if you’re accessing the server via SSH, you
should allow such traffic prior to enabling the firewall. Otherwise,
you’ll lock yourself out of the server and we don’t want that. Assuming
we’re using the default SSH port (22):

    $ sudo ufw allow 22
    $ sudo ufw reload

If everything went right, you should still be in the server in your SSH
session. Now, to allow traffic for the Nginx server, run:

    $ sudo ufw allow 'Nginx Full'
    $ sudo ufw reload

This will allow traffic on ports 80 and 443. Every time you change
firewall rules, you need to run `reload` to get UFW to apply the rules.
You can check the status of the firewall by running:

    $ sudo ufw status

For a short tutorial on using UFW, check out [this
page](https://medium.com/@jasonrigden/a-guide-to-the-uncomplicated-firewall-ufw-for-linux-570c3774d7f4).

Set up the Nginx server[](#set-up-the-nginx-server)

Initial setup[](#initial-setup)

To start the server, simply run:

    $ sudo systemctl start nginx

Type in your server’s IP address in a browser. If it’s working properly,
you should be able to see a generic Nginx page. By default, Nginx stores
the data for the webserver in `/var/www/`. You can use this location or
any other for your server. We will be using that one for this example.

To set up the new server, create a new file in
`/etc/nginx/sites-available` with the name of your new server using
whichever text editor you fancy. We’ll call it `example.com`:

    $ sudo emacs /etc/nginx/sites-available/example.com

Now, paste in the following configuration, changing the appropriate
values:

``` {style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"}
server {
    listen 80; # Configure the server for HTTP on port 80
    server_name example.com; # Your domain name
    root /var/www; # The files for your server
    index index.html; # You will create this file shortly
}
```

The server block defines the parameters for the server. This is a pretty
barebones configuration, but it will suffice for our webpage.

In order to serve content, you must have something to send to the
clients connecting to your website. Right now, you only have the default
Nginx page in your `www` directory, or nothing at all if you are using
something other than `/var/www/`. If you created a new `www` directory,
make sure Nginx can read it by running:

    $ sudo chmod 0755 /your/path/to/www

Now, let’s create the `index.html` file we defined:

    $ sudo emacs /var/www/index.html

In it, write any text you want. For example:

    If you can see this, the webserver is working!

You have to delete the default page in order to make it work.

To tell Nginx to run your new webserver, you must add it to
`/etc/nginx/sites-enabled` by running:

    $ sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/

Restart the Nginx server by running:

    $ sudo systemctl restart nginx

If you did everything correctly, you should be able to see the text you
put into `index.html` by typing your domain in any browser. If you’re
running it locally, you might have to point your domain to the local IP
of the server in your `/etc/hosts` file.

For more information on Nginx, check out the [official
documentation](https://docs.nginx.com/nginx/admin-guide/).

Set up SSL (HTTPS)[](#set-up-ssl-https)

We’ll be using a free certificate from [Let’s
Encrypt](https://letsencrypt.org/) to set up SSL on our server. Install
the certificate bot:

    $ sudo apt install python-certbot-nginx

Now, run the bot:

    $ sudo certbot --nginx

When prompted, select your domain and then tell the bot to redirect all
HTTP traffic to HTTPS. If it works properly, the bot will let you know.
Restart the Nginx server:

    $ sudo systemctl restart nginx

Now, if you visit your webserver on any browser, you should be
automatically redirected to the SSL version of the site. To ensure the
certificate is renewed automatically, edit your crontab:

    $ sudo crontab -e

Add the following line to run the bot at 09:00 every day.

    0 9 * * * certbot renew --post-hook "systemctl reload nginx"

Feel free to change the time to whichever works best for you. First
column specifies the minutes and the second specifies the hour (24h
clock).

**Note:** Because we’re using SSL, enabling `gzip` compression might
introduce a [security
vulnerability](https://en.wikipedia.org/wiki/CRIME). Therefore, we will
skip this step. However, if you’re certain no sensitive information is
being transmitted, [here’s a simple guide to enabling
it](https://easyengine.io/tutorials/nginx/enable-gzip/).

Additional configuration[](#additional-configuration)

Enable HTTPS/2[](#enable-https2)

[HTTPS/2](https://en.wikipedia.org/wiki/HTTP/2) is, in essence, a better
version of HTTPS that brings performance improvements for your page. To
enable it, simply edit your configuration file:

    $ sudo emacs /etc/nginx/sites-available/example.com

You will see a bunch of changes done by CertBot to enable SSL. We’re
interested in the following line:

    listen 443 ssl; # managed by Certbot

Change that to:

    listen 443 ssl http2; # managed by Certbot

Restart the Nginx server to enable your changes.

Enable client-side caching[](#enable-client-side-caching)

Given that resources like images and videos don’t change all that often,
it’s not necessary to make clients fetch them every time they load the
page. To enable caching, edit your configuration file:

    $ sudo emacs /etc/nginx/sites-available/example.com

And add the following at the end of the first server block:

``` {style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"}
server{
    # ...
    # Stuff
    # ...

    # Media
    location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
        expires 30d;
    }

    # CSS and Js
    location ~* \.(css|js)$ {
        expires 7d;
    }
```

CSS and Js files have a lower expiration date since they are more prone
to being changed than media files.

Your server is now ready to serve a website.

Creating the website with Hugo[](#creating-the-website-with-hugo)

The great thing about Hugo is that it lets you create simple, static
webpages that are
[faster](https://www.smashingmagazine.com/2015/11/modern-static-website-generators-next-big-thing/)
and [more
secure](http://jekyll.tips/jekyll-casts/why-use-a-static-site-generator/)
than dynamic webpages. Additionally, these websites work great in any
device: whether you’re on your computer with a big monitor or on a
cellphone, they scale very well. With Hugo, building the site and adding
content to it is a breeze.

You can install [Hugo](https://gohugo.io/) on your server, but the way I
do it is in my development machine. To install:

    $ sudo apt install hugo

Create your new website by running:

    $ hugo newsite sitename

Replace `sitename` with whatever you want to name your site. Go to
[themes.hugo.io](https://themes.gohugo.io/) to choose a theme for your
site. Now, go into the `sitename` directory and download the theme as
indicated using `git`. This page uses the
[Hermit](https://themes.gohugo.io/hermit/) theme, so we’ll download that
one:

    $ git clone https://github.com/Track3/hermit.git themes/hermit

To enable the theme, we add the following line to the `config.toml` file
in the root `sitename` directory:

    theme = 'hermit'

In order to configure the site as you like, most themes have a guide to
doing so in the page where you got it from. In addition, they tend to
have an example site to guide you. Our theme, Hermit, has a nicely
commented configuration file in `themes/hermit/exampleSite`, as well as
a few example posts.

To create a new post, run:

    $ hugo new posts/some-post.md

The posts are written using Markdown. If you’re not familiar with it,
[check out this quick start
guide](https://www.markdownguide.org/getting-started/). Our theme,
Hermit, also includes a bunch of information on Markdown usage in its
sample posts. To build and run the page locally, go to the `sitename`
directory and type:

    $ hugo server -D

This runs a local webserver, enabling drafts with the `-D` option. For
more information on this, check out the [basic
usage](https://gohugo.io/getting-started/usage/) page for Hugo. The
website will automatically reload as you edit the posts, so you don’t
have to stop and reload the server whenever you change content. Once
you’re happy with the site, in the `sitename` directory run:

    $ hugo

This will build the site under `sitename/public`. These are the files we
need to send to the server to run. If this is the first time you upload
the site to the server, delete anything in your `www` folder before
continuing.

Since in our example, the server is running in a remote machine, we will
send over the site via `rsync`. To do so, we run:

    $ rsync -aAXv /path/to/sitename/public/ user@example.com:/var/www/ --delete

This assumes that our `user` has write permissions to the `www`
directory on the remote machine, that our domain is example.com and that
we left the SSH port enabled. Otherwise, this will not work. Adjust
depending on your setup.

To enable the usage of the custom 404 landing page in your Hugo theme,
instead of the default Nginx page, add this line to your first server
block in the configuration file for your site
(`/etc/nginx/sites-available/yoursite.com`):

    error_page 404 /404.html;

Finally, if you go to your site by typing in the address in any browser
(example.com in our example), you should be able to see your page!

For more information on Hugo, visit the [official
documentation](https://gohugo.io/documentation/).

repository: nazori-eu/nazori-web

branch_name: refs/heads/main

repo_name: nazori-eu/nazori-web


text:
BodePlotGui
===========

A MATLAB GUI for drawing asymptotic Bode diagrams

The code here is useful for people trying to learn how to draw asymptotic Bode diagrams.  The code takes as input a single-input single-output transfer function and generates the asymptotic approximation along with a description of how the approximation was developed.

For help see: http://lpsa.swarthmore.edu/Bode/BodePlotGui.html and http://lpsa.swarthmore.edu/Bode/BodePaper.html

Note: the MATLAB GUI doesn't display well on all devices (some elements of the GUI may not show up).  If you have this problem, simply run the MATLAB command "guide" and open the file BodePlotGui.fig.  You can edit the size and layout of the GUI for your machine.  Save it, and then rerun the BodePlotGui.m file.

url: https://raw.githubusercontent.com/Guray00/IngegneriaInformatica/752ac634bb7f03556fd8587bf5f5a295843a76b9/SECONDO ANNO/II SEMESTRE/Fondamenti di automatica/(fino a) AA 21-22/Matlab/[A] Funzioni Matlab/BodePlotGui-master/README.md


text:
ConsentRight is a Browser Web Extension providing users with control over removal of consent choices.

***

Available for Firefox & Chromium-based Browser

***

Extension: Popup UI

### Modern Problem
The consent dialogues are a persistent annoyance to the web. The manipulative practices in terms of complexity in language, blocking access to the webpage or pre-selected choices used by several CMP providers often lead to deceiving a user to disregard and agree to data collection.

Despite the regulations, several web services continue to mislead and register positive consent even when a user has opted out or made a choice for not sharing their data.

The end-user has to make an explicit and informed choice to allow sharing their data to participating third-party tracking services on the website.

### Modern Solution
To target the problematic part in the consent dialogues that violates the compliance with the GDPR. I have developed a browser extension to remove select elements which are responsible for storing positive consent to all user data and provide its users' granular control over their consent choices.

#### Work In Progress
You can find the progress on functionalities [here](https://github.com/rohantaneja/ConsentRight/projects).

#### Credits
- gorhill/uBlock
- xd4rker/MinerBlock
- coolharsh55

repository: rohantaneja/consent-right

repo_name: rohantaneja/consent-right


text:
# GAUSS-04201 -- GAUSS-04210

GAUSS-04201: "unsupported portal strategy"

SQLSTATE: XX000

Description:Internal system error.

Solution:Contact technical support.

GAUSS-04202: "bogus direction"

SQLSTATE: XX000

Description:Internal system error.

Solution:Contact technical support.

GAUSS-04203: "invalid argument size %d in function call message"

SQLSTATE: 08P01

Description: An invalid parameter value \(**argsize**  is less than -1\) is entered when the function is called.

Solution: Check the number of parameters called by the function.

GAUSS-04204: "function %s has more than %d arguments"

SQLSTATE: XX000

Description: The SQL parameter is incorrect.

Solution: Modify the SQL statement.

GAUSS-04205: "current transaction is aborted, commands ignored until end of transaction block"

SQLSTATE: 25P02

Description: Non-commit and rollback commands are run when the transaction is rolled back.

Solution: Ensure that the previous transaction has been submitted or rolled back when the SQL statement is executed.

GAUSS-04206: "function call message contains %d arguments but function requires %d"

SQLSTATE: 08P01

Description: When the function is called, the number of parameters entered is inconsistent with that defined by the function.

Solution: Check the number of parameters called by the function.

GAUSS-04207: "function call message contains %d argument formats but %d arguments"

SQLSTATE: 08P01

Description: When the function is called, the number of formatted parameters entered is inconsistent with that defined by the function.

Solution: Check the number of parameters called by the function.

GAUSS-04208: "incorrect binary data format in function argument %d"

SQLSTATE: 22P03

Description: Incorrect binary data format is found in the parameters of the function.

Solution: Check the format of parameters called by the function.

GAUSS-04209: "invalid frontend message type %d"

SQLSTATE: 08P01

Description: The message type is invalid.

Solution: Ensure that the input message type is valid.

GAUSS-04210: "could not set timer for session timeout"

SQLSTATE: 58000

Description:Internal system error.

Solution:Contact technical support.


text:
# Week 2

## Frequentist inference

### Background

#### Products and Exponents

* Product notation: $$\prod $$
* Can redefine factorial $$n! $$as $$\prod_{i=1}^{n} \text{i for n} \le 1 $$
* Exponents form: $$a^x $$where a is called the base and x is the exponent.
* Exponents have the following useful properties:
  * $$a^x * a^y = a^{x + y} $$
    * Note: base must be the same for this to work.
  * $$(a^x)^y = a^{x * y} $$

#### Natural Logarithm

* Logarithms are the inverse of exponential function.
* If $$y = a^x $$then $$\log_a(y) = x $$
* The "natural logarithm" has base e and can be written without the subscript e:
  * $$\log_e(y) = \log(y) $$
* $$log(y) $$is only defined for $$y > 0 $$
* $$\exp(\log(y)) = \log(\exp(y)) = y $$
* Logarithm has the following properties:
  * $$\log(x * y) = \log(x) + \log(y) $$
  * $$\log(\frac{x}{y}) = \log(x) - \log(y)  $$
  * $$\log(x^b) = b\log(x) $$
  * $$\log(1) = 0 $$
* Since natural logarithm is a "monotonically increasing" (aka it always increases) "one-to-one" (aka 'if f(a) = f(b) implies that a = b then f is one-to-one') function.
* Finding that x that maximises any $$f(x) $$is the same as maximising $$\log(f(x)) $$

#### Argmax

* When maximising a function, you are interested in 2 things:
  1. The value $$f(x) $$can get to when maxed, written as $$\max_x f(x) $$
  2. The x-value that maximises the func, written as $$\hat{x} = \arg \max_xf(x) $$

### Confidence intervals

* Frequentist approach to inference: view data as random sample from larger, hypothetical population.
* Example, coin flip result: 44 heads, 56 tails.
  * Can be viewed as sample from much larger population.
  * Can say that each flip follows the a Bournelli distribution with prob p: $$X_i ~ B(p) $$
  * Can ask: "What's the prob of getting heads?"
  * Can also ask: "how confident are we in that estimate?"
  * By Central Limit Theorum:
    * $$\sum\limits_{i=1}^{100} X_i \sim N(100p, 100p(1-p)) $$
    * Can say: $$100p - 1.96 \sqrt{100p(1-p)} and 100p + 1.96 \sqrt{100p(1-p)} $$
    * Since we observed 44 heads, for that sample $$\hat{p} = \frac{44}{100} $$
    * Confidence interval calculated as: $$44 \pm 1.96\sqrt{44(.56)} = 44 \pm 9.7 = (34.3, 53.7)$$
    * Can say "we're 95% confident the probability of heads falls between .343 and .537".

### Likelihood function and maximum likelihood


text:
---
layout: post
title: Introduction to Ansible
date: 2018-03-18
category: Dev
version: 1.1
tags: [ansible, devops, tool]
summary: A short introduction to Ansible for beginners
---

## INTRODUCTION TO ANSIBLE

## DEVOPS

[DevOps](https://en.wikipedia.org/wiki/DevOps) (a clipped compound of "development" and "operations") is a software engineering practice that aims at unifying software development (Dev) and software operation (Ops). The main characteristic of the DevOps movement is to strongly advocate automation and monitoring at all steps of software construction, from integration, testing, releasing to deployment and infrastructure management.
Devops is term that shows the development team should work with operation team to increase throughput. We need to facilitate and ease the process of development, integration, testing, and deployment in a way that all developers on dev team should be able to deploy their code hassle-free and regardless of environment.
There are some tools to automates such tasks like:

* Ansible (rely on python/ssh) backed by Readhat
* Puppet (written by Ruby)
* Chef (written by Ruby, Erlang)
* Salt (written by python)

I have chosen Ansible for my projects since:

1. no need to install any aget (based on python)
2. supported by Redhat
3. learning curve is lower than others

### Devopts is not only tools but to me is more mentality of working

* Be critic to the way working
* Ask questions
* Share your knowledge

## ANSIBLE

Working machine is the machine that we ran our ansible commands/playbooks (need to be a Linux machine)
On our development environment, we have Ansible installed on devapp01,devapp02, devgw01 (Preferably try to run it on devapp02)

### Set up

#### ssh key

```bash
ssh-keygen -t ecdsa -b 521 # Generate your ssh key default location ~/.shh/
ssh-copy-id user@host  # Add your key to One host in each environment (Dev, Test, Prod)
# Option 1: Add ssh agent to your terminal like
eval `ssh-agent` && ssh-add
# Option 2: Add the following function to your ~/.bashrc file and run each time you like
# I have borrowed this function from brilliant reply in stackoverflow.com
function assh { # Feel free to rename the functions
  export SSH_AUTH_SOCK=$(find /tmp/ssh-* -user `whoami` -name agent\* -printf '%T@ %p\n' 2>/dev/null | sort -k 1nr | sed 's/^[^ ]* //' | head -n 1)
  if ssh-add -l 2&>1 > /dev/null; then
    echo Found working SSH Agent:
    ssh-add -l
    return
  fi
  eval `ssh-agent` && ssh-add
}
```

#### inventory

Simply a list of host that you want to work with in python ini format; occasionally is good idea to have specific list of host as your inventory. An example would be:

```ini
[devgateway]
devgw.example.com       ansible_user=root

[devbd]
devdb1.example.com      ansible_user=dba

[devapp]
devapp1.example.com     ansible_user=admin
devapp2.example.com     ansible_user=admin

[dev:children]
devgw.example.com
devdb.example.com
devapp.example.com

[sastest:vars]
myapp=/opt/myapp
```

#### ansible.cfg

Ansible configuration helper file which can be very useful to activate some Ansible features on the specified playbooks and set default inventory file location, etc.
Example is:

```ini
[defaults]
callback_whitelist = profile_tasks
inventory = hosts
```

### Ansible command line

User can use Ansible for redirecting their commands, queries, and etc to the respective machines and get their result. Example is:

```bash
ansible dev -m ping
ansible dev -m shell -a "date"
```

### Ansible playbook

Ansible playbook is list of commands and instruction to archive a specific goal. For example, a play book to deploy to test environment. Example is:

```yaml
- hosts: dev
  tasks:
    - name: Ping the host
      ping:

    - name: Get user name from shell
      shell: "whoami"
      args:
        executable: /bin/bash
      register: whoami_result

    - name: Print the whoami_result
      debug:
        msg: "{{ whoami_result.stdout }}"
```

***

#### Roles

Ansilbe role is set of task that can be ran to achieve a specific goal like install and configure apache server. So, Apache role would contains steps like install apache, modify apache configuration with roles default variables, and restart handler.

#### Handlers

Ansible handler is a set of actions that need to be played after specific change or action. For example, after a change in server configuration, we like to handler to restart web server; after that we like to update web application and then again we need to restart web server and so on. BY default, handlers will run at the end of play when they are triggered by 'notify' keyword.

#### Vars

List of necessary variables that will be used by Ansible playbooks, roles, and handlers.

#### Template

It simple template solution which is powered by python Jinja2. For example, a config file that need to be updated/overloaded with new variable.

### Writing Ansible playbook

***

repository: EddieNejadi/techblog

repo_name: EddieNejadi/techblog


text:
# Runbook

- [Azure Automation runbook](https://docs.microsoft.com/en-us/azure/automation/automation-runbook-types)
- [Starting a runbook in Azure Automation](https://docs.microsoft.com/en-us/azure/automation/automation-starting-a-runbook)

## Starting A Runbook

```PowerShell
Start-AzureRmAutomationRunbook -AutomationAccountName "MyAutomationAccount" -Name "Test-Runbook" -ResourceGroupName "ResourceGroup01"
```

## Graphical Runbook

- [Graphical runbook](https://docs.microsoft.com/en-us/azure/automation/automation-first-runbook-graphical)

## Introduction To PowerShell

- [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/powershell-scripting?view=powershell-6)
- [Getting Started](https://github.com/PowerShell/PowerShell/tree/master/docs/learning-powershell)
- [Installation](https://github.com/powershell/powershell)

> PowerShell is a task-based **command-line shell** and **scripting language** **built on .NET**. PowerShell helps system administrators and power-users can rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.

**Design Goals**

>PowerShell is designed to improve the command-line and scripting environment by eliminating long-standing problems and adding new features.

- Discoverability
- Consistency
- Interactive and scripting environments
- Object orientation
- Easy transition to scripting

## About pages

About pages are help files to give you fundamental PowerShell help. See [About](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/?view=powershell-6)

```PowerShell
Get-Help about_pipelines
# TOPIC
#    about_pipelines
#
#SHORT DESCRIPTION
#    Combining commands into pipelines in the Windows PowerShell
```

## Advanced Funcitons

> Advanced functions allow you to write functions that can perform operations that are similar to the operations you can perform with cmdlets.

[About Functions Advanced (about_functions_advanced)](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced?view=powershell-6)

```PowerShell
function Send-Greeting
{
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$true)]
        [string] $Name
    )

    Process
    {
        write-host ("Hello " + $Name + "!")
    }
}

# Invoke the function
Send-Greeting
```

## Advanced Parameters

>you can add parameters to the advanced functions that you write, and use parameter attributes and arguments to limit the parameter values that function users submit with the parameter.

[About Functions Advanced Parameters (about_functions_advanced_parameters)](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-6)

```PowerShell
Param(
    [parameter(
            Mandatory = $true,
            ValueFromPipelineByPropertyName = $true,
            ParameterSetName = 'Default',
            HelpMessage = "Name of Color - e.g. Red"
    )]
    [ValidateNotNullOrEmpty()]
    [ValidateSet("Red", "Blue")]
    [Alias("C")]
    [String]
    $Color
)
```

### Demo

[Azure Instance Metadata service](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service)