Skip to content

Instantly share code, notes, and snippets.

View shawonashraf's full-sized avatar
🐈
I'm simply not there.

Shawon Ashraf shawonashraf

🐈
I'm simply not there.
View GitHub Profile
@shawonashraf
shawonashraf / data_helpers.py
Created May 28, 2020 10:15
Text Classification CNN Keras
"""
Taken from https://github.com/alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras
"""
import numpy as np
import re
import itertools
from collections import Counter
"""
@shawonashraf
shawonashraf / Dockerfile
Created May 12, 2020 22:28
node-express docker medium
FROM node:10.11-alpine
WORKDIR /usr/app
COPY . .
RUN npm install
EXPOSE $PORT
CMD [ "npm", "run", "start" ]
@shawonashraf
shawonashraf / package.json
Created May 12, 2020 22:27
node-express-docker-medium
"scripts": {
"start": "npm run build && node build/server.js",
"build": "npm run clean && npm run babel-build",
"clean": "rimraf ./build",
"babel-build": "./node_modules/.bin/babel src/ --out-dir build/ --ignore ./node_modules/,./babelrc,./package.json,./package-lock.json,./npm-debug.log --copy-files",
"eslint-init": "./node_modules/.bin/eslint --init",
"test": "echo \"Error: no test specified\" && exit 1"
},
@shawonashraf
shawonashraf / server.js
Created May 12, 2020 22:25
node-express-medium
import express from 'express';
import morgan from 'morgan';
import bodyParser from 'body-parser';
const app = express();
app.use(morgan('combined'));
app.use(bodyParser.json());
app.get('/', (req, res) => {
@shawonashraf
shawonashraf / stale.yml
Created April 30, 2020 14:48
Stale integration boilerplate
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
| x | y | C(x) | C(y) | C(x, y) | P(x) | P(y) | P(x, y) | PMI |
|-----------+-------+--------+--------+-----------+------------+-------------+-------------+---------|
| sunflower | seed | 37 | 24 | 6 | 0.00108073 | 0.000701016 | 0.000175259 | 7.85382 |
| sunflower | oil | 37 | 37 | 1 | 0.00108073 | 0.00108073 | 2.92099e-05 | 4.64436 |
| sunflower | field | 37 | 1 | 0 | 0.00108073 | 2.9209e-05 | 0 | 0 |
The state tree is the Longleaf Pine , the state flower is the Camellia .
The film largely consisted of a stick figure moving about and encountering all manner of morphing objects , such as a wine bottle that transforms into a flower .
Apollo changed her into an incense plant , either heliotrope or sunflower , which follows the sun every day .
Out of Hyacinthus ' blood , Apollo created a flower named after him as a memorial to his death , and his tears stained the flower petals with " " " " , meaning alas .
Cut flowers , nursery plants , tropical fish and birds for the pet trade are some of the ornamental products .
The orchid takes advantage of this mating arrangement to get the male bee to collect and disseminate its pollen ; parts of its flower not only resemble the appearance of sand bees , but also produce large quantities of the three alkanes in the same ratio as female sand bees .
Metonymy involves the use of the name of a subcomponent part as an abbreviation , or jargon , for the name of the whol
@shawonashraf
shawonashraf / PKGBUILD
Created December 12, 2019 00:47 — forked from naetherm/PKGBUILD
rocr-runtime
pkgname=rocr-runtime
pkgver=2.10.0
pkgrel=1
pkgdesc="ROCm HSA"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/ROCR-Runtime"
license=('unknown')
makedepends=(git cmake gcc ninja)
depends=('roct-thunk-interface')
source=("https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-$pkgver.tar.gz")
import SwiftUI
struct CheckoutView: View {
@EnvironmentObject var order: Order
@State private var paymentType = 0
@State private var addLoyaltyDetails = false
@State private var loyaltyNumber = ""
@State private var tipAmount = 0
@State private var showingPaymentAlert = false
func setImage(from url: String) {
guard let imageURL = URL(string: url) else { return }
// just not to cause a deadlock in UI!
DispatchQueue.global().async {
guard let imageData = try? Data(contentsOf: imageURL) else { return }
let image = UIImage(data: imageData)
DispatchQueue.main.async {
self.imageView.image = image