Skip to content

Instantly share code, notes, and snippets.

View bkhanale's full-sized avatar
🏠
Working from home

Bhushan Khanale bkhanale

🏠
Working from home
View GitHub Profile
(CPenv) bkhanale@R556UR:~/personal_github/OOPS-Project$ coala --non-interactive
Executing section all...
Executing section all.c++...
Executing section cli...
(CPenv) bkhanale@R556UR:~/personal_github/OOPS-Project$
Server is listnening on 127.0.0.1
21:53:37: accept_connections_thread :127.0.0.1:54522 has connected.
21:53:37: client 127.0.0.1:54522 thread :Start thread for this client
21:53:37: client 127.0.0.1:54522 thread :Server receive register message
{'user_name': 'bhush', 'text': 'Hello', 'time': '21:53'}
21:53:37: client 127.0.0.1:54522 thread :Send to ('127.0.0.1', 33000)
msg= {'user_name': 'Server', 'text': 'Welcome bhush! If you ever want to quit, type {quit} to exit\n', 'time': '21:53'}
21:53:37: client 127.0.0.1:54522 thread :Start broadcasting
{'user_name': 'Server', 'text': 'bhush has joined the chat!\n', 'time': '21:53'}
21:53:37: client 127.0.0.1:54522 thread :Finish broadcasting
@bkhanale
bkhanale / sublime-user-preferences
Last active April 12, 2019 10:12
Sublime Text 3 Preferences (I don't want to write them everytime)
// Place your settings in the file "Packages/User/Preferences.sublime-settings",
// which overrides the settings in here.
//
// Settings may also be placed in syntax-specific setting files, for
// example, in Packages/User/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Monokai.sublime-color-scheme",
// Note that the font_face and font_size are overridden in the platform
@bkhanale
bkhanale / cpp.json
Created April 12, 2019 10:16
VS Code Snippets
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://hib.iiit-bh.ac.in/Hibiscus/Login/?client=iiit&sub=OK
// @grant none
// ==/UserScript==
import os
import stat
from coalib.bears.LocalBear import LocalBear
from coalib.results.Result import Result
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class FileModeBear(LocalBear):
def run(self,
import os
import platform
import stat
from queue import Queue
from bears.general.FileModeBear import FileModeBear
from coalib.testing.LocalBearTestHelper import LocalBearTestHelper
from coalib.results.Result import RESULT_SEVERITY, Result
from coalib.settings.Section import Section
def parse_requirements_file(requirements_file):
"""
Parses the requirements out of the pip requirements.txt file
:return:
A list of the names of the packages found in requirements_file.
"""
data = []
for line_number, line in enumerate(requirements_file):
if line.startswith('#'):
def npm_outdated_command():
"""
Executes `npm outdated --json` in the project directory and returns the
output in the form of json.
"""
out = run('npm outdated --json', stdout=Capture())
data = json.loads(out.stdout.text)
return data
import os
from coalib.bears.GlobalBear import GlobalBear
from coalib.results.Result import Result, RESULT_SEVERITY
from sarge import capture_both
class RequirementsCheckBear(GlobalBear):
"""
The bear to check and find any conflicting dependencies.