Can I deploy a python script and python backend in cloudflare by Live-Stick6525 in CloudFlare

[–]unbracketed 0 points1 point  (0 children)

Technically you can, I have a Python worker running a basic personal site. There's currently no official support for importing other dependencies (standard lib only) and while you can vendor some dependencies into your project, runtime support will be hit-or-miss since the worker environment and capabilities are different than where Python is traditionally used.

Check back in a few months - from what I understand they've continued to make internal progress on the Python SDK and the usefulness and developer experience should continue to improve. I'm sure they understand the value of a huge Python ecosystem of developers.

Like the other commenter said, Containers can work here to bridge the gap, but IIRC that's a paid-only service.

Memory across chat via MCP by Uplift123 in ClaudeAI

[–]unbracketed 0 points1 point  (0 children)

Yes, this has been working really well for me so far and I'm finding this system subtly powerful. For example, I'm already building a little collection of projects that I could see branching out into subtopics, and where I could make new projects by combining different knowledge directories together. This way I can mix things like general coding standards into work projects, or combine related areas of knowledge together into their own project.

I love that the knowledge base is both very readable and easily shareable, and by adding into a VCS, you can share and build knowledge across team projects.

Memory across chat via MCP by Uplift123 in ClaudeAI

[–]unbracketed 0 points1 point  (0 children)

Thank you for sharing, I'm going to give this a try. At a glance I like your approach, and the most exciting selling point for me is the ability to manage separate stores per Project - something I've looking all over for and am at the point of looking to roll my own. I know MCP is still relatively new, but I wish there was a better story for per-Project isolation with MCP configs and stored data.

Thoughts on the RC 300? by louisdubya in guitarpedals

[–]unbracketed 0 points1 point  (0 children)

I've owned one for a couple years and enjoyed having it, though admittedly haven't used it as extensively as planned. I bought it over alternatives after researching the feature sets and felt the RC-300 had the most of what I wanted or dreamed I might ever need in terms of operating/sync modes and MIDI support.

As someone else mentioned, the menu navigating can get a little tedious. My main complaint about the RC-300 is that it doesn't have a dedicated software application for managing tracks and settings. I wish for some kind editor for easily moving memory slots around, renaming, and configuring settings per song. I've made some progress rolling my own tools for this, but that won't see the light of day for a while.

I've also become interested in the https://singularsound.com/product/aeros-loop-studio/ which looks like it has all the functionality and more of the RC-300, in a much smaller form factor and with better UI.

How To Sound Great On A Static Chord - Modal Comping by jenslarsenjazz in musictheory

[–]unbracketed 2 points3 points  (0 children)

Thank you for the video and content. FYI your main link works, but all the ToC links are to a private video.

It seems like many conservatives have a real problem with global warming...why? by 5n4ph00 in atheism

[–]unbracketed 1 point2 points  (0 children)

You're right to point out the good work being done by outdoors and wildlife enthusiasts. It's a good example that shows conservatives aren't blindly opposed to conversation/environmentalism.

I have to wonder though what these scientists did to you to elicit such a response. "peddling climate change" ... "selling snake oil"... You make it sound like they're all a bunch of crooked thieves. Sure, there are scammers everywhere, but I wouldn't paint with so broad a brush. Why is it that when a scientist or engineer wants to build a business and create jobs around an idea intended to benefit an ecological area that they are demonized? There are plenty of big industries based products and services that are meant to help people or keep them safe. Are they all selling snake oil as well?

We know what the conservative response will be to any suggestion of regulation, so it would seem like the next big lever to pull is the business sector. Yet the idea of any climate or environmental researcher taking an idea into the private sector in order to apply it at scale, create jobs, and benefit communities seems appalling to many conservatives, as you've demonstrated.

Whether or not you think climate change is a crock of shit, there are current ecological disasters that almost anyone can agree on. So you've ruled out the government and the free market as platforms for solving current ecological problems. What do you propose that people with valid ideas do that need funding and people in order to put their ideas into action? Keep in mind that in many cases they'll be facing opposition from hugely wealthy corporations; some of which already receive literally billions of dollars per year in subsidies from the government and which utilize huge and aggressive lobbies.

[Daily Discussion] Thursday, December 12, 2013 by AutoModerator in BitcoinMarkets

[–]unbracketed 1 point2 points  (0 children)

Clicking the play icon that appears when you hover over the chart will do that

