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 pandas as pd | |
import matplotlib.pyplot as plt | |
pd.set_option('display.max_columns', 500) | |
pd.set_option('display.width', 100000) | |
price = 'Price' | |
quantity = 'Quantity' | |
def make_table(): | |
global price, quantity | |
table = pd.DataFrame({price:[1,3,3,2,5,6], quantity:[1,2,3,4,5,6]}) |
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
<!DOCTYPE html> | |
<html> | |
<head><meta charset="utf-8" /> | |
<title>dlnd_image_classification</title><script src="https://unpkg.com/jupyter-js-widgets@2.0.*/dist/embed.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<style type="text/css"> | |
/*! | |
* | |
* Twitter Bootstrap |
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
.DS_Store | |
.idea |
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 numpy as np | |
import torch | |
import torch.nn as nn | |
import torchvision.transforms as transforms | |
from torchvision import datasets | |
torch.manual_seed(1) | |
class MnistModel(nn.Module): |
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
notebook_name=$1 | |
project_name=$2 | |
hostname=$3 | |
if [ $(hostname) == $hostname ]; | |
then | |
echo "worked" | |
clear | |
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace $notebook_name.ipynb | |
floyd run --gpu --env pytorch-0.4.0 --follow "jupyter nbconvert --execute --ExecutePreprocessor.timeout=-1 $notebook_name.ipynb" | |
floyd data clone dasmus/projects/$project_name/ |
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
-- Used https://vnegrisolo.github.io/postgresql/generate-fake-data-using-sql as template to create this simplified solution. | |
-- psql -h localhost -U postgres | |
-- CREATE DATABASE test_db; | |
-- \c test_db | |
CREATE TABLE transaction ( | |
id serial primary key, | |
amount integer, | |
account varchar, |
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
@Configuration | |
public class FlywayConfiguration { | |
@Bean(initMethod = "migrate") | |
@FlywayDataSource | |
public Flyway firstFlyway(DataSource dataSource) { | |
return new Flyway( | |
new FluentConfiguration() | |
.locations("db/first-migration") | |
.schemas("first") |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script> | |
function out() { | |
x = document.getElementById('a').value; |
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
-- psql -h localhost -U postgres | |
-- CREATE DATABASE test_db; | |
-- \c test_db | |
CREATE OR REPLACE FUNCTION create_or_update(schema_name_val varchar, tabel_name_val varchar) RETURNS void AS | |
$$ | |
DECLARE | |
log_trigger_name varchar = 'log_trigger_' || tabel_name_val; | |
full_table_name varchar = schema_name_val || '.' || tabel_name_val; | |
audit_table_name varchar = tabel_name_val || '_log'; |
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
-- psql -h localhost -U postgres | |
-- CREATE DATABASE test_db; | |
-- \c test_db | |
-- Trigger create START | |
create schema if not exists public_log; | |
DO | |
$$ | |
DECLARE | |
drop_clause varchar; |
OlderNewer