This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column, Integer, String, create_engine | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
############################### SQL ALCHEMY SCRIPT #################################### | |
# create Base | |
Base = declarative_base() | |
# create Pokemon class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy.ext.declarative import declarative_base, declared_attr | |
from sqlalchemy import Column, Integer, String | |
Base = declarative_base() | |
class CustomBase(Base): | |
__abstract__ = True | |
def __init__(self): | |
print "Hello world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python rossian.py scaffold-crud coba orang nama:String-50 alamat:String-50 ayah:orang:manytoone ibu:orang:manytoone teman:orang:onetomany anak:orang:onetomany jurus:jurus:onetomany pekerjaan:pekerjaan:manytoone hobi:hobi:manytomany tanggal_lahir:Date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func write(n int){ | |
for i := 0; i<100; i++ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package prof_04_01; | |
class Node{ | |
int data; | |
Node next; | |
Node prev; | |
public Node(int new_data){ | |
data = new_data; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
c = cv2.VideoCapture(0) | |
# get the xmls from https://github.com/Itseez/opencv/tree/master/data/haarcascades | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt.xml') | |
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') | |
while(1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = ''' | |
<_> | |
<!-- root node --> | |
<feature> | |
<rects> | |
<_>3 7 14 4 -1.</_> | |
<_>3 9 14 2 2.</_></rects> | |
<tilted>0</tilted></feature> | |
<threshold>4.0141958743333817e-003</threshold> | |
<left_val>0.0337941907346249</left_val> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Gunvarrel v 0.0.1 | |
* Purpose: To emulate simple sonar robot | |
* Description: Far from perfect. I use LED instead of motor, and push-button instead of sonar | |
* Author: Go Frendi Gunawan | |
*/ | |
int left_motor = 12; // left motor (now just LED) | |
int right_motor = 13; // right motor (now just LED) | |
int sonar_sensor = 8; // sonar (now just push-button) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Gunvarrel v 0.0.2 | |
* Purpose: To emulate simple sonar robot | |
* Description: Far from perfect. I use LED instead of motor | |
* Author: Go Frendi Gunawan | |
*/ | |
int left_motor = 12; // left motor | |
int right_motor = 13; // right motor | |
int sonar_trig = 8; // sonar trigger | |
int sonar_echo = 7; // sonar echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Gunvarrel v 0.0.3 | |
* Purpose: Simple sonar robot | |
* Description: Good enough | |
* Author: Go Frendi Gunawan | |
*/ | |
int left_motor = 11; // left motor | |
int right_motor = 10; // right motor | |
int sonar_trig = 12; // sonar trigger | |
int sonar_echo = 13; // sonar echo |
OlderNewer