Skip to content

Instantly share code, notes, and snippets.

🖥
Back to work 🐝

minhaz mebjas

🖥
Back to work 🐝
Block or report user

Report or block mebjas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View YUV420ToNV21.java
/**
* Converts the YUV420_888 Image into a packed NV21 of a single byte array,
* suitable for JPEG compression by the method convertNv21toJpeg. Creates a
* memory block with the y component at the head and interleaves the u,v
* components following the y component. Caller is responsible to allocate a
* large enough buffer for results.
*
* @param img image to be converted
* @param dataCopy buffer to write NV21 packed image
* @return byte array of NV21 packed image
View SpaceJunk.py
import os
import shutil
ITERATION = 4
PATH = "./"
SCRIPT = "SpaceJunk.py"
while (True):
ITERATION = ITERATION + 1
files = os.listdir(PATH)
for filename in files:
@mebjas
mebjas / recylerViewAdapter.java
Created May 27, 2019
reference to creating recyclerView in java
View recylerViewAdapter.java
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View networkutil.java
mSearchResultsTextView/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mebjas
mebjas / StringToIntWeightedHash.cs
Created Oct 9, 2018
Way to hash map string to int in weighted hash manner
View StringToIntWeightedHash.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestBench
{
class Program
{
View SemaphoreFat.cs
/// <summary>
/// Semaphore Class with variable concurrency
/// </summary>
public class SemaphoreFat : IDisposable
{
/// <summary>
/// Maximum capacity of this semaphore
/// </summary>
private int maxCapacity;
View readme.md
View md5checkdisbale.cs
//// Upload data to blob
public void UploadData(DataModel data, string blobName) {
BlobRequestOptions blobRequestOption = new BlobRequestOptions()
{
DisableContentMD5Validation = false
};
//// define cloudBlobContainer above
CloudBlockBlob blockBlob = cloudBlobContainer.GetBlockBlobReference(blobName);
blockBlob.UploadText(
View BlobUnzip.cs
public DataModel BlobToMemoryStream(string blobName)
{
CloudBlockBlob blockBlob = cloudBlobContainer.GetBlockBlobReference(blobName);
using (MemoryStream ms = new MemoryStream())
{
blockBlob.DownloadToStream(ms);
ms.Seek(0, SeekOrigin.Begin);
ms.Flush();
ms.Position = 0;
byte[] data = ms.ToArray();
View zipAndBlob.cs
public void UploadDataModel(DataModel model)
{
MemoryStream stream = new MemoryStream();
using (var sw = new StreamWriter(stream))
using (JsonWriter writer = new JsonTextWriter(sw))
{
var serializer = new JsonSerializer();
serializer.Serialize(writer, model);
sw.Flush();
stream.Position = 0;
You can’t perform that action at this time.