Basil  Rasool

Basil Rasool

1616560637

ThreeJS Displacement & AlphaMaps - Create a 3D Terrain!

Today, we’re stepping back into the world of Three.js basics to create a very cool, interactive 3D terrain. This is achieved by using displacement maps and alpha maps.

0:00​ - Introduction
0:56​ - An Awesome Offer
01:26​ - Installing ThreeJS Starter
03:18​ - Adding the Plane Geometry
08:57​ - Plane Material
26:58​ - Mouse Interactivity
30:12​ - User Interface HTML/CSS
33:46​ - Closing

Threejs starter:

https://github.com/designcourse/three…

Mountain texture used:

https://unsplash.com/photos/TfBJbT9MrFc

Subscribe: https://www.youtube.com/channel/UCVyRiMvfUNMA1UPlDPzG5Ow

#threejs #javascript

What is GEEK

Buddha Community

ThreeJS Displacement & AlphaMaps - Create a 3D Terrain!
Easter  Deckow

Easter Deckow

1655630160

PyTumblr: A Python Tumblr API v2 Client

PyTumblr

Installation

Install via pip:

$ pip install pytumblr

Install from source:

$ git clone https://github.com/tumblr/pytumblr.git
$ cd pytumblr
$ python setup.py install

Usage

Create a client

A pytumblr.TumblrRestClient is the object you'll make all of your calls to the Tumblr API through. Creating one is this easy:

client = pytumblr.TumblrRestClient(
    '<consumer_key>',
    '<consumer_secret>',
    '<oauth_token>',
    '<oauth_secret>',
)

client.info() # Grabs the current user information

Two easy ways to get your credentials to are:

  1. The built-in interactive_console.py tool (if you already have a consumer key & secret)
  2. The Tumblr API console at https://api.tumblr.com/console
  3. Get sample login code at https://api.tumblr.com/console/calls/user/info

Supported Methods

User Methods

client.info() # get information about the authenticating user
client.dashboard() # get the dashboard for the authenticating user
client.likes() # get the likes for the authenticating user
client.following() # get the blogs followed by the authenticating user

client.follow('codingjester.tumblr.com') # follow a blog
client.unfollow('codingjester.tumblr.com') # unfollow a blog

client.like(id, reblogkey) # like a post
client.unlike(id, reblogkey) # unlike a post

Blog Methods

client.blog_info(blogName) # get information about a blog
client.posts(blogName, **params) # get posts for a blog
client.avatar(blogName) # get the avatar for a blog
client.blog_likes(blogName) # get the likes on a blog
client.followers(blogName) # get the followers of a blog
client.blog_following(blogName) # get the publicly exposed blogs that [blogName] follows
client.queue(blogName) # get the queue for a given blog
client.submission(blogName) # get the submissions for a given blog

Post Methods

Creating posts

PyTumblr lets you create all of the various types that Tumblr supports. When using these types there are a few defaults that are able to be used with any post type.

The default supported types are described below.

  • state - a string, the state of the post. Supported types are published, draft, queue, private
  • tags - a list, a list of strings that you want tagged on the post. eg: ["testing", "magic", "1"]
  • tweet - a string, the string of the customized tweet you want. eg: "Man I love my mega awesome post!"
  • date - a string, the customized GMT that you want
  • format - a string, the format that your post is in. Support types are html or markdown
  • slug - a string, the slug for the url of the post you want

We'll show examples throughout of these default examples while showcasing all the specific post types.

Creating a photo post

Creating a photo post supports a bunch of different options plus the described default options * caption - a string, the user supplied caption * link - a string, the "click-through" url for the photo * source - a string, the url for the photo you want to use (use this or the data parameter) * data - a list or string, a list of filepaths or a single file path for multipart file upload

#Creates a photo post using a source URL
client.create_photo(blogName, state="published", tags=["testing", "ok"],
                    source="https://68.media.tumblr.com/b965fbb2e501610a29d80ffb6fb3e1ad/tumblr_n55vdeTse11rn1906o1_500.jpg")

#Creates a photo post using a local filepath
client.create_photo(blogName, state="queue", tags=["testing", "ok"],
                    tweet="Woah this is an incredible sweet post [URL]",
                    data="/Users/johnb/path/to/my/image.jpg")

#Creates a photoset post using several local filepaths
client.create_photo(blogName, state="draft", tags=["jb is cool"], format="markdown",
                    data=["/Users/johnb/path/to/my/image.jpg", "/Users/johnb/Pictures/kittens.jpg"],
                    caption="## Mega sweet kittens")

Creating a text post

Creating a text post supports the same options as default and just a two other parameters * title - a string, the optional title for the post. Supports markdown or html * body - a string, the body of the of the post. Supports markdown or html

