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
| var linkedinify = bropost => | |
| bropost.split(/ |\n/g) | |
| .map((post, i) => i % 5 == 0 ? post.toUpperCase() : post.toLowerCase()) | |
| .join(' ').split(/(?=\.|!|\?)/g).join('\n\n') | |
| + '\n\n' + bropost.split(/ |\n/g).map(word => '#' + word).join(' ') |
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
| [{ | |
| "image": "https://42f2671d685f51e10fc6-b9fcecea3e50b3b59bdc28dead054ebc.ssl.cf5.rackcdn.com/illustrations/making_art_759c.svg", | |
| "title": "Making art", | |
| "tags": "creative, painting, woman, art" | |
| }, { | |
| "image": "https://42f2671d685f51e10fc6-b9fcecea3e50b3b59bdc28dead054ebc.ssl.cf5.rackcdn.com/illustrations/quitting_time_dm8t.svg", | |
| "title": "Quitting time", | |
| "tags": "work, office, break, man, coffee, employee" | |
| }, { | |
| "image": "https://42f2671d685f51e10fc6-b9fcecea3e50b3b59bdc28dead054ebc.ssl.cf5.rackcdn.com/illustrations/user_flow_vr6w.svg", |
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 React from 'react'; | |
| import { StyleSheet, Text, View, StatusBar, Dimensions } from 'react-native' | |
| import { Font, AppLoading } from 'expo' | |
| import { | |
| Image, | |
| ListView, | |
| Divider, | |
| Screen, | |
| NavigationBar, | |
| ImageBackground, |
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
| @charset "UTF-8"; | |
| /* | |
| GLUE Tokens - DLS | |
| The contents of this file is owned and generated by the DLS team. | |
| If you require changes making to the values stored here please reach out | |
| to @dls on Slack. | |
| Links: |
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 sys | |
| from random import randint as r | |
| import glob | |
| import cv2 | |
| import numpy as np | |
| USAGE = "python unlabel.py /path/to/training/image/directory/" | |
| assert len(sys.argv) > 1, f'Insufficient arguments: {USAGE}' | |
| args = sys.argv[1:] if '.py' in sys.argv[0] else sys.argv[0:] |
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 sys, os | |
| import json | |
| import glob | |
| from PIL import Image | |
| USAGE = "python labelbox_label.py /path/to/training/image/directory/ /path/to/labelbox/exported/xy/data.json" | |
| assert len(sys.argv) > 2, f'Insufficient arguments: {USAGE}' | |
| args = sys.argv[1:] if '.py' in sys.argv[0] else sys.argv[0:] | |
| assert(len(args) == 2), f'Incorrect usage: {USAGE}' |
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
| Verifying my Blockstack ID is secured with the address 1BYhPgFNU3o7hrgNoVotnESwm6NkUw1KXP https://explorer.blockstack.org/address/1BYhPgFNU3o7hrgNoVotnESwm6NkUw1KXP |
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 logging | |
| import ldap, ldap.filter | |
| def connect(): | |
| conn = ldap.initialize('ldaps://unixldap.cc.ic.ac.uk') | |
| conn.simple_bind_s() | |
| return conn | |
| def search(conn, user, return_list=True): | |
| if not isinstance(user, list): |
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
| # a million commits | |
| for Y in {1999..2018} | |
| do | |
| mkdir $Y | |
| cd $Y | |
| for M in {01..12} | |
| do | |
| mkdir $M | |
| cd $M | |
| for D in {01..31} |
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 sumy.parsers.plaintext import PlaintextParser | |
| from sumy.nlp.tokenizers import Tokenizer | |
| from sumy.summarizers.lsa import LsaSummarizer as Summarizer | |
| from sumy.nlp.stemmers import Stemmer | |
| from sumy.utils import get_stop_words | |
| LANG = "english" | |
| tokenizer = Tokenizer(LANG) | |
| stemmer = Stemmer(LANG) | |
| summarizer = Summarizer(stemmer) |