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
| PS1="[\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\W\[\033[00m\]]\$($( cat ~/.local/git-ps1.sh ))> " |
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
| h = {"amount"=>"700", "dueDate"=>"2018-07-31"} | |
| h.map{|a| a["amount"].to_f } | |
| TypeError Exception: no implicit conversion of String into Integer |
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 pyquery import PyQuery as pq | |
| file = open('i44013001o2003.xlsx', 'r', errors='ignore').read() | |
| doc = pq(file) | |
| list = [ table.text() for table in doc('table').items() ] | |
| data = [list[2], list[4], list[6], list[8]] | |
| countries = [] | |
| for i in range(len(data)): | |
| lenghts = data[i].split('\n') | |
| countries.append(int((len(lenghts) - 14 ) / 13)) |
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
| data = [ | |
| "44013001", | |
| "44042099", | |
| "44071001", | |
| "44071002", | |
| "44072101", | |
| "44072102", | |
| "44072199", | |
| "44072201", | |
| "44072299", |
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
| // layout file | |
| <body> | |
| <div class="container"> | |
| <%= flash_messages %> | |
| <%= yield %> | |
| </div><!-- /container --> | |
| </body> |
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
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
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
| #!/bin/bash | |
| PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| t=`date +"%T"` | |
| gtts-cli $t -l 'es' | mpg123 - |
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 TasksController < ApplicationController | |
| before_action :set_project | |
| before_action :set_task, except: [:index, :new, :create] | |
| def index | |
| @tasks = @project.tasks.all | |
| @completed = @tasks.completed | |
| end | |
| private |
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
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0 | 20110126 | |
| License: none (public domain) */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| b, u, i, center, |
NewerOlder