#Creating a text post
client.create_text(blogName, state="published", slug="testing-text-posts", title="Testing", body="testing1 2 3 4")

Creating a quote post

Creating a quote post supports the same options as default and two other parameter * quote - a string, the full text of the qote. Supports markdown or html * source - a string, the cited source. HTML supported

#Creating a quote post
client.create_quote(blogName, state="queue", quote="I am the Walrus", source="Ringo")

Creating a link post

  • title - a string, the title of post that you want. Supports HTML entities.
  • url - a string, the url that you want to create a link post for.
  • description - a string, the desciption of the link that you have
#Create a link post
client.create_link(blogName, title="I like to search things, you should too.", url="https://duckduckgo.com",
                   description="Search is pretty cool when a duck does it.")

Creating a chat post

Creating a chat post supports the same options as default and two other parameters * title - a string, the title of the chat post * conversation - a string, the text of the conversation/chat, with diablog labels (no html)

#Create a chat post
chat = """John: Testing can be fun!
Renee: Testing is tedious and so are you.
John: Aw.
"""
client.create_chat(blogName, title="Renee just doesn't understand.", conversation=chat, tags=["renee", "testing"])

Creating an audio post

Creating an audio post allows for all default options and a has 3 other parameters. The only thing to keep in mind while dealing with audio posts is to make sure that you use the external_url parameter or data. You cannot use both at the same time. * caption - a string, the caption for your post * external_url - a string, the url of the site that hosts the audio file * data - a string, the filepath of the audio file you want to upload to Tumblr

#Creating an audio file
client.create_audio(blogName, caption="Rock out.", data="/Users/johnb/Music/my/new/sweet/album.mp3")

#lets use soundcloud!
client.create_audio(blogName, caption="Mega rock out.", external_url="https://soundcloud.com/skrillex/sets/recess")

Creating a video post

Creating a video post allows for all default options and has three other options. Like the other post types, it has some restrictions. You cannot use the embed and data parameters at the same time. * caption - a string, the caption for your post * embed - a string, the HTML embed code for the video * data - a string, the path of the file you want to upload

#Creating an upload from YouTube
client.create_video(blogName, caption="Jon Snow. Mega ridiculous sword.",
                    embed="http://www.youtube.com/watch?v=40pUYLacrj4")

#Creating a video post from local file
client.create_video(blogName, caption="testing", data="/Users/johnb/testing/ok/blah.mov")

Editing a post

Updating a post requires you knowing what type a post you're updating. You'll be able to supply to the post any of the options given above for updates.

client.edit_post(blogName, id=post_id, type="text", title="Updated")
client.edit_post(blogName, id=post_id, type="photo", data="/Users/johnb/mega/awesome.jpg")

Reblogging a Post

Reblogging a post just requires knowing the post id and the reblog key, which is supplied in the JSON of any post object.

client.reblog(blogName, id=125356, reblog_key="reblog_key")

Deleting a post

Deleting just requires that you own the post and have the post id

client.delete_post(blogName, 123456) # Deletes your post :(

A note on tags: When passing tags, as params, please pass them as a list (not a comma-separated string):

client.create_text(blogName, tags=['hello', 'world'], ...)

Getting notes for a post

In order to get the notes for a post, you need to have the post id and the blog that it is on.

data = client.notes(blogName, id='123456')

The results include a timestamp you can use to make future calls.

data = client.notes(blogName, id='123456', before_timestamp=data["_links"]["next"]["query_params"]["before_timestamp"])

Tagged Methods

# get posts with a given tag
client.tagged(tag, **params)

Using the interactive console

This client comes with a nice interactive console to run you through the OAuth process, grab your tokens (and store them for future use).

You'll need pyyaml installed to run it, but then it's just:

$ python interactive-console.py

and away you go! Tokens are stored in ~/.tumblr and are also shared by other Tumblr API clients like the Ruby client.

Running tests

The tests (and coverage reports) are run with nose, like this:

python setup.py test

Author: tumblr
Source Code: https://github.com/tumblr/pytumblr
License: Apache-2.0 license

#python #api 

Top-Notch 3d Design Services | 3d Printing Prototype Service

3D Design Service Provider

With the advancement in technology, many products have found a dire need to showcase their product virtually and to make the virtual experience as clear as actual a technology called 3D is used. The 3D technology allows a business to showcase their products in 3 dimensions virtually.

Want to develop an app that showcases anything in 3D?

WebClues Infotech with its expertise in mobile app development can seamlessly connect a technology that has the capability to change an industry with its integration in the mobile app. After successfully serving more than 950 projects WebClues Infotech is prepared with its highly skilled development team to serve you.

Want to know more about our 3D design app development?

Visit us at
https://www.webcluesinfotech.com/3d-design-services/

