Posts

Showing posts with the label IT(Code)

Github & Google Colaboratory

Lately , I've been using Github a lot for Code.  I used to save the code I wrote in Github, but the purpose was to save the code, but I started writing Python code in Google Colaboratory, and the code in Colaboratory can be easily transferred to Github. I think it's really convenient to be able to save to , and open Colaboratory from Github with a single button.  Also, if you can leave comments about various things you have tried with Colaboratory Code and upload them to Github, I think it will be really useful as a memorandum of your own Code.

Javascript framework

I happend to start mean stack, but I like angular because it was the first javascript framework for me. But when I went to a bookstore, angular was pushed away to the corner of vue.js and react books and I don't think angular is much more popular in Japan than the two. You can see below that angular is not popular in Japan.    But I'm glad to know that angular is popular in the world. ( see google trend ) While react and vue.js needs next.js and nuxt if creating a slightly elaborate web page, angular do almost everything alone. It's just like you need ruby on rail for ruby. After all, I think the influence of the language (framework) that I first touched is great.

About machine learning programming

Recently, I've been studying AI and machine learning using Python, and it's quite interesting to start doing it. Especially, I think it's really convenient that you can easily use TensorFlow and Keras with just a browser using Google Colaboratory. At first, I'm a little confused about where to start this kind of study, but there are many books on AI and machine learning, and when I read them at a bookstore and somehow keep in mind the keywords, I somehow understand the image. After that, if you make an online reservation for a book that seems good from the library and read it, your understanding will gradually deepen. It was a book called "Deep Learning Mechanism to Learn While Working with TensorFlow and Keras" that was very interesting to me and deepened my understanding of machine learning. As a result, I was able to grasp the concept of logistic regression, softmax function, sigmoid function, ReLU, convolutional filter, CNN, etc. in addition to matrix calc

Basic web technology

Image
Recently, I've made web-app( notebook of words ) for myself and found that the web is a very powerful tool. So I want to write down some key factors for making this app. Framework & Cloud services In this site, I use framework below   -frontend: Angular   -API server: Node.js & Express   -PaaS: Heroku.com   -DB server: MongoDB(mlab.com)   -Authentification: firebase.com Frontend (Angular) and Backend (Express)  are connected by RESTful API endpoint which I write lately. I also use the official Node.js driver for connecting MongoDB(mlab.com) instead of using mongoose. Image is below. I like server-based javascript language. Before a couple of years ago, I didn't know much about javascript but after using Angular, I've been fascinated by this language. I know object-based language through javascript and typescript. I think javascript is not what it was 10 years ago. It is a modern programing language, I think. I also use VScode & GitHub.  VScode is lighter than AT

jQeury code into Angular

I want to make a fashionable front-end webpage so I searched templates on the internet. There are many good templates using jQuery and Bootstrap so I want to use these skins and tried to modified it using Angular. So I tried to implement this AVANA template to Angular and finally succeeded! There are some tips to do it.  - Javascript files have to be placed below assets folder  - It's better to write javascript & CSS reading code at index.html  - scripts are also written in index.html  - scripts are written in header-component, main-component, footer-component  - scripts have to be written in index.html Reading AVANA codes, I'm very fascinated with CSS scripts. With the combination with jQuery and CSS scripts, we can handle some attributions like class so we can program CSS, make web pages dynamically move! It's my first experience so I was so astonished.

Sample Booklist with Angular

This time, I tried booklist web page using this sample code . My final code is here . First, >ng new test1 >cd test1/src/app Then add "book.ts", "mock-books.ts"  from sample code above. And modified index.html like below. This time when I made angular project, I chose angular router so I must insert code "<base href = "/"> at head section. And also replaced style.css from sample code above. Then finally >ng serve --open >And it works! This time, I tried stackblitz+my github url but didn't work.Stackblitz is very useful but there seemed some restriction. I also tried live server of VSCode's extension but also didn't work. It might be that angular must run on node.js and live server seems to be just http-server so that seems to be the reason, I guess.

Coder Dojo