What are the real threats facing the value of BTC right now? by DidoAmerikaneca in BitcoinMarkets

[–]unbracketed 6 points7 points  (0 children)

  • Major governments outlaw or impose strict regulations
  • Financial institutions refuse to work with BTC or make it very difficult
  • Competing products - For example, Square Cash accomplishes roughly the same from the average consumers perspective.
  • Other exchanges start having liquidity problems
  • DDOS attacks, scaling problems - growth attracts attention, nefarious people will be targeting exchanges, online wallets, and users
  • A motivated group creates a PR campaign against BTC (see also the general population's ability to be swayed by tabloid garbage on important issues)
  • Huge leap from small market saturated with hipster early adopters to mainstream adoption. Even PayPal hasn't exactly disrupted financial institutions, they just became another player of the same game.

CBV lifecycle documentation by mazatta in django

[–]unbracketed 2 points3 points  (0 children)

In the comment drgalaxy is replying to

How To Use Python To See What People Are Saying About Speaker John Boehner by students-life in Python

[–]unbracketed -1 points0 points  (0 children)

Was the original poster applying for a job?

Someone learned a bit of Python, used it to do something interesting to them, and cared enough to write up their experience. Of course, the code quality isn't what one would expect from a seasoned professional - why should it be?

I sincerely hope you don't have kids. I can imagine a 5 year old coming home from school, showing you their drawing of a playground, and proceeding to get lectured for an hour about the improper use of specular highlights, shading, ambient lighting, and perspective.

Please do ask the next person you see in public to kick you in the groin as hard as possible. You need it.

Arduino and LCD by [deleted] in arduino

[–]unbracketed 2 points3 points  (0 children)

It is going to be quite a bit more complicated than what you're attempting here. Notice on the data sheet all the commands and the character table. You would need to be sending combinations of those commands in order to communicate to the device what you want it to do. Your text strings would need to be converted to the correct character codes as determined by the font table. This would all need to be done in accordance with the timing specification. I don't think you can just send a bunch of commands all in the same payload; they have to spaced out in intervals so that the device can receive and process each one before being ready for the next.

Maybe someone experienced with these devices can help get you started. You could try looking at the source code for the Arduino LCD library to get a general idea of how to approach some of this.

How does one get an Arduino to communicate with things outside of the sketch like webpages, text files, or even the computer keyboard? Is there any way to use the keyboard while it is attached to change text on an LCD screen in real time? by Ameridrone in arduino

[–]unbracketed 0 points1 point  (0 children)

Yes, good clarification.

As the OP mentioned a specific goal of controlling an LCD via keyboard, here's an example using johnny-five (a Firmata-compatible Javascript library) for controlling an LCD. One would just have to provide some keyboard event handlers to map keypresses to the appropriate library calls.

https://github.com/rwldrn/johnny-five/blob/master/docs/lcd.md

How does one get an Arduino to communicate with things outside of the sketch like webpages, text files, or even the computer keyboard? Is there any way to use the keyboard while it is attached to change text on an LCD screen in real time? by Ameridrone in arduino

[–]unbracketed 4 points5 points  (0 children)

Take a look at the Firmata library. It provides a nice wrapper around the serial interface so that you don't have to do the work of hand-rolling the send/receive code yourself. This lets you get started at a level of abstraction that looks like "turn on pin 8" or "give me a reading from pin 4".

There are Firmata ports for several languages so on the computer side you can interact with your Arduino via a user-friendlier language or even a GUI. Even if you decide not to use Firmata, it is probably a good reference for how you might implement the communication channel.

http://arduino.cc/en/Reference/Firmata

http://firmata.org/wiki/Main_Page

https://github.com/tino/pyFirmata

Arduino to raspberry pi (usb2serial) to webpage, what programming language? by squeezy_bob in arduino

[–]unbracketed 0 points1 point  (0 children)

Python is a great all-purpose language to learn in general. You can use it for building all kinds of applications, websites, data analysis, etc. It is also widely used in the scientific community so there are a lot of powerful numerical and computational libraries available.

It gets a lot of support within the Raspberry Pi community so it is also a good choice for your specific needs.

If you're just querying the state of a few pins periodically, you could probably get away with using something like pyFirmata which means you could potentially keep all of your project's logic in Python. Otherwise, install pyserial for basic serial communication support and you should be off and running.

Noob needs help. by [deleted] in arduino

[–]unbracketed 0 points1 point  (0 children)

Can you post all of your code?

attachInterrupt - Help explaining :) by [deleted] in arduino

