Programming, computers, etc. [Serious]
- atomtengeralattjaro
- Site Admin
- Posts: 37528
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
Re: Programming, computers, etc. [Serious]
What do you mean? From C#? Should be possible, saw some examples when I googled it.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- atomtengeralattjaro
- Site Admin
- Posts: 37528
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
Re: Programming, computers, etc. [Serious]
I meant in general, I know i could google this, but i'm lazy. So you need a python runtime thing to be installed, and then just run your thing? Or is there something special? Because I'm not sure why you need to start it from .NET then, if there isn't anything to it.
Anyway, System.Diagnostics.Process.Start(filename) will start things.
Anyway, System.Diagnostics.Process.Start(filename) will start things.
- Arkannine
- ASDF Warlord
- Posts: 15525
- Joined: Tue Oct 28, 2008 9:21 pm
- Location: I'm on a boat
- Pronouns: Don't even try, I'm offended already
Re: Programming, computers, etc. [Serious]
Oh, I've been learning Python and it's fantastic for rapid development and simple scripts. There is a library/function for anything low-level you can think of, so you don't have to worry at all about that and it's really easy to get going. Most of these libraries are built-in, and the ones that aren't are extremely simple to include; there's pip, which is similar to a package manager in which you just
and then you just have to
at the top of your code, no version complications, no file location complications, no having to fiddle with any settings to get it working, it just works out of the box. Simply amazing.
Then, if you're on Linux/Mac or you're on Windows and the installation is in your Path variables just
You can also double-click it but it has that small issue also present in whatever language where the program will exit immediately on completion, so if it's a terminal application it'll close as soon as it's done which might not leave time to read stuff if you need to and there wasn't a blocking input request at the end of the program.
Also because it's interpreted it means anything you write is multi-platform out of the box! I think there's some modules that aren't, if they depend on calls to external languages, but I never had to use one of those. It's so easy I actually just keep my .py files in my Dropbox folder and edit and run them across OS's.
Code: Select all
pip install numpy
Code: Select all
import numpy
You must have a Python interpreter installed (that is, the official one you download from the python website or your package manager).atomtengeralattjaro wrote:how do you run a python script?
Then, if you're on Linux/Mac or you're on Windows and the installation is in your Path variables just
Code: Select all
python script.py
Also because it's interpreted it means anything you write is multi-platform out of the box! I think there's some modules that aren't, if they depend on calls to external languages, but I never had to use one of those. It's so easy I actually just keep my .py files in my Dropbox folder and edit and run them across OS's.
assdef wrote:I've seen a number of Cocks in my days.
Re: Programming, computers, etc. [Serious]
Arkannine is correct on how it runs. I was thinking of having an all-in one program that could do a lot of stuff we need for work. Having the python script be something external kinda defeats the purpose. There's also the issue that the python script depends on a couple of extra packages I installed through pip. Which is a rather painful thing to do for most people as it needs Cntlm to use the proxy at work. I'd rather avoid doing that if it's something I'm to give to my colleagues.atomtengeralattjaro wrote:I meant in general, I know i could google this, but i'm lazy. So you need a python runtime thing to be installed, and then just run your thing? Or is there something special? Because I'm not sure why you need to start it from .NET then, if there isn't anything to it.
Anyway, System.Diagnostics.Process.Start(filename) will start things.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
I believe you can embed Python in programs, so you might want to look into that.Shai'tan wrote:Figured it out! Managed to do it in Python with Requests and NLTLM, so now I just need to reproduce it in C# or call the python script from C#.
Glad you got it figured out!
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Re: Programming, computers, etc. [Serious]
Might look into that as it was a lot easier to do than it seems to be in C#. Taking a little break from that though, now working on communicating with Active Directory, which is one of the reasons I want to build this in C# as well. (It looks to be a lot easier to do this in C#).
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
It might be fun to have a program that's a Frankensteined together C# and Python program.
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Re: Programming, computers, etc. [Serious]
Hehe, might be. Just worried about having to download extra stuff for python because that is not easy.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
Well, however you get it to work, I hope it's not too much trouble in the long run.
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Re: Programming, computers, etc. [Serious]
True. If I can get it to work that's the main point anyway.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- Arkannine
- ASDF Warlord
- Posts: 15525
- Joined: Tue Oct 28, 2008 9:21 pm
- Location: I'm on a boat
- Pronouns: Don't even try, I'm offended already
Re: Programming, computers, etc. [Serious]
Have you heard about Cython? I never used it, but my impression is that it converts Python into C and then compiles into bytecode. Might be worth a look.Shai'tan wrote:Hehe, might be. Just worried about having to download extra stuff for python because that is not easy.
assdef wrote:I've seen a number of Cocks in my days.
Re: Programming, computers, etc. [Serious]
Hmm, think I have heard of it, but never used it. I'll look into it, thanks!
Also, you don't need the " around the url.
Also, you don't need the " around the url.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
The other day, I discovered that one of my coworkers knows about and uses one of my favorite scripting languages that no one has heard about. And he's done stuff that's a lot more complicated than anything I've ever done with it. Thousands of lines of code, with GUI, etc. It was fun to talk about it with him when just about everyone else goes "What is that?"
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- atomtengeralattjaro
- Site Admin
- Posts: 37528
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
Re: Programming, computers, etc. [Serious]
Encoding bullcrap:
�
I see this black diamond shape with a white question mark in it a lot in this old article. Is there anything to be done about this, or is it a lost cause? Seems to be in place of punctuation.
�
I see this black diamond shape with a white question mark in it a lot in this old article. Is there anything to be done about this, or is it a lost cause? Seems to be in place of punctuation.
- ThingerDudes
- ASDF Warlord
- Posts: 20958
- Joined: Sun Apr 12, 2009 4:12 am
- Location: near, far, wherever i are
Re: Programming, computers, etc. [Serious]
Not sure what the best way to go about doing this is but if you can get the hex values of the characters and put that into something like this maybe that would help?
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
It is indeed an encoding issue. The page is encoded in ANSI (Windows-1252), but is being displayed as though it were encoded in UTF-8. What you're seeing is the "replacement character," which is often shown when the current encoding can't properly render the data as characters. The page source doesn't declare an encoding (aka "charset") in the metadata, so it's up to the browser to guess. If you go to "View" -> "Text Encoding" -> "Western" (Firefox) or "More Tools" -> "Encoding" -> "Western (Windows-1252)" (Chrome), it should correct any issues.
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- atomtengeralattjaro
- Site Admin
- Posts: 37528
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
Re: Programming, computers, etc. [Serious]
Thanks AF! Super.
I didn't even think to look anywhere near there, as I usually have the menu bar hidden in firefox..
I didn't even think to look anywhere near there, as I usually have the menu bar hidden in firefox..
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
No problem! I may use this website as a real world example of character encoding issues.
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
Someone did a DDoS on a DNS, and now a bunch of stuff I need to access to do my job effectively are unavailable. So I'm here.
Here's an article about the attack.
Here's an article about the attack.
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.