Skip to content

Instantly share code, notes, and snippets.

View nucklehead's full-sized avatar

Jean Evans Pierre nucklehead

View GitHub Profile
@nucklehead
nucklehead / kreyol-stopwords.json
Created September 11, 2020 13:11
Translated and cleaned up NLTK's list of Haitian kreyol stopwords
[
"nou",
"tankou",
"la",
"soti",
"koupe",
"kijan",
"desann",
"sou",
"non",
@nucklehead
nucklehead / example_inline.py
Created June 17, 2020 20:53
Python nested defaultdict
>>> bb = nested_defaultdict({'a':{'b': 1000}})
>>> bb['c']['e']['f']['g'] = 2000
>>> bb
defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'a': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'b': 1000}), 'c': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'e': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'f': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'g': 2000})})})})
>>> bb['a']['c']['f']['g'] = 3000
>>> bb
defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'a': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'b': 1000, 'c': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'f': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'g': 3000})})}), 'c': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'e': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'f': defaultdict(<function nested_defaultdict at 0x7fcb514bcb70>, {'g': 2000})})})})
>>> import json
>>> json
@nucklehead
nucklehead / cleanIcon.js
Last active February 21, 2024 01:01
Script to clean unused icons in ionic
#!/bin/env node
let path = require('path'), fs=require('fs');
function fromDir(startPath, filter, callback){
if (!fs.existsSync(startPath)){
console.log("no dir ",startPath);
return;
}
@nucklehead
nucklehead / kanbiz-privacy-policy.md
Last active March 15, 2020 16:12
Kanbiz privacy policy

PRIVACY NOTICE

Last updated March 15, 2020

Thank you for choosing to be part of our community at KòdKreyòl (“Company”, “we”, “us”, or “our”). We are committed to protecting your personal information and your right to privacy. If you have any questions or concerns about our notice, or our practices with regards to your personal information, please contact us at pierevans@gmail.com.

When you visit our mobile application, and use our services, you trust us with your personal information. We take your privacy very seriously. In this privacy notice, we seek to explain to you in the clearest way possible what information we collect, how we use it and what rights you have in relation to it. We hope you take some time to read through it carefully, as it is important. If there are any terms in this privacy notice that you do not agree with, please discontinue use of our Apps and our services.

@nucklehead
nucklehead / 12-fakte-ap.md
Last active July 9, 2021 23:47
12 kondisyon pou aplikasyon byen fonksyone nan “cloud”

12 kondisyon pou aplikasyon byen fonksyone nan “cloud”

Lyen anglè

  1. Fò sous kòd la kontwole ak yon bagay tankou git.

  2. Fò gen yon fichye ki defini tout depandans yo.

  3. Fò konfigirasyon yo nan varyab anvironman.

@nucklehead
nucklehead / kreye-aplikasyon-python.sh
Created June 3, 2019 02:47
Itilize Flask-AppBuilder pou kreye aplikasyon python
pip install flask-appbuilder
flask fab create-app
# Your new app name: trete-done
# Your engine type, SQLAlchemy or MongoEngine [SQLAlchemy]:
cd trete-done
export FLASK_APP=app
flask fab create-admin
# Username [admin]:
# User first name [admin]:
# User last name [user]:
@nucklehead
nucklehead / kreye-aplikasyon-java.sh
Created June 3, 2019 02:30
Itilize Spring Initializr pou kreye aplikasyon java
curl https://start.spring.io/starter.tgz -d applicationName="prezantasyon data" -d description="Aplikasyon pou prezante data" -d artifactId=prezantasyon-data -d groupId=com.kamyonet -d dependencies=devtools,web,data-mongodb,security -d baseDir=prezantasyon-data | tar -xzvf -
@nucklehead
nucklehead / pom.xml
Last active December 8, 2018 18:42
On egzanp pom pou itilize "Allure" avèk "meteRapoAjou"
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zaka.rapoTes</groupId>
<artifactId>rapo-tes</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>Rapo Tes</name>
#!/usr/bin/env bash
set -e
OTE=$(git log -1 --pretty=format:'%an')
KOURYE=$(git log -1 --pretty=format:'%ae')
DOSYE_RAPO=${TRAVIS_BUILD_ID}.${TRAVIS_COMMIT}.${TRAVIS_BUILD_NUMBER}.${OTE}
rm -rf ${2}
git clone https://${GITHUB_TOKEN:+${GITHUB_TOKEN}@}${1}/${2}
cd ${2}
cp -r ../site/allure-maven-plugin ./${DOSYE_RAPO}
#!/bin/bash -ex
rm -rf db
mkdir db
mongod --dbpath db &
sleep 1
mongo mydatabase --eval 'db.createUser({user: "admin", pwd: "password", roles: [{ role: "userAdminAnyDatabase", db: "admin" }]})'
sleep 1
pkill mongod
mongod --auth --dbpath db