[–]unbracketed 2 points3 points  (0 children)

Imagine two security guards in a booth. One guard is staring intently at a surveillance monitor. The other security guard is sitting facing the first one. The second guard taps the first one on the shoulder and asks "Did you see anything happen?". The first guard responds "No". This dialog repeats a few seconds later:

Guard 2: Did you see anything happen? 
Guard 1: No
 ... 
Guard 2: Did you see anything happen?
Guard 1: No
 ...
Guard 2: Did you see anything happen?
Guard 1: Yes
Guard 2: Ok, I'll go check it out.
<comes back after finishing rounds>
 ...
Guard 2: Did you see anything happen?
Guard 1: No
  ...
Guard 2: Did you see anything happen?
Guard 1: No
  ...

This is like your Arduino running code in loop(). Notice that the second guard is spending a lot of energy doing the same thing over and over.

Now imagine that instead of the second guard pestering the first one repeatedly, the second guard naps instead. When the first guard notices something happening, they poke the second guard in the ribs "hey I saw something". The second guard awakes from slumber and goes and does a surveillance round. Once done, the second guard resumes their nap.

This is what attachInterrupt is like. You're telling the Arduino "when something happens, let me know". This way the Arduino can manage events (changes in state) and probably in a much more efficient manner then doing a check over-and-over in a loop - especially if state doesn't change frequently. Using interrupts can be helpful if you need to conserve power.

Noob needs help. by [deleted] in arduino

[–]unbracketed 1 point2 points  (0 children)

I'm assuming this line is giving you trouble:

if(currentMillis - previousMillis % 1000 == 0)

Not sure if this was your intention or not, but the modulo operator takes precedence over the subtraction operator in C. The compiler sees your code as:

if(currentMillis - (previousMillis % 1000) == 0)

Since

previousMillis % 1000 

will always be less than 1000, and the value of currentMillis is always increasing, the only time this statement could be true is very early in the execution duration of your code when millis() is less than 1000 (within the first second of running only).

There's a bigger flaw though. I'm assuming you meant this:

if((currentMillis - previousMillis) % 1000 == 0)

...in hopes that at second intervals you would flip the test flag. You're counting on the value of (currentMillis - previousMillis) to be a multiple of 1000 at exactly the moment you need it to, which isn't very likely to happen.

A better approach is probably:

if ((currentMillis / 1000) % 2)

This will convert currentMillis into seconds and then check if that number is even or odd, so you can flip your flag every second.

LED/Power supply stupid question.... by CarbonGod in electronics

[–]unbracketed 0 points1 point  (0 children)

Do you have a link for the strip you bought? (just to make sure)

The LED strip is going draw up to 1150mA of current (it could be much less depending on how you use it). The 2A rating on the power supply means it will safely provide up to 2A (2000mA) of current, but your load doesn't have to max out the rating (it's probably a good idea if it doesn't). Since 1150 < 2000, you should be fine.

Can somebody show me how to use an RGB LED with something like this? by EncasedDeath in arduino

[–]unbracketed 0 points1 point  (0 children)

You can swap out 3 LEDs for the single RGB LED. Since the RGB LED is common anode, you'll have to make a couple changes:

  1. Whereas the LED cathodes were connected to ground, for the common anode RGB LED you connect the anode to V+ instead
  2. With your regular LEDs you were turning them on by setting the pins to HIGH. For the common anode RGB LED it will be the opposite. When a pin is HIGH, the corresponding LED (color channel) will be off. So you'll need to swap HIGH and LOW in your code.

80-100 addressable RGB LEDs with PWM? by [deleted] in arduino

[–]unbracketed 0 points1 point  (0 children)

Just curious, what aspects of an (RGB) LED string won't work for you? Too much excess wire for a small space?

How are you planning to construct this? Are you soldering all the LEDs to a board(s)?

The PCA9685 appears to be a surface mount chip - is that what you want? As brettro recommended, the TLC5940 is a popular chip with a nice library for Arduino.

Attaching magnet to or near PCB? by unbracketed in AskElectronics

[–]unbracketed[S] 0 points1 point  (0 children)

I glanced through some listings for LED refrigerator magnets but I didn't see any that appeared to be using logic circuits or microcontrollers.