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 script does codegen for the facebook plugin. | |
# It codegens both the rest client and the cloudquery table and fetcher. | |
# It requires cloning https://github.com/facebook/facebook-business-sdk-codegen and using the json specs therein. | |
# It is a little primitive - only codegens a single resource at a time, and user needs to point to the relevant json file. | |
import sys | |
import re | |
import json | |
from typing import List, Dict, Optional | |
import io |
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
# Outputs an `OracleClients` struct, and intialization code for the struct. | |
# To be used with one of `--imports`, `--initialization`, or `--struct` flags. | |
# | |
# import "github.com/oracle/oci-go-sdk/v65/core" | |
# import "github.com/oracle/oci-go-sdk/v65/identity" | |
# ... | |
# type OracleClients struct { | |
# IdentityClient *identity.IdentityClient | |
# ComputeClient *core.ComputeClient | |
# NetworkClient *core.VirtualNetworkClient |
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
package main | |
import ( | |
"fmt" | |
) | |
type Parent struct { | |
Num int | |
} |
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 script needs to be used on codegen recipe files. | |
# It refactors the codegen resources to use r"TableDefinition: codegen.TableDefinition{" for the fields | |
# inherited from the codegen.TableDefinition embedded struct. | |
# This is needed because of a golang limitation: https://gist.github.com/shimonp21/8907b859d60ec40e932172c0f21fa636 | |
import sys | |
import re | |
import os | |
from pathlib import Path | |
# I refactored these manually |
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
package main | |
import "math/rand" | |
const BigNumber = 1000 | |
func main() { | |
m := make(map[int]int) | |
go mapWriter(m) |