Skip to content

Instantly share code, notes, and snippets.

View aabdullin's full-sized avatar
🎯
Focusing

Artur aabdullin

🎯
Focusing
  • Mr.
  • San Francisco
View GitHub Profile
# 1. Clone repo from https://github.com/aabdullin/stores
# 2. Install python, virtualenv
➜ stores git:(master) python --version
Python 2.7.16
➜ stores git:(master) pip2.7 install virtualenv
➜ stores git:(master) virtualenv venv --python=python2.7
# 3. Install Flask, Flask JWT, Flask-RESTful in venv
(venv) ➜ stores git:(master) ✗ pip install Flask
(venv) ➜ stores git:(master) ✗ pip install Flask-JWT
(venv) ➜ stores git:(master) ✗ pip install Flask-RESTful
@aabdullin
aabdullin / self-assessment-3.js
Last active March 21, 2018 03:31
Artur Abdullin
#2
function nameBreakdown (fullName) {
// split full name to array with first,middle,last name as elements
var fullNameArr = fullName.split(' ')
// create an object
var fullNameObj = {}
if (fullName === 'middle') {
return 'false'
}
if (fullNameArr[1].length === 2) {
Part 1
// input - name Object
// output - first name and last initial
function abbreviate (name) {
var initial = name.last.split('')
return name.first + ' ' + initial[0] + '.'
// split last name to last_name array
// return first name and first element of last_name array
}
@aabdullin
aabdullin / Artur Abdullin
Last active February 15, 2018 03:58
self-assessment-1-firstName-lastName.js
//exercise 1
function countBy(num) {
var arr = []
var const_num = num
for (var i = 0; i < 5; i++) {
arr.push(num)
num += const_num
}
console.log ( arr )
}