Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
df = pd.read_csv('./music_project.csv', names=['userID', 'Track', 'artist', 'genre', 'City', 'time', 'Day'])
amount_music_group = {}
# Contando as músicas tocadas em cada cidade
for indice, linha in df.iterrows():
city_name = linha['City']
def execute
@movements.each do |movement|
spu_movement = Activity::SpuMovement.find_or_initialize_by(code: movement["id"], procedure_id: @procedure.id)
next if spu_movement.persisted?
original_individual_id = @procedure.individual_id
progress = create_progress_with_virtual_assistant(@procedure)
spu_movement.assign_attributes(
action: movement["procedimento"],
@edivandecastro
edivandecastro / pg_hba.conf
Created March 24, 2020 13:36
Configuração do pg_hba.conf
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted. Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the server receives a
# SIGHUP signal. If you edit the file on a running system, you have to
@edivandecastro
edivandecastro / config
Created February 27, 2020 13:51
Configuração para VSCode
{
"workbench.colorTheme": "Dracula",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"workbench.iconTheme": "material-icon-theme",
"editor.rulers": [120],
"editor.renderLineHighlight": "gutter",
"editor.tabSize": 2,
"emmet.includeLanguages": {
"javascript": "javascriptreact",
# Lista de pacotes para instalação
sudo apt list |grep postgres| grep postgis
feature/atividade_criar_oficio
feature/create_subprocess
apps
Robo 3T
Dbeaver
Insominia
SimpleScreenRecord
MongoDB compass
#!/bin/bash
function unlock { sudo rm /var/lib/apt/lists/lock; }
function update_repositories {
echo "=======================[ Atualizando repositórios ]======================"
if ! sudo apt-get update
then
echo "Não foi possível atualizar os repositórios. Verifique seu arquivo /etc/apt/sources.list"
@edivandecastro
edivandecastro / packtpub
Last active February 6, 2021 19:19
Lista de livros adquiridos da Packtpub
Android Development with Kotlin
Machine Learning for OpenCV [eBook]
Understanding Software [eBook]
Linux Device Drivers Development [eBook]
Mastering Java 9 [eBook]
Perl 6 Deep Dive [eBook]
Scientific Computing with Python 3 [eBook]
Programming Microsoft Dynamics NAV - Fifth Edition [eBook]
Learning RxJava [eBook]
Continuous Delivery with Docker and Jenkins [eBook]
def same_director
Movie.find_similar(1)
end
require 'rails_helper'
RSpec.describe AdminsController, type: :controller do
describe 'GET #index' do
it 'returns http success' do
get :index
expect(response).to have_http_status(:success)
end
end
end