Skip to content

Instantly share code, notes, and snippets.

View tonnyone's full-sized avatar
:bowtie:
I don't know my status

liushaoqing tonnyone

:bowtie:
I don't know my status
  • 保密
  • Beijing
View GitHub Profile
@tonnyone
tonnyone / main.go
Created October 18, 2023 16:14 — forked from ka2n/main.go
Parse yaml with dynamic key name usign go.
package main
import (
"io/ioutil"
"log"
"gopkg.in/yaml.v2"
)
type Config struct {
@tonnyone
tonnyone / windows_terminal_settings.json
Last active February 5, 2021 10:33
windows terminal settings
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"copyOnSelect": false,
"copyFormatting": false,
"closeOnExit": "always",
"requestedTheme": "light",
"showTabsInTitlebar": true,
"showTerminalTitleInTitlebar": true,
@tonnyone
tonnyone / package.py
Created July 2, 2015 14:24
最简单背包问题,python代码
#!/usr/bin/env python
# coding=utf-8
__author__ = 'tonnytwo'
"""最简单的背包问题,背包最大容量是10 总共4件物品,价值和重量分别如下
Knapsack Max weight : W = 10 (units)
Total items : N = 4
Values of items : v[] = {10, 40, 30, 50}
Weight of items : w[] = {5, 4, 6, 3}
"""
@tonnyone
tonnyone / Fibonacci.py
Created June 23, 2015 13:49
this is a piece python code for Fibonacci Array with 3 method
#!/usr/bin/env python
#coding=utf-8
def f(num):
print num
if num==1 or num==2:
return 1
else:
return f(num-1)+f(num-2)