Skip to content

Instantly share code, notes, and snippets.

Evgeni evgenidb

  • Home
  • Sofia
View GitHub Profile
View freshdesk_api.py
"""
Interface to the FreshDesk API.
Author: Ed Menendez (ed@menendez.com)
Company: Digital Haiku
Created: September 1, 2014
Example settings:
FRESHDESK_URL = 'https://wpt.freshdesk.com'
@evgenidb
evgenidb / math_expression_class.rb
Created Dec 1, 2014
Solution for the math expression validation problem
View math_expression_class.rb
# The version I did during the class.
# This is only the regex. Replace it in the above code for it to work.
# Note: this is untested!!! Might have some bugs or missing '\s*'s
%r{
# Named Groups declarations
(?<sign>
[-+]?
){0}
@evgenidb
evgenidb / Snake_Game_-_Background_Map_Test.py
Created Aug 19, 2011
Snake Game - Background Map Test
View Snake_Game_-_Background_Map_Test.py
try:
import pygame
from pygame.locals import *
import sys, os, random
except ImportError as err:
print ('{0} Failed to Load Module: {1}').format(__file__, err)
sys.exit(1)
@evgenidb
evgenidb / gist:861321
Created Mar 8, 2011
fmi.py-bg.net - bad coding 3
View gist:861321
#Example 3:
#Wrong way
if True:
print("Hello, ")
print("World!")
else:
print("Bye, ")
print("World!")
@evgenidb
evgenidb / gist:861311
Created Mar 8, 2011
fmi.py-bg.net - bad coding 2
View gist:861311
#Example 2:
#First row of the block - 4 spaces, second row - tab (or was it vice versa?):
if True:
print("Hello")
print("World!")
@evgenidb
evgenidb / gist:861242
Created Mar 8, 2011
fmi.py-bg.net - bad coding 1
View gist:861242
#Example 1:
# Wrong way:
if 1 > 0: print("Hello, World!")
# Correct way:
if 1 > 0:
print("Hello, World!")
You can’t perform that action at this time.