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
import numpy as np | |
from scipy.optimize import curve_fit | |
def exponential_interpolation(points, N=330): | |
""" | |
Interpolates an exponential curve from 2 to 5 ordered points and returns N interpolated points. | |
Parameters: | |
- points: List of tuples [(x1, y1), (x2, y2), ...] (2 or more points) |
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
# Tools for installing | |
yum install -y wget curl epel-release | |
## https doesnt work :-(, there is some certificate problems | |
sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo | |
## These dev tools are a little too much | |
#yum groupinstall -y 'Development Tools' |
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
dist: xenial | |
language: bash | |
before_install: | |
- sudo add-apt-repository ppa:duggan/bats --yes | |
- sudo apt-get update -qq | |
- sudo apt-get install -qq bats | |
compiler: | |
- gcc | |
install: | |
- make clean |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 2 in line 8.
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
Transaction_date,Product,Price,Payment_Type,Name,City,State,Country,Account_Created,Last_Login,Latitude,Longitude | |
1/2/09 6:17,Product1,1200,Mastercard,carolina,Basildon,England,United Kingdom,1/2/09 6:00,1/2/09 6:08,51.5,-1.1166667 | |
1/2/09 4:53,Product1,1200,Visa,Betina,Parkville ,MO,United States,1/2/09 4:42,1/2/09 7:49,39.195,-94.68194 | |
1/2/09 13:08,Product1,1200,Mastercard,Federica e Andrea,Astoria ,OR,United States,1/1/09 16:21,1/3/09 12:32,46.18806,-123.83 | |
1/3/09 14:44,Product1,1200,Visa,Gouya,Echuca,Victoria,Australia,9/25/05 21:13,1/3/09 14:22,-36.1333333,144.75 | |
1/4/09 12:56,Product2,3600,Visa,Gerd W ,Cahaba Heights ,AL,United States,11/15/08 15:47,1/4/09 12:45,33.52056,-86.8025 | |
1/4/09 13:19,Product1,1200,Visa,LAURENCE,Mickleton ,NJ,United States,9/24/08 15:19,1/4/09 13:04,39.79,-75.23806 | |
1/4/09 20:11,Product1,1200,Mastercard,Fleur,Peoria ,IL,United States,1/3/09 9:38,1/4/09 19:45,40.69361,-89.58889 | |
1/2/09 20:09,Pro |
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
#! /usr/bin/python3 | |
""" | |
This code will take in the geolocated event and turn it into csv format | |
Fields: | |
doc_id, mongo_id, code, root_code, quad_class, goldstein, source, src_actor, src_agent, | |
src_other_agent, target, tgt_actor, tgt_agent, tgt_other_agent, _id, date8, year, month | |
day, ufl, location_name, source_string, lat, lon, stateCode, countryCode, process, entities | |
""" |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
struct _book { | |
int bookid : 3; | |
}; | |
typedef struct _book book; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct book { | |
int id; // 4 bytes | |
char name[15]; // 15 bytes | |
}; | |
typedef struct book book; |
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
# -*- coding: utf-8 -*- | |
mainlibrary = "The Library of Smiles 😀" | |
def ptable(t, s1="random", s2="rythm"): | |
"""Nicely print the table.""" | |
s1 = f" {' '.join(s1)} " | |
print(s1) | |
s2 = " " + s2 |
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
#ifndef UTIL_HPP_ | |
#define UTIL_HPP_ | |
#include <climits> | |
#include <string> | |
#include <errno> | |
#include <time.h> | |
#define MAX(a,b) ( ((a) > (b)) ? (a) : (b) ) | |
#define MIN(a,b) ( ((a) < (b)) ? (a) : (b) ) |
NewerOlder