seq_id stringlengths 4 11 | text stringlengths 113 2.92M | repo_name stringlengths 4 125 ⌀ | sub_path stringlengths 3 214 | file_name stringlengths 3 160 | file_ext stringclasses 18
values | file_size_in_byte int64 113 2.92M | program_lang stringclasses 1
value | lang stringclasses 93
values | doc_type stringclasses 1
value | stars int64 0 179k ⌀ | dataset stringclasses 3
values | pt stringclasses 78
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
19965217882 |
# coding: utf-8
# In[79]:
# An event is some movement or action such as:
# - standup,
# - sitdown,
# - (taking a) step,
# - utter (a word).
# When no movement is occurring, we call the situation a "nothing" or "none" event.
# Sometimes there is no gap between events, e.g. when we are walking, we take one step a... | dilettante98/HAR | current/eventStreamPartitioner.py | eventStreamPartitioner.py | py | 5,423 | python | en | code | 0 | github-code | 13 |
31293353955 | from flask import jsonify#,request
from app.transit.webscrapping_extended_new import planet_points
from .intercept_planet import intercept_planet_starts
#--------------------------- check exaltation, detriment, fall --------------------------
def cal_status(btd,btm,bty):
natal = planet_points(btd, btm-1, bty,(13,9... | oprincely/map | app/api/planet_status.py | planet_status.py | py | 3,456 | python | en | code | 0 | github-code | 13 |
35064908801 | import boto3
import time
time.sleep(600)
l=["Namenode","Datanode1","Datanode2"]
p={}
client = boto3.client('ec2',region_name='us-east-1')
response = client.describe_instances()
for r in response['Reservations']:
for i in r['Instances']:
for j in i['Tags']:
if j[u'Key']=="Name":
p[j[u'Value']]=i... | amarwalke95/multinode-hdp-cluster | Python Script/pyth.py | pyth.py | py | 778 | python | en | code | 0 | github-code | 13 |
26801621352 | # -*- coding: utf-8 -*-
import re,sys
import numpy as np
from math import log
class PageSequence:
def extractFeatures(self, pages, pagenums):
feats=[]
maxx=0
for i in range(len(pages)):
feats.append({})
if pagenums[i] > maxx:
maxx=pagenums[i]
numbers=[None]*(maxx+1)
numbers[0]={}
numbers[0... | dbamman/book-segmentation | code/features/PageSequence.py | PageSequence.py | py | 3,671 | python | en | code | 12 | github-code | 13 |
23384164844 | # -*- coding: utf-8 -*-
import scrapy
import re
# from lxml import etree
# import logging
# logger = logging.getLogger(__name__)
class ImdbSpider(scrapy.Spider):
name = 'imdb'
allowed_domains = ['imdb.cn']
start_urls = ['http://www.imdb.cn/IMDB250/']
def parse(self, response):
with open('./... | dreamzhangyuyi/mySpider | mySpider/spiders/imdb.py | imdb.py | py | 2,289 | python | en | code | 0 | github-code | 13 |
72060662097 | #!/usr/bin/env python
# coding=utf-8
"""
Script for sobol sampling
https://people.sc.fsu.edu/~jburkardt/py_src/sobol/sobol_lib.py
"""
import math
import numpy as np
import random as rd
def i4_uniform(a, b, seed):
# *****************************************************************************80
#
## I4_U... | RWTH-EBC/pyCity_calc | pycity_calc/toolbox/mc_helpers/experiments/sobol_script.py | sobol_script.py | py | 5,737 | python | en | code | 7 | github-code | 13 |
73771910418 | #!/usr/bin/python3
# -*-coding:Utf-8 -*
"""
Ce fichier et le fichier principal,
il permet de lancer l'interface graphique
"""
import sys
import os
from tkinter import Tk, PhotoImage, Frame, Canvas, Button
from tkinter.messagebox import askretrycancel
from tkinter.filedialog import askopenfilename
from tkinter.ttk imp... | Gladorme/SMS-Project | SMS-PRoject-Server/www/html/projet_python.py | projet_python.py | py | 3,681 | python | fr | code | 2 | github-code | 13 |
26270268529 | def on_button_pressed_a():
music.stop_all_sounds()
input.on_button_pressed(Button.A, on_button_pressed_a)
def intruder():
if pins.digital_read_pin(DigitalPin.P16) == 1:
alarm()
serial.write_line("HUMAN DETECTED")
while pins.digital_read_pin(DigitalPin.P4) == 1:
strip.show_co... | PandaMerah/ATM_MainHub | main.py | main.py | py | 1,603 | python | en | code | 0 | github-code | 13 |
17333152224 | """Helper tools for converting between AaC objects and Pygls objects."""
from pygls.lsp import Position, Range
from typeguard import check_type
from aac.lang.definitions.source_location import SourceLocation
def source_location_to_position(location: SourceLocation) -> Position:
"""Convert a source location to a... | jondavid-black/AaC | python/src/aac/plugins/first_party/lsp_server/conversion_helpers.py | conversion_helpers.py | py | 1,227 | python | en | code | 14 | github-code | 13 |
5738698188 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
cc = """
Created on Fri Jan 7 05:05:36 2022
@author: santosg \n
Este programa saca la lista de directorios que se encuentran
dentro de un directorio padre, en este caso es './'
"""
import sys
import time
import funcionesLinux
print(cc)
time.sleep(3)
val = input("M... | santosg572/Python_Libros | p3.py | p3.py | py | 518 | python | es | code | 0 | github-code | 13 |
4139573974 | """Test functions in utils/ directory"""
import os
import sys
import unittest
# get base directory and import util files
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from utils import _threading, download_youtube, query_itunes, query_youtube
class testThreading(unittest.TestCase):
... | irahorecka/youtube2audio | tests/test_utils.py | test_utils.py | py | 8,748 | python | en | code | 141 | github-code | 13 |
24715771244 | import requests
import re
import os
import time
headers = {'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'}
def generateParameters(target_index):
"""生成请求参数"""
para = {
'append': 'list-home',
'paged': ta... | Sternoo/Requests | crowGirls.py | crowGirls.py | py | 2,485 | python | en | code | 0 | github-code | 13 |
14275359473 | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
# This is a simple example for a custom action which utters "Hello World!"
from .information import CovidInformation as covidInfo
fr... | sumanentc/COVID-19-bot | actions/actions.py | actions.py | py | 9,461 | python | en | code | 1 | github-code | 13 |
13934404665 | import sys
import tensorflow as tf
from PIL import Image, ImageFilter
import os
import pickle
import glob
import pprint
import operator
sy = ['!', '(', ')', '+', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '=', 'a', 'alpha', 'b', 'beta', 'c', 'cos', 'd', 'div', 'e', 'f', 'forward_s... | madhavgoyal98/MathsVision | predict_function.py | predict_function.py | py | 10,277 | python | en | code | 0 | github-code | 13 |
24592149506 | """
Script Name: ANOVA Analysis of Growth Count Matrices
Description:
This Python script is designed to perform one-way Analysis of Variance (ANOVA) on multiple matrices of growth count data.
It reads data from a CSV file and processes it to calculate the F-statistic and significance probability value.
The purpose is ... | AnqiW222/CMEE_MSc_Project | code/ANOVAtest.py | ANOVAtest.py | py | 2,801 | python | en | code | 0 | github-code | 13 |
13419751173 | from functools import reduce
from typing import Dict, List
from Code.Backend.Domain.DiscountPolicyObjects.AndDiscount import AndDiscount
from Code.Backend.Domain.DiscountPolicyObjects.ConditionalDiscount import ConditionalDiscount
from Code.Backend.Domain.DiscountPolicyObjects.MaxDiscount import MaxDiscount
from Code.... | yanay94sun/Workshop | Code/Backend/Domain/DiscountPolicyObjects/DiscountPolicy.py | DiscountPolicy.py | py | 9,872 | python | en | code | 0 | github-code | 13 |
35205574199 | import re
from util import aoc
NAMES = {
"one": 1,
"two": 2,
"three": 3,
"four": 4,
"five": 5,
"six": 6,
"seven": 7,
"eight": 8,
"nine": 9,
}
def part_one(input):
return either_part(input, r"\d", int)
def either_part(input, digit_expr, parse_digit):
re_first = re.compil... | barneyb/aoc-2023 | python/aoc2023/day01/trebuchet.py | trebuchet.py | py | 933 | python | en | code | 0 | github-code | 13 |
19220187227 | """
Daily coding problem #3:
Given the root to a binary tree, implement serialize(root),
which serializes the tree into a string, and deserialize(s),
which deserializes the string back into the tree.
Code author: Hoang Tuan Anh
Date: 10/09/2019
"""
from collections import deque
class Node:
def __init__(self, v... | peteranh/practice | serialise tree/solution.py | solution.py | py | 3,102 | python | en | code | 0 | github-code | 13 |
20880318133 | """Tests for the hyalus.run.clean module"""
__author__ = "David McConnell"
__credits__ = ["David McConnell"]
__maintainer__ = "David McConnell"
from datetime import date
from pathlib import Path
import shutil
from unittest.mock import patch
import pytest
from hyalus.run import clean
from hyalus.run.common import Hy... | dvmcconnell/hyalus | tests/run/test_clean.py | test_clean.py | py | 4,165 | python | en | code | 0 | github-code | 13 |
21562176539 |
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
sel... | singhv1shal/Driver-Safety-Interface | Help.py | Help.py | py | 9,670 | python | en | code | 1 | github-code | 13 |
7455493930 | from pants.backend.project_info.dependents import Dependents, DependentsRequest
from pants.engine.addresses import Addresses
from pants.engine.internals.selectors import Get, MultiGet
from pants.engine.rules import collect_rules, rule
from pants.engine.target import (
Dependencies,
DependenciesRequest,
Hydr... | AlexTereshenkov/pants-dep-graph | src/depgraph/backend/rules.py | rules.py | py | 4,356 | python | en | code | 1 | github-code | 13 |
29338434113 | import random
from aqt import mw
from aqt.qt import *
from anki.hooks import addHook, runHook
from anki.utils import intTime
from .config import *
ADDON_NAME='3ft_Under'
class ThreeFeetUnder:
def __init__(self):
self.config=Config(ADDON_NAME)
addHook(ADDON_NAME+'.configLoaded', self.onConfigLoade... | lovac42/3ft_Under | src/three_ft_Under/tft_under.py | tft_under.py | py | 1,722 | python | en | code | 0 | github-code | 13 |
4262660114 | import os
class BatchRename():
'''
批量重命名文件夹中的图片文件
'''
def __init__(self):
self.path = r'/running_saved/fabric_shortcut' # 表示需要命名处理的文件夹
self.save_path = r'/running_saved/fabric_video' # 保存重命名后的图片地址
def rename(self):
filelist = os.listdir(self.path) # 获取文件路径... | linhuaizhou/yida_gedc_fabric4show | frame_processing/rename_demo.py | rename_demo.py | py | 1,881 | python | zh | code | 1 | github-code | 13 |
17726161412 | from __future__ import annotations
from cell import Cell
class LinkedList:
def __init__(self):
sentinel = Cell(None, None, None)
sentinel.next = sentinel
sentinel.prev = sentinel
self.size = 0
self.sentinel = sentinel
def is_empty(self):
return self.size == 0
... | Inkkonu/PolytechClasses | S5_Algorithmic/pw4/linked_list.py | linked_list.py | py | 4,751 | python | en | code | 1 | github-code | 13 |
32650445416 | from flask import Flask, jsonify, abort, request, render_template
from flask.ext.sqlalchemy import SQLAlchemy
#from flask_restless import APIManager
#from flask_restful import Api
#api = Api(app)
app = Flask(__name__)
app.config.from_object('config')
db = SQLAlchemy(app)
import models
@app.route('/dev/<string:id>/')... | ray-x/flaskMultiDb | app.py | app.py | py | 1,016 | python | en | code | 0 | github-code | 13 |
39431862680 | # Access Websites for Price and Items
# Calculate list of User Items (shopping list)
# Return Prices and highlight Cheapest Store
import requests
from bs4 import BeautifulSoup
# Get users Shopping List
shopping = input('Please enter your items: ')
# Append Items to empty list
shopping_list = []
for item in shoppin... | ChrisQuestad/Code_Guild_Labs | Python/Grocery_App.py | Grocery_App.py | py | 605 | python | en | code | 0 | github-code | 13 |
72641498899 | import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
port="3306",
user="root",
password="yous1/2*3-LOLIl",
database="mydatabase"
)
cursor = mydb.cursor()
cursor.execute("DROP DATABASE IF EXISTS mydatabase; CREATE DATABASE mydatabase;")
cursor.execute(" SHOW DATABASES ")
for... | YoussefJemmane/ENSA | Python/TPs/TP5/EX1.py | EX1.py | py | 1,610 | python | en | code | 0 | github-code | 13 |
38580542347 | #! /usr/bin/python3
# -*- coding: utf-8 -*-
from flask import Flask, render_template, send_file, request, jsonify, send_from_directory
import os, subprocess, time, threading, subprocess
from flask_socketio import SocketIO, send, emit
import requests, logging, random, sys
import matplotlib as mpl
import matplotlib.pyp... | StepanovPlaton/WarTrade | run.py | run.py | py | 8,394 | python | en | code | 0 | github-code | 13 |
21245668641 | import math
EPSILON = 1e-08
def solve(a: float, b: float, c: float) -> tuple[float, float] | tuple[None, None]:
"""Вычисление корней квадратного уравнения.
a•x^2 + b•x + c = 0
Args:
a, b, c: Коэффициенты квадратного уравнения.
Raises:
ValueError: Аргумент a = 0.
TypeErr... | vakhet/otus_architecture_and_patterns | module_03/quadratic_equation.py | quadratic_equation.py | py | 982 | python | ru | code | 0 | github-code | 13 |
11427206218 | from collections import deque
monsters = deque(int(x) for x in input().split(','))
soldier = [int(x) for x in input().split(',')]
counter = 0
while monsters and soldier:
current_armour = monsters.popleft()
current_strike = soldier.pop()
if current_strike >= current_armour:
counter += 1
cu... | KrisKov76/SoftUni-Courses | python_advanced_09_2023/00_python_advanced_exam/01. Monster Extermination.py | 01. Monster Extermination.py | py | 760 | python | en | code | 0 | github-code | 13 |
7198015115 | from collections import OrderedDict
from matcher.allocation import Allocation
from matcher.exceptions import BadRequestException
from datetime import datetime
MAX_RESERVED_AMOUNT = 25000.00
MIN_RESERVED_AMOUNT = 5.00
MAX_MATCHED_AMOUNT = 25000.00
MIN_MATCHED_AMOUNT = 5.00
MIN_DONATION_AMOUNT = 5.00
MAX_DONATION_AMOU... | TClark000/fund-matching-pytest | matcher/fund_matcher.py | fund_matcher.py | py | 6,170 | python | en | code | 0 | github-code | 13 |
36933266943 | import email.utils
def users(user):
if(user[0].isalpha()):
user=user.replace('_','')
user=user.replace('-','')
user=user.replace('.','')
if(user.isalnum()):
return True
return False
n=int(input())
for i in range(n):
mail=input()
temp=ema... | imhariprakash/Courses | python/hackerrank programs/hackerrank-email-validation-py/main.py | main.py | py | 691 | python | en | code | 4 | github-code | 13 |
41593880242 | #url: https://www.hackerrank.com/challenges/piling-up/problem
# Enter your code here. Read input from STDIN. Print output to STDOUT
import collections
T = int(input())
for i in range(T):
n = int(input())
x = collections.deque(map(int, input().split()))
while len(x) > 1 and x[0] >= x[1]:
x.poplef... | Huido1/Hackerrank | Python/07 - Collections/08 - Piling Up!.py | 08 - Piling Up!.py | py | 452 | python | en | code | 0 | github-code | 13 |
42074473059 |
import cx_Oracle
import pandas as pd
import pyodbc
import sqlalchemy
import datetime as dt
import string
import platform
import os
import logging
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.operators.bash_operator import BashOperator
#from airflo... | 58173/vnsny_CODE | Airflow/CCSS MV Refresh_OLD.py | CCSS MV Refresh_OLD.py | py | 9,825 | python | en | code | 0 | github-code | 13 |
35181638470 | #!/usr/bin/env python3
import argparse
import sys
import pandas as pd
import numpy as np
from pybedtools import BedTool
BED_FIELDS = ["chrom", "start", "end", "name", "score", "strand"]
def argument_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
usage="annotate_peaks.py -i <bed>... | jperezalemany/DiegoMartin2022 | chip_seq/workflow/scripts/annotate_summits.py | annotate_summits.py | py | 4,538 | python | en | code | 0 | github-code | 13 |
16081890755 | import pickle
from heapq import heappush, heappushpop, heappop
from collections import deque
CAPACITY=5
N_GRAM=3
class JobTitleRecommender:
def __init__(self, v_tree_dir='bin/v_tree.pkl', trie_dir='bin/trie.pkl'):
# vocabulary tree for ngram likelihood estimates (next word prediction)
with open(v_tree_dir, 'rb')... | nikola-spasojevic/Interpolated_Language_Model | jobtitlerecommender/job_title_recommender.py | job_title_recommender.py | py | 1,975 | python | en | code | 0 | github-code | 13 |
10289731731 |
from django.conf.urls import include, url
from .views import (
ver_clientes,
consultar_cliente_nit,
consultar_cliente_nombre,
registrar_cliente,
mayorista,
descuento,
)
urlpatterns = [
url(r'^$',ver_clientes.as_view(),name='ver_clientes'),
url(r'^nit/$',consultar_cliente_nit.as_view(),name='consultar_nit')... | corporacionrst/software_RST | app/cliente_proveedor/cliente/urls.py | urls.py | py | 611 | python | es | code | 0 | github-code | 13 |
7649967295 | import numpy as np
class Shear(object):
def __init__(self):
pass
def create_shear(self, angle=45, lambda_1=1.2, lambda_2=0.8,
shift=[ [0], [-1] ], center=[[13], [13]]):
# define params for shearing matrix
self.angle = angle
self.theta = np.radia... | enegrini/Applications-of-No-Collision-Transportation-Maps-in-Manifold-Learning | code/Functions/Shear_LOT.py | Shear_LOT.py | py | 3,955 | python | en | code | 1 | github-code | 13 |
35886074344 | import pybullet as pb
from source.utils import rotate
from .i_matrix import IMatrix
class ContractVMArgs(object):
def __init__(self, camera_pos, target_pos, up_vector):
self.camera_pos = camera_pos
self.target_pos = target_pos
self.vector_up = up_vector
class ViewMatrixData(object):
... | AntivistRock/AIIJC-AI-in-robotics | source/engine/camera/view_matrix.py | view_matrix.py | py | 1,293 | python | en | code | 1 | github-code | 13 |
28244658503 | from typing import List
arr= [1, 2, 3, 4, 5, 7, 8, 11, 18]
target = 12
arr2 = [3,2,4]
# l r
target2 = 6
# Output: 1 3
# !!sorted arrr ints
# target
# 2 numbs add to target
# return indices
# 0n
# **list comp to eliminate right side where > target
def twoSum(nums: List[int], target: int) -> List[int]:
le... | thefrankharvey/cs | algorithms/two-pointers/two-sum.py | two-sum.py | py | 615 | python | en | code | 0 | github-code | 13 |
12269628222 |
# Creating a hash table with collision handling
class HashTable:
def __init__(self):
self.Max = 10
self.arr = [[] for i in range(self.Max)]
#Hash function
def get_hash(self, key):
h = 0
for char in key:
h += ord(char)
return h % self.Max
# Create a... | moussa-sanou/Python4 | EPI/Dictionaries/collision.py | collision.py | py | 1,254 | python | en | code | 0 | github-code | 13 |
25528110897 | #! /usr/bin/env python3
import rospy
from std_msgs.msg import Int64
rospy.init_node('pwm')
pwm_l = rospy.Publisher('/control_l',Int64,self.callback_l,queue_size=1)
pwm_r = rospy.Publisher('/control_r',Int64,self.callback_r,queue_size=1)
a = Int64()
b = Int64()
a.data = 65
b.data = 65
while not rospy.is_shutdown():
... | luppyfox/keng_boat_biw_odyssey | keng/test_robot01/src/PWM01.py | PWM01.py | py | 377 | python | en | code | 0 | github-code | 13 |
42363145111 | #! /usr/bin/env python
#
# reduce a EDGE galaxy from the GBT-EDGE survey
# all work occurs in a subdirectory of the "galaxy" name
#
# e.g. ./reduce.py [options] NGC0001 [...]
#
# options:
# -noweather
# -offtype PCA
# -nproc 4
# -scanblorder 7
# -posblorder 3
# -pixperbeam 3
# -rmsthresh ... | teuben/GBT-EDGE | reduce.py | reduce.py | py | 10,719 | python | en | code | 0 | github-code | 13 |
70457129937 | from modules.cloud import AWS, FIREHOSE, S3, SQS, chunker, logger
from modules.static import *
import json
logger.info('Importando constantes')
logger.info(f'Região: {REGION}')
logger.info(f'Account id: {ACCOUNT_ID}')
aws = AWS(REGION, ACCOUNT_ID)
s3 = S3(REGION, ACCOUNT_ID, BUCKET_NAME)
sqs = SQS(REGION, ACCOUNT_ID, ... | codeis4fun/aws-auto-deployment | manual_pipeline/4_from_sqs_to_firehose.py | 4_from_sqs_to_firehose.py | py | 1,383 | python | en | code | 1 | github-code | 13 |
40963677802 | # -*- coding: UTF-8 -*-
"""
# @Time : 2019-10-23 22:05
# @Author : yanlei
# @FileName: 回调函数_爬取数据.py
"""
import requests
from multiprocessing import Pool
def get_data(url):
response = requests.get(url)
if response.status_code == 200:
return url, response.content.decode('utf-8')
def call_back(args)... | Yanl05/FullStack | 并发编程/进程池/回调函数_爬取数据.py | 回调函数_爬取数据.py | py | 698 | python | en | code | 0 | github-code | 13 |
74525643856 | import tensorflow as tf
import tensorflow_addons as tfa
from sle_gan.network.common_layers import GLU
class InputBlock(tf.keras.layers.Layer):
"""
Input Block
Input shape: (B, 1, 1, 256)
Output shape: (B, 4, 4, 256)
"""
def __init__(self, filters: int, **kwargs):
supe... | gaborvecsei/SLE-GAN | sle_gan/network/generator.py | generator.py | py | 6,094 | python | en | code | 68 | github-code | 13 |
21964909992 | import matplotlib.pyplot as plt
x_values = range(1, 1001)
y_values = [x**2 for x in x_values]
"""
x_values = [1, 2, 3, 4, 5]
y_values = [1, 4, 9, 16, 25]
"""
plt.style.use('seaborn')
fig, ax = plt.subplots()
# Using a Colormap
ax.scatter(x_values, y_values, c=y_values, cmap=plt.cm.Blues, s=10)
# Defining Custom Col... | pranjal779/Eric-Matthes | Data Visualization/projectcode/scatter_squares.py | scatter_squares.py | py | 943 | python | en | code | 2 | github-code | 13 |
17971467809 | #!/usr/bin/env python
# coding: utf-8
# In[130]:
import numpy as np
# In[151]:
step = 0
a = []
for i in range(1,1000):
step=0
for i in range(0,1000):
out = np.random.randint(1,7)
if out < 4 and step!=0:
step = step -1
if out >= 4 and out < 6:
step = step+1
... | preetithakur1/learning_python | staircase.py | staircase.py | py | 488 | python | en | code | 0 | github-code | 13 |
16268877934 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask, request, jsonify
#from flask_sslify import SSLify
app = Flask(__name__)
# sslify = SSLify(app,subdomains=True)
# EAALNyShJXH8BAOo5o88mnzJu43t8TqeBl42qGNOna3Gx1RBhPUGvBcFB6tY6RXYNH7Df68Aj6IK3KMtRw9bBiHkeD5h6X7kAAlAxgFb5fiHbp3Udhx2sY7FET8xfIbz5ti... | mosragcool/WebHook_CapReport | src/main.py | main.py | py | 1,913 | python | en | code | 0 | github-code | 13 |
40963110404 | import pandas as pd
import turtle
raw_df = pd.read_csv('50_states.csv')
timmy = turtle.Turtle()
timmy.penup()
timmy.hideturtle()
def draw(state_name):
row = raw_df[raw_df['state'] == state_name]
print(int(row['x']))
timmy.goto(int(row['x']), int(row['y']))
timmy.write(state_name, align='center', font=... | jjbondoc/learning-python | hundred-days-of-code/day_025_pandas/sporcle/main.py | main.py | py | 1,083 | python | en | code | 0 | github-code | 13 |
38259447891 | import numpy as np
import pandas as pd
train = pd.read_csv('./practice/dacon/data/train/train.csv')
submission = pd.read_csv('./practice/dacon/data/sample_submission.csv')
day = 4
def split_to_seq(data):
tmp = []
for i in range(48):
tmp1 = pd.DataFrame()
for j in range(int(len(data)/48)):
... | dongjaeseo/study | practice/make_seq.py | make_seq.py | py | 2,526 | python | en | code | 2 | github-code | 13 |
72797006738 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""maria.py
This script validates our model against datasets from against which MARIA was
evaluated.
"""
import argparse
import copy
import json
import logging
import pprint
import random
import warnings
from pathlib import Path
from typing import Dict, List, Tuple
impo... | Novartis/AEGIS | experiments/evaluation/maria.py | maria.py | py | 6,236 | python | en | code | 9 | github-code | 13 |
20900619570 | #CTI_110
#M5HW1_DISTANCE TRAVELED
#JOE FRYE
#10/22/2017
speed= int(input(" how fast was the vehicle going?"))
time= int(input("how fas has the vehicle gone for?"))
print("hour(s)","\t distance traveled")
for time in range(0,4):
distance=time*speed
print(time,'\t\t\t',distance)
| fryej7125/cti110 | M5HW1_FRYE.py | M5HW1_FRYE.py | py | 311 | python | en | code | 0 | github-code | 13 |
12888564860 | import discord
import random
from discord.ext import commands
class Random(commands.Cog):
def __init__(self, bot):
self.bot = bot
# example of this would be input: "Mamatay ka na." -> output: "MaMatAy KA nA."
@commands.command(name="memeify", aliases=["spongebob"], help="Spongebob loves you and m... | brainfrozeno00o/DeeDeeEs-Discord-Bot | cogs/random-stuff.py | random-stuff.py | py | 1,755 | python | en | code | 0 | github-code | 13 |
18824526076 | # -*- coding: utf-8 -*-
import os
import sys
import click
import logging
import numpy as np
import pandas as pd
import boto3
from dotenv import get_variable
env_file = '/home/ubuntu/science/quora_question_pairs/.env'
S3_BUCKET = get_variable(env_file, 'S3_BUCKET')
S3_DATA_PATH = get_variable(env_file, 'S3_DATA_PATH... | RJTK/kaggle_quora | src/data/download_raw_data.py | download_raw_data.py | py | 2,010 | python | en | code | 0 | github-code | 13 |
73539347538 | from cvxopt import matrix, solvers
import numpy
from common import *
def f(features, b, w):
return sum([a * b for a, b in zip(features, w)]) + b
def train_svm(training_set, C):
solvers.options['show_progress'] = False
m = len(training_set) # number of training examples
dim = 30 # dimension of the fe... | anton-bannykh/ml-2013 | dmitry.gerasimov/lab-svm/svm.py | svm.py | py | 2,146 | python | en | code | 4 | github-code | 13 |
42414403065 | from selenium.webdriver.common.keys import Keys
from functional_tests.base import FunctionalTest
class LayoutTest(FunctionalTest):
def test_layout_styling(self):
# I'm opening home page and expect to see nice CENTERED task field
self.browser.get(self.live_server_url)
self.browser.set_wind... | festeh/mytodolist | functional_tests/test_layout.py | test_layout.py | py | 1,060 | python | en | code | 0 | github-code | 13 |
29044621463 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 29 14:52:38 2021
@author: claum
"""
# maps label to attribute name and types
label_attr_map = {
# ==============================================================================================================
"empty_A=": ["empty_A", float],
"empt... | CMirabella180890/Aircraft-Design | Raymer_sizing/params.py | params.py | py | 2,748 | python | en | code | 0 | github-code | 13 |
1793899351 | """
MultipleLingersTelegramFilterByCommandTrigger telgram bot chat handlers to control multiple Lingers
"""
# Operation specific imports
import ast
import json
import threading
from collections import defaultdict
from datetime import datetime, timedelta
from telegram import ReplyKeyboardMarkup
from telegram.ext import... | GreenBlast/Linger | LingerTriggers/MultipleLingersTelegramFilterByCommandTrigger.py | MultipleLingersTelegramFilterByCommandTrigger.py | py | 11,307 | python | en | code | 0 | github-code | 13 |
33573621035 | # Importing the required packages
from flask import Flask, request, render_template
import telegram
import os
from nltk.chat.eliza import eliza_chatbot
# Bot credentials
from botcontroller.credentials import BOT_TOKEN, BOT_USERNAME, URL
# Initialize flask app
app = Flask(__name__)
# Initialize telegram bot
bot = tel... | rexsimiloluwah/telebot | bot.py | bot.py | py | 1,904 | python | en | code | 0 | github-code | 13 |
36662114938 | #######################################################
### Get one row data to calculate.
### Calculate block(R1~4/Gr1~4/Gb1~4/B1~4) std and avg.
import numpy as np
import time
import csv
import datetime
import enum
import os
StartTime = time.time()
#######################################################
### Change... | dinoliang/SampleCode | Python/raw/channelrowparse_maxmin.py | channelrowparse_maxmin.py | py | 18,774 | python | en | code | 0 | github-code | 13 |
5075432955 | from src.model.user import User
from src.model.base import db
admin = User(title='admin', release_date='dssd')
guest = User(title='guest', release_date='ds')
db.session.add(admin)
db.session.add(guest)
db.session.commit()
print(User.query.all())
| balramsinghindia/python-flask-sqlalchemy | queries.py | queries.py | py | 249 | python | en | code | 0 | github-code | 13 |
11510832829 |
# Recursive-descent parser with Pratt-style expression parsing. Based on:
# http://www.craftinginterpreters.com/parsing-expressions.html
# http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
import json
import re
from collections import defaultdict
from contextlib import contextma... | adamsol/Pyxell | src/parser.py | parser.py | py | 26,079 | python | en | code | 51 | github-code | 13 |
3725416190 | """Utility functions for NumPy-based Reinforcement learning algorithms."""
import numpy as np
from garage._dtypes import TrajectoryBatch
from garage.misc import tensor_utils
from garage.sampler.utils import rollout
def samples_to_tensors(paths):
"""Return processed sample data based on the collected paths.
... | jaekyeom/IBOL | garaged/src/garage/np/_functions.py | _functions.py | py | 4,795 | python | en | code | 28 | github-code | 13 |
17041795824 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayInsSceneInshealthserviceprodItemoperationrecordQueryModel(object):
def __init__(self):
self._ant_ser_prod_no = None
self._init_time_end = None
self._init_time_start ... | alipay/alipay-sdk-python-all | alipay/aop/api/domain/AlipayInsSceneInshealthserviceprodItemoperationrecordQueryModel.py | AlipayInsSceneInshealthserviceprodItemoperationrecordQueryModel.py | py | 5,685 | python | en | code | 241 | github-code | 13 |
3560239242 | from django.db import models
from django.contrib.auth.models import User
import jdatetime
from datetime import timedelta,date
from django.core.validators import MaxValueValidator, MinValueValidator
from djmoney.models.fields import MoneyField
from django.db.models import Avg,Max,Min
from argparse import Namespace
#from... | abbas-ezoji/proj | app1/models.py | models.py | py | 11,380 | python | en | code | 0 | github-code | 13 |
6964202906 | import monkey
from . import state
from . import factory
from . import util
def reset_invincibility():
state.invincible = False
def mario_is_hit(player, foe):
if state.invincible:
return
if state.mario_state == 0:
player.set_state('dead')
s = monkey.script()
ii = s.add(mon... | fabr1z10/monkey_examples | demo/game/rooms/functions.py | functions.py | py | 4,959 | python | en | code | 0 | github-code | 13 |
49215718274 | import copy
import random
import math
import pdb
import tttFunctions as tFn
import strFile
class Ai:
def __init__(self, symbol, algo, name):
self.symbol = symbol
self.func = algo
self.name = name
def choose(self, board):
return self.func(board, self.symbol)
# All the AI ... | StewartJake/pythonProjects | ticTacToe/gameAi.py | gameAi.py | py | 5,304 | python | en | code | 0 | github-code | 13 |
11562655681 | from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
posts = []
@app.route('/')
def homepage():
return render_template('home.html')
@app.route('/blog')
def blog_page():
return render_template('blog.html', posts=posts)
@app.route('/post', methods=['GET', 'POST'])
def... | ikostan/automation_with_python | video_code_section_10/app.py | app.py | py | 1,780 | python | en | code | 0 | github-code | 13 |
26512161210 | '''
Escreva um programa que leia a velocidade de um carro.
Se ele ultrapassar 80km/hr, mostre uma mensagem dizendo que ele foi multado e o valor da multa.
A multa custa R$7,00 por cada km acima do limite
'''
from random import randrange
from time import sleep
velR=randrange(60,180)
print(("Você estava dirigindo a {}k... | MLucasf/PythonExercises | ex029.py | ex029.py | py | 499 | python | pt | code | 0 | github-code | 13 |
2650381902 | import sys
import random
import math
def dist(list1,list2):
sum=0
for i in range(len(list1)):
sum+=(list1[i]-list2[i])**2
return sum
def mean(list1):
mean=[]
for col in range(len(list1[0])):
mean.append(round((sum([item[col] for item in list1]))/len(list1),2))
return mean
... | Suraj-Jha1508/Machine_Learning_CS675 | Assignments/K-Mean(8)/K-Means.py | K-Means.py | py | 1,766 | python | en | code | 1 | github-code | 13 |
71084003219 | users = {}
def register(username: str, license_plate: str):
if username in users.keys():
print(f'ERROR: already registered with plate number {license_plate}')
else:
users[username] = license_plate
print(f'{username} registered {license_plate} successfully')
def unregister(username: s... | bobsan42/SoftUni-Learning-42 | ProgrammingFunadamentals/a25DictionariesExrecises/suparking.py | suparking.py | py | 959 | python | en | code | 0 | github-code | 13 |
8861129225 | # Input
L = ['goat', 'ant', 'bat', 'zebra', 'monkey']
# Processing
# Arun
L.append('buffalo')
#L.replace('goat', 'giraffe')
L.remove('goat')
L.append('giraffe')
L.sort(reverse=True)
# Output
print(L)
# ['zebra', 'monkey', 'giraffe', 'buffalo', 'bat', 'ant']
| mindful-ai/oracle-aug20 | day_01/labs/lab_03.py | lab_03.py | py | 288 | python | en | code | 0 | github-code | 13 |
11261698585 | import sys
simple, sliding = -1, -3
q = [-1,-1,-1,-1]
for i, line in enumerate(sys.stdin):
curr = i % 4
q[curr] = int(line.strip())
sliding += int(q[curr] > q[(i+1) % 4])
simple += int(q[curr] > q[(i-1) % 4])
print(simple, sliding) | Tethik/advent-of-code | 2021/01/both-golf.py | both-golf.py | py | 261 | python | en | code | 0 | github-code | 13 |
35128858169 | """
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def maxDepth(self, root: 'Node') -> int:
if not root:
return 0
depth = 0
stack = [(root, 1)]
while stack:... | aakanksha-j/LeetCode | 559. Maximum Depth of N-ary Tree/iterative_stack_dfs_2.py | iterative_stack_dfs_2.py | py | 891 | python | en | code | 0 | github-code | 13 |
33516219118 | # -------------------------------------------------------------------------------
# Name: Load HUCs
#
# Purpose: Loop over a ShapeFile of HUC8 polygons and insert essential
# information into SQLite database
#
# Author: Philip Bailey
#
# Date: 12 Aug 2019
#
# ---------------------------------------... | Riverscapes/riverscapes-tools | lib/commons/scripts/load_hucs.py | load_hucs.py | py | 3,914 | python | en | code | 10 | github-code | 13 |
1569416077 | from kdtree import KDTree
import sys, time, random, csv, math
from align_eigenspaces import *
from ContactGeometry1 import *
import numpy as np
import matplotlib as plt
from scipy.optimize import fmin_bfgs
def dot_product(Va, Vb):
#No need to do transpose here. its done earlier
d=0
for i in range(len(Va))... | itsvismay/MultiDimensionalTrees | version3.py | version3.py | py | 3,386 | python | en | code | 1 | github-code | 13 |
21524828774 | """
This program compiles an Excel spreadsheet for manually mapping dataset-specific species names to
a common taxonomy.
We are currently doing the counting here instead of as a part of the Cosmos DB query
- see SDK issue in notes.
It first goes through the list of datasets in the `datasets` table to find out which "... | UCSD-E4E/Owl_Classification_Interface | src/MegaDetector/cameratraps/detection/data_management/megadb/query_and_upsert_examples/species_by_dataset.py | species_by_dataset.py | py | 10,859 | python | en | code | 0 | github-code | 13 |
18145583439 | from pwn import remote
def main():
#r = process("./service")
r = remote("107.21.135.41", 2222)
r.recvuntil("menu: ")
r.sendline("1")
r.interactive()
for x in range(100):
line = r.recvuntil("? ")
print(line)
words = line.split()
a = int(words[4])
b = int... | aditya70/ss-course | lab1/c2.py | c2.py | py | 509 | python | en | code | 0 | github-code | 13 |
14274304806 | #python
# File: mc_lxRename_rename.py
# Author: Matt Cox
# Description: Bulk renames a selection of items, changing their names to the rename string.
import lx
import re
lxRRenameText = lx.eval( "user.value mcRename.rename ?" )
if len(lxRRenameText) != 0:
try:
lxRSelectedItems = lx.evalN('query sceneser... | Tilapiatsu/modo-tila_customconfig | mc_lxRename/Scripts/mc_lxRename_rename.py | mc_lxRename_rename.py | py | 949 | python | en | code | 2 | github-code | 13 |
25123696191 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 14 22:19:03 2023
@author: Themanwhosoldtheworld
https://leetcode.com/problems/sqrtx/
"""
class Solution:
def mySqrt(self, x: int) -> int:
low=0
high=x
while(low<=high):
mid=low+(high-low)//2
if (m... | themanwhosoldtheworld7/LeetCode-Python | Sqrt.py | Sqrt.py | py | 498 | python | en | code | 0 | github-code | 13 |
15550968235 | from pwn import *
from pwn import p64
from ctypes import *
debug = 0
gdb_is = 0
# context(arch='i386',os = 'linux', log_level='DEBUG')
context(arch='amd64',os = 'linux', log_level='DEBUG')
if debug:
context.terminal = ['/mnt/c/Users/sagiriking/AppData/Local/Microsoft/WindowsApps/wt.exe','nt','Ubuntu','... | Sagiring/Sagiring_pwn | hub/one_hub/hub_one.py | hub_one.py | py | 859 | python | en | code | 1 | github-code | 13 |
28389657662 | import sys, os, time, pyautogui, math
PACKAGE_PARENT = '../..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT)))
from master_bot.master import Bot as runeBot
player = runeBot(os.path.normpa... | SimSam115/orsr_bbb | tests/usingMaster_bot/killChickens.py | killChickens.py | py | 1,119 | python | en | code | 0 | github-code | 13 |
29478144455 | def main():
#write your code below this line
i = 0
num = int(input("How many times?"))
while (i < num):
print_text()
i += 1
def print_text():
print("In a hole in the ground there lived a method")
if __name__ == '__main__':
main()
| den01-python-programming-exercises/exercise-2-22-reprint-jakeleesh | src/exercise.py | exercise.py | py | 272 | python | en | code | 0 | github-code | 13 |
12653066200 | import numpy as np
import cv2 as cv
#---图像上的算数运算:加法---
x = np.uint8([250])
y = np.uint8([10])
# 250+10=260 => 255 OpenCV加法是饱和运算
print(cv.add(x, y))
# 250+10=260 % 256 = 4 Numpy加法是模运算
print(x+y)
#---图像上的算数运算:图像融合(两个矩形图像)---
# 对图像赋予不同的权重,以使其具有融合或透明的感觉
img1 = cv.imread('D:/PycharmProjects/pythonProject1/Opencv 4.5... | Darling1116/Greeting_1116 | Opencv/lesson_3/Add_1.py | Add_1.py | py | 808 | python | zh | code | 0 | github-code | 13 |
40424741685 | from data_structures.hashtable import Hashtable
import re
def hashtable_repeated_word(word):
regex_string = re.compile('[^a-zA-Z ]')
words_strip = regex_string.sub('', word)
words = words_strip.lower().split()
dict = set()
for word in words:
if word in dict:
return word
... | LieslW/data-structures-and-algorithms | python/code_challenges/hashtable_repeated_word.py | hashtable_repeated_word.py | py | 356 | python | en | code | 0 | github-code | 13 |
71190983699 | import random # 导入 random 包来生成随机的丢失的分组
from socket import *
# 创建一个 UDP 套接字
serverSocket = socket(AF_INET, SOCK_DGRAM)
serverSocket.bind(('', 12000))
print('服务器已启动!\n')
while True:
# 生成 0 到 10 的随机数字
rand = random.randint(0, 10)
# 接收客户分组和客户地址
message, address = serverSocket.recvfrom(1024)
print(messa... | young-trigold/computer_networking | socket_propramming/udp_ping/UDPPingServer.py | UDPPingServer.py | py | 633 | python | zh | code | 1 | github-code | 13 |
71471396177 | from typing import Any, Dict, Sequence
import numpy as np
import onnx
from onnx.backend.test.case.base import Base
from onnx.backend.test.case.node import expect
class Concat(Base):
@staticmethod
def export() -> None:
test_cases: Dict[str, Sequence[Any]] = {
"1d": ([1, 2], [3, 4]),
... | onnx/onnx | onnx/backend/test/case/node/concat.py | concat.py | py | 1,751 | python | en | code | 15,924 | github-code | 13 |
30774665276 | from collections import Counter, namedtuple
import traceback
import numpy as np
import pandas as pd
import pytz
import statsmodels.formula.api as smf
from ..exceptions import MissingModelParameterError, UnrecognizedModelTypeError
from ..features import compute_temperature_features
from ..metrics import ModelMetrics
f... | openeemeter/eemeter | eemeter/caltrack/usage_per_day.py | usage_per_day.py | py | 78,117 | python | en | code | 197 | github-code | 13 |
29807395266 | # shutil.which supported from Python 3.3+
from shutil import which
from json import loads
import subprocess
class Launch:
# Check if a shell command is available on the system.
@staticmethod
def check_shell_tool(name):
return which(name) is not None
@staticmethod
def check_py_gtk():
... | lyrebird-voice-changer/lyrebird | app/core/launch.py | launch.py | py | 1,649 | python | en | code | 1,770 | github-code | 13 |
8224451868 | import time
import os
import argparse
import numpy as np
from numpy.lib.stride_tricks import sliding_window_view
import pandas as pd
from tqdm import tqdm
from joblib import Parallel, delayed
from gtda.homology import VietorisRipsPersistence
from sklearn.metrics import f1_score
import matplotlib.pyplot as plt
import t... | shubham-kashyapi/Time-Series-TDA | train.py | train.py | py | 11,217 | python | en | code | 0 | github-code | 13 |
17043216144 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayMerchantStoreShopcodeCreateModel(object):
def __init__(self):
self._address = None
self._category_id = None
self._city_code = None
self._district_code = None... | alipay/alipay-sdk-python-all | alipay/aop/api/domain/AlipayMerchantStoreShopcodeCreateModel.py | AlipayMerchantStoreShopcodeCreateModel.py | py | 9,219 | python | en | code | 241 | github-code | 13 |
30587527540 | import re
import sys
import text_cleaner
from pprint import pprint
from mongo.mongo_provider import MongoProvider
mongo_provider = MongoProvider()
author_address_regex = r";\s*(?![^[]*])"
bracket_regex = r"\[(.*?)\]"
publications_collection = mongo_provider.get_publications_collection()
wos_collection = mongo_provi... | juliomarcopineda/jpl-academic-divisions | clean_wos.py | clean_wos.py | py | 2,837 | python | en | code | 0 | github-code | 13 |
2032728310 | import sys
rl = sys.stdin.readline
# 유클리드 호제법
def GCD(A, B): # 최대공약수
if B == 0:
return A
return GCD(B, A % B)
T = int(rl())
for i in range(T):
A, B = map(int, rl().split())
print(int(A*B/GCD(A, B)))
| YeonHoLee-dev/Python | BAEKJOON/[1934] 최소공배수.py | [1934] 최소공배수.py | py | 253 | python | ko | code | 0 | github-code | 13 |
74302135378 | # +
import numpy as np
from functools import wraps
from time import time
def timing(f):
@wraps(f)
def wrap(*args, **kw):
ts = time()
result = f(*args, **kw)
te = time()
print(f'Elapsed Time: {(te-ts): 2.4f} sec')
return result
return wrap
# -
DAY = 7
def readnu... | jonasgrebe/py-aoc-2021 | 07.py | 07.py | py | 1,218 | python | en | code | 0 | github-code | 13 |
1838365052 | from datetime import date
class Prodotto:
M = "altamente disponibile"
D = "disponibile"
E = "non disponibile"
MAXSCORTE = 1000
MAXORDINE = 350
def __init__(self, nome):
self.nome=nome
self.quantita=0
self.stato_scorte=Prodotto.E
self._acquirenti=dict()
@p... | DanyR2001/Codice-Percorso-Universitario | Terzo anno/Programmazione Avanzata/Primi esercizi/ripasso/Esercitazione 13-2-2022/Es1.py | Es1.py | py | 5,706 | python | it | code | 0 | github-code | 13 |
34521916162 | import pytest
from utils import *
def test_total_word_count():
data = {'0100405060': ['the', 'red', 'magnet', 'elephant', 'market'],
'0100405040': ['elephant', 'magnet', 'the', 'market'],
'0410500030': ['the', 'red', 'violin', 'wolf'],
'3900339302': ['the', 'yellow', 'm... | Levakov023/Python | 1/test_utils.py | test_utils.py | py | 6,514 | python | en | code | 0 | github-code | 13 |
17521336747 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn import metrics
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
def CreateLogisticRegressionModel(dataframe,... | KyleProtho/AnalysisToolBox | Python/PredictiveAnalytics/CreateLogisticRegressionModel.py | CreateLogisticRegressionModel.py | py | 3,936 | python | en | code | 0 | github-code | 13 |
25698264245 | import paho.mqtt.client as mqtt
import requests
import json
connected = False
def on_connect(client, userdata, flags, rc):
global connected
print("Connected with result code "+str(rc))
connected = True
client.subscribe("auck/*tempandpress*")
print('connnected')
# The callback for when a PUBLISH me... | abdool-sp/trial | data/utils.py | utils.py | py | 784 | python | en | code | 0 | github-code | 13 |
21485578792 | from pymongo import MongoClient
import datetime
marathon_public_url = "54.148.237.235"
mongo_port = 10109
client = MongoClient(marathon_public_url, mongo_port)
db = client.test_database
post1 = {"author": "Mike",
"text": "My first blog post!",
"tags": ["mongodb", "python", "pymongo"],
"date"... | markfjohnson/dcos_spark_demo | mongodb/Mongo_Hello_World.py | Mongo_Hello_World.py | py | 757 | python | en | code | 0 | github-code | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.