投稿時間:2022-02-02 23:29:54 RSSフィード2022-02-02 23:00 分まとめ(30件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] ソニー、PS5の今年度販売目標を300万台以上引き下げ 半導体不足で https://www.itmedia.co.jp/news/articles/2202/02/news163.html itmedia 2022-02-02 22:40:00
IT ITmedia 総合記事一覧 [ITmedia News] ハイエンド「ウォークマン」か ソニー、商品サイトに予告画像 https://www.itmedia.co.jp/news/articles/2202/02/news162.html itmedia 2022-02-02 22:36:00
AWS lambdaタグが付けられた新着投稿 - Qiita Lambdaの明瞭な出力ログ [Python, Node.js] https://qiita.com/holdout0521/items/27f4c8a54c666cccbbdf Lambdaの明瞭な出力ログPythonNodejsはじめにLambdaの出力ログは、CloudWatchLogsで確認しますが、json形式の明瞭なログ出力を書き留めます。 2022-02-02 22:52:31
python Pythonタグが付けられた新着投稿 - Qiita Lambdaの明瞭な出力ログ [Python, Node.js] https://qiita.com/holdout0521/items/27f4c8a54c666cccbbdf Lambdaの明瞭な出力ログPythonNodejsはじめにLambdaの出力ログは、CloudWatchLogsで確認しますが、json形式の明瞭なログ出力を書き留めます。 2022-02-02 22:52:31
python Pythonタグが付けられた新着投稿 - Qiita 【python】Wordcloudを用いた形態素解析 https://qiita.com/hotpot/items/caaa10f31875433ef874 ② wordcloud の インストール pipinstallwordcloud など で wordcloud も インストール し ます 。 2022-02-02 22:48:51
python Pythonタグが付けられた新着投稿 - Qiita 生存時間分析のCox比例ハザードモデルをConcordance indexを使って評価する https://qiita.com/t_serizawa/items/0ab53a08ce69ba7e481a これらを踏まえて、例えば「Cox比例ハザードを使用したモデルAとモデルBでは、Aの方がConcordanceindexの値が大きく、また目安となるに近い値を出している。 2022-02-02 22:33:30
js JavaScriptタグが付けられた新着投稿 - Qiita (備忘録)Javascriptでのonclickの発火タイミング https://qiita.com/8_7_10/items/891784f73f02118f7266 ltdetailsgtltsummaryonclickifthisparentNodeopenthisinnerHTML折りたたむelsethisinnerHTML展開するgt展開するltsummarygtltここにいろいろな内容gtltdetailsgtltsummarygtタグがクリックされるとclickイベントをonclickで拾って、parentNodeであるltdetailsgtタグがopenであるかを調べ、そうであるならltsummarygtの中身を「折りたたむ」に、そうでなければ「展開する」にするコードだが、実際にやってみると…なんと、想定していたのと真逆の挙動をする。 2022-02-02 22:43:26
Ruby Rubyタグが付けられた新着投稿 - Qiita 登録フォームについて https://qiita.com/aoi-tatekawa/items/6328c0c5b4147093cc89 登録フォームについてはじめに今回は、ポートフォリオ作成で学んだ知識のアウトプットをしたいと思い、記事を書いています。 2022-02-02 22:05:46
AWS AWSタグが付けられた新着投稿 - Qiita Lambdaの明瞭な出力ログ [Python, Node.js] https://qiita.com/holdout0521/items/27f4c8a54c666cccbbdf Lambdaの明瞭な出力ログPythonNodejsはじめにLambdaの出力ログは、CloudWatchLogsで確認しますが、json形式の明瞭なログ出力を書き留めます。 2022-02-02 22:52:31
AWS AWSタグが付けられた新着投稿 - Qiita Amazon Kinesis Video Streams API/SDK による開発 https://qiita.com/yh1224/items/cb922f15b791e7f31677 ProducerClientJavaの処理の流れKinesisVideoClientインスタンスを生成MediaSourceインスタンスを生成kinesisVideoClientregisterMediaSourceでMediaSourceを登録mediaSourcestartで送信開始kinesisVideoClientregisterMediaSourceにMediaSourceを指定することで、送信するメディアデータを指定します。 2022-02-02 22:07:57
Ruby Railsタグが付けられた新着投稿 - Qiita 登録フォームについて https://qiita.com/aoi-tatekawa/items/6328c0c5b4147093cc89 登録フォームについてはじめに今回は、ポートフォリオ作成で学んだ知識のアウトプットをしたいと思い、記事を書いています。 2022-02-02 22:05:46
海外TECH Ars Technica Chromecast, Fire TV Stick, or Roku: What’s the best streaming stick for ~$50? https://arstechnica.com/?p=1736784 chromecast 2022-02-02 13:10:51
海外TECH MakeUseOf Wireless Charging Sucks: 4 Reasons Why https://www.makeuseof.com/why-wireless-charging-sucks/ recent 2022-02-02 13:31:56
海外TECH MakeUseOf The 7 Best Practices for Using Your Smartphone at Work https://www.makeuseof.com/best-practices-for-using-smartphone-at-work/ certain 2022-02-02 13:15:12
海外TECH MakeUseOf 9 Firefox Add-Ons for Reverse Image Search https://www.makeuseof.com/firefox-add-ons-reverse-image-search/ firefox 2022-02-02 13:01:55
海外TECH DEV Community Let's Learn: Remix Task Tracker (Part 2) https://dev.to/shafspecs/lets-learn-remix-task-tracker-part-2-579o Let x s Learn Remix Task Tracker Part Welcome to this week s article where we would be continuing of from last week s article about my thoughts on Remix whilst creating a Remix task tracker app Without further ado let s get started Rework It was time to add the login functions I decided to mix things up a bit for the authentication I used bcryptjs instead of Supabase like I had planned and instead of a google sign in stuck with the native email password authentication method Let me draw a rough blueprint for the authentication We would have a login page that allows users to either Sign Up register or Log In Validate the users based on their choice if register method Passwords must be equals to or greater than charactersValid email must be used it must be unique in the database If the method is sign in The password must be correctEmail entered must be correctIf validation process is successful redirect them to the task tracker page Seems good enough to me let s start the build ‍ ️ npm install prisma clientnpm install save dev prismanpm install bcryptjsnpm install save dev types bcryptjsI created a prisma folder in my root directory and in it created a schema prisma file This is where our database schema structure would go Before you are wondering what database I am using railway to host my PostgreSQL database It is free and great for your little side projects that require a running database I have already provisioned a new PosgreSQL database call her whatever you want and now it s time to connect our Prisma to it Create a env file in your app root directory and create an environment variable called DATABASE URL It is this url that would allow prisma to connect to our database seamlessly Head over to your railway dashboard and navigate to the PostgreSQL tab in select the Connect tab and copy the Database Connection URLPaste the URL in the env file as your DATABASE URL and you can get started with Prisma In the schema prisma I connected to my railway app and created a model for the database generator client provider prisma client js datasource db provider postgresql url env DATABASE URL model User id String id default uuid email String unique password String icon String createdAt DateTime default now tasks Tasks model Tasks id String id default uuid title String description String status String reminder Boolean default false priority String deadline DateTime createdAt DateTime default now updatedAt DateTime default now userId String user User relation fields userId references id I created to tables one for the user and the second one for the tasks this is a one to many relation in the sense that every user would have it s own table of tasks which would contain a lot of tasks One user gt Several Tasks In the User table we have an id IDs are a must for every record in a table that s a unique user id uuid and an email that must be unique Also have a password field an icon field that is optional indicated by the icon after the type A created at field and a Task field that s more or less a table In the Tasks table the important fields are the id the task s title an optional description and deadline which is our expiry time and the most iportant linking our User table to the Task table Prisma has an explanatory guide on single to many relationship model The rest are little details I intend to add to the app later to give it some spice You can run npx prisma studio to view live changes to your table and edit the database yourself I created an authentication handling action in my index tsx to avoid a messy post layout I would refrain from adding all the code changes and instead link the repo at the end of this article and linked it to a custom Remix lt Form gt Let s rewind a bit on something I am storing the user s password in the database Yes and we are going to use bcryptjs that we installed earlier to hash our passwords so no one would be able to decipher it even the admin If you think you can easily break a hashed password try this Hashed version of password password is MnfsQiN ZMTppKNy tIsUYs obHlhdP OsyXhTurpBMUbA using the SHA crypt hash type Using bcrypt hash type the same password would end up as a bvIGNmidMuRcmmWZfOHJIMCTriNWhEpf FuA mHZFpe Not really an easy thing to crack After setting up my Form it was time to style it and test it out Form look with some basic stylingSigned In Ok now we have successfully signed in Let s add a logout function That can be easily done by creating a logout route and then just having a loader that redirects to the login page logout tsximport type ActionFunction LoaderFunction from remix import redirect from Remiximport redirect from remix import our logout functionimport logout from utils session server export const action ActionFunction async request gt run the logout request return logout request export const loader LoaderFunction async gt redirect the user return redirect Wrapping Up Let s wrap up the basic function of our App We need to save and get the user s tasks when they edit it I decided to use real time saving Meaning each time they add or delete a task it gets updated immediately meanwhile the deleted tasks would get deleted permanently each time the user signs out as we won t save it we can cache it for another time though We have the basic create delete set up but it takes a while to register Let s give the user some indication that something is happeningAnd that s it for a basic task tracker app Time to push to github and deploy I hope to add extra features to it later as a personal challenge That s the end of the article series This app was super fun to make and I am enjoying Remix more issues I faced while making this app were more from prisma s end Ha an example is weird disconnection from the database and random schema generation I think Remix is good to go for a full stack large scale application Remix currently has a huge drawback for me currently and that s a problem with importing ESM modules Good news is that is currently getting fixed by the Remix s team for now there are work arounds that might successfully or unsuccessfully import the ESM module Besides that Remix all the way for me Like always have fun learning and coding and don t forget to take breaks Till next time 2022-02-02 13:10:04
海外TECH DEV Community How to shape sample data with PostgreSQL generate_series() and SQL https://dev.to/timescale/how-to-shape-sample-data-with-postgresql-generateseries-and-sql-1jm7 How to shape sample data with PostgreSQL generate series and SQL Table of ContentsData inceptionMath class flashback Wrapping it upIn the lifecycle of any application developers are often asked to create proof of concept features test newly released functionality and visualize data analysis In many cases the available test data is stale not representative of normal usage or simply doesn t exist for the feature being implemented In situations like this knowing how to quickly create sample time series data with native PostgreSQL and SQL functions is a valuable skill to draw upon In this three part series on generating sample time series data we demonstrate how to use the built in PostgreSQL function generate series to more easily create large sets of data to help test various workloads database features or just to create fun samples In part and part of the series we reviewed how generate series works how to join multiple series using a CROSS JOIN to create large datasets quickly and finally how to create and use custom PostgreSQL functions as part of the query to generate more realistic values for your dataset If you haven t used generate series much before we recommend first reading the other two posts The first one is an intro to the generate series function and the second one shows how to generate more realistic data With those skills in hand you can quickly and easily generate tens of millions of rows of realistic looking data Even still there s one more problem that we hinted at in part all of our data regardless of how it s formatted or constrained is still based on the random function This means that over thousands or millions of samples every device we create data for will likely have the same MAX and MIN value and the distribution of random values over millions of rows for each device generally means that all devices will have similar average values This third post demonstrates a few methods for influencing how to create data that mimics a desired shape or trend Do you need to simulate time series values that cycle over time What about demonstrating a counter value that resets every so often to test the counter agg hyperfunction Are you trying to create new dashboards that display sales data over time influenced for different months of the year when sales would ebb and flow Below we ll cover all of these examples to provide you with the final building blocks to create awesome sample data for all of your testing and exploration needs Remember however that these examples are just the beginning Keep playing Tweak the formulas or add different relational data to influence the values that get generated so that it meets your use case Data inceptionTime series data often has patterns Weather temperatures and rainfall measurements change in a mostly predictable way throughout the year Vibration measurements from an IoT device connected to an air conditioning system usually increase in the summer and decrease in the winter Manufacturing data that measures the total units produced per hour and the percentage of defective units usually follow a pattern based on shift schedules and seasonal demand If you want to demonstrate this kind of data without having access to the production dataset how would you go about it using generate series SQL functions ended up being pretty handy when we discussed different methods for creating realistic looking data in part Do you think they might help here Two options to easily return the row numberRemember for our purposes we re specifically talking about creating sample time series data Every row increases along the time axis and if we use the multiplication formula from part we can determine how many rows our sample data query will generate Using built in SQL functions we can quickly start manipulating data values that change with the cycle of time There are many reasons why it can be helpful to know the ordinal position of each row number in a query result That s why standard SQL dialects have some variation of the row number over window function This simple yet powerful window function allows us to return the row number of a result set and can utilize the ORDER BY and PARTITION keywords to further determine the row values SELECT ts row number over order by time AS rownumFROM generate series INTERVAL day ts ts rownum In a normal query this can be useful for tasks like paging data in a web API when there is a need to consistently return values based on a common partition There s one problem though row number over requires PostgreSQL and any other SQL database to process the query results twice to add the values correctly Therefore it s very useful but also very expensive as datasets grow Fortunately PostgreSQL helps us once again for our specific use case of generating sample time series data Through this series of blog posts on generating sample time series data we ve discussed that generate series is a Set Returning Function SRF Like the results from a table set data can be JOINed and queried Additionally PostgreSQL provides the WITH ORDINALITY clause that can be applied to any SRF to generate an additional incrementing BIGINT column The best part It doesn t require a second pass through the data in order to generate this value SELECT ts AS time rownumFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum time rownum Because it serves our purpose and is more efficient the remainder of this post will use WITH ORDINALITY However remember that you can accomplish the same results using row number over if that s more comfortable for you Harnessing the row valueWith increasing timestamps and an increasing integer on every row we can begin to use other functions to create interesting data Remember from the previous blog posts that calling a function as part of your query executes the function for each row and returns the value Just like a regular column however we don t have to actually emit that column in the final query results Instead the function value for that row can be used in calculating values in other columns As an example let s modify the previous query Instead of displaying the row number let s multiply the value by That is the function value is treated as an input to a multiplication formula SELECT ts AS time rownum AS rownum by twoFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum time rownum by two Easy enough right What else can we do with the row number value Counters with resetMany time series datasets record values that reset over time often referred to as counters The odometer on a car is an example If you drive far enough it will roll over to zero again and start counting upward The same is true for many utilities like water and electric meters that track consumption Eventually the total digits will increment to the point where the counter resets and starts from zero again To simulate this with time series data we can use the incrementing row number and after some period of time reset the count and start over using the modulus operator This example resets the counter every rows WITH counter rows AS SELECT ts CASE WHEN rownum THEN ELSE rownum END AS row counter FROM generate series now INTERVAL minutes now INTERVAL second WITH ORDINALITY AS t ts rownum SELECT ts row counterFROM counter rows ts row counter … …By putting the CASE statement inside of the CTE the counter data can be selected more easily to test other functions For instance to see how the rate and delta hyperfunctions work we can use time bucket to group our second readings into minute buckets WITH counter rows AS SELECT ts CASE WHEN rownum THEN ELSE rownum END AS row counter FROM generate series now INTERVAL minutes now INTERVAL second WITH ORDINALITY AS t ts rownum SELECT time bucket minute ts bucket delta counter agg ts row counter rate counter agg ts row counter FROM counter rowsGROUP BY bucketORDER BY bucket bucket delta rate time bucket outputs the starting time of the bucket which based on our date math for generate series produces four complete buckets of minute aggregated data and two partial buckets one for the minute we are currently in and a second bucket for the partial minutes ago We can see that the delta correctly calculates the difference between the last and first readings of each bucket and the rate of change the increment between each reading correctly displays a unit of one What are some other ways we can use these PostgreSQL functions to generate different shapes of data to help you explore other features of SQL and TimescaleDB quickly Increasing trend over timeWith the knowledge of how to create an ordinal value for each row of data produced by generate series we can explore other ways of generating useful time series data Because the row number value will always increase we can easily produce a random dataset that always increases over time but has some variability to it Consider this a very rough representation of daily website traffic over the span of two years SELECT ts random rownum as value FROM generate series date date INTERVAL day WITH ORDINALITY AS t ts rownum Sample daily website traffic growing over time with random daily valuesIn reality this chart isn t very realistic or representative Any website that gains and loses viewers upwards of per day probably isn t going to have great long term success Don t worry we can do better with this example after we learn about another method for creating shaped data using sine waves Simple cycles sine wave Using the built in sin and cos PostgreSQL functions we can generate data useful for graphing and testing functions that need a predictable data trend This is particularly useful for testing TimescaleDB downsampling hyperfunctions like lttb or asap These functions can take tens of thousands or millions of data points and return a smaller but still accurately representative dataset for graphing We ll start with a basic example that produces one row per day for days For each row number value we ll get the sine value that can be used to graph a wave subtract from the row number for wave to start at zero radians and produce a more representative chartSELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum ts value … …Unfortunately the graph of this SINE wave doesn t look all that appealing For one month of daily data points we only have distinct data points from peak to peak of each wave Cosine wave graph using daily values for one monthThe reason our sine wave is so jagged is because sine and cosine values are measured in radians based on 𝞹 not degrees A complete cycle peak to peak on a sine wave happens from zero to 𝞹 … Therefore every rows of data will produce a complete period in the wave unless we find a way to modify that value To take control over the sine cosine values we need to think about how to modify the data based on the date range and interval how many rows and what we want the wave to look like This means we need to take a quick trip back to math class to talk about radians Math class flashback Step back with me for a minute to primary school and your favorite math subject Algebra or Trigonometry as the case may be How many hours did you spend working with graph paper or graphing calculators determining the amplitude period and shift of a sine or cosine graph Sine wave period and amplitudeIf you reach even further into your memory you might remember this formula which allows you to modify the various aspects of a wave img alt Mathematical formula showing how to modify a sine wave period amplitude and shift Formula y A sin B x C D height src dev to uploads s amazonaws com uploads articles pmccdnjpfiywqbxv jpg width Mathematical formula for modifying the shape and values of a sine waveThere s a lot here I know Let s primarily focus on the two numbers that matter most for our current use case X the number of radians which is the row number in our datasetB a value to multiply the row number by to decrease the radian value for each row A C and D change the height and placement of the wave but to start we want to elongate each period and provide more points on the line to graph Let s start with a small dataset example generating cosine data for three months of daily timestamps with no modifications SELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum ts value … … Cosine wave with daily data for three monthsIn this example we see peaks in our wave because there are points of data and without modification the wave will have a period peak to peak every points To lengthen the cycle we need to perform some simple division cycle modifying value total interval rows per cycle Using the same months of generated daily values let s see how to modify the data to lengthen the period of the wave One cycle per month days If we want our daily data to cycle every days multiply our row number value by the row number radians modifier SELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum Cosine wave using daily data for three months adjusted to have monthly periods One cycle per quarter days this is our radians modifier SELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum Cosine wave using daily data for three months adjusted to have one month periodTo modify the overall length of the period you need to modify the row number value based on the total number of rows in the result and the granularity of the timestamp Here are some example values that you can use to modify the wave period based on the interval used with generate series generate series intervalDesired period lengthDivide by…daily monthdaily monthshourly dayhourly weekhourly monthminute hourminute day Modifying the wave amplitude and shiftAnother tweak we can make to our wave data is to change the amplitude difference between the min and max peaks and as necessary shift the wave up or down on the Y axis To do this multiply the cosine value by the value that maximum value you want the wave to have For example we can multiply the monthly cycle data by which changes the overall minimum and maximum values of the data SELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum Cosine wave using daily data for three months with increased amplitudeNotice that the min max values are now from to We can take it one step further by adding a value to the output which will shift the final values up or down on the Y axis In this example we modified the previous query by adding to the value of each row which results in values from to SELECT ts cos rownum as valueFROM generate series INTERVAL day WITH ORDINALITY AS t ts rownum Cosine wave using daily data for three months with shifted min max values on the Y axisWhy spend so much time showing you how to generate and manipulate sine or cosine wave data especially when we rarely see repeatable data this smooth in real life One of the main advantages of using consistent predictable data like this in testing is that you can easily tell if your application charting tools and query are working as expected Once you begin adding in unpredictable real life data it can be difficult to determine if the data query or application are producing unexpected results Quickly generating known data with a specific pattern can help rule out errors with the query at least The second advantage of using a known dataset is that it can be used to shape and influence the results of other queries Earlier in this post we demonstrated a very simplistic example of increasing website traffic by multiplying the row number and a random value Let s look at how we can join both datasets to create a better shape for the sample website traffic data Better website traffic samplesOne of the key takeaways from this series of posts is that generate series returns a set of data that can be JOINed and manipulated like data from a regular table Therefore we can join together our rough website traffic data and our sine wave to produce a smoother more realistic set of data to experiment with SQL for the win Overall this is one of the more complex examples we ve presented utilizing multiple common table expressions CTE to break the various sets into separate tables that we can query and join However this also means that you can independently modify the time range and other values to change the data that is generated from this query for your own experimentation This is the generate series data with a short date to join with laterWITH daily series AS SELECT ts date ts AS day rownum FROM generate series day interval WITH ORDINALITY AS t ts rownum This selects the time day and a random value that represents our daily website visitsdaily value AS SELECT ts day rownum random AS val FROM daily series ORDER BY day This cosine wave dataset has the same day values which allow it to be joined to the daily value easily The wave value is used to modify the website value by some percentage to smooth it out in the shape of the wave daily wave AS SELECT day radians divided by days rows to get one peak every months twice a year cos rownum as p mod FROM daily series day val visits per day before modification p mod an adjusted cosine value that raises or lowers our data each day row number a big incremental value for each row to quickly increase visits each daySELECT dv ts val p mod rownum as valueFROM daily value dv INNER JOIN daily wave dw ON dv DAY dw DAY order by ts Combining wave data and random increasing data to shape the data patternWithout much effort we are able to generate a time series dataset use two different SQL functions and join multiple sets together to create fun graphical data In this example our traffic peaks twice a year every days during July and late December But we don t have to stop there We can carry our website traffic example one step further by applying just a little more control over how much the data increases or decreases during certain periods Once again relational data to the rescue Influence the pattern with relational dataAs a final example let s consider one other type of data that we can include in our queries which influence the final generated values relational data Although we ve been using data that was created using generate series to produce some fun and interesting sample datasets we can just as easily JOIN to other data in our database to further manipulate the final result There are many ways you could JOIN to and use additional data depending on your use case and the type of time series data you re trying to mimic For example IoT data from weather sensors store the typical weekly temperature highs lows in a database table and use those values as input to the random between function we created in post Stock data analysis store the dates for quarterly disclosures and a hypothetical factor that will influence the impact on stock price moving forwardSales or website traffic store the monthly or weekly change observed in a typical sales cycle Does traffic or sales increase a quarter end What about during the end of year holiday season To demonstrate this we ll use the fictitious website traffic data from earlier in this post Specifically we ve decided that we want to see a spike in traffic during June and December First we create a regular PostgreSQL table to store the numerical month and a float value which will be used to modify our generated data up or down This will allow us to tweak the overall shape for a given month CREATE TABLE overrides m val INT NOT NULL p inc FLOAT NOT null INSERT INTO overrides m val p inc VALUES residual increase from December June increase of early shoppers sales traffic growth holiday increaseUsing this simple dataset let s first join it to the simplistic query that had randomly growing data over time WITH daily series AS a random value that increases over time based on the row numberSELECT ts date part month ts AS m val random rownum as value FROM generate series date date INTERVAL day WITH ORDINALITY AS t ts rownum join to the overrides table to get the p inc value for the month of the current rowSELECT ts value p inc AS value FROM daily series dsINNER JOIN overrides o ON ds m val o m valORDER BY ts Sample website traffic for two years modified during some months with relational dataJoining to the overrides table based on the month of each data point we are able to multiply the percentage increase p inc value and the fake website traffic value to influence the trend of our data during specific time periods Combining everything we ve learned and taking this example one step further we can enhance the cosine data query with the same monthly override values to tweak our fake cyclical time series data that represents growing website traffic with a more realistic shape ​​ This is the generate series data with a short date to join with laterWITH daily series AS SELECT ts date ts AS day rownum FROM generate series day interval WITH ORDINALITY AS t ts rownum This selects the time day and a random value that represents our daily website visits m val will be used to join with the overrides tabledaily value AS SELECT ts day date part month ts as m val rownum random AS val FROM daily series ORDER BY day This cosine wave dataset has the same day values which allow it to be joined to the daily value easily The wave value is used to modify the website value by some percentage to smooth it out in the shape of the wave daily wave AS SELECT day radians divided by days rows to get one peak every months twice a year cos rownum as p mod FROM daily series day val visits per day before modification p mod an adjusted cosine value that raises or lowers our data each day row number a big incremental value for each row to quickly increase visits each day p inc a monthly adjustment value taken from the overrides tableSELECT dv ts val p mod rownum p inc as valueFROM daily value dv INNER JOIN daily wave dw ON dv DAY dw DAY inner join overrides o on dv m val o m val order by ts Sample website traffic for two years combined with sine wave data and modified during some months with relational data Wrapping it upIn this rd and final blog post of our series about generating sample time series datasets we demonstrated how to add shape and trend into your sample time series data e g increasing web traffic over time and quarterly sales cycles using built in SQL functions and relational data With a little bit of math mixed in we learned how to manipulate the pattern of generated data which is particularly useful for visualizing time series data and learning analytical PostgreSQL or TimescaleDB functions To see some of these examples in action watch my video on creating realistic sample data If you have questions about using generate series or have any questions about TimescaleDB please join our community Slack channel where you ll find an active community and a handful of the Timescale team most days If you want to try creating larger sets of sample time series data using generate series and see how the exciting features of TimescaleDB work sign up for a free day trial or install and manage it on your instances You can also learn more by following one of our many tutorials 2022-02-02 13:04:12
Apple AppleInsider - Frontpage News Qualcomm gets another chance to validate patents in Apple lawsuit https://appleinsider.com/articles/22/02/02/qualcomm-gets-another-chance-to-validate-patents-in-apple-lawsuit?utm_medium=rss Qualcomm gets another chance to validate patents in Apple lawsuitiPhone modem supplier Qualcomm gets the go ahead from the U S Court of Appeals to defend one of its patents Qualcomm gets another chance to defend patentsApple and Qualcomm settled a patent lawsuit in and entered a six year contract on the cusp of Intel exiting the modem business However both companies have since challenged this settlement based on different patent decisions Read more 2022-02-02 13:52:49
Apple AppleInsider - Frontpage News Apple TV+ announces 'Dear Edward' drama from creator of 'Friday Night Lights' https://appleinsider.com/articles/22/02/02/apple-tv-announces-dear-edward-drama-from-creator-of-friday-night-lights?utm_medium=rss Apple TV announces x Dear Edward x drama from creator of x Friday Night Lights x Friday Night Lights creator Jason Katims and star Connie Britton are producing a ten part series for Apple TV based on Ann Napolitano s Dear Edward novel Connie Britton Jason KatimsNapolitano is acting as co executive producer with Jason Katims who is writing the script Apple reports that Dear Edward is the story of Edward Alder a year old boy who survives a devastating commercial plane crash that kills every other passenger including his family Read more 2022-02-02 13:41:27
海外TECH Engadget Worms NFTs were a great idea for Team17, until they weren't https://www.engadget.com/worms-nft-team-17-canceled-132506893.html?src=rss Worms NFTs were a great idea for Team until they weren x tIt didn t take long for Team to cancel its NFT plans after they were announced The British video game developer and publisher has released a statement that it s no longer working on the MetaWorms NFT project after listening to quot Teamsters development partners and its games communities and the concerns they ve expressed quot It added that it has quot taken the decision to step back from the NFT space quot nbsp As EuroGamer notes the MetaWorms project was supposed to produce quot limited edition quot computer generated collectibles of the company s Worms IP They were supposed to be sold by the Reality Gaming Group that claims the ability to mint NFTs in an environmentally friendly way One of the biggest controversies surrounding NFTs is their environmental impact due to the energy needed to sustain their blockchain activity Team said that if it sold Worm NFTs the energy used to register them would equal quot the average annual kettle usage of just households quot The backlash against the project came swiftly regardless ーbecause really environmental impact is just one of the many issues surrounding non fungible tokens ーand from developers Team had worked with in the past Among the developers that published statements distancing themselves from NFTs are Playtonic which published Yooka Laylee titles under Team and Overcooked developer Ghost Town Games Aggro Crab developer of roguelike game Going Under released a scathing statement saying it ll never work with Team again sigh pic twitter com IPIQBoHーAGGRO CRAB AggroCrabGames January The statement did however implore fans not to harass Team employees because they were most likely caught off guard as well According to Eurogamer that s indeed the case Several teams within the company reportedly didn t know that it had plans to release NFT collectibles and those who did know voiced their opposition nbsp 2022-02-02 13:25:06
Cisco Cisco Blog Manage Your Cloud Costs with Professional Services https://blogs.cisco.com/customerexperience/manage-your-cloud-costs-with-professional-services Manage Your Cloud Costs with Professional ServicesWorried about cloud costs Learn from an IDC expert how to control cloud spend with a cloud operating model supported by professional services to enable cloud cost management and optimization 2022-02-02 13:00:34
ニュース BBC News - Home Boris Johnson is facing further calls to resign amid parties row https://www.bbc.co.uk/news/uk-politics-60227531?at_medium=RSS&at_campaign=KARANGA boris 2022-02-02 13:31:57
ニュース BBC News - Home Vaginal HRT product could be available over the counter https://www.bbc.co.uk/news/health-60227881?at_medium=RSS&at_campaign=KARANGA vaginal 2022-02-02 13:02:52
ニュース BBC News - Home Tensions between Priti Patel and No 10 over Met Commissioner Cressida Dick https://www.bbc.co.uk/news/uk-politics-60229473?at_medium=RSS&at_campaign=KARANGA commissioner 2022-02-02 13:43:18
ニュース BBC News - Home Six Nations 2022: Who should start in England's backline against Scotland? https://www.bbc.co.uk/sport/rugby-union/60223064?at_medium=RSS&at_campaign=KARANGA backline 2022-02-02 13:14:20
LifeHuck ライフハッカー[日本版] 塗ってすぐサラサラ!PC作業と相性抜群のハンドクリーム【今日のライフハックツール】 https://www.lifehacker.jp/article/2202lht_hand_gel/ 医薬部外品 2022-02-02 13:05:00
北海道 北海道新聞 ブドウ新品種「未来」「銀河」のプレート設置 池田・ワイン城脇の幼木畑 https://www.hokkaido-np.co.jp/article/641036/ 農林水産省 2022-02-02 22:10:38
北海道 北海道新聞 家族のため 3回目早く 65歳以上対象 小樽でも接種始まる https://www.hokkaido-np.co.jp/article/641056/ 新型コロナウイルス 2022-02-02 22:01:00
北海道 北海道新聞 原発「温暖化抑制」認定 EU欧州委、正式提案 https://www.hokkaido-np.co.jp/article/641057/ 欧州委員会 2022-02-02 22:01:00
海外TECH reddit Say what https://www.reddit.com/r/Superstonk/comments/sio8mh/say_what/ Say what submitted by u Affectionate Use to r Superstonk link comments 2022-02-02 13:06:12

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)