Skip to content

Instantly share code, notes, and snippets.

View radiaku's full-sized avatar
💭
I may be slow to respond.

radia radiaku

💭
I may be slow to respond.
View GitHub Profile
@penciltester
penciltester / multiwindow.go
Created July 17, 2017 23:46
Concurrent window changing
package main
import (
"fmt"
"github.com/lxn/walk"
. "github.com/lxn/walk/declarative"
"time"
)
var mainWindow *walk.MainWindow
@mbalunovic
mbalunovic / cartpole_q_network.py
Created September 11, 2017 06:23
Q-Network, CartPole
import gym
import keras
import numpy as np
import random
from gym import wrappers
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
@bgrins
bgrins / gist:1789787
Created February 10, 2012 13:58
C# Multipart File Upload
// Implements multipart/form-data POST in C# http://www.ietf.org/rfc/rfc2388.txt
// http://www.briangrinstead.com/blog/multipart-form-post-in-c
public static class FormUpload
{
private static readonly Encoding encoding = Encoding.UTF8;
public static HttpWebResponse MultipartFormDataPost(string postUrl, string userAgent, Dictionary<string, object> postParameters)
{
string formDataBoundary = String.Format("----------{0:N}", Guid.NewGuid());
string contentType = "multipart/form-data; boundary=" + formDataBoundary;
@awjuliani
awjuliani / Q-Table Learning-Clean.ipynb
Last active October 25, 2022 07:57
Q-Table learning in OpenAI grid world.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agalera
agalera / split_video.py
Created February 6, 2017 09:32
split video with moviepy
from moviepy.editor import *
from multiprocessing import Process, Semaphore
import sys
segment_length = float(sys.argv[1])
frames = float(sys.argv[2])
original_video = VideoFileClip("original.mp4")
duration = original_video.duration
clip_start = 0
@LiveOverflow
LiveOverflow / hireme.ipynb
Created November 20, 2020 10:46
Hire me!!!!!!!!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jankurianski
jankurianski / ControlSnapshot.cs
Created December 2, 2014 07:18
Takes a screenshot of a Windows Forms control using BitBlt, making it work with CefSharp's WinForms.ChromiumWebBrowser
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class ControlSnapshot
{
public static Bitmap Snapshot(Control c)
{
# Ian Annase
# 4/16/18
import os
import sys
import json
import spotipy
import webbrowser
import spotipy.util as util
from json.decoder import JSONDecodeError
@bjoernQ
bjoernQ / AndroidManifest.xml
Created October 14, 2013 13:02
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity
@gunar
gunar / code.js
Last active April 6, 2024 17:06
Remove Duplicates From GDrive Root
/*
Gunar C. Gessner
@gunar 2016
INSTALL: https://script.google.com/macros/s/AKfycbym7IaTORzJ7LQPcxMx1LV1SQEC6RVGv5tzLOgYS8iQe8XAJxM/exec
After installation, the script will, every 10 minutes, search for all files that have duplicates (shift+z) and remove them from the root directory ("My Drive").
This Google Apps Script webapp aims to solve the problem that when transferring ownership of folders &
files to another account, duplicate files shown in "My Drive".