We've been to coder dojo hirakata  from march this year. I happend to see article about  CoderDojo  and wondering if there is CoderDojo around my place. And I was very surprised that it it there in our city! CoderDojo is free programing clubs and there is no curriculum so they attend this club and doing programming. Main programing language is Scratch  so all they need is only notebook computer. There is wifi curcumstance it this club and there are mentor so if they have some quesion or trouble, they can ask them reluxly. It is about 2 hour and at the end of club, they can demonstrate their programing and it is good experience. It is for children from 7 to 17 years old, held once a month. And at hirakata club, almost all of them are elementary school children so it is best for him. View this post on Instagram #CoderDojo枚方 スタートしました! #coderdojo CoderDojo Hirakata さん(@coderhirakata)がシェアした投稿 - 20see18年 9月月8日午後10時52分PDT CoderDojo hirakata is held at hiraba , co-working place and m

Run the MEAN stack with IaaS

Image
I succeeded in running this MEAN stack on  Heroku , so then I tried it on IaaS (AWS). Installing http-server referring to ※p271, then building the product with $ng build --prod It didn't work well, and I tried using this as a reference, but no good. Finally, after deleting node_module and package-lock.json, when I run npm install, the error disappears. Before that, I didn't do npm install, so I think it might be this reason. After that, I did ng build --prod, accessed the AWS current directory, released the port, moved to the dist folder, and executed http-server. (It will not work if you add the project directory to the URL, so be careful. Also it is necessary to add the port number at the end of the URL) It seems to work with $npm start, but it didn't not go well. ※: Angular web application development start book ------- -8/26 P.S. ------- Although the entry screen appears above, the data stored in the DB is not read. An error also occurs in node server.js, so re-create

MEAN stack programming with heroku

Image
Node programming referring to https://www.heroku.com/home . Partial modification of package.json If you check the url created at heroku create, the web is created! Next, try this one  using mongo-db. Using mlab, it is necessary to have a credit card registration on heroku. So refering this https://www.webprofessional.jp/building-facebook-chat-bot-node-heroku/ (in the middle of "How to set the database from mLab's site" or https://www.youtube.com/watch?v=cBfcbb07Tqk ), I linked Heroku to mlab.com. Process.env.mongodb_uri appears in server.js, but this mongodb_uri seems to be already defined as an environment variable of heroku, so I registered this uri created by mlab to heroku.com.  Drop the above sample application https://github.com/chrisckchang/mean-contactlist-angular2 (https://devcenter.heroku.com/articles/mean-apps-restful-api ) locally with git clone. Remove the app.json because the above app assumes the mlab add-on. (App.json seems to be necessary when using herok

Finally building Yeoman !

