I hereby claim:
- I am liluo on github.
- I am liluo (https://keybase.io/liluo) on keybase.
- I have a public key ASD4tzuHo4fZ3OJyRF63A0f2RA21Gogwuzsml8tVPQ1-sAo
To claim this, I am signing this object:
#!/bin/bash | |
source /home/project/myenv/bin/activate | |
cd /home/project/server | |
PID=$(ps aux | grep 'uvicorn myapp:app' | grep -v grep | awk {'print $2'} | xargs) | |
if [ "$PID" != "" ] | |
then | |
kill -9 $PID | |
PID=$(ps aux | grep '/home/project/myenv/bin/python -c from multiprocessing' | grep -v grep | awk {'print $2'} | xargs) | |
if [ "$PID" != "" ] | |
then |
#!/bin/bash | |
source /home/project/myenv/bin/activate | |
cd /home/project/server | |
PID=$(ps aux | grep 'uvicorn myapp:app' | grep -v grep | awk {'print $2'} | xargs) | |
if [ "$PID" != "" ] | |
then | |
kill -9 $PID | |
sleep 2 | |
echo "" > nohup.out | |
echo "Restarting FastAPI server" |
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
protocol Channel: IteratorProtocol { | |
func send(_ value: Element?) | |
} | |
/// A blocking channel for sending values. | |
/// | |
/// `send` and `receive` must run in separate separate execution contexts, otherwise you get a deadlock. | |
final class BlockingChannel<A>: Channel { |
I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.
For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.
Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.
One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss
{ | |
"clusters": [ | |
{ | |
"account": "g_k8s_dev0", | |
"application": "treasureship", | |
"capacity": { | |
"desired": 1, | |
"max": 3, | |
"min": 2 | |
}, |
SPC s c remove highlight | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| | |
| ~SPC f c~ | copy current file to a different location | | |
| ~SPC f C d~ | convert file from unix to dos encoding | | |
| ~SPC f C u~ | convert file from dos to unix encoding | |
function rc { | |
release_branch=`git branch | grep release/ | sort -r | head -n 1 | sed -e s/'* '// | awk '{print $1}'` | |
diff_branchs="master..$release_branch" | |
echo -e "\e[34;5;204mRelease branch: $release_branch, diff: $diff_branchs, commits: \e[0m" | |
text=`git log $diff_branchs --pretty=format:'- %s by @%an' --reverse | grep -v Merge | sort | uniq` | |
echo $text | |
} |
Thread-9jnxc | |
looping.rb:17:in `block (2 levels) in <main>' | |
\_ looping.rb:15:in `each' | |
\_ looping.rb:15:in `block in <main>' | |
\_ looping.rb:22:in `call' | |
\_ looping.rb:22:in `condition' | |
\_ looping.rb:26:in `looping' | |
\_ looping.rb:31:in `<main>' |