Skip to content

Instantly share code, notes, and snippets.

#Compute mean with & without greece
fig1_tbl_all = cds_data.groupby('Sovereign')['Spread']
plt.figure(figsize=[20, 5])
fig1_tbl_all.plot()
plt.grid(True)
plt.xlabel('Date')
plt.ylabel('CDS spread (bps)')
Code:
# Distribution table - Outlook
sp_outlook_distr.pivot_table(index=["Type"], columns=sp_outlook_distr["Date"].dt.year, aggfunc={"Date": np.count_nonzero}, fill_value=0, margins=True)

Keybase proof

I hereby claim:

  • I am alpenmilch411 on github.
  • I am alpenmilch411 (https://keybase.io/alpenmilch411) on keybase.
  • I have a public key ASBwBCQA20QUc1ueiwpO_3T_32s51lL4WxO_7Y_qWSyzXQo

To claim this, I am signing this object:

import requests
from bs4 import BeautifulSoup
import re
from pushbullet import Pushbullet
api_key = 'YOUR KEY'
pb = Pushbullet(api_key)
def remove_duplicates(values):
output = []
@alpenmilch411
alpenmilch411 / LN_scraper.py
Created September 15, 2015 20:21
v. 1.01 removed redundant searces
import requests
from bs4 import BeautifulSoup
import os
#Gets chapter links
def get_chapter_links(index_url):
r = requests.get(index_url)
soup = BeautifulSoup(r.content, 'html.parser')
@alpenmilch411
alpenmilch411 / rotx.py
Created September 14, 2015 12:21
ROTX encode/decoder
#ROTX-Encoder/Decoder
# Functions:
def encode(string, integer):
rotated = []
for x in string:
rotated.append(ord(x) + integer)
translated = ''