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 lxml import etree | |
| # Load the GraphML file | |
| SRC_FILE = 'graph.graphml' | |
| DEST_FILE = 'modified_graph.graphml' | |
| tree = etree.parse(SRC_FILE) | |
| root = tree.getroot() | |
| # Define the namespaces | |
| ns = {'graphml': 'http://graphml.graphdrawing.org/xmlns'} |
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
| autoload -Uz vcs_info | |
| precmd() { vcs_info } | |
| # Format the vcs_info_msg_0_ variable | |
| zstyle ':vcs_info:git:*' formats '%b' | |
| # Set up the prompt (with git branch name) | |
| setopt PROMPT_SUBST | |
| PROMPT='%n %F{yellow}${PWD/#$HOME/~} %F{green}${vcs_info_msg_0_} $ %f' |
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
| <snippet> | |
| <content><![CDATA[ | |
| import java.util.*; | |
| public class ${TM_FILENAME/(.+)\..+|.*/$1/:name} { | |
| public static void main(String[] args) { | |
| ${2:snippet} | |
| } | |
| } | |
| ]]></content> |
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
| create DATABASE audit; | |
| USE audit | |
| DROP DATABASE audit; | |
| drop table employees; | |
| CREATE TABLE employees | |
| ( employee_id INT PRIMARY KEY, | |
| name VARCHAR(50) |
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
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
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
| [alias] | |
| #checkout to different branch | |
| co = checkout | |
| #Find the commits which are not pushed to remote branch..equivalet to git log origin/branch..branch | |
| unpushed = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --oneline | |
| #onlineed with ascii art in graph format | |
| l = log --oneline --graph --decorate |
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
| package com.practo.insta.qless.utils; | |
| import android.content.Context; | |
| import android.util.Base64; | |
| import com.practo.insta.qless.R; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; |
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
| version: "2" | |
| services: | |
| spark: | |
| build: . | |
| #image: spark | |
| ports: | |
| - "8080:8080" | |
| - "8000:8000" | |
| volumes: |
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
| #include <vector> | |
| #include <iostream> | |
| #include <map> | |
| #include <queue> | |
| #include <stack> | |
| #include <deque> | |
| using namespace std; | |
| int main(){ | |
| //freopen("input.txt", "r", stdin); |
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
| # Post data from periscopedata to slack using Incoming Webhooks app of slack | |
| import requests | |
| import json | |
| # URL of webhook to post data to slack | |
| webhook_api = '<url of incoming-webhook>' | |
| # Enable 'API-ACCESS' for charts in PeriscopeData.Enter those api's here | |
| periscopedata_api= ['<api1 of periscope>', | |
| '<api2 of periscope>'] |
NewerOlder