ku1ik / rainbow Goto Github PK
View Code? Open in Web Editor NEWRuby gem for colorizing printed text on ANSI terminals
License: MIT License
Ruby gem for colorizing printed text on ANSI terminals
License: MIT License
It would be nice to have a way of randomly adding colors to strings, like randomly adding different colors to every letter. Also, a way of randomly selecting a color from the list of predefined basic and X11 colors would be interesting to see.
Rainbow disables itself if it can't use win32console. Beginning with Ruby 2 win32console is no longer needed and fails to load. Rainbow should use native ANSI color support on Windows when Ruby version >= 2.
As a new contributor it would be nice to have a contributing doc for reference.
This same doc can also guide developers in setting the project up locally.
I am opening this issue so we can perhaps start the conversation around what we would like to include in such a document should we decide to go ahead and add a contributing doc.
The CI system isn't running, so perhaps moving to a useful one is due, now?
On my computer bundle exec rubocop
gives no offenses or error (ruby 2.7).
But on the CI (Github Action, image ruby 2.6) I get an error because ruby 2.1 is not supported by rubocop.
Rubocop detects ruby 2.1 in TargetRubyVersion of Rainbow rubocop file. It seems to be because I use the paint
gems that requires rainbow 3.0.0
which is the last version available on rubygems.
Seems you know requires ruby 2.3 in git tag 3.1.0 but it will still crash since rubocops says:
Supported versions: 2.4, 2.5, 2.6, 2.7, 3.0
So could you requires at least ruby 2.4 in the rubocop file (and gemspec for no mismatch or disable the cop that check that), I don't really understand why rubocops on the CI is running on all the sub-dependencies instead of just my code, my best guess is that I requires paint here that itself requires rainbow.
So please:
Can't package it as there is no license specified in README nor LICENSE
This thread in the support forum at appveyor seems to confirm this:
Getting an error installing rainbow 2.2.0.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/travis/.rvm/gems/ruby-2.3.0/gems/rainbow-2.2.0/ext
/home/travis/.rvm/rubies/ruby-2.3.0/bin/ruby mkrf_conf.rb
current directory: /home/travis/.rvm/gems/ruby-2.3.0/gems/rainbow-2.2.0/ext
/home/travis/.rvm/rubies/ruby-2.3.0/bin/ruby -rubygems
/home/travis/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/bin/rake
RUBYARCHDIR=/home/travis/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.0
RUBYLIBDIR=/home/travis/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.0
(in /home/travis/.rvm/gems/ruby-2.3.0/gems/rainbow-2.2.0)
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
LoadError: cannot load such file -- rspec/core/rake_task
/home/travis/.rvm/gems/ruby-2.3.0/gems/rainbow-2.2.0/Rakefile:2:in `<top
(required)>'
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in
/home/travis/.rvm/gems/ruby-2.3.0/gems/rainbow-2.2.0 for inspection.
Results logged to
/home/travis/.rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.0/gem_make.out
An error occurred while installing rainbow (2.2.0), and Bundler cannot
continue.
Make sure that `gem install rainbow -v '2.2.0'` succeeds before bundling.
When using rainbow as a dependency in a gem or simply using it with 'require' in IRB, I can't access the X11 colors, ie: Rainbow("test").orange
.
NoMethodError: undefined method `orange' for "Test orange":Rainbow::Presenter
from (irb):2
from /Users/aaronvb/.rbenv/versions/2.2.3/bin/irb:11:in `<main>'
However when using rainbow in a rails app by including in the gem file, it works fine.
I narrowed the problem down to the Color module not being loaded when being used with 'require' or as a gem dependency, and when orange goes to method_missing it doesn't find the color.
I then changed all the require's to require_relative
and removed rainbow from the path and the problem went away.
Ruby: 3.2.2
Rainbow gem: 3.1.1
or
Rainbow commit: 629cde5
Using the String refinement interface, ANSI foreground color methods can be used but their X11 counterparts cannot.
$ irb --simple-prompt -r rainbow/refinement
>> using Rainbow
=> main
>> Rainbow("hello").red
=> "\e[31mhello\e[0m"
>> "hello".red
=> "\e[31mhello\e[0m"
>> Rainbow("hello").tomato
=> "\e[38;5;209mhello\e[0m"
>> "hello".tomato
(irb):5:in `<main>': undefined method `tomato' for "hello":String (NoMethodError)
>> "hello".bright.tomato
=> "\e[1m\e[38;5;209mhello\e[0m"
>> "hello".tomato.bright
(irb):7:in `<main>': undefined method `tomato' for "hello":String (NoMethodError)
The reason the ANSI methods work but the X11 ones don't is that the refinement works by defining Presenter's instance methods onto String. While the ANSI methods are explicitly defined on Presenter, the X11 ones are handled by Presenter's method_missing, so they don't get added. I'll make a PR.
Look like version 3.1.0 was just published to rubygems.org but it doesn't have any code?
Trying to install rainbow with rubocop and ruby2.4. Here is what i get in the end:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
can't modify frozen String
Gem files will remain installed in
/home/ubuntu/inboundsms/vendor/bundle/ruby/2.4.0/gems/rainbow-2.2.1 for
inspection.
Results logged to
/home/ubuntu/inboundsms/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/rainbow-2.2.1/gem_make.out
An error occurred while installing rainbow (2.2.1), and Bundler cannot
continue.
Make sure that `gem install rainbow -v '2.2.1'` succeeds before bundling.
just hit this issue on travis-ci: https://travis-ci.org/benbalter/jekyll-readme-index/builds/187073263
when the latest build pulled 2.2.0; previously it was using 2.1.0
Installing rainbow 2.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
As usual, travis tried 3 times and gave up, building under ubuntu. But locally on MacOSX, the project updated to 2.2.0 and built fine.
See the build log for exhaustive environment details.
Any idea why this platform variance and what it is about 2.2.0 that might have caused this?
Suggested solutions for people encountering this problem at the moment: gem update --system
or locking down rainbow to 2.1.x in your Gemfile.
The new bundler version 0.14 exits with the following message:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
can't modify frozen String
Downgrading to previous bundler version 1.13.7 is a workaround.
Specifying red
color by name seems to fail, while it works for other colors. It also works if color name is specified as a symbol, eg :red
To reproduce
2.4.1 :001 > require 'rainbow'
=> true
2.4.1 :002 > Rainbow("this is a test message").red
=> "\e[31mthis is a test message\e[0m"
2.4.1 :003 > Rainbow("this is a test message").color(:red)
=> "\e[31mthis is a test message\e[0m"
2.4.1 :004 > Rainbow("this is a test message").color("red")
ArgumentError: wrong number of arguments (given 1, expected 0)
from /usr/local/rvm/gems/ruby-2.4.1/gems/rainbow-3.0.0/lib/rainbow/color.rb:42:in `to_i'
from /usr/local/rvm/gems/ruby-2.4.1/gems/rainbow-3.0.0/lib/rainbow/color.rb:42:in `parse_hex_color'
from /usr/local/rvm/gems/ruby-2.4.1/gems/rainbow-3.0.0/lib/rainbow/color.rb:34:in `build'
from /usr/local/rvm/gems/ruby-2.4.1/gems/rainbow-3.0.0/lib/rainbow/presenter.rb:20:in `color'
from (irb):4
from /usr/local/rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'
2.4.1 :005 > Rainbow("this is a test message").color("green")
=> "\e[38;5;46mthis is a test message\e[0m"
2.4.1 :006 >
Ruby: 2.4.1
rubygems: 2.6.14
rainbow gem: 3.0.0
OS: CentOS 7.4
https://travis-ci.org/sickill/rainbow/builds/634729227 is a failed JRuby build where the CI configuration fails to install the JDKs needed.
$ ~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"
Ignoring license option: BCL -- using GPLv2+CE by default
install-jdk.sh 2019-12-16
Expected feature release number in range of 9 to 15, but got: 8
The command "~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"" failed and exited with 3 during .
ERROR: Failed to build gem native extension.
current directory: /nix/store/yrzx9j1awsgajys5r9phy9hq6bm6f8wc-ruby2.4.0-rainbow-2.2.1/lib/ruby/gems/2.4.0/gems/rainbow-2.2.1/ext
/nix/store/6y417nc5913mdqm2dzgv5gk9ipv47myd-ruby-2.4.0/bin/ruby mkrf_conf.rb
current directory: /nix/store/yrzx9j1awsgajys5r9phy9hq6bm6f8wc-ruby2.4.0-rainbow-2.2.1/lib/ruby/gems/2.4.0/gems/rainbow-2.2.1/ext
rake RUBYARCHDIR=/nix/store/yrzx9j1awsgajys5r9phy9hq6bm6f8wc-ruby2.4.0-rainbow-2.2.1/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/rainbow-2.2.1 RUBYLIBDIR=/nix/store/yrzx9j1awsgajys5r9phy9hq6bm6f8wc-ruby2.4.0-rainbow-2.2.1/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/rainbow-2.2.1
sh: rake: command not found
master
has TargetRubyVersion: 2.3
.
Similar issue to: #87 and #88.
Released gem 3.0.0
only includes PR's through #79.
We could use a released gem that includes the newer PR's. We're running into an issue with Ruby 2.1 being targetted from 3.0.0 (even though we don't need it)
See: hanami/cli#54
I'm not sure if it should be 3.0.1
or 3.1.0
, since I don't know of all the changes. Might be better to bump to 3.1.0
to be safe?
Thank you!
Is there a possibility to pass the style as a symbol? I wanted to write a generic method for coloring aka:
def colorize(string, foreground, style = :reset)
Rainbow(string).fg(foreground).style(style)
end
Is there something similar possible?
Would be great if you could offer a support mode, where I can still use the old colorize syntax:
"test".colorize(:blue).on_black
But replace colorize with rainbow in the Gemfile..
Do you think this would be possible?
When I'm using rainbow to add colour to strings that are displayed with printf, it seems to mess up the alignments. Example using irb below. Is there anything I can do to work around this?
stewart@host:~$ irb
ruby-1.9.2-head > require "rainbow"
=> true
ruby-1.9.2-head > printf("%20s\n", "foo")
foo # this is indented by 17 chars (correctly)
=> nil
ruby-1.9.2-head > printf("%20s\n", "foo".foreground(:red))
foo # this is coloured, but only indented by 8 chars
=> nil
ruby-1.9.2-head > printf("%20s\n", "foo".foreground(:red).background(:white))
foo # this is coloured, but it's only indented by 3 chars
=> nil
https://asciinema.org/a/J928KpHoUQ0sl54ulOSOLE71E?rows=20&speed=2.5
All unclaimed recordings (the ones not linked to any user account) are automatically archived 7 days after upload.
In the latest release, v0.60.0
, it appears Rubocop has dropped support for TargetRubyVersion
being less than 2.2
.
This gem is listed as a runtime dependency in rubocop:
https://github.com/rubocop-hq/rubocop/blob/master/rubocop.gemspec#L41
Yet since this project is requiring an older, unsupported ruby version i.e. 2.1:
https://github.com/sickill/rainbow/blob/master/.rubocop.yml#L6
It is preventing my project to build properly in CircleCI whilst using a ruby 2.4.1, throwing the following error:
Error: Unsupported Ruby version 2.1 found in `TargetRubyVersion` parameter (in vendor/bundle/ruby/2.4.0/gems/rainbow-3.0.0/.rubocop.yml). 2.1-compatible analysis was dropped after version 0.58.
Supported versions: 2.2, 2.3, 2.4, 2.5, 2.6
This project last saw care and feeding a long time ago, so, please do a round of linting, if can!
looks like an undeclared rake dependency
> gem install rainbow -v 2.2.1
Fetching: rainbow-2.2.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
/opt/rh/rh-ruby22/root/usr/bin/ruby mkrf_conf.rb
rake RUBYARCHDIR=/home/deployer/.gem/ruby/extensions/x86_64-linux/rainbow-2.2.1 RUBYLIBDIR=/home/deployer/.gem/ruby/extensions/x86_64-linux/rainbow-2.2.1
sh: rake: command not found
rake failed, exit code 127
Gem files will remain installed in /home/deployer/.gem/ruby/gems/rainbow-2.2.1 for inspection.
Results logged to /home/deployer/.gem/ruby/extensions/x86_64-linux/rainbow-2.2.1/gem_make.out
I hope it may be something in my setup but the installation of version 2.2.2 still appears to be broken:
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out
I am trying with a clean Ubuntu 16.04 build and ruby that ships with it.
On my box. 2013 MacBook Pro 13" w/Retina. "foo".foreground(:yellow)
gets you the word "foo" in bright green.
Adding rainbow
~> 2.2
to my Gemfile and running bundle install
, I see:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
can't modify frozen String
Gem files will remain installed in
/var/lib/jenkins/workspace/vendor/gems/ruby/2.4.0/gems/rainbow-2.2.2 for
inspection.
Results logged to
/var/lib/jenkins/workspace/vendor/gems/ruby/2.4.0/extensions/x86_64-linux/2.4.0-static/rainbow-2.2.2/gem_make.out
An error occurred while installing rainbow (2.2.2), and Bundler cannot continue.
Make sure that `gem install rainbow -v '2.2.2'` succeeds before bundling.
I expected it to install properly. Is this a known issue? Is there any other information I can provide to help debug this?
It looks like ansicon is replacing win32console for windows. There is a thread about deprecating win32console.
Ciao!
When an X11 color name method is used, e.g.:
puts Rainbow('something').orange
and the NullPresenter is used, e.g., by redirecting output to /dev/null,
then an exception is raised because the NullPresenter doesn't define the X11 color name methods in the same way as the standard presenter.
A work-around is to not use the X11 name methods, but only use the color method, e.g.:
puts Rainbow('something').color(:orange)
but it seems the NullPresenter should handle this.
Hello there!
My name is Ana. I noted that you use the mutation testing tool mutant in the project.
I am a postdoctoral researcher at the University of Seville (Spain), and my colleagues and I are studying how mutation testing tools are used in practice. With this aim in mind, we have analysed over 3,500 public GitHub repositories using mutation testing tools, including yours! This work has recently been published in a journal paper available at https://link.springer.com/content/pdf/10.1007/s10664-022-10177-8.pdf.
To complete this study, we are asking for your help to understand better how mutation testing is used in practice, please! We would be extremely grateful if you could contribute to this study by answering a brief survey of 21 simple questions (no more than 6 minutes). This is the link to the questionnaire https://forms.gle/FvXNrimWAsJYC1zB9.
Drop me an e-mail if you have any questions or comments ([email protected]). Thank you very much in advance!!
I was installing on the ubuntu/xenial32
vagrant machine which had only ruby and ruby-dev apt packages installed (in addition to the base machine) and i was getting this error below.
running gem install rake
first solved the problem.
i'd submit a PR but i'm not sure where it goes in the specfile -- add_development_dependency, or another type of dependency?
ubuntu@ubuntu-xenial:/vagrant$ sudo gem install rainbow
Building native extensions. This could take a while...
ERROR: Error installing rainbow:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.1/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.1/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/rainbow-2.2.1 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/rainbow-2.2.1
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.1 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/rainbow-2.2.1/gem_make.out
When installing rainbow (From other gems), to vendor bundle. It is copying down the extra files, such as rubocop config e.t.c.
Because these files are copied, they are being lazily loaded in (I'm using a custom rubocop config), when using other gems, there is a conflict in TargetRubyVersion.
This then causes the entire build to crash with something like
error: RuboCop found unsupported Ruby version 2.1 in `TargetRubyVersion` parameter (in vendor/bundle/ruby/2.7.0/gems/rainbow-3.0.0/.rubocop.yml). 2.1-compatible analysis was dropped after version 0.58.
Supported versions: 2.4, 2.5, 2.6, 2.7
rake aborted!
Solution: Remove all non-necessary files in the gemspec. This is a blocking change meaning we've had to uninstall rubocop for now.
Just wondering when 3.0.0 will be released and added to rubygems.org?
The Rake dependency is definitely an issue in our company, as it causes build conflicts.
Rainbow 1.1.2 behavior (wrong! - the variable is changed):
$ gem install rainbow
Fetching: rainbow-1.1.2.gem (100%)
Successfully installed rainbow-1.1.2
1 gem installed
$ irb
ree-1.8.7-2011.03 :001 > require 'rainbow'
=> true
ree-1.8.7-2011.03 :002 > @string = "color-me-blind"
=> "color-me-blind"
ree-1.8.7-2011.03 :003 > @string.color(:yellow)
=> "\e[33mcolor-me-blind\e[0m"
ree-1.8.7-2011.03 :004 > @string
=> "\e[33mcolor-me-blind\e[0m"
Rainbow 1.1.1 behavior (correct - @string is not touched):
$ gem list rainbow
*** LOCAL GEMS ***
rainbow (1.1.1)
$ irb
ree-1.8.7-2011.03 :003 > require 'rainbow'
=> true
ree-1.8.7-2011.03 :004 > @string = "color-me-blind"
=> "color-me-blind"
ree-1.8.7-2011.03 :005 > @string.color(:yellow)
=> "\e[33mcolor-me-blind\e[0m"
ree-1.8.7-2011.03 :006 > @string
=> "color-me-blind"
The tool landscape changes, and Ruby versions with it.
2.5 is the oldest Ruby in support. Ruby support schedule: https://www.ruby-lang.org/en/downloads/branches/
Perhaps we could cut down on the maintenance burden and support only 2.5+?
I get a very terse error message when trying to bundle install rainbow v2.2.1 under Ruby v2.3.3.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
can't modify frozen String
Installing without bundler succeeds:
gem install rainbow -v '2.2.1'
Hello all, love this project.
I was hoping if a pull request that implements a feature to colorize strings based on a regular to match will be accepted.
I was hoping something along the lines of:
{name: "Bob Jones", age: 19}.to_json.red(:matches => /(?<=)name:\s"[^"]*"/) # Highlights all the name properties
This is going to be extremely helpful for logging out JSONs and other streams of data making it easier to identify particular lines dynamically that you don't have control over.
I am willing to work on this pull request.
I am using rainbow to build up tables with possibly colored components, and I need to compute the width of a string that may or may not be rainbowized. I would like to have a method on Rainbow that would return just the wrapped string without any escape codes if the string is already wrapped or just the string otherwise.
Then I could calculate the width of an element that may or may not be wrapped with something like
xx = Rainbow("hello").color(:auqamarine).blink
yy = 'hello'
Rainbow.clear(xx) # => 'hello'
Rainbow.clear(yy) # => 'hello'
Rainbow.clear(xx).length # => 6
Rainbow.clear(yy).length # => 6
In the meantime, any easy way to do this with current gem?
Also, thanks for a great gem.
I find myself using Rainbow for a CLI tool which wants colorized output, and I put it in some colors.
Are these the right colors?, I ask myself. Not every terminal color setup will be good with this.
What if Rainbow had a feature for setting colors in Themes, and I could switch to a new theme programatically?
Can we drop the Ruby versions which are EOLd from our CI matrix?
In this error report the user piped stderr to a file and got unwanted escape codes in the file. I was thinking that Rainbow could disable itself if STDOUT or STDERR is a TTY. Now it only checks STDOUT
.
Looks like @olleolleolle is way head of me :-)
I just ran into this while trying to run Mastodon on JRuby, because it depends on i18n-tasks which depends on rainbow 2.2.2, which still had an extension.
I have gathered that the extension is going away, and a 3.0 release without it may come soon. What can I do to help? :-)
Hello Olle,
Do you think you could show an image how rainbow looks on some terminal, on the main page of rainbow? (Feel free to close this issue here at any moment in time.)
May be other issues too. Running on 2.4.0. Thanks for this awesome gem and your efforts to keep it updated.
Sometimes printing colored strings inserts blank lines afterwards. Any ideas?
Weird thing is that happens only sometimes.
If I remove the coloring, the result is normal.
The project has had a few releases, but no release notes are available (as far as I can tell).
For some reason, gems that include rainbow, like RuboCop, are failing when used with Ruby 2.2.1. This might be a bug with Ruby's 2.2.x refinements feature.
private method `color' called for "An error occurred while Style/MultilineOperationIndentation":String
/Users/justin/.rvm/gems/ruby-2.2.1@madrone/gems/rubocop-0.30.1/lib/rubocop/cop/team.rb:93:in `block (2 levels) in process_commissioner_errors'
Actually, I'm seeing this with Ruby 2.1.5. Researching.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.