Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 23eb157
Showing
7 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Core Developers # | ||
|
||
---------- | ||
- Sepand Haghighi - Sharif University Of Technology/Moduland Co - ([http://github.com/sepandhaghighi](http://github.com/sepandhaghighi)) ([sepand@qpage.ir](mailto:sepand@qpage.ir)) |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .art import * |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
from .art import * |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# -*- coding: utf-8 -*- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# -*- coding: utf-8 -*- | ||
''' | ||
This function get a string as input if input is one digit add a zero | ||
:param input_string: input digit az string | ||
:type input_string:str | ||
:return: modified output as str | ||
>>> from csv2yaml import * | ||
>>> import coverage | ||
>>> import json | ||
>>> import yaml | ||
>>> import pickle | ||
>>> cov = coverage.Coverage(omit=['*/home/travis/virtualenv/python3.5.3/lib/python3.5/site-packages/yaml/*']) | ||
>>> cov.start() | ||
>>> convert_bytes(200) | ||
'200.0 bytes' | ||
>>> convert_bytes(6000) | ||
'5.9 KB' | ||
>>> convert_bytes(80000) | ||
'78.1 KB' | ||
>>> zero_insert("22") | ||
'22' | ||
>>> zero_insert("320") | ||
'320' | ||
>>> zero_insert("2") | ||
'02' | ||
>>> zero_insert(22) | ||
Traceback (most recent call last): | ||
... | ||
TypeError: object of type 'int' has no len() | ||
>>> time_convert('33') | ||
'00 days, 00 hour, 00 minutes, 33 seconds' | ||
>>> time_convert("15000") | ||
'00 days, 04 hour, 10 minutes, 00 seconds' | ||
>>> time_convert("sadasdasd") | ||
Traceback (most recent call last): | ||
... | ||
ValueError: could not convert string to float: 'sadasdasd' | ||
>>> json_size=json_convert("test.csv") | ||
>>> file=open("test.json","r") | ||
>>> testfile_1=json.load(file) | ||
>>> testfile_1["test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1["test"]["data"][1]["Node2"] | ||
'5' | ||
>>> yaml_size=json_to_yaml("test.json") | ||
>>> file=open("test.yaml","r") | ||
>>> testfile_1_yaml=yaml.load(file) | ||
>>> testfile_1_yaml["test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1_yaml["test"]["data"][1]["Node2"] | ||
'5' | ||
>>> pickle_size=json_to_pickle("test.json") | ||
>>> testfile_1_p=pickle.load( open( "test.p", "rb" ) ) | ||
>>> testfile_1_p["test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1_p["test"]["data"][1]["Node2"] | ||
'5' | ||
>>> json_size=json_convert("test.csv","header_test") | ||
>>> file=open("test.json","r") | ||
>>> testfile_1=json.load(file) | ||
>>> testfile_1["header_test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1["header_test"]["data"][1]["Node2"] | ||
'5' | ||
>>> yaml_size=json_to_yaml("test.json") | ||
>>> file=open("test.yaml","r") | ||
>>> testfile_1_yaml=yaml.load(file) | ||
>>> testfile_1_yaml["header_test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1_yaml["header_test"]["data"][1]["Node2"] | ||
'5' | ||
>>> pickle_size=json_to_pickle("test.json") | ||
>>> testfile_1_p=pickle.load( open( "test.p", "rb" ) ) | ||
>>> testfile_1_p["header_test"]["data"][1]["Node1"] | ||
'1' | ||
>>> testfile_1_p["header_test"]["data"][1]["Node2"] | ||
'5' | ||
>>> cov.stop() | ||
>>> cov.save() | ||
''' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from distutils.core import setup | ||
setup( | ||
name = 'art', | ||
packages = ['art'], | ||
version = '0.1', | ||
description = 'ASCII Art Collection In Python', | ||
long_description='ASCII Art Collection In Python', | ||
author = 'Sepand Haghighi', | ||
author_email = 'sepand@qpage.ir', | ||
url = 'https://github.com/sepandhaghighi/art', | ||
download_url = 'https://github.com/sepandhaghighi/art/tarball/v0.1', | ||
keywords = ['ascii', 'art', 'python3','python'], | ||
classifiers = [], | ||
license='MIT', | ||
) |