Skip to content

Instantly share code, notes, and snippets.

View girishramnani's full-sized avatar
🎯
Focusing

Girish girishramnani

🎯
Focusing
View GitHub Profile
@girishramnani
girishramnani / prog1.py
Created October 31, 2014 17:51
working of map
__author__ = 'girish'
""" the use and working of map"""
""" creating a wrapper to check the working of the map"""
class Trace :
def __init__(self):
self.enable =True
def __call__(self, f):
def wrap(*args,**kwargs):
@girishramnani
girishramnani / pyvideo.org_downloader.py
Last active August 29, 2015 14:12
download pyvideo.org videos just by giving the event url
'''requirements requests , bs4'''
__author__ = 'girish'
import requests
from bs4 import BeautifulSoup as Soup
import os
@girishramnani
girishramnani / Sudoku_solver.py
Last active August 29, 2015 14:14
A sudoku solver
__author__ = 'Girish Ramnani'
"""
This program takes in a sudoku and solves it ,here 0 means not set so add numbers write them down
requirement - python 3.3 or higher.
"""
board = \
[[9, 0, 6, 0, 7, 1, 5, 0, 0],
import sys
import bs4
import requests
from itertools import count
def get_unlimited(link):
for i in count(1):
@girishramnani
girishramnani / importparent.py
Created October 15, 2015 15:21
snippet to add parent module into the path (use only for testing)
"""
this snippet is used to import module from parent directory ( but as this is considered anti pattern dont use it other than for
unittesting )
http://stackoverflow.com/questions/16981921/relative-imports-in-python-3
"""
import sys
import os
Error applying plan:
1 error(s) occurred:
* azurerm_subnet.test: network.SubnetsClient#Delete: Failure sending request: StatusCode=0 -- Original Error: Get https://management.azure.com/subscriptions/db7489a7
-5d0a-46ce-9cc4-23107d5e4ba2/providers/Microsoft.Network/locations/westus/operations/70fc59e3-339b-4db8-bed0-65f90b3db407?api-version=2016-06-01: read tcp 192.168.1.
107:37118->104.211.160.157:443: read: connection timed out
* azurerm_network_interface.kibana: network.InterfacesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Put https://management.azure.co
m/subscriptions/db7489a7-5d0a-46ce-9cc4-23107d5e4ba2/resourceGroups/autopilot-azure-testcluster016/providers/Microsoft.Network/networkInterfaces/autopilot-nic-azure-
testcluster016-kibana?api-version=2016-06-01: dial tcp: lookup management.azure.com on 127.0.1.1:53: dial udp 127.0.1.1:53: i/o timeout
* azurerm_network_interface.test.0: network.InterfacesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Put https://management.azure.co
m/subscriptions/db7489a7-5d0a-46ce-9cc4-23107d5e4ba2/resourceGroups/autopilot-azure-testcluster016/providers/Microsoft.Network/networkInterfaces/autopilot-nic-azure-
testcluster016-0?api-version=2016-06-01: dial tcp: lookup management.azure.com on 127.0.1.1:53: dial udp 127.0.1.1:53: i/o timeout
* azurerm_network_interface.test.2: network.InterfacesClient#CreateOrUpdate: Failure sending
template_file.kibana: Refreshing state... (ID: d82751bde1a2ec76ee4339da59d6920375f6d609693a29f65188ed4f52587e24)
template_file.init.0: Refreshing state... (ID: 34e1ad9cc95044f4fe80be61c0fb77f8e0bc9d759715b94b5e98ebfc0d225ca2)
template_file.init.1: Refreshing state... (ID: b5bef66522daf51ac38ac136f1dba684240955d530f3c594f0ad01e74085a211)
template_file.init.2: Refreshing state... (ID: d5e16ba900162cf8048c57e301bb6c99fa96753b23f311e1089220b9f1137c6b)
azurerm_resource_group.test: Refreshing state... (ID: /subscriptions/db7489a7-5d0a-46ce-9cc4-23107d5e4ba2/resourceGroups/autopilot-azure-testcluster017)
azurerm_virtual_network.test: Refreshing state... (ID: /subscriptions/db7489a7-5d0a-46ce-9cc4-23107d5e4ba2/resourceGroups/autopilot-azure-testcluster017/providers/Microsoft.Network/virtualNetworks/autopilot-azure-testcluster017-vn)
azurerm_network_security_group.test: Refreshing state... (ID: /subscriptions/db7489a7-5d0a-46ce-9cc4-23107d5e4ba2/resourceGroups/autopilot-azure-testcluster017/providers/Microsoft.Network
[
{
"_index": "appbaseasaservice",
"_type": "chats",
"_id": "f3a2343d-8505-6167-5d62-7933bb19c2ac",
"_score": 1,
"_source": {
"username": "girish",
"content": "ramnani"
}
# ================ Autopilot Elasticsearch Configuration =================
# This is the configuration file for Elasticsearch. It comes with good
# defaults, you can safely deploy the cluster without changing this file.
# You can read about the syntax and available configuration options here -
# https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html
# Autopilot allows setting custom ENVIRONMENT VARS which can be accessed
# inside the config file with a ${CUSTOM_ENV_VAR} syntax.