Skip to content

Instantly share code, notes, and snippets.

View rhoit's full-sized avatar
🎪
An empty shell

rho rhoit

🎪
An empty shell
View GitHub Profile
import matplotlib.pyplot as plt
def myplot(x, y, **kwargs):
plt.plot(x, y, **kwargs)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('My plot')
plt.show()
x = [1, 3, 4, 5]
import numpy as np
import matplotlib.pyplot as plt
n = 100
x = np.arange(n)
plt.plot(x, x, label='linear')
plt.plot(x, 2*x, label='double')
plt.plot(x, x*x, label='square')
plt.plot(x, x**3, label='power')
plt.grid()

Config your Conky with simple bash script

INTRO

disclaimer

not to be taken seriously!

requirements

Jeans Shirt Jacket Shoes
1 1 0 1
0 0 0 1
0 1 0 1
0 1 1 1
1 0 1 0
1 0 1 0
1 0 1 0
1 0 0 0
0 1 0 1
#!../venv/bin/python
import pandas as pd
import mlxtend.preprocessing
import mlxtend.frequent_patterns
# 1. Prepare the dataset (list of lists)
dataset = [
{'Butter', 'Bread', 'Milk'},
{'Bread', 'Milk'},
shrimp almonds avocado vegetables mix green grapes whole weat flour yams cottage cheese energy drink tomato juice low fat yogurt green tea honey salad mineral water salmon antioxydant juice frozen smoothie spinach olive oil
burgers meatballs eggs
chutney
turkey avocado
mineral water milk energy bar whole wheat rice green tea
low fat yogurt
whole wheat pasta french fries
soup light cream shallot
frozen vegetables spaghetti green tea
french fries
#!/usr/bin/python
import argparse
import itertools
import collections
def get_frequent_itemsets(transactions, min_support):
# Count individual items
freq = collections.defaultdict(int)
#!/usr/bin/python
import argparse
import itertools
import collections
sample = [
['Butter', 'Bread', 'Milk'],
['Bread', 'Milk'],
This file has been truncated, but you can view the full file.