GithubHelp home page GithubHelp logo

#AstroWheel

All kinds of snippets and wheels for astronomers

post regulations

  1. edit the _posts.md file instead of the README.md, the README.md is generated by compile.py.
  2. Each post need to have a brief title start with level 2 title "## some question"
  3. we can make a discription and add some meta data for this posts, like tags. Format of tags should be "* tags: tag1, tag2..." just follow the title in the next line
  4. Then submitter start a level 4 title with his or her name "#### someone" (to make the text smaller..)
  5. And the last is your content.
  • the compile.py will auto generate the tags.md and the table of contents below, so make sure that you abide by this rules to make it work properly.
  • you should run compile.py every time you add or delete a new post. If you do not have python, your can just leave this compiling work for others.

Here is an example post.

some problems title

[//]: # (This is a comment(not show in the home page) [//]: # (you should not change the title "## some problems title", because the compile.py need it to be this)

  • tags: python, blabla, wheel

blablabla blalbalba here is the code

## some problems about python
* tags: python, blabla, wheel

#### by [someone](https://github.com/someone)
blablabla
blalbalba
here is the code

table of contents

prevent neglectful rm -rf

  • tags: shell, rm

how to prevent neglectful rm -rf?

  • description: mv the things to ~/.trash/<date-time>
  • disadvantages: you should clean your .trash using rmSure from time to time

code:

alias rmSure=/bin/rm
alias rm=trash
trash()
{
    tempDir=~/.trash/`date +%Y-%m-%d-%H-%M-%S`
    mkdir -p $tempDir
    mv -f $@ $tempDir
}

my trash: my trash

good use of git branch

  • tags: git, github, version control

how to manage git branches efficiently?

see

good ds9 startup script

  • tags: ds9, bash
  • auto load regions that has the same name (and .reg extension) as the fits file
  • start with multiframe mode

mv your ds9 to ds9.bin and ds9.zip to ds9.bin.zip

save the code to ds9 in the same folder as ds9.bin and chmod +x

#!/bin/bash
export XPA_METHOD=local
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ -f `echo ${@%.fits}.reg` ]]; then
	./ds9 -multiframe -lock frame image -zscale -linear -cmap gray -region shape projection $@ -region load all ${@%.fits}.reg&
else
	./ds9 -multiframe -lock frame image -zscale -linear -cmap gray -region shape projection $@&
fi

astrowheel's Projects

astrowheel icon astrowheel

All kinds of snippets and wheels for astronomers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.