blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ffb7ac25f803542738e5784e446dfd24e2ffc662 | 5dbb3c65e945a366b2d5c7a4c44fe21c6dfc7b47 | /Hospital-Management-system-project-master 2/main.py | 4ba711c2648eb990fb1426d4f761f2c4efb2a9cf | [] | no_license | kblasi/portfolio | b1e5eb5ea2ad60d939aeb5d4a64c8674d15b1397 | 7b4b671f45717854ee22db5a2fbe6246df234336 | refs/heads/main | 2023-04-26T11:56:01.111130 | 2021-05-17T03:12:37 | 2021-05-17T03:12:37 | 368,036,616 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | main.py | import mysql.connector
from login import login
mydb = mysql.connector.connect(
host="127.0.0.1",
user="root",
passwd="YOURPASSWORD",
database="Project"
)
def main():
login()
main()
|
bc97aa8c50b8344fcb7ba26ebdf7ecfa3928918c | fd94cc85682ad6ca010a672e90a0e58149d31de8 | /analysis/single_graph/generic_metrics/old_results/old_degree_hist/degree_distribution.py | cc34d6dfd810a375ea2cb014d4ae440f9f147d3a | [] | no_license | CristinaTubert/gnn_analysis | 58f7bf5ab765b66884e65e2e626e5ea8107b1684 | a60d78178b8def7b470c7aa6864dba90bc2c9f55 | refs/heads/main | 2023-06-30T07:02:59.593289 | 2021-07-29T12:53:55 | 2021-07-29T12:53:55 | 346,314,084 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,835 | py | degree_distribution.py | import time
import pandas as pd
import numpy as np
import networkx as nx
import random as rand
import csv
import collections
import matplotlib.pyplot as plt
from matplotlib.ticker import (MultipleLocator, AutoMinorLocator)
import ogb.nodeproppred as ogbn
from torch_geometric.data import Data
import torch_geometric.uti... |
3a85fda2f34e107132d380b6258ad3e2394a20b9 | 31fb81a093a8168a0cecd5267643168d66c66dfe | /sudoku_obj.py | 7a689daad1c091131de274c32b16389bcf64e831 | [] | no_license | briancldo/Sudoku-Solver | 48d58854f3434ff6d80322f2219c55a4d3016801 | 4dccc77992a4512bf13181ca3fc34206f61b0352 | refs/heads/master | 2020-12-15T03:48:43.338497 | 2020-01-22T03:58:54 | 2020-01-22T03:58:54 | 234,983,846 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | sudoku_obj.py | class SudokuUnit:
def __init__(self, val):
if val != 0:
self.cand = set()
else:
self.cand = set([1,2,3,4,5,6,7,8,9])
self.val = val
class SudokuGrid:
def __init__(self, grid):
self.num_unknown = 0
self.grid = []
self.rows = 9
... |
15fe7315daafdeb394dfa2fd13ffad373b7bff01 | 82f276a146de0485c12b5e707d03091cedd9dce6 | /src/alert_updater.py | 34091b4cb5114cc0c76acaab89a6c928cafc9ac6 | [] | no_license | BWB007/pricing_serviceBWB | f28e97ee942f9a1ec9c22890c577ce4614ba1c5b | 330a75b4ba7fc4679fcc19259f7a59001432ac05 | refs/heads/master | 2022-11-29T17:31:12.036152 | 2020-08-10T01:40:09 | 2020-08-10T01:40:09 | 286,346,985 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | alert_updater.py | from src.models.alert import Alert
from dotenv import load_dotenv
load_dotenv()
__author__ = 'benbrown'
alerts = Alert.all()
for alert in alerts:
alert.load_item_price()
alert.notify_if_price_reached()
if not alerts:
print("No alerts yet! Add an item and an alert to begin!")
|
287bc6767c4c9b63cabf84138cd95c7aebd1cec7 | 26ed7c894b0b92ce16a350fc285564666045b4e6 | /analysis/add_suffix.py | 5fa6ff16325177c340eea8d2d1a59acb9f7268d3 | [] | no_license | matsengrp/TemplatedMutagenesis-1 | 5cebca58ff6500938829fe5407550cd7be02511c | d656b9d140a14eae04043a474f68f904f0da25b4 | refs/heads/master | 2022-11-29T04:28:08.009203 | 2020-08-07T19:52:36 | 2020-08-07T19:52:36 | 99,279,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | add_suffix.py | def add_suffix(seq_records):
suffix = "AAAAAAAAAAGGGGGGGGGG"
out = []
for r in seq_records:
out.append(r + suffix)
return out
|
a36b65377338b02e86c3bcd67d77f5e050255f3b | 5be3c43c921a148ae63c7ccf4616771f6a4200db | /semestr2/lab1/lab1/spiders/__init__.py | 7c650738a74c9ae14e0d1d0807fb67d468af54ad | [] | no_license | goroanya/DB_labs | a5fe9b212b9018f062db1656bbe962cff967c65c | 8b6fd29afb2df56759aa789511bf508499e3254e | refs/heads/master | 2023-04-03T00:17:00.573496 | 2020-05-15T13:44:25 | 2020-05-15T13:44:25 | 209,100,973 | 0 | 0 | null | 2023-03-27T21:59:46 | 2019-09-17T16:15:19 | HTML | UTF-8 | Python | false | false | 156 | py | __init__.py | from lab1.spiders.base_spider import BaseSpider
from lab1.spiders.isport_spider import ISportSpider
from lab1.spiders.portativ_spider import PortativSpider
|
57ab41c7f20612de51b7746644e1be8e6bc3b539 | ba92146a381b3d294e7c55059919cabc2c5df2bb | /2.py | 46670e87851318a5443f042062529fbe89914866 | [] | no_license | Pavel-Spitsin-s/BigTask | 3dcd31634b34bbba277576843ba66d22e6b46afc | 5bef1dedda77656c3ba4876536f001329ecc0370 | refs/heads/master | 2023-03-06T11:45:51.108351 | 2021-02-15T15:55:16 | 2021-02-15T15:55:16 | 338,591,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,444 | py | 2.py | import os
import sys
import pygame
import requests
f = input()
geocoder_request = "http://geocode-maps.yandex.ru/1.x/?apikey=40d1649f-0493-4b70-98ba-98533de7710b&geocode=" + f + "&format=json"
response = requests.get(geocoder_request)
json_response = response.json()
toponym = json_response["response"]["GeoObjectCollec... |
834dc0cad0ce3c452878eccf94ca829e6d4c4b03 | 65fb737aa9e628ba31ba7c4e535b0907713ebd8d | /msl/equipment/resources/thorlabs/kinesis/enums.py | 354bfb17cd93ec096e2e83c835f1d5e80c678162 | [
"MIT"
] | permissive | MSLNZ/msl-equipment | a28adc139850316b365592e8bdba46c9381eec46 | e84ecd275676e87b9827affbe783b041bb8d9ff8 | refs/heads/main | 2023-08-24T06:58:38.151662 | 2023-08-15T03:27:14 | 2023-08-15T03:27:14 | 86,027,122 | 10 | 10 | null | null | null | null | UTF-8 | Python | false | false | 22,445 | py | enums.py | """
Enums defined in Thorlabs Kinesis v1.14.10
"""
from enum import IntEnum
from ctypes import c_byte, c_ushort, c_short, c_int16, c_uint16, c_int
from msl.equipment.resources.utils import WORD
class FT_Status(IntEnum):
FT_OK = 0x00
FT_InvalidHandle = 0x01
FT_DeviceNotFound = 0x02
FT_DeviceNotOpened ... |
a2676c7c127ab8d1328ba06a0b4bc0732b3fac26 | 70ca974faaebabdae65dd9d68413004c9c52c22f | /prog.py | 783656c4ec869e8292e3fe34b53d0c0b9d843bb1 | [
"MIT"
] | permissive | MarshalNink/GolfNow-Search-Assistant | 3b0014683a36114c43a1769c8096020e3602a23b | 839c703d977232e0c7fe06aa47bd0ffd505cd36f | refs/heads/master | 2021-01-01T20:08:16.332021 | 2017-08-06T02:31:11 | 2017-08-06T02:31:11 | 98,772,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,746 | py | prog.py | # GolfNow Search Assistant
# A program that utilizes GolfNow.com to gather all available tee times within 25 miles of a designated zipcode. Output is formatted: Total Price | Tee Time | URL"
# Author: Marshal Nink
# July, 2017
# TODO: add option to set range for tee times
import sys, getopt
from geopy.geocoders... |
f1ef85ed728373034ef63a3cb15fa89747cc61e9 | 658af150061ef8d72b5fa766451f9b8ca9556eb7 | /Computer Vision/Homework-1/Q1Q2.py | cb50e8087dd5769d020309c7f48afe0c95232a9c | [] | no_license | koseemre/ITU-Coding-and-Projects | 953822710386e2dd2cf959372d5e5170aa4d6b02 | 615c7776c1e79595eab7e148b802dbbd8d181053 | refs/heads/master | 2021-01-25T09:52:56.885038 | 2019-04-02T20:58:56 | 2019-04-02T20:58:56 | 123,326,997 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,026 | py | Q1Q2.py | import numpy as np
from PIL import Image
from matplotlib import pyplot as plt
import operator
from math import sqrt
#----------------------------------------- -------------------------------
#--------------------------------------- ---------------------------------
#----------------------------... |
737c89f16d096c0d1d1e7d37c522fb1f048fe722 | 194d96189f3c9a5a087024b5ddb878a44021c76b | /dictionary_1.py | 6f69ca03a91917c9fac2f55ca22707da03e469f4 | [
"MIT"
] | permissive | theprogrammedwords/pyDictionary | 3890a379be6bfba42f8c05829dfd15af259a1a6c | 063d07921c9751cd8fdf8d18ec5d763677c0e796 | refs/heads/master | 2020-08-03T04:20:07.270582 | 2019-09-29T08:46:39 | 2019-09-29T08:46:39 | 211,623,428 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | dictionary_1.py | #Import library
import json
#Loading the json data as python dictionary
#Try typing "type(data)" in terminal after executing first two line of this snippet
data = json.load(open(r"C:\Users\admin\Downloads\data.json"))
#Function for retriving definition
def retrive_definition(word):
return data[word]
#Input from u... |
249e365996f3e376c18a45d400a88acfbd7352b8 | 722386e8cb2be70e3a59e4e4667ad2733d84cb93 | /fishc/pac/webdriver_PhantomJs.py | ce24390b165c58e9b444f3065644ce5e4a610860 | [] | no_license | yuansuixin/Python_Learning | 15720a33c5d3d4e2e3b2f5214fdbfb4c3d1ed92e | 40aa8d0d034599f448f9125b34897648e87c8f37 | refs/heads/master | 2021-03-31T01:04:10.830905 | 2018-03-11T09:55:49 | 2018-03-11T09:55:49 | 124,743,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | webdriver_PhantomJs.py |
from selenium import webdriver
'''
爬取淘宝某商品的销量,
'''
driver = webdriver.PhantomJS()
driver.get(r'https://s.taobao.com/search?ie=utf8&initiative_id=staobaoz_20180102&stats_click=search_radio_all%3A1&js=1&imgfile=&q=%E9%9B%B6%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8%E5%AD%A6%E4%B9%A0Python&suggest=history_1&_input_charset=u... |
2ec1049d0ae9490b08efaff94dab6afbc84842a2 | acd54955a0ac0705d5b475166b40ee631d5a7add | /Prob_ofTransmissionErrorErlang.py | 81e6e260d57bbdbedcd108d2115ca8317c698804 | [] | no_license | calebkennett/ErlangB_Calc | 563145bd485a4ff5d83bd46211740097fc970f55 | ea6196307408d0e8a826885848328b36dc7cf7a9 | refs/heads/master | 2021-05-19T13:45:38.934961 | 2020-03-31T21:12:45 | 2020-03-31T21:12:45 | 251,731,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | Prob_ofTransmissionErrorErlang.py | def factorial(n):
if n <= 1:
factn = 1
else :
factn = n * factorial(n-1)
return factn
##################################################
# A is traffic, N is Nc(number of channels)
# same as erlangB
def Erlang(A, N):
L = (A**N / factorial(N))
sum_ = 0
for i in range... |
d5b7313a4dae1d0c9dbd23dd2ffcef257fe609bc | 40e9feb5a14747602cfb0a81edbb3530b65e6624 | /functional_tests/test_list_item_validation.py | a41b894662ab433d49e908bf4da7fef666071d20 | [] | no_license | Tony-DongyiLuo/tonycode | 149b18d45ab10a21c5bb2212ec8a44f6a3bffc02 | 876ca7c6989411d3b0aedadc6128be0e03409492 | refs/heads/master | 2021-06-12T17:10:16.067348 | 2019-08-18T02:10:36 | 2019-08-18T02:10:36 | 152,933,061 | 1 | 0 | null | 2021-06-10T20:55:40 | 2018-10-14T02:41:51 | JavaScript | UTF-8 | Python | false | false | 2,386 | py | test_list_item_validation.py | from unittest import skip
from .base import FunctionalTest
from selenium.webdriver.common.keys import Keys
import time
class ItemValidationTest(FunctionalTest):
#@skip
def test_cannot_add_empty_list_items(self):
#The user submits an empty list item
self.browser.get(self.live_server_url)
... |
f46a8914eab2438993b2a4343df6b9cb7bacb2b3 | 5c3788fa08382fb64467e3fb1feb80ddecceb9e9 | /ia_models/RandomForest.py | 61b9851449a6a0c346f0706d697449db672f5b7b | [] | no_license | lucianozablocki/chatbot | f1ce7656e9dfc26812747745be96bff39ff83bf7 | 17ec184e2cb5eff040a409a8656ce9a6479b7064 | refs/heads/dev | 2023-07-25T06:58:56.609234 | 2020-09-13T22:04:31 | 2020-09-13T22:04:31 | 217,809,890 | 0 | 0 | null | 2023-07-06T21:59:22 | 2019-10-27T05:33:09 | Jupyter Notebook | UTF-8 | Python | false | false | 2,934 | py | RandomForest.py | # Import the model we are using
from sklearn.ensemble import RandomForestRegressor
import pandas as pn
import numpy as np
import matplotlib.pyplot as plt
import utils
from bow import BOW
from nltk.corpus import stopwords
import math
#trainX_RF = pn.read_csv("trainX_RF.csv",header=None,delimiter=',').values
#trainY_RF =... |
44869aa22086a9decc467a56b192afb6ada63599 | cfc8dae44c27b469858b2c3b47125545a4a1ce90 | /assignment-11/code/problem3.py | 7327464162b66f22640857fe96b0335381e10a97 | [] | no_license | pvarsh/pr_informatics | b13a555643347d60a7c3ec489b67c60533d9affa | 8dec11df196eab2736df40ca153bf06c288a9bed | refs/heads/master | 2016-09-05T19:17:33.899273 | 2015-03-11T03:22:53 | 2015-03-11T03:22:53 | 23,924,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,152 | py | problem3.py | import sys
import time
import csv
import math
import numpy as np
import scipy.spatial as sps
def loadTaxiTripsPickupAndDropoffs(filename):
#bbox around Manhattan
latBounds = [40.6,40.9]
lngBounds = [-74.05,-73.90]
#
f = open(filename)
reader = csv.reader(f)
header = reader.next()
#
... |
bb54e1b2812f361312bef47d271ace3cc5e04b33 | b12aed8995a190868b4f585217fffc7fed9109ad | /tests/processor/test_processor.py | 63a251143bf6c78cb370d51c75d6fcddb3ae6850 | [
"MIT"
] | permissive | krskibin/pyChip8 | 392553dce09de98ddc0cce4efc582484015d4cb8 | 517f4514fb49242acd8fb089c7de0ed62252d422 | refs/heads/master | 2021-06-11T05:40:38.796276 | 2020-08-02T11:59:58 | 2020-08-02T11:59:58 | 168,031,534 | 1 | 0 | MIT | 2021-04-20T17:55:04 | 2019-01-28T20:26:48 | TeX | UTF-8 | Python | false | false | 10,196 | py | test_processor.py | import pytest
from unittest import mock
from pychip.processor import Processor
@pytest.fixture(scope="function")
def proc(request):
screen = mock.MagicMock()
processor = Processor(screen)
processor.reset()
return processor
class TestProcessor:
module_name = "pychip.processor.Processor"
memo... |
c3f3203c2d3e317a7012c23ba4cda15bd31e065c | 532cdbff86ead092aa69613d1e9e77a919062c30 | /src/server.py | ddfb6b2836b473420005d8c71d2892aca28fbff1 | [] | no_license | rkbvikrant/whatsapp-seed-bot | a22ec901afb026433af9e0584d85fec823b537ac | c0c658d3e3fa4c3bea719e3e3a74d171ae782b76 | refs/heads/master | 2021-01-19T04:08:28.785831 | 2016-07-10T19:37:55 | 2016-07-10T19:37:55 | 63,015,225 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,735 | py | server.py | """
The server starter.
It has all Yowsup core layers to handle the connection, encryption and media handling.
https://github.com/tgalal/yowsup/wiki/Yowsup-2.0-Architecture
The top layer of the stack is the RouteLayer (from route.py).
It also imports the phone/whatsapp credentials from config.py
"... |
b81ae41abab9a78a08713dedbee1c67b08d95152 | 153e2356d4101516459488309613f5097b9365a8 | /week7 - Множества и словари/week7 - Встречалось ли число раньше.py | f368f002c1f89844355a6d4b50bd4cc4ec132ad3 | [] | no_license | MariaZork/Coursera-Python-Course | bd9500d0f705d74e1a13c6dcd2d9b65f7a4fa712 | 316f1cbdc90cb5cf903e17eaa68f27bc9cb26a09 | refs/heads/master | 2021-09-06T12:28:56.922695 | 2018-02-06T14:35:21 | 2018-02-06T14:35:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,009 | py | week7 - Встречалось ли число раньше.py | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 15 02:44:21 2017
@author: Maria
"""
# Во входной строке записана последовательность чисел через пробел.
# Для каждого числа выведите слово YES (в отдельной строке), если это число
# ранее встречалось в последовательности или NO, если не встречалось.
# Формат ввода
# Ввод... |
82ff3b0a210576995c27bb3cfce09296b10c90e0 | dd01cdd274bb07eeb14c834fa7750fde5b2bc7a2 | /One/user/views.py | 260f3171b662d4c13997aeeebe44494dc672be4c | [] | no_license | Alan451/MCQ-Web-App | ecabd206e64c6b2541dbc231eba78aada114d160 | 9a17aee3ba20677d1e706c6daa42f7aff1eb625d | refs/heads/master | 2021-04-11T11:52:29.858953 | 2020-03-24T11:47:25 | 2020-03-24T11:47:25 | 249,264,812 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,391 | py | views.py | from django.shortcuts import render, redirect
from . import forms, models
from django.contrib.auth.decorators import login_required, user_passes_test
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.forms import AuthenticationForm
from django.contrib import messages
# Create your v... |
ca85432740b17eb27238baeab0cf68d293207f18 | 0ee5e91a5761893aac5a1c396d84bddf1a910dbb | /improc/try.py | 1b9cff4bd68c7b75dc439607af83213646a6b931 | [] | no_license | robdefeo/image_processing | 6f63fa73a92b613182a58ffa095efebb774dfcf5 | 29c4bc90ff22eafc6f539c57939a6fc02ddc6af2 | refs/heads/master | 2021-05-31T20:50:38.186666 | 2015-09-23T12:30:31 | 2015-09-23T12:30:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,939 | py | try.py | import cv2
import numpy as np
from matplotlib import pyplot as plt
from improc.crop import AutoCrop
from improc.color import Reduce, Hex, Background, Matrix
from improc.shape import Flatten
def keypoint_color(kp, image):
return (image[int(kp.pt[1])][int(kp.pt[0])])
def keypoint_extract(kp, image):
print "********... |
be2a3d12d90df3d307b8db79df64c944a927961c | 5eacd1d691ff494a415e0615a3c2dba7e463758e | /zborrador.py | 05353a182278c0104e38e65ecf33c84f35cc3e50 | [] | no_license | carpiero/Sentiment_Spanish_Operator02 | 59dce58489588ec3586addf93441dd5ac398dc65 | b0e4fe707936f314e43e7451ce33b1ef500ea619 | refs/heads/master | 2023-03-01T16:53:05.670870 | 2021-02-06T14:36:41 | 2021-02-06T14:36:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,750 | py | zborrador.py | import matplotlib.pyplot as plt
from os import path
from PIL import Image
import seaborn as sns
import numpy as np
import plotly.express as px
plt.style.use('seaborn')
import re
# import tweepy
import pandas as pd
import datetime
from sqlalchemy import create_engine
# from sshtunnel import SSHTunnelForwarder
import con... |
a86d386bfb1b91a10b777e31e213627c8f5b44b2 | 359e4a821b4f87ffdb0e93771c642a9de6883620 | /Python/prob019.py | 82190025e09b7f2042d8f55548da5c815a4eb709 | [] | no_license | sfujiwara/ProjectEuler | 728b9dc5fd62c07a86cad4df5ad829284e6f054a | b31070513ea8b1660c991321f1a81df08ad875d2 | refs/heads/master | 2021-01-20T09:12:35.986255 | 2016-02-11T10:44:13 | 2016-02-11T10:44:13 | 7,356,282 | 0 | 0 | null | null | null | null | SHIFT_JIS | Python | false | false | 923 | py | prob019.py | """
0-6を日-土までの曜日に対応させる(1901年の1月1日は火曜日なので3)
※ 1900年は閏年でないことに注意
"""
# 月の初めの曜日を保存しておく変数(day of week)
dow = 2
# 月の始めが日曜日になる回数をカウントする変数
count = 0
# 1901年から2001年を調べる
for i in xrange(1901,2001):
months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
# 閏年を場合分け
if i%4 == 0 and (i%100 != 0 or i%4... |
07f85c529f7c1b774a3d33bc7aa695513d9d616d | 3d022009f710ebb7612331cb6f0f4e90c97a8158 | /poliedro_donate/paypal.py | c565f733f0e7432bf74f6275e17150f253f3bc49 | [
"MIT"
] | permissive | namtel-hp/Crowdfunding-Backend | 4b0a425d773665868b07c6cb56087184d724e26d | 63758c55db2e4ef0476723a65b332f5705339ee1 | refs/heads/master | 2022-01-06T21:12:57.347813 | 2019-05-26T17:09:53 | 2019-05-26T17:09:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | paypal.py | __all__ = ('pp_env', 'pp_client')
from . import app
import paypalrestsdk.core as paypal
pp_env = paypal.PayPalEnvironment(client_id=app.config["PAYPAL_CLIENT_ID"],
client_secret=app.config["PAYPAL_CLIENT_SECRET"],
apiUrl=app.config["PAYPAL_API_URL"],... |
af819cdc4c3a0c08679f1c57e065e45ce322316f | 050635a2730ac0b590a5f913d1c878417fbef117 | /blog/admin.py | c71f9d8cb6b27cd719c6711e877ca39cdd573f82 | [] | no_license | fredybarrera/webempresarial | b50cd4f82a3d7b472eeae60c01637dcd0146fc5a | 1fd79650125a093438cb686f8db592d0106f1838 | refs/heads/master | 2021-05-21T07:04:08.844297 | 2020-04-10T03:23:22 | 2020-04-10T03:23:22 | 252,594,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | admin.py | from django.contrib import admin
from .models import Category, Post
# Register your models here.
# Permite redefinir configuraciones en el modelo, en este caso de definen los campos "created" y "updated" solo de lectura.
class CategoryAdmin(admin.ModelAdmin):
readonly_fields = ('created', 'updated')
class PostAd... |
90b1a4df638b302e04038ed373612055192f4ba2 | 3588267a7f6e4b4ca3a15f728de3f4be424348df | /core/src/main/bin/perftrace.py.3 | db7123b22f17cdbd278da5d3841cd3532919d380 | [
"Apache-2.0"
] | permissive | JazzChen/DataX | 206487fb43bc96e3c371b994758cb7daadf1ed5a | c5fe6fb954d0884c5faa1bd5ab7326a99b25045a | refs/heads/master | 2020-01-23T21:59:54.743221 | 2019-02-13T07:49:26 | 2019-02-13T07:49:26 | 74,717,214 | 3 | 2 | NOASSERTION | 2019-02-13T07:49:27 | 2016-11-25T01:57:55 | Java | UTF-8 | Python | false | false | 16,969 | 3 | perftrace.py.3 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Life's short, Python more.
"""
import re
import os
import sys
import json
import uuid
import signal
import time
import subprocess
from optparse import OptionParser
#reload(sys)
#sys.setdefaultencoding('utf8')
##begin cli & help logic
def getOptionParser():
usa... |
d9da3e15922f46a92ae15aba80cf9e647f67b521 | 9f1052c7c6cf88784c8fd20c0e896aab515b3964 | /fitting_error.py | b84fed84a0ed0ee0cec053da55ec22dbce9cc247 | [] | no_license | CaesarMordred/NMFintech_RaphaelTest | 9d11b0c34dc1418d6b409a1d9d9013c4787f0280 | d33ed2c87507124c2942813e86f3f33339b1133c | refs/heads/master | 2023-01-13T21:56:02.359149 | 2020-11-18T03:28:37 | 2020-11-18T03:28:37 | 313,812,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,675 | py | fitting_error.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import datetime
from collections import defaultdict
import math
import os
# 路径,需要修改
os.chdir(r'D:\Work\NMFintech\Test\Test')
# 整个函数计算了FE,输入如下
def cal_FE(theo_data, real_data, data_id, test_bond_type):
# source_data为理论数据
source_data = theo_... |
884b9d8b4df343892dd90d3fadac39640a2fcb18 | dfe7fd8b24511d280a8863a1a48c56f1cc5252cc | /ratings_sync_lib/login.py | 73c050400a91b693497a8fca497beeedf452cc2b | [] | no_license | XanderXAJ/google-music-ratings-sync | 69930174e1cd73116193b169cef5baba9e0e7d76 | 0c07e8a319a866c373f2137fced77f49f0c429ba | refs/heads/master | 2022-09-30T10:36:37.281734 | 2019-08-26T14:50:44 | 2019-08-26T14:50:44 | 91,917,100 | 0 | 0 | null | 2022-09-23T22:34:48 | 2017-05-20T21:24:24 | Python | UTF-8 | Python | false | false | 581 | py | login.py | """Handles logins to Google Play Music"""
import configparser
from gmusicapi import Mobileclient
CREDENTIALS_FILE = '.credentials'
def login_for_library_management():
"""Logs in to Google Play Music using the .credentials file"""
config = configparser.ConfigParser()
config.read(CREDENTIALS_FILE)
e... |
59f524a9dc53ea071293076bc2363b147f8cd73d | 782ec84d47f2c0642ea2608b0bef387aca936833 | /controllers/itemlister.py | 40b64d7b43691fdf39585f3469f1c4f668e82e84 | [] | no_license | Ash-Crow/itemlister | 605f2673fbc7a7868694d0f9252d2b30221f8a99 | 6a0a4018b07656fb2dfa36a59696bc3236ec1953 | refs/heads/master | 2021-01-13T00:55:31.536329 | 2016-03-27T21:23:43 | 2016-03-27T21:23:43 | 54,685,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,454 | py | itemlister.py | import flask
from flask_bootstrap import __version__ as FLASK_BOOTSTRAP_VERSION
from flask_nav.elements import Navbar, View, Subgroup, Link, Text, Separator
from controllers import nav
app = flask.Blueprint("itemlister", __name__)
nav.register_element('frontend_top', Navbar(
View('Flask-Bootstrap', '.index'),
... |
1517601cf70b70d9bc56ae7a3e30a1816cc7a9ad | e3c8aaa76d51114b87fb5af52ecbba095ace5f5b | /simplesocial/posts/models.py | e8b4fdd20419e353a91c73f519e56d1a2c8a8e77 | [] | no_license | nihal7bhai/myBlog | 970fe03f4912bd502ca7919363d316707fe31544 | a7893e10009f02328eacd5faa07ae46a8bc82cc4 | refs/heads/master | 2022-04-28T23:38:55.866246 | 2020-04-18T20:23:06 | 2020-04-18T20:23:06 | 250,307,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,503 | py | models.py | from django.db import models
from django.urls import reverse
from django.conf import settings
from django.contrib.sessions.models import Session
from groups.models import Group,GroupMember
from django.contrib import messages
from django.contrib.auth import get_user_model
User=get_user_model()
from django import templa... |
bbb703fc44eb4895b395862f4cbef2f6e0785d85 | 07a248ec08ef1d58dc92f7fda16990be0a191e6c | /src/dataLoader.py | a8184fca6c622d7c7e9e7ccd74b595e19d32540b | [] | no_license | shkedi/mba-project-bigdata | d1b5ef723c8825df28376ca03fdd2d818e5be0f4 | 570ef9871fe8e549c0b28e0af5647a9e3f80429b | refs/heads/master | 2020-03-12T17:59:18.934449 | 2018-05-04T13:57:12 | 2018-05-04T13:57:12 | 130,750,495 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | dataLoader.py | def load_data(path):
file_to_read = open(path, 'r')
file_to_read.readline()
x = []
y = []
for line in file_to_read:
elements = line.split(',')
tmp_x = []
for i in range(1, len(elements) - 1):
tmp_x.append(float(elements[i]))
y.append(float(elements[len(ele... |
4fbcb76804046bea5ea59033cdb01daa3612c9d3 | bba2e45f579c137fb5c1942cbd474e7c69b565db | /dataset_creator.py | e827c9f7237da9a4223836878b1f6e63574f5e50 | [] | no_license | soumyaporel/Alphabet-Drawing-Recognition | 07667aebea8b4bbe0b2335f694f9e8dc22d4317d | 82e337626b34aeb87f6b3ef45b9fb256ad6dbaf4 | refs/heads/main | 2023-07-07T18:18:38.453204 | 2021-08-22T20:39:43 | 2021-08-22T20:39:43 | 398,739,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,347 | py | dataset_creator.py | from string import ascii_uppercase # for getting list uppercase english letters
import os
import csv # for reading the csv file
import numpy as np # for reading the image data array
from PIL import Image # for retrieving the image from np array
csv_file_path = './downloaded_data/A_Z Handwritten Data.csv' # path to do... |
a3e228034cd0b367ac6d2173086e420caa6ec112 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2309/60603/308803.py | a3c2265eedde2485fcb8f561b4c59c5779219ad5 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,488 | py | 308803.py | def mark_node(x,y):
return x*col+y
def add_edge(f,t,w):
if f not in graph:
graph[f] = []
if t not in graph:
graph[t] = []
graph[f].append([t,w,len(graph[t])])
graph[t].append([f,0,len(graph[f])-1])
def bfs(s):
global level
level = [-1 for x in range(sink+1)]
le... |
04b437e091adc00415898782bb6eec0ab70744cb | a69341d98b58c2b221304a54951f71b6c5dde2bb | /UrllibTest/ChromeCookieLogin.py | f8d849150b4f120fc242d35e11a594e0a104b71b | [] | no_license | pipilove/Crawler | a0e1075445fb0b61b54a7c06328d25d058845cd0 | 9f15d516d6fa11ad2c60fb4be38d3193b076a227 | refs/heads/master | 2021-01-19T02:20:25.800382 | 2016-06-20T15:11:36 | 2016-06-20T15:11:36 | 41,241,658 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,748 | py | ChromeCookieLogin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'pi'
__mtime__ = '8/27/2015-027'
__email__ = 'pipisorry@126.com'
# code is far away from bugs with the god animal protecting
I love animals. They taste delicious.
┏┓ ┏┓
┏┛┻━━━┛┻┓
┃ ... |
2f301b887e1efa5d460de3663478c7fe1c1449dc | e07e1d0cfea4cab4a04141a9055579efe332cea4 | /python_approach/app.py | 5ed4683c16894b2bff814dcf14be16872fb7fa8b | [] | no_license | leopardorossi/BioinfoProject | 95492039925d39733a5a32339f5544669679ba5c | ff686a53aa54cc7255de3905818a52fad141860f | refs/heads/main | 2023-05-30T03:28:03.886093 | 2021-06-14T08:20:56 | 2021-06-14T08:20:56 | 364,196,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | app.py | class SpaceSeedsCounter:
@staticmethod
def run():
print("This is SpaceSeedsCounter project")
#a = read_kmers_countings("resources/out.txt")
#print(a[0])
|
5d28e3cff28cb2262f56ed28bf88c740ba02bcf6 | 917c59198e9aebfbbab3308ea5e86dff5ad53275 | /sdk/python/pulumi_alicloud/sag/smartag_flow_log.py | 192a001f54dec08f595428ee9eb61e839fd0ad52 | [
"MPL-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | pulumi/pulumi-alicloud | 7dae47cc2c6e276d4264001ef361d71ed3a5ad29 | ffddb9036f7893fbd58863d8364a4977eb1bee17 | refs/heads/master | 2023-09-01T10:57:34.824755 | 2023-08-31T05:34:31 | 2023-08-31T05:34:31 | 154,406,339 | 56 | 5 | Apache-2.0 | 2023-09-11T17:22:49 | 2018-10-23T22:45:48 | Java | UTF-8 | Python | false | false | 34,948 | py | smartag_flow_log.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
87be2bd2f716b2e491cb71ff5d99eec01dcced6f | f4a039102743e127bb373ec4f988c77532b0c3ee | /segmentation.py | 843fab22a3717e871b35233904478a0e6962fc2d | [] | no_license | EduardoCao/Cervical-cancer-screening | 3e4f90b4b25babd733df3a3f2ae7bee730410c6a | ec4a730db5556a0949b2149b83394321e759e3df | refs/heads/master | 2020-12-30T12:44:06.753006 | 2017-06-01T15:40:19 | 2017-06-01T15:40:19 | 91,352,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,421 | py | segmentation.py | import matplotlib.pyplot as plt
# %matplotlib inline
import numpy as np
import pandas as pd
import cv2
import math
from sklearn import mixture
from sklearn.utils import shuffle
from skimage import measure
from glob import glob
import os
from multiprocessing import Pool, cpu_count
from functools import partial
from subp... |
ed2ac6bdcb04612c7ade02a76040b388ce2802ad | dae589384fdd37dd53e0692361566616099b24a1 | /tests/funding_sources/test_funding_sources_addresses_list_for_business.py | e576a5d3cdf2d7f3f9f63cff16c29d7d369eb393 | [
"MIT"
] | permissive | marqeta/marqeta-python | 8fab7725a0698a47b8306a0ce1a1c2b148eb439f | 66fa690eb910825c510a391720b0fe717fac0234 | refs/heads/master | 2023-06-03T08:42:44.803150 | 2020-07-23T17:22:11 | 2020-07-23T17:22:11 | 178,072,177 | 24 | 13 | MIT | 2023-05-09T17:59:51 | 2019-03-27T20:47:07 | Python | UTF-8 | Python | false | false | 2,871 | py | test_funding_sources_addresses_list_for_business.py | import unittest
from tests.lib.client import get_client
from tests.lib.address_verifications import verify_card_holder_address_response
from tests.lib.funding_sources import FundingSources
from marqeta.errors import MarqetaError
class TestFundingSourcesAddressesListForBusiness(unittest.TestCase):
"""Tests for th... |
49b7ecdabb3097d7d3d0f662e3a6913aa22c8edd | 810b48c4c072524066b7c997f507287eca5a5bef | /venv/#189_rotate_array.py | 29bd912931f7cc7c97aab6b39b6218c95c8bb7be | [] | no_license | aaron6347/leetcode_algorithms | fc941103d2d9b30ca4085d41f45891b5fccd7a8a | e5c7c74735030b7511b0eee5280e5b24014cd53e | refs/heads/master | 2022-09-17T01:15:21.462393 | 2020-05-05T01:42:45 | 2020-05-05T01:42:45 | 252,998,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,470 | py | #189_rotate_array.py | """#189_rotate_array.py
Created by Aaron at 04-May-20"""
from typing import List
class Solution:
def rotate(self, nums: List[int], k: int) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
# app1
# n=len(nums)
# ar=[0]*n
# for x in ran... |
cf69cbd642d6481fba427445b49ddd05b5accc30 | b28a4f7ccd985c487785d07ccdc9431e4b6a43b5 | /09.day/Dag.py | 2bd0a2dbe8818af4545568d4163b519cdc6e721f | [] | no_license | zhangxiaoxiaohao/python3 | f0bb8d953c64a815641541c7dc815c07494f1e68 | f249b1ee2bafc25ab1f88cb5df90739cf8577910 | refs/heads/master | 2020-03-13T11:12:25.268289 | 2018-06-01T01:22:41 | 2018-06-01T01:22:41 | 131,097,288 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | Dag.py | class Dag(object):
def __init__(self):
self.__dag = "dahuang"
|
3f6afceb047a3ad68842dc1a58dc32256ec48511 | 994d266cb5b034160c22296b006ec011ebd7d83c | /dreamtable/hal/base.py | 0961ccf696d958588c898b702b7a30a6d21ab592 | [
"MIT"
] | permissive | vreon/dreamtable | 7df96f9d82378b4dda28088d42592776e0851cb7 | e93b12aa657d6dbf5f3552bd451a6f484293799c | refs/heads/main | 2022-12-10T13:27:46.927071 | 2020-08-23T06:55:08 | 2020-08-23T06:55:08 | 286,691,333 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,066 | py | base.py | import esper
from dreamtable.hal.types import (
FontHandle,
ImageHandle,
TextureHandle,
Camera,
Color,
Key,
MouseButton,
TextureFormat,
)
from dreamtable.hal.geom import Vec2, Rect
class HAL:
# Window and screen
def init_window(self, width: int, height: int, title: str) -> Non... |
23c54ff87b8d7a95f3b9fa40bd0e844947be18ca | f8afde1f2bce44a3841a5e2113de0fbb0eb39910 | /analysis/schedule.py | 40a7f104a4b9f0c9fbdbfd5b830ff78c23149f2c | [] | no_license | middaywords/Vis-proj | 21e86f13e2e6b5e6b24d9c9f3123d2ecb9452784 | 6ce1e00c6fb6a7e83cf4802f14388e17de8a00ec | refs/heads/master | 2021-06-11T07:37:51.541029 | 2021-05-25T02:17:26 | 2021-05-25T02:17:26 | 186,627,230 | 1 | 0 | null | 2021-05-25T02:06:10 | 2019-05-14T13:22:16 | JavaScript | UTF-8 | Python | false | false | 501 | py | schedule.py | import pandas as pd
# transform schedule.csv to psnSdl.csv
def transformCsv():
file_name = "../frontend/static/schedule.csv"
df = pd.read_csv(file_name,header=None)
df_out = []
for i, _ in enumerate(df.index):
for j, _ in enumerate(df.columns):
df_out.append({'grid': i, 'time': j, ... |
d83a5c6be542fd77433c3db0a05352fbc2a2b748 | 07bae7671cac165fb91554343396ee1343c6363d | /serial1/serializable1.py | 7543553d0c79fc453d695a21b064c037913b399f | [] | no_license | quyixiao/python_lesson | 7869dfd3aec8f5b6500ae955ae5c50a956f7b4c3 | 81684d06e6f054049fa79b0e63ab528bdc46581f | refs/heads/master | 2021-06-28T08:01:02.937679 | 2021-03-11T10:29:57 | 2021-03-11T10:29:57 | 221,687,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,679 | py | serializable1.py | # 内存中的字典,列表,集合以用各种对象,如何保存到一个文件中
# 如果是自己定义的类的实例,如何保存到一个文件中
# 如何从文件中读取数据,并让它们在内存中再次变成自己对就的类的实例
# 要设计一套协义,按照某种规则 ,把内存中的数据保存到文件中,文件是一个字节序列,所以必须 氢数据转换成字节序列中,输出到文件中
# 这就是序列化,反之,从文件的字节序列恢复到内存,就是反序列化经
# 如果一个对象存储在内存中,python 能将内存中的数据,保存只是一个顺带的事情,文件存储,是序列化,数据必须转换成一个序列
# 反过来,序列化,
# 序列化保存一以文件吴诗就是持久化
# 可以将数据序列化后持久化,或者网维传输,也可以将从文件中或... |
a3defd36965882e5244097db9c16959c9395382a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03457/s266487110.py | 603074eaa30d9e71541efebcc17b4b1d98636d62 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 635 | py | s266487110.py | import sys
input = lambda: sys.stdin.readline().rstrip()
def main():
n = int(input())
pos = (0, 0)
time_before = 0
can = True
for i in range(n):
t, x, y = map(int, input().split())
dist = abs(pos[0] - x) + abs(pos[1] - y)
time = t - time_before
# 時間内に到達不可
if... |
a381a19c5e891b310c036838d4a8978f37633563 | 8d79fc03f6e5a6df41e824c8573d3ea4646146bf | /IB_Arr_Repeat_&_Missing_Num_array.py | fff9785c211a171de623a320d4e6f1229a7cf5ff | [] | no_license | Cbkhare/Codes | 3bea294dd0f2ec99e7e0ef0b7ff976cbe1765b7f | 5b535795cdd742b7810ea163e0868b022736647d | refs/heads/master | 2021-10-24T03:26:54.983073 | 2019-03-21T14:33:41 | 2019-03-21T14:33:41 | 111,226,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | IB_Arr_Repeat_&_Missing_Num_array.py | from sys import stdin as si
class Solution:
# @param A : tuple of integers
# @return an integer
def repeatedNumber(self, A):
l = len(A)
s = sum(A)
sn = sum(range(1,l+1))
d = sn - s
s2,sn2=0,0
for i in range(len(A)):
s2 += (A[i]**2)
sn2... |
a96e5c315f9e582ddb4e97e9210b6af23b2ea311 | 855e2a135510bc4efcfa92e21b964e17a8778dd7 | /src/python/graplctl/graplctl/aws/commands.py | ae22a446c6cb6266dd75b3117f365e95f2b37481 | [
"Apache-2.0"
] | permissive | nevi-me/grapl | 660a6d5cd0a468376e675603aed5638cb2092f3a | 44527478b06a5c630215ae201c1f9c3f506d6089 | refs/heads/main | 2023-05-28T17:06:19.252750 | 2021-06-08T22:01:57 | 2021-06-08T22:01:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,091 | py | commands.py | from __future__ import annotations
import pathlib
from os import PathLike
from typing import TYPE_CHECKING
import click
import graplctl.aws.lib as aws_cdk_ops
import graplctl.dgraph.lib as dgraph_ops
import graplctl.swarm.lib as docker_swarm_ops
from grapl_common.utils.find_grapl_root import find_grapl_root
from grap... |
840275d22c1791dd3514b6835a599bd6f3e458dd | b1f68f24889b02f89d918b346d4385fe699fd870 | /blender/test4.py | 882b8bd59d43879ee35c8fb73f82e88c9b26e3c1 | [
"MIT"
] | permissive | Moguf/SciencePlusMusic | 8d4ae34c61100c71e2ce3576d16706f75e5070e5 | 2fa7fe68c1ce6390f57c71aa8fea5715c3d54469 | refs/heads/master | 2020-09-19T14:41:10.776514 | 2016-09-07T14:10:36 | 2016-09-07T14:10:36 | 67,104,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,248 | py | test4.py | import os
import bpy
import numpy as np
bpy.ops.mesh.primitive_circle_add(location=(4.0,4.0,4.0))
bpy.ops.mesh.primitive_cone_add(location=(4.0,0.0,0.0))
bpy.ops.mesh.primitive_cylinder_add(location=(10.0,0.0,0.0))
bpy.ops.mesh.primitive_cube_add(location=(0.0,4.0,0.0))
bpy.ops.mesh.primitive_grid_add(location=(10.0,... |
435a54cd8219f4ff78f981e4e5a73b2f62a436d9 | 2c7cb9ca4407866d95f2fb00730c5ee3951c2a8f | /main.py | e90a26f4ee653b635c2138c15ac82815a9f94202 | [] | no_license | Dennosy/Myfirtsrepl | 4774ba2c79e658070d54d54ad6b2ec4c197ba04b | 8e1f0c3f7af2861aa037ac7ef56f8c1f33bb1e28 | refs/heads/master | 2022-12-15T05:07:37.508405 | 2020-09-16T02:46:39 | 2020-09-16T02:46:39 | 295,906,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21 | py | main.py | print("hello Gtcare") |
780f685adf8f6d15908e3dc01db2d04eb198549d | c80b3cc6a8a144e9858f993c10a0e11e633cb348 | /components/ally/__setup__/ally/deploy.py | fda3ef6b7f98c7d3ab87c9ec1244ae96a3c3d700 | [] | no_license | cristidomsa/Ally-Py | e08d80b67ea5b39b5504f4ac048108f23445f850 | e0b3466b34d31548996d57be4a9dac134d904380 | refs/heads/master | 2021-01-18T08:41:13.140590 | 2013-11-06T09:51:56 | 2013-11-06T09:51:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,752 | py | deploy.py | '''
Created on Oct 8, 2013
@package: ally base
@copyright: 2011 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Gabriel Nistor
Special module that is used in application deploy.
'''
from logging import FileHandler
import logging
import os
import sys
import unittest
from ally.container... |
8b1fbdff90ee6c2f2c8b68fd3b2d607bdf81c9b1 | 5bbbae49482e8a1eb911ef26fbaf5e0821402585 | /Atcoder/ARC/083/D.py | 33072bddf654c75896ff3197bbd69287e5c6962f | [] | no_license | masa3141/procon | cea14c72792b8217dd273faf45dc7b244b82e217 | a12d30e0d1eeb58235b6fc51a558f409a2ee3792 | refs/heads/master | 2021-01-10T07:23:20.838176 | 2018-04-02T13:12:19 | 2018-04-02T13:12:19 | 46,625,150 | 0 | 0 | null | 2018-01-12T14:38:19 | 2015-11-21T17:14:34 | Python | UTF-8 | Python | false | false | 2,675 | py | D.py | # -*- coding: utf-8 -*-
N = int(input())
adj = []
for i in range(N):
adj.append(dict(zip(range(N), list(map(int, input().split())))))
del adj[i][i]
print(adj)
import heapq
# ダイクストラ法
def dijkstra(adj, start_id):
'''
:param adj: adj[i][j] distance between i and j
adj = list(dict()) #隣接リスト形式
:... |
ca64349de65abad15a096d80dea84a9381d48e4f | e9fcef9a1df275ec4d46c8a088f8fa2265f6291e | /_single_ROI_corr.py | 248ff88f9858d6c8c4c25e0c047aeb262d1b9a1a | [] | no_license | msabato/cracks_Sabba | 3d6b87821b87fcf7b6a106ce5c6bcf8c17cc5337 | 6e5e1fe14d897766e6829bd0bcc2dfcabf0876bb | refs/heads/master | 2022-08-07T09:27:56.813526 | 2020-05-10T16:30:00 | 2020-05-10T16:30:00 | 257,308,978 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,327 | py | _single_ROI_corr.py | """
Created on Thu Jul 25 11:54:35 2019
@author: Matteo Sabato - msabato@g.harvard.edu
main program for calculating Strain Map
"""
import sys
import os
import numpy as np
import re
import math
import struct
from PIL import Image
import cv2
import warnings
import scipy as sp
import scipy.special as ssp
from scipy im... |
7ecee778ac6455cba3b92b51b3341423a988465e | a33be40f3d228ab35e048b2898b16f5d5c787fcf | /movieapp/urls.py | 1d637915429da79a716dc15aec95cd6dd8c51b65 | [] | no_license | gpachota/my-first-blog | fee5b6b99246d172d9f62d11b1f147b69ed5a4be | 3262fa7238200031c3f6a7afa6b30636d2ef96dd | refs/heads/master | 2023-02-25T21:09:26.008905 | 2021-02-03T22:03:28 | 2021-02-03T22:03:28 | 335,221,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.main_page, name='main_page'),
path('lists/', views.list_of_lists, name='list_of_lists'),
# path('lists/', views.movie_list, name='movie_list'),
] |
83047a455a415783a5966848077def8b0b624733 | cefa2d235896b31f84456160787eebf55f3ccc84 | /wiki-mysql.py | 8f35e59bad468e67820ed69ded84763168889a89 | [] | no_license | Unbeaten123/Take-others-as-mine | eaebb4bd5595a81183a106a3968fc235955e8998 | 26227cd558b52259dce45fb7d586a5fe172c44aa | refs/heads/master | 2021-01-10T15:20:53.147238 | 2016-04-27T14:55:21 | 2016-04-27T14:55:21 | 53,040,946 | 0 | 0 | null | 2016-04-04T06:06:12 | 2016-03-03T10:13:29 | JavaScript | UTF-8 | Python | false | false | 1,959 | py | wiki-mysql.py | # -*- coding:utf-8 -*-
#Crawl wikipedia's Urls with a recursionLevel of 4 and then storage them in Mysql
from urllib2 import urlopen
from bs4 import BeautifulSoup
import re
import pymysql
conn = pymysql.connect(host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='root', passwd=None, db='mysql', charset='utf8')
cur... |
b74ea56d6fcfc5566c58b5f13ebe11a8945159d7 | 1f7d287ef90041e20468513a26a39e1f3d221289 | /Level-2/s05/guvi-L2-s05-py04.py | 9229816f6c3bc4a28411777672fb8fccca268e36 | [] | no_license | ksthacker/python | d787d69f954c0e9b59b0cc96a8b8fc5c0594d8a0 | 3a3775e1b9349e313f8c96ea11eade54a7e9bf54 | refs/heads/master | 2021-04-27T16:32:40.923316 | 2019-08-21T04:50:22 | 2019-08-21T04:50:22 | 122,303,461 | 0 | 17 | null | 2019-10-03T14:59:51 | 2018-02-21T07:09:32 | Python | UTF-8 | Python | false | false | 115 | py | guvi-L2-s05-py04.py | import sys,string, math,itertools
s,k = input().split()
k = int(k)
n = len(s)
s2 = s[-k:] + s[:-k]
print(s2) |
bbe7965405021f1c7105799197688fc801d39cbd | fb563b51e7a08945046e94c17c7ad2fb62d64e31 | /py/md_schema/__init__.py | 75dd5023ec5275b140d05d7ea16a55a4b66e1e23 | [
"MIT"
] | permissive | f43i4n/md-schema | 4c12c55a645c3e839427532bcaf653bd4ea66545 | ff948e2c27740214f980f0b9ae5e420cdb0d2bd0 | refs/heads/master | 2021-07-01T03:32:20.281585 | 2021-01-17T17:43:00 | 2021-01-17T17:43:00 | 214,273,362 | 1 | 2 | MIT | 2019-10-13T18:23:25 | 2019-10-10T19:54:47 | Python | UTF-8 | Python | false | false | 46 | py | __init__.py | #!/usr/bin/env python3
__version__ = "1.0.0"
|
3fbea4ceff58474497ffbf533c4f1fb91d0f366e | 2bf9d55b04e1bebec81a1641429990a5d932afbc | /main.py | 26eff0dfbbe03c1e95829d4e61f288ac131f6996 | [
"MIT"
] | permissive | noelbenz/desky | d2b9488f9cce7387104ded3d1bbd045021eefe11 | 34f04bfc25bc5949099fd76651366391f446ceee | refs/heads/master | 2021-04-27T22:33:32.730041 | 2018-09-10T05:08:43 | 2018-09-11T04:13:08 | 122,258,930 | 0 | 0 | MIT | 2018-09-11T04:06:12 | 2018-02-20T21:32:10 | Python | UTF-8 | Python | false | false | 2,494 | py | main.py |
import pygame
import pygame.freetype
from desky.vector import Vec2
from desky.graphics import Graphics
from desky.clock import Clock
from desky.gui import Gui
from desky.scheme.default import DefaultScheme
from desky.button import TextButton
from desky.checkbox import Checkbox
from desky.text_entry import TextEntry
f... |
d8097e010af47d98a6923e4cef3fdb134fb313cb | 62e1eb01eb3c426c18ef334cb9195f7c55008240 | /Servise/Parser/Engine.py | d0812929d4e739d5ed3185c546cf01f48037a9e0 | [] | no_license | Orion10110/NetHwParser | fb74b6b2d98296066cd12d504ec58095e346d8f2 | d798da9eccbbe8cd5465d08d46bd60c92db2c4b6 | refs/heads/master | 2020-03-28T17:09:39.154989 | 2018-09-21T08:05:25 | 2018-09-21T08:05:25 | 148,763,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,937 | py | Engine.py | from abc import ABC, abstractmethod
from .Deal import Deal
import urllib.request
class Engine(ABC):
@abstractmethod
def parse():
pass
def getHtml(url):
try:
response = urllib.request.urlopen(url)
except:
print("No connection to ",url)
return... |
8c96f4abf96cfd6e0325f9d1930b059971c5103c | abeece6c178bfa2a638319fa150a6ab497cf4521 | /connectedframe.py | 30567a2aafc777ed297cdbcee7bb81b490ec5f9f | [] | no_license | Johnpweber1010/CommandFrame | a65953b64688f2f302010bb657b930566837dd24 | 59f2ee1900e5770b9892096728c77d556d97e05a | refs/heads/master | 2020-04-13T01:15:44.235182 | 2018-12-24T01:06:14 | 2018-12-24T01:06:14 | 162,869,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,153 | py | connectedframe.py | #!/usr/bin/env python
from Tkinter import *
from os import putenv, getenv, system
from PIL import Image, ImageTk
from glob import glob
dropbox_link = getenv("DROPBOX_LINK")
download_interval = int(getenv("DOWNLOAD_INTERVAL_HOURS")) * 60 * 60 * 1000
carousel_interval = int(getenv("CAROUSEL_INTERVAL_SECONDS")... |
55d770df5bea6a3ddeb6dba0092657645c0bdef6 | 945f010e76d74fb5336d6f67d96a7227c00a91b7 | /catasyn/entrypoints/app.py | 45a098f9409cebb01fc6304d5a66fa018d6da77f | [] | no_license | antonio-one/catasyn | 26a5dc3bfb60533f4594ad54420c4497b2e5c72f | 8753700b9ff0a0694e38c1928d49bc66569a6c6e | refs/heads/main | 2023-06-30T13:53:10.735565 | 2021-04-08T17:28:57 | 2021-04-08T17:28:57 | 334,652,301 | 0 | 0 | null | 2021-07-30T07:56:11 | 2021-01-31T12:41:44 | Python | UTF-8 | Python | false | false | 692 | py | app.py | from fastapi import FastAPI, status
from fastapi.responses import RedirectResponse
from catasyn.settings import SCHEDULE_INTERVAL_SECONDS
ROOT = "/v1/catasyn"
app = FastAPI(
title="catasyn",
description="A simple way to synchronise your DATa CATalogue with Bigquery",
version="0.1.0"
)
@app.get("/")
asyn... |
6f3583743f0e55089179974c82dbfecfb222b9fd | f035c581cfd09ea85d128e5638d28a0470772ffa | /condicionales/ejercicio3.py | 5b56e63dbbaf11d1882ed5375ee1783a17e65829 | [] | no_license | Tanerin/BasicPython | c65cece7ed05a21a79841fa85e80585b8b5bc9d2 | 9a4693f214f6ef203ec1d62237fb90df06503147 | refs/heads/master | 2023-03-24T18:57:05.883912 | 2021-03-19T22:43:56 | 2021-03-19T22:43:56 | 322,974,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | ejercicio3.py | #Programa para saber si una division es exacta o no
n= float(input("Introduce el divisor: "))
m= float(input("Introduce el dividendo: "))
if m==0:
print("Error no se puede dividir por 0.")
else:
print(n/m) |
a247294ca630ec3103379301623621879560af81 | fbeb391422a68fe69edf2893503e1a7379414d3c | /pyfiles/remove_character.py | 08631b921f13ad2e89714a904d4f033b5fe21137 | [] | no_license | niklasben/iwistcl | 0fb33f5bdb0acda3d1bb852e6900fd9b6823e68c | 3a70cfa524b75d0e11e24a83ffd0cca274694d92 | refs/heads/master | 2021-03-27T10:16:46.211273 | 2017-06-12T20:49:01 | 2017-06-12T20:49:01 | 82,057,474 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,142 | py | remove_character.py | # -*- coding: utf-8 -*-
"""Removes a defined character from every line.
-------------------------------------------------------------------------------
I thought he knew the context of what I was talking about
-> http://programmingexcuses.com/
"""
import re
with open('files/synsets_path_only.csv', 'r') as openfile,... |
fe7c3f208de4c799b15617bc5ffd407cf971a897 | 25ebc03b92df764ff0a6c70c14c2848a49fe1b0b | /daily/20170909/example_rq/src/02consume.py | 8a0af53856b305044471e09e18cdce290ad6d96a | [] | no_license | podhmo/individual-sandbox | 18db414fafd061568d0d5e993b8f8069867dfcfb | cafee43b4cf51a321f4e2c3f9949ac53eece4b15 | refs/heads/master | 2023-07-23T07:06:57.944539 | 2023-07-09T11:45:53 | 2023-07-09T11:45:53 | 61,940,197 | 6 | 0 | null | 2022-10-19T05:01:17 | 2016-06-25T11:27:04 | Python | UTF-8 | Python | false | false | 382 | py | 02consume.py | from rq import Queue
from redis import Redis
redis_conn = Redis()
q = Queue(connection=redis_conn)
# Getting the number of jobs in the queue
print(len(q))
# Retrieving jobs
queued_job_ids = q.job_ids # Gets a list of job IDs from the queue
queued_jobs = q.jobs # Gets a list of enqueued job instances
job = q.fetch_... |
bd21a6caa96ce14676dc11968c667cfd89d67ca4 | 6eb806820465b2b593f9e69a1c2b896c50a912cc | /solutions/0047-permutations-ii/permutations-ii.py | a8750a70c55eb552fec5cf7ec0e908f119bf4bd6 | [] | no_license | GeorgeJu95/LeetCode_algorithm | 4663ab71710fe582ba0ae9aa7bc4f2b31ac13f90 | 202b6f24f199119ad8edb17dddf963eabc9336f7 | refs/heads/master | 2022-12-10T14:25:44.580291 | 2019-11-29T05:22:17 | 2019-11-29T05:22:17 | 200,389,729 | 0 | 0 | null | 2022-07-06T20:18:35 | 2019-08-03T15:13:45 | C++ | UTF-8 | Python | false | false | 845 | py | permutations-ii.py | # Given a collection of numbers that might contain duplicates, return all possible unique permutations.
#
# Example:
#
#
# Input: [1,1,2]
# Output:
# [
# [1,1,2],
# [1,2,1],
# [2,1,1]
# ]
#
#
from collections import Counter
class Solution:
def permuteUnique(self, nums):
# print(Counter(nums)) Coun... |
3c55ffe3642d0d277ff348269ba7c696e58305b0 | 4c6166d44d219358bcd7387587bbe3b3207c1038 | /MyANNTest.py | 532fa93e4663b8bbf61058b9f683137bbe796d69 | [] | no_license | fujinuji/ann | 20e0e8ffbed60c15f6647d220d2f701c2739d198 | 9978528e1bc09b819b5bb4b1762277899d9ed32a | refs/heads/master | 2022-11-06T02:18:03.891460 | 2020-06-15T10:19:35 | 2020-06-15T10:19:35 | 271,817,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,354 | py | MyANNTest.py | import numpy as np
from sklearn import neural_network
from sklearn.preprocessing import OneHotEncoder
from MyANN import MyANN
from Utils import evalMultiClass, plotConfusionMatrix, load_data_sepia
np.random.seed(5)
def pre_process_data(train_x, train_y, test_x, test_y):
# Normalize
#rain_x = train_x... |
fc521a605725686bbdbab9a7d55cb9734c9e44aa | a34399034e2db12bbc060dadd2e24cd2e2868eee | /festa_list/purpose_classification/find_purpose.py | 4747c0162f438d4055e7e9e70dc3cbc52e464533 | [] | no_license | choryDev/festabot | 3f60c50e0ed9ca3bfb73796c6e3d34e15cb41130 | c47cb4a081247f4c4feedfd85ced79ff7ba3bfb9 | refs/heads/master | 2021-07-14T11:04:31.375436 | 2021-03-07T14:37:19 | 2021-03-07T14:37:19 | 291,499,511 | 2 | 0 | null | 2020-08-30T15:39:41 | 2020-08-30T15:39:40 | null | UTF-8 | Python | false | false | 18,738 | py | find_purpose.py | from konlpy.tag import Okt, Mecab
import json
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
import sys
import os
from purpose_classification.word2vec.word2vec_obj import Word2vecObj
from region_ota_checker.region_checker import region_return, region_check_flg
from date_checke... |
6f49da7ba313a30517e9abe8c7950b5fe837637d | 347d65fcd867d6aa7775c2f727ea655559b6af5e | /rrd/rrd_update.py | 33b384154ba4b6c4cf7eaf8b0b5d12c0dc378be7 | [] | no_license | sven337/home-monitoring-server | 98f4a3347ba4d33323aeccd6d366ec22fbcbc8f5 | 4b74a6013fd3a48f690ae86a9d864306a8d5ba20 | refs/heads/master | 2021-07-15T10:45:18.337505 | 2020-06-11T17:01:35 | 2020-06-11T17:01:35 | 17,724,623 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | rrd_update.py | #!/usr/bin/python2
import sys
import rrdtool
APIKEY=""
RRD_PATH=""
def read_vars(path):
global RRD_PATH
config=open(path)
for line in config.readlines():
splt = line.split('=')
if splt[0] == 'APIKEY':
APIKEY=splt[1].strip("\n")
if splt[0] == 'RRD_PATH':
RRD_PATH=splt[1].strip("\n")
read_vars("rrd_con... |
f34818d08621243661f0af98940f0d6bb6763eb3 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/image_synthesis/GAN_ID1931_for_PyTorch/implementations/context_encoder/context_encoder.py | 3d88047faaae9f185e6a8689ea8c7f5b3414ffe9 | [
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 8,461 | py | context_encoder.py | #
# BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain ... |
6aea48ce53b269b91e2d2327324308623c9d24ba | 9e438436fa433b2f707fb540437556c31f736c23 | /foo/admin/work_sheet.py | 06c9406323c2201beb6b73d917c60a3281413159 | [
"Apache-2.0"
] | permissive | ThomasZh/legend-league-admin | a0e186b0df8c9b0e2cb8cf60f7fa81edd626d012 | a4c76f0708a2dd7690e3b4f8425ddd713e351e8a | refs/heads/master | 2021-01-11T17:27:29.138284 | 2017-06-12T01:49:05 | 2017-06-12T01:49:05 | 79,771,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,259 | py | work_sheet.py | #!/usr/bin/env python
# _*_ coding: utf-8_*_
#
# Copyright 2016 7x24hs.com
# thomas@7x24hs.com
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... |
ecaac578ac909b5d89d3015424c580885d1e6410 | 6d8a7664b25fbe9c24ca972d310c5934d0d991e8 | /Lista Numero Pares e Impares.py | 4dccf6f7a77861fbfbe8fea11f6c025ec81ac766 | [] | no_license | LeoGraciano/python | c6d24f438c3735fd97d1e71ea7bfd53d16fc2205 | bf447bb42a5fab399a8cae5a5d2f5785f9ed0ebf | refs/heads/master | 2022-12-22T11:48:11.757387 | 2020-09-29T03:24:11 | 2020-09-29T03:24:11 | 287,509,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 729 | py | Lista Numero Pares e Impares.py | num = list()
pares = list()
impares = list()
while True:
n = int(input("Digite um numero: "))
if n not in num:
num.append(n)
if n % 2 == 0:
pares.append(n)
else:
impares.append(n)
else:
print("Valor duplicado!! Não Adicionado")
r = str(input("Quer ... |
7c4dc6e812b6ad46f3234ebf2866517ab6fd1534 | d97452c9f0adfeeb888209675bbf1f94aceb2b81 | /defult arguments.py | 7a2117a32552be70b394f10975c6dcd81840bf3e | [] | no_license | happysmile27/tkinter_module | 742a977af13e15ebaa097bcd9339b1b8aa687772 | 54b35460c80a0c76b7838b01f4fac634cfd7c87f | refs/heads/master | 2023-02-02T17:41:12.041035 | 2020-12-22T19:53:34 | 2020-12-22T19:53:34 | 323,719,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | defult arguments.py | def add(*args): # type - tuple
sum = 0
for n in args:
sum += n
print(sum)
add(1, 3, 5, 6, 7)
def calculate(n, **kwargs): # type - dictionary
# for key, value in kwargs.items():
# print(key)
# print(value)
n += kwargs["add"]
n *= kwargs["multiply"]
print(n)
cal... |
a1066500e4def1ca0ced9ffe8cc7a13d505f5ff2 | 72a821ecffcdd81c7cf7b77ca3877b8df8d7c21a | /Automate the boring stuff with Python Programming/Functions/own_func3.py | 41ac234f683e8c53c44d3f847199aedb61c1b1cd | [] | no_license | 95Satyen/Python-Practice | 8ccea749355a72a0a49a4ae6f9d7689c8b500880 | 5c0ed0a14ec32b38b96d48fd9662cbbd7354b066 | refs/heads/master | 2021-01-25T13:35:56.523374 | 2020-02-15T08:14:56 | 2020-02-15T08:14:56 | 123,591,818 | 1 | 0 | null | 2018-03-03T12:07:57 | 2018-03-02T14:52:15 | Python | UTF-8 | Python | false | false | 249 | py | own_func3.py | print('Sum', end='')
print('mation')
def sum(a,b):
return a+b
print('Enter x and y')
x = input()
y = input()
print('Enter String or Number')
value=input()
if(bool(value)==True):
print(sum(int(x),int(y)))
else:
print(sum(x,y))
|
ff6ebf12d4b825f5df5613c9faaadae9c460b3e1 | 7511b7ed5938110a7a1017a09f7d8aadb86e384f | /tst/regression/scripts/utils/athena.py | 86a17c2aaa6a384c6304e659cfe3ada0f0c9f1ea | [
"BSD-3-Clause"
] | permissive | fheitsch/athena-public-version | 1a6bfa0565dd0ae4d603b207a9926b8ead651458 | 3b16c8d8aeaac64c132fc7d0ce54969b4407fc05 | refs/heads/master | 2023-08-31T09:26:10.989628 | 2022-03-14T14:36:00 | 2022-03-14T14:36:00 | 151,950,747 | 2 | 4 | BSD-3-Clause | 2022-08-10T17:18:44 | 2018-10-07T14:35:52 | C++ | UTF-8 | Python | false | false | 4,931 | py | athena.py | # Functions for interfacing with Athena++ during testing
# Modules
import os
import sys
import subprocess
# Global variables
athena_rel_path = '../../'
saved_filenames = ['src/defs.hpp', 'Makefile']
saved_files = []
global_config_args = []
global_run_args = []
global_silent = False
# Function for configuring Athena... |
89840633bfffe98f3f08212fe4613add6611cd84 | 6f56988c20fd801703b54b29b2431ac5f649a36e | /phillip/temperature.py | 74d5ce5cc10d233da72a35c9b1a23d15e9d8b720 | [] | no_license | codenewbie-realpython/rp_week3 | c281bae80ead87c757eea9b3e25f5346f3cf982a | f9f4f9670084071627f5a9b34a48773fcba6b9d4 | refs/heads/master | 2020-08-05T03:34:18.318415 | 2015-05-26T22:56:10 | 2015-05-26T22:56:10 | 35,917,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | temperature.py | def c_to_f(temp_c):
new_temp_f = (temp_c * 9.0 / 5) + 32
return "{} degrees C = {} degrees F".format(temp_c, new_temp_f)
def f_to_c(temp_f):
new_temp_c = (temp_f - 32) * 5 / 9.0
return "{} degrees F = {} degrees C".format(temp_f, new_temp_c)
print c_to_f(37)
print f_to_c(98.6) |
5098b0db5066327fdb04c10753701aa8c34cd5dd | 7366f292ede1ce81481e4b07fab70433a854012f | /complete-dsa/string/palindrome.py | 1be04e30daedbf7b1568c0678a1ee09b8323388d | [
"MIT"
] | permissive | nishantml/Data-Structure-And-Algorithms | 86534936d20c00e31ee71485ca8e07232b5c7671 | 1f75bdbddb5fa4bccba762515460c73280cde65d | refs/heads/master | 2023-03-05T22:31:19.027993 | 2021-02-21T16:50:31 | 2021-02-21T16:50:31 | 275,635,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | palindrome.py | def PalindromeString(str):
rev = str[::-1]
if rev == str:
return True
else:
return False
print(PalindromeString('abba'))
|
9e9779a9f096112f38ab2c4c68ac07c3cf9b45fd | 6013064c1220fea2d1e40faa9a17e5df10640a0b | /scrapers/selcobrand/models.py | e35e4022dc56c3dc14f8299e672933f16ce07367 | [] | no_license | 4chirinos/scraper | e5ece303378e35bfa86f831ebd48e6d1b04eb320 | a7eb3988a28bf8d91ce74a51e50956b0b5ce3e34 | refs/heads/master | 2020-05-20T19:33:57.389107 | 2020-04-07T16:07:14 | 2020-04-07T16:07:14 | 185,725,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | models.py | class ProductInformation:
def __init__(self, name, regular_price, current_price, measure):
self.name = name
self.regular_price = regular_price
self.current_price = current_price
self.measure = measure |
185e5a2130e874718a40ecf3363697771dd2cfa3 | 568373fe3bdc2675030ee04693539a5c5be5cace | /example/test1.py | bcc5383c203295e4368ad79b0d15c01f9da3768d | [] | no_license | cxdtotsj/UIAutoTest | 73bf4a4ac2610ac4e2e65e39b17552ba7e40d9ef | aab24cfe7bdbeb1ddf17ae00ec76c414007cf28b | refs/heads/master | 2020-05-31T15:27:46.112036 | 2019-06-19T05:54:53 | 2019-06-19T05:54:53 | 190,358,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,601 | py | test1.py | import sys
import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from configs.config import DRIVER_PATH
import os
import time
from base.base_page import... |
97d8eec803cc174d3504727b96bdf16637270679 | 481f0ccd77878777cb982587d31d568666287b5b | /deniz1.py | e51346673d9556953c02a2c7e69833fabdc4392a | [] | no_license | DenizSerezl/date | f623e689cb291b275c75f00e80f12b3ec3c0e493 | 122822418167423ecfbef4be67be6381434e1d11 | refs/heads/master | 2022-11-21T21:23:58.292574 | 2020-07-09T13:24:44 | 2020-07-09T13:24:44 | 278,370,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,090 | py | deniz1.py | # 1. SORU
from datetime import datetime
date_string = "21 June, 2018"
print("date_string =", date_string)
date_object = datetime.strptime(date_string, "%d %B, %Y")
print("date_object =", date_object)
# 3. SORU
def egcd(a, b):
x, y, u, v = 0, 1, 1, 0
while a != 0:
q, r = b // a, b % a
... |
8b81a62bcec4be5d775a6d552be957de3fc12c96 | 23124d835384a35f2b2a760a9b94f93bcdf807d9 | /site1/migrations/0023_site1htmlpage.py | bc7df917c13d9a62c1576596fe7078c9f604456e | [] | no_license | mihai2014/wagtail-multi-blog-sites-with-bootstrap-4 | 31d93a1db4c168e3fbb2b78c2fe43e22ffbb5e6d | 6ef1b3bbb087969a484529e7c7147b4f6570df4f | refs/heads/master | 2022-12-11T14:03:37.658101 | 2020-09-03T10:11:29 | 2020-09-03T10:11:29 | 271,410,667 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | 0023_site1htmlpage.py | # Generated by Django 3.0.6 on 2020-08-24 04:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0052_pagelogentry'),
('site1', '0022_auto_20200823_1455'),
]
operations = [
migratio... |
7cb1980cd412b594a48d602af79067949437e721 | a430d90e4541b5dee1acd043b73d599f61838460 | /aioprof.py | db60c6e0f88f15741c0759c3f86c4bf0b103b06f | [] | no_license | leetreveil/aioprof | 3758d8abe975885297e61ca3f1775e6d2aee2f2e | 60eaa9889811797051c56b6334806e493d653e7d | refs/heads/master | 2020-04-30T01:50:36.203478 | 2019-03-19T15:20:24 | 2019-03-19T15:20:24 | 176,541,151 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,822 | py | aioprof.py | import asyncio
import logging
from pyinstrument import Profiler
from pyinstrument.renderers.console import ConsoleRenderer
logger = logging.getLogger(__file__)
def start(loop=None, interval=0.001):
profiler = AsyncioProfiler(interval=interval)
log_handler = AsyncioLogHandler(profiler, loop=loop)
loggi... |
19406922c78e59db2544cc8a736fd1a34766db0a | e8b4f35f0a1dc68e085d8c856be06953388de781 | /authors/apps/bookmark/tests/base_test.py | 786e9b44b6201cf1fc0c33d0384c913dac79b418 | [
"BSD-3-Clause"
] | permissive | andela/ah-robotics | 16e9256624763655551617de94511a0d1f26ede3 | d3c957328dbf20c1fa9dee09a74f4ebc4cf64fbf | refs/heads/develop | 2022-12-11T02:21:44.397585 | 2019-03-07T07:05:28 | 2019-03-07T07:05:28 | 162,156,297 | 3 | 6 | BSD-3-Clause | 2022-12-08T01:31:49 | 2018-12-17T16:04:33 | Python | UTF-8 | Python | false | false | 3,330 | py | base_test.py | from django.urls import reverse
from rest_framework.test import APITestCase, APIClient
class BookmarkTestBase(APITestCase):
"""
This is the base test class that shall be inherited by article test files
"""
def setUp(self):
"""Set up configurations that shall be run every time a test runs"""
... |
b15b3541e70dc41334da04cfd7cb3cc4e4d34517 | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /all-gists/9533211/snippet.py | 54f633b6baff82d89e04621aa72b4a296cdc1cc1 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 606 | py | snippet.py | #!/usr/bin/python
import csv
import sys
import argparse
import io
csv.field_size_limit(sys.maxsize)
parser = argparse.ArgumentParser(description='Clean csv of in-line newlines')
parser.add_argument('infile',help='Path to input CSV file');
parser.add_argument('outfile',help='Path to output CSV file');
args = parser.pa... |
e9bb181137a0fa9fe7e29e538c5c3c09111d4b09 | 64d4c80460b109cf3c2a29590299818a12f751a2 | /gpytorch/likelihoods/multitask_gaussian_likelihood.py | ae7772e4648a8d6ed8f184bec496db18c0879495 | [
"MIT"
] | permissive | bdecost/gpytorch | 2d9ca91b735f45c35a317dcfb7b7aa41398ceec7 | a5f1ad3e47daf3f8db04b605fb13ff3f9f871e3a | refs/heads/master | 2020-03-26T12:24:37.488422 | 2018-08-12T16:11:38 | 2018-08-12T16:11:38 | 144,890,618 | 0 | 1 | null | 2018-08-15T18:43:05 | 2018-08-15T18:43:05 | null | UTF-8 | Python | false | false | 3,086 | py | multitask_gaussian_likelihood.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
from gpytorch.functions import add_diag
from gpytorch.likelihoods import GaussianLikelihood
from gpytorch.lazy import DiagLazyVariable, KroneckerProductLazyV... |
7a04864cf7d44a10c4d8d9366938d01c1c21a236 | 9eac48c3beb78b984c918d86ae72954a73253e0c | /Shashank Tiwari/com.py | 73e6bedc7fe75f20d23dc0f14ce8e973bb78f1c9 | [
"MIT"
] | permissive | herambchaudhari4121/Hacktoberfest-KIIT-2021 | 2986f8c82bd795c606a880b0f68f17c68816b11f | dd62a26c519abb786c7116c8ad6bf891451246e8 | refs/heads/master | 2023-08-19T19:16:34.123637 | 2021-10-31T05:46:00 | 2021-10-31T05:46:00 | 423,064,440 | 0 | 0 | MIT | 2021-10-31T05:49:11 | 2021-10-31T05:46:20 | null | UTF-8 | Python | false | false | 354 | py | com.py | i = 1
while i < 6:
print(i)
if i == 3:
break
i += 1
i = 1
while i < 6:
print(i)
if i == 3:
continue
i += 1
fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
if x == "banana":
break
fruits = ["apple", "banana", "cherry"]
for x in fruits:
if x == "ba... |
5dc62b166df0901046cf56dfa8e4a2880c9d261b | 5337ac01090910ba081516bc01761abb736fb7cd | /src/batch_profiler_boto3_batch_utils.py | 1fd44c8888b2223bc8754979bc0deffe8d35b636 | [
"MIT"
] | permissive | g-farrow/message-batch-profiling | da69acde6f9ab8bf0e6308d6881a3db5a01b6503 | 42477c89d9042cfc86e68db8b8f74c0d88a2316c | refs/heads/master | 2021-03-15T12:22:40.016589 | 2020-03-14T10:01:02 | 2020-03-14T10:01:02 | 246,850,122 | 3 | 1 | MIT | 2020-07-19T21:07:28 | 2020-03-12T14:06:40 | Python | UTF-8 | Python | false | false | 1,213 | py | batch_profiler_boto3_batch_utils.py | from os import environ
from aws_xray_sdk.core import xray_recorder
from boto3_batch_utils import SQSBatchDispatcher, KinesisBatchDispatcher
from src import logger
from src.messages import Message
sqs_client = SQSBatchDispatcher(environ['TARGET_QUEUE_NAME'])
kinesis_client = KinesisBatchDispatcher(environ['TARGET_STR... |
80e314c942a74605b15001ba8e98be2ab3ba9798 | ecc99931b10b5f0055db3185fc685b165c13fece | /decorator.py | 76a184352f434c31c2404224a72916425f73a9dc | [] | no_license | fifo2019/DecoratorTiming | 6392dd2baeb55db9eb32adde96e5e2bdc8f7fe0b | 6672c05dadd5babc5f13e2b2dbd6422c1c6b879d | refs/heads/master | 2022-04-28T11:47:56.148728 | 2020-04-29T08:22:28 | 2020-04-29T08:22:28 | 259,787,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | decorator.py | import time
class Stopwatch:
avg_time = 0
def __init__(self, num_runs=1):
self.num_runs = num_runs
def __call__(self, func):
def decorated(*args):
for i in range(self.num_runs):
start_time = time.time()
res = func(*args)
self.av... |
7437f2ffcfa8c8cf0a4f434c6530f36e693da005 | 00f74ab7d59224f93cc37811de7518207c2f938f | /main.py | 7b86579d993e6b45a042851ed73eee90661ac2d4 | [] | no_license | jurijsml/perf | af3caa3d6a00ed92bb82069734b87dab328a08ae | 3a0de829def4bce0366dd48ac2a9440b56b558b5 | refs/heads/master | 2023-08-06T05:21:20.029539 | 2021-10-04T06:33:21 | 2021-10-04T06:33:21 | 413,312,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 71 | py | main.py | '''
Jurijs Malahovskis
04.10.2021
'''
a = b
if a == b:
perform action1
|
7d2bad7d60035a56c328a07845da0e7983b1a8a5 | 4e9c53d313b5e6ee2382a017b883867b51f2d5f3 | /model/custom_alexnet.py | 75785b8b5236634cc04a055a50b3542e49dc1870 | [] | no_license | chenyunbo-cyb/cs230-project-coffee-leaf-disease | ec3f59fca2c7b31e4bce1d5c3fcffe02e560fd60 | 7c8641c90d878abb3243203ee7c63a00e0d5169a | refs/heads/main | 2023-01-20T01:35:28.629312 | 2020-11-21T06:08:29 | 2020-11-21T06:08:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,946 | py | custom_alexnet.py | """Defines the neural network, losss function and metrics"""
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import utils
class Net(nn.Module):
"""
This is the standard way to define your own network in PyTorch. You typically choose the components
(e.g. LSTMs, linear... |
5b78a1ee363752d6cb6d13ed241dcabf3302f184 | 168f7071183716d4f3d948898bf5d60bbaff55a5 | /alembic/versions/old/nope_296fc1107b3e_create_permission_table.py | c5d487d2bc7664133c7974dd345e9bcb6f70dd36 | [] | no_license | tefenet/donaciones | 980128f5acb21c3f9287d507cff0674239c8053f | e0baeed1cecad1975b9b79043e344e5e497ac83a | refs/heads/master | 2023-02-06T01:07:31.658034 | 2020-12-21T23:56:55 | 2020-12-21T23:56:55 | 324,613,181 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,730 | py | nope_296fc1107b3e_create_permission_table.py | """create permissions table
Revision ID: 296fc1107b3e
Revises: e032fdcefd33
Create Date: 2020-10-16 06:42:44.861762
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '296fc1107b3e'
down_revision = 'e032fdcefd33'
branch_labels = None
depends_on = None
def upgrade... |
9c95d89749559e1cc82f0ffa1c59bb3fe845cbc2 | 7296473698939423ad9ac8e992dcdc28f8cfc668 | /main.py | cc1017b0deb1233f763826be89a4595f5a436559 | [] | no_license | faisalofficial/Python-Youtube---Audio-Video-Downloader | f49ea5c1b17e195a217f7dafe3009b3623f437d3 | 029fdc262d16ce98615f6e0cde96279a01da8103 | refs/heads/main | 2023-06-16T11:18:27.044100 | 2021-06-29T18:11:53 | 2021-06-29T18:11:53 | 382,700,478 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | main.py | import pafy
from pytube import YouTube
import sys
#TODO: Insert path for download folder
SAVE_PATH = 'YOUR PATH FOR DOWNLOAD FOLDER'
def audiodownload(url):
try:
video = pafy.new(url)
bestaudio = video.getbestaudio()
print(f'Downloading {video.title}!!')
bestaudio.download(SAVE_PA... |
3d50dac1b7088f7d82490fecbfd37104cc2a5011 | 3685ccf0910e7780421a57ca15ca5381510390ea | /schema_registry/schema_registry/conf.py | 2138070eb92c3c51d802dbfcc43fbdc880467e19 | [] | no_license | winex888/federation_graphql | 9db3e5d6d75a9433906bb5cff34d7fd043380caa | 00e296ad36b82083c2e16d4800b59cd6b0e2d66e | refs/heads/main | 2023-08-03T09:37:11.038257 | 2023-07-24T10:28:53 | 2023-07-24T10:28:53 | 360,777,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,496 | py | conf.py | import os
from pathlib import Path
from dynaconf import LazySettings
from sqlalchemy.engine.url import URL
PROJECT_PATH = str(Path(__file__).parent.parent.resolve())
settings = LazySettings(ENVVAR_PREFIX_FOR_DYNACONF=False)
class LogConfig:
FORMAT = settings.get(
'LOG.format', '%(levelname)-8s# %(filen... |
9c08432294a0f841eaa3be751798faeb120e52d3 | 95fbee634728dadd21b224f69e75a4a51f55f05f | /models/vnet3d.py | 3a7b0398ea9f5d363f60d541c8b3295c85e2e4f8 | [] | no_license | maryamag85/HippocampusSegmentationMRI | 87cbbcf47fd6b5d569a47cc4a97bd731b9886363 | 54f6a6e53403cdbb73c8d904e47a327d4d6d49ad | refs/heads/master | 2023-05-04T00:56:08.264977 | 2020-07-10T13:50:50 | 2020-07-10T13:50:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,789 | py | vnet3d.py | import torch
import torch.nn as nn
import torch.nn.functional as F
class InitialConv(nn.Module):
def __init__(self, out_channels=16):
super().__init__()
self.out_channels = out_channels
self.conv = nn.Conv3d(in_channels=1, out_channels=out_channels, kernel_size=5, stride=1, padding=2)
... |
1eb91f7c78c5d8dac14ff04743da6a115b3de0f3 | 7af8c979a63ea1f2dd9fc75d94271ce4c6b51edd | /untitled3(knn/KNN.py | 65c431e9fc17b8d9e3fe6f59b36244b9cfd52f39 | [] | no_license | soulpacket/pythonwindows | 0dd90270d2c832629c5e1eff5d13e6ea5d8676fb | 72f4bfcd71e9f595a3403ddc86d0b6602a5ab005 | refs/heads/master | 2021-01-12T05:58:27.623217 | 2017-03-14T07:27:12 | 2017-03-14T07:27:12 | 77,261,319 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 750 | py | KNN.py | from numpy import *
import operator
#def creatDataSet():
group=array([[1.0,1.1],[1.0,1.0],[0,0],[0,0.1]])
labels=['A','A','B','B']
# return group,labels
def classify0(inX,dataSet,labels,k):
dataSetSize=dataSet.shape[0]
diffMat=tile(inX,(dataSetSize,1))-dataSet
sqDiffMat=diffMat**2
sqDistanc... |
c3188f0242ce505dd0a6202ae660421e01a3c977 | 433148883a8b35baad66d11f5cb6f37f9977be47 | /code/locMatrix.py | 7841c7cb30ae970560bd60199122d57dcbc9e9a4 | [
"MIT"
] | permissive | ISS-Kerui/Interspecies_Knowledge_Transfer_for_Facial_Keypoint_Detection_Pytorch | 5c1aeeb73007b675c67dd1ebf6845124e6b45640 | ffcd1cfe12d0cc8ea6d01faa7050f373aa99a800 | refs/heads/master | 2020-03-28T12:06:45.068755 | 2019-01-20T13:51:03 | 2019-01-20T13:51:03 | 148,270,373 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,024 | py | locMatrix.py | import os
import numpy as np
from tps_grid_gen import TPSGridGen
import torch
from grid_sample import grid_sample
import cv2
from torch.autograd import Variable
simi_dir = '../data/test_simi'
save_dir = '../data/test_matrix'
animal_npy = '../data/test_npy'
human_npy = '../data/npy2'
if not os.path.isdir(save_dir):
... |
e5886b480891099a8a76479b4e583b89d56f576c | 2289eb2d4501b1d966ea86c8ef8dde6cd855af19 | /graphs/16_topological_sort_directed_acyclic_graph.py | 9cfd6a5540b15c6948445ff549540ff5414cd709 | [] | no_license | pratikdk/dsaprobs_s1 | 5ed5652860770f16471e0c09dbceb885fc405c4d | 5dea5707bdf86b9d9fc682dd789fee688707a36d | refs/heads/master | 2023-04-29T15:44:16.157083 | 2021-05-14T09:35:05 | 2021-05-14T09:35:05 | 314,780,923 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | 16_topological_sort_directed_acyclic_graph.py | from collections import defaultdict
class Graph:
def __init__(self, v_count):
self.V = v_count
self.graph = defaultdict(list)
def add_edge(self, u, v):
self.graph[u].append(v)
def topological_sort_util(self, u, visited, stack):
visited[u] = True
for v in self.graph... |
9b3de97a256e7a7bddaacc0e98129d888a6bbabc | 9e44fbc6eb0e9080ebf87a5e910f0f614e9aaaf0 | /membership/models/__init__.py | 5210836ddf8119e98cc160ead19f610d1feb0a7b | [] | no_license | A-you/myaddons | e605fee7c51710d464793a27fe0dab454f5611e0 | 9e55a72f988261fc937f305aa4a9e1687fab5052 | refs/heads/master | 2020-07-18T17:06:44.195759 | 2019-09-19T06:23:03 | 2019-09-19T06:23:03 | 206,281,042 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | __init__.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import membership
from . import partner
from . import product
from . import account_invoice
from . import product_service_type
from . import membership_points_lines
from . import payment_record
from . import membe... |
9eaa8ee5672b257fd543ab48072f0ed97066b24a | 7166771cf356fa92d0446a001cfdc51e1f7d228b | /framework/ev3bot/tts/ev3.py | 5135c6bef245e546770a874b86c56ac6379b712e | [] | no_license | nghiaminhle/ev3 | c5427dd78154138b6dfced5b5f4b1c823be76a9f | a26e77fc3b8db1288d116bb028c04ef1588da44a | refs/heads/master | 2021-01-20T00:28:13.499386 | 2017-04-23T11:35:38 | 2017-04-23T11:35:38 | 89,137,543 | 1 | 0 | null | 2017-04-23T11:41:29 | 2017-04-23T11:41:29 | null | UTF-8 | Python | false | false | 242 | py | ev3.py | """TTS Engine by EV3"""
from ev3dev import ev3
class EV3TTSEngine(object):
"""Wrapper class for EV3 TTS"""
def say(self, texts):
"""Speak the texts"""
for text in texts:
ev3.Sound.speak(text)
|
e8e2d2724006eba44fc464465f093cf7b3681136 | f6a595113ed1a134e3b39800e14c98ec25d6c758 | /* hw/04/hw4q4.py | 50292376ed4f5390a79da2dea86cb0354851d5ed | [] | no_license | jenerational/Python_NYU-CS-1114 | c67432f0af51656a6263e2b90c3eb13c2ac32a4a | e72ee5383762be111122e610db2df52e3bd6de6d | refs/heads/master | 2021-06-23T16:36:16.184175 | 2017-09-05T13:21:54 | 2017-09-05T13:21:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | hw4q4.py |
#asks user to input a word and converts to all lowercase
userWord = input("Please enter a word.").lower()
vowelCounter = 0
for ch in userWord:
if (ch == "a") or (ch == "e") or (ch == "i") or (ch == "o") or (ch =="u"):
vowelCounter += 1
print(userWord, "has", str(vowelCounter), "vowels and",
str(len(u... |
442f31488ecc05e52657a03679b3ca956c44b674 | 547c6d62cf43fcea59a7f4f41cd4692b69c5e50a | /directord/interface.py | 741e4d5d3485a146edfb938356f31f9e8f99d418 | [
"Apache-2.0"
] | permissive | d34dh0r53/directord | 2f325da938353dc6fc9912d82a49e62c562f5235 | e7d8015f07a6210c766fab13656f44b937f65ae6 | refs/heads/main | 2023-08-18T20:56:34.715573 | 2021-10-13T22:22:50 | 2021-10-13T22:22:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,833 | py | interface.py | # Copyright Peznauts <kevin@cloudnull.com>. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
9fc2be83ed1739ae723f9bc1d2f788c2e5ed6cb1 | dda375cab6d9e9b3adec23790863445161ca00cb | /1906101056-李靖/20200223-test2.py | b8bf42e8aa17bd7324ec97f860700f5e0243ce47 | [] | no_license | safe-andsound/sctu-ds-2020 | 8f28db66a85f42bd2b0c6563ead6a487fff15059 | 84329123935676cc1e75ed8822896f2d889f4dec | refs/heads/master | 2021-01-16T02:59:10.078832 | 2020-02-25T08:59:12 | 2020-02-25T08:59:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | 20200223-test2.py |
#求给定数的阶乘,所求阶乘的数不可以是这几个数:[1,10,20,30,40,50]
n=int(input('请输入一个正整数:'))
m=1
if n==1 or n==10 or n==20 or n==30 or n==40 or n==50:
print('%d不能求阶乘' %(n))
else:
for i in range(1,n+1):
m=m*i
print('%d的阶乘为%d' %(n,m))
# 单利公式为:单利=(P x T x R)/ 100其中,P是本金T是时间,R是利率
P=float(input('请输入:'))
R=float(input('请输入:'))
T=float(in... |
579059f1e748be1016136d8f61d2e957125164e8 | dedcb84663ee0e3cd943c33856258a81fd483ec7 | /tr/base/views.py | d0f503e5383d94a5270487474cc5bc8e97c30459 | [] | no_license | skada/trasoritka | c64a246e8b5ca45e580a671759f8a94557535ba7 | 8f17e9bb58e7f1126a57ffec35589f312f0371a0 | refs/heads/master | 2021-01-19T00:23:42.483895 | 2017-05-28T22:25:26 | 2017-05-28T22:25:26 | 87,166,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,012 | py | views.py | import json
import logging
from django.core.mail import EmailMultiAlternatives
from django.http import Http404, HttpResponse, JsonResponse
from django.template import Template, Context, loader
def contact_form_post(request):
if request.method != 'post' and not request.is_ajax():
raise Http404()
if ... |