This file contains hidden or 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
package main | |
import ( | |
"encoding/xml" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
This file contains hidden or 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 Birim(models.Model): | |
kisa_ad = models.CharField(_("Kısa Ad"), max_length=50) | |
ad = models.CharField(_("Ad"), max_length=50) | |
class Meta: | |
verbose_name = _("Birim") | |
verbose_name_plural = _("Birimler") | |
def __str__(self): | |
return self.ad |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"math" | |
"strings" | |
) | |
var birlerList = [...]string{"", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", "Yedi", "Sekiz", "Dokuz"} | |
var onlarList = [...]string{"", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan"} |
This file contains hidden or 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
public class NumberWorker: BackgroundService | |
{ | |
private readonly ILogger<TimeWorker> _logger; | |
private readonly ChannelReader<int> _channel; | |
public NumberWorker(ILogger<TimeWorker> logger, ChannelReader<int> channel) | |
{ | |
_logger = logger; | |
_channel = channel; | |
} |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"encoding/xml" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"text/template" | |
) |
This file contains hidden or 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 os | |
import asyncio | |
import youtube_dl | |
import logging | |
from urllib.parse import urlparse | |
from telegram import __version__ as TG_VER | |
try: | |
from telegram import __version_info__ |
This file contains hidden or 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
package main | |
import "fmt" | |
type EventFunc = func(i interface{}) | |
type Event struct { | |
Funcs []EventFunc | |
Once bool | |
CallCounter int |
This file contains hidden or 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 'package:date_calc/date_calc.dart'; | |
import 'package:test/test.dart'; | |
import 'package:intl/intl.dart'; | |
class DateDifference { | |
int years; | |
int months; | |
int days; | |
DateDifference(this.years, this.months, this.days); |
This file contains hidden or 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
from datetime import datetime | |
from functools import lru_cache, wraps | |
""" | |
eğer fonksiyon aldığı parametreye göre aynı sonucu döndürüyor ve bu çok sık tekrar ediyorsa | |
lru_cache(Least Recently Used) kullanmak performansı ciddi oranda artıracaktır. | |
""" | |
def profiler(num: int): | |
def decorator(func): |
This file contains hidden or 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
const crypto = require("crypto") | |
function checkDjangoPassword(password,encodedPassword) { | |
var passArr=encodedPassword.split("$") | |
iter = parseInt(passArr[1]) | |
salt = passArr[2] | |
shapass = passArr[3] | |
var key = crypto.pbkdf2Sync(password, salt, iter, 32, 'sha256'); | |
var pass = key.toString("base64") | |
return pass == shapass |