Skip to content

Instantly share code, notes, and snippets.

View RawPlutonium's full-sized avatar
:electron:
Wake up Neo...

Leonard Githigi RawPlutonium

:electron:
Wake up Neo...
  • Quanta Technologies Inc.
  • Outer Ring Rd, Kenya
View GitHub Profile
//Your first condition in loop should check if name is equal. If it satisfy Then you should check if the property exists If it exists return the value else return no such property.If No such name is found then it will come out of loop and you can return no such contact.
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
@RawPlutonium
RawPlutonium / amazon-rekognition.md
Created November 26, 2017 14:19 — forked from alexcasalboni/amazon-rekognition.md
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search
@RawPlutonium
RawPlutonium / ex1.py
Created December 18, 2017 16:03 — forked from germank/ex1.py
Code stub for a simple word2vec model
import torch
import torch.nn as nn
from torch.autograd import Variable
class SimpleW2V(nn.Module):
def __init__(self, nwords, ncontexts, vec_size):
super(SimpleW2V, self).__init__()
# randomly initialized vectors
self.words_emb = nn.Embedding(nwords, vec_size)
@RawPlutonium
RawPlutonium / ex2.py
Created December 18, 2017 16:03 — forked from germank/ex2.py
Code stub for a simple text classifier
# encoding=utf-8
# --- Adapted From ---
# Project: learn-pytorch
# Author: xingjunjie github: @gavinxing
# Create Time: 29/07/2017 11:58 AM on PyCharm
# Original code at: https://gist.github.com/GavinXing/9954ea846072e115bb07d9758892382c
import torch
import torch.nn as nn
import torch.autograd as autograd