working on it ...

Filters

Explore Public Snippets

Sort by

Found 50k snippets matching: stream

    public by sim642 modified Jul 5, 2015  626579  50  4  1

    Digitally Imported premium streams

    Digitally Imported premium streams: DI.m3u
    #EXTM3U
    
    #EXTINF:-1,Digitally Imported - Ambient
    http://pub1.diforfree.org:8000/di_ambient_hi
    
    #EXTINF:-1,Digitally Imported - Big Room House
    http://pub1.diforfree.org:8000/di_bigroomhouse_hi
    
    #EXTINF:-1,Digitally Imported - Breaks
    http://pub1.diforfree.org:8000/di_breaks_hi
    
    #EXTINF:-1,Digitally Imported - ChillHop
    http://pub1.diforfree.org:8000/di_chillhop_hi
    
    #EXTINF:-1,Digitally Imported - Chillout
    http://pub1.diforfree.org:8000/di_chillout_hi
    
    #EXTINF:-1,Digitally Imported - Chillout Dreams
    http://pub1.diforfree.org:8000/di_chilloutdreams_hi
    
    #EXTINF:-1,Digitally Imported - Chiptunes
    http://pub1.diforfree.org:8000/di_chiptunes_hi
    
    #EXTINF:-1,Digitally Imported - Classic EuroDance
    http://pub1.diforfree.org:8000/di_classiceurodance_hi
    
    #EXTINF:-1,Digitally Imported - Classic EuroDisco
    http://pub1.diforfree.org:8000/di_classiceurodisco_hi
    
    #EXTINF:-1,Digitally Imported - Classic Trance
    http://pub1.diforfree.org:8000/di_classictrance_hi
    
    #EXTINF:-1,Digitally Imported - Classic Vocal Trance
    http://pub1.diforfree.org:8000/di_classicvocaltrance_hi
    
    #EXTINF:-1,Digitally Imported - Club Dubstep
    http://pub1.diforfree.org:8000/di_clubdubstep_hi
    
    #EXTINF:-1,Digitally Imported - Club Sounds
    http://pub1.diforfree.org:8000/di_clubsounds_hi
    
    #EXTINF:-1,Digitally Imported - Cosmic Downtempo
    http://pub1.diforfree.org:8000/di_cosmicdowntempo_hi
    
    #EXTINF:-1,Digitally Imported - Dark DnB
    http://pub1.diforfree.org:8000/di_darkdnb_hi
    
    #EXTINF:-1,Digitally Imported - Deep House
    http://pub1.diforfree.org:8000/di_deephouse_hi
    
    #EXTINF:-1,Digitally Imported - Deep Nu-Disco
    http://pub1.diforfree.org:8000/di_deepnudisco_hi
    
    #EXTINF:-1,Digitally Imported - Deep Tech
    http://pub1.diforfree.org:8000/di_deeptech_hi
    
    #EXTINF:-1,Digitally Imported - Disco House 
    http://pub1.diforfree.org:8000/di_discohouse_hi
    
    #EXTINF:-1,Digitally Imported - DJ MIXES
    http://pub1.diforfree.org:8000/di_djmixes_hi
    
    #EXTINF:-1,Digitally Imported - Downtempo Lounge
    http://pub1.diforfree.org:8000/di_downtempolounge_hi
    
    #EXTINF:-1,Digitally Imported - Drum and Bass
    http://pub1.diforfree.org:8000/di_drumandbass_hi
    
    #EXTINF:-1,Digitally Imported - Dubstep
    http://pub1.diforfree.org:8000/di_dubstep_hi
    
    #EXTINF:-1,Digitally Imported - EcLectronica
    http://pub1.diforfree.org:8000/di_eclectronica_hi
    
    #EXTINF:-1,Digitally Imported - Electro House
    http://pub1.diforfree.org:8000/di_electrohouse_hi
    
    #EXTINF:-1,Digitally Imported - Epic Trance
    http://pub1.diforfree.org:8000/di_epictrance_hi
    
    #EXTINF:-1,Digitally Imported - EuroDance
    http://pub1.diforfree.org:8000/di_eurodance_hi
    
    #EXTINF:-1,Digitally Imported - Funky House
    http://pub1.diforfree.org:8000/di_funkyhouse_hi
    
    #EXTINF:-1,Digitally Imported - Future Synthpop
    http://pub1.diforfree.org:8000/di_futuresynthpop_hi
    
    #EXTINF:-1,Digitally Imported - Glitch Hop
    http://pub1.diforfree.org:8000/di_glitchhop_hi
    
    #EXTINF:-1,Digitally Imported - Goa & Psychedelic Trance
    http://pub1.diforfree.org:8000/di_goapsy_hi
    
    #EXTINF:-1,Digitally Imported - Hands Up 
    http://pub1.diforfree.org:8000/di_handsup_hi
    
    #EXTINF:-1,Digitally Imported - Hardcore
    http://pub1.diforfree.org:8000/di_hardcore_hi
    
    #EXTINF:-1,Digitally Imported - Hard Dance
    http://pub1.diforfree.org:8000/di_harddance_hi
    
    #EXTINF:-1,Digitally Imported - Hardstyle
    http://pub1.diforfree.org:8000/di_hardstyle_hi
    
    #EXTINF:-1,Digitally Imported - House
    http://pub1.diforfree.org:8000/di_house_hi
    
    #EXTINF:-1,Digitally Imported - Latin House
    http://pub1.diforfree.org:8000/di_latinhouse_hi
    
    #EXTINF:-1,Digitally Imported - Liquid DnB 
    http://pub1.diforfree.org:8000/di_liquiddnb_hi
    
    #EXTINF:-1,Digitally Imported - Liquid Dubstep
    http://pub1.diforfree.org:8000/di_liquiddubstep_hi
    
    #EXTINF:-1,Digitally Imported - Lounge
    http://pub1.diforfree.org:8000/di_lounge_hi
    
    #EXTINF:-1,Digitally Imported - Mainstage
    http://pub1.diforfree.org:8000/di_mainstage_hi
    
    #EXTINF:-1,Digitally Imported - Minimal
    http://pub1.diforfree.org:8000/di_minimal_hi
    
    #EXTINF:-1,Digitally Imported - Oldschool Acid
    http://pub1.diforfree.org:8000/di_oldschoolacid_hi
    
    #EXTINF:-1,Digitally Imported - Classic Electronica
    http://pub1.diforfree.org:8000/di_oldschoolelectronica_hi
    
    #EXTINF:-1,Digitally Imported - Progressive
    http://pub1.diforfree.org:8000/di_progressive_hi
    
    #EXTINF:-1,Digitally Imported - Progressive Psy
    http://pub1.diforfree.org:8000/di_progressivepsy_hi
    
    #EXTINF:-1,Digitally Imported - PsyChill
    http://pub1.diforfree.org:8000/di_psychill_hi
    
    #EXTINF:-1,Digitally Imported - Russian Club Hits
    http://pub1.diforfree.org:8000/di_russianclubhits_hi
    
    #EXTINF:-1,Digitally Imported - Sankeys Radio
    http://pub1.diforfree.org:8000/di_sankeys_hi
    
    #EXTINF:-1,Digitally Imported - Soulful House
    http://pub1.diforfree.org:8000/di_soulfulhouse_hi
    
    #EXTINF:-1,Digitally Imported - Space Dreams
    http://pub1.diforfree.org:8000/di_spacemusic_hi
    
    #EXTINF:-1,Digitally Imported - Tech House
    http://pub1.diforfree.org:8000/di_techhouse_hi
    
    #EXTINF:-1,Digitally Imported - Techno
    http://pub1.diforfree.org:8000/di_techno_hi
    
    #EXTINF:-1,Digitally Imported - Trance Channel
    http://pub1.diforfree.org:8000/di_trance_hi
    
    #EXTINF:-1,Digitally Imported - Trap
    http://pub1.diforfree.org:8000/di_trap_hi
    
    #EXTINF:-1,Digitally Imported - Tribal House
    http://pub1.diforfree.org:8000/di_tribalhouse_hi
    
    #EXTINF:-1,Digitally Imported - UK Garage
    http://pub1.diforfree.org:8000/di_ukgarage_hi
    
    #EXTINF:-1,Digitally Imported - UMF Radio
    http://pub1.diforfree.org:8000/di_umfradio_hi
    
    #EXTINF:-1,Digitally Imported - Vocal Chillout
    http://pub1.diforfree.org:8000/di_vocalchillout_hi
    
    #EXTINF:-1,Digitally Imported - Vocal Trance
    http://pub1.diforfree.org:8000/di_vocaltrance_hi
    
    
    
    

    public by lbottaro modified Oct 17, 2013  529615  10  8  0

    How to get the list of all the activities comparing two UCM streams in python

    This script shows how to get the list of all the activities comparing two ucm streams. The command returns a list object you can easily loop and print.
    import os
    
    bl_old="myOldBaseline@/MyVobs"
    bl_new="myNewBaseline@/MyVobs"
    myView = "MyView"
    
    diff_act=os.popen("cleartool setview -exec \"cleartool diffbl -nmerge -activities "+bl_old+" "+ bl_new+" \" " +myView).readlines()
    
    for act in diff_act:
      print ("ACTIVITY: "+str(act))
    

    public by phuonght modified Jan 23, 2016  212079  0  3  0

    A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.

    A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.: HLS_dvr.sh
    # required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier 
    # you can schedule this with launchd to run e.g. weekly
    
    # Specify in seconds how long the script should record (default here is 1 hour).
    seconds=3600
    
    # Date format for the recording file name
    DATE=`date "+%d-%m-%y_%H-%M"`
    
    # start ffmpeg recording
    ffmpeg -re -i http://website.com/playlist.m3u8 -c copy -bsf:a aac_adtstoasc recording_$DATE.mp4 &
    
    # notification that recording has started
    if [ "$(pgrep -P $$ 'ffmpeg')" ]
    then
    	/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title 'ffmpeg' -message "is recording now" -sender 'com.apple.Terminal'
    else
    	/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title 'ffmpeg' -message "is not recording!" -sound Funk -sender 'com.apple.Terminal'
    	exit 42
    fi
    
    # check every 30 seconds for $seconds to make sure ffmpeg is still running
    START=`date +%s`
    while [ $(( $(date +%s) - $seconds )) -lt $START ]; do
    	if [ -z "$(pgrep -P $$ 'ffmpeg')" ]
        	then
           		/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title 'ffmpeg' -message "is no longer running" -sound Funk -sender 'com.apple.Terminal'
      	fi
    	sleep 30
    done
    
    # notification when time is up
    /Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title 'ffmpeg' -message "recording finished" -sound default -sender 'com.apple.Terminal'
    
    # stop ffmpeg (using this because stopping ffmpeg via -t for duration turned out to be extremely unreliable)
    kill $(pgrep -P $$ 'ffmpeg')
    
    
    

    public by Geometry modified Jul 31, 2016  148381  0  3  0

    GetCommandBuffer: Gets the bytes representing the specified command. returned buffer can be used to streamline multiple writes into one Write on the Socket using the <see cref="M:Enyim.Caching.Memcached.PooledSocket.Write(IList&lt;ArraySegment&lt;b...

    Gets the bytes representing the specified command. returned buffer can be used to streamline multiple writes into one Write on the Socket using the The command to be converted. The buffer containing the bytes representing the command. The command must be terminated by \r\n. The Nagle algorithm is disabled on the socket to speed things up, so it's
    C#
    using System;
    using System.IO;
    using System.Text;
    using System.Collections.Generic;
    
    /// <summary>
    /// Gets the bytes representing the specified command. returned buffer can be used to streamline multiple writes into one Write on the Socket
    /// using the <see cref="M:Enyim.Caching.Memcached.PooledSocket.Write(IList&lt;ArraySegment&lt;byte&gt;&gt;)"/>
    /// </summary>
    /// <param name="value">The command to be converted.</param>
    /// <returns>The buffer containing the bytes representing the command. The command must be terminated by \r\n.</returns>
    /// <remarks>The Nagle algorithm is disabled on the socket to speed things up, so it's recommended to convert a command into a buffer
    /// and use the <see cref="M:Enyim.Caching.Memcached.PooledSocket.Write(IList&lt;ArraySegment&lt;byte&gt;&gt;)"/> to send the command and the additional buffers in one transaction.</remarks>
    public unsafe static IList<ArraySegment<byte>> GetCommandBuffer(string value)
    {
    	var data = new ArraySegment<byte>(Encoding.ASCII.GetBytes(value));
    
    	return new ArraySegment<byte>[] { data };
    }

    public by Geometry modified Jul 28, 2016  103574  4  5  0

    ResolveToEndPoint

    ResolveToEndPoint
    using System;
    using System.Linq;
    using System.Net;
    using System.Collections.Generic;
    
    public static IPEndPoint ResolveToEndPoint(string value)
    {
    	if (String.IsNullOrEmpty(value))
    		throw new ArgumentNullException("value");
    
    	var parts = value.Split(':');
    	if (parts.Length != 2)
    		throw new ArgumentException("host:port is expected", "value");
    
    	int port;
    	if (!Int32.TryParse(parts[1], out port))
    		throw new ArgumentException("Cannot parse port: " + parts[1], "value");
    
    	return ResolveToEndPoint(parts[0], port);
    }

    public by lbottaro modified Oct 16, 2013  3606  1  7  1

    How to get the baselines from UCM stream in python

    This simple python script will detect the baselines configured on a given UCM Clearcase stream. At the end it will print the latest baseline found.
    import os
    stream = "myStream@/myVobs"
    latest_bl=os.popen("for a in `cleartool lsstream -fmt \"%[latest_bls]p\" " + 
                       stream + "`; do echo $a; done").readlines()
       print "Latest baseline found = " + str(latest_bl)

    public by Geometry modified Aug 7, 2016  1279  0  4  0

    Read image frame from the specified stream (current stream's position is used)

    Read image frame from the specified stream (current stream's position is used)
    // Read image frame from the specified stream (current stream's position is used)
    private static Bitmap ReadImageFrame(Stream stream, PNMImageInfo imageInfo)
    {
        try
        {
            // decode PNM image depending on its format
            switch (imageInfo.Version)
            {
                case 5:
                    return ReadP5Image(stream, imageInfo.Width, imageInfo.Height, imageInfo.MaxDataValue);
                case 6:
                    return ReadP6Image(stream, imageInfo.Width, imageInfo.Height, imageInfo.MaxDataValue);
            }
        }
        catch
        {
            throw new ArgumentException("The stream does not contain valid PNM image.");
        }
    
        return null;
    }

    public by Geometry modified Aug 7, 2016  1129  0  5  0

    Read stream until space is found (space, new line, tab or comment). Returns number of bytes read. Stream's position will point to the next

    Read stream until space is found (space, new line, tab or comment). Returns number of bytes read. Stream's position will point to the next byte coming after the first found space byte.
    // Read stream until space is found (space, new line, tab or comment). Returns
    // number of bytes read. Stream's position will point to the next
    // byte coming after the first found space byte.
    private static int ReadUntilSpace(Stream stream, byte[] buffer, int start)
    {
        byte nextByte = (byte)stream.ReadByte();
        int bytesRead = 0;
    
        while ((nextByte != ' ') && (nextByte != '\n') && (nextByte != '\r') && (nextByte != '\t') && (nextByte != '#'))
        {
            buffer[start + bytesRead] = nextByte;
            bytesRead++;
            nextByte = (byte)stream.ReadByte();
        }
    
        return bytesRead;
    }

    public by Geometry modified Aug 7, 2016  993  0  4  0

    Read image frame from the specified stream (current stream's position is used)

    Read image frame from the specified stream (current stream's position is used)
    // Read image frame from the specified stream (current stream's position is used)
    private static unsafe Bitmap ReadImageFrame(Stream stream, FITSImageInfo imageInfo)
    {
        int width = imageInfo.Width;
        int height = imageInfo.Height;
    
        // create new bitmap
        Bitmap image = (imageInfo.BitsPerPixel == 8) ?
            Tools.CreateGrayscaleImage(width, height) :
            new Bitmap(width, height, PixelFormat.Format16bppGrayScale);
    
        // lock it
        BitmapData imageData = image.LockBits(new Rectangle(0, 0, width, height),
            ImageLockMode.ReadWrite, image.PixelFormat);
    
        int originalBitsPerPixel = imageInfo.OriginalBitsPerPixl;
        int stride = imageData.Stride;
        byte* ptr = (byte*)imageData.Scan0.ToPointer();
    
        double min = imageInfo.MinDataValue;
        double max = imageInfo.MaxDataValue;
    
        // check number of bits per pixel and load image appropriately
        if (imageInfo.BitsPerPixel == 16)
        {
            // 16 bpp grayscale image
            double coef = 65535.0 / (max - min);
    
            // prepare a buffer for one line
            int lineSize = width * Math.Abs(originalBitsPerPixel) / 8;
            byte[] line = new byte[lineSize];
            byte[] temp = new byte[8];
    
            // load all rows
            for (int y = height - 1; y >= 0; y--)
            {
                // load next line
                if (Tools.ReadStream(stream, line, 0, lineSize) < lineSize)
                    throw new ArgumentException("The stream does not contain valid FITS image.");
    
                // fill next image row
                ushort* row = (ushort*)(ptr + stride * y);
    
                for (int x = 0, i = 0; x < width; x++, row++)
                {
                    double value = 0;
    
                    switch (originalBitsPerPixel)
                    {
                        case 16:    // 16 bit signed integer
                            {
                                short tempValue = 0;
                                unchecked
                                {
                                    tempValue = (short)((line[i++] << 8) + line[i++]);
                                }
                                value = tempValue;
                                break;
                            }
                        case 32:    // 32 bit signed integer
                            {
                                temp[3] = line[i++];
                                temp[2] = line[i++];
                                temp[1] = line[i++];
                                temp[0] = line[i++];
    
                                value = BitConverter.ToInt32(temp, 0);
    
                                break;
                            }
                        case -32:    // 32 bit float
                            {
                                temp[3] = line[i++];
                                temp[2] = line[i++];
                                temp[1] = line[i++];
                                temp[0] = line[i++];
    
                                value = BitConverter.ToSingle(temp, 0);
                                break;
                            }
                        case -64:    // 64 bit double
                            {
                                temp[7] = line[i++];
                                temp[6] = line[i++];
                                temp[5] = line[i++];
                                temp[4] = line[i++];
                                temp[3] = line[i++];
                                temp[2] = line[i++];
                                temp[1] = line[i++];
                                temp[0] = line[i++];
    
                                value = BitConverter.ToDouble(temp, 0);
                                break;
                            }
                    }
    
                    *row = (ushort)((value - min) * coef);
                }
            }
        }
        else
        {
            // 8 bpp grayscale image
            double coef = 255.0 / (max - min);
    
            // prepare a buffer for one line
            byte[] line = new byte[width];
    
            // load all rows
            for (int y = height - 1; y >= 0; y--)
            {
                // load next line
                if (Tools.ReadStream(stream, line, 0, width) < width)
                    throw new ArgumentException("The stream does not contain valid FITS image.");
    
                // fill next image row
                byte* row = ptr + stride * y;
    
                for (int x = 0; x < width; x++, row++)
                {
                    *row = (byte)(((double)line[x] - min) * coef);
                }
            }
        }
    
        // unlock image and return it
        image.UnlockBits(imageData);
        return image;
    }

    public by Geometry modified Aug 7, 2016  70386  0  5  0

    Load: Loads a tree from a stream.

    Loads a tree from a stream. The stream from which the tree is to be deserialized. The deserialized tree.
    /// <summary>
    ///   Loads a tree from a stream.
    /// </summary>
    /// 
    /// <param name="stream">The stream from which the tree is to be deserialized.</param>
    /// 
    /// <returns>The deserialized tree.</returns>
    /// 
    [Obsolete("Please use Accord.IO.Serializer.Load() instead (or use it as an extension method).")]
    public static DecisionTree Load(Stream stream)
    {
        return Accord.IO.Serializer.Load<DecisionTree>(stream);
    }
    • Public Snippets
    • Channels Snippets