working on it ...

Filters

Explore Public Snippets

Sort by

Found 94k snippets

    public by mawekiho modified 6 hours ago  8  0  2  0

    Titans Season 1 Episode 7 (S1E07) : Asylum Full Episode

    Download Titans Season 1 Episode 7 (1x07) Asylum
    Streaming Titans Season 1 Episode 7 (1x07)
    Watch Titans Season 1 Episode 7 - DC Online
    Wacth Titans Season 1 Episode 7 - Asylum
    Titans Season 1 Episode 7 (S1E07) : Asylum Full Episode
    Titans Season 1 Episode 7 English Subtitle
    Titans Season 1 Episode 7 (1x07) English Subtitle
    Titanss S1E07 Full Episode : Asylum DC
    
    https://www.twitch.tv/videos/334758465
    
    https://www.twitch.tv/videos/334758459
    
    https://www.twitch.tv/videos/334758462
    
    https://www.twitch.tv/videos/334758464
    
    https://www.twitch.tv/videos/334758460
    
    https://www.twitch.tv/videos/334758463
    
    https://www.twitch.tv/videos/334758461
    
    https://www.twitch.tv/videos/334758466

    public by mawekiho modified 6 hours ago  5  0  2  0

    Titans Season 1 Episode 6 (1x06) English Subtitle

    https://www.twitch.tv/videos/334754548
    
    https://www.twitch.tv/videos/334754553
    
    https://www.twitch.tv/videos/334754551
    
    https://www.twitch.tv/videos/334754550
    
    https://www.twitch.tv/videos/334754555
    
    https://www.twitch.tv/videos/334754549
    
    https://www.twitch.tv/videos/334754552
    
    https://www.twitch.tv/videos/334754556

    public by mawekiho modified 7 hours ago  6  0  2  0

    Titans Season 1 Episode 1 (1x01) English Subtitle

    
    https://www.twitch.tv/videos/334751912
    
    https://www.twitch.tv/videos/334751914
    
    https://www.twitch.tv/videos/334751913
    
    https://www.twitch.tv/videos/334751916
    
    https://www.twitch.tv/videos/334751919
    
    https://www.twitch.tv/videos/334751917
    
    https://www.twitch.tv/videos/334751918
    
    https://www.twitch.tv/videos/334751915

    public by mawekiho modified 7 hours ago  5  0  2  0

    Arrows S7E09 Full Episode : Elseworlds Hour Two The CW

    
    https://www.twitch.tv/videos/334746900
    
    https://www.twitch.tv/videos/334746899
    
    https://www.twitch.tv/videos/334746901
    
    https://www.twitch.tv/videos/334746905
    
    https://www.twitch.tv/videos/334746904
    
    https://www.twitch.tv/videos/334746902
    
    https://www.twitch.tv/videos/334746903
    
    https://www.twitch.tv/videos/334746906

    public by mawekiho modified 18 hours ago  7  0  2  0

    Arrows S7E08 Full Episode : Unmasked The CW

    
    https://www.twitch.tv/videos/334741762
    
    https://www.twitch.tv/videos/334741758
    
    https://www.twitch.tv/videos/334741759
    
    https://www.twitch.tv/videos/334741763
    
    https://www.twitch.tv/videos/334741756
    
    https://www.twitch.tv/videos/334741761
    
    https://www.twitch.tv/videos/334741757
    
    https://www.twitch.tv/videos/334741760

    public by bmooers modified Feb 22, 2018  657  1  4  0

    roundview.py for PyMOL

    rounds off the viewport settings in PyMOL to 2 decimals places and returns on one line.
    // Enter here the actual content of the snippet.						
    
    from __future__ import division
    from __future__ import print_function
    # -*- coding: utf-8 -*-
    
    """
    version 1.0         26 October 2015
        Posted in github for first time.
    version 1.1         23 November 2015
        Corrected description of the rounding off the matrix elements.
        Corrected hard wrapped text the broke the script. 
        Added example of running program as a horizontal script.
        Made code pep8 compliant (changed use of blank lines, 
            removed whitespaces in defualt arguments assignments, 
            inserted whitespaces after commas in lists, 
            removed whitespaces at the ends of lines).
        Added version number.
    version 1.2         23 May 2016
        Edited copyright notice.
        Corrected typos
        
    version 1.3         23 July 2016
        Added missing parenthesis at end of file.
        
       Copyright Notice
      ================
      
         Copyright (C) 2016  Blaine Mooers
        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License.
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
        See the GNU General Public License for more details:
        http://www.gnu.org/licenses/.
      The source code in this file is copyrighted, but you can
      freely use and copy it as long as you don't change or remove any of
      the copyright notices.
      
      Blaine Mooers, PhD 
      blaine-mooers@ouhsc.edu
      975 NE 10th St, BRC 466
      University of Oklahoma Health Sciences Center, 
      Oklahoma City, OK, USA 73104
     """
    from pymol import stored, cmd
    __author__ = "Blaine Mooers"
    __copyright__ = "Blaine Mooers, University of Oklahoma Health Sciences Center, Oklahoma City, OK, USA 73104"
    __license__ = "GPL-3"
    __version__ = "1.0.2"
    __credits__ = ["William Beasley","Chiedza Kanyumbu"] 
    # people who reported bug fixes, made suggestions, etc. 
    __date__ = "30 May 2016"
    __maintainer__ = "Blaine Mooers"
    __email__ = "blaine-mooers@ouhsc.edu"
    __status__ = "Production" 
    
    
    def roundview(StoredView=0, decimal_places=2, outname="roundedview.txt"):
    
        """
        DESCRIPTION
        Adds the command "roundview" that gets a view (default is 0,
        the current view; you can get a stored view assigned to some
        other digit with the view command) and rounds to two decimal
        places (two digits to the right of the decimal point) the
        viewpoint matrix elements and rewrites the matrix elements
        on a single line with no whitespaces and a semicolon at the
        end. The saved space eases the making of a single line of
        PyMOL commands separated by semicolons. This enables rapid
        and interactive editing of chunks of PyMOL commands. The
        viewpoints are appended to the bottom of a text file in the
        present working directory called "roundedview.txt". The line
        could be easier to copy from this file than from the command
        history window in the external gui. A semicolon with nothing
        to the right of it at the end of a line of grouped commands
        is harmless.
        USAGE
         
        roundview [view, decimal_places, outname] 
        Note that the values in the [] are optional.
        The default values  for the arguments of the function
        are "0,2, roundedview.txt". 
        Simple one-line example with roundview.py script in current working
        directory--check by typing 'pwd' and 'ls *.py' on the command line. PyMOL
        should return 'roundview.py' in the lisf of files in the external (top) gui.
        Next, paste the following command on the external (top) commandline, hit
        return, and wait 5-10 seconds:
        fetch 1lw9, async=0; run roundview.py; roundview 0,1
        The following view setting will be returned without the blackslash.
        set_view (1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,0.0,-155.2,35.1,11.5,9.7,122.3,188.0,-20.0);
        Advanced option:
        Copy roundview.py to the folder ~/.pymol/startup and then
        the command will always be accessible. You may have to 
        create these directories. 
        18 elements of the view matrix (0-17)
        0 - 8 = column-major 3x3 matrix that rotates the model axes
        to camera axes 
        9 - 11 = origin of rotation relative to the camera
        in camera space
        12 - 14 = origin of rotation in model space
        15 = front plane distance from the camera
        16 = rear plane distance from the camera
        17 = orthoscopic flag 
        (not implemented in older versions)
        
        """
        
        #convert the commandline arguments from strings to integers
    
        StoredView = int(StoredView)
        decimal_places = int(decimal_places)
        
        
        #call the get_view function
    
        m = cmd.get_view(StoredView)
    
    
        #Make a list of the elements in the orientation matrix.
    
        myList = [m[0], m[1], m[2], m[3], m[4], m[5], m[6],
            m[7], m[8], m[9], m[10], m[11], m[12], m[13], m[14],
            m[15], m[16], m[17]]
    
    
        #Round off the matrix elements to two decimal places (two fractional places)
        #This rounding approach solved the problem of unwanted
        #whitespaces when I tried using a string format statement
    
        myRoundedList = [ round(elem, decimal_places) for elem in myList]
        
        
        #x is the format of the output. The whitespace is required
        #between the "set_view" and "(".
        
        x = 'set_view ({0},{1},{2},{3},{4},{5},{6},{7},\
    {8},{9},{10},{11},{12},{13},{14},{15},{16},{17});'
    
    
        #print to the external gui.
    
        print x.format(*myRoundedList)
    
    
        #Write to a text file.
    
        myFile = open("roundedview.txt", "a")
        myFile.write(x.format(*myRoundedList) + "\n")
        myFile.close()
        return
    
    
        #The extend command makes roundview into a PyMOL command.
    
    cmd.extend("roundview", roundview)

    public by Tech_JA modified Oct 26, 2017  440  1  4  0

    config-highlight.cfg

    https://gist.github.com/dsosby/1122904
    [Obsidian]
    definition-foreground = #678CB1
    error-foreground = #FF0000
    string-background = #293134
    keyword-foreground = #93C763
    normal-foreground = #E0E2E4
    comment-background = #293134
    hit-foreground = #E0E2E4
    builtin-background = #293134
    stdout-foreground = #678CB1
    cursor-foreground = #E0E2E4
    break-background = #293134
    comment-foreground = #66747B
    hilite-background = #2F393C
    hilite-foreground = #E0E2E4
    definition-background = #293134
    stderr-background = #293134
    hit-background = #000000
    console-foreground = #E0E2E4
    normal-background = #293134
    builtin-foreground = #E0E2E4
    stdout-background = #293134
    console-background = #293134
    stderr-foreground = #FB0000
    keyword-background = #293134
    string-foreground = #EC7600
    break-foreground = #E0E2E4
    error-background = #293134						

    public by alejo8591 modified Oct 10, 2017  255  0  3  0

    Python Selenium get cookie value

    Python Selenium get cookie value: scrape.py
    import time
    from selenium import webdriver
    
    driver = webdriver.Chrome('./chromedriver')
    driver.get('https://ui.lkqd.com/login')
    assert 'LKQD' in driver.title
    
    time.sleep(2)
    username_field = driver.find_element_by_name('username')
    username_field.send_keys('myusername')
    
    password_field = driver.find_element_by_name('password')
    password_field.send_keys('mypassword')
    
    submit_button = driver.find_elements_by_xpath("//*[contains(text(), 'Sign In')]")[0]
    submit_button.click()
    time.sleep(2)
    
    cookies_list = driver.get_cookies()
    cookies_dict = {}
    for cookie in cookies_list:
        cookies_dict[cookie['name']] = cookie['value']
    
    session_id = cookies_dict.get('session')
    print(session_id)
    
    driver.quit()
    
    
    

    public by Nick Moore modified Aug 30, 2017  410  0  3  0

    The block structure for SnakeCoin.

    The block structure for SnakeCoin.: snakecoin-block.py
    import hashlib as hasher
    
    class Block:
      def __init__(self, index, timestamp, data, previous_hash):
        self.index = index
        self.timestamp = timestamp
        self.data = data
        self.previous_hash = previous_hash
        self.hash = self.hash_block()
      
      def hash_block(self):
        sha = hasher.sha256()
        sha.update(str(self.index) + 
                   str(self.timestamp) + 
                   str(self.data) + 
                   str(self.previous_hash))
        return sha.hexdigest()
    
    
    

    public by lmontealegre modified Aug 22, 2017  502  1  4  0

    CONSTANT Definitions for Database server and SQL scripts

    Standard for defining connections and SQL definitions
    #=================================================================
    # Database Server Connection String
    # Database = AGENTS  Server = <IP>
    #=================================================================
    CNN_AGENTS = {'Server':'<IP>', 'User':'<Name>', 'Password':'<Pwd>', 'Database':'<DBName>'}
    
    #=================================================================
    # SQL Script Definition to Get Gran Total Agent counts
    # Database = AGENTS  Server = <IP>
    #=================================================================
    SQL_WR0TOTALCNTS = '''
    Select
      Count(SOL.SOL_KEY) As NoRec,
      Count(Distinct SOL.AGT_SOL_NO) As CntSOL,
      Sum(SOL.AGT_SOL_NOFILE) As SumSOL_NF,
      Sum(SOL.AGT_SOL_DWLERR) As SumSOL_DWLERR,
      Sum(SOL.AGT_SOL_OK) As SumSOL_OK,
      Sum(SOL.AGT_SOL_DWLOK) As SumSOL_DWLOK,
      Min(Cast(SOL.AGT_DTE_POSTDATE As datetime)) As Min_POSTDATE,
      Max(Cast(SOL.AGT_DTE_POSTDATE As datetime)) As Max_POSTDATE,
      DateDiff(day, Min(Cast(SOL.AGT_DTE_POSTDATE As datetime)), Max(Cast(SOL.AGT_DTE_POSTDATE As datetime))) As DateRange,
      Count(Distinct Cast(SOL.AGT_DTE_POSTDATE As datetime)) As ProcDates,
      Sum(Case When Len(IsNull(SOL.AGT_SOL_DWLPATH, '')) > 0 Then 1 Else 0
      End) As DwlOK,
      Sum((Convert(bigint,SOL.AGT_SOL_DWLBYTE)) / (1048576)) As MB,
      Count(Distinct SOL.AGT_DTE_EVT) As Cnt_RAN_EVT
    From
      AGENTS.dbo.DIBBS_AGN_SOL SOL
    '''
    
    #=================================================================
    # SQL Script Definition to Get Gran Total Agent counts
    # Database = AGENTS  Server = <IP> To be designed
    #=================================================================
    SQL_SelectedDates = '''
    Select
      Count(SOL.SOL_KEY) As NoRec,
      Count(Distinct SOL.AGT_SOL_NO) As CntSOL,
      Sum(SOL.AGT_SOL_NOFILE) As SumSOL_NF,
      Sum(SOL.AGT_SOL_DWLERR) As SumSOL_DWLERR,
      Sum(SOL.AGT_SOL_OK) As SumSOL_OK,
      Sum(SOL.AGT_SOL_DWLOK) As SumSOL_DWLOK,
      Min(Cast(SOL.AGT_DTE_POSTDATE As datetime)) As Min_POSTDATE,
      Max(Cast(SOL.AGT_DTE_POSTDATE As datetime)) As Max_POSTDATE,
      DateDiff(day, Min(Cast(SOL.AGT_DTE_POSTDATE As datetime)), Max(Cast(SOL.AGT_DTE_POSTDATE As datetime))) As DateRange,
      Count(Distinct Cast(SOL.AGT_DTE_POSTDATE As datetime)) As ProcDates,
      Sum(Case When Len(IsNull(SOL.AGT_SOL_DWLPATH, '')) > 0 Then 1 Else 0
      End) As DwlOK,
      Sum((Convert(bigint,SOL.AGT_SOL_DWLBYTE)) / (1048576)) As MB,
      Count(Distinct SOL.AGT_DTE_EVT) As Cnt_RAN_EVT
    From
      AGENTS.dbo.DIBBS_AGN_SOL SOL
    '''
    • Public Snippets
    • Channels Snippets