Thursday, February 2, 2017

Configuring ctags for Python and Vim

http://www.held.org.il/blog/2011/02/configuring-ctags-for-python-and-vim/

  1. Install ctags
  2. Configure ctags.
    Add to ~/.ctags the following, one option per line:
    1. --python-kinds=-i
    2. optional: --exclude=<partial names of bad files/directories>. e.g. --exclude=*/build/* to exclude all files inside 'build/' directories
  3. Add a cron to rebuild tags, for instance:
    1 * * * * ctags -R -o ~/mytags ~/src
  4. Configure vim:
    add to ~/.vimrc: :set tags=~/mytags
  5. Use Vim:
    1. vim -t <tag name> to open vim straight on the tag
    2. Ctrl+] to jump to tag when over a word
    3. Ctrl+T to pop back
    4. :tselect or :stselect to open
    5. :tnext, :tprev to go to next/prev tag finding
    6. :help tags for more ๐Ÿ™‚

Setting up a MinGW-w64 build environment

http://ascend4.org/Setting_up_a_MinGW-w64_build_environment



    First steps


    MSYS


    Switchable 32- and 64-bit modes


    MinGW-w64


    SWIG

    • Download a pre-compiled 'swigwin' copy of SWIG We used swingwin-x.x.xx.zip.
    • Create a folder c:\mingw\msys\opt using Windows Explorer, then copy the 'swigwin-2.0.10' folder out of the Zip archive and into the new location c:\mingw\msys\opt\swigwin-2.0.10
    • In MSYS, type gedit ~/.profile, then add the SWIG directory to your PATH in your profile, by adding the following line at the bottom of that file:
    export PATH=$PATH:/opt/swigwin-2.0.10
    
    • Close your MSYS window and reopen it, so that the ~/.profile will be re-read.
    • Test that SWIG is accessible by typing swig -version. You should see the version number and some other information output.
    As SWIG is a code pre-processor, it doesn't matter whether it's 32-bit or 64-bit, they will be perfectly equivalent. That is the reason that we install SWIG under msys rather than in mingw\32 or mingw\64. Note that SWIG version 2.0.5 was known to cause problems with MinGW-w64.


      Monday, September 26, 2016

      verilog singed & unsigned

      If the size does not match the number of bits in the value:

      • If the left-most bit of value is 0 or 1, the value is left-extended with 0
      • If the left-most bit of value is Z, the value is left-extended with Z
      • If the left-most bit of value is X, the value is left-extended with X
      • But…a signed value is not sign-extended!

      8’hA   unsigned value extends to 00001010
      8’shA  signed value extends to     00001010

      There are two types of operators in Verilog and SystemVerilog

      • Self-determined operators do not modify their operand(s)
      • Context-determined operators modify all operands to have the same size, using zero-extension or sign-extension

      http://www.uccs.edu/~gtumbush/published_papers/Tumbush%20DVCon%2005.pdf

      module add_signed_1995 (
            input [2:0] A,
            input [2:0] B,
            output [3:0] Sum );
       assign Sum = {A[2],A} + {B[2],B};
      endmodule // add_signed_1995
      Code Example 1: Addition - Verilog 1995

       module add_signed_2001 (
            input signed [2:0] A,
            input signed [2:0] B,
            output signed [3:0] Sum );
       assign Sum = A + B;
      endmodule // add_signed_2001
      Code Example 2: Addition - Verilog 2001

      module add_carry_signed_1995 (
            input [2:0] A,
            input [2:0] B,
            input carry_in,
            output [3:0] Sum );
       assign Sum = {A[2],A} + {B[2],B} + carry_in;
      endmodule // add_carry_signed_1995
      Code Example 3: Add with Carry - Verilog 1995

      module add_carry_signed_2001 (
            input signed [2:0] A,
            input signed [2:0] B,
            input carry_in,
            output signed [3:0] Sum );
       assign Sum = A + B + carry_in;
      endmodule // add_carry_signed_2001
      Code Example 4: Addition with Carry – Incorrect

      module add_carry_signed_final (
            input signed [2:0] A,
            input signed [2:0] B,
            input carry_in,
            output signed [3:0] Sum );
       assign Sum = A + B + $signed({1'b0,carry_in}); ;
      endmodule // add_carry_signed_final
      Code Example 5: Add with Carry - Correct


      http://web.mit.edu/6.111/www/f2012/handouts/L08.pdf



      MoviePy

      User Guide

      MoviePy

      MoviePy is a Python module for video editing, which can be used for basic operations (like cuts, concatenations, title insertions), video compositing (a.k.a. non-linear editing), video processing, or to create advanced effects. It can read and write the most common video formats, including GIF.

      # Video and Audio mixing python script
      
      from moviepy.editor import *
      
      # VIDEO CLIPS
      vclip = VideoFileClip("video.mp4") # or .avi, .webm, .gif ...
      # AUDIO CLIPS
      aclip = AudioFileClip("audio.wav") # or .ogg, .wav... or a video !
      final = concatenate_videoclips([vclip]).set_audio(aclip)
      final.write_videofile("movie.mp4")
      
      

      Thursday, June 23, 2016

      USTA tennis links

      Nocal Tournament search

      FIND A RANKING
      o   Search by First name and Last name – You must enter at the least the first two characters of both the first and last name.
      o   Search by Last Name only – You must enter at least the first 3 characters of the player’s last name.

      https://www.usta.com/Youth-Tennis/Junior-Competition/junior_tournament_news/


      Player Search
      http://www.tennisrecruiting.net/player.asp


      Monday, June 8, 2015

      Use find command but exclude files in two directories & svn set-depth

      http://www.gnu.org/software/findutils/manual/html_mono/find.html

      find [file...] [expression]

      1.3 find Expressions

      The expression that find uses to select files consists of one or more primaries, each of which is a separate command line argument to find. find evaluates the expression each time it processes a file. An expression can contain any of the following types of primaries:
      options
      affect overall operation rather than the processing of a specific file; 
      tests
      return a true or false value, depending on the file's attributes; 
      actions
      have side effects and return a true or false value; and 
      operators
      connect the other arguments and affect when and whether they are evaluated.



      find . -type f -name "*_peaks.bed" ! -path "./tmp/*" ! -path "./scripts/*" -exec svn update -set-depth empty {} \;




      Tuesday, March 3, 2015

      ์ง€๊ตฌ์— ์กด์žฌํ•˜๋Š” ‘์ตœ๊ฐ• ์šด๋™’ ๋ฒ„ํ”ผ

      The burpee is a full body exercise used in strength training and as an aerobic exercise. The basic movement is performed in four steps and known as a "four-count burpee":
      1. Begin in a standing position.
      2. Drop into a squat position with your hands on the ground. (count 1)
      3. Kick your feet back, while keeping your arms extended. (count 2)
      4. Immediately return your feet to the squat position. (count 3)
      5. Jump up from the squat position (count 4)

      Origin[edit]

      According to Oxford Dictionaries Online, the exercise was named in the 1930s for American physiologist Royal H. Burpee, who developed theburpee test. He earned a PhD in applied physiology from Columbia University in 1940 and created the "burpee" exercise as part of his PhD thesis as a quick and simple way to assess fitness.[8] The exercise was popularized when the United States Armed Services adopted it as a way to assess the fitness level of recruits when the US entered WWII. Consisting of a series of the exercises performed in rapid succession, the test was meant to be a quick measure of agility, coordination and strength.[9]

      http://en.wikipedia.org/wiki/Burpee_%28exercise%29

      <div align=right><font color=blue>โ“’์œ„์ฆˆ๋คํ•˜์šฐ์Šค ์ œ๊ณต</font></div>


      https://www.youtube.com/watch?v=JZQA08SlJnM


      http://www.sisainlive.com/news/articleView.html?idxno=22217