Visit: https://www.webcluesinfotech.com/3d-design-services/

Share your requirements https://www.webcluesinfotech.com/contact-us/

View Portfolio https://www.webcluesinfotech.com/portfolio/

#3d design service provide #3d design services #3d modeling design services #professional 3d design services #industrial & 3d product design services #3d web design & development company

Basil  Rasool

Basil Rasool

1616560637

ThreeJS Displacement & AlphaMaps - Create a 3D Terrain!

Today, we’re stepping back into the world of Three.js basics to create a very cool, interactive 3D terrain. This is achieved by using displacement maps and alpha maps.

0:00​ - Introduction
0:56​ - An Awesome Offer
01:26​ - Installing ThreeJS Starter
03:18​ - Adding the Plane Geometry
08:57​ - Plane Material
26:58​ - Mouse Interactivity
30:12​ - User Interface HTML/CSS
33:46​ - Closing

Threejs starter:

https://github.com/designcourse/three…

Mountain texture used:

https://unsplash.com/photos/TfBJbT9MrFc

Subscribe: https://www.youtube.com/channel/UCVyRiMvfUNMA1UPlDPzG5Ow

#threejs #javascript

Harry Patel

Harry Patel

1614145832

A Complete Process to Create an App in 2021

It’s 2021, everything is getting replaced by a technologically emerged ecosystem, and mobile apps are one of the best examples to convey this message.

Though bypassing times, the development structure of mobile app has also been changed, but if you still follow the same process to create a mobile app for your business, then you are losing a ton of opportunities by not giving top-notch mobile experience to your users, which your competitors are doing.

You are about to lose potential existing customers you have, so what’s the ideal solution to build a successful mobile app in 2021?

This article will discuss how to build a mobile app in 2021 to help out many small businesses, startups & entrepreneurs by simplifying the mobile app development process for their business.

The first thing is to EVALUATE your mobile app IDEA means how your mobile app will change your target audience’s life and why your mobile app only can be the solution to their problem.

Now you have proposed a solution to a specific audience group, now start to think about the mobile app functionalities, the features would be in it, and simple to understand user interface with impressive UI designs.

From designing to development, everything is covered at this point; now, focus on a prelaunch marketing plan to create hype for your mobile app’s targeted audience, which will help you score initial downloads.

Boom, you are about to cross a particular download to generate a specific revenue through your mobile app.

#create an app in 2021 #process to create an app in 2021 #a complete process to create an app in 2021 #complete process to create an app in 2021 #process to create an app #complete process to create an app

Rowan Benny

1649237810

Developing Chatbots project

If you want your business to prosper, you'll have to stay on top of the latest trends. The creation of a chatbot is a lengthy procedure. However, if well planned, it can be a piece of cake. The emergence of chatbots is one of the most significant recent developments in the area of customer care. On that topic, chatbots are one of the most well-known marketing tools in use today, aiding in the development of effective communication between businesses and their customers. So, read on to learn about data science projects for final year students as well as data science projects for beginners.

When it comes to chatbot creation, the most important thing to remember is to break the process down into simple steps and follow them one by one. Chatbots are quite handy if you want to improve your customer's experience by answering their questions, reducing human workload, performing remote troubleshooting, and so on. Rather than adopting a bot development framework or another platform, why not build a basic, intelligent chatbot from the ground up using deep learning? Though bots have a wide range of applications, one of the most well-known is live chat platforms, where users ask queries and a chatbot responds appropriately. There are different types of recommendation systems of the data science projects ideas.

So, in order to make your life easier, we've provided step-by-step chatbot programming guidelines. The days of waiting (not so patiently) on hold for answers to your most pressing questions are quickly fading away. In this lesson, you'll learn how to use Keras to create an end-to-end domain-specific intelligent chatbot solution.

Overview:

A chatbot is a piece of software that can communicate and conduct tasks in the same way that a human can. Because we're going to build a deep learning model, we'll need data to train it. Chatbots are marketing and automation solutions that are supposed to assist people by interacting with them and performing human-like interactions. Chatbots are widely utilised in customer service, social media marketing, and client instant messaging.

However, because this is a rudimentary chatbot, we will neither collect nor download any significant datasets. To communicate, these bots may employ Natural Language Processing (NLP) or audio analysis techniques, making them sound more natural. Based on how they're developed, there are two primary sorts of chatbot models: retrieval-based and generation-based models. These intentions may differ from one

chatbot solution to the next depending on the domain in which you are implementing a chatbot solution. AI-Chatbots are widely recommended by entrepreneurs and organizations. Let's take this data science project step by step.

Import and load the data file

import nltk

from nltk.stem import WordNetLemmatizer

lemmatizer = WordNetLemmatizer()

import json

import pickle

import numpy as np

from keras.models import Sequential

