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
| # pip install selenium bs4 | |
| url = 'https://www.amphenol-cs.com/millipacs-10127112102lf.html' | |
| from bs4 import BeautifulSoup | |
| from selenium import webdriver | |
| from selenium.webdriver import ChromeOptions | |
| options = webdriver.ChromeOptions() | |
| options.add_argument('--headless=new') |
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 cv2 | |
| import numpy as np | |
| from pdf2image import convert_from_path | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("filename", help="Enter a pdf filename to process") | |
| args = parser.parse_args() | |
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
| // Cross-broswer implementation of text ranges and selections | |
| // documentation: http://bililite.com/blog/2011/01/17/cross-browser-text-ranges-and-selections/ | |
| // Version: 2.6 | |
| // Copyright (c) 2013 Daniel Wachsstock | |
| // MIT license: | |
| // Permission is hereby granted, free of charge, to any person | |
| // obtaining a copy of this software and associated documentation | |
| // files (the "Software"), to deal in the Software without | |
| // restriction, including without limitation the rights to use, | |
| // copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| // Cross-broswer implementation of text ranges and selections | |
| // documentation: http://bililite.com/blog/2011/01/17/cross-browser-text-ranges-and-selections/ | |
| // Version: 2.6 | |
| // Copyright (c) 2013 Daniel Wachsstock | |
| // MIT license: | |
| // Permission is hereby granted, free of charge, to any person | |
| // obtaining a copy of this software and associated documentation | |
| // files (the "Software"), to deal in the Software without | |
| // restriction, including without limitation the rights to use, | |
| // copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
| // lighthouse-batch -s -p "--perf --quiet" -f urls-boats.txt -o report-lvb | |
| var parsedJSON = require('./report-lvb/summary.json'); | |
| var worst = []; | |
| var seventies = []; | |
| var eighties = []; | |
| var nineties = []; | |
| console.log('Total: '+parsedJSON.length); | |
| for (var r in parsedJSON) { | |
| var row = parsedJSON[r]; |
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 els = document.getElementsByClassName("yt-simple-endpoint"); | |
| var links = {}; | |
| for (var e in els ) { | |
| if( els[e].href && els[e].href.indexOf('watch')!=-1 ) { | |
| var link = els[e].href.split('&list')[0]; | |
| links[link] = link; | |
| } | |
| } | |
| for(var l in Object.keys(links)) { | |
| console.log(l); |
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
| /*! | |
| * jQuery JavaScript Library v1.4.1 | |
| * http://jquery.com/ | |
| * | |
| * Copyright 2010, John Resig | |
| * Dual licensed under the MIT or GPL Version 2 licenses. | |
| * http://jquery.org/license | |
| * | |
| * Includes Sizzle.js | |
| * http://sizzlejs.com/ |
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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
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
| Directives | |
| ========== | |
| Directive calls controller | |
| ------------------------- | |
| app.controller("AppCtrl", function($scope) { | |
| $scope.func = function() { | |
| alert("Controller's function published on scope"); | |
| } | |
| } |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder