Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Emmanuel Awa awaemmanuel

🎯
Focusing
Block or report user

Report or block awaemmanuel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@awaemmanuel
awaemmanuel / read_embeddings.py
Created Mar 3, 2019 — forked from erickrf/read_embeddings.py
Read embeddings file in text format and convert to numpy
View read_embeddings.py
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('input', help='Single embedding file')
parser.add_argument('output', help='Output basename without extension')
args = parser.parse_args()
embeddings_file = args.output + '.npy'
vocabulary_file = args.output + '.txt'
@awaemmanuel
awaemmanuel / understanding-word-vectors.ipynb
Created Mar 3, 2019 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
View understanding-word-vectors.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@awaemmanuel
awaemmanuel / PrimeSum.cpp
Created Apr 14, 2018 — forked from cruxrebels/PrimeSum.cpp
Given an even number ( greater than 2 ), return two prime numbers whose sum will be equal to given number. NOTE A solution will always exist. read Goldbach’s conjecture Example: Input : 4 Output: 2 + 2 = 4 If there are more than one solutions possible, return the lexicographically smaller solution. If [a, b] is one solution with a <= b, and [c,d…
View PrimeSum.cpp
bool isPrime(int n)
{
for(int i=2; i*i<=n; ++i)
{
if(n%i==0)
return false;
}
return true;
}
@awaemmanuel
awaemmanuel / interviewitems.MD
Created Apr 5, 2018 — forked from KWMalik/interviewitems.MD
My answers to over 100 Google interview questions
View interviewitems.MD

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@awaemmanuel
awaemmanuel / WAVE.py
Created Mar 22, 2018 — forked from viveksyngh/WAVE.py
Given an array of integers, sort the array into a wave like array and return it, In other words, arrange the elements into a sequence such that a1 >= a2 <= a3 >= a4 <= a5.....
View WAVE.py
# @param A : A List of integers
# @return List of integers
def wave(A):
A.sort()
i = 0
while i < len(A) :
if i + 1 < len(A) :
A[i], A[i+1] = A[i+1], A[i]
i = i + 2
else :
View gist:b5fb3a74202713797ff98f896c5e65e6
package recfun
import scala.collection.mutable.ListBuffer
import common._
/** https://class.coursera.org/progfun-2012-001/assignment/view?assignment_id=4 */
object Main {
def main(args: Array[String]) {
println("Pascal's Triangle")
for (row <- 0 to 10) {
@awaemmanuel
awaemmanuel / UglyNumber.java
Created Apr 14, 2016 — forked from cangoal/UglyNumber.java
LeetCode - Ugly Number
View UglyNumber.java
//
public boolean isUgly(int num) {
if (num == 0) return false;
while (num % 2 == 0) num /= 2;
while (num % 3 == 0) num /= 3;
while (num % 5 == 0) num /= 5;
return num == 1;
}
//
public boolean isUgly(int num) {
@awaemmanuel
awaemmanuel / The Technical Interview Cheat Sheet.md
Created Apr 6, 2016 — forked from TSiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@awaemmanuel
awaemmanuel / jupyter_shortcuts.md
Created Mar 16, 2016 — forked from kidpixo/jupyter_shortcuts.md
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter
View jupyter_shortcuts.md

Toc

Keyboard shortcuts

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

MacOS modifier keys:

  • ⌘ : Command
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
You can’t perform that action at this time.