Skip to content

Instantly share code, notes, and snippets.

View putheakhem's full-sized avatar
🏠
Working from home

Khem Puthea putheakhem

🏠
Working from home
View GitHub Profile
@putheakhem
putheakhem / en-kh.md
Last active October 27, 2021 02:53
Getting started with Machine Translation

Khmer MT

Moses is a statistical machine translation system that allows you to automatically train machine translation models

Before Installing moses install the following packages

 sudo apt-get install g++ git subversion automake libtool zlib1g-dev libboost-all-dev libbz2-dev liblzma-dev python-dev libtcmalloc-minimal4
@putheakhem
putheakhem / crudlaravel7.md
Last active April 16, 2020 04:50
This tutorial will guide you how to create CRUD on Laravel 7.X

Step 1 : Install Laravel 7.6

First of all we need to get fresh Laravel 7.6 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer global require laravel/installer
laravel new blog --dev

the --disable-gpu-compositing CEF flag to OBS Studio's Browser Source plugin, you'll need to add it to your OBS Studio shortcut.

Windows

  1. Locate your shortcut to OBS Studio.
  2. Right click the shortcut and hit "Properties".
  3. Add the following to the end of the "Target" field. Be sure to put a space before it: --disable-gpu-compositing
  4. Launch OBS Studio via this shortcut, and try out a Browser Source animation to verify that it does indeed appear smoother.
  5. OBS Studio updates usually delete and re-make this shortcut, so you may need to repeat these steps after every OBS Studio update.

FAQ

#include <stdio.h>
#include <stdlib.h>
// Write a function that can calculate the summation from 1 to n positive number where n is passed as parameter.
// we need function sum()
int sum(int n) {
int sum1toN = 0;
for(int i = 0; i < n; i++) {
@putheakhem
putheakhem / sumThreeInteger.c
Created February 12, 2020 13:03
Write a function that can calculate the summation of 3 integers
#include <stdio.h>
#include <stdlib.h>
// code will post in the description of our youtube .
// Write a function that can calculate the summation of 3 integers
int sum( int a, int b, int c) {
// we can declare new variable to store the result from a+b+c
int sum = 0;
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDBPDO";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDBPDO";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@putheakhem
putheakhem / SortArray.php
Created November 6, 2019 15:34
Store these colors in array: 'red', 'green', 'blue', 'yellow', 'purple' as $colors then update your list of colors to be sorted in alphabetical order.
<!--
Store these colors in array: 'red', 'green', 'blue', 'yellow', 'purple'
as $colors then update your list of colors to be sorted in alphabetical order.
-->
<?php
$colors = array(

Step 1 : Install Laravel 6.0

first of all we need to get fresh Laravel 6.0 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer global require laravel/installer
laravel new blog --dev
@putheakhem
putheakhem / calculateblue.py
Created July 16, 2019 15:10
Use for validation accuracy Neural Machine Translation
import sys
import codecs
import os
import math
import operator
import json
from functools import reduce