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
# Calcul du nombre de jours par niveau de fréquentation pour Brouillon Coffee. | |
# | |
# Pour lancer le script, il faut installer la librairie `jours_feries_france`. | |
# Dans un terminal, exécuter la commande suivante: | |
# $ gem install jours_feries_france | |
# | |
# Puis, exécuter le script avec la commande suivante pour générer un fichier | |
# CSV nommé `days.csv`: | |
# $ ruby brouillon-days.rb > days.csv |
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
code | state | |
---|---|---|
00501 | NY | |
00544 | NY | |
01001 | MA | |
01002 | MA | |
01003 | MA | |
01004 | MA | |
01005 | MA | |
01007 | MA | |
01008 | MA |
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
class Die | |
def initialize(count = 1, faces = 1) | |
@count = count | |
@faces = faces | |
end | |
attr_reader :count, :faces | |
def rolls | |
return [count] if faces == 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
class Sudoku | |
def initialize(lines) | |
@lines = lines | |
end | |
attr_reader :lines | |
def complete? | |
groups.all? { |group| complete_group?(group) } | |
end |
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
outbrain.com, 00512545eb151d5d126f2d066b27600362, DIRECT | |
tremorhub.com, q017o-78mlk, RESELLER, 1a4e959a1b50034a | |
teads.tv, 15429, RESELLER, 15a9c44f6d26cbe1 | |
advertising.com, 26154, RESELLER | |
spotxchange.com, 225721, RESELLER | |
rubiconproject.com, 17130, RESELLER, 0bfd66d529a55807 | |
lkqd.net, 450, RESELLER, 59c49fa9598a0117 | |
openx.com, 540393169, RESELLER, 6a698e2ec38604c6 | |
spotx.tv, 238936, RESELLER, 7842df1d2fe2db34 | |
spotxchange.com, 238936, RESELLER, 7842df1d2fe2db34 |
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
mutation { | |
createDiscount( | |
creationId: "Q3JlYXRpb24vMjIwMjQzMA" | |
discountPercentage: 50 | |
discountEndAt: "2024-09-01T16:59:12+02:00" | |
) { | |
discount { | |
creation { | |
name | |
price { |
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
# Example GraphQL call using https://github.com/github/graphql-client | |
require 'graphql/client' | |
require 'graphql/client/http' | |
require 'base64' | |
query_string = <<~QUERY | |
{ | |
creationsBatch(limit: 3) { | |
results { |
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
<?php | |
$query = <<<'JSON' | |
{ | |
creationsBatch(limit: 3) { | |
results { | |
name(locale: EN) | |
url | |
creator { | |
nick |
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
# Example GraphQL call using https://github.com/prisma/python-graphql-client | |
from sgqlc.endpoint.http import HTTPEndpoint | |
import base64 | |
query = ''' | |
{ | |
creationsBatch(limit: 3) { | |
results { | |
name(locale: EN) |
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
# frozen_string_literal: true | |
# Via https://gist.github.com/ta1kt0me/6a7058d16621785d4f7038bde6cd3b98 | |
module RailsGeneratorFrozenStringLiteralPrepend | |
RUBY_EXTENSIONS = %w[.rb .rake].freeze | |
def render | |
return super unless RUBY_EXTENSIONS.include?(File.extname(destination)) | |
"# frozen_string_literal: true\n\n#{super}" |
NewerOlder