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
from graphene_pydantic import PydanticObjectType | |
class GraphQLFlight(PydanticObjectType): | |
class Meta: | |
model = Flight |
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
type Flight { | |
origin: String | |
destination: String | |
departure: DateTime | |
} |
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
In [0]: Flight(origin="DCA", destination="ORD", departure="hurrah") | |
ValidationError: 1 validation error | |
departure | |
invalid datetime format (type=type_error.datetime) |
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
from datetime import datetime | |
from pydantic import BaseModel | |
class Flight(BaseModel): | |
origin: str | |
destination: str | |
departure: datetime |
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
#-*-coding: utf-8-*- | |
""" | |
Simple script to dump documents out of a CouchDB database and straight into | |
a Couchbase instance. | |
""" | |
import time | |
import sys | |
import argparse |
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
#!/usr/bin/env python | |
#-*-coding: utf-8-*- | |
""" | |
Simple script to dump documents out of a CouchDB database and straight into | |
a Couchbase instance. | |
""" | |
# Copyright (c) 2013, Rami Chowdhury | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
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
#!/usr/bin/env python | |
#-*-coding: utf-8-*- | |
""" | |
Fake CouchDB replication endpoint that copies documents into Couchbase. | |
""" | |
# Copyright (c) 2013, Rami Chowdhury | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# |
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
$ ping www.google.com.bd | |
PING www.google.com.bd (74.125.135.94): 56 data bytes | |
64 bytes from 74.125.135.94: icmp_seq=0 ttl=45 time=359.124 ms | |
64 bytes from 74.125.135.94: icmp_seq=1 ttl=45 time=904.636 ms | |
Request timeout for icmp_seq 2 | |
64 bytes from 74.125.135.94: icmp_seq=3 ttl=45 time=674.531 ms | |
Request timeout for icmp_seq 4 | |
64 bytes from 74.125.135.94: icmp_seq=5 ttl=45 time=623.437 ms | |
Request timeout for icmp_seq 6 | |
Request timeout for icmp_seq 7 |
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
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 2K bytes over 1 Gbps network 20,000 ns | |
Read 1 MB sequentially from memory 250,000 ns | |
Round trip within same datacenter 500,000 ns | |
Disk seek 10,000,000 ns |
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
Downloading: http://download.java.net/maven/2/net/java/jvnet-parent/1/jvnet-parent-1.pom | |
[INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository m2.java.net (http://download.java.net/maven/2) | |
Downloading: http://repository.jboss.org/nexus/content/groups/public//net/java/jvnet-parent/1/jvnet-parent-1.pom | |
[INFO] Unable to find resource 'net.java:jvnet-parent:pom:1' in repository repository.jboss.org (http://repository.jboss.org/nexus/content/groups/public/) | |
Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom | |
185b downloaded (jvnet-parent-1.pom) | |
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html> | |
<head><title>301' - RETRYING | |
Downloading: http://maven.glassfish.org/content/groups/glassfish/net/java/jvnet-parent/1/jvnet-parent-1.pom | |
185b downloaded (jvnet-parent-1.pom) |
NewerOlder