pipeline

How to stop Get-Content -wait after I find a particular line in the text file using powershell? Exit a pipeline on demand

£可爱£侵袭症+ 提交于 2020-03-11 14:52:34
问题 I am using this below script in Powershell (Version is 5.1): Get-Content -Path path\to\text\file\to\be\read.txt -Wait Now this continues to read even after the file is getting no update. How can I stop after I find particular line in the text file? Is there any other way to stop this on condition? 回答1: You can pipe the output and use foreach to check each line, if the line equals a certain string you can use break to stop the command: Get-Content path\to\text\file\to\be\read.txt -wait | % {$_

What's wrong with this GStreamer pipeline?

好久不见. 提交于 2020-03-06 02:59:05
问题 I'm sure I've had this pipeline working on an earlier Ubuntu system I had set up (formatted for readability): playbin uri=rtspt://user:pswd@192.168.xxx.yyy/ch1/main video-sink='videoconvert ! videoflip method=counterclockwise ! fpsdisplaysink' Yet, when I try to use it within my program, I get: Missing element: H.264 (Main Profile) decoder WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment

在rails3.1使用assets pipeline with compass

天涯浪子 提交于 2020-03-01 14:19:57
assets pipeline是rails3.1中引入的重要特性之一,它的作用是让我们工程目录下面凌乱的js,css等文件,有序摆放。例如: 我们自己维护的、而且只在当前应用中使用的js、css可以放在app/assets目录中 我们自己维护的、但是会在N个应用中共享的js、css可以放在lib/assets目录中 我们自己不维护的js、css可以放在vendor/assets目录中 分门别类的好处是让我们可以在第一时间找到对应的js、css文件,同理可以扩展到其他的格式的文件,例如image。另外例如存在一个文件是app/assets/stylesheets/somecssfile.css ,那么我们就可以通过http://www.example.com/assets/somecssfile.css 这个链接访问到上面那个文件。 rails怎么识别这些路径呢?原来是在Rails.application.config.asserts.paths这个变量中定义的,我们可以在config/application.rb这个文件中修改,自定义一个assets目录,例如/home/myname/**/*/lib/assets,那么这个目录中的js、css文件同样可以使用 http://www.example.com/assets/stylesheets/anothercssfile.css

read corpus of text files in spacy

荒凉一梦 提交于 2020-02-24 08:45:09
问题 All the examples that I see for using spacy just read in a single text file (that is small in size). How does one load a corpus of text files into spacy? I can do this with textacy by pickling all the text in the corpus: docs = textacy.io.spacy.read_spacy_docs('E:/spacy/DICKENS/dick.pkl', lang='en') for doc in docs: print(doc) But I am not clear as to how to use this generator object (docs) for further analysis. Also, I would rather use spacy, not textacy. spacy also fails to read in a single

read corpus of text files in spacy

谁都会走 提交于 2020-02-24 08:44:09
问题 All the examples that I see for using spacy just read in a single text file (that is small in size). How does one load a corpus of text files into spacy? I can do this with textacy by pickling all the text in the corpus: docs = textacy.io.spacy.read_spacy_docs('E:/spacy/DICKENS/dick.pkl', lang='en') for doc in docs: print(doc) But I am not clear as to how to use this generator object (docs) for further analysis. Also, I would rather use spacy, not textacy. spacy also fails to read in a single

How do I get my Azure DevOps Pipeline build to fail when my linting script returns an error?

℡╲_俬逩灬. 提交于 2020-02-22 03:13:41
问题 I am using the Azure Pipelines GitHub add-on to ensure that pull requests pass my linting. However, I have just made a test pull request which fails my linting, but the Azure Pipeline succeeds. Here is my azure-pipelines.yml # Node.js with React # Build a Node.js project that uses React. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript trigger: - master pool: vmImage: 'Ubuntu-16.04' steps: - task:

How do I get my Azure DevOps Pipeline build to fail when my linting script returns an error?

淺唱寂寞╮ 提交于 2020-02-22 03:02:06
问题 I am using the Azure Pipelines GitHub add-on to ensure that pull requests pass my linting. However, I have just made a test pull request which fails my linting, but the Azure Pipeline succeeds. Here is my azure-pipelines.yml # Node.js with React # Build a Node.js project that uses React. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript trigger: - master pool: vmImage: 'Ubuntu-16.04' steps: - task:

Unexpected results when reusing a custom object for the pipeline

丶灬走出姿态 提交于 2020-02-04 17:00:30
问题 A while ago I changed my Join-Object cmdlet which appeared to cause a bug which didn’t reveal in any of my testing. The objective of the change was mainly code minimizing and trying to improve performance by preparing a custom PSObject and reusing this in the pipeline. As the Join-Object cmdlet is rather complex, I have created a simplified cmdlet to show the specific issue: (The PowerShell version is: 5.1.16299.248 ) Function Test($Count) { $PSObject = New-Object PSObject -Property @{Name =

Unexpected results when reusing a custom object for the pipeline

天大地大妈咪最大 提交于 2020-02-04 17:00:16
问题 A while ago I changed my Join-Object cmdlet which appeared to cause a bug which didn’t reveal in any of my testing. The objective of the change was mainly code minimizing and trying to improve performance by preparing a custom PSObject and reusing this in the pipeline. As the Join-Object cmdlet is rather complex, I have created a simplified cmdlet to show the specific issue: (The PowerShell version is: 5.1.16299.248 ) Function Test($Count) { $PSObject = New-Object PSObject -Property @{Name =

Step references task InvokeRESTAPI at version 1.152.1 which is not valid for the given job target

梦想与她 提交于 2020-01-25 10:40:28
问题 I have an Azure pipeline which needs to send a REST request to an endpoint. I am trying to use the built in task InvokeRESTAPI@1 to do this, but it errors when running on Azure DevOps. Script: --- trigger: batch: true branches: include: - master pr: - master stages: - stage: Run_Tests jobs: - job: RA001 pool: windows-server steps: - task: InvokeRESTAPI@1 displayName: "Run Test" inputs: connectionType: 'connectedServiceName' serviceConnection: 'myconnection' method: 'PUT' headers: | {