Adjective Transformation in German
These days I was learning German grammar of transforming adjective. I learnt so many rules like, when the non which you describe is a accusative, if it’s male word append
en, if it’s female or plural append
e, if it’s neutral append
es. But when the article is
keine and the word is plural, append
en For nominative and dative phrase …..
Okay… My mood turns into
So I made a small program in Python to help me ‘remember’ which transformation of adjective to use (ノД`)ハァ.
def adj_transformation(adj, article, sex, case, plural): if case == 'accusative': if sex == 'male': adj += 'en' elif sex == 'female' or plural: adj += 'e' elif sex == 'neutral': adj += 'es' elif (article == 'meine' or 'keine') and plural: adj += 'en' elif case == 'nominative': if sex == 'male': adj += 'er' else: adj elif case == 'dative': adj += 'en' return adj adj = input('input adjective, regular transaformation only: ') article = input('input article between ein, eine, keine, meine: ') sex = input('choose sex of the non bwtween male, female, neutral: ') case = input('choose case between nominative, dative, accusative: ') plural = input('input 1 for plural, 0 for non-plural:') target_adj = adj_transformation(adj, article, sex, case, plural) print('correct transformation for ', adj, ' is ', target_adj)
If I want to know the correct form of
alt (old) in the sentence
Er is ein (alt) Mann, run this program:
input adjective, regular transaformation only: alt input article between ein, eine, kine, meine: ein choose sex of the non bwtween male, female, neutral: male choose case between nominative, dative, accusative: nominative input 1 for plural, 0 for non-plural:0 correct transformation for alt is alter
The result will shown in your terminal,
correct transformation for alt is alter
Now I have a ‘German mind’
Setup SSH Login With Keygen In OSX
I’m quite tired with copy-pasting passwords from my Evernote every time I login to my company’s remote server. Especially my company uses a proxy server, which means I have to type two passwords to eventually login.
Then I found Keygen tool, which can help us login without typing password.
SSH Keygen is to generate a pair of key, putting the public key in your remote server, secret key in your local machine.
If you are also using a Mac,
~/.ssh/id_ras is the default option of storing secret key,
~/.ssh/id_ras for public key. You can create many key pairs, and specify which pair to use by adding
IdentityFile option in your
Configurations With Single SSH Connection
1. generate keys in your local machine
~ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/user/.ssh/id_rsa): [press Enter] Enter passphrase (empty for no passphrase): [press Enter] Enter same passphrase again: [press Enter] Your identification has been saved in /Users/user/.ssh/id_rsa. Your public key has been saved in /Users/user/.ssh/id_rsa.pub. The key fingerprint is: **fingerprint** The key's randomart image is: +---[RSA 2048]----+ | ... | | o . . | | o o + o | | + B B + | | . .= S B o | |=o...o.o * o | |Bo+oE ... + | |=.++ .. . | |o++oooo. | +----[SHA256]-----+
2. copy public key to your server
If you haven’t installed
ssh-copy-id yet, use homebrew or Macports to install it.
Then, copy your public key to your remote server, this step needs you type password.
~ ssh-copy-id -i ~/.ssh/id_rsa.pub username@servername
3. Try login without password
Finally, make sure you can now login without password, and it’s done.
~ ssh username@servername Last login: Sat Sep 17 15:00:45 2016 from XXX.XXX.XXX.XXX
Configurations for Multiple SSH connections
1. change ssh configuration
If you use a proxy server like my company does, edit
.ssh/config file to change your ssh configuration (If there is no file named
config in OSX, create a new one).
Host [servername] ServerAliveInterval 90 ServerAliveCountMax 8 Hostname [username@servername] User [username] ProxyCommand ssh [username@proxyname] nc %h %p
2. generate key pairs
Same as Step 1 in Single SSH connection do.
3. copy your public key to both your proxy server and your real server
Same as Step 2 in Single SSH connection do.
3. Try login without password
Make sure you can login your real server password, and it’s done.
My Journey in Meditation
My journey of meditation started two years ago, when I was a freshmen in collage. I read a book named “the mindful way through depression” by Zindel Segal. I started trying MBSR (Mindfulness-based stress reduction),it brings me life-transforming impacts, which can be called enlightenment, and thus my journey on meditation starts.
These are several meditating methods I tried:
MBSR (Mindfulness-based stress reduction) is a non-religious way to meditate. In this process, focusing on present moment, relaxing through deep breath, free from judgements are emphasized. When I first started doing this when I was a freshmen in college, I got wonderful experience, I started to realize how beautiful a tranquil present is. My concentration improved, I got more flows during studying and happier than ever before. I kept meditating in this way for the whole year on a weekly basis, and my happiness level goes like this.
I actually didn’t insist meditating after half year since I didn’t get any improvements since then. For me, who is passionate in seeking newest exciting things, it’s hard to keep those positive changes stay for a life time, because it’s becomes less exciting if we don’t feel there are more positive changes taking place.
Zen is one branch of buddhism originated in China, spread into various Asian counties, then became known as Japanese Zen.
When I was an exchange student in Japan, I joined several zazen (座禅) assemblies hold by famous temples.
First I joined a half-hour Zazen activity in a 曹洞宗（そうとうしゅう）temple. People meditate facing a wall, and after a short period we will walk through the room (this is known as walking meditation, aiming to building up relationships between mind and body through simple daily activity). Then we read “Heart Sutra” (般若心经), the interesting thing here is it’s all written in Chinese characters but it sounds totally different when pronounced in Japanese. Finally came the monk explaining “Heart Sutra”, he told us everyone can be enlightened if he/she focuses on his/her real life, keeping doing good to others.
I joined another Zazen assembly in a famous 临济宗（りんざいしゅう） temple in Kyoto (see the official website), it’s a two days one night program. It was a snowy winter that time, and It was not such a pleasant stay there because we had to wake up at 4:30 am to start meditation. I tried my best to meditate but I was too sleepy. Anyway, scenery in the temple with snow falling down was quite beautiful.
I did this follow a online course Tibetan Buddhist Meditation and the Modern World. Tibetan Buddhism is quite close to primitive India Buddhism. It emphasizes Buddhism such as unavoidable suffering and impermanence, and the first step to reduce suffering is to accept the fact that we are all suffering. For me, it’s a little difficult to fully engage in because it’s hard to understand these criteria without a Buddhism background knowledge.
In all, probably it will take many years to be enlightened, I enjoy so much with my way of trying all kinds of meditation. As a programmer who faces bugs everyday, it’s important to bring curiosity to code, also stay relaxed towards severe problems, then every line of code will become the deepest secret of universe.
My Recent Struggle In Programming
Recently, I’m finding out that a beginner learns fast in programming,but for a junior programmer, it’s actually hard to go step further. Sometimes, when facing a problem that is so hard for me, I became so anxious to know the answer, thus my would keep stressed mentally and physically for hours. If I found out the answer, I got relaxed, and thought these suffering worth, but if I can’t find out the answer, I would lose confidence, and sometimes doubting if I’m really suitable to become a great programmer.
I know I’m too stressed with things that I can’t give an answer, and a career in programming must go through much more progress which is frustrating when no solution can be found. But for me, it’s like a nature reaction to get stressed when facing things I can’t handle, I felt that tension is building up in my body, but simply can’t release it, because the more I want to get relaxed, the more stressful it became. This is the thing that really destroying my health and inner passion, I really want to figure out a way to make a change.
I think this is a very common problem in many fields. Recently, I’m working on Chopin’s Etude in E Major (Tristesse), it’s a beautiful piece. I enjoy the A part (it’s a form in A-B-A) the most, it’s slow, melodic, elegant. But I struggled much with the B part, which is the full of passages of tritones. It’s quite hard to recognize the score, but the hardest part for me is that it does not sound pleasure because tritones are building long passage of tension, it’s really struggle to endure the unpleasant sound when practicing. But I can’t just leave B part, only play A part, because it’s an entity that related with each other.
Actually, for me, when I decided exercise one music piece, I really don’t like these passages built up with demon chords. I end out spending too much time practicing these passages, and sometimes it dried out my confidence in continuing practicing this piece.
So, the problem is we love programming, there are pleasant parts and unpleasant parts, when we spend too much time on the unpleasant part, we became hard to go step further and lose confidence. The problem is unpleasant parts are unavoidable, and sometimes incredibly important, how can we reduce pain when we working on it ?
One week trying improvisation
This week I’m trying simle improvisation following instructions of Youtube video, it’s really interesting because unlike normal composing, I don’t have to care about writing scores, all it focuses on is the moment. The idea of living in this moment sounds like Zen, and I really want to develop that lifestyle.
At first two days, I tried to focus on the melody part, it’s hard at first, because I’m always trying to make the melody sadder and sadder, considering my loneliness recently.
Then the third day, after watching Youtube video, I started to work on chords. Like go from the I chord, and goes to V chord, like leaving home, and finally came back to the I chord. Then my improvisation style turned into Cannon style, with few varations.
The forth day, I watched more Youtube videos, then I knew the circle of fifth, using it to build passages and repeat themes. It’s quite cool, because it’s a good way for repetition. And actually I can remember many classical music uses circle of fifth, and produces quite beautiful sound.
Finally the fifth and sixth day, I wanted more and more Youtube videos, and know how to implement modulation to make the piece more interesting. I was trying to think about how I’m going to develop this piece, what is the thing that really want to get accossed to.
And one interesting thing I found is that, I’m the superuser of the music I’m improvising, there are certain rules to follow, following these rules, and see what interesting stuffs we can make, the infinate possibility really fasinates me a lot.
Another thing I find is about creativity. When I’m improvising, I only focused on this moment, excluding stuffs realted with chords, most of it does not need much problem-sloving. But when I’m faced with a programming problem, I’m actually seeking the results, I don’t care too much about the process, I’m too eager to get the problem done, which always lead to anxity when facing uncertainty. I really want to change my way of programming, but I’m still not sure how to find out a way of my own.
life ( 4 )
music ( 1 )
programming ( 12 )
spirituality ( 1 )
language-learning ( 1 )
I'm a university student in the last year, also a web developer. I love exporing cultures, learning languages and making BGM music!