Skip to content

Instantly share code, notes, and snippets.

View converge's full-sized avatar

John Vanzuita converge

  • Brazil
  • 03:17 (UTC -03:00)
View GitHub Profile
package testing
import (
"context"
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
/*
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
import React, { useContext } from 'react';
import logo from './logo.svg';
import './App.css';
const AppContext = React.createContext({ theme: null, nome: null });
function Post() {
const theme = useContext(AppContext);
return (
<div className="{theme}">
import os
import platform
import subprocess
firefox_path = None
system = platform.system().lower()
def check_firefox():
if system == "darwin":
// APP.JS
import React from 'react'
import './App.css'
import { SEO } from './seo'
function App() {
return (
<div>
<SEO title="Home page" location="/" type="Organization" />
hello
Click==7.0
Flask==1.0.3
Flask-Cors==3.0.8
Flask-SQLAlchemy==2.4.0
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
psycopg2-binary==2.8.2
six==1.12.0
SQLAlchemy==1.3.4
import api from '../../services/api';
import React, { Component } from 'react'
import { Formik, Field, Form, ErrorMessage } from 'formik'
import '../Base/base.css'
class CreatePost extends Component {
// state = {
// title: '',
// category: '',
function solution(A) {
// permutation -> if numbers in sequences, return 1
// ex. [3,1,2] is a permutation, [3,4,1] isn't
let result = 1
let sortedArr = A.sort((a,b) => a - b)
let next = sortedArr[0]
for (let i=0; i < sortedArr.length; i++) {
(sortedArr[i] !== next) ? result = 0 : next += 1
}
import React from 'react';
import PropTypes from 'prop-types';
import deburr from 'lodash/deburr';
import Downshift from 'downshift';
import { withStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
import Paper from '@material-ui/core/Paper';
import MenuItem from '@material-ui/core/MenuItem';
import Grid from '@material-ui/core/Grid';
import { compose } from 'redux';
import React, { Component } from 'react'
import { Formik, Field, Form, ErrorMessage } from 'formik'
import './index.css'
class LoginForm extends Component {
handleSubmit = (values, actions) => {
actions.setSubmitting(true)
console.log(values)
console.log(actions)
// just login now without passwd: