Skip to content

Instantly share code, notes, and snippets.

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

N. YC. Kim nyck33

🏠
Working from home
View GitHub Profile
@rydmike
rydmike / main.dart
Last active July 18, 2022 19:14
EXAMPLE: Padding Slivers with SliverPadding and demo of why Padding does not work
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
return runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
# import required packages
import cv2
import dlib
import argparse
import time
# handle command line arguments
ap = argparse.ArgumentParser()
ap.add_argument('-i', '--image', required=True, help='path to image file')
ap.add_argument('-w', '--weights', default='./mmod_human_face_detector.dat',
@tsu-nera
tsu-nera / dqn_cartpole_numpy.py
Created July 9, 2017 08:42
DQN cartpole with numpy only
import gym
import numpy as np
from collections import deque
from gym import wrappers
# Create the Cart-Pole game environment
env = gym.make('CartPole-v0')
env = wrappers.Monitor(env, '/tmp/cartpole-experiment-1')
def relu(x):
@kkweon
kkweon / policy_gradient.py
Created May 18, 2017 07:17
Keras Policy Gradient Example
"""
Simple policy gradient in Keras
"""
import gym
import numpy as np
from keras import layers
from keras.models import Model
from keras import backend as K
@ernestum
ernestum / elastic_transform.py
Last active November 2, 2023 10:26 — forked from fmder/elastic_transform.py
Elastic transformation of an image in Python
import numpy as np
from scipy.ndimage.interpolation import map_coordinates
from scipy.ndimage.filters import gaussian_filter
def elastic_transform(image, alpha, sigma, random_state=None):
"""Elastic deformation of images as described in [Simard2003]_.
.. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for
Convolutional Neural Networks applied to Visual Document Analysis", in
Proc. of the International Conference on Document Analysis and
Recognition, 2003.
@h3xx
h3xx / wiki-100k.txt
Created March 5, 2012 03:07
Wictionary top 100,000 most frequently-used English words [for john the ripper]
#!comment: This is a list of the top 100,000 most frequently-used English words
#!comment: according to Wiktionary.
#!comment:
#!comment: It was compiled in August 2005 and coalesced into a handy list for
#!comment: use in John the Ripper.
#!comment:
#!comment:
#!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT
#!comment:
#!comment: Sources: