Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

MohamedKari

🏠
Working from home
View GitHub Profile
@redatawfik
redatawfik / server.cpp
Created Jun 12, 2020
Server implementation of client-server chat using Winsock
View server.cpp
#include <winsock2.h>
#include <iostream>
struct CLIENT_INFO {
SOCKET hClientSocket;
struct sockaddr_in clientAddr;
};
char szServerIPAddr[] = "192.168.1.4"; // Put here the IP address of the server
int nServerPort = 5050; // The server port that will be used by
@vfdev-5
vfdev-5 / README.md
Last active Dec 10, 2021
ROS development on MacOSX using docker
View README.md

ROS development on MacOSX using docker

We need to use docker-machine to handle USB ports inside the docker.

Docker Machine (0.16.1)

@yusuke024
yusuke024 / ViewController.swift
Created Nov 16, 2018
Recording video with AVAssetWriter
View ViewController.swift
import UIKit
import AVFoundation
class ViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
switch AVCaptureDevice.authorizationStatus(for: .video) {
case .notDetermined:
@WillWetzel
WillWetzel / Quaternion.cpp
Created Oct 6, 2018
Programming for Games - Project 1 - Vectors and Quaternions
View Quaternion.cpp
/*Name: William Wetzel - 130251255*/
/*Programming for Games - Project 1*/
/*2016*/
/*Quaternion.cpp file. Has all methods declared in the Quaternion header file.*/
#include "Quaternion.h"
Quaternion::Quaternion() {
coord = new float[4];
@mcguffin
mcguffin / git-release.py
Last active Nov 16, 2020
Python script to create GitHub release
View git-release.py
#!/usr/bin/env python3
import argparse, glob, json, re, subprocess, urllib.request, os, sys
class version_number:
major=0
minor=0
release=0
@karpathy
karpathy / pg-pong.py
Created May 30, 2016
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
View pg-pong.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward