What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-09 06:07:01
display values on countplot
plt.figure(figsize=(12,8)) ax = sns.countplot(x="AXLES", data=dfWIM, order=[3,4,5,6,7,8,9,10,11,12]) plt.title('Distribution of Truck Configurations') plt.xlabel('Number of Axles') plt.ylabel('Frequency [%]') for p in ax.patches: ax.ann... Add solution -
SQL 2021-09-08 18:55:02
sql insert bulk list of dictionaries
for item_code, companywise_item_data in items_default_data.items(): for company, item_default_data in companywise_item_data.items(): to_insert_data.append(( frappe.generate_hash("", 10), item_code, 'Item', 'item_defaul... Add solution -
Python 2021-09-08 12:49:02
SPARK Kafka Write Stream
# Write key-value data from a DataFrame to a specific Kafka topic specified in an option ds = df \ .selectExpr("CAST(key AS STRING)", "CAST(value AS STRING)") \ .writeStream \ .format("kafka") \ .option("kafka.bo... Add solution -
Python 2021-09-08 06:57:01
python returen Thread
def foo(bar, baz): print 'hello {0}'.format(bar) return 'foo' + baz from multiprocessing.pool import ThreadPool pool = ThreadPool(processes=1) async_result = pool.apply_async(foo, ('world', 'foo')) # tuple of args for foo # do some other stuff in t... Add solution -
Python 2021-09-08 05:31:01
python funtion
def myFunction(say): #you can add variables to the function print(say) myFunction("Hello") age = input("How old are you?") myFunction("You are {} years old!".format(age)) #this is what you get: Hello How old are you? &... Add solution -
Python 2021-09-07 14:32:03
kiteconnect python api
import logging from kiteconnect import KiteConnect logging.basicConfig(level=logging.DEBUG) kite = KiteConnect(api_key="your_api_key") # Redirect the user to the login url obtained # from kite.login_url(), and receive the request_token # from... Add solution