from keras.layers import Dense, Activation, Dropout

from keras.optimizers import SGD

import random

words=[]

classes = []

documents = []

ignore_words = ['?', '!']

data_file = open('intents.json').read()

intents = json.loads(data_file)

Preprocess data 

for intent in intents['intents']:

    for pattern in intent['patterns']:

     #tokenize each word

     w = nltk.word_tokenize(pattern)

     words.extend(w)

     #add documents in the corpus

     documents.append((w, intent['tag']))

           if intent['tag'] not in classes:

         classes.append(intent['tag'])

Create training and testing data 

training = []

 

output_empty = [0] * len(classes)

 

for doc in documents:

  

    bag = []

Build the model

model = Sequential()

model.add(Dense(128, input_shape=(len(train_x[0]),), activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(64, activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(len(train_y[0]), activation='softmax'))

sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)

model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])

hist = model.fit(np.array(train_x), np.array(train_y), epochs=200, batch_size=5, verbose=1)

model.save('chatbot_model.h5', hist)

print("model created"

 output_row = list(output_empty)

    output_row[classes.index(doc[1])] = 1

    training.append([bag, output_row])

random.shuffle(training)

training = np.array(training)

train_x = list(training[:,0])

train_y = list(training[:,1])

print("Training data created")

Predict the response (Graphical User Interface)

import nltk

from nltk.stem import WordNetLemmatizer

lemmatizer = WordNetLemmatizer()

import pickle

import numpy as np

from keras.models import load_model

model = load_model('chatbot_model.h5')

import json

import random

intents = json.loads(open('intents.json').read())

words = pickle.load(open('words.pkl','rb'))

def clean_up_sentence(sentence):

sentence_words = nltk.word_tokenize(sentence)

 return sentence_words

def bow(sentence, words, show_details=True):

 sentence_words = clean_up_sentence(sentence)

bag = [0]*len(words)

    for s in sentence_words:

     for i,w in enumerate(words):

         if w == s:

             bag[i] = 1

             if show_details:

                 print ("found in bag: %s" % w)

    return(np.array(bag))

def predict_class(sentence, model):

 p = bow(sentence, words,show_details=False)

    res = model.predict(np.array([p]))[0]

    ERROR_THRESHOLD = 0.25

     results.sort(key=lambda x: x[1], reverse=True)

    return_list = []

    for r in results:

        return_list.append({"intent": classes[r[0]], "probability": str(r[1])})

    return return_list

.def getResponse(ints, intents_json):

    tag = ints[0]['intent']

    list_of_intents = intents_json['intents']

    for i in list_of_intents:

     if(i['tag']== tag):

         result = random.choice(i['responses'])

         break

    return result

def chatbot_response(text):

    ints = predict_class(text, model)

    res = getResponse(ints, intents)

    return res

#Creating GUI with tkinter

import tkinter

from tkinter import *

def send():

    msg = EntryBox.get("1.0",'end-1c').strip()

    EntryBox.delete("0.0",END)

    if msg != '':

     ChatLog.config(state=NORMAL)

     ChatLog.insert(END, "You: " + msg + '\n\n')

     ChatLog.config(foreground="#442265", font=("Verdana", 12 ))

     res = chatbot_response(msg)

     ChatLog.insert(END, "Bot: " + res + '\n\n')

     ChatLog.config(state=DISABLED)

     ChatLog.yview(END)

base = Tk()

base.title("Hello")

base.geometry("400x500")

base.resizable(width=FALSE, height=FALSE)

#Create Chat window

ChatLog.config(state=DISABLED)

#Bind scrollbar to Chat window

scrollbar = Scrollbar(base, command=ChatLog.yview, cursor="heart")

ChatLog['yscrollcommand'] = scrollbar.set

#Create Button to send message

SendButton = Button(base, font=("Verdana",12,'bold'), text="Send", width="12", height=5,

                 bd=0, bg="#32de97", activebackground="#3c9d9b",fg='#ffffff',

                 command= send )

#Create the box to enter message

EntryBox = Text(base, bd=0, bg="white",width="29", height="5", font="Arial")

#EntryBox.bind("", send)

#Place all components on the screen

scrollbar.place(x=376,y=6, height=386)

ChatLog.place(x=6,y=6, height=386, width=370)

EntryBox.place(x=128, y=401, height=90, width=265)

SendButton.place(x=6, y=401, height=90)

base.mainloop()

If you want to learn more about how to do data science projects step by step, visit our website Learnbay: data science course in Chennai.

 

Keywords

Search Volume

Competition

data science project

17,480

25 (Low)

data science projects ideas

7,690

30 (Low)

data science project for final year

1,180

30(Low)

Data science project for beginners

7,500

26(Low)

data science projects step by step

2,240

31 (Low)