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
#!/usr/bin/env ruby | |
require 'paint/pa' | |
pa "running pre git checks from #{Dir.pwd}/pre_git_checks ...", :gray | |
class DeleteCodeError < RuntimeError; end | |
def ags(tag) | |
#res = `unbuffer ag #{tag}` | |
res = `ag #{tag}` |
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
https://zephyrdocs.atlassian.net/wiki/spaces/ZE/pages/1558445671/Zephyr+REST+API |
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 pytest | |
from selenium import webdriver | |
from pdb import set_trace | |
from poms_google import * | |
from html.parser import HTMLParser | |
class HP(HTMLParser): | |
def handle_starttag(self, tag, attrs): | |
#print("start tag: ", tag, attrs) |
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
from pdb import set_trace | |
activity = [ | |
(1, '@login', None), | |
(5, '@startVideo', 'Bob'), | |
(20, '@startVideo', 'Thomas'), | |
(66, '@stopVideo', 'Thomas'), | |
(70, '@startVideo', 'Lily'), | |
(75, '@stopVideo', 'Bob'), | |
(78, '@stopVideo', 'Lily'), |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
from pyte_prism import Page, Element, Elements | |
from pdb import set_trace | |
#from pyte_prism import PageSection, PageIframe, Element, Section, Sections, Iframe | |
# Page must inherit Page class | |
class GoogleHome(Page): | |
_url = "http://google.com/" |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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
=begin | |
I needed a few more minutes to run an optimization on the hacker rank exercise. | |
Problem: supply an array arr, such that: | |
- We sum each element in the array in sequence | |
- During the operation, the current total never drops below 1 | |
- What is the minimum starting value for a given array? | |
=end | |
def min_sum(arr) |
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
require 'httparty' | |
require 'json' | |
=begin | |
Using any modern language, write a throw-away app or script that will download orders directly from http://files.olo.com/pizzas.json and output the top 20 most frequently ordered pizza topping combinations. List the toppings for each popular pizza topping combination along with its rank and the number of times that combination has been ordered. | |
=end | |
res = HTTParty.get('http://files.olo.com/pizzas.json') | |
data = JSON.parse(res) |
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
require 'httparty' | |
require 'json' | |
=begin | |
Using any modern language, write a throw-away app or script that will download orders directly from http://files.olo.com/pizzas.json and output the top 20 most frequently ordered pizza topping combinations. List the toppings for each popular pizza topping combination along with its rank and the number of times that combination has been ordered. | |
=end | |
res = HTTParty.get('http://files.olo.com/pizzas.json') | |
data = JSON.parse(res) |
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 pygame | |
from pygame.transform import scale2x | |
screen = pygame.display.set_mode((640,480)) | |
spritesheet = pygame.image.load('spritesheet.png') | |
pacman_right = scale2x(spritesheet.subsurface(455, 0, 16, 16)) | |
pacman_left = scale2x(spritesheet.subsurface(455, 16, 16, 16)) | |
pacman_up = scale2x(spritesheet.subsurface(455, 32, 16, 16)) | |
pacman_down = scale2x(spritesheet.subsurface(455, 48, 16, 16)) |
NewerOlder