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
# Please fill in the method definition below: | |
def Organizer(c) | |
c.select{String===_1&&/^.{,5}$|^tomatoes$/!~_1} | |
end | |
# Modify the solution above. Emojis are free. | |
# Code below will check correctness. | |
example_collection = [ | |
'apples', |
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 'csv' | |
require 'json' | |
def produce_song_list_from_song_entries(song_entries) | |
song_entries | |
.map { |_, _, song, size| [File.basename(song), size.to_i] } | |
.sort_by { |song, size| size } | |
.reverse | |
end |
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 server_ip "149.56.16.230" | |
set server_port "25602" | |
set players_by_username (http "https://api.mcsrvstat.us/2/$server_ip:$server_port" | jq '.players.list | join(" ")') | |
set players_list (string split ' ' (string trim --left --right --chars="\"" $players_by_username)) | |
for player in $players_list | |
switch $player | |
case "samtherat6" | |
set --append players "Samrat" | |
case "Felandric" | |
set --append players "Aviv" |
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
a = Array.new(9) { Array.new(9) { rand(0..9) } } | |
s = t = 0 | |
(0...9).each do |i| | |
(0...9).each do |j| | |
print "#{a[i][j]} " | |
s += 1 | |
if s == 3 | |
print ' | ' | |
s = 0 | |
end |
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 'twitter' | |
require 'google_maps_service' | |
require 'open-uri' | |
require 'twilio' | |
require 'scanf' | |
require 'pp' | |
account_sid = 'ACd7b75f36a9974788063bd92e4c4c6273' | |
auth_token = '1f976d928060ae1a8ba29a1b8656e4f1' |
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
Partial program for calculating f and g. | |
$IBFMC TS02 | |
SYMARG | |
DIMENSION F(100), G(100), OUTPUT(22) | |
C FORMAC DATA DECLARATIONS. | |
ATOMIC MU, SIGMA, EPSI, T | |
DEPEND (MU, SIGMA, EPSI/T) | |
LET F(1) = 1. | |
LET G(1)=0. | |
DO 13 I=l, 100 |