Edward Lance Lorilla |
- 【Visual Studio Visual Csharp】Threading
- 【PYTHON】Bitcoin data analysis
- 【ANDROID STUDIO】 Query Parameter Retrofit With Kotlin Coroutines
- 【FLUTTER ANDROID STUDIO and IOS】Sqlite CRUD
- 【GAMEMAKER】save and load text file
【Visual Studio Visual Csharp】Threading Posted: 13 Jun 2021 08:10 AM PDT using System; using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Threading;namespace threadC{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Thread first_thread = new Thread(new ThreadStart(first_thread_procedure)); Thread second_thread = new Thread(new ThreadStart(second_thread_procedure)); first_thread.Start(); second_thread.Start(); first_thread.Join(); } public void first_thread_procedure() { Thread.Sleep(500); MessageBox.Show("Hello from first thread :) ... "); } public void second_thread_procedure() { Thread.Sleep(1000); MessageBox.Show("Hello from second thread :) ... "); } }} |
Posted: 13 Jun 2021 08:09 AM PDT itunes_df['Seconds'] = itunes_df['Milliseconds'] / 1000 itunes_df['len_byte_ratio'] = itunes_df['Milliseconds'] / itunes_df['Bytes'] genre_dict = {'metal': 'Metal', 'met': 'Metal'} itunes_df['Genre'].replace(genre_dict) itunes_df['Genre'].apply(lambda x: x.lower()) # the above is the same as this def lowercase(x): return x.lower() itunes_df['Genre'].apply(lowercase) # but using built-in functions is almost always faster itunes_df['Genre'].str.lower() # this is a common sentiment analysis library; polarity is positive/negative sentiment, # subjectivety is subjective/objective rating. from textblob import TextBlob test = TextBlob("Textblob is amazingly simple to use. What great fun!") test.sentiment test.sentiment.polarity # it would be better than apply to use a list comprehension to get sentiment of track names, like this itunes_df['Track_sentiment'] = [TextBlob(x).sentiment.polarity for x in itunes_df['Track']] # but, if we wanted to mix polarity and subjectivity into one column, it would be best to use apply: def pol_sub_mix(x): tb = TextBlob(x) return tb.polarity * tb.subjectivity itunes_df['Track_pol_sub_mix'] = itunes_df['Track'].apply(pol_sub_mix) # delete these columns itunes_df.drop(['Track_pol_sub_mix', 'Track_sentiment'], inplace=True, axis=1) # currently doesn't work with python 3.9 import swifter itunes_df['Genre'].swifter.apply(lambda x: x.lower()) itunes_df.to_csv('cleaned_itunes_data.csv', index=False) itunes_df.groupby('Genre').mean()['Seconds'].sort_values().head() btc_df = pd.read_csv('bitcoin_price.csv') btc_df.head() btc_df['symbol'].unique() btc_df.drop('symbol', axis=1, inplace=True) btc_df['time'] = pd.to_datetime(btc_df['time'], unit='ms') btc_df['time'].dtype btc_df.info() btc_df.set_index('time', inplace=True) btc_df.head() btc_df[['close']].plot(logy=True) f = plt.figure(figsize=(5.5, 5.5)) btc_df.iloc[-3000:][['close']].plot(logy=True, figsize=(5.5, 5.5)) f.patch.set_facecolor('w') # sets background color behind axis labels plt.tight_layout() # auto-adjust margins plt.savefig('B17030_04_11.png', dpi=300) btc_df2 = pd.read_csv('bitcoin_price.csv', index_col='time', parse_dates=['time'], infer_datetime_format=True) date_parser = lambda x: pd.to_datetime(x, unit='ms') btc_df2 = pd.read_csv('bitcoin_price.csv', index_col='time', parse_dates=['time'], date_parser=date_parser) btc_df2.head() btc_df.loc['2019'] |
【ANDROID STUDIO】 Query Parameter Retrofit With Kotlin Coroutines Posted: 13 Jun 2021 08:07 AM PDT package com.example.myapplication package com.example.myapplication |
【FLUTTER ANDROID STUDIO and IOS】Sqlite CRUD Posted: 13 Jun 2021 08:05 AM PDT import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; class Model { |
【GAMEMAKER】save and load text file Posted: 13 Jun 2021 08:03 AM PDT Information about object: obj_textbox Sprite: Solid: false Visible: true Depth: 0 Persistent: false Parent: Children: Mask: No Physics Object Create Event: execute code: Step Event: execute code: Keyboard Event for <Backspace> Key: execute code: Keyboard Event for <Enter> Key: execute code: Keyboard Event for <Page Up> Key: execute code: Keyboard Event for <Page Down> Key: execute code: Keyboard Event for <Left> Key: execute code: Keyboard Event for <Up> Key: execute code: Keyboard Event for <Right> Key: execute code: Keyboard Event for <Down> Key: execute code: Keyboard Event for <Delete> Key: execute code: Mouse Event for Glob Left Button: execute code: Draw Event: for other object: execute code: Key Press Event for <End> Key: execute code: Key Press Event for <Home> Key: execute code: Key Press Event for <Insert> Key: execute code: Key Press Event for F2 Key: execute code: Key Press Event for F4 Key: execute code: Key Press Event for F5 Key: execute code: Key Press Event for F9 Key: execute code: Information about object: obj_new |
You are subscribed to email updates from Edward Lance Lorilla. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment