Skip to content

Instantly share code, notes, and snippets.

@squarednob
squarednob / Obama_speech2008.txt
Last active January 3, 2016 20:19
Electrophoresis emulator.
If there is anyone out there who still doubts that America is a place where all things are possible; who still wonders if the dream of our founders is alive in our time; who still questions the power of our democracy, tonight is your answer.
It’s the answer told by lines that stretched around schools and churches in numbers this nation has never seen; by people who waited three hours and four hours, many for the very first time in their lives, because they believed that this time must be different; that their voice could be that difference.
It’s the answer spoken by young and old, rich and poor, Democrat and Republican, black, white, Latino, Asian, Native American, gay, straight, disabled and not disabled – Americans who sent a message to the world that we have never been a collection of Red States and Blue States: we are, and always will be, the United States of America.
It’s the answer that led those who have been told for so long by so many to be cynical, and fearful, and doubtful of what we can achieve
@squarednob
squarednob / addUVsphere_on_curves2_fit_curvesize1_test3_functionize1.py
Last active August 29, 2015 14:08
Blender script to add UVspheres along with curve's location and length.
def addUVsphereOnCurves(number,scale=0.1):
import bpy
import mathutils
from mathutils import Vector
objectList = []
curveList = []
lengthList = []
locationList = []
@squarednob
squarednob / D3_CPI_JP_core-corecore.html
Last active October 1, 2015 19:08
D3 plot for Japanese CPI of core and corecore.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
.axis text {
font: 15px sans-serif;
}
@squarednob
squarednob / pseudo-integrate.ipynb
Created February 24, 2016 19:34
Python: Pseudo integrate class
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import bpy
# Meta information.
bl_info = {
"name": "Addon-template1: Add IcoSphere",
"author": "Gappy",
"version": (1, 0),
"blender": (2, 75, 0),
"location": "Object > Ball",
"description": "Add IcoSphere",
import bpy
def dupliOnCurve(curve_length_effect=None, replace=None):
'''
When you want to duplicate an object on object: Simply do "object > make links > object data".
The function is optimised for an object to duplicate on curves, althoubh it can be used to duplicate on objects.
Usage:
1. Multiple selecte curves, and lastly select an object as an object to be duplicated.
2. Paste the code on text editor which can be found in scripting layout.
# coding: utf-8
# In[1]:
import numpy as np
import scipy as sp
# matplotlib:
from matplotlib.pylab import plt
@squarednob
squarednob / README.md
Last active February 17, 2017 11:38
D3-electrophoresis: Simple Example
@squarednob
squarednob / README.md
Last active February 24, 2017 22:09
D3-electrophoresis: Customizing setting with Trump inauguration text

D3-electrophoresis plugin example: Default text is Trump's inauguration speech. You can change text and words in text box.

Github: D3-electrophoresis

@squarednob
squarednob / README.md
Last active February 17, 2017 15:26
D3-electrophoresis: Customizing settings with DNA sequence.

D3-electrophoresis plugin example: Default text is a kind of DNA sequence. You can change text and words in text box.

Github: D3-electrophoresis