I tried to build web pages using MEAN stacks on AWS but it took about months to finish. But finally, I succeeded in doing it today. This was a long way. At first, I tried to do it by using mean.io, mean.js but there were many erros. Sometimes reference error happend and I thought that these might be due to nvm because libraries were installed to diffrent directories if we use nvm so I uninstall nvm and use N. But still not work like   No gulpfile found So I quit using mean.io, mean.js (At this time, I didn't understand mechanism of like gulp) Then I happend to find Yeoman at this page  and this instruction are good to understand for me so I tried it. Yeoman consists of 3 parts 1. Bower 2. Yo 3. Grunt *Reference page . then access AWS url plus :9000 and find Yeoman page !

Computer drawing school for children

Image
Today, we went to computer drawing school for kids by hirakata-city. Such kid's course are hold by hirakata-city and we can find them at city's public paper so my wife ordered to joint the class. This day, 9 jinior school children attended this class. In this class, we used drawing software( cube kids ) for kids and we made schene of urashima-taro, famous japanese old-story. It can handle animation so we can move some character. Our son loved this software very much. (But it is is not free software. It costs about 20,000 yen!)

Try AWS(2)

Image
 As  writing  here ,  recently I'm starting AWS (AmazonWebService) and it is additional memo. (1) Accessing AWS from smartphone  Today I want to access it from Starbacs Cafe via starbacs'wifi. I brought tablet and smartphone and I can access AWS website but can't connect ssh to amazon because I didn't install my secret key to my tablet and smartphone. So coming back to my home, I tried ssh on my smartphone. But my app "Android Terminal Emulator" don't handle ssh, so I install ssh client App "ConnectBot". Seeing t his article and finally succed in connecting ssh. It is amazing to access IaaS by smartphone. Using these things, personal computer and smartphone are almost same because these are just an terminal equipment to cloud. If they can connect to internet, they don't need to have high functions. (2) Studying using OCW  I didn't go to AWS seminar so I searched good internet tutorial materials and find OCW " Startup Engineering

Try AWS

Image
This weekend, I tried to sing up AWS(Amazon Web Service). I wanted to do it, but hesitated to do. One reason is it needs credic card and second reason is it seemed difficult to do. At first, I planed to take part in free seminar around Osaka, but after netserfing internet, I found that it was not so difficult*1 to sign up, so I tried today. It took about 1 hour to finished. It might be about 10 min if there were no trouble. I first select Tokyo machine to make instance, but changed my mind to default machine (oregon, USA) because it was cheaper than tokyo. After finished AWS setting, I connected my AWS by terminal. At first I couldn't connect*2, but somehow I could. Then installing Apache, and finnaly I can access my server (below). I was deeply moved when I saw this screen ! It is good period now because I can have my own server with no cost and can use it anywhere ! I accessed my college's server via telephone line when I was college student (late 80' to early 90') an

Cloud program using App Inventor

As writing  this , I tried App Inventor on chrome OS. I can program app very easily (about 30 min) and all needed are PC ( cheap one is ok ) Smart Phone Wifi accesibility ( in home ) gmail account Chrome OS works on browser but it is not neccesary to install linux app. Detail is here  but we can program my own app in app inventor's website and reflect programing instantly to my smartphone via home wifi network. I programed my first android program according to this article . Amazing, because when I tried Android studio on linux, android studio is very very heavy and furthermore it took sometimes to run app in my smartphone (plus needed usb-cable). This is very wonderful product so I want to teach my child(7 years old) this usage !

Using Chrome OS and doing cloud programing

I'm using linux OS (ubuntu) for about 6 years, and I happend to find Cloudready, which might be easy to install Chrome OS, so I tried it. I've somehow installed it  and it works good. My netbook is not high performance model(CPU=N450) but it works smootly. Chrome OS is good way for old computer to be utilized. Today, I'm using cloudready and I liked it. It is browser based OS. It only works with browser but like android phone, many add-ons(chrome browser app) are available so it is not big problem. And I wanted to do android programing with Chrome OS so I searched and found good one. App Inventor . App inventor is cloud-based programing tool and we can use it by installing chrome browser app  to chronium browser. I happend to watch this BBC video  last week saying kids can learn programing. We can easily do programing in such a cheap computer, amazing. ---- appending: 2015.12.23 ------ At first I thought Chrome OS (Cloudready) is good, but using this OS , I change my opinio

Using old windows apps on linux

Wine is famous tool for using windows app on linux. But before using it, it was not useful for me because there were many restriction ( I forgot the detail ) and stopped using it. And recently, I happend to use it and it evolved splendedly. - it can handle various windows version, exp. XP, ME, 98, 95 etc - each app can select each os version, so if I can only click A app working on windows XP or B app working on windows 98 with no attention. Very useful ! - it work very smootly. I remember old wine is heavy so motion of app is very slow, but current wine can handle apps very smootly. My netbook is Intel Atom 450, memory 1G, ubuntu 14.01LTS but run very smootly. Now I am using microsoft encarta 98 which can't work on XP environment, but is work very smootly. It's fantastic thing !

Memento database

Recently, I use tablet(Nexus 7 with wifi) & smart phone ( LG l-01f with MVNO) . Before, I used iPod touch and used flashcaed app for memo of english words and after changing to android(nexus 7), I can't find good app and furthermore, I changed my old mobile phone to smartphone(l-01f) with MNNO to reduce telecommunication fee, so I want to find good app which I can handle 2 devices with synchronizing database. And I find this software. It is very easy to use and it can sync database via Google docs, so if I can append words in one device and push sync bottom, then I can update another device with simply push sync bottom. I like it, but recently when I deleted Google docs's spreadsheet, I can't upload data to Google docs. But today, this trouble has been solved. After uploading data, I could not see spreadsheet from Google doc app, but when I access from desktop PC, I can find uploaded spreadsheet and after that, I can see uploaded spreadsheet from Google doc app. Maybe