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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.8.1.json", | |
"config": {"view": {"continuousHeight": 300, "continuousWidth": 400}}, | |
"datasets": { | |
"data-204e8e43ab905f6e2739fa18c28c265a": [ | |
{"flux": 0.17485922245069668, "label": "example", "wavelength": 200}, | |
{ | |
"flux": 2.0306186286940084, | |
"label": "example", | |
"wavelength": 201.40280561122245 |
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
hdus = [] # will be list of all the images as PrimaryHDUs needed for reproject | |
for filename in filelist: | |
hdus.append(fits.open(filename)[0]) | |
reprojected_data = [] # will be list of all the new reprojected images | |
base_header = hdus[0].header | |
for hdu in hdus[1:] | |
reprojected_data.append(reproject_interp(hdu, base_header)[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
\setbeamertemplate{background} | |
{% | |
\begin{tikzpicture} | |
\ifnum\thepage=1\relax% | |
\useasboundingbox (0,0) rectangle(\the\paperwidth, \the\paperheight); | |
\fill[color=usydred] (0,0) rectangle (0.5*\the\paperwidth, \the\paperheight); | |
\fill[color=\USYD@titlegraphicbackground] (0.5*\the\paperwidth,0) rectangle (\the\paperwidth, \the\paperheight); | |
\node[inner sep=0pt] (titlegraphic) at (0.75*\paperwidth, 0.5*\paperheight) {\includegraphics[width=0.5\paperwidth]{\USYD@titlegraphic}}; | |
\hskip-10pt | |
\node[inner sep=0pt] (logo) at (2.2, 1.2) {\usebeamertemplate*{logo titlepage}}; |
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
def poly_diff(coef, times=1): | |
if times == 0: | |
return coef | |
new_coef = [i * co for i, co in enumerate(coef)][1:] | |
return np.array(poly_diff(new_coef, times=times-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
/\\frac | |
wwl"ndi{2l"ddi{Nd2f}i()h"np2li / ()h"dp |
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: James Tocknell <aragilar@gmail.com> | |
Date: Thu, 22 Oct 2015 16:27:30 +1100 | |
Subject: Add pkgconfig files | |
--- | |
CMakeLists.txt | 3 +++ | |
config/MakePkgConfig.cmake | 53 ++++++++++++++++++++++++++++++++++++++++++++++ | |
config/pkgconfig.pc.in | 13 ++++++++++++ | |
src/arkode/CMakeLists.txt | 10 +++++++++ | |
src/cvode/CMakeLists.txt | 10 +++++++++ |
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 functools import reduce | |
import pyparsing as pp | |
JOIN_OP = { | |
'and': lambda x,y: x+y, | |
'or': lambda x,y: x|y, | |
} |
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
class Namespace: | |
def __init__(self, **kwargs): | |
self.__dict__.update(kwargs) |
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
def add_attrs(*names): | |
def wrapper(cls): | |
def getattr_func(self, name): | |
for map_name in names: | |
if name in self.__dict__[map_name]: | |
return self.__dict__[map_name][name] | |
raise AttributeError("No such attribute {}".format(name)) | |
def setattr_func(self, name, item): | |
if name in names: | |
self.__dict__[name] = item |
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
""" | |
download dsc + other files from snapshot.d.o | |
NEEDS TO BE REWRITTEN TO USE THEIR API | |
""" | |
import argparse | |
import re | |
from os import makedirs | |
from os.path import basename, join as pjoin | |
from sys import exit | |
from urllib.parse import urljoin |
NewerOlder