This file contains hidden or 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 the necessary packages | |
from PIL import Image | |
import pytesseract | |
import argparse | |
import cv2 | |
import os | |
import csv | |
# construct the argument parse and parse the arguments | |
ap = argparse.ArgumentParser() |
This file contains hidden or 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
Ejected | |
STOP -> Stopped | |
Stopped* | |
STOP -> Ejected | |
PLAY -> Playing | |
REWIND -> Rewinding | |
FAST_FORWARD -> FastForwarding | |
Active | |
STOP -> Stopped | |
PLAY -> Stopped |
This file contains hidden or 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
Hospital Manager | |
Open App | |
login -> Homepage | |
Homepage | |
system -> Accounts | |
Accounts |
This file contains hidden or 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 find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): | |
for d in v: | |
for result in find(key, d): |
This file contains hidden or 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
from __future__ import absolute_import, print_function, unicode_literals | |
from django.db import models, transaction | |
from django.utils import six | |
from django.apps import apps | |
from django.core.exceptions import FieldDoesNotExist | |
try: | |
# Django 1.7 | |
from django.contrib.admin.utils import NestedObjects | |
except ImportError: | |
# Django < 1.7 |
This file contains hidden or 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
function swap(n) { | |
var arr = n.toString().split(''); // convert number to string then split into array | |
if (arr.length > 2) { | |
var swap_list = []; // arrary to push newly swapped numbers | |
for (var i = 0; i < arr.length; i++) { | |
for (var j = 0; j < arr.length; j++) { | |
if (i != j) { | |
new_arr = arr.slice(0); // copy old array |
This file contains hidden or 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 swap(num): | |
# convert the number to a string so that we can split into a list | |
# and get the index for each | |
old_arr = list(str(num)) | |
# empty list where we'll push the newly swapped numbers for comparison | |
new_arr = [] | |
# we then loop through the length of the list of numbers and get the | |
# index, pairing it up with the next index in line | |
# for instance: for index 0, we pair it with 1, then 0 with 2 etc. | |
for i, val in enumerate(old_arr): |