Skip to content

Instantly share code, notes, and snippets.

Working from home


Working from home
View GitHub Profile
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[] = ""; // Put here the IP address of the server
int nServerPort = 5050; // The server port that will be used by
vfdev-5 /
Last active Dec 10, 2021
ROS development on MacOSX using docker

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 / 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) {
switch AVCaptureDevice.authorizationStatus(for: .video) {
case .notDetermined:
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*/
/*Quaternion.cpp file. Has all methods declared in the Quaternion header file.*/
#include "Quaternion.h"
Quaternion::Quaternion() {
coord = new float[4];
mcguffin /
Last active Nov 16, 2020
Python script to create GitHub release
#!/usr/bin/env python3
import argparse, glob, json, re, subprocess, urllib.request, os, sys
class version_number:
karpathy /
Created May 30, 2016
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" 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