Skip to content

Instantly share code, notes, and snippets.

View nampdn's full-sized avatar
🌓
New creation in Christ!

Nam Pham nampdn

🌓
New creation in Christ!
  • Somewhere on Earth
View GitHub Profile
The Beginning
1 In the beginning God created the heavens and the earth. 2 Now the earth was formless and empty, darkness was over the surface of the deep, and the Spirit of God was hovering over the waters.
3 And God said, “Let there be light,” and there was light. 4 God saw that the light was good, and he separated the light from the darkness. 5 God called the light “day,” and the darkness he called “night.” And there was evening, and there was morning—the first day.
6 And God said, “Let there be a vault between the waters to separate water from water.” 7 So God made the vault and separated the water under the vault from the water above it. And it was so. 8 God called the vault “sky.” And there was evening, and there was morning—the second day.
9 And God said, “Let the water under the sky be gathered to one place, and let dry ground appear.” And it was so. 10 God called the dry ground “land,” and the gathered waters he called “seas.” And God saw that it was good.
11 Then God said, “Let the land produce v
@nampdn
nampdn / gist:1ee2201876b4855313a1ca8aa95f5e8f
Created June 26, 2024 18:52
train-neural-network-visualization.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Neural Network Training on Sine Function</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.0/chart.min.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; display: flex; flex-direction: column; align-items: center; }
#visualization-container { display: flex; justify-content: space-around; width: 100%; margin-bottom: 20px; flex-wrap: wrap; }
@nampdn
nampdn / main.py
Last active June 3, 2023 00:06
Symato CC Distributed Computing
import trafilatura
from fastwarc.warc import ArchiveIterator
import fasttext
from tqdm import tqdm
import pypandoc
import bs4 as bs
import pandas as pd
import multiprocessing as mp
import argparse
import os
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDH8wtYcY7jFkue2mIi0FyphQWczgzb7W2n/PlrX62Ukc0/fcyBTYMjExEnCTp8CBIqI+J7chLu7ujNjZ79SlJkV5u5EGqoQ0QQReitDMDAM6rlWlMcQMlx9RA3pM+I7RcF3SGEYkhVGZPelralPbPSVUim+XsK3NZ65fXy2uEueSun9IeOkfA3T/UOoUQaGfv3UmK21l2CT+lLY/vlQraxIhOpV9h4nITMPqo8fOFc529zlr1oy90J/LFY2DGXHPhUQN6N8dp8zJeTqxVV4otBqbLo6tbBlsL9wg3bDQnaw0dcH8yqyy7Mg7y2uc+JooLYailzVglOXBGYeXY5ZbFNbnLBGsOpzHZj1GHt6cF4+8m0yBtx1O/O8pJbv2jVn+8mWbTkO3pg0TzjuvRBvJIkKJIcKJk02L+/7rn6lR7JVqndP+ure4M986Ksa5LArm1Y+SvZxekFneivgdpafxmX62vlgJzybvFMm6YG4sxCArzRQa7IJ8knXGlnhjmINy5omSqwiblxElq+F5YEawqcOJ/KtcmL03VIjKl3c2NuOAPRihCl3JPSennUO4gGiSDypsy+0EOwl7qW44ysJN1A6SyNZBVHv2SUNJug8U6apuoFQ2xHSnnD3eOSsE8M2KPwulOUzGwgfMtWMwZCyycLUM7RBwa4whOr+chS4Aj/fw== nampdn@protonmail.com
@nampdn
nampdn / coreos.ign
Created October 6, 2022 10:08
coreos-ignition
{
"ignition": {
"version": "3.3.0"
},
"passwd": {
"users": [
{
"groups": [
"sudo",
"docker"
@nampdn
nampdn / vgm-gateway-swarm.yaml
Last active November 1, 2022 09:39
VGM Akash SDL Deploy Template
---
version: "2.0"
services:
gateway:
image: vgmtv/stream-gateway:1.0.11
env:
- IPFS_GATEWAY=http://ipfs:8080
- REDIS_CACHE_EXPIRE_TIME=300
@nampdn
nampdn / api.Dockerfile
Last active September 15, 2022 04:25
Redwood self-hosted Dockerfile
# Base
FROM node:16 as base
WORKDIR /app
ENV BODY_PARSER_LIMIT=50mb
# Turn off next 2 line to using local database
ARG DATABASE_URL
@nampdn
nampdn / caprover-freqtrade-jupyterlab.yaml
Last active September 9, 2022 08:36
caprover-templates
captainVersion: 4
version: '3'
services:
$$cap_appname:
restart: unless-stopped
volumes:
- $$cap_workspace_path:/workspace
environment:
AUTHENTICATE_VIA_JUPYTER: $$cap_jupyterlab_token
caproverExtra:
@nampdn
nampdn / Local Group Policy Editor.MD
Last active December 23, 2021 07:58
When mount disk on Windows, it is not display, adjust this settings with the registry will show up the disk in Explorer

https://serverfault.com/questions/51635/how-can-an-unauthenticated-user-access-a-windows-share

Summary of steps:

Adding Everyone, Guest and ANONYMOUS LOGON to the permissions of the share. Open the Group Policy Editor (e.g. by running gpedit.msc) Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options

  • Accounts: Guest account status: Enabled
  • Network access: Let Everyone permissions apply to anonymous users: Enabled
  • Network access: Restrict anonymous access to Named Pipes and Shares: Disabled
pragma solidity ^0.4.15;
contract StringsAndBytes {
/* --- public variables for storing tests results */
string public lastTestStringResult; //
bytes32 public lastTestBytes32Result; //
bytes public lastTestBytesResult; // bytes: dynamically-sized byte array
bool public lastTestBoolResult; //