This file contains 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
import re, os, tempfile | |
import urllib.request | |
from urllib.parse import urlparse | |
def getBing(): | |
url = 'http://bing.com/' | |
response = urllib.request.urlopen(url) | |
data = response.read() |
This file contains 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
/* | |
Author: Ali Bahraminezhad | |
Description: You are given a square map of size . Each cell of the map has a value denoting its depth. We will call a cell | |
of the map a cavity if and only if this cell is not on the border of the map and each cell adjacent to it has strictly smaller depth. | |
Two cells are adjacent if they have a common side (edge). | |
https://www.hackerrank.com/challenges/cavity-map | |
*/ |
This file contains 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
/* | |
Author: Ali Bahraminezhad | |
Your local library needs your help! Given the expected and actual return dates for a library book, create a program that calculates the fine (if any). | |
https://www.hackerrank.com/challenges/library-fine | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; |
This file contains 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
// ==UserScript== | |
// @name Simple Blocking Page | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Replace payvandha.ir with a simpler page. | |
// @author You | |
// @grant none | |
// @include * | |
// ==/UserScript== |
This file contains 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
__author__ = "Ali Bahraminezhad - antipattern.ir" | |
__license__ = "GPL" | |
__version__ = "1.0.0" | |
__maintainer__ = "Ali Bahraminezhad" | |
import re | |
import os | |
import tempfile | |
import json |
This file contains 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
/// <summary> | |
/// Creates an instance using the given ICompilerSettings | |
/// </summary> | |
/// <param name="compilerSettings"></param> | |
public CSharpCodeProvider(ICompilerSettings compilerSettings = null) { | |
_compilerSettings = compilerSettings == null ? CompilationSettingsHelper.CSC2 : compilerSettings; | |
} |
This file contains 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
class CompilerSettings : ICompilerSettings | |
{ | |
private readonly CompilerLanguage _compilerLang; | |
private readonly string _rootDirectory = new Uri(Assembly.GetCallingAssembly().CodeBase).LocalPath; | |
private string _compilerPath => _compilerLang == CompilerLanguage.CSharp | |
? @"roslyn\csc.exe" | |
: @"roslyn\vbc.exe"; | |
public CompilerSettings(CompilerLanguage compiler = CompilerLanguage.CSharp) | |
{ | |
_compilerLang = compiler; |
This file contains 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
// ==UserScript== | |
// @name Linkedn | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Automatically change font to Tahoma for rtl contents in LinkendIn. | |
// @author Ali Bahraminezhad - https://github.com/Dev-P | |
// @match https://*.linkedin.com/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |