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
b={} | |
a[1...a.length].each do |m| | |
if b.key? m[3] | |
b[m[3]].push m | |
else | |
b[m[3]] = [m] | |
end | |
end |
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
<table class="subject table-bordered table"> | |
<caption class="text-left"> | |
Part 1 | |
</caption> | |
<thead> | |
<tr class="bg-primary"> | |
<th scope="col">Item No.</th> | |
<th scope="col">Column 1<br> | |
Substance</th> | |
<th scope="col">Column 2<br> |
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
root@slackapptest:/var/log/apache2# gem install nokogiri | |
Building native extensions. This could take a while... | |
ERROR: Error installing nokogiri: | |
ERROR: Failed to build gem native extension. | |
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.10.4/ext/nokogiri | |
/usr/bin/ruby2.5 -r ./siteconf20190914-24160-1m7bnw8.rb extconf.rb | |
checking if the C compiler accepts ... *** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of necessary | |
libraries and/or headers. Check the mkmf.log file for more details. You may |
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
Building native extensions. This could take a while... | |
ERROR: Error installing google_drive: | |
ERROR: Failed to build gem native extension. | |
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.10.4/ext/nokogiri | |
/usr/bin/ruby2.5 -r ./siteconf20190914-23641-ab02iy.rb extconf.rb | |
checking if the C compiler accepts ... *** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of necessary | |
libraries and/or headers. Check the mkmf.log file for more details. You may | |
need configuration options. |
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
#!/usr/bin/ruby | |
require "rubygems" | |
require "json" | |
require "faraday" | |
require "csv" | |
require "google/apis/drive_v3" | |
require "googleauth" | |
require "googleauth/stores/file_token_store" | |
require "fileutils" |
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 random | |
import playingcard | |
class Hand(slef,numCardsInHand) | |
def __init__(self,numCardsInHand): | |
self.numCardsInHand = numCardsInHand | |
cards = [] | |
# Generate cards randomly and add to cards[] | |
suits = ["h","c","d","s"] | |
while(numCardsInHand > 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
class Employee(): | |
def __init__(self,first,last,ssn,sal): | |
self.first = first | |
self.last = last | |
self.ssn = ssn | |
self.sal = sal | |
def __str__(self): | |
outstring = '{0}, {1} - ${2} - {3}'.format(self.last,self.first,self.sal,self.ssn) | |
return outstring | |
def giveRaise(self,percentRaise): |
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 rip_prices ### This takes about 3 minutes | |
products = {} | |
currencies = ["EUR","USD"]#,"GBP","AUD","CAD","CZK","DKK","MXN","NOK","SEK","TRY"] | |
currencies.each do |currency| | |
unless File.exist?("google_" + currency + "_english_1.xml") | |
puts "File google_" + currency + "_english_1.xml does not exist. Skipping..." | |
next | |
end | |
puts "processing " + currency + " file." |