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
//UVa p12289 - One Two Three | |
//Created by @naimurhasan | |
#include <bits/stdc++.h> | |
using namespace std; | |
#include<iostream> | |
#include<queue> | |
using namespace std; | |
typedef struct Digit{ |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#define RC 5 | |
#define CC 2 | |
void displayNum(int[RC][CC], int, bool); | |
/* | |
Sample Output | |
size 3 |
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
def getMaxMatchedIds(rmc, words, md): | |
matched_ids = [] | |
matched_id_words = {} | |
for word in words: | |
for id in md[word]: | |
match_count = 1 | |
match_words = [word] | |
if id not in matched_ids: | |
for key in set(md) - set([word]): | |
if id in md[key]: |
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
@register.filter() | |
def to_bengali(value): | |
string_value = str(value) | |
bn_digits = { | |
0: '০', | |
1: '১', | |
2: '২', | |
3: '৩', | |
4: '৪', | |
5: '৫', |
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 'dart:convert'; | |
import 'package:http/http.dart' as http; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
enum RetryResponseStatus {authFailed, success, unknownError, serverError} | |
class MRetryResponse{ | |
final http.Response response; | |
final RetryResponseStatus status; |
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
ShaderMask( | |
blendMode: BlendMode.srcIn, | |
shaderCallback: (bounds) => LinearGradient(colors: [ | |
curveAppBarColor, | |
Colors.green.shade900, | |
]).createShader( | |
Rect.fromLTWH(0, 0, bounds.width, bounds.height), | |
), | |
child: Text(String.fromCharCode(Icons.info.codePoint,), style: TextStyle( | |
fontFamily: Icons.add.fontFamily, fontSize: 30), |
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
def git_pull(request): | |
if request.GET.get('pass') != custom_key.pull_pass: | |
return HttpResponse("Wrong Password") | |
os.system('git checkout master') | |
os.system('git pull origin master') | |
with open('requirements.txt', 'r+') as f: | |
text = f.read() | |
text = text.replace('pkg_resources==0.0.0', '') | |
f.seek(0) |
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 base64 | |
from github import Github | |
from github import InputGitTreeElement | |
g = Github("YOUR TOKEN") | |
# for org repo | |
# org = g.get_organization("NaimurDev") | |
# repo = org.get_repo('test_file') |
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
Future<void> updateIfHasUpdate() async { | |
final String dataFirstFetchUri = "https://sample.django.backend.api/" | |
final List updatableQuestions = await _getUpdatableQuestions(dataFirstFetchUri); | |
} | |
Future<List<dynamic>> _getUpdatableQuestions(nextUri) async{ | |
// THIS FUNCTIONS LOOP THROUGH PAGINATION | |
// AND RETURN data results concat | |
List updatableQuestions = []; |
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 smtplib, ssl | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.base import MIMEBase | |
import key | |
port = 587 # For starttls | |
smtp_server = "send.one.com" | |
sender_email = "snder@senderserver.com" | |
receiver_email = "reciver@gmail.com" |
NewerOlder