Pi Day is an annual celebration of the mathematical constant π (pi). Pi Day is observed on March 14 (3/14 in the month/day format) since 3, 1, and 4 are the first three significant figures of π. It was founded in 1988 by Larry Shaw, an employee of the San Francisco, California science museum, the Exploratorium.
This file has been truncated, but you can view the full file.
This file contains hidden or 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
IdCliente,Provincia,Grupo,Ventas 2018,Unidades 2018,Tickets 2018,Antigüedad,Ventas 2017,Unidades 2017,Tickets 2017,Ventas 2016,Unidades 2016,Tickets 2016,Ventas 2015,Unidades 2015,Tickets 2015,Ventas 2014,Unidades 2014,Tickets 2014 | |
Cliente 1,29,Tienda/Supermercado de Alimentacion,1525.788,2213.28,46,2009-01-05 09:45:21.000,3292.9751,2307.37,38,3545.6107,4569.7,49,6306.3445,8004.09,91,6439.1802,8519.13,83 | |
Cliente 2,29,,115.8179,82.97,1,2009-01-03 10:48:33.000,286.9034,145.04,3,446.0571,321.39,12,135.4624,91.62,4,190.4443,175.68,7 | |
Cliente 3,29,Tienda/Supermercado de Alimentacion,25670.9588,35516.11,236,2009-01-03 09:07:38.000,27947.2056,36381.85,256,33964.779,41264.9,257,36267.5888,42266.22,338,36096.9745,41184.69,348 | |
Cliente 4,29,Tienda/Supermercado de Alimentacion,39519.3851,42299.2,358,2009-01-05 05:31:46.000,25968.0955,38376.72,231,14953.0722,24823.03,170,15524.3915,25823.11,248,13159.2442,21074.77,175 | |
Cliente 5,29,Tienda/Supermercado de Alimentacion,2555.5218,2587.39,20,2009-01-12 11:39:56.000,3455.6742,26 |
This file contains hidden or 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
DO $$ | |
DECLARE | |
r RECORD; | |
row_count BIGINT; | |
BEGIN | |
FOR r IN (SELECT relname FROM pg_stat_user_tables) LOOP | |
EXECUTE 'SELECT COUNT(*) FROM ' || quote_ident(r.relname) INTO row_count; | |
RAISE NOTICE 'Table: %, Row count: %', r.relname, row_count; | |
END LOOP; | |
END $$; |
This file contains hidden or 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
# This command will list all your environments which are setup in Elastic Beanstalk (EB) | |
$ eb list | |
EnvironmentName1 # Name of the first environment | |
EnvironmentName2 # Name of the second environment | |
EnvironmentName3 # Name of the third environment | |
# This command is used to display the status of the specified environment (EnvironmentName1) | |
$ eb status EnvironmentName1 | |
# The following command will set an environment variable (ENV_VAR_NAME) to a specific value (value) |
This file contains hidden or 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
-- The below query is used to fetch all the role names from the 'pg_roles' system catalog table. | |
-- It will return a list of all user (role) names in the current PostgreSQL database. | |
SELECT rolname FROM pg_roles; | |
-- This command is used to create a new PostgreSQL user with the specified username and password. | |
-- In this case, the newly created username is 'username' and the password is 'P@55w0rd'. | |
CREATE USER username WITH PASSWORD 'P@55w0rd'; | |
-- This command grants all privileges to the user 'username' on the database 'dbname'. | |
-- These privileges include SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE |
This file contains hidden or 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 -m pip install requests | |
import requests | |
url = "https://api-us.cometchat.io/v2" | |
headers = { | |
"accept": "application/json", | |
"Content-Type": "application/json", | |
"Accept": "application/json", | |
"appId": "---", |
This file contains hidden or 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
# frozen_string_literal: true | |
mailer = ActionMailer::Base.new | |
mailer.delivery_method | |
mailer.smtp_settings | |
mailer.mail(from: '[email protected]', to: '[email protected]', subject: 'Testing email', body: "Hello, you've got mail!").deliver! |
This file contains hidden or 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 numpy import matrix | |
def fib(n): | |
return (matrix( | |
'0 1; 1 1' if n >= 0 else '-1 1; 1 0', object | |
) ** abs(n))[0, 1] | |
This file contains hidden or 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
namespace Fibonacci; | |
/// <summary> | |
/// The Fibonacci sequence is a sequence of numbers where a number is the sum of the two preceding numbers. | |
/// The first 10 numbers in the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. | |
/// </summary> | |
public static class Fibonacci | |
{ | |
/// <summary> | |
/// Fibonacci in a recursive version |
This file contains hidden or 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 os | |
EXTENSIONS = ['py', 'rb', 'cs', 'ex', 'js', 'go', 'rs', 'dart', 'php', 'sql'] | |
def create_files_by_extension_given_a_filename(name, directory): | |
for extension in EXTENSIONS: | |
file = f"{name}.{extension}" | |
if os.path.exists(os.path.join(directory, file)): | |
print('{0}: already exists!'.format(file)) |
NewerOlder