| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,4 @@ | |||
| 1 | + sudo: required | ||
| 1 | 2 | language: python | |
| 2 | 3 | python: | |
| 3 | 4 | - 2.6 | |
@@ -6,14 +7,14 @@ python: | |||
| 6 | 7 | - 3.4 | |
| 7 | 8 | - 3.5 | |
| 8 | 9 | before_install: | |
| 9 | - - sudo apt-get install software-properties-common | ||
| 10 | 10 | - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" | |
| 11 | - - sudo apt-get -qq update | ||
| 12 | - - sudo apt-get -qq install mono-devel mono-gmcs mono-xbuild nunit-console | ||
| 13 | - - sudo mozroots --import --machine --sync | ||
| 14 | - - yes | sudo certmgr -ssl -m https://go.microsoft.com | ||
| 15 | - - yes | sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net | ||
| 16 | - - yes | sudo certmgr -ssl -m https://nuget.org | ||
| 11 | + - sudo apt-get install software-properties-common | ||
| 12 | + - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | ||
| 13 | + - echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.2.4.4 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list | ||
| 14 | + - echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list | ||
| 15 | + - sudo apt-get update | ||
| 16 | + - sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono nunit-console | ||
| 17 | + | ||
| 17 | 18 | install: | |
| 18 | 19 | - pip install six | |
| 19 | 20 | - pip install pycparser | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,12 +14,12 @@ written, documented and tested pull requests are encouraged. | |||
| 14 | 14 | ## Making Changes | |
| 15 | 15 | ||
| 16 | 16 | * Create a topic branch from where you want to base your work. | |
| 17 | - * This is usually the develop branch. | ||
| 17 | + * This is usually the master branch. | ||
| 18 | 18 | * Only target release branches if you are certain your fix must be on that | |
| 19 | 19 | branch. | |
| 20 | - * To quickly create a topic branch based on develop; `git checkout -b | ||
| 21 | - fix/develop/my_contribution develop`. Please avoid working directly on the | ||
| 22 | - `master` branch. | ||
| 20 | + * To quickly create a topic branch based on master; `git checkout -b | ||
| 21 | + fix/develop/my_contribution master`. Please avoid working directly on the | ||
| 22 | + `master` branch for anything other than trivial changes. | ||
| 23 | 23 | * Make commits of logical units. | |
| 24 | 24 | * Check for unnecessary whitespace with `git diff --check` before committing. | |
| 25 | 25 | * Make sure your commit messages are in the proper format. | |
@@ -29,7 +29,7 @@ written, documented and tested pull requests are encouraged. | |||
| 29 | 29 | ||
| 30 | 30 | ## Submitting Changes | |
| 31 | 31 | ||
| 32 | - * Push your changes to a topic branch in your fork of the repository. | ||
| 32 | + * Merge your topic branch into master and push to your fork of the repository. | ||
| 33 | 33 | * Submit a pull request to the repository in the pythonnet organization. | |
| 34 | 34 | * After feedback has been given we expect responses within two weeks. After two | |
| 35 | 35 | weeks we may close the pull request if it isn't showing any activity. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,18 +43,20 @@ static void Main(string[] args) | |||
| 43 | 43 | Console.WriteLine(sin(5)); | |
| 44 | 44 | double c = np.cos(5) + sin(5); | |
| 45 | 45 | Console.WriteLine(c); | |
| 46 | + /* this block is temporarily disabled due to regression | ||
| 46 | 47 | dynamic a = np.array(new List<float> { 1, 2, 3 }); | |
| 47 | 48 | dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32)); | |
| 48 | 49 | Console.WriteLine(a.dtype); | |
| 49 | 50 | Console.WriteLine(b.dtype); | |
| 50 | 51 | Console.WriteLine(a * b); | |
| 52 | + */ | ||
| 51 | 53 | Console.ReadKey(); | |
| 52 | 54 | } | |
| 53 | 55 | } | |
| 54 | 56 | ``` | |
| 55 | 57 | outputs: | |
| 56 | 58 | ``` | |
| 57 | - 1.0 | ||
| 59 | + 1.0 | ||
| 58 | 60 | -0.958924274663 | |
| 59 | 61 | -0.6752620892 | |
| 60 | 62 | float64 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,5 @@ | |||
| 1 | - # =========================================================================== | ||
| 2 | - # This software is subject to the provisions of the Zope Public License, | ||
| 3 | - # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. | ||
| 4 | - # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
| 5 | - # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 6 | - # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
| 7 | - # FOR A PARTICULAR PURPOSE. | ||
| 8 | - # =========================================================================== | ||
| 9 | - | ||
| 10 | 1 | import clr | |
| 2 | + | ||
| 11 | 3 | SWF = clr.AddReference("System.Windows.Forms") | |
| 12 | 4 | print (SWF.Location) | |
| 13 | 5 | import System.Windows.Forms as WinForms | |
@@ -31,7 +23,7 @@ def __init__(self): | |||
| 31 | 23 | self.button.Size = Size(820, 20) | |
| 32 | 24 | self.button.TabIndex = 2 | |
| 33 | 25 | self.button.Text = "Click Me!" | |
| 34 | - | ||
| 26 | + | ||
| 35 | 27 | # Register the event handler | |
| 36 | 28 | self.button.Click += self.button_Click | |
| 37 | 29 | ||
@@ -41,7 +33,7 @@ def __init__(self): | |||
| 41 | 33 | self.textbox.TabIndex = 1 | |
| 42 | 34 | self.textbox.Size = Size(1260, 40) | |
| 43 | 35 | self.textbox.Location = Point(160, 24) | |
| 44 | - | ||
| 36 | + | ||
| 45 | 37 | # Add the controls to the form | |
| 46 | 38 | self.AcceptButton = self.button | |
| 47 | 39 | self.Controls.Add(self.button); | |
@@ -66,4 +58,3 @@ def main(): | |||
| 66 | 58 | ||
| 67 | 59 | if __name__ == '__main__': | |
| 68 | 60 | main() | |
| 69 | - | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,3 @@ | |||
| 1 | - # =========================================================================== | ||
| 2 | - # This software is subject to the provisions of the Zope Public License, | ||
| 3 | - # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. | ||
| 4 | - # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
| 5 | - # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| 6 | - # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
| 7 | - # FOR A PARTICULAR PURPOSE. | ||
| 8 | - # =========================================================================== | ||
| 9 | - | ||
| 10 | 1 | import clr | |
| 11 | 2 | import System.Windows.Forms as WinForms | |
| 12 | 3 | from System.Drawing import Color, Size, Point | |
@@ -28,7 +19,6 @@ def __init__(self): | |||
| 28 | 19 | self.splitter2 = WinForms.Splitter() | |
| 29 | 20 | self.panel1 = WinForms.Panel() | |
| 30 | 21 | ||
| 31 | - | ||
| 32 | 22 | # Set properties of TreeView control. | |
| 33 | 23 | self.treeView1.Dock = WinForms.DockStyle.Left | |
| 34 | 24 | self.treeView1.Width = self.ClientSize.Width / 3 | |
@@ -48,14 +38,14 @@ def __init__(self): | |||
| 48 | 38 | ||
| 49 | 39 | # Set properties of Panel's Splitter control. | |
| 50 | 40 | self.splitter2.Dock = WinForms.DockStyle.Top | |
| 51 | - | ||
| 41 | + | ||
| 52 | 42 | # Width is irrelevant if splitter is docked to Top. | |
| 53 | 43 | self.splitter2.Height = 3 | |
| 54 | - | ||
| 44 | + | ||
| 55 | 45 | # Use a different color to distinguish the two splitters. | |
| 56 | 46 | self.splitter2.BackColor = Color.Blue | |
| 57 | 47 | self.splitter2.TabIndex = 1 | |
| 58 | - | ||
| 48 | + | ||
| 59 | 49 | # Set TabStop to false for ease of use when negotiating UI. | |
| 60 | 50 | self.splitter2.TabStop = 0 | |
| 61 | 51 | ||
@@ -67,7 +57,7 @@ def __init__(self): | |||
| 67 | 57 | ||
| 68 | 58 | # Set TabStop to false for ease of use when negotiating UI. | |
| 69 | 59 | self.splitter1.TabStop = 0 | |
| 70 | - | ||
| 60 | + | ||
| 71 | 61 | # Add the appropriate controls to the Panel. | |
| 72 | 62 | for item in (self.richTextBox1, self.splitter2, self.listView1): | |
| 73 | 63 | self.panel1.Controls.Add(item) | |
@@ -87,12 +77,11 @@ def Dispose(self): | |||
| 87 | 77 | WinForms.Form.Dispose(self) | |
| 88 | 78 | ||
| 89 | 79 | ||
| 90 | - | ||
| 91 | 80 | def main(): | |
| 92 | 81 | app = Splitter() | |
| 93 | 82 | WinForms.Application.Run(app) | |
| 94 | 83 | app.Dispose() | |
| 95 | 84 | ||
| 85 | + | ||
| 96 | 86 | if __name__ == '__main__': | |
| 97 | 87 | main() | |
| 98 | - | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments