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 pyunicorn.timeseries import RecurrencePlot, RecurrenceNetwork, CrossRecurrencePlot, JointRecurrencePlot | |
def logistic_map(x0, r, T): | |
""" | |
Returns a time series of length T using the logistic map | |
x_(n+1) = r*x_n(1-x_n) at parameter r and using the initial condition x0. | |
INPUT: x0 - Initial condition, 0 <= x0 <= 1 |
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
VšĮ Šviesos kūgiai | |
LT717044060007931577 | |
paskirtis: | |
Parama Ukrainos medikams |
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 pandas as pd | |
import numpy as np | |
taxa = pd.read_csv("Raw_NOW_data/now_export_locsp_2022-04-27.csv", delimiter="\t", na_values = ["\\N", "n", "N"], \ | |
dtype={'MAX_AGE': 'float64', 'MIN_AGE': 'float64', 'LIDNUM': 'int'}) | |
taxa = taxa.fillna(-999) | |
print(taxa.shape) | |
NA_g = taxa['GENUS']==-999 |
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
# -------------------- 2E1. | |
# . Which of the expressions below correspond to the statement: the probability of rain on Monday? | |
#Pr(rain) | |
#Pr(rain|Monday) | |
#Pr(Monday|rain) | |
#Pr(rain, Monday)/ Pr(Monday) | |
#2) Pr(rain|Monday) | |
# ------------------------------ 2E2. | |
#Which of the following statements corresponds to the expression: Pr(Monday|rain)? |
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
for file in *.PDF; do | |
pdftk $file cat 1-endsouth output $file"_rot.pdf" | |
done |
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
from __future__ import division | |
import math | |
import matplotlib.pyplot as plt | |
import numpy as np | |
width = 200 | |
length = 300 | |
n_lines = 6 | |
min_dist = 10 | |
min_separation = 50 |
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
int duty = 0; | |
int steps = 256; //no. of light levels | |
int sunrisespeed = 20;//no. of pulses, change to ~5400 to have 30min-long sunrise | |
int minutesUntilSunrise = 0; //change to time until sunrise in minutes | |
int i; | |
int j; | |
int pulsepin = 9; | |
unsigned long currentMillis = 0; | |
int previousMillis = 0; |
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
\usepackage{minted} | |
\begin{document} | |
\subsection*{Implementation} | |
\begin{minted}{python} | |
for i in range(m): | |
diff = self.dataset - points[:, i, newaxis] | |
tdiff = dot(self.inv_cov, diff) | |
energy = sum(diff * tdiff, axis=0) / 2.0 | |
result[i] = sum(exp(-energy), axis=0) |
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
from __future__ import division | |
#A decently-looking table in A&A long table format (http://www.aanda.org/author-information/latex-issues/latex-examples#large_tables) | |
#all the data columns are provided as lists, selected from a database. I cut that part out for clarity. | |
ofile = open('texts/datatable.tex', 'w') | |
ofile.write('\documentclass[onecolumn, 11pt]{aa}') | |
ofile.write('\usepackage{array}\n') | |
ofile.write('\pagestyle{empty}\n') | |
ofile.write('\setlength\extrarowheight{4pt}\n') |
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
# A minimal working example of fitting your model to data using SciPy. | |
# I rewrote the Cookbook example (http://wiki.scipy.org/Cookbook/FittingData) for a simpler case | |
# and simpler syntax. | |
from __future__ import division | |
from pylab import * | |
from scipy import * | |
import numpy as np | |
from scipy import optimize |
NewerOlder