Tahsin Mayeesha is currently working with Berkman Klein Center Of Internet and Society on interactive network visualization project as a participant of Google Summer Of Code 2018. Previously, she worked in Cramstack on electricity data, a data science startup in Bangladesh focusing on consulting and government project. Currently she's an undergraduate student in North South University, Bangladesh majoring in computer science. She runs "Learning Machine Learning" publication in Medium featuring tutorials and projects. Mayeesha graduated from Udacity's Machine Learning Nanodegree in 2017 and also participated in Fast.ai as an international fellow.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import time | |
cap = cv2.VideoCapture(0) | |
time.sleep(1) | |
background = 0 | |
for i in range(30): | |
ret, background = cap.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Official evaluation script for SQuAD version 2.0. | |
In addition to basic functionality, we also compute additional statistics and | |
plot precision-recall curves if an additional na_prob.json file is provided. | |
This file is expected to map question ID's to the model's predicted probability | |
that a question is unanswerable. | |
""" | |
import argparse | |
import collections | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LanguageClassifier(tf.train.Checkpoint): | |
def __init__(self,language_module,num_labels,dense_units=(128,128),dropouts=(0.1,0.1)): | |
# initialization stuff | |
super(LanguageClassifier,self).__init__() | |
self.language_module = language_module | |
self.model_encoder = language_module.model | |
# classifier head layers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
InvalidArgumentError Traceback (most recent call last) | |
~\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in get_attr(self, name) | |
2325 with c_api_util.tf_buffer() as buf: | |
-> 2326 c_api.TF_OperationGetAttrValueProto(self._c_op, name, buf) | |
2327 data = c_api.TF_GetBuffer(buf) | |
InvalidArgumentError: Operation 'StatefulPartitionedCall' has no attr named '_XlaCompile'. | |
During handling of the above exception, another exception occurred: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import networkx as nx | |
from itertools import combinations | |
from utils import set_node_size | |
from fa2l import force_atlas2_layout | |
def get_distance(pos1,pos2): | |
""" Returns distance between two points | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_node_color(G,color_by,colormap=None): | |
""" | |
Returns a list of colors for each node based on the provided colormap. | |
Parameters | |
___________ | |
G : graph. | |
A networkx graph. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this has to be first to make sure that matplotlib runs in headless mode | |
import matplotlib | |
matplotlib.use("Agg") | |
import sys | |
import numpy as np | |
import warnings | |
warnings.filterwarnings('ignore') | |
from fa2l import force_atlas2_layout |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder