Skip to content

Instantly share code, notes, and snippets.

View bendtherules's full-sized avatar
💭
Loving Typescript ...

Abhas Bhattacharya bendtherules

💭
Loving Typescript ...
View GitHub Profile
class TODOList {
...
...
addNewTodo(todoText){
this.todos. ??
}
}
@bendtherules
bendtherules / install_c_for_python_compilation.txt
Last active September 16, 2020 20:01
How to install C compiler for python ( compile c+python modules from pip and also from cython)
install Microsoft Visual C++ Compiler for Python 2.7
create this fake folder "C:\Users\ab\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\fake1\fake2"
set env var VS90COMNTOOLS= that fake folder
now goto C:\Users\ab\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0
youll find there is vcvarsall.bat, but it is not searched for here
copy it and paste in the VC folder
open for editing:
[in 3 places youll find this type of statement, replace them with these]
set VCINSTALLDIR=%~dp0
from flask import Flask
from flask import *
# import redis
app = Flask(__name__)
fname = r"E:/much.txt"
# db = redis.StrictRedis(host='localhost', port=6379, db=0)
# db.client_setname("Url_shortener")
# db_list_user_name = "user"
import pygame
class ball(object):
global mouse_down
#global pygame
def __init__(self,x=320,y=240,speed=3):
#global pygame
self.x=x
self.y=y
self.speed=speed
self.dir=None
import sys,pygame,math;
from class_ball import ball
pygame.init()
clock = pygame.time.Clock()
size=width,height=640,480
#x=320
#y=240
#speed=3
#dir=None
black=0,0,0
---bug_file.py---
import math,another_file
a=another_file.class_a()
--another_file.py--
class class_a():
def __init__(self):
print(math.cos(0))