blob_id
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
0f198e04e063697ab456d9d2c54f5cc629b70d60
aru233/wikipedia-search-engine
/code/text_preprocessor.py
UTF-8
1,720
2.84375
3
[]
no_license
# import nltk # nltk.download('punkt') # for the tokenizer # from nltk.corpus import stopwords # from nltk import word_tokenize # from nltk.stem.porter import * from collections import defaultdict from nltk.stem.snowball import SnowballStemmer import Stemmer # pyStemmer import re import config stopWordsDict = defa...
true
9e29ca66a1a95c56fa448412f0edbfa64b67b4cd
dkamins/ax_metrics
/py/axonchisel/metrics/io/erout/plugins/ero_geckoboard/text.py
UTF-8
7,606
2.703125
3
[ "MIT" ]
permissive
""" Ax_Metrics - EROut plugin 'geckoboard_text' Writes Geckoboard JSON output for various charts for use with http://www.geckoboard.com. Contents: - EROut_geckoboard_text - pages of text, optionally flagged See: - https://developer.geckoboard.com/#geck-o-meter ----------------------------------------------...
true
f464d4cf8561f09f0129c0259732b1d96e7a800a
gersonfoks/rational-dialog-model
/misc/old/test_dialogue.py
UTF-8
1,360
2.84375
3
[]
no_license
import torch from modules.LanguageModels.LstmLanguageModel import LSTMLanguageModel from modules.pytorch_lightning.LightningLanguageModel import LightningLanguageModel from daily_dialog.DialogTokenizer import get_daily_dialog_tokenizer from utils import get_lastest_model_name save_path = r'./saved_models/' device = "c...
true
a9d4a0377c6ec457e2bfd4cd98a3175ab41c3542
Ulkiorka/Stepik_home_work
/pages/basket_page.py
UTF-8
538
2.5625
3
[]
no_license
from .base_page import BasePage from .locators import BasketPageLocators class BasketPage(BasePage): def should_be_no_items(self): """Проверка что в корзине нет товаров""" assert self.is_not_element_present(*BasketPageLocators.BASKET_SUMMARY), "basket is not empty" def should_be_empty_message...
true
2e8ec90ef723cb901b21b77c1447bf57feae0758
MrCsabaToth/IK
/2019Nov/linked_lists/lru_cache.py
UTF-8
626
2.828125
3
[ "Apache-2.0" ]
permissive
from collections import OrderedDict def implement_LRU_cache(capacity, query_type, key, value): od = OrderedDict() ret = [] length = len(query_type) i = 0 while i < length: if query_type[i]: if len(od) < capacity or key[i] in od: od.pop(key[i], None) ...
true
83768498bdc019ef7808d128ab6f3b97835e6e28
jsilvia721/steganography
/index.py
UTF-8
468
2.953125
3
[]
no_license
import image fg = image.Image('secret.png') newIm = image.EmptyImage(fg.getWidth(),fg.getHeight()) for row in range(fg.getHeight()): for col in range(fg.getWidth()): fgpix = fg.getPixel(col,row) fgr = fgpix.getRed() if fgr % 2 == 0: newPix = image.Pixel(255,255,255) el...
true
d78eab8dc619d369b42778c8977f92c3c6a56183
ddw02141/BOJ
/parametric_search/1637.py
UTF-8
729
3.28125
3
[]
no_license
def lteCounts(n): count = 0 for acb in acbs: a, c, b = acb if a <= n <= c: count = count + (n - a) // b + 1 elif c < n: count = count + (c - a) // b + 1 return count # N = 20_000 N = int(input()) acbs = [] for _ in range(N): acb = list(map(int, input()....
true
eb2bdbbe95304857d96ee5468ebf25c3931365d8
gabriellaec/desoft-analise-exercicios
/backup/user_191/ch74_2020_04_12_18_03_15_488882.py
UTF-8
222
2.59375
3
[]
no_license
def conta_bigramas(lista): dic = {} i=0 bigrama = lista[i]+lista[i+1] for i in range lista: if bigrama not in dic: dic[bigrama]=1 else: dic[bigrama]+=1 return dic
true
b3dc94bd8b2c28298263419ff3516eeba92d918f
Madeleine2296/mapbox
/Mapbox graphs.py
UTF-8
1,546
2.828125
3
[]
no_license
#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import numpy as np import plotly.graph_objs as go import plotly.express as px ## start to visualize data. The first geograph is a visualization of 50K rows of the data set. ## The second visualiz...
true
aeceae06fdb18e7c2fc094e2d9b6429807dfe45d
hmarmal/Ch.03_Input_Output
/3.0_Jedi_Training.py
UTF-8
1,581
5
5
[]
no_license
#Sign your name:Henry Hmar # 1.) Write a program that asks someone for their name and then prints their name to the screen? firstname = input("what is your first name?") # What is your name? lastname = input("Hey " + firstname + " what is your lastname?") print("Hello",firstname , lastname ) # 2. Write a a p...
true
0fe4d4bc06fbe7bf02f4ff6f3945cf4a3320456c
Krishnarohith10/face-recognition-autoencoder
/unsupervised_pretraining_using_autoencoder_and_machine_learning.py
UTF-8
3,330
2.546875
3
[]
no_license
import os import cv2 import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from sklearn.svm import SVC from sklearn.ensemble import VotingClassifier from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_te...
true
22f6ce4db935e7d953b384f75080793920b62c12
krishnakrib/wer
/b10.py
UTF-8
75
3.140625
3
[]
no_license
add=0 z=int(input()) while(z>0): z=z//10 add=add+1 print("",add)
true
a447bd425cf921bb73f986a65c5ff0f01f6e3fe3
JoonBeomLee/Algorithm_Python
/site/PROGRAMMERS/src/python/코딩테스트_고득점_kit/스택_큐/기능개발.py
UTF-8
668
3
3
[]
no_license
def solution(progresses, speeds): answer = [] jobs_day = [] for prog, speed in zip(progresses, speeds): work_time = (100 - prog) // speed # 소수점으로 작업이 남을경우 + 1day if (100 - prog) % speed > 0: work_time += 1 jobs_day.append(work_time) for d_idx, day in e...
true
1830f5bd5f19da45e24a651dd965454239c98ba8
SuMin-Kwon/python
/class_test.py
UTF-8
372
3.3125
3
[]
no_license
from class01 import Stock li = [["item", "open", "high", "low", "close"], ["A01", 100, 110, 70, 100], ["B01", 200, 210, 180, 190], ["A11", 300, 310, 300, 310]] stock = Stock(li) stock.print_close() stock.print_close_grater( 150 ) print( stock.get_open_item...
true
b6ebbe01081f5fa6ce3c4581130bf2504a4c6fb9
banux/Agnovi-Sortie-gae
/resto_bar.py
UTF-8
2,910
2.625
3
[]
no_license
import cgi from google.appengine.ext import webapp from google.appengine.api import users from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db class Place(db.Model): type = db.StringProperty() name = db.StringProperty() description = db.StringProperty(multiline=True) c...
true
86746ae1ca16070147ece4c31d840fbcbbd6c24c
andysitu/algo-problems
/leetcode/400/318_max_prod_word_lengths.py
UTF-8
825
3.1875
3
[]
no_license
from typing import List class Solution: def maxProduct(self, words: List[str]) -> int: abcs = "abcdefghijklmnopqrstuvwxyz" wlen = len(words) sets = [None] * wlen for i in range(wlen): sets[i] = set(words[i]) bitslist = [] for i in range(wlen): ...
true
229c61fd573d95c48c78b5697488b147ff08eabd
Connor-R/NSBL
/team_strength/variance_research/NSBL_std_research.py
UTF-8
5,435
2.546875
3
[ "MIT" ]
permissive
# RESULTS # # hitters (wOBA) - std = -0.0000083283(zips_pa) + 0.0277557512 # SP (FIP) - std = -0.000169247(zips_ip) + 0.3625156228 # RP (FIP) - std = -0.0005925607(zips_ip) + 0.5332422101 # team (std in wins) - expected std = -0.0052542947(expected_wins) + 3.4279721907 from py_db import db import numpy as np import p...
true
0764bc0475c8de64ac428d36fe98552f52a9837f
ib407ov/LABS---12
/Завдання 1.py
UTF-8
3,504
3.25
3
[]
no_license
import math class TVektor2D: def __init__(self, *args): arguments_count = len(args) if arguments_count == 0: self.x1 = 0 self.x2 = 0 self.y1 = 1 self.y2 = 1 elif arguments_count == 1: self.x1 = args[0] self....
true
63f74747812c124994c4771cbaaf19c91324deb0
edclol/study
/VGG.py
UTF-8
1,978
2.515625
3
[]
no_license
def VGG16(img_paths, labels, return_prob=0): import numpy as np from keras.preprocessing import image from keras.applications.vgg16 import VGG16 from keras.applications.vgg16 import preprocess_input, decode_predictions model = VGG16(weights='imagenet', include_top=True) preds = [] preds_prob...
true
5ccf88f23b8722d8101ba17adc32384f562596c9
michael24peters/pv-finder_experimental
/tests/test_eff.py
UTF-8
701
2.65625
3
[]
no_license
from model.efficiency import pv_locations import numpy as np def test_pv_location_discovery(): targets = np.zeros(4000, dtype=np.float32) threshold = 0.5 integral_threshold = 3.0 min_width = 3 targets[3:7] = 1.5 # 4.5 found targets[12:15] = 1.5 # 13.0 found targets[23:27] = 1.5 # 24.5 ...
true
a46bbb8ffcf28d0f0c7cde79b076ff7c812d250e
rrruss/wise1
/api_calls.py
UTF-8
6,268
2.875
3
[]
no_license
from __future__ import division from urllib2 import urlopen from collections import Counter import numpy as np import pandas as pd import json dc_apikey = '80g5fqgy8nd2' """ I'm just using a simple query here to set up the JSON parsing We will look for projects requesting funding for a specific resource type From the...
true
fa44afc63e8717a71dbfb8c5d6912bb442c04f0d
Evegen55/RaspberryPi
/Python/GPIO_with_GUI/ScaleExample2.py
UTF-8
324
2.8125
3
[]
no_license
''' Created on Jan 26, 2017 @author: Evgenii_Lartcev ''' from Tkinter import * #GUI definition root = Tk() var = DoubleVar() def update(duty): print var.get() w = Scale(root, from_= 0, to = 100, orient = HORIZONTAL, length = 300, width = 50, variable = var, command = update) #Start GUI w.pack() root.mainlo...
true
a64efb5261134841b0b4cdfd0e9590ca066956f7
YuMi-coding/pcapCounters
/src/sharks/session_splitter.py
UTF-8
2,300
2.8125
3
[]
no_license
import os import dpkt from multiprocessing import Pool, cpu_count from .session import session_v4 SPLITTER_WRITE_THRES = 10000 class SessionSplitter(): """ Splits a pcap file according to the session of it Args: pcapfile : the pcap file temp_folder : the temporary folde...
true
d8b0ba24dab90e0e46c6f0efeffb5d0b6c46e32d
dongxiaoyuu/my-opencv-test
/procession/test6.py
UTF-8
474
2.609375
3
[]
no_license
# 轮廓 import numpy as np import cv2 as cv im = cv.imread('../Resources/haer.jpg') imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY) ret, thresh = cv.threshold(imgray, 127, 255, 0) contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE) cimg = cv.drawContours(im, contours, -1, (0,0,255), 1) cv.imsho...
true
7e2bab665a96cbea0fda99024bd12e436f30674f
PiscesDante/Python_Crash_Course
/chapter_10/ex10-1.py
UTF-8
470
3.0625
3
[]
no_license
file_object = open('zen_of_python.txt') content = file_object.read() print(content) file_object.close() print("==============================") file_object = open('zen_of_python.txt') for line in file_object : print(line.strip()) file_object.close() print("==============================") file_object = open('zen_...
true
66bfa25fe9769c0f06c80ebc5f4d68d44845cb6e
klkael/Ujian_Bank
/PYTHON/latian.py
UTF-8
395
3.78125
4
[]
no_license
class X: def __init__(self,name,age): self.nama = name self.usia = age def pensiun(self): return 55 - self.usia class Y(X): def __init__(self,name,age,city): X.__init__(self,name,age) self.kota = city objA = Y('Ali',22,'Jakarta') print(objA.kota) objX = X('Andi',22...
true
29976d70e1a39d64bf9129817465075d80645691
ppaleja/ForYourPlan
/classes.py
UTF-8
570
2.515625
3
[]
no_license
class Course: code = "" name = "" fTeacher = "" wTeacher = "" sTeacher = "" prereqs = [] def __init__(self, department, code): self.department = department self.code = code """ def __init__(self, department, code, name, fTeacher, wTeacher, sTeacher): self.department = department se...
true
6135042af9e5ab81e68ac79123175985a053fdb9
RomeoSajina/TSExploratory
/paper.py
UTF-8
16,960
2.546875
3
[]
no_license
""" Za svaki hotel napraviti ts za 1.7., 1.8. i 1.9. Za svaki ts napraviti model prema odabranoj arhitekturi Spremit predviđanja za razdoblja 60, 30, 7 Rezultati: hotel | model_info | target_date | train_time | n_parameters | p_train | p_train_ms | p_60 | p_30 | p_7 """ from core.__init__ import * f...
true
da3883c87c9cee54ca932ba115868a2a9ab4b5e6
LakshiAthapaththu/chatbot-python-any-where-
/chatbot/functions/general_functions.py
UTF-8
286
2.859375
3
[]
no_license
import numpy import time def sigmoid (x): output = 1/(1+numpy.exp(-x)) return output #for a given x value get a corresponding y value of sigmoid function def derivative(output): return output*(1-output) #for given output return the corresponding derivative value
true
442a890ab320ed63d054da5b9047b3bcb8161827
sarahjef/pythonremembrance
/halebacheha.py
UTF-8
1,159
3.15625
3
[]
no_license
import statistics class ExtendList(list): def __init__(self, lst): super().__init__(lst) self.lst = lst def __add__(self, other): lst_new = [] lst_new.extend(self.lst) lst_new.extend(other.lst) return lst_new @staticmethod def average(other): retur...
true
850dd9e6b0d14288ab63d0b8fd6b26c20e5e4f27
doraemon1293/Leetcode
/archive/1847. Closest Room.py
UTF-8
1,139
2.90625
3
[]
no_license
from typing import List import bisect import collections class Solution: def closestRoom(self, rooms: List[List[int]], queries: List[List[int]]) -> List[int]: rooms = collections.deque(sorted([(y, x) for x, y in rooms], reverse=True))#(size,id) ans = [-1] * len(queries) avail_rooms = [] ...
true
8f27a5194da22bc794286ccbdc38a9c6e80a5d30
leeduckgo/NN_Maze
/Network.py
UTF-8
892
3.375
3
[ "MIT" ]
permissive
#-*- coding:utf-8 -*- from Perceptron import * class Network: def __init__(self): self.p1=Perceptron(100,100) def run(self,in_sensor): out_sensor=self.p1.activate(in_sensor) return out_sensor #测试神经网络! aNetwork=Network() print aNetwork.run(100) print aNetwork.run(0) ''' #新任务:输入三个电...
true
e8b1544d97e743db9f774c4db262224af786809a
mikan3rd/youtube-rank-api
/app/logger.py
UTF-8
1,090
2.890625
3
[]
no_license
import logging.config import os def setup_logger(config: dict, log_dir: str='log', debug: bool=False) -> None: '''ロガーを初期化する Args: config: ロガーのコンフィグ log_dir: ログ出力するディレクトリ logging.yamlに設定されたhandlerのfilenameにlog_dirが付加される debug: Trueの場合、logging.yamlのloggerのlevelをDEBUGに変更...
true
fa161e0b43c2d33e0b5dca1a1ea8b6e07eb19a7f
jimbertools/jumpscaleX_core
/JumpscaleCore/core/BASECLASSES/test/test_config_manager.py
UTF-8
2,390
2.625
3
[ "Apache-2.0" ]
permissive
from Jumpscale import j from .base_tests import BaseTest from Jumpscale.core.InstallTools import BaseJSException class TestIConfigManager(BaseTest): def setUp(self): print("\n") self.info("Test case: {}".format(self._testMethodName)) def tearDown(self): self.info("Delete DataBase") ...
true
c0e6347e390071b750e65d5a7d4937b8614573dd
has256/challenges
/uri/python/2670.py
UTF-8
487
2.953125
3
[ "Unlicense", "CC-BY-3.0" ]
permissive
cima = int(input()) meio = int(input()) baixo = int(input()) proposta_cima = (2 * meio) + (4 * baixo) proposta_meio = (2 * cima) + (2 * baixo) proposta_baixo = (2 * meio) + (4 * cima) if (proposta_cima <= proposta_meio <= proposta_baixo) or (proposta_cima <= proposta_baixo <= proposta_meio): print(proposta_cima) ...
true
fcabfaf0be4ffb0da41be406fbac1a620a94a375
ericlee215/Jensen_Run_Scripts
/untitled0.py
UTF-8
3,938
2.640625
3
[]
no_license
import pandas as pd import matplotlib.pyplot as plt import numpy as np from Jensen_Model_3D import Jensen_Calc from Jensen_Model_3D2 import Jensen_Calc2 #u = 8.1 #rnot = 20 #alpha = 0.1 #theta = np.linspace(-20,20,101) #downwind = np.linspace(120, 320, 101) # # #Model = Jensen_Calc(alpha,downwind,rnot,u,t...
true
944cf47e708eb0c9df3f82eea427715ff09f3655
ayoubc/competitive-programming
/online_judges/kattis/supercomputer.py
UTF-8
698
2.828125
3
[]
no_license
N = 1000007 bit = [0 for k in range(N)] a = [0 for k in range(N)] def update(x,val,n): while x<=n: bit[x] += val i = x&-x x += i def query(x): ans = 0 while x>=1: ans += bit[x] i = x&-x x -= i return ans n,k = input().split() n = int(n) k = int(k) for i...
true
a281d8c768989f46a1a5e0a8236922099c7d5a93
henriquekirchheck/Curso-em-Video-Python
/desafio/desafio095.py
UTF-8
1,537
3.8125
4
[ "MIT" ]
permissive
# Aprimore o desafio 93 para que ele funcione com vários jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador total = npc = 0 gols = list() jogador = dict() jogadores = list() while True: print('-=' * 22) jogador['nome'] = str(input('Nome do Jogador: ')).strip() np...
true
86fcdce078bb3872bf2c14714082f19d0adf43c5
MoDuJli/infa_2020_modylin
/lab2/turtle_in_gravity.py
UTF-8
306
3.953125
4
[]
no_license
import turtle turtle.speed(10) def motion(v_x, v_y, a): turtle.shape('circle') x = 0 y = 0 dt = 0.05 for i in range(1000): x += v_x * dt y += v_y * dt v_y -= a * dt turtle.goto(x, y) if y < 0: v_y = -0.9 * v_y motion(5, 60, 9.8)
true
13f4faf6f0c18616eb9c09473904b652152c2a66
qPlD/Year1_labExam
/Lab 8/difference.py
UTF-8
447
3.65625
4
[]
no_license
longList = [ 0, 3, 4, 5, 6, 7, 8, 12, 15, 16, 17 ] shortList = [ 5, 12, 17 ] # shortList is a subset of longList - all shortList items are in longList # identify the difference between the two lists - items in longList that aren't in shortList differenceList = [] for longListItem in longList: if longListItem no...
true
6e230cac2b5fb47d24c6dde78876f83102cf5a96
PierreOhl/parity_games_solving
/energy_progress_measures.py
UTF-8
16,704
2.640625
3
[]
no_license
import util import time from copy import deepcopy class progress_measure: def __init__(self, game): self.game = game if(game.typ == "energy"): self.map = [util.possibly_infinite_integer(0) for i in range(game.size)] else: self.map = [util.sparse_tuple() for i in...
true
571a3b7a61e38971cd767fb5643974d96d6725a1
n8sty/dowhy
/dowhy/causal_refuters/dummy_outcome_refuter.py
UTF-8
38,110
2.6875
3
[ "MIT" ]
permissive
import copy import logging from collections import OrderedDict, namedtuple from typing import Callable, List, Optional, Union import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor from sklearn.linear_model import LinearRegression from sklearn.neighbors import KNeighborsRegressor fro...
true
079984be4d850f0522c5b617e88c4d510b34b1f8
FudgieTheKing/league-health-loss-detect
/ocr_boi.py
UTF-8
770
2.78125
3
[]
no_license
import numpy as nm from time import sleep import pytesseract import cv2 from PIL import ImageGrab def ScreenCap(): health_list = [] pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe' while(True): cap = ImageGrab.grab(bbox =(1040, 1370, 1350, 1400))#top x, top y, bottom x, ...
true
1848ae5ffe1be5865e7415c85982f2d5a6aff2be
wenting-pan/EQ_Works
/pipeline_dependency/pipeline_dependency.py
UTF-8
4,039
3.4375
3
[]
no_license
from itertools import permutations def get_running_tasks(task): """ Given a task, get all tasks that must be running or finished executing for this task to be running :param task: A task_id :return: A list of all tasks that are running or finished executing for this task to be running """ all...
true
95b3658617766aa6335559f75d98e911b7c45d4f
bbecker4/Deep-Space
/Images/Convert.py
UTF-8
1,504
2.8125
3
[]
no_license
import os import subprocess def get_png_files(): f = open("processed.txt", "r") processed = [] for line in f: processed.append(line.strip()) filelist=os.listdir('PNG') for file in filelist[:]: if not(file.endswith(".png")): filelist.remove(file) elif file in pr...
true
3a0ff9554deb02b7f906bdd6e3d6dd4281143c34
tefra/xsdata-samples
/autosar/models/severity_enum_simple.py
UTF-8
496
2.53125
3
[]
no_license
from enum import Enum __NAMESPACE__ = "http://autosar.org/schema/r4.0" class SeverityEnumSimple(Enum): """ :cvar ERROR: Something is not right. High risk of interoperability issues. :cvar INFO: Something was found that is worth mentioning. Low risk of interoperability issues. :cvar WA...
true
3210daf5ce5601a21c1bbd371d66de67852164c4
brandonloy/eecs4422_project
/spatialReliability.py
UTF-8
3,841
2.671875
3
[]
no_license
import cv2 import imutils import matplotlib.pyplot as plt import numpy as np import time import os ## is a modified Epanechnikov kernel, ##k(r; sigma) = 1 − (r/sigma)2, with size parameter sigma equal to the ##minor bounding box axis and clipped to interval [0.5, 0.9] ##such that the object prior probability at cen...
true
0456c21d0fc677c7d9798c4a0284baec6e8662d5
loc-dev/CursoEmVideo-Python
/Fase11/Desafios/Desafio_007.py
UTF-8
441
4.65625
5
[]
no_license
# Fase 08 - Utilizando módulos # Desafio 007 # Crie um programa que leia um número real qualquer # pelo teclado e mostre na tela a sua porção inteira. from math import trunc print('$' + '-' * 20 + '$') print('$ DESAFIO 007' + ' ' * 6 + '$') print('$' + '-' * 20 + '$') print('') n = float(input('Digite um número...
true
0a309f2167a12794470610410425058d5373b5a7
tanvipenumudy/Competitive-Programming-Solutions
/Codewars/directions_reduction.py
UTF-8
238
2.921875
3
[ "MIT" ]
permissive
def dirReduc(arr): dict = {"NORTH":"SOUTH","SOUTH":"NORTH","EAST":"WEST","WEST":"EAST"} res = [] for i in arr: if res and dict[i] == res[-1]: res.pop() else: res.append(i) return res
true
47eca6f2966db70afd301552b223a475dd402296
ZoranPandovski/al-go-rithms
/math/ParabolicInterpolation/Python/parabolicInterpolation.py
UTF-8
604
3.765625
4
[ "CC0-1.0" ]
permissive
import math def func(x): return 2 * math.sin(x) - x**2 / 10 def Parabolic(xL, xU, f): x = 1 xPrevious = 0 xM = (xL + xU) / 2 fL = f(xL) fM = f(xM) fU = f(xU) while abs(x - xPrevious) > 3e-8: xPrevious = x top = (xM - xL) ** 2 * (fM - fU) - (xM - xU) ** 2 * (fM - fL) ...
true
26a879eb3523c47dbb39546d2158cfbb872a9401
hoyeoon/CodingTest
/이것이 코딩 테스트다 - 기출문제/15. 특정 거리의 도시 찾기(BFS).py
UTF-8
1,243
3.71875
4
[]
no_license
# BFS 사용 (거리가 1일때 BFS로 최단경로 탐색 가능) from collections import deque n, m, k, x = map(int, input().split()) # a, b를 x, y로 했을 때 마지막 값의 x가 저장되어 원하는 결과가 안나왔음 graph = [[] for _ in range(n + 1)] for i in range(m): a, b = map(int, input().split()) graph[a].append(b) print(graph) # 모든 도시에 대한 최단 거리 초기화 distance = [-1]...
true
58048bbb9da1a9ab081eb002f9898d2eb0de7d50
sandeepnamburi/gathr.io
/app.py
UTF-8
2,588
2.53125
3
[]
no_license
import boto3 import json from flask import Flask, jsonify, request, render_template from bs4 import BeautifulSoup from re import search app = Flask(__name__) txt = "" comprehend = boto3.client( service_name='comprehend', region_name='us-east-1', aws_access_key_id='', aws_secret_access_key='', #aws...
true
e9fd1fbc7b1e8e0c13d503fb68b7d614ba692474
thomasballinger/wsgi
/kenya.py
UTF-8
4,329
3.390625
3
[]
no_license
"""Utility functions for the Kenya site framework Includes functionality for rendering templates, serving static files, and storing data to "psuedo databases," implemented as csv files Template Language: templates replace occurrences of '+word+' with the passed in value of keyword argument word. Rules of the Kenya ...
true
421eb4e2673c23031e3928a0bc0d585ef06270cc
huameixiao123/quart
/src/quart/testing/utils.py
UTF-8
3,232
2.65625
3
[ "MIT" ]
permissive
from __future__ import annotations from typing import Any, AnyStr, Optional, Tuple, TYPE_CHECKING, Union from urllib.parse import unquote, urlencode from werkzeug.datastructures import Headers from ..json import dumps if TYPE_CHECKING: from ..app import Quart # noqa sentinel = object() def make_test_headers...
true
809b87d9cc84b215fd43ee2ad33dcec8bbef706a
ErikOsinga/master_research_project
/learning_purposes/v1_IMNN/probeersels/1DGauss_2params_snippet.py
UTF-8
6,998
3.0625
3
[]
no_license
# coding=utf-8 ''' Recommended to run in a seperate environment where keras / tensorflow is installed. (see miniconda) Code adapted from arXiv:1802.03537. ''' import sys import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import keras # change to the path where the IMNN git clone is located ...
true
02688a534911f5acfa9471000fc6d6ac54a37e53
GabrielEValenzuela/CursoIntensivoPython
/Tercera clase/Código fuente y archivos/archivos_sparte.py
UTF-8
942
3.53125
4
[ "MIT" ]
permissive
import math as m def leerArchivoContextManager(ubicacion_nombre): with open(ubicacion_nombre,"r") as archivo:#El context manager automaticamte #cierra el archivo for linea in archivo: print(linea,end='') def escribirArchivo(ubicacion_archivo,nuevo_append,lista_datos): modo = "w" if...
true
7ed4229bf5c83a5c2d85869064db873ef0631d97
jainhitesh9998/py-face-detection
/proj_data/py_face_detection/embeddings/path.py
UTF-8
314
2.90625
3
[]
no_license
from os.path import dirname, realpath, exists def generate(file_name=None): if not file_name: return dirname(realpath(__file__)) path = generate() + "/" + file_name return path def get(file_name=None): path = generate(file_name) if exists(path): return path return None
true
146eeaaa4ecb802597465124b002bbe7683d69a9
Inter-Actief/amelie
/amelie/iamailer/templatetags/subject.py
UTF-8
549
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
from django import template register = template.Library() @register.tag def subject(parser, token): nodelist = parser.parse(('endsubject',)) parser.delete_first_token() return SubjectNode(nodelist) class SubjectNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist ...
true
cc24bdff887c748ba87da07905ca160db5c67de6
kartucson/Python_practice
/compiler_PLY_Create_nodes.py
UTF-8
1,288
2.75
3
[]
no_license
import ply.lex as lex import ply.yacc as yacc tokens = ( "DASH", "INPUT", "SQUARECLOSE", "SQUAREOPEN", "ROUNDCLOSE", "ROUNDOPEN", "NEWLINE", "TERMINATOR" ) # Regex for tokens t_SQUAREOPEN = r'\[' t_SQUARECLOSE = r'\]' t_ROUNDOPEN = r'\(' t_ROUNDCLOSE = r'\)' #t_INPUT = r'no' ## For Debugging, ...
true
782234492ae19dc894f9e53521e4ae2e75e2ce24
dolaameng/udacity-SDC-baseline
/test_model.py
UTF-8
3,900
2.78125
3
[ "MIT" ]
permissive
''' Test different models on udacity self-driving car dataset ''' from __future__ import print_function # for docker env import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import argparse import numpy as np from os import path import time from data import * from model import * from keras.callb...
true
a2cb9560b6f132d66e47784e4787a7fae1603eb2
hi0t/Outtalent
/Leetcode/377. Combination Sum IV/solution2.py
UTF-8
291
2.734375
3
[ "MIT" ]
permissive
class Solution: def combinationSum4(self, nums: List[int], target: int) -> int: @lru_cache(None) def dfs(t: int) -> int: if t < 0: return 0 if t == 0: return 1 return sum(dfs(t - n) for n in nums if n <= t) return dfs(target)
true
b65c0c2300d806f32cb6f9b4a004a346f48e0206
Abrantedr/DVT-hack
/view.py
UTF-8
572
2.796875
3
[]
no_license
import tkinter as tk from tab_menu import TabMenu class View: def __init__(self, root, model): self.root = root self.model = model self.main_frame = tk.Frame(self.root) self.main_frame.pack(fill=tk.BOTH, expand=True) self.tab_menu = TabMenu(self.main_frame) self...
true
525fef014cd0eecbc2f066aec522aafd6ddd4252
sunilkbp/100-days-of-python
/OopsExamples/duck.py
UTF-8
473
4.15625
4
[]
no_license
class Duck(): def __init__(self, value=15): print ("Constructor") self._value = value def walk (self): print ("Duck walks like a duck",self._value) def getValue(self): return self._value def main(): donald = Duck(10) jim = Duck() donald.walk() print( "Class...
true
5c7c48579d16cf8c90d62dade4cb012405baead0
PeterWolf-tw/NTNU_TextProcessing_2020
/week02/week02_40947036s.py
UTF-8
346
3.34375
3
[]
no_license
def myfunction(inputSTR): inputList= inputSTR.split(" ") print("我的名字:{}".format(inputList[0])) print("我的學號:{}".format(inputList[1])) #程式進入點! week02.py 這支程式從這裡開始「執行」! if __name__ == "__main__": nameSTR = "林彤頤 40947036S" myfunction(nameSTR)
true
4175e9ba43000239f594bcf74ec713cb1a6ca8b2
Computer-engineering-FICT/Computer-engineering-FICT
/I семестр/Програмування (Python)/Лабораторні/Братун 6305/Labs/PRES_12/Q-q1.py
UTF-8
147
3.546875
4
[]
no_license
arr = [1, 2, 3, 4, 5, 6] for i in arr: print(i, end=" ") print("") arr1 = ["U","k", "r", "a", "i", "n", "e"] for i in arr1: print(i, end=" ")
true
72709b9ea9d3a2c118261e0fef3957db0b02e73e
esilgard/argos_nlp
/fhcrc_pathology/SecondaryField.py
UTF-8
3,273
2.6875
3
[ "Apache-2.0" ]
permissive
'''author@esilgard''' # # Copyright (c) 2015-2016 Fred Hutchinson Cancer Research Center # # Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 # import re, os import global_strings as gb PATH = os.path.dirname(os.path.realpath(__file__)) + os.path.sep class SecondaryField(obje...
true
82791dc6f54118fc33eb919429bcb145f93682b1
gbernstein-dev/DojoAssignments
/Python/python_fun/dict_basics.py
UTF-8
381
3.328125
3
[]
no_license
def dictionary(name, age, birth_country, language): citizen = {'Name':name,'Age':age,'birth_country':birth_country,'language':language} return "my name is {}. My age is {}. My country of birth is {}. My favorite language is {}.".format(citizen['Name'],citizen['Age'],citizen['birth_country'],citizen['language']) testc...
true
f0e50e6fed7383559faf151bc4674adf33d145fb
WenmuZhou/PytorchOCR
/torchocr/losses/det_db_loss.py
UTF-8
2,397
2.609375
3
[]
no_license
import torch from torch import nn from .det_basic_loss import BalanceLoss, MaskL1Loss, DiceLoss class DBLoss(nn.Module): """ Differentiable Binarization (DB) Loss Function args: param (dict): the super paramter for DB Loss """ def __init__(self, balance_loss=True, ...
true
5a683bf00b6f3aa02fbbb617f06faf673e982fd0
medisean/showmecode
/ans_0002.py
UTF-8
767
2.5625
3
[]
no_license
import pymysql import ans_0001 # create database pytest db = pymysql.connect("localhost", "root", "880404") cursor = db.cursor() cursor.execute("DROP DATABASE IF EXISTS pytest") cursor.execute("CREATE DATABASE IF NOT EXISTS pytest") db.commit() db.close() # create table tbcode db = pymysql.connect("localhost", "r...
true
fe0037d50853a50c97ca490e533f46dadc9af741
StudyForCoding/ProgrammersLevel
/Level1/Lessons12919/yang_12919.py
UTF-8
730
2.9375
3
[ "MIT" ]
permissive
# 서울에서 김서방 찾기 def solution(seoul): answer = seoul.index("Kim") return "김서방은 "+str(answer)+"에 있다" # 테스트 1 〉 통과 (0.00ms, 10.3MB) # 테스트 2 〉 통과 (0.00ms, 10.2MB) # 테스트 3 〉 통과 (0.00ms, 10.2MB) # 테스트 4 〉 통과 (0.00ms, 10.2MB) # 테스트 5 〉 통과 (0.00ms, 10.2MB) # 테스트 6 〉 통과 (0.00ms, 10.3MB) # 테스트 7 〉 통과 (0.01ms, 10.2MB) # 테스...
true
d92f9e0a2e1c2cb41498713cfb6aa736907016af
Ardric/School-Projects
/Python Code/Assignment 2/Count letter grades.py
UTF-8
934
4.46875
4
[]
no_license
#Daniel Lowdermilk #This program reads in 10 numbers and calculates grades and reports how many of each grade is entered. #If you change y in default variables, you change the amount of grades the instructor can enter. #Default Variables y = 10 grade = 0 #Grades A = 0 B = 0 C = 0 D = 0 F = 0 print ("Ple...
true
27d80e9fb9ccf19cf7505503fd63568e0c9e2ee9
nlemoing/uwaterloo-course-scheduler
/scraping/courses.py
UTF-8
3,760
3.015625
3
[]
no_license
from urllib.request import urlopen from bs4 import BeautifulSoup from util import offered_regex, check_ends, remove_ends def parse_course(course_tree, subject_id): # course information is in a table and each component is in a tr tag items = course_tree.find_all('tr') if len(items) < 3: return c...
true
414c5ccabb43ecfcc009e0e1c4f6a6196c7f3251
wangbqian/python_work
/Tkinter_gui.py
UTF-8
838
3.140625
3
[]
no_license
from tkinter import * import tkinter.messagebox as messagebox class Applicaton(Frame): def __init__(self,master=None): Frame.__init__(self,master) self.pack() self.createWindgets() # def createWindgets(self): # self.helloLabel = Label(self,text='Hello World!') # self.hel...
true
2e367d6e61651f41ff0c96c194713de9308dd052
aptran/python-kata
/data_structures/tree.py
UTF-8
4,993
4.4375
4
[]
no_license
''' Implementation of a binary tree. ''' class Node(object): def __init__(self, val=None): self.left = None self.right = None self.val = val class Tree(object): def __init__(self): self.root = None def get_root(self): return self.root def add(self, new_val): if not self.root: self.root = Node(ne...
true
0a6e9b13662551cf5336befd9cc1b6a0f76d4b1e
AdilsonFuxe/python-security
/ping-multiplo/ping-multiplo.py
UTF-8
311
2.859375
3
[]
no_license
import os import time count = 0 with open("hosts.txt") as file: dump = file.read() dump = dump.splitlines() count = len(dump) for ip in dump: print("IP/HOST - " + ip) os.system("ping -c4 "+ip) print("-" * 60) time.sleep(3) print(str(count) + " ips verificados")
true
5ee8aad53e563291011a7fa7aa99d7ab328ff824
saj5211/Python-Projects
/Mutating Lists.py
UTF-8
252
2.734375
3
[]
no_license
def satisfiesF(L): count= len(L) rec_list=list() for i in range(0,count): if(f(L[i])==False): rec_list.append(L[i]) if(rec_list): for j in rec_list: L.remove(j) return len(L) run_satisfiesF(L, satisfiesF)
true
b9fae5eb390e81a35bda61773f79af944cbd3fe7
elliotCamblor/CTCI
/python/src/q_9_1.py
UTF-8
409
3.140625
3
[]
no_license
cache = [1] def countWays(n): if n < 0: return 0 else: try: return cache[n] except IndexError: cache.append(countWays(n - 3) + countWays(n-2) + countWays(n-1)) return cache[n] def countWays2(n): if n < 0: return 0 elif n == 0: ...
true
1482baa80762b216a1f29487873ddcc8e56a547f
pace-noge/datacamp
/Machine-Learning-with-the-Experts-School-Budgets/01-Exploring-the-raw-data/01-Loading-the-data.py
UTF-8
1,546
3.703125
4
[]
no_license
""" Loading the data Now it's time to check out the dataset! You'll use pandas (which has been pre-imported as pd) to load your data into a DataFrame and then do some Exploratory Data Analysis (EDA) of it. The training data is available as TrainingData.csv. Your first task is to load it into a DataFrame in the IPython...
true
647441e6ec967b35504362813e99e164e434134c
ashishjsharda/PythonDS
/Queues.py
UTF-8
222
3.3125
3
[]
no_license
''' Created on Sep 12, 2019 Queues in Python @author: asharda ''' from collections import deque queue=deque([1,2,3,4,5,6]) #Print Queue print(queue) #Insert into Queue queue.append(7) print(queue.popleft()) print(queue)
true
84dc57ac659bf15cb318cc7d96c3e506cf0e4532
miguelmyers8/Metal
/metal/utils/utils.py
UTF-8
7,325
2.921875
3
[]
no_license
import numbers import numpy as np import inspect from metal.core.optimizer import Optimizer from metal.core.steppers import sgd_step from metal.core import Optimizer from metal.core._01_base import Learner,DataLoader,collate from metal.models.sequential import Sequential from metal.core.samplers import RandomSa...
true
0051243d4a270c2aefb45840c475feec2eb059c8
ningningliu/Programming-with-Python
/Sytem-Tools/sys_module.py
UTF-8
335
2.859375
3
[]
no_license
import sys print(sys.platform) # search path print(sys.path) # add path # sys.append(path) # Exception details import traceback, sys def grail(x): raise TypeError('already got one') try: grail('arthur') except: exc_info = sys.exc_info() print(exc_info[0]) print(exc_info[1]) traceback.print_t...
true
f33037b4a7e6022e2a644b55f3bf4cf69b49fc48
gewentao/weather
/sensor/diode.py
UTF-8
646
2.984375
3
[]
no_license
import RPi.GPIO as GPIO import sys import time LED = 21 def main(): # GPIO.setwarnings(False) # 如果有多个脚本控制电路会警告 GPIO.setmode(GPIO.BCM) # GPIO.input(LED) # 读输入引脚的值 #This will return either 0 / GPIO.LOW / False or 1 / GPIO.HIGH / True # mode = GPIO.getmode() # 判断board还是BCM模式 GPIO.setup(LED,...
true
1bafc9b886a37a2974e0ceea8257f80e6b2590f1
o0brunolopes0o/Curso-em-video-exercicios
/ex073.py
UTF-8
1,617
4.3125
4
[]
no_license
""" Exercício Python 73: Crie uma tupla preenchida com os 20 primeiros colocados da Tabela do Campeonato Brasileiro de Futebol, na ordem de colocação. Depois mostre: a) Os 5 primeiros times. b) Os últimos 4 colocados. c) Times em ordem alfabética. d) Em que posição está o time da Chapecoense. """ times = ('Palmeira...
true
1a460e1b483d38c3d0b0fb35d3b247c1a00fcc3e
ldakir/ComputationalPhysics
/dakir_hw8_8.5b.py
UTF-8
2,129
3.609375
4
[]
no_license
#Lamiaa Dakir Ex 8.5b from __future__ import division, print_function from numpy import arange,array from math import sin,cos import matplotlib.pyplot as plt """ Driven Pendulum """ #defining the constants g=9.81 l=0.1 C=2 #Defining the function for the two first order differential equations def f(r,t,OM): theta= r...
true
66a75403ca3afed75ed605ea76e92649a1ddc280
mronowska/python_code_me
/zadania_na_zajeciach/zad2.py
UTF-8
251
4.125
4
[]
no_license
import decimal year = 2020 age = input("Rok urodzenia: ") print(f"Wygląda na to, że masz {year - decimal.Decimal(age)} lat! Nieźle.") ## inaczej - przez int print(f"\nA przez int tak: Wygląda na to, że masz {year - int(age)} lat! Nieźle. :D")
true
e8433e1ade6495a5e307088234b7b00f400e99e2
git-yo/python_study
/day1/while2.py
UTF-8
392
3.734375
4
[]
no_license
old_boy_age = 56 count = 0 while count < 3: age = int(input("please input old boy's age: ")) if age == old_boy_age: print("Yes,you guess ok!") #exit () break elif age > old_boy_age: print("No,your answer is too big!") else : print ("No,your answer is ...
true
f09bc2b392596d64d1193ac04b99ddccf3fa3604
hrk09/Formulas_of_Algorithm_basic
/BFS(★★★)/bfs.py
UTF-8
1,296
3.34375
3
[]
no_license
# bfs 구현시 유의사항 # dfs와 다르게 재귀호출을 사용하지 않는다는 것 큐를 이용해 iteractive하게 구현함 def BFS(graph, v):# 그래프 G, 탐색 시작점 v q = [] q.append(v) while q: # 큐에 값이 있으면 실행 node = q.pop(0)# 큐의 첫번째 원소 반환 if node not in visited:# 방문되지 않은 곳이라면 visited.append(node)# visit에 node 추가 for i in range(...
true
2f496950993aeb435af2c00d82f7bc16f2d703ff
dotslash-web/PY4E
/Course 2 - Python Data Structures/Chapter 07/Lecture Material/Files.py
UTF-8
521
3.703125
4
[]
no_license
'Using open()' #handle = open(filename, mode) #returns a handle use to manipulate the file #filename is a string #mode is optional and should be 'r' if we are planning # to read the file and 'w' if we are going to write in the file #EX: fhand = open('mbox.txt', 'r') || open('mbox.txt') 'The newline Character' stuff ...
true
e6e1d50207aa8a53febd09d05736db5236bff5a7
iiTsGiga/advent-of-code-2020
/day 21/day21_2.py
UTF-8
1,162
3.0625
3
[]
no_license
def searchForAllergen(): for allerg in allergens: n, ingr = allergens[allerg] fnd = [] for i in ingr: if ingr[i] == n: fnd.append(i) if len(fnd) == 1: allergens.pop(allerg) return fnd[0], allerg # see part 1 for explanation # for t...
true
de38fc148bfa866593fe2017795f25416e81814a
ArnoutAllaert/Informatica5
/13 - Dictionaries/Quiz.py
UTF-8
1,003
2.8125
3
[]
no_license
def verlaat_ploeg(naam, ploeg, ploegen): ploegen[ploeg].remove(naam) if len(ploegen[ploeg]) == 0: ploegen.pop(ploeg) return ploegen def vervoegt_ploeg(naam, ploeg, ploegen): if ploeg in ploegen: ploegen[ploeg].append(naam) else: ploegen[ploeg] = [naam] return ploegen pr...
true
90b807f790297a091c448fee38ec6d46f84559cf
htmlprogrammist/kege-2021
/Bariants/fipi-04-27/variant_1/task_24_AC.py
UTF-8
1,333
4
4
[]
no_license
""" Задание 24 (№1205). Текстовый файл состоит не более чем из 1200000 символов, которые являются прописными буквами латинского алфавита. Определите максимальное количество идущих подряд символов, среди которых нет символов G, W, P. Для выполнения этого задания следует написать программу. 83 """ f = open('24.txt') s...
true
5d34d85024c9eefc44cfdd24e2a2a86aa3fdb1ce
twchen88/15686
/code/part1.2.py
UTF-8
3,944
2.734375
3
[]
no_license
import numpy as np import torch import matplotlib.pyplot as plt from skimage.io import imsave from sklearn.decomposition import PCA from prednet import PredNet from helper_functions import * import torchvision A_channels = (3, 48, 96, 192) R_channels = (3, 48, 96, 192) model = PredNet(R_channels, A_chan...
true
29c0ac4a3e1fe85262a0879bf084de9350a0e6db
ajnjit/pythonStatistics_Project
/Stat Calc/src/Statistics/zeroDivision.py
UTF-8
305
2.75
3
[]
no_license
from src.Calculator.Division import division try: def zeroDivision(data): for num in data: total = 0 total = total + division(num, 0) result = division(num, 0) return result except ZeroDivisionError: print("There is a value error:", ValueError)
true
a7e8d01cda5d98f490ce0c6c4ef545d2b994269b
mwarari/PythonProjects
/MyWorkoutRoutines/DataListBox.py
UTF-8
2,089
2.953125
3
[]
no_license
try: import tkinter except ImportError: import Tkinter as tkinter class ScrollBox(tkinter.Listbox): def __init__(self, window, **kwargs): # tikinter.Listbox.__init__(self, window, **kwargs) # python 2 super().__init__(window, **kwargs) self.scrollbar = tkinter.Scrollbar(window, o...
true
5942cc0d58039b5ab03bccb6be64f99eea3fd23e
HNSHongTian/MultiUnet
/dataset.py
UTF-8
2,201
2.53125
3
[]
no_license
import torch from torch.utils.data import Dataset import PIL.Image as Image import os import torchvision.datasets as dset from torchvision.transforms import transforms device = torch.device("cuda" if torch.cuda.is_available() else "cpu") x_transforms = transforms.Compose([ transforms.Resize((512,512)), transfor...
true
e0a69d877be9d46eeb03b4b78d73d795fde233a9
JasonChasse/python-projects
/prac.py
UTF-8
194
3.65625
4
[]
no_license
print('What is your first name?' , '\n') first_name=input() print('What is your last name?') last_name=input() print(first_name + ' ' + last_name + ', That is a nice name')
true
34e95d9429294ed5126b59f3f5c82fee361a36fa
Peiyu-Rang/LeetCode
/605. Can Place Flowers.py
UTF-8
572
3
3
[]
no_license
# -*- coding: utf-8 -*- """ Created on Thu Sep 16 15:46:57 2021 @author: Caven """ class Solution: def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool: size = len(flowerbed) count = 0 i = 0 while i < size: if flowerbed[i] == 0 and (i == 0 or flower...
true
9b4b54cd759a22aaeec1f6e4f928c14f9cfff57a
albaniac/OctoPrint-DisplayPanel
/octoprint_display_panel/screens/__init__.py
UTF-8
7,417
3.1875
3
[]
no_license
"""Top-level implementation of Micro Panel screens. Each screen consists of a set of data that can be shown to the user, can be updated through events from OctoPrint's main event system, and can react to user interaction through button presses. Screens must implement the `draw()` method at a minimum, but can implement...
true
2e77eda1ae7c6629f4010dbd38d8304d33b67776
bkgunderson/py-the-hard-way
/ex27.py
UTF-8
578
3.421875
3
[]
no_license
prompt = 'True? ' print "Truth Tables" print "not False" not_false = raw_input(prompt) print "not True" not_true = raw_input(prompt) print "True or False" true_or_false = raw_input(prompt) print "True or True" true_or_true = raw_input(prompt) print "not False", not_false print "not False", not False print "not True"...
true
3e40c6cce0b73f9869e3941578f001cdb6330732
Ajay2521/Python
/ADVANCE/Date and time/date object.py
UTF-8
286
3.828125
4
[]
no_license
# In this lets see about "datetime" module in python. # datetime module used to work with date object. # date object can be passed by passing desired date. # Here is the program to print desired date and time. import datetime print( datetime.date( 2020, 5, 20) )
true