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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
026e06e777d64f8724ec5e89a7829b3a42a25d6b | 6a809cba32424bb1adfafbbe89331448a758f7f8 | /app.py | 4b3d71eef9496ed6f83c7397f8a3a59beb104766 | [] | no_license | maxnawa31/excuses | db7a206271d2eaddaddb3ebfa43ce917e3278697 | 93f8eb473c0302079ea06bc78f757dc6e193ed60 | refs/heads/master | 2021-09-09T04:47:50.872179 | 2018-03-14T00:00:31 | 2018-03-14T00:00:31 | 125,129,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,912 | py | app.py | from flask import Flask, request, redirect, url_for, render_template
from flask_modus import Modus
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
app = Flask(__name__)
app.config[
'SQLALCHEMY_DATABASE_URI'] = "postgres://localhost/flask_one_to_many"
app.config['SQLALCHEMY_TRACK_MODIFICAT... |
848934680253ff2950db7723b1fe82b2ae799900 | 98e3da66cdfa39bcb7d7adfad745e7fc97c3e25f | /rabbitleap/retry_policies.py | ca4f0306deeb8ac8f73651599e4bed4b3b06939c | [
"MIT"
] | permissive | asahaf/rabbitleap | 25ccdc80853bedb05ff1938179330837b5aa44bd | 33df220ccfa4a2ce8171dfcf1c80ca9a3c8029b4 | refs/heads/master | 2021-06-10T20:33:31.068628 | 2021-03-20T14:09:55 | 2021-03-20T14:09:55 | 149,240,058 | 0 | 0 | MIT | 2021-06-02T00:34:04 | 2018-09-18T06:35:23 | Python | UTF-8 | Python | false | false | 14,953 | py | retry_policies.py | # -*- coding: utf-8 -*-
"""
Noting is perfect, errors and timeouts may happen, and when such failures happen, the
consumer has to decide what to do with that. By default, the consumer would reject the
envelope (RabbitMQ message) when a failure happens. However, errors and timeouts
issues, unless there is a software bug... |
892eb8d1802b01c035993232cc80c710211ab102 | f0200b41426a4ebd599ed1b37b3d72be3909e644 | /Simpy Practice/process1.py | 52199426cbf421fb79c3ac81206d7aef33aaeb02 | [] | no_license | GlitchBox/Simulation | add6d53b3a4c8667b8fbc03b6da24fb2ba29289d | f8f5fca73f28c238b2726a6295aabc8a898b56de | refs/heads/master | 2021-04-01T20:15:02.775755 | 2020-11-16T09:57:42 | 2020-11-16T09:57:42 | 248,212,364 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | process1.py | #processes are described by generator functions
#during the lifetime of a process, the process function(generator function)
#creates events and yields them
#when a process yields an event, it gets suspended
#Simpy resumes the process when the event is triggered
#multiple processes waiting on the same event is resumed... |
1f69cf5f6d15048e6ead37b5da836c9e2f783f74 | 9c920f8a1149c71a16104f8630a0210b2052c4be | /testdata.py | c7ac0baaef548ddc6ca4335bdd89cd4fbc53567b | [] | no_license | superleggera-21/text-mining | ccfcc2436ee925aabea0a64e2fce26deac784848 | 065a8535e7a41cacc3220135f03b9bb1ab4d2c8d | refs/heads/master | 2020-04-05T13:47:45.627998 | 2018-11-12T19:24:09 | 2018-11-12T19:24:09 | 156,909,815 | 0 | 0 | null | 2018-11-09T19:40:25 | 2018-11-09T19:40:24 | null | UTF-8 | Python | false | false | 3,678 | py | testdata.py | # The actual code begins here
# This file is intended to load everything downloaded from loaddata.py, preventing user getting banned from IMDB
# The code is written to see what are some key words of the reviews from critics and normal viewers
# And to see what are some of the differences
# The second task is to asses t... |
e31267871453d87aee409f1c751c36908f7f151a | 8183f977fa5a24c64afdcafe95aaa6641d4fa373 | /acres/resolution/__init__.py | 35cf9583baa3c32e3f43018b874b3d1ed4410544 | [
"Apache-2.0"
] | permissive | bst-mug/acres | 3ab93a2710915642cc32adb674b7aae5a9e6905f | 46875edbb5619862064cf2380c8e167a418c1cac | refs/heads/master | 2023-05-24T19:12:52.523225 | 2021-05-22T18:27:44 | 2021-05-22T18:27:44 | 120,888,732 | 1 | 2 | Apache-2.0 | 2023-05-22T22:28:12 | 2018-02-09T09:57:41 | Python | UTF-8 | Python | false | false | 129 | py | __init__.py | """
Package with a facade to the several expansion strategies.
"""
from acres.resolution import resolver
__all__ = ['resolver']
|
be58862b66708c9de8cf7642c9de52ec744b079e | 22721d6692a91ee2d37652a8c872d775b094ee84 | /s/ajax_support.wsgi | 742dd1dbf1948dd9ecac2b2051a1264e91e5b038 | [] | no_license | firecoral/Nanipics | 25b5ce37329cfee0b0e6f801872dd3ae50bda5f6 | fdc5933956c2f878b25c1d33305fc16e76da9579 | refs/heads/master | 2021-01-01T20:45:01.742101 | 2017-07-31T20:07:17 | 2017-07-31T20:07:17 | 98,924,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,751 | wsgi | ajax_support.wsgi | # $Header: //depot/cs/s/ajax_support.wsgi#10 $
from werkzeug.wrappers import Response
from p.DRequest import DRequest
from db.Support import SupportSession
from db.Exceptions import DbError, SupportSessionExpired
import db.Db as Db
import db.Support
import cgi
import simplejson as json
def application(environ, start_... |
328a03acab2a0550bea0795d22110a152db6c503 | 6fc4d7401fc2d48f3641abf1dbbe92583a5f7184 | /PyTorch-Lightning-Fine-Tuning/News-Classification-Lightning/src/main.py | 4ea679c8d7671a39c7b4b21fac05567278b660ab | [] | no_license | subhasisj/HuggingFace-Transformers-FineTuning | 9f052e5aea0e80c04ed5557b1badf3aea1b170a9 | e8233adc2b23c0d9902171448e19e2802e351ed5 | refs/heads/master | 2023-01-22T15:30:20.784913 | 2020-11-30T21:03:28 | 2020-11-30T21:03:28 | 305,501,326 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,326 | py | main.py | # %%
import os
print(os.getcwd())
# %%
from TransformerModel.Model import Model
from dataset.DatasetLoader import DatasetLoader
import pytorch_lightning as pl
from pytorch_lightning.callbacks import EarlyStopping
import argparse
from argparse import ArgumentParser, ArgumentTypeError
# %%
def run_training(arguments_... |
c712875273f988a3aa6dab61f79e99a077823060 | 61d422716f901c44df1de4915237ce4238d55e6a | /scripts/lua_syntax.py | 8e33e48028449e442999cf43f7bf020d5d06d65d | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | danomatika/ofxLua | 1b25acf57f24682aeb114a8e2d505762e1cb3af7 | f372b32d1deeccf55c20b00a3fc29ee7005507b3 | refs/heads/master | 2022-11-04T06:00:44.673251 | 2022-10-10T16:17:54 | 2022-10-10T16:17:54 | 1,865,539 | 137 | 23 | NOASSERTION | 2021-06-09T22:38:20 | 2011-06-08T14:06:38 | C++ | UTF-8 | Python | false | false | 4,082 | py | lua_syntax.py | #! /usr/bin/python
#
# convert the swig -debug-lsymbols output text file format into
# a simple list of lua module names and classes
#
# Dan Wilcox <danomatika@gmail.com> 2017
#
import sys
import re
if len(sys.argv) < 2:
print("USAGE: lua_syntax.py MODULENAME INFILE")
exit(0)
module = sys.argv[1]
infile = sys... |
3d3b9956a98f11a170d66280abe7f193cef9ccfb | a9bca80052536a5360b0ef866ab17010562ea6f0 | /data/JimmyGammell/2020-06-10/code/plot_data.py | 43f804b65b950ed203d4421fcd2cab33e205362f | [] | no_license | saewoonam/ble_dongles | d1f8a4caf1e60c398948c530e07c8a8c7e529a66 | 74ac491cb4f3a777e573afa3c7a79c9dac7fde82 | refs/heads/master | 2022-11-17T02:33:30.605944 | 2020-06-24T18:35:53 | 2020-06-24T18:35:53 | 264,501,611 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 16,581 | py | plot_data.py | #%%
# -*- coding: utf-8 -*-
import numpy as np
import plotly
from plotly.subplots import make_subplots
import plotly.graph_objects as go
import pandas as pd
import os
output_directory = r'C:/Users/jgamm/Desktop/rssi_measurement/2020-06-10/figures'
antennas = ['original_whip']
folder = r'C:/Users/jgamm/Desktop/rssi_me... |
4cb601d7fc4023e145c6d510d27507214ddbd2d3 | 0f288645ccb296aae5a0183c3a043a2a8372ad9b | /home/views.py | f21bf37658c3b2e664a17ad8608206ea708f51af | [] | no_license | somilmish/bookrecommendation | 03a7e049b5ea9e7e751e8b4d46ecae44452be2e7 | 26b9d7b0a4ccbcc020f0203ea78c29a532bada93 | refs/heads/master | 2020-03-20T04:05:47.005102 | 2018-06-13T06:25:32 | 2018-06-13T06:25:32 | 137,170,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,906 | py | views.py | from django.shortcuts import render, redirect
from .models import *
from django.contrib.auth import authenticate ,login,logout
from django.contrib.auth.models import User
from datetime import date
# Create your views here.
def home(request):
if request.method=='GET':
daily_users = User.objects.f... |
95ec822e8cde45853d342feca3d59b3285a60e6b | 4bf5f83a8e5cd4c3ee700569e4a6f07a87dd209c | /students/11th/Keywookkim/westagram/User/urls.py | adb336a3da6cd6c291d4054f504ece04ce51479e | [] | no_license | gledong12/westagram-backend | 6e066f4c741aa19df13224ba530b0d9f43a405f7 | 1842f065c599885ad5dcb9ec5fb267eaf3295872 | refs/heads/master | 2023-03-11T20:32:47.055525 | 2021-03-04T01:04:31 | 2021-03-04T01:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | urls.py | from django.urls import path
from .views import Signup, Login
urlpatterns = [
path('signuplist', Signup.as_view()),
path('login', Login.as_view())
#url(r'^api-token-auth/', views.obtain_auth_token)
]
|
90396b6bd9b11aa11c863e25450704cfa4ef9580 | 4d67b686bf369a6836881dca870db736cbca2094 | /lol_beautify_gdocs/hardcoded_variables.py | e0045514096559ad85ad076a436b98600e19e772 | [
"MIT"
] | permissive | mrtolkien/lol_beautify_gdocs | d3d59c1f1e12c06a7a0ed16b3c7bf31b26a5447e | d393deab9319c56271530024596a75d50d6943f4 | refs/heads/master | 2022-08-11T23:16:13.634624 | 2021-04-06T22:01:23 | 2021-04-06T22:01:23 | 241,540,699 | 2 | 0 | MIT | 2022-07-27T13:56:05 | 2020-02-19T05:28:46 | Python | UTF-8 | Python | false | false | 569 | py | hardcoded_variables.py | root = 'https://raw.communitydragon.org/latest/plugins/rcp-fe-lol-clash/global/default/assets/images'
positions_pictures_url = root + '/position-selector/positions/icon-position-'
other_pictures_dict = {
'top': positions_pictures_url + 'top.png',
'jungle': positions_pictures_url + 'jungle.png',
'mid': pos... |
09d394e332939004894c1b2bd82192c9e6698125 | 91b4bcde284b8d33028f1f064e67cb316b467516 | /statistics.py | 5867b52142a83286a37aad508ad4ee998d570f0d | [
"MIT"
] | permissive | Danie1Johnson/research | 67d19d3eff1d88adc696708ca166a46b7eafdf2b | c10ce2a3901a4789b580c88d4855aa1c8017497f | refs/heads/master | 2021-01-19T13:33:06.417341 | 2017-04-27T02:30:42 | 2017-04-27T02:30:42 | 28,832,197 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,975 | py | statistics.py | import numpy as np
import numpy.linalg
import bga_4_0 as bga
import polyhedra as poly
def get_stat(stat_name, kwargs={}):
try:
s_fun = globals()[stat_name](**kwargs)
return s_fun
except KeyError, NameError:
raise Exception("ERROR: " + stat_name + " not found.")
def bg_attachme... |
f7183ceaacb038a62f00d9c062c5ee9c52560105 | 0007402c6edec71437efa204d6a2e8e0b99c52ef | /Project_2/crawler | 6aea3a53ee63a335d38f3eab493c5ce6987bc45a | [] | no_license | bansal7/Fundamentals-of-Computer-Networking | c8312a403ab4ffea63e86e463345745fe007af8e | edc18c1f1852d9da6583484de5b62eb796342a8e | refs/heads/master | 2021-06-23T23:46:35.773633 | 2017-09-10T17:03:16 | 2017-09-10T17:03:16 | 103,044,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 920 | crawler | #!/usr/bin/python
import sys
import socket
REMOTE_PORT = 80
#REMOTE_HOST = "fring.ccs.neu.edu"
REMOTE_HOST = "twitter.com"
def closeAndExitConnection():
streamSocket.close()
sys.exit()
streamSocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
print ("Waiting to connect....")
try:
streamSocket.con... | |
9094a6a9336f0e1bb57a59af2e6090f363130d40 | 7cbb310ddb2a9bc5efbabd3d52c2db67ab31822f | /mysite/VDJ_Anchors/parse_genes.py | 41f473a6657b5a54069c2719333963bd91449d66 | [] | no_license | TongJin98/Immunome | 553011c146892f334e268267ee4c9747a2bbde7d | 8371b16fa9ff50931cac6e47c44180d8cc013e25 | refs/heads/master | 2021-07-24T23:49:46.300559 | 2020-09-21T21:55:05 | 2020-09-21T21:55:05 | 215,653,593 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,369 | py | parse_genes.py | '''anchors_generator.py
This python file runs to read in fasta file of V genes or J genes in T-cell
or B-cell to translate DNA genes to amino acids and then finding the index of
the last occurrence of cysteine in the V genes or the first occurence of
phenylalanine followed by glycine in J genes.
'''
import argparse
im... |
1ee928312f4d7c392594c84562185dff463ebe89 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /110_concurrency_parallelism/001_asynchronous/_exercises/templates/signal — Asynchronous System Events/006_signal_threads_alarm.py | 76c2a9b4e182abcac3d656e7a4d111fd0929adbc | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 1,069 | py | 006_signal_threads_alarm.py | # # signal_threads_alarm.py
#
# ______ si..
# ______ ti..
# ______ th..
#
#
# ___ signal_handler num stack
# print(t__.ct.. 'Alarm in',
# ?.cT.. .n..
#
#
# si__.si__ si__.S.. ?
#
#
# ___ use_alarm
# t_name _ ?.cT.. .n..
# print t__.ct.. 'Setting alarm in' ?
# si__.al.. 1
# print t__.ct.. '... |
2d35f696cecbfe50550e6c0dda53c55fe82931ec | de09ae1e6dac982a0cfdd461eac966f91a26a209 | /GOOGLE_Q/GOOGLE1stC.py | 3c8d011f76d3a5eb277fd6cc21af96303b3bc9ec | [] | no_license | bikkimaurya/python | 42b82e19894c66cf21ed203cb49b3b6f4761027f | 432dfadc064395688c0fa27fd4e50f45cedd1faa | refs/heads/master | 2022-12-05T10:44:55.785944 | 2020-08-27T10:10:45 | 2020-08-27T10:10:45 | 275,808,361 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | GOOGLE1stC.py | m=int(input())
ans=[]
for i in range(m):
l=[]
dia=0
r=0
c=0
n=int(input())
for j in range(n):
v=list(map(int,input().split(" ")))
l.append(v)
dia=dia+int(v[j])
if(len(set(v))!=len(v)):
r+=1
t=zip(*l)
for i in t:
if(len(set(i))!=len(i))... |
c6343791d4217e6ef0c09ffa4b76bd818a85aef1 | 8f570c0431925af69fe249d5798b35bdb36f92ee | /Python/numberError.py | 521bdfc5e46b97e1efec7b88809099ea0e5caa14 | [] | no_license | 0xchikku/vscode_python | 7a06d501f70e65f7aeebe1b13bf0541568272ac8 | abe17ddf0c0e911bdeb1d3c002ee474c5367e041 | refs/heads/main | 2023-04-27T03:11:13.287046 | 2021-05-27T05:29:42 | 2021-05-27T05:29:42 | 371,256,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | numberError.py | snum = input("Enter the number: ")
try:
inum = int(snum)
except:
inum = "Is not a number!"
print(inum) |
86b4cbfe81055c8c929dfda1600f854757be5401 | 1f3f0dc8799dac1e7974b1b05211c2bb863db787 | /junki/Chapter5/ex43.py | e737f2d2aa06999a9916090f5cb7cccb00ae7394 | [] | no_license | m-note/100knock2015 | 665bb27bc84a0eacaa795523b5e65a5b64c426ac | 84cd1d0617b0b5c15f64e593dd2e0ae21a4dcef7 | refs/heads/master | 2021-01-18T19:41:54.111994 | 2015-07-28T16:15:53 | 2015-07-28T16:15:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | ex43.py | #!usr/bin/python
#-*-coding:utf-8-*-
from ex41_1 import *
def main():
all_sent_list = make_chunk_list()
for line in all_sent_list:
for chunk in line:
if int(chunk.dst) != -1:
sent = ''
every = ''
Noun_yes = 0
Verb_yes = 0
for morph in chunk.morphs:
every += morph.surface
if morp... |
df6c669f9bbf4c40d3fa114ebfc25c9eca74d810 | e53a764fa065d8a426f0ffeb883d76cfdfa5a8ff | /tornado-chat/saggitarius_db.py | 438bba607178f76bf080fb4735c68d5c68e5047b | [] | no_license | dekud/dekudtests | 433028ef896f3ccc11c748c3ce0da99e12e5cc97 | 9895f88d07ed71a7ad7ff0a9b5f3ea135cb9370d | refs/heads/master | 2021-06-22T00:28:16.873673 | 2016-11-20T16:27:19 | 2016-11-20T16:27:19 | 42,715,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,660 | py | saggitarius_db.py | # -*- coding: utf-8 -*-
# !/usr/bin/env python
import torndb
import datetime
class dbcontroller:
def __init__(self, _host, _name, _user, _password):
self.db = torndb.Connection(
host=_host, database=_name,
user=_user, password=_password)
def getSensorByDevId(self, device_id):... |
90080d8fb9a47eb1a36b36d596de33929b7fc1fa | 99a311c8ac950c2a0cec91924fbb14185d012c31 | /src/CellTrack.py | 05687078bf051f7ef6b25be70836817b797cb819 | [
"CC-BY-4.0",
"LicenseRef-scancode-public-domain"
] | permissive | WingsUpete/AliveCellTrackingAlpha | 9aff3fc1fda22a52ae3ab67825a2c5a46a62b4d5 | a9dfb3a8c75a6dd0bec9c78686e59fa03b0394c1 | refs/heads/master | 2020-08-22T02:59:45.606401 | 2019-11-06T12:15:35 | 2019-11-06T12:15:44 | 216,303,893 | 1 | 1 | null | 2019-10-20T17:27:41 | 2019-10-20T03:48:53 | Python | UTF-8 | Python | false | false | 18,454 | py | CellTrack.py | import numpy as np
from random import randint
import math
import cv2 as cv
import sys
from tkinter import Tk
from tkinter.filedialog import askopenfilename
import matplotlib.pyplot as plt
from pylab import *
from Config import *
class CellTrack:
"""
Cell Track Class is used to keep track of multiple ce... |
d6ebbdef9bdafe8cb25bdbe3a6d7772f1c4dce19 | 02215ecceaaf8444baf01e92bf6c22a9616e2461 | /setup.py | 642065c0e191adeeccb6b8e6f4b76fc32a36d6cf | [] | no_license | Shivathanu/text-classification | cb8e97391657bc6e8b58a8fbe4f7850688c46911 | f52b0b6c0ad7390ebcb7705569c96e0428b8ee55 | refs/heads/master | 2023-06-03T12:28:39.421385 | 2021-06-19T11:51:06 | 2021-06-19T16:15:09 | 348,710,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,392 | py | setup.py | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="jira-task-classification",
version="0.0.1",
author="Shivathanu Gopirajan Chitra",
author_email="gcshivathanu@gmail.com",
description="Build classification models that ena... |
0567ed580e63ff9790c6d75403ff3f23cde47d40 | 99b2bfbf7a78c5a2807cc2ad7ad38d1875d846d9 | /News/news.py | bb5378bd269428d3a06846e6f0812ebab0c80440 | [] | no_license | adarshkumar5776/Whatsapp-News | f7ce6971fb6fd61a9e5a1bcb66bc32df8cba79a0 | 83229db2bdcd4146e7113ca3d87d9d8f194d4ca9 | refs/heads/main | 2023-01-29T18:13:10.760800 | 2020-12-11T08:15:05 | 2020-12-11T08:15:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,728 | py | news.py | def extract_month(mn):
if(mn==1):
mon = "jan"
elif(mn==2):
mon = "feb"
elif(mn==3):
mon = "mar"
elif(mn==4):
mon = "apr"
elif(mn==5):
mon = "may"
elif(mn==6):
mon = "jun"
elif(mn==7):
mon = "jul"
elif(mn==8):
mon ... |
eb6d26d3a6de1ebed86d813c4e66b9d5145b32ed | 0234d4e32892077048de5242ee272cc983759356 | /Move_File/mv_pic.py | 07248522137dc6e8569ebab04878b398e5ca1f8a | [] | no_license | Wlgls/Simple-Demos | 133a3adde577776ee066fddd4176330d66f83064 | feb3eefff2a115f85d72f00250b0d97f8228ab74 | refs/heads/master | 2023-01-20T04:54:25.911766 | 2020-11-27T04:20:38 | 2020-11-27T04:20:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,609 | py | mv_pic.py | # -*- encoding: utf-8 -*-
'''
@File : rm_pic_redun.py
@Time : 2019/12/28 20:21:10
@Author : Wlgls
@Version : 1.1
@Contact : smithguazi@gmail.com
'''
from pathlib import Path
import re
import os
from urllib.request import quote
def get_files(dir_name):
"""得到指定目录下的所有文件生成器
Args:
dir_na... |
d907a98dcf3d5f01962e6dbee3bc20af37b3b3ec | b63c07d2f1f3d622589f80a05c29ac5ac7d217aa | /schedule.py | 5cb5510c5ffe6405813e3cf3c97e01431713a8e2 | [] | no_license | brendanfly/fantasyschedule | bac2279b77c609ee9af609bb8cb9b94a9f6d3f51 | ec0684825fea3ef53d8ab14783917a6ec45de8a0 | refs/heads/master | 2020-07-19T07:57:47.698382 | 2019-09-04T22:30:50 | 2019-09-04T22:30:50 | 206,406,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,548 | py | schedule.py | import itertools
teams = [
"Flynnsanity"
]
def rotate(l, n):
return l[n:] + l[:n]
# generate the order, there are 13 weeks total, and we just simply rotate
division1 = [1, 2, 3, 4, 5, 6]
division2 = [7, 8, 9, 10, 11, 12]
team_numbers = [1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12]
week_numbers = team_numbers... |
a247dacf1c96a939db96362abfe7e7cf28a283d8 | f9efaf29db3c1393cf0da709a4c5180e4069ecdc | /2/1.py | 3f92226ae37e7eb3e206a76db0b7eeb806d8d9f5 | [] | no_license | tgkd/test | 39813fc9e359ff3d280d9edf1f23c2c482da9cd3 | c05ab167cfa1979ee71b3036c759e8af268e305c | refs/heads/master | 2021-06-17T12:37:33.778045 | 2017-06-05T05:18:27 | 2017-06-05T05:18:27 | 91,576,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | 1.py | count = int(input())
i = 0
all_eq = True
neigh_eq = False
neigh_not_eq = False
prev = None
while i < count:
numb = int(input())
if numb == prev:
print()
elif numb != prev and all_eq:
all_eq = False
else:
all_eq = False
neigh_eq = False
neigh_not_eq = True
pr... |
b4d5071f9960024833bf1e81ed85d12d641cb6c7 | 28c1c3afaf5e70c0530b864ead16fa8762ef1ca4 | /ch01_basic/is_product_odd.py | 0516c3913fd4931d93536b24ead1f25e7974ced9 | [] | no_license | luoshao23/Data_Structure_and_Algorithm_in_Python | 8059381c21580e3e4f1276089b9fe4f96de385f8 | 051754963ca2eb818b981ba72583314a043e5df4 | refs/heads/master | 2020-04-29T06:29:02.148886 | 2019-05-15T02:46:48 | 2019-05-15T02:46:48 | 175,917,337 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | is_product_odd.py | def is_odd(lst):
for i in range(len(lst)):
if lst[i] % 2 == 1:
for j in range(i+1, len(lst)):
if lst[j] % 2 == 1 and lst[i] != lst[j]:
return lst[i], lst[j]
return None, None
if __name__ == '__main__':
a = [12, 1, 1, 4, 3]
x, y = is_odd(a)
pri... |
cc2a916a512d5e54737440a1096f5374ead31efd | 1e6e3bb707920fdb01ebca23eaf81097c558d918 | /tests/system/action/meeting/test_unset_font.py | a2b4ecc93c1c3b7a6a15865b547e2ace2601e1d0 | [
"MIT"
] | permissive | OpenSlides/openslides-backend | cbd24589f82a6f29bde02611610511870bb6abbf | d8511f5138db4cc5fe4fa35e2a0200f766bd49c5 | refs/heads/main | 2023-08-23T11:54:25.064070 | 2023-08-22T11:15:45 | 2023-08-22T11:15:45 | 231,757,840 | 6 | 22 | MIT | 2023-09-14T16:23:41 | 2020-01-04T12:17:38 | Python | UTF-8 | Python | false | false | 2,336 | py | test_unset_font.py | from typing import Any, Dict
from openslides_backend.permissions.permissions import Permissions
from tests.system.action.base import BaseActionTestCase
class MediafileUnsetFontActionTest(BaseActionTestCase):
def setUp(self) -> None:
super().setUp()
self.permission_test_models: Dict[str, Dict[str,... |
249e5bdf94a22a73c13fdf8d1e43607a0b0e2f89 | aa7ae24a2e477497e39f8f8ab2909d84634ad6f9 | /issue_email_sent.py | 6fde86ba93aff2fd43c0b214ff1b2b8455884116 | [] | no_license | nhomar/actions_server | cedf1941c54bb71607c43f577fe0a4bec4d7037e | fd4eccf1f81b9f705fc40345b49d54da265251e5 | refs/heads/master | 2020-12-25T12:27:41.653581 | 2019-01-31T08:33:24 | 2019-01-31T08:33:24 | 50,902,562 | 3 | 10 | null | 2017-05-05T12:29:59 | 2016-02-02T07:28:53 | Python | UTF-8 | Python | false | false | 2,543 | py | issue_email_sent.py | # Set the body of the message
body = u'''
<div style="margin:0px auto;text-align:center;font-size:12px;color:#a2a2a2;padding-bottom:6px">
## Por favor responde por encima de ésta línea .##
</div>
<div style="text-align:right;padding:8px 14px 0 0">
<a href="http://www.vauxoo.com/" target="_blank"><img src="https:/... |
a00c092bf1cd8a088ca572c3c5bbb1c692225029 | 011d99496922f20b823bc5e57e3ab430bedfce7e | /client.py | 59a31813abc993663f986fa68823046237f6f075 | [] | no_license | MatteoLacki/learn_pysockets | eeff3e1597d2f45345716f5411c0e8f7304acc6f | 72ea5f8126c62006fc4a374cd69dfd7bb0e7eee3 | refs/heads/master | 2020-07-08T18:49:05.516255 | 2019-08-22T10:42:49 | 2019-08-22T10:42:49 | 203,748,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,603 | py | client.py | import socket
import select
import errno
import sys
PORT = int(sys.argv[1])
HEADER_LEN = 10
# IP = "127.0.0.1"
IP = socket.gethostname()
my_username = input("Username: ")
client_s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_s.connect((IP, PORT))
client_s.setblocking(False) # the receive will not block.... |
79b83831de07b22979cf506f6020379d1876da69 | 9c01e98ba75e55b8db018f65c699667fea63cdb1 | /src/classes/MessageFactory.py | 7a6104945eb3045d9e645f124addd0bbde32a011 | [] | no_license | ArthV/Torlike | d5644d006b7553e09f8b6b73f4c64cd10ab09a1d | 1bac0424f42300ac4f741ce1286ceb9ab576fd87 | refs/heads/master | 2021-05-07T14:24:47.018890 | 2018-03-18T14:13:00 | 2018-03-18T14:13:00 | 109,813,413 | 1 | 1 | null | 2018-03-18T14:16:18 | 2017-11-07T09:22:20 | Python | UTF-8 | Python | false | false | 10,225 | py | MessageFactory.py | #!/usr/bin/env python3
# @AUTHOR: Arthur Valingot
# @DATE: 06/12/2017
from abc import ABC, abstractmethod
# We can use the function chr: int -> str and ord: str -> int int(x, 2): bin -> int
PADDING_CHR = ' '
class MessageFactory:
@staticmethod
def get_message(message_type, object):
if type(messag... |
1fa414b00ecbb2daa7b1ce892fa8da19a10df6db | abef2354f8a966e3fc3d1611e569e5c278e73d45 | /febio/FebPlt.py | 29862a770512f11e0ad1e4859c8e6eb9dcc86301 | [
"MIT"
] | permissive | siboles/pyFEBio | 5149700fa4b71c3107d6351898ebdc66c9749b2b | e3cb070882b8f28cf22db8c6510f20ef20f74181 | refs/heads/master | 2021-11-11T16:37:46.483671 | 2021-11-10T18:10:38 | 2021-11-10T18:10:38 | 43,567,693 | 5 | 5 | MIT | 2021-10-11T17:56:07 | 2015-10-02T17:53:57 | Python | UTF-8 | Python | false | false | 24,356 | py | FebPlt.py | from __future__ import print_function
from __future__ import division
import os
from builtins import str
from builtins import range
from builtins import object
from past.utils import old_div
import numpy as np
from collections import OrderedDict
class FebPlt(object):
'''
DESCRIPTION: FebPlt parses FEBio binar... |
c259ae55df073e7d4b00e105b4082100ce95b144 | ef825b0132f238ea31c4d1615bba6e4e9a8ff84b | /Analysis.py | 289c61f243ce0a786e925b6ffb3819efa7a4b9b3 | [] | no_license | jtwolf66/Weyl_Research | 62be3265fdaa9fe8feec6a9fa2f9e6b1d120adb8 | abf829cfe7de9180ab8550cbb7d7fcab0082382d | refs/heads/master | 2020-07-14T23:52:26.203934 | 2019-08-30T17:48:47 | 2019-08-30T17:48:47 | 205,431,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | Analysis.py | import weylc2 as wc
import numpy as np
from scipy import pi
import matplotlib.pyplot as plt
# Parameters to be studied.
n=65
dom=np.array([0,1,2])
size = np.array( [1.0, 1.0, 1.0] )
angles = np.array( [pi/2.0, pi/2.0, pi/2.0] )
L, LHS, RHSV, RHSA, RHS, S, Vol, SA = wc.weyl(dom,n,size,angles,supr=True)
fig = plt.figur... |
c9bb11110baeb0fe3b9146b8242a2a746cb35493 | 4909f24553c81351b63b6e06a24c88c7c52d19d5 | /Group10- Khánh Linh- Miniproject.py | c7903d692db9ce5c83dc01607acd5cbfc35bf32e | [] | no_license | khanhlinh2001/MiniProject-Group10- | 52a827fe025e621c8fb7b13f2f530c62bb0c3b08 | 715200d88f383fd36190373b640188bc126552c4 | refs/heads/main | 2023-05-20T12:54:55.340116 | 2021-06-12T07:24:12 | 2021-06-12T07:24:12 | 376,226,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,093 | py | Group10- Khánh Linh- Miniproject.py | #!/usr/bin/env python
# coding: utf-8
# # Mini-project
Group 10 (individual): Nguyễn Phan Khánh Linh MAMAIU19010
Email: nguyenphankhanhlinh2001@gmail.com
# https://www.analyticsvidhya.com/blog/2018/10/stepwise-guide-topic-modeling-latent-semantic-analysis/
# https://www.datacamp.com/community/tutorials/discovering-hid... |
c30da6dece5d2adec500ce6c342e1f6037f6386e | a683ad38888c47ddae71acd18b62155c2b048a37 | /file_handling.py | 040dbe18098c0b1df1f71cdc3517cccaedb861b9 | [] | no_license | kishoritiwari2000/file_handling | 2e9ab2b1ed6a0a137eef176f618eff707a29763a | 938766698728d9b4fd5aeaddc55eb005654e7e20 | refs/heads/master | 2020-05-16T23:19:40.809739 | 2019-04-25T05:22:08 | 2019-04-25T05:22:08 | 183,361,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 63 | py | file_handling.py | a=open('name.txt','r')
b=a.readlines()
print(len(b))
a.close()
|
ab19d29358602a8462f2520b7e873825d752390e | b31c33e860cbf5a216849697c87f10c640ca98d3 | /Bollinger Bands5/hw5_ref.py | fd64a56723e085560ad324c81c86f2423f0c69e9 | [] | no_license | sushantborse9/Computational-Investing-Garajfest | 36c46e5c710ebc19bbc049ef5d58891781909fc6 | 4b74367a1ba339fd5e6f9c5e39649593c0127bac | refs/heads/master | 2021-01-10T03:05:45.569895 | 2015-12-12T21:14:39 | 2015-12-12T21:14:39 | 46,211,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,888 | py | hw5_ref.py | # QSTK Imports
import QSTK.qstkutil.qsdateutil as du
import QSTK.qstkutil.tsutil as tsu
import QSTK.qstkutil.DataAccess as da
# Third Party Imports
import datetime as dt
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import math as m
#calculates Bollinger bands for a stock
def bollinger(sym, ... |
b8c16674f37d694e6cc0a129379f813d7fc7abf5 | 4f6777d62424ffe847cce39dd9e6f08e3a5b02c0 | /obj/Paddle.py | f9fbe83d7a19559accffe6af35366af4fb124284 | [] | no_license | elkarouani/python-ping-pong-game | a164845fdb4e46865c3a1a36c612e4ec403ef939 | a373958f542d4914e799fdd7f2e388b0cf3af81b | refs/heads/master | 2020-04-14T14:27:10.346747 | 2018-12-31T13:18:54 | 2018-12-31T13:18:54 | 163,897,342 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | Paddle.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 31 12:46:59 2018
@author: KDragon
"""
import turtle
class Paddle :
def get_paddle_object() :
paddle = turtle.Turtle()
paddle.speed(0)
paddle.shape("square")
paddle.color("white")
paddle.shapesize(stretch_wid=5, stretch_len=1)
... |
079567cdf797e0b93a79a0f61d217cb9decc7541 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/common/uuid_utils.py | 29405096e4950b535d978865e9dcb91b34659963 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 458 | py | uuid_utils.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/common/uuid_utils.py
import os
import random
from uuid import uuid1
_node = None
def _getNode():
global _node
if _node is not None:
return _node
else:
_node = random.randrange(0, 4294967296L) << 16
_nod... |
95e14585844bb3948ee5e31ee98d854e740072d1 | 847e2d216a170390443eeef7a8c878daf8b6c7d7 | /python/sorting/maxheap.py | 7a9e8fb757ef01545ed559f74d1d58eb817f59cb | [
"MIT"
] | permissive | jackchi/util | 28d1ff495bbc893a5b6dd5628bcdf12ef4dbcce1 | e692617199b9f782b92e3b4428df5fcf8d750c98 | refs/heads/master | 2021-01-17T10:23:21.141964 | 2016-04-28T00:47:17 | 2016-04-28T00:47:17 | 9,362,233 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,808 | py | maxheap.py | #!/usr/bin/python
# https://github.com/jackchi/util/python
# Copyright 2014 Jack Chi
# Max Heap Abstract Datastructure
# Building up for Heap Sort
from copy import copy
class Maxheap:
"""
Maxheap is an array of values that is visualized as
an nearly complete Binary Tree where:
- parent value is always larger t... |
186f20fd35b0dac2f37e61d3f88ad47014059999 | d766ce8be565cfd9c38532cd577a4bd1659277f3 | /Memory/Card.py | ebc1153ac055cfada32af5a3b85bdacc6c89f3d3 | [] | no_license | ctuck6/Miscellaneous | 91ae12ced856eb3d27ae37b5268580925f274894 | b6920c8251167dbf63f719a8c4989bcff2b0ec28 | refs/heads/master | 2022-12-11T08:09:43.206674 | 2020-07-16T20:44:02 | 2020-07-16T20:44:02 | 218,641,977 | 0 | 0 | null | 2022-11-22T05:55:58 | 2019-10-30T23:00:57 | Python | UTF-8 | Python | false | false | 229 | py | Card.py | class Card:
def __init__(self, value):
self.value = value
self.flipped = False
def get_value(self):
return self.value
def get_status(self):
return self.flipped
def set_status(self, status):
self.flipped = status
|
2e0c837e118dc8a288d4972ce2f39f8e034e3ef2 | 4fba1ba4d038fa2ff1680138ee3b27627d40df01 | /location/migrations/0002_auto_20210910_1223.py | 5372e9d649b4aae27f9a627e8a6fda805354a976 | [] | no_license | PaulJayP/django_todo_app | 7d8d5fd24899ad9dfd9ccc40e4c60d8583a21f67 | 82749891557402e3e5512c4312db5a0c36b8e288 | refs/heads/master | 2023-07-31T01:03:46.267871 | 2021-09-19T23:17:53 | 2021-09-19T23:17:53 | 405,067,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,109 | py | 0002_auto_20210910_1223.py | # Generated by Django 3.2.7 on 2021-09-10 11:23
import json
import sys
from pathlib import Path
from todo_app.settings import BASE_DIR, CITY_JSON_DATA
from django.db import migrations
def insert_data(apps, schema_editor):
City = apps.get_model("location", "City")
Country = apps.get_model("location", "Count... |
26a589115675e9e8eb0d790f4b461bf35425f949 | 3b0de3d6c100b809cd7f51d9ca46d3f0ade1aa00 | /projects/cs64/baseConverter csv.py | 4d624ad32f59a1e393bdd03285044e9d2dc9306b | [] | no_license | taecoding/data | df4b628a5c7258348679f87a536bad6bd821f5ec | 67005ced8a55d912c0337f112bcd88aca537aeb3 | refs/heads/master | 2023-03-04T08:52:40.950064 | 2023-02-20T00:30:22 | 2023-02-20T00:30:22 | 139,278,313 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | baseConverter csv.py | import base64
'''
csv_df = df.to_csv(index=False)
import base64
base64.b64encode(csv_df.encode('utf-8'))
'''
'''
import base64
data = open('small_portfolio.csv', 'rb').read()
base64.b64encode(data)
'''
filename = 'small_portfolio'
fin = open('encoded.' + filename)
encodedString = fin.read()
decodedString = base64.b... |
6f121000bb26cd54bdd05b356c2a536cb8e43683 | f81416346835236ac0a5c96d7e1da6be2a41b10f | /bin/autopidact | f935108d4e991c0fa8529f64394db16930dfc9ee | [
"MIT"
] | permissive | lilyinstarlight/AutoPidact | 6dc35c92646516d762c8ef3ef97ef070e58699ff | 29a0d387a045ccb2dd5fd92609167e03dbb75264 | refs/heads/master | 2021-05-28T06:59:24.515890 | 2015-03-11T15:17:21 | 2015-03-11T15:17:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51 | autopidact | #!/usr/bin/env python2
from autopidact import main
| |
79c10b3c4e3bb422c0016296c1f563361ea2e0ac | 8b4d5f39394bc90fe623c73be1bc6c5a3b5b9099 | /main.py | 77f125ca70b32728dffb6281cd4a2a8d5818e8a7 | [] | no_license | pawankushwah850/web_scrap | 7a1fbce03486696f3ee44658bb3e0dfaeea3ceff | 7c485cfcab354ec37bd08bad022731720361580f | refs/heads/main | 2023-03-01T19:35:51.297599 | 2021-02-13T13:11:41 | 2021-02-13T13:11:41 | 338,576,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,802 | py | main.py | try:
from bs4 import BeautifulSoup
import html5lib
import requests
import validators
from time import sleep
except ModuleNotFoundError as error:
print(error)
module_name=str(error).split(' ')
print(f'please run : pip3 install {module_name[len(module_name)-1]}')
def get_article(soup):
... |
be455cbe909b0c462bbe7295c92c3b17dd9a011f | 2f635d074f66602b7ac3fea3936366386a9ec983 | /app/auth/views.py | 5025dfceb7977792305f04ec6c404ce693b42589 | [] | no_license | cunfate/flaskapp-simple | f8d0e3a4208f8182f4fd6090b9ac95e7acba9582 | 7702f0770a520b48fcc862ce0f73e12aa66b1a4d | refs/heads/master | 2021-08-22T03:53:34.004758 | 2017-11-29T06:33:20 | 2017-11-29T06:33:20 | 104,211,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,842 | py | views.py | from flask import render_template, redirect, url_for, flash, request
from flask_login import login_user, logout_user, current_user, login_required
from . import auth
from .forms import LoginForm, RegistrationForm
from ..models import User
from .. import db
from ..email import send_email, send_mail_smtp
# from flask imp... |
56528890681dcee85a069455ea68a79cc7a4173a | 39f06a517576bced6c1f7c228e907287a6ab221c | /database/FileDataManager.py | c5dfdb0b1381963da010dc570e485ffd31ff256d | [
"MIT"
] | permissive | ShaneBByers/DatabaseManager | 2079b094291c49274d360e0fb9df017ceee143b1 | 9fdae8b67426084752626dcac627abd6b0594d7d | refs/heads/master | 2020-07-25T22:51:20.993930 | 2020-03-01T04:17:53 | 2020-03-01T04:17:53 | 208,448,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,082 | py | FileDataManager.py | import logging
import os
class FileDataManager:
def __init__(self, tab_length=4):
self.logger = logging.getLogger(__name__)
self.file = None
self.file_path = os.path.abspath(__file__)
self.tab = ""
for i in range(tab_length):
self.tab += " "
def open(self,... |
787405f00f91122e94a85ce419bda04b1ca002cc | 75ea5cb594d7f0361b0f427707823af1c6472307 | /HW/HW4/Tajbakhsh - 93725102/Script/3.py | 47c27590e60d7b34fa7643064b46e281cef8c860 | [] | no_license | hesam4g/iust-wireless | 64b18c1629082ee984a292b1a171f9670af7d06a | cf6fb3f70376472f581da4160cf2c2c3ad4097be | refs/heads/master | 2020-09-11T19:25:40.770860 | 2019-11-16T22:22:25 | 2019-11-16T22:22:25 | 222,166,569 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 954 | py | 3.py | import math
avgList = []
lis = []
P = []
FadeMargin = []
NAnthen = []
distances = [1,2,3,4,4,4,5,5,5,6,6,6,7,7,8,8,9,9,10,10,11,11,16,14,14]
for i in range(1,26):
myFile = open(str(i) , "r")
lis = []
sum = 0
for line in myFile:
a = line.split()[0]
sum += int(a)
lis.append(int(a))
avg = sum/1000.0
avgLis... |
0a6848ff2587f591d9103f57a44cf38ed3ae9725 | 7361fe90a2c6eb68d0b2819fd3b340f98fe6e09f | /tests/test_shipping.py | 987093dc71100efad38882312994b88cc94dcb71 | [] | no_license | openlabs/trytond-shipping-fedex | 11f6df59e4fb84d045d0a8d9ab54da5caa231fe9 | 20eabb7e9fd8b40b1fd277bd94d621aebb2b2e24 | refs/heads/master | 2021-01-17T20:46:37.000886 | 2015-05-29T09:18:40 | 2015-05-29T09:18:40 | 35,418,802 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,225 | py | test_shipping.py | # -*- coding: utf-8 -*-
"""
tests/test_shipping.py
:copyright: (C) 2015 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
"""
from decimal import Decimal
from trytond.transaction import Transaction
from trytond.config import config
config.set('database', 'path'... |
686537e8e52e24ad95ff2f6314edc90e8524ed27 | bd7a3a98b7d8e07de3f5aee8473cdaf41dd3b661 | /BISTest.py | 6abab16ed5ca6a5ee4ef5fa91acc581de4e7fb33 | [] | no_license | LOOPPO/INS_MERGE_sort | 683c26ef2ef75654cb117c8b5b2f5d12284daf54 | da75b5499ac3d872a7883f92d50522b167f8302f | refs/heads/master | 2020-06-15T18:59:45.895323 | 2020-04-18T22:47:10 | 2020-04-18T22:47:10 | 195,370,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | BISTest.py | from insertionSort import insertionSort
from randomizeVector import randomize
from mergeSort import mergeSort
from time import time
import signal
A=[]
n=int(input("Hey,how much numebers? "))
randomize(A,n)
mergeSort(A)
print("best case...")
print(A)
print("sorting...")
signal.alarm(120)
t0=time()
insertionSort(A)
t1=ti... |
7e1a314b52488cb49ac74d719b9ecfed9e490ced | d4976d73266289d6270564194c46a6b95c1ab9bd | /ch02/R-2.18.py | b82df3b76210057fcdcf3127e797858852b3dbd0 | [] | no_license | greyhere/data-structures-and-algorithms-in-python | b5d0fe2b32ce827e15dd0aa3a044969f1d14696b | 96a09d4da828293520dc8d4eacf441fa575e139f | refs/heads/master | 2021-01-14T22:36:04.594654 | 2020-04-26T17:33:42 | 2020-04-26T17:33:42 | 242,782,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | R-2.18.py | ''' R-2.18
Give a short fragment of Python code that uses the progression classes
from Section 2.4.2 to find the 8th value of a Fibonacci progression that
starts with 2 and 2 as its first two values.
'''
class Progression:
def __init__(self, start=0):
self._current = start
def _advance(self):
... |
70260eaf70726559bb453c1ac79ab947d5e20a4c | ad0736b08e6ed74af59c3862ecc8e40631f1d51f | /week3.py | fcbd9124bbbf5ef0a70280c90fe772968005edf6 | [] | no_license | k3vzz/Coursera_Python | 87384a4f928569bfd31c1c527c257e16809dbb0d | 7b5c61ca3a8a4bf3e5eac71624ba0d43a908f030 | refs/heads/master | 2020-07-14T06:57:44.096903 | 2016-05-03T17:11:06 | 2016-05-03T17:11:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | week3.py | try:
hrs = raw_input("Enter Hours:")
h = float(hrs)
rate = raw_input("Enter Rate:")
r = float(rate)
except:
print "Wrong input"
quit()
if h <= 40:
pay = h * r
else :
ext_h = h - 40
ext_r = r * 1.5
pay = 40 * r + ext_h * ext_r
print pay
|
0044c13fba55e5c68741c492cb17ae0d069a4200 | 9e04a4d149cc6355deb121d0faa7eece3913b698 | /scrapers/v2/database_scraper.py | 8aaa5808fad2680413b31ef8820dacb226bf3d50 | [
"MIT"
] | permissive | arcktip/bikeshare | f9b41b4909bf4bd7f3bcb264f26ffa2261a37a8c | 7cb84debeea9cc2fe2adf66d7b3e66661e94fc09 | refs/heads/master | 2021-01-18T02:46:20.229827 | 2013-11-17T02:05:50 | 2013-11-17T02:05:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,151 | py | database_scraper.py | import json
import requests
import datetime
import time
import os
import psycopg2
import urllib
from sys import argv
#get url
url = argv[1]
city = argv[2]
#convert JSON to object and get from URL
as_data = urllib.urlopen(url).read()
data = json.loads(as_data)
data = json.loads(as_data)
J2 = data["stationBeanList"]... |
fd5433c2db12240b6335c9f1affe94096d62f708 | 3a07d3d16a5826665304002dd8319ca0ff586af8 | /tests/test_pattern.py | 8979d85827c7dda75c8433cb39ba127dc1b6efe7 | [] | no_license | ISI-MIP/isimip-protocol-3 | 1bb800d72aa0316cb5c70c13bb899df3dc32afcd | 7015cd7eb3dedb32182f8fb30eb47046fac8cc5e | refs/heads/master | 2023-09-01T08:53:59.675934 | 2023-08-31T08:00:55 | 2023-08-31T08:00:55 | 233,047,548 | 2 | 6 | null | 2023-08-22T09:24:07 | 2020-01-10T12:59:26 | JavaScript | UTF-8 | Python | false | false | 567 | py | test_pattern.py | import json
import os
import re
import pytest
def test_patterns():
for root, dirs, files in os.walk('pattern'):
for file_name in files:
if file_name.endswith('.json'):
file_path = os.path.join(root, file_name)
with open(file_path) as f:
pat... |
baa6be22b85129c478c13a1c69f7e8b3bcf26648 | 37a08ee53f6f56c3a8ebf9cd811dcb639ca7d05e | /satools/sync-pt.py | e21741517fb7724435746df4cc67c9daab4328ef | [] | no_license | jamesread/satools | f0c39fe182a6b9b488dd69639be2989087f54ad0 | 90b768a19172bac04f9c136191fca39dad17c8a8 | refs/heads/master | 2021-01-18T03:25:07.941325 | 2013-05-15T16:52:59 | 2013-05-15T16:52:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,776 | py | sync-pt.py | #!/usr/bin/python
import common
import cookielib
import lxml.html
import os
import Queue
import sys
import threading
import urllib
import urllib2
import urlparse
q = Queue.Queue()
def worker():
while True:
items = q.get()
items[0](*items[1:])
q.task_done()
def want(path):
return not ... |
f66bd3d67f2a2dad2c388c307e3765d7a0e92991 | c688918c15c88aaea8afef2789ddbf754e2cd4dc | /src/exceptions.py | 02ba12af67050ab7e1fce282047bfe376f1d6a52 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | zale144/cello | 5fff8aa874225141236bad1f6cdee683f75cb5b8 | 43f537380b93896c543a1248bf2b04c3fafe993d | refs/heads/master | 2020-03-29T11:31:58.697012 | 2018-11-11T22:27:50 | 2018-11-11T22:27:50 | 149,857,495 | 0 | 1 | Apache-2.0 | 2018-09-22T08:03:23 | 2018-09-22T08:03:23 | null | UTF-8 | Python | false | false | 103 | py | exceptions.py | class ReleaseClusterException(Exception):
pass
class DeleteClusterException(Exception):
pass
|
ab24a94de736c1c4e0cf99ed5a3ef2d038862829 | 7adb85862889ee12b963fb182c92b822dbee63f9 | /scripts/generate_test_camera_frame.py | 4fc59cc3fbb4f18bcb8afae4f6c5b8156f4505d5 | [
"Apache-2.0"
] | permissive | GreenWaves-Technologies/FaceReID | ed1445556b5cc9f4ee9116c9c2f04056ec1e3486 | a3bde7e8c47eabce8a83890068f350bb747aab17 | refs/heads/master | 2021-10-24T04:08:38.075563 | 2020-10-21T08:56:31 | 2020-10-21T08:56:31 | 220,202,582 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,598 | py | generate_test_camera_frame.py | #!/usr/bin/python3
# Copyright 2019 GreenWaves Technologies, SAS
#
# 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 required by app... |
1c40f6af2b4508e9e1b58998ddfdd9dcc9f96a3f | 90f51a5ebc3e0d7464f8fcf5d59c8f3432adbf1c | /pd-phone/lib/pd_api.py | 33df78860d5b0be923dfece6ce83b53f2248b437 | [
"Apache-2.0"
] | permissive | wjimenez5271/pd-phone | 91004288362cbb5289c7b7bcf2d45e04738ccb72 | 29e7a7c70bf9085d066425116dcd99632e13d149 | refs/heads/master | 2021-01-22T23:26:39.954837 | 2015-08-03T15:47:20 | 2015-08-03T17:07:42 | 35,925,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | pd_api.py | import requests
import json
class PagerDuty(object):
def __init__(self, subdomain, auth_token):
self.subdomain = subdomain
self.auth_token = auth_token
def call_api(self, api):
url = 'https://{0}.pagerduty.com/{1}'.format(self.subdomain, api )
headers = {'Authorization': 'Token... |
c13ef652936525081e652a8682f68c9d37f531d0 | 1e0fd6a8626b3293d6d1546b509cc5580b38fbfd | /datasets/hca-szabo-immune/scripts/reformat_add_metadata.py | abc12a58326bc68db6ecce037a4bb001e09b5cab | [
"MIT"
] | permissive | rcannood/single-cell-curation | d5ad98539126c2d1ce9a1c4aea6a270f34e96cde | 721ac0519f1af8d59fe711907fb9b0b1883e2296 | refs/heads/main | 2023-07-20T03:32:23.226512 | 2021-09-02T19:39:18 | 2021-09-02T19:39:18 | 403,897,539 | 0 | 0 | MIT | 2021-09-07T08:17:15 | 2021-09-07T08:17:15 | null | UTF-8 | Python | false | false | 1,811 | py | reformat_add_metadata.py | # Reformats data and appends metadata. Outputs h5ad
import pandas as pd
import scanpy as sc
import sys
def main():
# Files
mtx_file_counts = "./data/original/counts.tsv.gz"
sample_metadata_file = "./data/original/41467_2019_12464_MOESM9_ESM.txt.gz"
out_file = "./data/transformed/1_reformatted/hca... |
c9bcb9ddfef51fe590c158fc81be3db5cb5e9095 | 39492dad14f6c36dbff9b1395f2378000efc8daf | /4.1_functions.py | 2501ea73eafe8345d220ea7d271716ed66ba310c | [] | no_license | r151046/DSP | 5bc82fb5670e615cb78bfdd7edd45e30c0be69ac | 3019c71e4bd6f202e915bd2319039118e96c9703 | refs/heads/master | 2020-05-16T13:15:35.894830 | 2019-04-23T18:30:58 | 2019-04-23T18:30:58 | 183,069,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | 4.1_functions.py | import numpy as np
import matplotlib.pyplot as plt
time=np.arange(-10,10,0.01)#arrange(start,end,increment) its like for loop#
a=0
a2=0
f=100
f1=1000
amp=np.arctan(time) #numpy has all basic signal functions inbult like sin,con, sinverse of sin(arcsin) tan #
amp1=np.arctan(time)
amp3=(1*amp1)
amp4=(1*amp)
plt.figure(1... |
702636f88b0eecd9ca564f09ec30e7154646c8db | cd5746f8cc7aee1f20606a65b4fae0d5e8ee78dc | /Python Books/SciPy-and-NumPy/ScipyNumpy_book_examples-master/python_examples/scipy_351_ex1.py | fbbfb6577b26c1b95c446a26eda3bc70e3d8c98f | [
"MIT"
] | permissive | theGreenJedi/Path | df24fca355590efef0c6cb5c52e7216c6b5d2464 | b5ed2805dbb046480929e49e550bfd8af5bb4d6f | refs/heads/master | 2023-07-27T14:23:37.694546 | 2021-07-16T01:38:55 | 2021-07-16T01:38:55 | 87,686,563 | 8 | 2 | null | 2023-07-11T22:49:03 | 2017-04-09T05:57:30 | Jupyter Notebook | UTF-8 | Python | false | false | 1,579 | py | scipy_351_ex1.py | import numpy as np
from scipy.cluster import vq
import matplotlib.pyplot as plt
# Creating data
c1 = np.random.randn(100, 2) + 5
c2 = np.random.randn(30, 2) - 5
c3 = np.random.randn(50, 2)
# Pooling all the data into one 150 x 2 array
data = np.vstack([c1, c2, c3])
# Calculating the cluster centriods and variance
# ... |
0ed99037d7ff708b7931fbc3553b1aeb19a20f53 | bd1db30fd3c593e8dc4f2e21de630668456ed28f | /educational-resources/algorithms/Algorithms-master/src/main/python/algorithms/datastructures/queue/IntQueue.py | c1e541e6d8e4dc9480f70d2f95591cc907c3f10b | [
"MIT",
"GFDL-1.1-or-later",
"CC-BY-4.0"
] | permissive | vicb1/miscellaneous-notes | c50d759729b4d0067b3c4cb51a69350db5a941b9 | eb63641a8156a4dcd78924b5d0f6f0618479ceaf | refs/heads/master | 2023-05-11T06:04:03.254582 | 2023-05-09T12:34:18 | 2023-05-09T12:34:18 | 227,648,115 | 1 | 0 | MIT | 2022-12-11T17:00:50 | 2019-12-12T16:20:38 | Python | UTF-8 | Python | false | false | 2,843 | py | IntQueue.py | '''
* @file IntQueue.py
* @author (original JAVA) William Fiset, william.alexandre.fiset@gmail.com
* liujingkun, liujkon@gmail.com
* (conversion to Python) Armin Zare Zadeh, ali.a.zarezadeh@gmail.com
* @date 23 Jun 2020
* @version 0.1
* @brief This file contains an implementation of an inte... |
acff8618754658104ac36214901d346447a0134f | 7aa2b60282fbc5217d86b57235616c4f56728705 | /pub.py | baa4cc1c9a3491b4b7baea49834d5760cbc71af4 | [] | no_license | mahruszainpcr/mqtt_firebase | 67af2f1cb20b0e46cacef0182114cc58322e6ac8 | 0df48e106297ab2ee974f9867c91b5ec75d28a1f | refs/heads/master | 2022-11-07T19:34:04.303129 | 2020-06-18T08:42:46 | 2020-06-18T08:42:46 | 273,185,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | pub.py | import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
import paho.mqtt.client as mqtt
# Fetch the service account key JSON file contents
cred = credentials.Certificate('iot_mikro.json')
# Initialize the app with a service account, granting admin privileges
firebase_admin.initialize... |
077b6d3d7417bbc26e9f23af6f437ff05e3d5771 | 8b6cc0b3f4945a9dce0ed7524d0d4e5567b82652 | /机器学习/生成先验概率.py | 050bfa75d6a29ff4fe390ef91c47281ae3c4eda1 | [] | no_license | QkqBeer/PythonSubject | cc59894a5ae86c5751159e7023263bbed269b959 | b890a5ea050cfe3886b5275cc26c1593b35b58db | refs/heads/master | 2020-05-19T07:51:40.706597 | 2019-05-04T10:47:37 | 2019-05-04T10:47:37 | 184,882,433 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,710 | py | 生成先验概率.py | __author__ = "那位先生Beer"
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import xlrd
import numpy as np
print('输入鲈鱼的先验概率例如:70,对应70%')
a=input('输入鲈鱼的先验概率(鲑鱼对应的1减去剩余的):')
font_set = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=15)
#根据生成的数据画出图像(横坐标为长度,纵坐标为亮度)
data=xlrd.open_w... |
0ea67ac97ec8e7f287a2430c67f8f7d841d8b646 | 43c870b240a807db330a7abf53758c1fef924432 | /cloudkitty/tests/api/v1/test_summary.py | 26a3d827c06500156ece9e7db4f7acb54ad758d3 | [
"Apache-2.0"
] | permissive | openstack/cloudkitty | fb3cb83d8d89b27efe64768862f07781a2ef3b5a | 94630b97cd1fb4bdd9a638070ffbbe3625de8aa2 | refs/heads/master | 2023-08-31T15:10:44.524252 | 2023-08-23T16:27:35 | 2023-08-23T20:01:01 | 20,042,606 | 103 | 57 | Apache-2.0 | 2017-11-29T15:39:28 | 2014-05-22T00:52:38 | Python | UTF-8 | Python | false | false | 1,289 | py | test_summary.py | # -*- coding: utf-8 -*-
# Copyright 2017 Objectif Libre
#
# 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 required ... |
883b4de18dddede97f850e3a184a0e1072bda99e | 37465cba0fe3e00e97712d90b074c33e23009ac5 | /lab10.py | be3fd8236edbfae68bc9087090b7ae7fd64cd355 | [] | no_license | Glairly/Data-Structure-Lab | fcf70eec3b92a0dff0969d89ce4098b283c7b33f | 1e4e983aa598877ab5fe37380dae43c5f207dd12 | refs/heads/master | 2023-01-14T11:51:25.499112 | 2020-11-26T22:54:42 | 2020-11-26T22:54:42 | 291,274,810 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,425 | py | lab10.py | # #1
# def bi_search(l, r, arr, x):
# # Code Here
# if(l == r):
# return arr[r] == x
# mid = (l + r)//2 + 1
# if(arr[mid] > x):
# return bi_search(l,mid-1,arr,x)
# else:
# return bi_search(mid,r,arr,x)
# inp = input('Enter Input : ').split('/')
# arr, k = list(map(int, ... |
95b75395cafc6ba9f75ecf48157421e37ced2518 | 2f12ae8dbd93e0da31d0fe04b022a35f8d7bb477 | /Introduction.py | 299c70e8e23358b4ad78c5812c0b871217f22675 | [] | no_license | dipesh1996/Python-Programming | 58f8f79ef0fc3cc6f7cf4fc73377a35aa02006e8 | b72555c5efecd9065a34260cebe0fa2c24b554fc | refs/heads/master | 2020-04-18T09:53:30.318093 | 2019-01-24T23:06:59 | 2019-01-24T23:06:59 | 167,450,722 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,691 | py | Introduction.py | import math
# type defining of the variable and playing with variables.
a = 5.0
print(id(a))
a = 10
print("hello.....")
print(type(a))
print(id(a))
# locating addresses...
b = [5, 6, 7]
print(id(b))
b.append(10)
print(id(b))
# Strings...
name = input("Enter Your Name:: ") # iNPUTTING AS NAME
pri... |
21bdf315c98a4cf69482cc7db41bc30d44781596 | 400537368b40d52fd8b5dc29f293085d3b447519 | /migrations/versions/43eabda1d630_added_personal_collection.py | 6834049f6d710641366d910359ef5a2466f2279d | [] | no_license | suhasmaganti/HW4_364 | 213310db1b09f56e410de90e413f5e2083c41e7f | 9481f7c41f3189db69e8d21d53678c057cb2971b | refs/heads/master | 2021-04-14T21:21:30.181381 | 2018-03-28T23:38:46 | 2018-03-28T23:38:46 | 126,553,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | 43eabda1d630_added_personal_collection.py | """added personal collection
Revision ID: 43eabda1d630
Revises: 9cad4dfb5125
Create Date: 2018-03-28 13:55:03.557872
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '43eabda1d630'
down_revision = '9cad4dfb5125'
branch_labels = None
depends_on = None
def upgra... |
7503a0c8f83ff0ce370ed7bce733b09d9a2c69c4 | f8ed527db88360947f76685176a3c674ac21e29a | /titan/components/input.py | 892e19088f8a1a621c01ec08097b97f2a2f6ad0f | [
"Apache-2.0"
] | permissive | dmf-code/titans | 24d526ff1f5ef96b077a15228cc01049d83f24f6 | e23b04f00b5fe8956d98462c022cacf774174a06 | refs/heads/master | 2023-05-08T00:23:09.163843 | 2023-04-23T09:27:14 | 2023-04-23T09:27:14 | 218,706,398 | 19 | 2 | Apache-2.0 | 2023-01-06T09:16:38 | 2019-10-31T07:15:32 | Python | UTF-8 | Python | false | false | 693 | py | input.py | # -*- coding: utf-8 -*-
from selenium.webdriver.common.keys import Keys
from titan.components import Base
class Input(Base):
def clear(self):
element = self.driver.find_element_by_xpath(self.params['xpath'])
if self.params.get('clear', None):
element.clear()
return True
... |
b7738c27e11e9566d90157717633312031cdffd6 | 36a52dc3f8c51021953a0ba47c97cb75bb21b598 | /old/announcement.py | c6340c0416a704b023c462a3679fb012d2e5a5bd | [] | no_license | mobone/pead_ml2 | ac30c738a6a6dc17f131088e49b7d5678d145449 | 3ea8f1ce077feb8403f0c01a3a3fb53fc3ce466e | refs/heads/master | 2020-12-10T03:02:08.311417 | 2020-01-30T00:05:35 | 2020-01-30T00:05:35 | 233,487,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,710 | py | announcement.py | import sqlite3
class announcement:
def __init__(eps_df, revenue_df):
conn = sqlite3.connect("earnings.db", timeout=120)
cur = conn.cursor()
symbol_href = self.driver.find_element_by_class_name("lfkTWp")
symbol = symbol_href.text
eps_history_df = pd.read_sql(
'... |
8ccec24e1a7060269ffbb376ba0c480da9eabe0a | 188fa261446cee9fc1b56029e884c8e74364a7f4 | /Hackathon/Abnormal-study/model.py | 6520f69a1acc0c18707b32752d8ed7455cf81e89 | [
"MIT"
] | permissive | huseinzol05/Hackathon-Huseinhouse | 026cc1346afb127aa2675be94a818ebf35f72bb5 | 6796af2fe02f10d7860ac8db27bd24fa27b8bb01 | refs/heads/master | 2021-06-29T23:04:35.027212 | 2020-09-07T04:01:49 | 2020-09-07T04:01:49 | 147,768,669 | 3 | 4 | null | null | null | null | UTF-8 | Python | false | false | 12,650 | py | model.py | import tensorflow as tf
import settings
import numpy as np
slim = tf.contrib.slim
class Model:
def __init__(self, training = True):
self.classes = settings.classes_name
self.num_classes = len(settings.classes_name)
self.image_size = settings.image_size
self.cell_size = setting... |
a9d0aec61e7a73b6c0745f5c1f0430e1be8781fe | 763347ebb6e133431674bcd263fe6c1ea5e0a49a | /session_16_bs_threads.py | 5a522b7c08a0dc23c3b7e737e9d78d1531a879d5 | [] | no_license | abiraja2004/Python-Session-code | a0719f5a74a8ad90df0ff1acd5d162770dde44c5 | 13558339b23ba29815f98c24344d7e7a8a33587b | refs/heads/master | 2020-06-20T19:22:59.891881 | 2018-12-13T05:55:22 | 2018-12-13T05:55:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | session_16_bs_threads.py | import requests
from bs4 import BeautifulSoup
import threading
def get_deatils(card):
price = card.find("div",attrs={"class":"m-srp-card__price"})
title = card.find("a",attrs = {"class":"m-srp-card__title"})
response2 = requests.get(title.get("href"))
soup2 = BeautifulSoup(response2.content,"html.parse... |
67f3e026016d7a7972e3ac6c5a535710f95e020b | 5a8214b3a452c574e6c883bf5d90ba58ba87c461 | /leetcode/247.strobogrammatic-number-ii.py | 4975b3cb2b25f61b10e03453e60feaec52120d5e | [] | no_license | phlalx/algorithms | 69a3c8519687816e3c6333ec12b40659d3e3167f | f4da5a5dbda640b9bcbe14cb60a72c422b5d6240 | refs/heads/master | 2023-02-03T10:30:30.181735 | 2020-12-26T09:47:38 | 2020-12-26T09:47:38 | 129,254,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,007 | py | 247.strobogrammatic-number-ii.py | #
# @lc app=leetcode id=247 lang=python3
#
# [247] Strobogrammatic Number II
#
# https://leetcode.com/problems/strobogrammatic-number-ii/description/
#
# algorithms
# Medium (45.24%)
# Likes: 276
# Dislikes: 88
# Total Accepted: 54.8K
# Total Submissions: 120.8K
# Testcase Example: '2'
#
# A strobogrammatic numb... |
c2ae2c4850ef408413448d352026605793fb5712 | 1ddced656f5fc3b3103a728b97b4a387d904df32 | /fishcheck.py | 40879896eee5d483d28200e4d25413a625c39400 | [] | no_license | justinrporter/fishtank | 1a8af0994e656afb546bd9090c5acf133f3487e3 | 23986bae9565df4997d62fd98d396d6b4d8fd691 | refs/heads/master | 2021-03-27T13:07:59.232005 | 2017-10-15T21:16:32 | 2017-10-15T21:16:32 | 107,045,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | fishcheck.py | import datetime
import smtplib
from email.mime.text import MIMEText
from fishtank import settings
from fishtank.util import load_fish_dataframe
df = load_fish_dataframe(settings.DATA_PATH)
day_ago = datetime.datetime.now() - datetime.timedelta(days=1)
data = df[df['time'] > day_ago]
merge = data[data['sensor'] == '... |
aef57f91faa49f7f2b84e3dc3373d75a21810cc3 | 109c4f901cb0bbd89ce8a6e39e0e638155e6cad8 | /beta-dev1/mgm_modifier_purchase_request/models/purchase_request.py | d011e36432808303aac6bc53c2aefdfe372fde8a | [] | no_license | odoo321/code | 6b1bbe628bbc7899d26cf4fe26e323e9c65e6b59 | 83089d58cc5aa98e28f8d142f3d39e6aadc55b46 | refs/heads/master | 2020-04-14T07:35:23.966049 | 2018-12-28T10:10:22 | 2018-12-28T10:10:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,139 | py | purchase_request.py | from odoo import api, fields, models
class SubDeptMaster(models.Model):
_name = 'sub.dept.master'
name = fields.Char('Name')
class PurchaseRequest(models.Model):
_inherit = 'purchase.request'
pr_number = fields.Char('PR Number', size=30)
request_date = fields.Date('Request date')
... |
e5fa2674d02d047f810a835be4aabb44b7df2b26 | 13fc634658149d1d7aa0f8499f2a102a81f0bd6e | /iterfib.py | bf63cafc57cd010468112a90b0ec15406a76068a | [] | no_license | barcher1968/lpthw | 64e3deefe7ce1e6e479edf7fc8495c9ec5132682 | 8091558fb9ee43bd465b992770c2cb55681c92c5 | refs/heads/master | 2020-06-19T06:38:47.862822 | 2019-08-12T16:15:31 | 2019-08-12T16:15:31 | 196,600,623 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | iterfib.py | import datetime
x = input ("Enter index value: ")
(x)=int(x)
dateFormat = "%Y-%m-%d %H:%M:%S"
count = 0
index = 20
def F_iter(x):
global count
count += 1
if (x == 0):
print (0)
elif (x == 1):
print (1)
elif (x > 1):
fx = 1
fx... |
b370cadacdf2b7b0f65b4158ddd55488973cbd47 | e5e19ffe9da423f3769146c37f140fa7540bf47b | /dataset.py | d511e54ac282dabb6dcf88fe4fc52e5ee625f48d | [] | no_license | cavaunpeu/kaggle-liberty | 74678ab545cd016032cb199a623dd494fed2551e | e31375c2cfdbef8e5fc3311ad77b9e0267fe26e0 | refs/heads/master | 2021-01-15T11:43:22.314841 | 2015-09-03T02:03:06 | 2015-09-03T02:03:06 | 41,837,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,866 | py | dataset.py | import os
import pickle
from utils import DATA_DIR
class Dataset(object):
def __init__(self, func, finalized=True, **kwargs):
self.func = func
self.kwargs = kwargs
self.finalized = finalized
def generate(self):
if self.finalized:
data_func_dir = DATA_DIR + '/' + ... |
75ee326759c5d4e9a441fd86e72e0e6c0308a72f | 5976388f2267e7bc5d30513953ff888a64836f3d | /insertion.py | 824067060bcfe2d49dd39b401f110ec7f0cba8d6 | [] | no_license | talhaunal99/Bil372_Grup5 | 78814d2ea485d9e3cb0611ee9b00d20b92ad92fb | 6162058f2c8964ff8732f0d67047a3e5473e7f3f | refs/heads/main | 2023-02-07T15:52:30.307729 | 2020-12-09T20:31:10 | 2020-12-09T20:31:10 | 303,926,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,863 | py | insertion.py | import pandas as pd
from sqlalchemy.exc import IntegrityError
from model import db
from model import Employee,Customer,CustomerLogin,Carrier,Chemist,Company,Content,Confirms,ConsistOf,Customer_Service,EmployeesOfCompany,Accountant,Includes,EmployeeLogin,AdminLogin,Admin,Analyst,Takes,Order,Sells,Department,Manages,Ma... |
83cb214ff8be43961b71b1878ef1f0980ccfb0ce | c4067dd24331bdbb69fa6297f1939d0e6aef8f5b | /password-generator.py | 86fecc3ea5d94347b5fdfcf367e5b8f6e85534bd | [] | no_license | Brennii96/password-generator | 79163c37775746f47503bfea5b53eb16fd327097 | 005250e51331631e6e8115d5e8cf560843c5ac32 | refs/heads/master | 2022-11-29T00:28:11.078912 | 2020-08-08T21:34:17 | 2020-08-08T21:34:17 | 286,122,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | password-generator.py | import string
from random import choice, randint
characters = string.ascii_letters + string.punctuation + string.digits
for x in range(6):
print("".join(choice(characters) for x in range(randint(16,28))))
|
1f006bfcd05fb74764c3aeef3ded48a11bf08781 | ec3c24ccdcc809f9fe8304dd4bd0fd835feb207a | /순열 사이클.py | 3309782bc37bab76ff75561aabda493495a21320 | [] | no_license | Jeongseo21/week03-algorithm | ee69e3177b138e9e9c47e4399c67a0d27b72b4cd | 4bff6dd427a320e2b1b7731bfcc5164672876c9f | refs/heads/master | 2023-02-21T22:17:55.984048 | 2021-01-26T02:24:08 | 2021-01-26T02:24:08 | 324,121,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 548 | py | 순열 사이클.py | import sys
from collections import deque
input = sys.stdin.readline
def bfs(i):
queue = deque()
queue.append(i)
while queue:
now = queue.popleft()
num = graph[now-1]
if not visited[num]:
visited[num] = True
queue.append(num)
T = int(input())
for _ in range... |
1bb4dae2ae227bb1322ddc0e9aa97dbdab97e12d | b4dc1df45ed0db3be11b5af1380de7144a6a1388 | /historydel.py | b59cef9bb484b27077a89cf2db1b1e807642b21b | [] | no_license | tjdyh/saltmodule | ba6749574ca421944926c1c45aa09c974b26fe6c | 6c773a23f86e089d81c97c907cf9f68cb2968820 | refs/heads/master | 2020-03-10T00:17:15.170966 | 2018-04-11T10:51:52 | 2018-04-11T10:51:52 | 129,078,045 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | historydel.py | # -*- coding: utf-8 -*-
import os
def hisdel():
'''
delete history commond;
:return:
'''
os.system(':>/root/.bash_history')
return "history has deleted!"
if __name__ == '__main__':
hisdel()
|
d5dcb1dd9f6fac0ab37a977abb11dc317cfb2d51 | a757994bdb55d484f3e1784e131df81bc6621850 | /advanced-oom/multipleInherit.py | 16bf7cfff70c6f0b00fb7ecb1f1048a931c7c4ff | [] | no_license | githubtoyou/learnpy | 2ce84e2bb3a3c8f3ca65c7761b6f2c95f223c218 | 31c92671ec9c05ad71e34e0e188b53e945a5709f | refs/heads/main | 2023-05-29T00:20:57.983103 | 2021-06-04T06:32:27 | 2021-06-04T06:32:27 | 350,197,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | multipleInherit.py | # -*- coding: utf-8 -*-
import os
import functools
import sys
import types
class Animal(object):
pass
class Mammal(Animal):
pass
class Bird(Animal):
pass
class Dog(Mammal):
pass
class Bat(Mammal):
pass
class Parrot(Bird):
pass
class Ostrich(Bird):
pass
class Runnable(object):
def run... |
8249ac9598f2ccfbd7ebb33affb8e0fcab522e09 | f1560533c3f570d4650b08577503ed02058a09ab | /cloudcafe/compute/images_api/behaviors.py | 8f0ac068e84af58174382fc237d79beafaa7f260 | [
"Apache-2.0"
] | permissive | appliedcode/cloudcafe | 861ce489bd92802cc612ea1abbdae268e2a89cec | 3a7c4c69c3f52cfe1291319828ba4c5c66b02c1a | refs/heads/master | 2021-01-16T20:40:12.961889 | 2013-04-01T07:24:14 | 2013-04-01T07:24:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,621 | py | behaviors.py | """
Copyright 2013 Rackspace
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 required by applicable law or agreed to in writing, software
dist... |
738b9f50257f44a67c582e28c7ce0c3ea28ea449 | 369b7f114f9bd9b45dd5fef77a070cb73abb68d1 | /handle/itl/h201805/scan.py | 81b963fb44408b4fe37952f803578b1215b1dd51 | [] | no_license | lyjloveabc/thor_handle | d790ee25317f724825c94a6b346a034ec0ae6e3d | 8b9eda97ec873f3bf1732a428898a04d6a55c0af | refs/heads/master | 2021-12-27T10:15:16.668264 | 2021-08-16T13:45:34 | 2021-08-16T13:45:34 | 84,824,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | scan.py | import os
def dirlist(path, allfile):
filelist = os.listdir(path)
for filename in filelist:
filepath = os.path.join(path, filename)
if os.path.isdir(filepath):
dirlist(filepath, allfile)
else:
allfile.append(filepath)
return allfile
for row in dirlist("/Us... |
8a0fc9f20b6aad878c978ebd075478b44ca0f663 | 64cdeba20f43e0313837d63d75b7d2ef8eecb824 | /통신공학 3주차 과제 11장 연습문제 3번.py | 8493cd2498d8ea31bc6926d83c45818c593951f4 | [] | no_license | Hwangjeongyeon/hw | 824bfa59af02585a713f0fa87e7c62d727a38862 | 96da71402d4d20650ff345f8e59008788e2acbdb | refs/heads/master | 2021-05-24T17:51:10.967386 | 2020-04-07T04:28:19 | 2020-04-07T04:28:19 | 253,686,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | py | 통신공학 3주차 과제 11장 연습문제 3번.py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# 연습문제 11장 3번
# hint : 텍스트 파일이므로 open(filename,"r")과 같이 파일을 연다. 파일 안의 각 줄은
# 다음과 같이 읽을 수 있다. 각 줄 안의 문자들은 다시 for 루프를 이용하면 된다.
# for line in infile :
# for ch in line :
# ....read
# In[1]:
from tkinter import *
sentence={}
infile=open("C:\\HumptyDumpty.txt","r")
a=i... |
6ee956568e2bd9d6a215c2dea0dd3076558857c3 | 77a66acf6f6f4b312ffc45ab384a746ccfe1d9f2 | /main.py | c5b345de78a801283fe4bd0dc31e3737cd0bb908 | [] | no_license | alijkhalil/final_udacity_capstone | 25bccd5fe9a8ad26a0731abf709f0bfd669603b4 | 6d8b27e1d5d0b8f7f2e4ee24d73721c96597c6b2 | refs/heads/master | 2021-07-05T04:53:31.459291 | 2017-09-28T21:28:30 | 2017-09-28T21:38:36 | 105,119,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,085 | py | main.py | # Import statements
from __future__ import print_function
import sys
sys.setrecursionlimit(10000)
from state_of_art_cnns.densenet import densenet
from dl_utilities.trip_loss import trip_utils
from dl_utilities.snapshots import snapshot_train_utils as snap_train
from dl_utilities.snapshots import snapshot_eval_utils ... |
0e712ce7683b6e16d0028657b6b934f7096f85c3 | 1d574d465b7264433c6fe37a1f629cb02dc88d19 | /tests/test_api.py | 63c3d99e493b97b49b3d7c74ecd24cc20508a28e | [] | no_license | delijati/tchotcho | d64442a2ef262f35e90975d9b58494e6dee4922d | 900e347ed13cdbe947141705367b7dfac65cd6d8 | refs/heads/master | 2022-11-13T11:17:16.730700 | 2020-07-06T15:21:59 | 2020-07-06T15:21:59 | 273,486,744 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | test_api.py | import unittest
from moto import mock_ec2
from tchotcho import (InfoManager, KeyManager, ShellManager, SpotManager,
StackManager)
@mock_ec2
class TestApi(unittest.TestCase):
def test_import(self):
self.assertIsInstance(KeyManager(), KeyManager)
self.assertIsInstance(StackMa... |
ce56422e3415156492475b69dd3d18aed85c9a5d | 710621962a7fe4d978d0576990e2e3eb5b474472 | /KNearest.py | 30d997d9b939239d1eb218b4b3a4ef1f00e7aa25 | [] | no_license | aydin33/StockPricePredict | 848ea0314365a0d0c7f637c79af32e11534e53c3 | c06713c52a8ebc28d677ed1042c7ca546a292f9b | refs/heads/master | 2022-04-20T14:11:56.015542 | 2020-04-22T20:01:36 | 2020-04-22T20:01:36 | 258,010,450 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,478 | py | KNearest.py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import DataLoader as dl
from sklearn.linear_model import LinearRegression
from datetime import datetime
dLoad = dl.DataLoader()
df = dLoad.PrepareDataSet()
print(df)
data = df.sort_index(ascending=True, axis=0)
new_data = pd.DataFrame(index=range(... |
307a058780888618e8241d8518397861dc013e11 | 06bde0c92a9bb834e6b20eb9a4c8d236ea6af355 | /fullstack/twitter/backend/twitter/lib/python3.5/shutil.py | 2afd9161cc3b8ed12858314f26b05d4847f9ae63 | [] | no_license | chriscollins3456/projects | 5b33ec6794efffe5948e0bb6e31d8107cfea3bbb | 12d66d90e3246adca61f0558142b4162a8a4cdef | refs/heads/master | 2021-09-13T16:21:30.221364 | 2018-05-02T06:28:59 | 2018-05-02T06:28:59 | 114,692,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | shutil.py | /Users/chriscollins/.pyenv/versions/3.5.1/lib/python3.5/shutil.py |
26be308f61e2b22bbf88e1baf6a5e8afea541ea0 | 25e936b8bb0eada0ce3828809ce1dd4c7f0cd2a6 | /brick/harvest/NativePythonHarvester.py | b0397c0cb4389998ed4af70819e9ec8839240d46 | [
"MIT"
] | permissive | qazxsw1597532018/brick | f43d07400461e75ad864982d33c671365763e10a | cab44da77458d6cd22411c1d3b5f3e9775db4a0b | refs/heads/master | 2023-08-26T09:07:44.663089 | 2021-10-28T15:54:11 | 2021-10-28T15:54:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,607 | py | NativePythonHarvester.py | from io import BytesIO
import shutil
from logger import log_operation
import os
import uefi_firmware
from pathlib import Path
from .AbstractHarvester import AbstractHarvester
class NativePythonHarvester(AbstractHarvester):
SECTION_TYPE_PE_32 = 0x10
SECTION_TYPE_UI = 0x15
def iter(self, rom):
... |
ad2da4dec840d45066e942975e7bef21cba5aabb | c84f4d1b4fcf7adc6989a14231d2df37021b320a | /Lesson_RunApp/convert_pic.py | 0e15f14c0d237c0bc55dc52b309db2e4dbe419f5 | [] | no_license | VasilyMagay/Python | 6788a74a387094eede361e18d38611a59c146032 | c24bd99d76d38909afcd89e36bfb3fba8be16647 | refs/heads/master | 2021-09-04T06:26:32.269347 | 2018-01-16T17:57:53 | 2018-01-16T17:57:53 | 110,688,411 | 0 | 0 | null | 2017-11-21T05:21:29 | 2017-11-14T12:38:29 | Python | UTF-8 | Python | false | false | 778 | py | convert_pic.py | import subprocess
import os
def convert_dir(source_name, result_name):
current_dir = os.path.dirname(os.path.abspath(__file__))
source_dir = os.path.join(current_dir, source_name)
result_dir = os.path.join(current_dir, result_name)
if not os.path.exists(result_dir):
os.makedirs(re... |
f61d2681c4c1f75f21c864a03e070e9f1c0cf2b4 | 138e543a6395d18a6c4bd825178f4872683d91df | /syntribos/utils/env.py | f8f9b2d83f2487e46a04409a001efdca95454fea | [
"Apache-2.0"
] | permissive | appknox/syntribos | 964c057e401415a04f8c2adad2947895c1b70a64 | c7ca5fe384cc749c612727b6a0f638f4432bbdd6 | refs/heads/master | 2022-08-20T13:17:09.312687 | 2022-03-10T13:42:55 | 2022-03-10T13:42:55 | 87,095,698 | 0 | 1 | Apache-2.0 | 2022-08-04T10:05:14 | 2017-04-03T16:24:56 | Python | UTF-8 | Python | false | false | 12,675 | py | env.py | # Copyright 2016 Rackspace
#
# 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 required by applicable law or agreed to in writing, sof... |
cc67acd060372ebeaf26b727cdd2c7cadb4884ab | 0c1dd35715db22b39b9781c06e0ff138b6f26c2e | /mergify_engine/tests/functional/test_engine.py | a8a563be28ed1ae11faee9c3fd0b8e331242fc32 | [
"Apache-2.0"
] | permissive | At252/mergify-engine | 830233ef7ce3621dcbe0f4c7dcfed0268ee0b374 | 7310180f4c220b0a2e9d2aeaedb3d82c1a834f88 | refs/heads/main | 2023-04-28T05:58:32.522566 | 2021-05-11T17:52:45 | 2021-05-11T18:05:48 | 366,609,915 | 1 | 0 | Apache-2.0 | 2021-05-12T06:06:07 | 2021-05-12T06:06:07 | null | UTF-8 | Python | false | false | 53,726 | py | test_engine.py | # -*- encoding: utf-8 -*-
#
# Copyright © 2018–2020 Mergify SAS
#
# 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 required by appl... |
2ef246fd5d797708d6de0458e0d721df5a0f2848 | 6a85d51c2bff5333dcca65bbf7e27e547c85073d | /personality_survey_KS.py | 9c5c501d57f5de8aabe2c8c76c006471ede98121 | [] | no_license | ksalomon230/more-projects | c7a17143147353983d4df25db6fd2a061abff9ed | 850d0b8f4d46d7e078172ff77b1a18a4b24759c1 | refs/heads/master | 2021-09-09T08:31:27.243142 | 2018-03-14T12:07:04 | 2018-03-14T12:07:04 | 125,206,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | personality_survey_KS.py | print("What's your favorite sport?")
sport = input()
if sport == "soccer":
print("Wow, soccer is my favorite sport too!")
elif sport == "lacrosse":
print("cool!")
elif sport == "hockey":
print("that's great!")
else:
print("I don't play " + sport)
print("What's your favorite TV show?")
t... |
b2a2bb1403dd8b63e765d957866a70a32eee7cce | e8aba5c3760c18fd1168320f4915dc01f26351e6 | /tests/test_commandopt.py | 9a659e0dfd90385690381233afc84432d4f58bbd | [
"MIT"
] | permissive | jaegerbobomb/commandopt | d99e85f12379007eb76e0a46470b1c9f9c12db94 | 7009e545bf7c5eb9a842798d07bff1e4075ac507 | refs/heads/master | 2021-01-02T18:23:17.489903 | 2020-03-22T17:09:59 | 2020-03-22T17:09:59 | 239,741,967 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | test_commandopt.py | import pytest
from commandopt import commandopt, Command, CommandsOpts
from commandopt.exceptions import NoCommandFoundError
def test_commandopt_decorator_only_mandatory_opts():
@commandopt(["command", "--mandatory1", "<mandatory2>"])
@commandopt(["command", "--mandatory1"])
def function(*args, **kwargs)... |
d8713183ede106f3d7923324a243b97c850c576f | 433eca3a6a9323aa5e999190986555091168b157 | /testapp/app.py | 5be49d5ddb29187cc7062ce4d5a03f6c6678a9ef | [] | no_license | libert-xyz/flask-projects | 54d6f8b85d3771baf2f3fa3ed3215f8a0322d97e | afb4aa15eb0243b072dc9d83d9958f46e3ed6b9b | refs/heads/master | 2021-05-30T08:20:52.487076 | 2015-12-09T03:05:45 | 2015-12-09T03:05:45 | 44,890,112 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,050 | py | app.py | from flask import Flask, url_for, render_template , request , session , redirect
app= Flask(__name__)
@app.route('/')
def welcome():
if 'username' in session:
return render_template('welcome.html',user=session['username'])
else:
return redirect(url_for('login'))
@app.route('/login', me... |
b600e86ee45b7deac847b6c1a94c957d618b6b0a | f621926352a3dac1f8a3597206ff7412bb937531 | /SW expert/스도쿠 검증.py | d799cb1e17096f0bb3c937cfd8ffa714cd05f058 | [] | no_license | leeseungkyung/algo | 3953982d867f7d17700bbba0820565f3439c565c | 722c4ce34282d106b2a8727460daea6c5775ab50 | refs/heads/master | 2021-02-10T15:06:17.689414 | 2020-06-04T07:35:47 | 2020-06-04T07:35:47 | 244,392,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,150 | py | 스도쿠 검증.py | T = int(input())
# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.
for test_case in range(1, T + 1):
arr = [list(map(int, input().split())) for _ in range(9)]
def f():
for i in range(0, 9,3):
for j in range(0, 9, 3):
check = []
for k in range(i,i+3):
... |
d3ad6ac17272a9fb75011166545238bd2c82c879 | 7a762f550fbd1f46c3a334183c1462858429aa06 | /decisionmaking/forloop.py | 43e1d15c889a88b28394bc427572ffa28d36865e | [] | no_license | silpaps/mypython | 6e5a58a1770b395e5258c986c7512587f859c4bb | 8de9c3d4a2658525c16ef2ac90b4632a2b78988e | refs/heads/master | 2023-09-01T05:17:01.834153 | 2021-09-16T05:18:24 | 2021-09-16T05:18:24 | 402,320,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | forloop.py | #for (variable) in range(number)
# block content
# for i in range(2,8):
# print(i)
#for i in range(2,10,2):
# print(i)
#min=int(input("enter minimum range "))
#max=int(input("enter maxmum range "))
#for i in range(min,max+1):
# print(i)
#........Multiplication table..........
no=int(input("give the number"))... |
0ea05d5c501916c9c01b112fcad882e9b2778fa4 | a8bb2b913e92bc61b523331001cd10710fbe631f | /Integracion/SensorTarjeta/lib/automata.py | 93d798ad281c7048eb458084d6455583e9e9a449 | [] | no_license | MatiasDurbano/Molinete | 19b555a0dfa6f9ed4be9b83139b3c5e0632a15d4 | 21dc2cc901a719e9c9c61d6f69dada2fc99d3087 | refs/heads/master | 2020-05-15T19:05:35.749936 | 2019-08-27T04:08:11 | 2019-08-27T04:08:11 | 182,446,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | automata.py | def accepts(transitions, initial, accept, stream):
state = initial
for symbol in stream:
try:
state = transitions[state][symbol]
except KeyError:
return False #Esto me parece una chanchada
return state in accept
def accepts_left(stream):
dfa_left = {
's0... |
ccecab503ec45cb0f8178c60793f77a739982c70 | 56ed0f463409384a162c7ef47f6ca464f8902213 | /demos/ec504viewer.py | 9e7fd1c00ec2796b5a6b5adc31bcbe6f72e54b59 | [] | no_license | Marlon666/EC504-video-encoder | 5939dad18a20a010290a553e0c6b1c41c2af3609 | db674fcba4645395a80cc05a3323c8a2227301cc | refs/heads/master | 2020-03-07T19:40:25.144656 | 2017-05-06T16:18:59 | 2017-05-06T16:18:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 843 | py | ec504viewer.py | import matplotlib.pyplot as plt
import matplotlib as mpl
import time
import numpy as np
mpl.rcParams['toolbar'] = 'None'
def view_sequence(images, delay):
"""
:param images: list (or other iterable) containing sequence of images to show
:param delay: time (seconds) to show each image
:return: none
... |
428f31f2fe54371507da351ae208b71cecb84e51 | 189b536dcb6d59eac20e547933aa41c611bc61a8 | /services/VisualSimilarity/Adapter.py | 55f008f8e1426b854916c98d1fcb9dba8c462c1d | [] | no_license | yocoa/sdd | 2682f25b40494fd62a9d1340a65b97b8ad0156ed | ef563193a5aed01989df92659208f172cbbda665 | refs/heads/master | 2021-06-01T09:09:22.239557 | 2016-04-23T08:59:16 | 2016-04-23T08:59:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | Adapter.py | #!/usr/env/bin python
# encoding: utf-8
from lib.MinVisualDistance import MinVisualDistance
def run(domain):
result = MinVisualDistance.calc(domain)
return result
def run_test(domain):
return 'google.com', 0.7150659255665122, 'W'
|