Skip to content

Instantly share code, notes, and snippets.

View innat's full-sized avatar
:octocat:
Working from home

Mohammed Innat innat

:octocat:
Working from home
View GitHub Profile
@innat
innat / Gennymotion.md
Last active May 2, 2018 00:10
Google_App_On_GennyMotion

Step One : Download Gennymotion

Step Two : Download Genymotion-ARM-Translation and drag and drop on the running enulator. Sometimes you need to do it manually.

Step Three : Downlaod following Droid infd app , then drag and drop on the emulator - it should open properly. Then tab to 'System' tab and see 'Instruction set' - it might be x86 architecture.

Step Four : Ddownload proper GAPPS packages by seleting the proper paremeter such as 'Platform' 'Android' 'Variant' and donload the file - then drag and drop it on the emulator. It should successfully flash. Reboot emulator.

step 1: run the followng command in terminal

sudo apt-get upadate && sudo apt-get dist-upgrade

step 2: download node.js for linux by typing the followng command

General Commands

  • apt-get update

    Synchronizes the list of packages on your system to the list in the repositories. Use it before installing new packages to make sure you are installing the latest version.

  • apt-get upgrade

    Upgrades all of the software packages you have installed.

  • clear

    Clears previously run commands and text from the terminal screen.

@innat
innat / Pig Latin.py
Created May 14, 2018 13:32
encrypt language :P
# One Way
word_string = input("Input a word: ")
while word_string[0].lower() not in ['a','e','i','o','u']:
word_string = word_string[1:] + word_string[0:1]
else:
print(word_string + 'ay')
@innat
innat / env_anaconda_set.md
Last active June 6, 2018 13:45
Setting up anaconda environment and necessary packages

Open up the terminal and type following command

conda create -n <env_name> python=<version_no.>

To activate environment type following -

activate <env_name> [ for windows ] source activate <env_name> [ linux , Mac OS ]

@innat
innat / Floyd_Cloud Set Up.md
Last active July 2, 2018 05:25
environment setup for floyd cloud

Login - Initialize - Run

Sign Up first

Optionally we can do all things to create a conda environment.

Login

  1. local installation using 'pip install -U floyd-cli'
  2. floyd login -u <user_name>
@innat
innat / Jekyll_Customize.md
Last active August 16, 2018 17:49
Jekyll is Love

Render Mathematical Equation on GitHub Page

Stack QA

Magic of MathJax.

Procedure

  1. Add following piece of code to jekyll _includes folder, we can name it mathjax.html
@innat
innat / 4Data.md
Created November 12, 2018 18:14
4D - Four Dimensional Data

Let's consider a folowing 4D matrix.

import numpy as np
W = np.random.randn(2,2,3,100)

print(W.shape)

output:
@innat
innat / FilterMap.md
Last active November 24, 2018 15:50
Python: Difference between filter(function, sequence) and map(function, sequence)

map and filter function in python is pretty different because they perform very differently. Let's have a quick example to differentiate them.

map function

Let's define a function which will take a string argument and check whether it presents in vowel letter sequences.

def lit(word):
    return word in 'aeiou'

Now let's create a map function for this and pass some random string.

@innat
innat / Delete Key.md
Last active November 24, 2018 15:51
Removing Key from Python Dictionary.

We can delete a key from a Python dictionary by the some following approaches.

Using the del keyword; it's almost the same approach like you did though -

     myDict = {'one': 100, 'two': 200, 'three': 300 }
     print(myDict)  # {'one': 100, 'two': 200, 'three': 300}
     if myDict.get('one') : del myDict['one']
     print(myDict)  # {'two': 200, 'three': 300}