Skip to content

Instantly share code, notes, and snippets.

View xsaamiir's full-sized avatar
🟡
xoē

sāmīr xsaamiir

🟡
xoē
View GitHub Profile
{
"fantasy-name": "Restaurant fantasy name",
"company name": "Restaurant company name",
"logo": "Restaurant logo",
"CNPJ": "Restaurant CNPJ",
"phone": "Restaurant phone",
"telephone": "Restaurant telephone",
"website": "Restaurant website",
"category": [
"Fast Food",
""" A program that returns a list that contains only the elements that are common between the lists (without duplicate).
The program should work with list of different sizes"""
import itertools
import random
a = random.sample(range(100), 50)
b = random.sample(range(200), 10)
#a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 8]
user_input = input("Please type a word:\n")
if user_input == user_input[::-1]:
print("You just typed a palindrome")
else:
print("You didn'type a palindrome")
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
even_elements = [i for i in a if i%2 == 0]
print(even_elements)
def check_input(user_input):
allowed = ["rock", "paper", "scissors"]
if user_input in allowed:
return user_input
return check_input(input("Please enter a valid input: "))
print("""
Welcome to rock, paper, scissors.
@xsaamiir
xsaamiir / Iterate.html
Created October 22, 2017 19:06
Jinja template iterate over a dictionary
<dl>
{% for key, value in _dict.iteritems() %}
<dt>{{ key }}</dt>
<dd>{{ value }}</dd>
{% endfor %}
</dl>
@xsaamiir
xsaamiir / Sample Menu Data
Created October 29, 2017 16:31
Single Platform Sample Menu Data
Menu Field Descriptions
A couple notes to help in understanding the field descriptions below:
There are multiple types of entries. Each entry type contains a slightly different set of information and is/should be rendered slightly differently.
The list of entries is ordered by the orderNum field. The ordering is important as it defines the order in which to render the entries in the menu and which items are in which sections.
A menu consists of a map of the following fields:
id: the unique, numeric id of this menu
name: a unique name for this menu among the menus for a given location; used in the REST API
@xsaamiir
xsaamiir / Sample Menu Data
Created October 29, 2017 16:31
Single Platform Sample Menu Data
Menu Field Descriptions
A couple notes to help in understanding the field descriptions below:
There are multiple types of entries. Each entry type contains a slightly different set of information and is/should be rendered slightly differently.
The list of entries is ordered by the orderNum field. The ordering is important as it defines the order in which to render the entries in the menu and which items are in which sections.
A menu consists of a map of the following fields:
id: the unique, numeric id of this menu
name: a unique name for this menu among the menus for a given location; used in the REST API
set __COMPAT_LAYER=RunAsInvoker
start appName
@xsaamiir
xsaamiir / env variables windows
Last active December 16, 2017 11:32
To edit env variables without admin rights
rundll32 sysdm.cpl,EditEnvironmentVariables