Skip to content

Instantly share code, notes, and snippets.

View ShekharReddy4's full-sized avatar
💻
Graduated

Shekhar Reddy ShekharReddy4

💻
Graduated
  • Texas
  • 10:25 (UTC -05:00)
View GitHub Profile
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.DirectoryServices;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1

Inspired by this article. Neat tricks for speeding up integer computations.

Note: cin.sync_with_stdio(false); disables synchronous IO and gives you a performance boost. If used, you should only use cin for reading input (don't use both cin and scanf when sync is disabled, for example) or you will get unexpected results.

Multiply by a power of 2

x = x << 1; // x = x * 2

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication9
{
public static class Configs
@ShekharReddy4
ShekharReddy4 / Config.cs
Created November 21, 2017 07:33
Event handling for logged in user and instllation and uninstallation of software
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication9
{
public static class Configs
$runPSCommand7=Send-SSMCommand -InstanceId $InstanceID -DocumentName AWS-RunPowerShellScript -Comment 'command in execution1' -Parameter @{'commands'=@('$WUSettings = (New-Object -com "Microsoft.Update.AutoUpdate").Settings
$WUSettings.NotificationLevel=2
$WUSettings.save')}
@ShekharReddy4
ShekharReddy4 / README.md
Created October 21, 2017 10:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@ShekharReddy4
ShekharReddy4 / program.cs
Created September 27, 2017 15:56
super example explaining the roles and principals in .net framework
a
@ShekharReddy4
ShekharReddy4 / .gitignore
Last active September 13, 2017 11:48
Examples for Enum and xml parser while I am coding AMS
*.pyc
/.vscode
@ShekharReddy4
ShekharReddy4 / LogUtlity.py
Last active August 27, 2017 07:12
Log utility example in python
"""
simple logging module
"""
import logging
class Logger(object):
"""
Logger class which is used to log the messages
"""
@classmethod