Skip to content

Instantly share code, notes, and snippets.


Asif Iqbal asif31iqbal

View GitHub Profile
asif31iqbal / limitConcurrentGoroutines.go
Created Mar 1, 2021 — forked from AntoineAugusti/limitConcurrentGoroutines.go
Limit the maximum number of goroutines running at the same time
View limitConcurrentGoroutines.go
package main
import (
// Fake a long and difficult work.
func DoWork() {

Keybase proof

I hereby claim:

  • I am asif31iqbal on github.
  • I am asif31iqbal ( on keybase.
  • I have a public key ASBm0K2uHWDp4Dxr2u1-2m2hdd15llI0IitAI013_cp07Qo

To claim this, I am signing this object:

asif31iqbal /
Created Oct 3, 2018 — forked from xmfbit/
an example of pytorch on mnist dataset
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
import torchvision.datasets as dset
import torchvision.transforms as transforms
import torch.nn.functional as F
import torch.optim as optim
## load mnist dataset
use_cuda = torch.cuda.is_available()
asif31iqbal / pandas-numpy
Last active Jul 26, 2017
pandas cheatsheet
View pandas-numpy
import pandas as pd
df = pd.DataFrame({'id': [12, None, 56], 'name': ['asif', 'iqbal', 'anika']})
# df to numpy array
# df to boolean df (null/ notnull)
# oppposite of notnull
View gist:3e8708390d395d1b76ae363bcb789e8a
View solr_help.txt
- Tokenizer
- Series of filters
- StandardTokenizer
- StandardFilter, LowercaseFilter, StopFilter
- Swimming -> Swim, catlike, cattly -> cat
- Create custom Analyzer, override createComponents()
- PorterStemFilter
View spring oauth help
View jvm misc
JMX remote with jconsole via ssh tunneling with socks proxy:
1. Add this to JAVA_OPTS in remote process:{remoteJMXport}
2. ssh -D {proxyport} user@remotehost
3. jconsole -J-DsocksProxyHost=localhost -J-DsocksProxyPort={proxyport} service:jmx:rmi:///jndi/rmi://{remotehost}:{remoteJMXport}/jmxrmi
For visualvm, see this link:
For MAT:
asif31iqbal / Storm misc
Last active Feb 2, 2017
Some facts about Apache Storm
View Storm misc
Each spout and bolt can have one or more tasks, each of which corresponds to a thread.
Each topology can run under one or more JVMs. For example, if the combined parallelism (number of tasks) of the topology is 300 and 50
workers are allocated, then each worker will execute 6 tasks (as threads within the worker). Storm tries to spread the tasks evenly
across all the workers.
Refer to this []
asif31iqbal /
Created Jun 10, 2016 — forked from mocobeta/
Lucene 4.1 querying sample
import static org.junit.Assert.*;
import java.util.Properties;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;