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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73e9654bb25f7c6dacf33495d1b6bd30cb525f8c | 53888075a5fae164872e82f841751f291cba6c4a | /1029/whileex/whileTest04.py | 657e9b97c4f5c26520acfd10d04ae9429b5b2f45 | [] | no_license | leesohyeon/Python_ac | e27e9bf394dbf41c0815120d9e6601bc7e45c6b6 | 1f71f6a21c958b7d82d0fb8019c385100b4370c8 | refs/heads/master | 2020-05-02T04:59:46.384439 | 2019-03-26T10:09:57 | 2019-03-26T10:09:57 | 177,758,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | whileTest04.py | while True:
num=int(input("종료하고 싶을때 , 5를 입력하세요 :"))
if num==5:
print("프로그램을 종료합니다")
break #반복문 종료
else:
print("5번을 누를때까지 반복할꺼야~") |
a6ac4f450a6621048dfa24f4d26b6fda4c256193 | a80af7d0dedfc94736e147e0827299db9fe24c65 | /Buttons2.py | cd14d64c504303ed652d2561668340cceb916c9a | [] | no_license | Saksham726019/Tkinter | 80df6714c70abd891959402cfd6ad16b80d11e15 | b028b7444d80887f27b4a88b7c53153ff4feca72 | refs/heads/main | 2023-08-15T15:00:11.589317 | 2021-10-01T17:26:26 | 2021-10-01T17:26:26 | 412,558,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | Buttons2.py | from tkinter import *
root = Tk()
root.title("Motivation")
def myclick():
my_label = Label(root, text="Keep on going....Whatever it takes !", fg='white', bg='black')# fg is used to change the color of the text and bg for background.
my_label.pack() # LOL dark theme �... |
00e3eb955bff38279f98406d9d01fab4843b2cab | 4e0af644060ba56a303b1b7195a134ed75ac053b | /vagrant/catalog/fake_data.py | a361e3c4756a2e410c21c7775f8814505f1f6ea8 | [] | no_license | LeiG/fullstack-nanodegree-vm | e231ba9ca27e5d56b1a980e346efb1a59754096c | 906f3aeaf2f6b8e884a5b3f590aec429b6ab4124 | refs/heads/master | 2021-01-23T01:25:58.405831 | 2017-04-05T03:47:36 | 2017-04-05T03:47:36 | 85,906,420 | 0 | 0 | null | 2017-03-23T04:15:59 | 2017-03-23T04:15:59 | null | UTF-8 | Python | false | false | 1,323 | py | fake_data.py | # -*- coding: utf-8 -*-
topic = {'id': '1', 'name': 'programming', 'created_date': '2017-01-01'}
topics = [
{'id': '1', 'name': 'programming', 'created_date': '2017-01-01'},
{'id': '2', 'name': 'reading', 'created_date': '2017-02-01'},
{'id': '3', 'name': 'workout', 'created_date': '2017-03-01'},
]
card ... |
1270546b1605954d48f5de53d3e5cd2fffb46b54 | 9e6957f1cbb8adfd81a3590e022b4b9cc1990de2 | /fireteam_manager/forms.py | 5ea19a25ff456779595ff79f717917f99698aac5 | [] | no_license | Threase/Fireteam-RPG-Manager | bf5bee5205239cb82ef72cc14ba67e1480e3c6b9 | 0d9413cb3a2fef5404edbd61224c4aa6c0a67dfa | refs/heads/master | 2023-06-15T10:02:03.087525 | 2021-07-15T05:11:29 | 2021-07-15T05:11:29 | 385,913,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,681 | py | forms.py | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed
from flask_login import current_user
from wtforms import StringField, PasswordField, SubmitField, BooleanField, TextAreaField
from wtforms.validators import DataRequired, Length, Email, EqualTo, ValidationError, AnyOf
from fireteam_manage... |
707c1fecd468f9f500ee9266ca34674857e27661 | faa659c7baffc6f2471a8a74ace65358b2f8ae5d | /Final 2.py | f33b422c9030d0ac75dba0325b022463a922d92c | [] | no_license | TheSiege9/PythonHomework | 4be93dd8b09b5924849584ff41b05dd3711925a7 | bd4256948cbd11639a50bac4870cbae84c5b4b97 | refs/heads/master | 2021-01-12T12:13:49.043360 | 2016-10-30T21:22:45 | 2016-10-30T21:22:45 | 72,376,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,509 | py | Final 2.py | def main():
shirtNumber = int(input("Please enter how many shirts you would like:"))
if shirtNumber < 0:
print("Please enter a non-negative integer")
elif shirtNumber < 5:
print("The cost of each shirt is $12 and the total cost is: $", shirtNumber * 12)
elif shirtNumber >= 5 and shirt... |
9a30ab384e24e8176b920b64401b35e0b0461594 | 7745ccbe2bb3cf57376834ed6c34a671dabe514c | /python/resistor-colors/resistor_colors.py | 4c04f8e02502e8f1ca7eb7ece0cd2cd5aa208780 | [] | no_license | Merrouni/Exercism | cb9b666fc01d470caa53c6a17c63c73d365d52a5 | b1401532cf2b5e1ff5f89e1aad3be6e0460e26fa | refs/heads/master | 2020-05-18T23:47:00.059689 | 2019-05-03T08:10:47 | 2019-05-03T08:10:47 | 184,720,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | resistor_colors.py | colordict = [
'black',
'brown',
'red',
'orange',
'yellow',
'green',
'blue',
'violet',
'grey',
'white'
]
def color_code(color):
return colordict.index(color)
def colors():
return colo... |
7f620d338a0278f965338286ef0774de6052a26c | 9f31d7dbf42f6bca6b57bfed1bbadb9020903e27 | /python_dir/fundamentals/functions_intermediate_1.py | 2f5ec9e5202ed2a24bf50fed2c5c0d1850616ad3 | [] | no_license | capt-alien/CDJ_Python | 6472868a44fab2f0175603396a09b0e8daf50bf9 | c7b2c6652c50c9ff8479c38284645f9a621c42d4 | refs/heads/master | 2023-04-27T12:05:45.485934 | 2019-09-20T20:06:08 | 2019-09-20T20:06:08 | 206,137,966 | 1 | 0 | null | 2023-04-21T20:36:17 | 2019-09-03T17:47:46 | Python | UTF-8 | Python | false | false | 187 | py | functions_intermediate_1.py | #!python3
from random import randint as randint
def rand_int(min=0, max=100):
return randint(min, max)
def main():
print(rand_int())
if __name__ == '__main__':
main()
|
79f0566e88720fd0b90a7f50c820df040a28058d | a2c14fc52c527a77ab35742daeed16b4c594b768 | /pyntc/devices/asa_device.py | 9384c7cad8236e3fb6127bf087c5cb79b7a488e3 | [] | no_license | hemantrashimalalu/pyntc | 09ed0558ac63d2332e0c566512cf59d19f9e5b0f | 79d1a08c6b022898f918f277821b46eafa486178 | refs/heads/master | 2020-03-28T22:28:47.240403 | 2018-09-06T20:00:34 | 2018-09-06T20:00:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,480 | py | asa_device.py | """Module for using a Cisco ASA device over SSH.
"""
import re
from netmiko import ConnectHandler
from pyntc.errors import NTCError
from pyntc.templates import get_structured_data
from .base_device import fix_docs
from .ios_device import IOSDevice
ASA_SSH_DEVICE_TYPE = 'cisco_asa_ssh'
class RebootSignal(NTCError)... |
be032cc691b1e89863026629b5dbcfed596f25a4 | a5844cb732f772e42d18cdebcd1b29ab12292393 | /DemandModel/3_tod.py | fc5608ce1fec0daaa3b3c424edc50eec5d1008e7 | [] | no_license | JoeJimFlood/ShoresideTDM | 1f23d1ccc2df8f061ebfcfe4cf97a8057fbfc29e | 2de39ef6e584037284990662c0a939ff4cf92fae | refs/heads/master | 2021-07-09T02:41:41.900228 | 2017-10-05T22:18:54 | 2017-10-05T22:18:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,595 | py | 3_tod.py | import time
time_start = time.time()
import os
import numpy as np
import pandas as pd
import sys
from scipy.stats.distributions import vonmises as vm
from math import pi
BASE_PATH = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
TIME_LOG = os.path.join(BASE_PATH, 'TimeLog.txt')
OUTPUT_PATH = os.path.j... |
7dba6c4e79a0b617703ae50795b28feb07943db5 | ee2b8f158a60996f849233a6005a3e147c1c66a0 | /Module_2_min_3_min/merge_sort5.py | d743bd0488091304c3021cbbbeef0ad15c2568d2 | [] | no_license | Kateryna252/Start_dragon | 4b63283766d9466065e539b80a9f394b6e597632 | f401bfbf0fa690e82304416f40b9704588c287be | refs/heads/master | 2020-04-01T01:26:50.085335 | 2019-01-22T06:03:37 | 2019-01-22T06:03:37 | 152,739,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | merge_sort5.py | import random
list2 = []
n = int(input("Enter number of length of list:\n"))
for i in range(0,n):
list2.append(random.randint(0,n))
def QuickSort(a):
w = [x for x in range(4 + int(len(a) / 2))]
k = 0
w[0] = 0
w[1] = len(a) - 1
while (k >= 0):
i = QuickSortPos(a, w[k], w[k + 1])
i... |
11fdd01e281daa547322cc494849ef255699cbfd | a9fe1b5c320cdef138ac4a942a8b741c7f27de7c | /LC1662-Check-If-Two-String-Arrays-are-Equivalent.py | 3a8c182e2ed8e6a4e9b5cc2891b95a2ed3b3fd40 | [] | no_license | kate-melnykova/LeetCode-solutions | a6bbb5845310ce082770bcb92ef6f6877962a8ee | ee8237b66975fb5584a3d68b311e762c0462c8aa | refs/heads/master | 2023-06-28T06:35:33.342025 | 2021-07-30T06:59:31 | 2021-07-30T06:59:31 | 325,106,033 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,478 | py | LC1662-Check-If-Two-String-Arrays-are-Equivalent.py | """"
Given two string arrays word1 and word2, return true if the two arrays represent
the same string, and false otherwise.
A string is represented by an array if the array elements concatenated in order
forms the string.
"""
from typing import List
class Solution:
def arrayStringsAreEqualDirect(self, word1: Li... |
b48807f7486d8a4b9b80f19dfc68979cdcea3c50 | 678ed50fae36edd8aae7e9221fd31513322abdf4 | /RomanCoversion.py | fe0dfd67494a1a219c5f6f8cec460b046d3fb5b7 | [] | no_license | nora-hech/Exercise-2-Algorithmic-Test | 99c06702598f6610567cd9bc2d4d39a943782a0c | 91854b5454610983cd423573e3d9275d728c5fb3 | refs/heads/master | 2020-04-04T14:33:46.579270 | 2018-11-17T16:06:10 | 2018-11-17T16:06:10 | 156,002,858 | 0 | 0 | null | 2018-11-17T16:06:11 | 2018-11-03T16:41:24 | Python | UTF-8 | Python | false | false | 1,445 | py | RomanCoversion.py | # Convert an integer in a Roman numeral
def Romandigit(n):
# initialization
numeral = ""
no = n
# Convert thoussands
r = n % 1000
q = n//1000
for i in range(q):
numeral += "M"
# Convert hundreds
n = r
q = n//100
r = n % 100
if q < 4:
for i in range(q):... |
5f0fed8a5100edebf4d137e41d28a68525771b79 | a3883072019e501955a9fc91683ecfc80760dc8d | /anaconda-updates/6/installclasses/silvereye/__init__.py | 07ff3d4942552ae175b307624b2621a15a429b70 | [] | no_license | Cloudxtreme/silvereye | 6502aebeeb8252b8098d0bcbcd9dd7c57349f6c2 | 83ff1e4d497af0906f13a246acd078a8a7a5a3c5 | refs/heads/master | 2021-05-27T05:56:58.156644 | 2014-10-21T20:12:15 | 2014-10-21T20:12:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,795 | py | __init__.py | #
# silverye.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it wi... |
53b0467a0952d7d746eb5a7ce3c5ba1aef81003a | 3520f2cf99ffdfaa403b02c91407b4d2cea0ab70 | /Stochastic Experiments/TossHead.py | 96270e7e5aa8b61c35640c5e49401a8a7b8159f6 | [
"MIT"
] | permissive | ajaykc7/PythonProjects | 0df8daeb088b4b784464d06795ec77161ccbe8e5 | 01c5be78ffb0af9bda56e7b892a559a9453c1492 | refs/heads/master | 2020-03-20T16:36:07.378312 | 2018-06-16T01:25:35 | 2018-06-16T01:25:35 | 137,542,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | TossHead.py | """
Ajay Kc
013213328
EE 381
Project 1 Part 2
The program checks the number of times it takes to get 50 heads when 100 coins are tossed
"""
import numpy as np
def toss_Coin():
coin_List = np.random.randint(0,2,100)
count_Head = sum(coin_List)
if(count_Head==50):
return "Success"
else:
... |
8effeb11402949e33fa5fb6e27ca572a30c572c0 | ba159e252ed9079badd7872f4448da2490a4f218 | /migrations/versions/cf59a824b23c_.py | bbaeeb07496a3a8139d79dcbd894594e2f72e4e1 | [] | no_license | alessamohammed/smart_methods_control_panel | acbe65d73d6e7993daa7920641fb0fbb79c2e02c | b00386c5c84b3dd2c0728b021a41e3c0672b9b75 | refs/heads/master | 2023-06-23T17:58:53.367036 | 2021-07-31T03:17:18 | 2021-07-31T03:17:18 | 382,328,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | cf59a824b23c_.py | """empty message
Revision ID: cf59a824b23c
Revises:
Create Date: 2021-06-29 10:50:43.197423
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cf59a824b23c'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... |
aad25bf8925aa01847c091db02da281f2b454131 | c16a58286b74c3a3c40edab0d72d2c200c4dd3c6 | /zelle 6.9.1 old macdonald.py | c3011cc5dc8e34c39632acada2c6207e3f812ecd | [] | no_license | pran0809/Zelle-Python-Programming | e4dc28e5ac12d2d7110baa09959e66ceb2d72487 | 4bc080e9529b255de638b46ed6946de74ae9a031 | refs/heads/master | 2020-03-23T16:24:38.221506 | 2017-10-16T02:53:10 | 2017-10-16T02:53:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | zelle 6.9.1 old macdonald.py | # zelle 6.9.1 print old macdonald lyrics
def animal(name, sound):
print('Old MacDonald had a farm, Ee-igh, Ee-igh, Oh!')
print('And on that farm he had a ' + name + ', Ee-igh, Eei-gh, Oh!')
print('With a ' + sound + ', ' + sound + ' here and a ' +
sound + ', ' + sound + ' there.')
print('... |
51b571b111cff4ce28b8b640099d3a257e7e2ba3 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/M/mulbran/jdcdc_stream_c_python_2.py | 9d6cde33da6d9ddc0207dd749c6614eb8d041a39 | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,054 | py | jdcdc_stream_c_python_2.py |
from urllib2 import urlopen
from lxml.html import fromstring, tostring
print 'Hello world'
page = urlopen('http://www.dol.gov/olms/regs/compliance/cba/Cba_CaCn.htm')
rawtext = page.read()
html = fromstring(rawtext)
tds = html.cssselect('td')
#print tostring(tds[44])
tables = html.cssselect('table')
table =... |
2a3d3901fafac2df524580bf1b053b02faec4ebf | bd60c2733acc38720be0ee82d8491f13ecbfce01 | /object/多态/QianFeng026object.py | 95f403324d8978246b6cc64ed6b5ac2228bfdea6 | [] | no_license | Luciano0000/Pyhon- | 61e89b8725f3b40b4d3f88c8bfde173f03cc34ed | 4ec5196a510b27e3a6ed26e107e98913ac2988f0 | refs/heads/master | 2022-11-13T21:14:36.957132 | 2020-07-01T10:19:09 | 2020-07-01T10:19:09 | 276,344,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,321 | py | QianFeng026object.py | # 多态 封装 继承 ---->面向对象
# 多态 python不是严格意义上的多态,需要借助isinstance(obj,类)来判断
class Person:
def __init__(self, name):
self.name = name
def feed_pet(self, pet): # pet既可接收cat也可以接收dog还可以接收tiger
# isinstance(obj,类) --> 验证obj是否是这个类的子类的对象或者是否是这个类的对象
if isinstance(pet, Pet): # 判断pet是不是Pet类
... |
c45036ecd36907936666d78c5df719b8ae1b9dbc | 457776337d8dcaa75df1c48869e9be1ab58be253 | /py2/pachong/2017_07_19d.py | 7df4c139100218345fafda749359b8e2139aa948 | [] | no_license | tiankangbo/dashboard | c63d0df6e2eb60a6e17e4d7fde19e8e12a7958a9 | 8f6c6f806f3f8a8fe4ab8937d5c5a00986522c40 | refs/heads/master | 2021-07-14T20:18:18.843903 | 2017-10-22T06:16:15 | 2017-10-22T06:16:15 | 103,809,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | 2017_07_19d.py | #!/usr/bin/env python
# encoding: utf-8
"""
author : tiankangbo
data : 2017-07-19
"""
from gevent import monkey; monkey.patch_all()
import gevent
import urllib2
def run_task(url):
print 'visit -->%s ' % url
try:
response = urllib2.urlopen(url)
data = response.read()
print '%d bytes r... |
3c8e17604af6a90cd569c892f36d9a473aa158fa | 19cfd9496d7f9c419d840bc308eb513587852495 | /read_data.py | 09af271ad95846de9abf401b96f7ab86da0d78a9 | [] | no_license | tomushub/mater | 8fef9e6cc1c381e5e2378dc963d332ef64236685 | 96d46e337fe080fc816c659970249a1aca34466d | refs/heads/master | 2020-03-27T14:47:10.231511 | 2018-11-12T02:40:09 | 2018-11-12T02:40:09 | 146,678,841 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 441 | py | read_data.py | #!/usr/bin/env python
# coding: UTF-8
import sys
from ftplib import FTP
def read_data(airport):
ftp = FTP("tgftp.nws.noaa.gov")
ftp.login()
with open("./stations/" + airport + ".TXT","w" ) as f:
ftp.retrlines("RETR /data/observations/metar/stations/" + airport + ".TXT", f.write)
with open("./decoded/" + airport ... |
902159d9ad3a1e36b69142518007b5d4bcaef0f3 | 86c41f077ac84ade92d4f473fe9fc17006b6237c | /geo.py | 614b4c7611abc7139d570cac42733c7b74ab3909 | [] | no_license | jiefeixia/Pointer | 56d9aab47875abe83d2f433178e9869377e3415e | f954430e598c721a1377f5ff1fc8a4083c4f1276 | refs/heads/master | 2020-04-08T14:39:51.047333 | 2018-12-08T22:32:14 | 2018-12-08T22:32:14 | 159,446,440 | 2 | 0 | null | 2019-11-12T14:12:36 | 2018-11-28T05:03:12 | Python | UTF-8 | Python | false | false | 1,153 | py | geo.py | from arcgis.geocoding import geocode
from arcgis.gis import GIS
import pandas as pd
import Point_v1
"""
This module is used to get the location information of different companies from arcgis API.
"""
def crawl(file):
gis = GIS()
map = gis.map("United States")
map
# read all kinds of job files
jo... |
bad13218a7a9e687fbd29099ca80771296789d36 | 85aca222b787bf8acf64853861a121b50372b8c0 | /cover_letter_developer.py | d161843cb97bca27cae8528a5850761ec2189bfa | [] | no_license | therealmartytheparty/cover_letter_developer | beaca6653ee8ba2d5b08f96c594c06f996023818 | 801c112bf8897ff8543bd9a0e5afaa728f1b4deb | refs/heads/master | 2020-12-30T01:19:07.478599 | 2020-02-07T00:16:36 | 2020-02-07T00:16:36 | 238,811,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,897 | py | cover_letter_developer.py | import sys
from PySide2.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton,QVBoxLayout, QLabel, QWidget
from docx import Document
from docx.shared import Inches
class Form(QDialog):
def __init__(self, parent=None):
super(Form, self).__init__(parent)
#set the size
#Creat widgets... |
029f4f015f558dbd4d6096b00c53f5f0fe69883d | 66c208e27da159f2d33d157c175d701f10ded0c2 | /curriculos/core/api/serializers.py | c4664d0f7263e3519600bfb01dfb08c2eedef69b | [] | no_license | ricardosmbr/reflow_challenge | 1d41d848fa4862ce92ca6bcda49fe630c131e481 | 724b61c01cf5069f389624afd4b10a3228d1d08a | refs/heads/master | 2020-06-24T02:38:20.450994 | 2019-08-15T14:27:36 | 2019-08-15T14:27:36 | 198,823,437 | 0 | 0 | null | 2019-07-25T12:02:39 | 2019-07-25T12:02:39 | null | UTF-8 | Python | false | false | 249 | py | serializers.py | from rest_framework import serializers
from core.models import Curriculo
class CurriculoSerializer(serializers.ModelSerializer):
class Meta:
model = Curriculo
fields = ('id','name', 'description','image','create_at','update_at') |
8e1eef3c5a9ca3ea504bbc269b48446527637626 | eb7c65ff0a9d80a9c2508aa0d9608aa1d0727971 | /varlet/search_indexes.py | 431488b9bab58345d993788653d5910f40d792a8 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | kezabelle/django-varlet | 1e2fb95d84c9b9356f172adec4d7fc4dead9765b | a551784bbf44442985e04c0dc6aa8a54e49ebfd3 | refs/heads/master | 2021-01-16T18:20:54.912495 | 2017-09-13T10:50:30 | 2017-09-13T10:50:30 | 19,026,180 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 887 | py | search_indexes.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import swapper
from haystack.constants import Indexable
from haystack.fields import CharField, DateTimeField
from haystack.indexes import SearchIndex
class BasePageIndex(SearchIndex):
text = CharField(document=True, use_template=True... |
11ed7550c25ca9944ce7073d9655cb9af7bdeae9 | 05c1ec0f2367cefe70432b5502a81c1c0b5978fc | /modeling/lab5/Modeller.py | 10c6708bc5a4e34bb01ef09b8c5519d0ccffcce3 | [] | no_license | ansushina/sem7 | 463fb0d1934768ef78807cd69709ef1ab2e37f79 | 9091e2e10ed198d8a2f036a3f91d94f37aa0a099 | refs/heads/master | 2023-05-28T03:39:45.761233 | 2021-06-08T18:57:59 | 2021-06-08T18:57:59 | 292,596,540 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,632 | py | Modeller.py |
from Distributions import UniformDistribution
from EventGenerator import Generator
from Processor import Processor
class Modeller:
def __init__(self, generator, operators, computers):
self._generator = generator
self._operators = operators
self._computers = computers
def event_mode... |
d9a871fb6c889bcff455732007718af734859c72 | 27cd74d8446e3501f20191e45c90178498bcb299 | /sandbox/ACPF/ACPF_JAMES/Peaslee/ACPF_Soils_Toolbox_Peaslee20170407/ACPF_ExportMuRaster.py | 8f4c7fea9ea6be362795e501513ba436d0978d63 | [] | no_license | jneme910/NRCS-Soil-Data-Access | 26288fc1ca9613c14a86840bf7dd35d88b9d4494 | 9978660a017bf3b7ef13e32ebb935f0e24819658 | refs/heads/master | 2023-07-19T07:06:59.322425 | 2023-07-06T15:42:52 | 2023-07-06T15:42:52 | 56,164,763 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,896 | py | ACPF_ExportMuRaster.py | # SSURGO_ExportMuRaster.py
#
# Convert MUPOLYGON featureclass to raster for the specified SSURGO geodatabase.
# By default any small NoData areas (< 5000 sq meters) will be filled using
# the Majority value.
#
# Input mupolygon featureclass must have a projected coordinate system or it will skip.
# Input databas... |
1b58d294f02ce85bf19da03f94100af87408081d | 74214610bc54abd351318a6ea81350415efce9b0 | /download.py | 897913c645dc2e068d562d8a01ca4353d086dcfc | [] | no_license | haiya512/stockholm | 9aa4a1cedbe526034592b48cf241655e131b05ae | 6be507e3bfa5eee48f07b3162773501f96a802f6 | refs/heads/master | 2021-01-11T01:10:25.368481 | 2013-04-09T19:44:49 | 2013-04-09T19:46:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,796 | py | download.py | import stockquote
import time
import datetime
from datetime import date
from connection import db
start_date='20100101'
def prices(symbol):
"""
Loads the prices from the start date for the given symbol
Only new quotes are downloaded.
"""
to = date.today().strftime("%Y%m%d")
c = db.cursor()
c.execute("SEL... |
5d0a45b93bd7972333f5574188c65484c065e9cf | f91f1070c9786c99392424885c5df866e84b909d | /gameandgrade/testUnitTestParser.py | cff89650a1ebb535cfa43afa95351e113e6d06c3 | [] | no_license | eshim/game-grade | e0609dc61b9caa390feed8ff3b1bfb7032f53955 | cf477e30c55d5ba2ab299bface93afe551d1e598 | refs/heads/master | 2020-12-25T19:04:02.224450 | 2013-07-26T20:18:34 | 2013-07-26T20:18:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | testUnitTestParser.py | '''
Created on June 10 2013
@author: Eugene Shim
This unit test suite is designed to test the unitTestParser module.
At the moment, the functions of that module are too simple to really
unit test effectively
'''
#Standard library modules
import unittest
#the module being tested
import unitTest... |
95ea811d38c314f5f19294500e16bae3d00d4fff | 61f1002163e93c14b6af44e23a57fcd1a0a1e2ea | /python/show_specific_bits.py | 4027f130fb0afe908158fb503b91c6b592684e0e | [] | no_license | BiggieBoo18/bpcs-steganography | a4e14e046fe03d53b150b119de6bacfa52598314 | 6eeff98c95f944044d6405b168f37861c10a6c92 | refs/heads/master | 2020-04-04T13:07:53.213215 | 2019-01-18T01:20:45 | 2019-01-18T01:20:45 | 155,950,027 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | show_specific_bits.py | import sys
import numpy as np
import bpcs as bp
from PIL import Image
if len(sys.argv)<4:
print("USAGE: {0} <PATH> <COLOR> <BIT>".format(sys.argv[0]))
print(" PATH: image path")
print(" COLOR: GRAY=-1, RED=0, GREEN=1, BLUE=2")
print(" BIT : 0~7 (0:MSB, 7:LSB)")
exit(1)
PATH = sys... |
60411e922bfec8f98028f959a370f954eef5437e | a1f2b5290ae1c44e4fb04be6dc827c9f3f424b8b | /iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/functions/aggregate/mining.py | 03407c4e95db2657d7d3ab23b54915644806bca4 | [
"Zlib",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | openaire/iis | c45cd3cf98114605453ba3f42bb3c63d3da6e033 | e807df7bd5f0c5127f9c295243558e9b33884e63 | refs/heads/master | 2023-08-18T14:54:35.485327 | 2023-07-21T15:21:05 | 2023-08-08T15:02:21 | 42,290,369 | 23 | 81 | Apache-2.0 | 2023-09-07T12:44:24 | 2015-09-11T05:55:08 | Java | UTF-8 | Python | false | false | 13,419 | py | mining.py | import re
import itertools
import setpath
import functions
import lib.jopts as jopts
from operator import itemgetter
import random
__docformat__ = 'reStructuredText en'
re_params=re.compile('(\w*):(.*)')
def consumer(func):
"""A decorator, advances func to its first yield point when called.
"""
from fun... |
af57bfb1d44642b2b6fda1ac6be049f205d50619 | 30504971d37a06f59cacd502741f3e0f2a742add | /Python Core/grafico.py | 73ba6f16f0dd741e8acf18d70fe41cba2dde0b6e | [
"MIT"
] | permissive | Val-Assistant/Val-Core | ce732f82e308adc87bcbfe6cc4a35523c3d3ee71 | 01e0471c39638ad421f2116dcbdc142c79d4846d | refs/heads/master | 2023-01-13T19:50:55.860172 | 2020-11-17T13:16:43 | 2020-11-17T13:16:43 | 285,360,361 | 8 | 4 | MIT | 2020-09-04T13:44:29 | 2020-08-05T17:32:09 | Python | UTF-8 | Python | false | false | 693 | py | grafico.py | import matplotlib.pyplot as plt
import audio
w = open('quantas_vezes.txt', 'a')
notas = []
r = open('quantas_vezes.txt', 'r')
for line in r:
notas.append(line)
yum = open('y.txt', mode='r')
ydo = open('y.txt', mode='a')
y = []
for linha in yum:
y.append(int(linha))
x = notas
def grafico():
... |
e3f2a1b5f68e6e58aad64569225b18f200ef1e21 | 05c88e0bf1b4b0a2edeb8aff8968c1cb165ab24e | /booking/migrations/0004_auto_20170706_2155.py | ef8df29fe2db466f1c3c746b948dcaa46a2f652b | [] | no_license | meetingRoomSystems/MeetingRoomWebsite | 27be072da142745c5285a75abf82cce6024077e1 | e83b10c7cda179f6b5253b00912147675d8a935e | refs/heads/master | 2022-12-16T11:06:10.935501 | 2017-07-21T08:18:02 | 2017-07-21T08:18:02 | 96,515,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 624 | py | 0004_auto_20170706_2155.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-07-06 18:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('booking', '0003_auto_20170706_2153'),
]
operations = [
migrations.AddField(... |
c1b58d3ef736a80ebec7b543a4c15f3ec1f9708b | 7dde8cddefbc964d04e6e708837f4974c2936015 | /MyContructLDA/main_app/urls.py | ef737947f8182d7d0de665247e25df296ada3faa | [] | no_license | oseguro/MyContructLDA | 38428cdc90db9aad64343c38f67451ffb7f201fd | 4f1ec81a77e3f5e7f2b5a6c1b1228cb7fdc334cc | refs/heads/master | 2021-01-24T13:14:53.443434 | 2018-04-13T16:14:45 | 2018-04-13T16:14:45 | 122,997,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,782 | py | urls.py | from django.conf.urls import url
from django.conf import settings
from django.views.static import serve
from . import views
from django_filters.views import FilterView
from .filters import *
from .models import *
urlpatterns = [
url(r'^$', views.home, name = 'home'),
url(r'^user/(\w+)/$', views.profile, name=... |
98ba12f5372aab53ad5e15d74d02f6837ad8859f | 9719a9184849f46fe084a5ecd8059c228649c835 | /Python Dice App.py | 0507fd13846d9faa9c2d10ad955a79233aa5cd47 | [] | no_license | worobeykin/PythonLessons | ad8a3fe204b382b4501b408b1fd44abce03a9b1b | e3e66bb2757c85c2ccb705547f22cef12866edca | refs/heads/master | 2021-01-05T17:05:52.794348 | 2020-03-03T18:08:54 | 2020-03-03T18:08:54 | 241,085,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | Python Dice App.py | #Python Dice App
import random
def simulate_dice(side=1, dice=1):
"""Simulate values in our dise plaing"""
print("\n-----Results are as followed-----\t")
amount = 1
sum_value = 0
while amount <= dice:
side_i = random.randint(1, side)
amount +=1
sum_value += side_i
... |
796993764ae079ae118cde38aa05e643ac53fce4 | 5391638d38a17280fa4abe5187bf8d417740a795 | /leetcode/rotaed_digits.py | a57fdd25b726280be5eaeb477bbf1a7c749d30d9 | [] | no_license | SiluPanda/competitive-programming | 39ce18ef48b13e381536c53a6769faa0edac3502 | 6e92ccb165381f1ee0b2cf42ea997ab44e6fc8eb | refs/heads/master | 2020-06-12T22:35:13.688327 | 2020-04-22T09:40:01 | 2020-04-22T09:40:01 | 178,658,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | rotaed_digits.py | def rotated(N):
notgood = [3, 4, 7]
good = [2, 5, 6, 9]
ret = 0
for i in range(1, N+1):
num = i
isgood = 0
while num > 0:
digit = num%10
if digit in notgood:
isgood = 0
break
if digit in good:
is... |
412c03d41d34f332719009c031f82d19ab79276c | 22ff39e9bf8e04fd3384fa626fb9d9424c87c65f | /some_stuff/mail_tools.py | a8abafe3ef9ffac798c5ccfb771dc4b7ff508863 | [] | no_license | panzercheg/learning | 3c454dd41cf7652defdd584fe64ca32815ba169a | 5e0c84b5b22b5cf4254f6d502089749e6df6e855 | refs/heads/master | 2022-02-17T02:34:23.789227 | 2019-07-25T07:34:34 | 2019-07-25T07:34:34 | 109,257,578 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,220 | py | mail_tools.py | import argparse
import sys
import os
import smtplib
sys.path.append(os.getcwd())
from some_stuff.agent_config import AgentConfig
from email.mime.text import MIMEText
class MailTools():
def __init__(self, message='', fr='', to='', subject='', server='smtp.server:Port', tls=True):
self.msg = message
... |
09487cb6cca02a282f4a101496ed6fa2b0fcf196 | 485cf3c70fcaa68689a2b690b6465f1d6bcf21bd | /Mysql5.7.27/python3_mysql/executemany.py | 65f0cf9d38268803f42c23054109bcbc4e08ae08 | [] | no_license | lxz0503/study_20190608 | 5ffe08c4704bb00ad8d1980baf16b8f5e7135ff4 | 47c37798140883b8d6dc21ec5da5bc7a20988ce9 | refs/heads/master | 2022-12-23T17:23:45.039015 | 2021-06-23T14:50:19 | 2021-06-23T14:50:19 | 190,884,812 | 1 | 3 | null | 2022-12-15T23:17:33 | 2019-06-08T12:22:56 | Python | UTF-8 | Python | false | false | 624 | py | executemany.py | # !/usr/bin/python
# coding:utf-8
import pymysql
import time
conn = pymysql.connect(host='localhost', user='root', password='123win')
pymysql.charset = 'gbk'
cur = conn.cursor()
conn.select_db('xiaozhan')
values = []
for i in range(10):
value = (str(i), 'xiaxuan')
values.append(value)
print(values)
now = time... |
1cd1a23403828d74063c36d4e3332ed8c16a2ddd | 662d1d3a768190eabebb48249ff8bc5f45816a3a | /system/app_test.py | 6c2676e1e4ab69d6241cadf20318cd320e4134dc | [] | no_license | un2582/AutomatedSoftwareTest | e4d75259cfd3208feb1525403f60e4ca680a5403 | 28ee43e7d6c9131271864ee6be7f684a3771d3a0 | refs/heads/master | 2020-07-07T19:41:54.877428 | 2019-08-20T22:47:04 | 2019-08-20T22:47:04 | 203,458,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,267 | py | app_test.py | from unittest import TestCase
from unittest.mock import patch
import app
from blog import Blog
from post import Post
class AppTest(TestCase):
def test_menu_calls_create_blog(self):
with patch('builtins.input') as mocked_input:
with patch('app.ask_create_blog') as mocked_ask_create_blog... |
aa30f92b54263b4eb6a051817e35afa42f3800a6 | 134628f896ae0a7201024189fcea1bf894dee390 | /map_reduce.py | 847547187a1f870f204cf1ac20e8f8e9992785e8 | [] | no_license | antemooo/DCSA | dbbc124b322416bf8ac918cf94ec06cca36a0409 | f730ce1e8193bb8d98d6ccf81778bc96a7caa25e | refs/heads/master | 2021-09-02T20:47:48.556681 | 2018-01-03T22:08:20 | 2018-01-03T22:08:20 | 112,607,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,313 | py | map_reduce.py | from mrjob.job import MRJob
from mrjob.step import MRStep
import re
# regular expression that used to process the words (all the words in general)
WORD_RE = re.compile(r"[\w']+")
'''
A Map-Reduce class that inherits MRjob class
This simple map reduce program is made to count the maximum 10 used words in a file.
Step... |
236c74db07d021f6c57e7edf922f2a950420bd0f | a6b5b78fe6f83a92231337e1cdd9ac20bc10d478 | /mu_code/music_util.py | c176d8262a1f62c74340bdf86ce4befceb52c663 | [
"CC0-1.0"
] | permissive | guoxiaoyong/simple-useful | faf33b03f3772f78bbfd5e8050244ac365d90713 | 63f483250cc5e96ef112aac7499ab9e3a35572a8 | refs/heads/master | 2023-03-09T11:51:56.168743 | 2020-06-13T23:14:07 | 2020-06-13T23:14:07 | 43,603,113 | 0 | 0 | CC0-1.0 | 2023-03-01T12:30:26 | 2015-10-03T15:12:43 | Jupyter Notebook | UTF-8 | Python | false | false | 3,924 | py | music_util.py | # Copyright (c) 2017 Xiaoyong Guo
# Author: xguo
import pyaudio
import numpy as np
from scipy.io.wavfile import write as wav_write
class MusicScore(object):
def __init__(self, simple_score):
tokens = []
token = ''
for letter in simple_score:
if ord('0') <= ord(letter) <= ord('8'):
if token... |
a4b038deb807d9e599cfb6fc4ca03475da0e4da1 | 77344e6fe9d62377a021364cefe2c8e4eabc1a8e | /chapter_three/ex_75.py | d314eb3a516d7d67427afa1f336438ce422470a4 | [] | no_license | Crypto-Dimo/workbook_ex | e1a93712af022ad28000b6756c62376b7be941c8 | 0f0ddfa34a9427ebde72598c0514d58246c7085f | refs/heads/main | 2023-03-13T18:52:26.166941 | 2021-02-21T11:08:42 | 2021-02-21T11:08:42 | 335,592,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | ex_75.py | # with if statement
word = input('Enter the word: ')
if word == word[::-1]:
print('This is a palindrome.')
else:
print('This is not a palindrome.')
# or with for loop
x = input('Enter the word: ')
w = ""
for i in x:
w = i + w # very different from (w = w + i) which has a different result
if x == w:
... |
db45d7c97a9744b8cc3a310092360424ada89bc6 | a62bdc9f7add280a094a94fb5a944bda9c96838e | /app/main/views.py | 36bbed503470ed9e30056306001846da0345cd12 | [
"MIT"
] | permissive | sdgroeve/Omega_server | ba8b5e28e71fe7e38050d08dde0a24816e211c78 | e788af5d5e2717c19100a88467c7126c8fcef033 | refs/heads/master | 2021-08-06T10:37:39.668287 | 2017-11-05T09:31:02 | 2017-11-05T09:31:02 | 109,566,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,332 | py | views.py | import os
import flask
import subprocess
import time #You don't need this. Just included it so you can see the output stream.
from flask import render_template
from flask import send_file
from ..models import EditableHTML
from flask_login import (current_user, login_required, login_user,
logout_user)
... |
b3127b0ac5da045b0a74a1517a5066363f21e299 | 84b046d70ed94d8db9e8ea82798597c0e1ca7cd2 | /bionlp/taggers/rnn_feature/networks/crf_lstm_layer.py | d91fb336ff1d62a0e5e2b461a4095f2e7777b8a1 | [
"MIT"
] | permissive | Honghan/ade_ann | 20ead66c051ad57903b7514979b2d624b47eb32e | 1cbbe47a1c6c2af3477f6c0c1398bae683c8d601 | refs/heads/master | 2021-04-30T23:22:39.465704 | 2016-11-04T11:49:50 | 2016-11-04T11:49:50 | 69,241,232 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,678 | py | crf_lstm_layer.py | from __future__ import print_function
from bionlp.utils.utils import theano_logsumexp
import lasagne,sys
import logging,theano
import theano.tensor as T
logging.basicConfig()
logger= logging.getLogger(__name__)
class CRFLayer(lasagne.layers.Layer):
def __init__(self,incoming,Wp=lasagne.init.GlorotNormal(),**kwarg... |
095b615cfc8b191b9884f33461af44d6c7c13bf8 | 8ba6aeb72f7c2caf99aab0b725c761c63dd2626e | /player_flags.py | 20e5accadf04dfa7e8f473d116d37da79d3037fc | [] | no_license | yeej2/game | 9fdf6d6471b5e9ae7e996f3a30608ad3c07bb0b2 | 0509a1637082000701236b1bccbfa90f136656f8 | refs/heads/master | 2020-07-14T07:21:54.547295 | 2019-09-07T03:35:10 | 2019-09-07T03:35:10 | 205,272,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 116 | py | player_flags.py | def player_flag():
global tree_life
global bridge
global hiding
global meet_pig
global pig_heal
|
31e54207608b217b1ac6ba8443ac3f51b198b8c8 | 47bc3aebec61f722bf67e23557f549fdb562d956 | /numbers.py | d93bbcb3bd7f328e0905194758e5fd9182a63132 | [] | no_license | ANeshcheret/python3 | e53a00a2ae3844fec0fc5cb20400bdcd5961b986 | 4785dd4254deb5cc3f2d2e9c710d30d255d5c115 | refs/heads/master | 2020-05-25T12:34:01.569472 | 2019-05-21T09:09:59 | 2019-05-21T09:09:59 | 187,801,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | numbers.py | # print(type(-2354321543554545341543534))
print(round(3.345435, 4))
a = 3
print(-a)
salary = 100
tax = 0.87
income = salary * tax
print (type(income))
|
9da4f2a7e16f2a6202d30530d4363314a75d7191 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_39.py | 998f1673d33aab14727e3fc9cca74edf1eb37801 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | python_39.py | # Can you do LINQ-like queries in a language like Python or Boo?
Queryable.Select(Queryable.Where(someInputSequence, somePredicate), someFuncThatReturnsTheSequenceElement)
|
676751ce3a0922b5344ed532473105344f601456 | 37c69a073a4f947a4d2e6f23cef33442f9db65fa | /api/v1/views/places_reviews.py | 5117d3b13200d32e3b9865123c113f24b22c0f0f | [
"LicenseRef-scancode-public-domain"
] | permissive | jasoncortella/AirBnB_clone_v3 | d244f3c32a0492883b4702b0e7d6a579c0a255b8 | ac935d87cffaa2b0c59c388e8d32d44c6ccb6bf0 | refs/heads/master | 2020-07-22T23:17:03.802118 | 2019-09-12T18:56:23 | 2019-09-12T18:56:23 | 207,363,770 | 0 | 1 | null | 2019-09-11T21:11:23 | 2019-09-09T17:18:22 | Python | UTF-8 | Python | false | false | 2,453 | py | places_reviews.py | #!/usr/bin/python3
""" Module for review object view """
from api.v1.views import app_views
from flask import jsonify, abort, request
from models import storage
from models.review import Review
@app_views.route('/places/<place_id>/reviews', methods=['GET'],
strict_slashes=False)
def get_reviews(plac... |
e8c66e5f438d0faaf08b6174ec7febcb4d255507 | e7fbdeebd8c2f8c56c60be6434b5ca34d9e48597 | /migrations/versions/14acf484b1f8_initial.py | 906aea9d7986445787dd28667e8c1e2800c68010 | [] | no_license | aynroot/Flask-Microblog | 7b1d3962c2ede295cc50096c8b0c6915da1b0920 | 404aa168ae6cf5dc7973460fd52bf90886718f7a | refs/heads/master | 2021-01-01T16:51:26.115003 | 2015-08-19T20:24:26 | 2015-08-19T20:24:26 | 40,089,962 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 910 | py | 14acf484b1f8_initial.py | """initial
Revision ID: 14acf484b1f8
Revises: None
Create Date: 2015-08-02 21:05:23.368356
"""
# revision identifiers, used by Alembic.
revision = '14acf484b1f8'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('users',
sa.Column('id', sa.I... |
1b3e7409baf8f2c70be72f004ee5ca2e7dad8453 | e0c43aba11146bc6f3c32f1ffccada35b627e9cf | /compare_lists.py | b9b6d9e44cf052b38cbe36cd21c054301a1eb449 | [] | no_license | brookabyss/CD-Portfolio-Django | 8d56d160d95be8a48a8ad8b56d07dcfaf6b1d28e | e7d95e623360cdd37e9ce48f5cd53cd73616a8f6 | refs/heads/master | 2021-06-19T07:22:14.096470 | 2017-06-15T21:45:23 | 2017-06-15T21:45:23 | 94,476,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | compare_lists.py | def compare_lists(list_one,list_two):
result="The lists are not the same."
test1=any(list_one[i]!=list_two[i] for i in range(0,len(list_two)))
test2=len(list_one)!=len(list_two)
if test1 or test2:
print result
else:
print result.replace("not","")
compare_lists([1,2,3,4],[1,2,3,4])
co... |
d97f07d998fa39e137ae0b162c4a57019e07df1d | 8b52b4c0db0170eec36751d9623bfcd5b45d637c | /pages/migrations/0023_auto_20180208_2046.py | 4ed5ec76e6869bbf63df6dcf9f76b20298b2b1dc | [] | no_license | kinoafisharu/orpro | 1f5163e05d416caff442cb477ead4f7afb681409 | 2885764063a5f25f3274a0ff7e64f0341808d7e5 | refs/heads/dev | 2021-06-02T23:11:57.022967 | 2019-02-27T07:56:36 | 2019-02-27T07:56:36 | 112,865,224 | 0 | 14 | null | 2020-02-11T21:49:41 | 2017-12-02T18:11:33 | Python | UTF-8 | Python | false | false | 484 | py | 0023_auto_20180208_2046.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-02-08 17:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pages', '0022_reviews_comment'),
]
operations = [
migrations.AlterModelOptions(
... |
5f02843c9c1a88884006193c5df930e861b4b920 | 5391014fe69311d32c05dbc812e5f3d13cc8b33e | /Kaushik/retrieval/retrieve_class.py | cefb4d451335b33acbe87509e69cf844ee57a2a6 | [] | no_license | kauterry/cs231n-retrieval | fcb0d48bc6bb6d92c495d18073fdb7fbd957c7a3 | 758488f75340e84639553a1f02411c4868f37a32 | refs/heads/master | 2020-05-31T14:41:27.904823 | 2019-06-05T06:15:24 | 2019-06-05T06:15:24 | 190,335,864 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,076 | py | retrieve_class.py | from __future__ import print_function
import torch
import torch.nn as nn
import os
import numpy as np
import pickle
import random
from model import load_model
from dataloader import load_data
from index_loader import load_index, index_read
def save_index(model, output_dim, dataloaders_dict, save_path, batch_size = 3... |
fe9048fd1f912cd3b5e732f3b37ee8073f38d671 | 2f8100e9109e2428c42f2f4883efd55904d21d5f | /2017/day07/part1.py | 4f5a695fff6df5501158b4efe24a1691378fecfb | [] | no_license | kylelemons/adventofcodesolutions | c4d1f3d76c8384f855514565458fb378f5a85365 | 753d629589dcb9678cc6564e94235a94c809a4f8 | refs/heads/master | 2023-09-03T14:14:46.506713 | 2021-12-20T08:17:03 | 2021-12-20T08:17:03 | 76,234,565 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,291 | py | part1.py | import re
from collections import defaultdict
below = {}
above = {}
weights = {}
for line in open('input.txt'):
match = re.match(r'(\w+) \((\d+)\)(?: -> (.*))?', line.strip())
if not match:
continue
(bot, weight, carried) = match.groups()
weights[bot] = int(weight)
if not carried:
... |
da51f03e7bb89287b6a6232ba7e26ddadb039412 | e1aceed7ecfec9c4a565be148a748007edd7fa60 | /Libraries/Process.py | 120a91a4ba14231aa3cbbaf57ac7c8fc06ec4ce2 | [] | no_license | lexkh1986/TestLink_Uploader | f3797f1954fe17b15248e086db969dca33fb9bb6 | c74ee9b08729984ee109ef3acc972053985f6fb5 | refs/heads/master | 2023-04-10T12:44:45.073866 | 2020-05-05T09:05:52 | 2020-05-05T09:05:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,697 | py | Process.py | from API_Excel import *
from API_TestLink import *
from TestModel import *
from Misc import *
from copy import copy
import os, sys
class Workbook(object):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
CONFIG_PATH = '%s/../setting.txt' % os.path.dirname(__file__)
def __init__(self):
self.TEMPLATE = Template()... |
8c96716b1ccb1295777397cb904e83a14b9e43ec | 328f296ea49803af519467a90cdb1f6606edc47d | /Rio_Orders.py | fee27ce0e8a7f1e1cdb79fd4395c2a64517cdda6 | [] | no_license | jackwallace180/OOP-pyodbc | de7d5fa954b2f996cea50a6535b8c04ad905ae64 | a4a95121fc7858820bd44b732aa6cb73f5dc9083 | refs/heads/master | 2020-08-04T23:58:21.538326 | 2019-10-02T13:44:40 | 2019-10-02T13:44:40 | 212,322,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | Rio_Orders.py | import pyodbc
# pararemeters/variables for the connection
server = 'localhost, 1433'
database = 'Northwind'
username = 'SA'
password = 'Passw0rd2018'
# establish a connection
conn_nwdb = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+password+'')
... |
5a2ad991c027b3ef37e916fe9735867f6804e191 | f4e401df164208defd29e2f3b76dd46e9e348ae7 | /blog1/views.py | 6c1cc59309d77ada46f385543dc99e407302fed7 | [] | no_license | careyyoung/personal_blog | cd88524f6c05ea15ac16f56af7867961cc2171d6 | 41d6b6b9ca30a24daf55384434f062db84aaf709 | refs/heads/master | 2016-09-16T06:09:15.818958 | 2015-04-01T10:04:22 | 2015-04-01T10:04:22 | 32,010,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,476 | py | views.py | # -*- coding: UTF-8 -*-
from django.shortcuts import render
from django.http import Http404
from rest_framework import viewsets
from blog1.models import Blog, Message
from blog1.serializers import BlogSerializer, MessageSerializer
# Create your views here.
# hello just for testing.
#1. goto common.py, "'blog1'," app... |
2725547993f49f06fb9fc6312e208595ce95564b | 8144c7862e1fdeedf5c657c23675ec63a4b7b27b | /tests/scp_test.py | c9cac471a7e4375a660a39492691fd78e795f66b | [] | no_license | aj132608/CloudRunner | 3b5957fda4c76e8605016a73eb70eb64584c01e2 | f21a89a011256047814e12ffc370c41a3346a3d7 | refs/heads/master | 2022-04-08T17:14:55.976593 | 2020-03-12T21:51:55 | 2020-03-12T21:51:55 | 237,063,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | scp_test.py | import os
username = "ubuntu"
from scp import SCPClient
from paramiko import SSHClient, AutoAddPolicy
ssh = SSHClient()
ssh.set_missing_host_key_policy(AutoAddPolicy())
ssh.connect(hostname="52.53.226.167",
username=username,
key_filename=os.path.join(os.getcwd(), "test_proj2_key.pem"))
with ... |
5aed80551683e9c93720223138b7f18d14fb8ccc | d0d3f0bc3a04f184dd927d15b76777d0cc129580 | /BackBones/utils.py | 265ac82d63bb0fb3caf0dc7f93791badf0b43a17 | [
"MIT"
] | permissive | atimashov/object_detection | 8c2ff42f9dbf1df0e214cc73b010107b010c4da1 | 922cd88f429156fa4668c7d718b2665e4ab875fd | refs/heads/master | 2023-02-15T11:01:27.394498 | 2021-01-14T04:29:34 | 2021-01-14T04:29:34 | 317,751,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,444 | py | utils.py | import torch
from torch import nn
from torch.nn.init import kaiming_normal_
import os
import json
from termcolor import colored
from datetime import datetime as dt
def init_weights(model):
for layer in model.features:
if type(layer) in [nn.Conv2d, nn.Linear]:
kaiming_normal_(layer.weight)
for layer in model.cla... |
fdc266cc3bad0812ca9fa66264400d49a99fa850 | c52e8c2a604945adb35e3299e37dd215d2081322 | /realDeal.py | 6c76bc16df85b52516d8a69e98a66234395badd8 | [] | no_license | drewblik/GIUCalc | 756965e9a865fa3256f98c04753c2d29c8e09a7c | a81c390fc61859ec667c62ca5465478cdfeb0304 | refs/heads/master | 2021-04-18T13:05:26.943306 | 2020-03-23T21:25:18 | 2020-03-23T21:25:18 | 249,545,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,120 | py | realDeal.py | import tkinter as tk
import time
#buttons, labels entrys for basic widgets
class Application(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
self.master = master
self.pack()
self.create_widgets()
def create_widgets(self):
# = button
self.equ... |
80c52b8399561942492f9b204746f98edb40faa9 | 21be3d1b919d2b8e937162bafef6d06c1e15cea8 | /memory/cards/game/src/main/python/onebeartoe/games/memory/InvalidPairsException.py | 421ee00436eb16ce1d5237ff4bcad657b2136fc3 | [] | no_license | onebeartoe/games | d4377067c7b5f2492ea84ad6e398c3c470b39017 | 3040135b55dbb528aeb945a1188d60b3eedb52f0 | refs/heads/master | 2023-08-31T19:49:45.195776 | 2023-08-30T17:08:40 | 2023-08-30T17:08:40 | 189,674,756 | 0 | 0 | null | 2023-03-05T17:04:02 | 2019-06-01T00:49:52 | Java | UTF-8 | Python | false | false | 50 | py | InvalidPairsException.py |
class InvalidPairsException(Exception):
pass
|
9b2bfe77d1fefef1613e5dcb639398d20d0c7a0f | 2c05c3a02c0747481dbe5fa1d1cb5dbc947debfd | /ABC098/B.py | 585a6dc5c337ffaf1f623d984fefdee4d87ac5d3 | [] | no_license | taq225/AtCoder | 207c54c05c8cec30de3515b61585f7bb45f58b9a | 014ff194caddbbc0c71f583a25b2049910e6ce8b | refs/heads/master | 2021-04-27T00:22:49.050155 | 2018-06-10T14:59:55 | 2018-06-10T14:59:55 | 123,801,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | B.py | N = int(input())
S = input()
maximum = 0
for i in range(1, N):
S1 = set(S[:i])
S2 = set(S[i:])
count = len(S1 & S2)
if maximum < count:
maximum = count
print(maximum)
|
bb35005c71637b2d1949ea4c3f59b02c8665cc58 | 380a58de230c7a84ec0157c9453a1d364c88d5dd | /audio_much/train_raw_nnfp_garbo.py | 2a6bc973a52023067c0a29fc1b7e025e4bd8503f | [
"MIT"
] | permissive | enragedginger/cover-song-recognition-much | 17d166b246eff585dbbf2b732c342fc7e664aee9 | 287ffce528a123a482c344ea3f7bd169a03969d6 | refs/heads/master | 2020-04-27T18:46:48.230989 | 2019-06-20T19:21:58 | 2019-06-20T19:21:58 | 174,586,934 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 9,566 | py | train_raw_nnfp_garbo.py | import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
import pandas as pd
from keras.models import Sequential, Model
from keras.optimizers import Adam
from keras.layers import Dropout, concatenate, BatchNormalization, Activation, subtract, Lambda, Concatenate, AveragePooling2D, ZeroPadding2D, Convolution2D, MaxPooling2D... |
220a32433816cebf1b1a8ccd5dd56cd2f8a0abd9 | 789bdfabf4a6cc2a769b5bc523d7c91c3bba5065 | /models/dcgan_model.py | 32ae600d420fba52cba58494923c513d5315924f | [
"BSD-3-Clause"
] | permissive | kshmelkov/gan_evaluation | c57b05a9d06746684335062b4984fe0381d98eef | 8583837a8fa796ae8ec4bb503a159a9e0a40cbf7 | refs/heads/master | 2020-03-30T15:56:59.301879 | 2019-03-09T11:04:31 | 2019-03-09T11:04:31 | 151,386,787 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,242 | py | dcgan_model.py | from config_gan import args
import tensorflow as tf
from utils.sn_conv import convolution as conv2d
from utils.sn_conv import convolution2d_transpose as conv2d_transpose
from utils.generic_utils import get_glorot_uniform_initializer as get_initializer
slim = tf.contrib.slim
@slim.add_arg_scope
def lrelu(inputs, l... |
fea3649a2e42e84d1129ea2d68b894d68b174493 | 87ffb2d48733dba008ff42029b58e1e5a3086192 | /Matrix/Set-Matrix-Zeroes/alternate_solution.py | e2cb440f5f85b1676b57aa8204214f496b6c06ea | [] | no_license | sriniketh28/General-Coding-Questions | 2abf2228fdbb9b9b30daff68df8b7493643c8c53 | 204ca9ed7dd2b73f296e69f51d8fd881bbe6bab1 | refs/heads/main | 2023-05-09T02:47:39.982618 | 2021-06-04T10:51:00 | 2021-06-04T10:51:00 | 367,424,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | alternate_solution.py | # O(m + n) space solution
def setZeroes(matrix):
m = len(matrix)
n = len(matrix[0])
rows = [1]*m
cols = [1]*n
for i in range(m):
for j in range(n):
if matrix[i][j] == 0:
rows[i] = 0
cols[j] = 0
for i in range(m):
if rows[i] == 0:
matrix[i] = [0]*n
for j in range(n):
if cols[j] == 0:
... |
17a222e3512b19f0fba65d5d8b60562830b52d4e | 30a92ba5cf1f6de6a7a70aede2f9d79d7caf9bfe | /News Feed Analytics/news.py | 8df3373e2a482fd407a9cdbba895dcc42d6df6e3 | [] | no_license | meeralaxman/NewsFeed-Analytics | 659a58f1a118a58a30d337df1457a583bb61c8ee | 8bc340a554346b0e856d3d9b9b1b973d5011b627 | refs/heads/master | 2022-09-25T05:45:16.460120 | 2020-06-06T08:40:08 | 2020-06-06T08:40:08 | 269,916,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,343 | py | news.py | import pandas as pd
import json
import glob
import sys
import boto3
import datetime as dt
#add the code for copying the files from S3 to local
#read the data from all 3 tsv files and store it in a single file
data = pd.concat([pd.read_csv(f,delimiter='\t',encoding='utf-8') for f in glob.glob("C:/Users/mlaxm... |
a47641ae6939973b1bfff66474b1464449a1ffac | 34d9ef47d0fd952009ff8bd5915e20bd7b41c8f3 | /vikey.py | b6787b460ce4c823f18ee73e390867226ad5d125 | [] | no_license | vignesh-beep/vp... | 667c729b9359e13ce4a3d8c59061ea5b3a33b3a3 | aed4b08a75bcbe42f03e0b7730f56a41f2d338a4 | refs/heads/master | 2022-02-04T22:30:30.836253 | 2019-07-20T07:17:56 | 2019-07-20T07:17:56 | 197,892,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | vikey.py | nl2,n22=map(str,input().split())
for rs in range(0,int(n22)):
print(nl2[rs],end="")
|
1a8a4e118c4c4b6883ed0358946a85b5ec0d9537 | a8fe5393d2d99d2b3fab334a923af7f244abce2f | /sale_order_template_option.py | 108ec4e1fa77b286a90c4dce12e9cb917f151bcf | [] | no_license | pragmatic-dev/kumbal_portal_sales | 5ee6f98f705855f289a4b3d8e0cbbe1b486567bb | d8c938988492ce92fde0e6f10be80865cc917c83 | refs/heads/master | 2020-04-13T12:24:39.554549 | 2018-12-26T17:14:06 | 2018-12-26T17:14:06 | 163,201,026 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | sale_order_template_option.py | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from odoo import api, fields, models, _
from odoo.addons import decimal_precision as dp
from odoo.exceptions import UserError
class SaleOrderOption(models.Model):
_inherit = 'sale.order.template.option'
espiral = fields.Integer(string='Espira... |
f3447e1a511534156610c9e86afe50bf66bbf04c | d0b86a2f3b0d4205a9528033bb18a17d8318913c | /encryptClient.py | a1d104a8c00202d854b9ba55726ace115e495457 | [] | no_license | ToruFukai/encryptProgramming | 65a4b1236a720c630dad58c36c99abd00a4687fa | 32c4b4e2b3170ac565ba1391124472f78bc54b59 | refs/heads/master | 2021-09-06T06:29:42.011672 | 2018-02-03T06:53:49 | 2018-02-03T06:53:49 | 120,067,084 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | encryptClient.py | import socket
# create a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# get local machine name
host = "localhost"
port = 5002
# connection to hostname on the port.
s.connect((host, port))
msg = input()
def encrypt(msg):
d = {}
for c in (65, 97):#ASCIIコード表で検索
... |
eac0a0cd12b9914837e756d5243acf74ffa8d7c6 | 7846b9b2df8ae78377e2bb51587f8909f7d1855b | /tests/experimentScripts/tracksToLynneFormat_preloadDb.py | 9e3e1f179de50f03286c695fc28ed56666594b47 | [] | no_license | ctslater/mops_daymops | 3f3ab14b97428f0a83415c3d01e3cbb44c07e8b5 | b5f64609c4818acf07ebbc63023fb1e8aa667ad5 | refs/heads/master | 2021-01-21T02:50:30.661982 | 2016-11-22T00:49:49 | 2016-11-22T00:49:49 | 67,087,251 | 1 | 0 | null | 2016-09-01T01:31:59 | 2016-09-01T01:31:59 | null | UTF-8 | Python | false | false | 2,141 | py | tracksToLynneFormat_preloadDb.py | #!/usr/bin/env python
""" jmyers feb 18 2011
convert tracks (or tracklets even) from byDiaId format (one line per
track, white-space delimited DiaIds which build the track) into
something like the format of Lynne's original DiaSource dump:
#!trackNum diaSourceId opSimId ssmId ra decl taiMidPoint mag snr
Tracks will... |
a6b221f0eb9f7991707db2b091101c20ecd25cf1 | ad98fbe4aa414b6efe347264c4b9fbe73a4e770a | /kalshiBeta/bets/models.py | de1ebd6652bdb486c86d84b5d84f8bba8ebd532b | [] | no_license | Tarek7/kalshiBeta | 4cda2b63bedbdd3229f5b0474c651a0921125a09 | 389f75b552f5f503b08353f396453ea0cc894c27 | refs/heads/master | 2020-04-02T05:14:51.523177 | 2018-10-22T14:18:50 | 2018-10-22T14:18:50 | 154,061,254 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,896 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
birth_date = models.DateField(null=True, blank=True)
wallet_... |
e57509abec4ae5e831388de0c6615c048143d7ca | 75d8667735782cd1d0eb4877e52c89da5cd92dde | /nova/api/openstack/compute/legacy_v2/contrib/floating_ip_pools.py | f7c953cc1ed47c5ed154cdaa4bd8a59abf382dcf | [
"Apache-2.0"
] | permissive | bopopescu/nova-token | ffecfd3ec561936b7d9d7e691bc57383cde05436 | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | refs/heads/master | 2022-11-22T09:53:31.073483 | 2016-05-14T02:47:01 | 2016-05-15T22:02:55 | 282,105,621 | 0 | 0 | Apache-2.0 | 2020-07-24T02:42:19 | 2020-07-24T02:42:18 | null | UTF-8 | Python | false | false | 4,449 | py | floating_ip_pools.py | begin_unit
comment|'# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'# a cop... |
6a5580495e1180d0bbd35da3a77b8836b2f3ff0c | 8fb72879130c17f876bfa494684271d19e78edc8 | /Set Methods.py | 29d5ed8de00143698706223c42b8f6d1afe51a94 | [] | no_license | tauseefansari/Python-Programs | e4794450b4ad5db2dc608ee648f9f6a96cdbcd3d | a356343057720ab32bf5b4667000d0789cf39d17 | refs/heads/master | 2022-09-05T07:11:33.167977 | 2020-05-28T15:24:07 | 2020-05-28T15:24:07 | 267,621,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | Set Methods.py | a={"Apple","Mango","Unknown"}
b={"Google","Apple","Unknown"}
print(a)
a.add(input("Enter Name of Fruit : "))
print(a)
print("Number of Items : ",len(a))
a.update(b)
print("Updated : ")
print(a)
print("Subset : ",b.issubset(a))
print("Superset : ",a.issuperset(b))
print("Difference : ",a.difference(b))
print("Intersect... |
014c8c66c5d2b343bc9f604a8edf6eca19913a67 | 1d2e08fc576817382a7303fdc765473ee29af07b | /retrain_net_on_cineca.py | 1c39ae777d3a3f12659a544373a30ed2411d6f92 | [] | no_license | MarioSposato/cnn_hand_recognition | 7047b26346d9e7f6216ea192a45f82d2bb273bbc | 396cb16128bb8358a32dae30be239ead0c319fd2 | refs/heads/master | 2021-01-20T07:46:54.552663 | 2017-05-23T16:08:39 | 2017-05-23T16:08:39 | 90,042,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,683 | py | retrain_net_on_cineca.py | import cv2
import os
import numpy as np
import time
from keras.models import load_model
from keras.callbacks import ModelCheckpoint,Callback
from generators import my_generator, train_generator
from generators_for_cineca import my_generator
from keras.applications import VGG16
from keras.layers.core import Dense,Activa... |
38c355e37200807536722a09f56314b2c202532e | de38ed77329f1a5cffab7302dfcdc1b1306e8780 | /ssh.py | f5e906b8f41f8e719d6e83f9ad421735cf1b0ee6 | [] | no_license | suseokpark/ec2-gazua | 2850819cc646bb79f95b89f3cae4be55fd5d613c | 3761d5d20659b6ed53e0022c103f3fc7a33d012d | refs/heads/master | 2020-03-19T19:38:22.321607 | 2018-06-11T00:14:42 | 2018-06-11T00:14:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,973 | py | ssh.py | # -*- coding: utf-8 -*-
from logger import log
import re
import collections
from os import path
from os.path import expanduser
home = expanduser("~")
GROUP_PATTERN = re.compile('^#gz\:(group\=(?P<group_name>[^,]+))')
DEFAULT_GROUP = 'default'
EXPECTED_CONFIG_PREFIXES = [
'Host',
'HostName',
'User',
... |
2f54fc918a27c88a2d2ad463c1033bd11ab0c928 | 5a92050678abcea6609dd422bd13c798ce525884 | /shutter.py | 4bf5b6c472242ce1fc8986b4f9c035a576bad0ac | [] | no_license | wasupandceacar/Lneta_bilishut | 5e6cd8152680d4217c62b6453b02d53233985ac9 | 753dd52bea180ea6327090b7da57e8bb41ee1530 | refs/heads/master | 2021-01-25T11:49:51.773872 | 2019-03-23T14:14:12 | 2019-03-23T14:14:12 | 93,948,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,585 | py | shutter.py | import requests
import re
import urllib
import json
import traceback
from threading import Thread
import pymysql
s = requests.Session()
PATH="tmp.json"
HTMLPATH="F:/1.html"
JSONPATH="1.json"
THkey=['红魔乡','妖妖梦','永夜抄','风神录','地灵殿','星莲船','神灵庙','辉针城','绀珠传']
Lkey=['l','lunatic','l难度']
NETAkey2=['nb','nm','no%20bomb',... |
73df5c44b57347037428505ca297355a500db6d4 | 0ffa7894569d8a18a9e9467552111ba0f354122c | /5.py | ca0a63949073db08dfcb240e6e6ff268cebaafa3 | [] | no_license | erbenmo/project-euler | abebb61b7c114b776f4fa15c5aa1fe9b4b2d436b | e93ea0372edbbd0a21e8a0ddb2f9bb5fd5d17579 | refs/heads/master | 2021-01-01T17:55:56.727103 | 2013-04-08T06:19:02 | 2013-04-08T06:19:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | 5.py | answer = [0]*20
def split(n):
cur = [0]*20
while n > 1:
for i in [2,3,5,7,11,13,17,19]:
if n % i == 0:
n /= i
cur[i-1] += 1
break
for i in range(20):
answer[i] = max(answer[i], cur[i])
for i in range(2, 21):
split(i)
print [... |
82d3a26325f53bd869080cf599f01da2641dcef1 | f760cbeb1bcdc4bb25b7d41a351d11607d122a6f | /Tabla.py | 49872a25a7140707a1c661aee0181b35a9b8fbf8 | [] | no_license | Daniel23Alfonso/Proyecto-Bases-de-Datos-Python | a38c3dd4cd065d96b44c1ab2e0adc3b128673c17 | 552d65311399b99193227259779a43226c161dcb | refs/heads/master | 2021-05-27T11:00:29.092210 | 2014-08-27T18:50:34 | 2014-08-27T18:50:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,437 | py | Tabla.py | # -*- coding: utf-8 -*-
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class MyTable(QTableView):
def __init__(self,ventana):
QTableView.__init__(self,ventana)
self.proxy = QSortFilterProxyModel(ventana)
self.ventana=ventana
self.modelo=QStandardItemModel(self.ventana)
self.pr... |
12db897bab7b1d315e1a6c9b3cc1f0cdef3197dd | daf158e96651386c5e89165215d4568723e271ee | /gd/apps/users/models.py | 84d8dde8154ad6560685bf637c4f4651de88677a | [] | no_license | FFFFFhb/Graduation-design | 950c1efec819f2ed9585459a93bfe0008f302a23 | 8c3c5f3c27f2e68d30a1690a7cdcb3fb03271346 | refs/heads/master | 2021-01-24T04:13:16.443884 | 2018-10-21T02:42:00 | 2018-10-21T02:42:00 | 122,926,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,364 | py | models.py | from datetime import datetime
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class UserProfile(AbstractUser):
nick_name = models.CharField(max_length=50,verbose_name=u'昵称',default='',null=True,blank=True)
birthday = models.DateTimeField(verbose_n... |
9ae82939752923bf6f8395e96d0f4e5485ea4066 | 9b89dc57f0d176c8403f364cfaa83b6031d4aa55 | /WeBuy/shop_orders/urls.py | 148c94ee1b9249f7dda774b5439ea63d7d690db1 | [] | no_license | 13033266796/MyWebShop | 07a7ffc578fb0ae4c3e1b75c0dae97caa34ae9a5 | 0517e65981c7cc024b6f8e42d15c8d1ba3cb7d25 | refs/heads/master | 2020-08-14T23:21:35.243135 | 2019-11-01T00:26:26 | 2019-11-01T00:26:26 | 215,245,599 | 1 | 0 | null | 2019-11-01T00:26:27 | 2019-10-15T08:22:07 | HTML | UTF-8 | Python | false | false | 256 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^order(\d+)/$',views.order),
url(r'^createOrder/$',views.createOrder),
url(r'getOrderGoods(\d+)/$',views.getOrderGoods),
url(r'^getMyOrder/$',views.getMyOrder),
] |
eb7ae1223d0bef46fb5b2cd6ac07f95c0ecd994c | 07a4d568e01ed82ab71f4a5e0916c872249c23c3 | /test_morris.py | 03939db1488212963ba14903118e82bc3a1ab1f3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | joshuaeveleth/MorrisDataDecorator | 04d20bc5c3d0e78f754e47df7ba0315fe38507b5 | a148b579082772c9e43f1aad484e5f8a3520ecc1 | refs/heads/master | 2021-01-12T08:01:44.073946 | 2014-07-30T19:23:58 | 2014-07-30T19:23:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,330 | py | test_morris.py | import unittest
import morris
import morris_memory
decoration_0 = "ThisIsADecoration"
decoration_1 = "This is a second decoration"
content_record_0 = "http://yoyodyne"
content_record_1 = "http://bogodyne"
class TestMorrisDecorator(unittest.TestCase):
def setUp(self):
self.d = morris_memory.InMemor... |
25e1b24489894d282f5963bf8dcf9a25747737d0 | a237d080f9065f89fe44f24380305cad31687b91 | /script.py | 17b2883a3c6a7149eca00482c1c35837b56166ac | [] | no_license | ritwickraj78/face-detection | 8cbb19c402ccac75450dd24cc40103c4ae8931d5 | e4ba5c79614c035af138ac9af253a866ea3310bc | refs/heads/master | 2020-06-26T23:04:14.641183 | 2019-10-31T19:07:52 | 2019-10-31T19:07:52 | 199,782,169 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | script.py | import cv2
detect = cv2.CascadeClassifier("1.2 haarcascade_frontalface_default.xml")
imp_img = cv2.VideoCapture("elon.jpg")
res, img = imp_img.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = detect.detectMultiScale(gray, 1.3, 5)
for (x, y, w, h) in faces:
cv2.rectangle(img, (x, y), (x+w, y+h), (255, 255... |
df6fa0409500f97e5afde8f97796d6ed0cc4d746 | 2f64a0fe7e6a117a2170824479f852ece4a2c5bf | /FCN-32.py | e6e5408d0caab6af3cd2ce50aa0f739da0c803d3 | [] | no_license | Po-Hsuan-Huang/homework6 | 306ad630d1f9558392ab81ff44cca4c8e12827bc | 0cc2516fd9a1a5e62cf0154dd077ba9fe1fd98b2 | refs/heads/master | 2020-04-08T21:00:56.327325 | 2018-12-07T20:23:24 | 2018-12-07T20:23:24 | 159,725,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,818 | py | FCN-32.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 26 23:42:11 2018
@author: pohsuanh
Fully Covolutional Network FCN-32s.
FCN-32s network is based on VGG-16
"""
import os
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import data_load
from datetime import datetime
... |
20d09a616133295a6162a7ab1d7970ccbaf6de95 | 27fbe6c1f5de40022efe05f978c9af2a5d209e91 | /bug_trigger_inputs/pytorch/6/torch.nn.functional.adaptive_avg_pool3d/VI_dd0eb7901523d494d4aa324f474c782063e9e231.py | f2c19b95d3b3f2ccbe64b0e3240b7c285e0d575e | [] | no_license | icse-submit/materials | 830ea178351cd3523704ce63edfe18f83936d57c | 6a61764cea00470af6f74fb2969e77db023f1e84 | refs/heads/master | 2022-12-23T10:05:01.618766 | 2020-09-28T19:28:21 | 2020-09-28T19:31:07 | 290,929,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | VI_dd0eb7901523d494d4aa324f474c782063e9e231.py | import pickle
import torch
data = pickle.load(open('dd0eb7901523d494d4aa324f474c782063e9e231.p', 'rb'))
torch.nn.functional.adaptive_avg_pool3d(**data)
|
f69b4d022ebed5a0b660f55704bbe762d5d765d5 | d3c0d68db3b7d822ae0baa85e9e3541503c03675 | /CheckIO/Brackets.py | 299fabb39ea98c3919f43d67a5c9cdb7f4c199d4 | [] | no_license | yrahan/edx | fa7cb2fdcde925faf3ed41f622d1aa096a94934c | 48bb179a1f4273236e70d56e1147d832b15f1a32 | refs/heads/master | 2021-01-18T15:09:16.002200 | 2013-06-01T14:33:38 | 2013-06-01T14:33:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 814 | py | Brackets.py | '''
Given an expression with numbers, brackets and operators. But in this task only brackets are important. Brackets can be one of three types -- "{}" "()" "[]". Brackets are determine the scope or restricted some expression. So each if was opened, then must be closed with the same type. The scopes of brackets must not... |
97a51d959ad642467c508cedc8786f636e4050bb | 79ffa3e9dc6f1388213db58b64b85ac485d1e787 | /tests/test_main.py | 3234894e4e94dc55aea62979bcda0ee25b4692d8 | [
"MIT"
] | permissive | lenamax2355/skimpy-1 | 2bdf06665cb2701cc6fb0344a405da4f84548fa9 | 139f64948d1328c69d49646dfcfd9c01a95cf5a4 | refs/heads/main | 2023-07-24T23:44:15.823611 | 2021-09-11T11:25:58 | 2021-09-11T11:25:58 | 405,635,601 | 1 | 0 | MIT | 2021-09-12T12:28:03 | 2021-09-12T12:28:02 | null | UTF-8 | Python | false | false | 1,453 | py | test_main.py | """Test cases for the __main__ module."""
import pytest
from click.testing import CliRunner
from skimpy import __main__
from skimpy import generate_test_data
from skimpy import skim
@pytest.fixture
def runner() -> CliRunner:
"""Fixture for invoking command-line interfaces."""
return CliRunner()
def test_ma... |
005650e2747c61b730960a29891b6ba6c8bd381b | a9c53ab78579a1ed2b8acd71dcd047cfacec4d2f | /gaussian_integrals.py | d9460a13cb4392cefca347dc5ec56e7613e05a77 | [] | no_license | genweizhang/DFT | 6a85b310910dafed38f4cae5d11e16f2ff000010 | 88d2d7c4fb63fc6a598fe21b5431939db10cd5bf | refs/heads/master | 2020-03-27T11:24:11.462145 | 2018-08-28T17:46:46 | 2018-08-28T17:46:46 | 146,484,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 864 | py | gaussian_integrals.py | # coding: utf-8
import os, sys
import numpy as np
from math import exp, sqrt, pi
def factorial(n):
value = 1
for i in range(n,1,-1):
value *= i
return value
def double_factorial(n):
k = 1
for i in range(n, 1, -2):
k *= i
#print("n:", n, "double factorial:", k)
return k
... |
26f466a6a2fd09bb108ca89e4537192c070ff83b | 3dab3662af42f6b33f8e16724949261129ed8f8f | /Python/task18.py | 5165fceeb6ea1271c779bca88ce22809ce01b927 | [] | no_license | kikiwongweb/kikiwongweb.github.io | 81f7d922c9e9dc1464688362de448f055fe9b729 | dbb0b55f47d26a4747ce9aa9049777c8ddd275d7 | refs/heads/master | 2023-09-02T19:24:48.413096 | 2023-08-25T08:21:21 | 2023-08-25T08:21:21 | 202,672,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38 | py | task18.py | c = "こ に ち わ "
print (len(c))
|
8c0a4d5a86d9ebd38ea05efb5b5b570368ce1449 | 61c1172bc8da8dae3b7a2a584c066681c653be23 | /tools/find_panics.py | f4bad3b35fbd22b6a2ac556d9838162c3cfa2ff1 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tock/tock | 84274870e25ae5daa343c2af815adbecfa33947d | 1a111a3e748815117b0ef939ab730b31d77a409d | refs/heads/master | 2023-08-16T08:06:55.778062 | 2023-08-11T21:48:03 | 2023-08-11T21:48:03 | 36,428,094 | 3,972 | 570 | NOASSERTION | 2023-09-14T19:58:08 | 2015-05-28T09:26:47 | Rust | UTF-8 | Python | false | false | 20,374 | py | find_panics.py | #!/usr/bin/env python3
# Licensed under the Apache License, Version 2.0 or the MIT License.
# SPDX-License-Identifier: Apache-2.0 OR MIT
# Copyright Tock Contributors 2023.
# Prints out the source locations of panics in a Tock kernel ELF
#
# This tool attempts to trace all panic locations in a Tock kernel ELF by
# tr... |
9b8db3407313a3e39d429b7c10897fc447fcdc27 | bd8bc7abe0f774f84d8275c43b2b8c223d757865 | /79_WordSearch/exist.py | 0794987f85b074dc7b9b06b5141a53fc0ccf7034 | [
"MIT"
] | permissive | excaliburnan/SolutionsOnLeetcodeForZZW | bde33ab9aebe9c80d9f16f9a62df72d269c5e187 | 64018a9ead8731ef98d48ab3bbd9d1dd6410c6e7 | refs/heads/master | 2023-04-07T03:00:06.315574 | 2021-04-21T02:12:39 | 2021-04-21T02:12:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,490 | py | exist.py | class Solution(object):
def exist(self, board, word):
"""
:type board: List[List[str]]
:type word: str
:rtype: bool
"""
if not board or not board[0]: return not word
self.length = len(word)
def hasPathCore(row, col, depth=0):
if self.length... |
01ede703e36268dc9b3331b21726c24674a43817 | e9b03fe553fb85f798d44607c57c43b3cb20dc50 | /Exercícios/1175.py | c138512e1633204873bee314837b6c9ed036ee6d | [
"MIT"
] | permissive | aldemirneto/Exercicios-Uri | 89cdebff9b1b02361a251dea83715d51e3ee44c3 | f246f0d3f6f10b9039f12e1e2a50a107d0718000 | refs/heads/main | 2023-04-30T06:04:25.415709 | 2023-04-17T01:56:56 | 2023-04-17T01:56:56 | 337,760,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | 1175.py | lista = []
z = 0
j = 9
for i in range(0, 10):
lista.append(int(input()))
while z < j:
c = lista[z]
lista[z] = lista[j]
lista[j] = c
z += 1
j -= 1
print(lista)
|
2c960685eaa14861c1c5b3ddb38b366a3e0e8e86 | d29d05d28b16ae661e7a45b1b9778e1c2809cf28 | /src/api/util/settings.py | 6d6ed6226cd4a7c4d1a832338b743b2c35c0dbcb | [
"MIT"
] | permissive | jiejieling/RdsMonitor | 47f96dea427324b276ac723fa664d61613a29b15 | 38247ceb8621249b161d0839a63c74a46e22ef8e | refs/heads/master | 2021-01-12T05:34:56.356490 | 2016-12-30T02:48:16 | 2016-12-30T02:48:16 | 77,124,225 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | settings.py | #!/usr/bin/evn python
#-*-coding:utf8 -*-
import os, sys, json
class settings(object):
filename = ''
config = {}
def __init__(self):
self.DEBUG = os.environ.get('RdsMonitor_DEBUG', 0)
def get_settings(self):
"""Parses the settings from redis-live.conf.
"""
# TODO: Consider YAML. Human writable, mac... |
988958c0515ffeca94fd6308b2bedf79609b35ad | 54b1a7b7de9eb68e458aae2df942ecf4e5073e44 | /tests/unit_tests/gui/mainWmixin3/test_tabTools_IERSTime.py | ad56ea3314dad7d7510a7e0cc4f6c0195e9c150e | [
"Apache-2.0"
] | permissive | mworion/MountWizzard4 | 63571af3b1367ec65170b5a7239125ce94a1bdec | bcdd2d0031998661db716247ed2b0051ec9fe11f | refs/heads/master | 2023-09-02T13:16:19.352550 | 2023-08-29T16:16:09 | 2023-08-29T16:16:09 | 148,897,111 | 28 | 8 | Apache-2.0 | 2023-02-15T18:23:33 | 2018-09-15T11:45:26 | Python | UTF-8 | Python | false | false | 6,258 | py | test_tabTools_IERSTime.py | ############################################################
# -*- coding: utf-8 -*-
#
# # # # # # #
# ## ## # ## # #
# # # # # # # # # # #
# # ## # ## ## ######
# # # # # # #
#
# Python-based Tool for interaction with the 10micron mounts
# GUI with PyQT5 fo... |
f9ca851c40b4cffb9e516c5282a5372b0b89e314 | f94be2d11da5c8a5fe3283e898808f1f043d51cc | /html_py/html_main.py | d46549aa2da69fbcfc3e6f88ae91c3c119fc5a43 | [] | no_license | mrrlanie/pytnon-first-course-AMI | 04f8270cce1f1b494bffbb17f47de9f9c13c0f67 | 4a69aef613793472caf723943cabca73e55753f5 | refs/heads/master | 2022-11-28T12:54:56.497175 | 2020-08-09T15:18:09 | 2020-08-09T15:18:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 767 | py | html_main.py | import sys, os, design
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QFileDialog
from PyQt5 import QtPrintSupport
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtPrintSupport import *
class HtmlEditor(QtWidgets.QMainWindow, design.Ui_MainWindow):
def __init__(self):
... |
34e6eb8c283529ee7944ad13978b5ed7e9652d18 | dacf248e04ed2ff223ebbd2bae36f2e1accd9800 | /sr.py | 943a4820b079321bf5048d5f41e22e32b5ea1495 | [] | no_license | nkemakolam/speech-recog | 4fbaac270ed6d6dfeb3e685d88dcf48144d3d081 | bd390e26f77f49767130c4c147191b19ab13f7e4 | refs/heads/main | 2023-07-23T10:35:59.674218 | 2021-09-01T15:17:14 | 2021-09-01T15:17:14 | 401,897,621 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,293 | py | sr.py | import speech_recognition as sr
sr.__version__
r = sr.Recognizer()
harvard = sr.AudioFile("male.wav")
with harvard as source:
print("processing clear wav file")
audio = r.record(source)
try:
s = r.recognize_google(audio)
print("Text: "+s)
except Exception as e:
print("Exception: "+str(e))
#for n... |
cf20f4be371f4beb741f496ed558a0ff55bb2766 | 4c996b5788c797441a3f0cc8684f0e5efc942754 | /external/gdal_data/SConscript | fa8e973ee976ba933d52c748ba4df0b7dbf989eb | [] | no_license | simple555a/ve-suite | 6fb933b55415bbc9856d73699e25b79f57693d1a | c4328eeeff2ae233fe7b099d1576e22636a9e47d | refs/heads/master | 2020-08-01T16:08:19.323927 | 2018-12-14T03:51:32 | 2018-12-14T03:51:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | SConscript | ##sets up the minerva data
import os, sys, string
pj = os.path.join
import SConsAddons.Util as sca_util
Import('ves_pkg buildDir RootDir GetPlatform')
ptConfigFile = ves_pkg.createFileBundle( pj('share','vesuite','xplorer','minerva') )
fontFile = sca_util.getFilesRecursiveByExt( pj(RootDir, 'external','gdal_data','da... | |
9641d240671f9be4c1aaff53de2e8dbf1832db63 | 7bc54bae28eec4b735c05ac7bc40b1a8711bb381 | /src/contradiction/medical_claims/token_tagging/solvers/probe_solver.py | b083d7253cefacdc4b490ec3d44d1d7aaf353ea2 | [] | no_license | clover3/Chair | 755efd4abbd5f3f2fb59e9b1bc6e7bc070b8d05e | a2102ebf826a58efbc479181f1ebb5de21d1e49f | refs/heads/master | 2023-07-20T17:29:42.414170 | 2023-07-18T21:12:46 | 2023-07-18T21:12:46 | 157,024,916 | 0 | 0 | null | 2023-02-16T05:20:37 | 2018-11-10T21:55:29 | Python | UTF-8 | Python | false | false | 1,856 | py | probe_solver.py | from typing import List, Tuple
import numpy as np
from bert_api.segmented_instance.segmented_text import token_list_to_segmented_text, SegmentedText, \
merge_subtoken_level_scores
from contradiction.medical_claims.token_tagging.online_solver_common import TokenScoringSolverIF
from data_generator.NLI.enlidef impor... |
7c9268346eff020aea45e8dbb50a863f3649aeb8 | 07a143056ac36c875783c98ab8506686943f4e88 | /board/main.py | 51eac85cd6692bace639d20961705c92a30fa4fc | [
"Apache-2.0"
] | permissive | cpwood/Pico-Stub | 28e1314a01d4413baf34ab275fe63cf4f92f6399 | 176af2962b4701805c81afed2e540d39e1adad82 | refs/heads/main | 2023-04-16T20:11:05.188095 | 2021-05-03T19:59:16 | 2021-05-03T19:59:16 | 332,889,198 | 28 | 10 | Apache-2.0 | 2021-05-03T18:42:44 | 2021-01-25T21:30:58 | Python | UTF-8 | Python | false | false | 334 | py | main.py | import time
from createstubs import Stubber
def countdown():
for i in range(5, 0, -1):
print('start stubbing in {}...'.format(i))
time.sleep(1)
stubber=Stubber()
# Add Pico module
stubber.add_modules(['rp2'])
stubber.clean()
stubber.create_all_stubs()
stubber.report()... |
16e9802477a26b8e73b5267b7406f03488e25faa | 0c674479036b335e4074b5aed8c14ed892c7b491 | /renmei/迁移分类pytorch.py | 424beeebb7711d6b32b5a9dfca59777d54eeaeaf | [] | no_license | NWU-SMART/2019TEAM-TrainCodes | 7d6616f141eca4f6274d1fdf33dca52038b366ae | 1da2c3d5d143813e187f6de9354064224d018d1f | refs/heads/master | 2022-10-31T08:47:50.268215 | 2020-06-11T12:33:31 | 2020-06-11T12:33:31 | 266,129,790 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,700 | py | 迁移分类pytorch.py | #=================2020.06.09======================
# ---------------------- 代码布局: ----------------------
# 1、导入 包
# 导入数据及与图像预处理
# 3、迁移学习建模
# 4、训练
#
# ---------------------- 代码布局: ----------------------
# -------------------------- 1、导入需要包 -------------------------------
from tensorflow.python.keras.utils import g... |
1ed4e5262abdbd390e8bc21aae414f40dc1ca4e8 | c335371414e2770f615dfa3c8838d91978f9526c | /main_app/migrations/0009_auto_20200924_2139.py | 148a8f80d5a96cd2535bd6547aaf792a386359fb | [] | no_license | Bijikyu/tavern | fdbf752f910d3b48a2aa5c36f6de198075dbed06 | 8c56edbdfb39bacfa3cac22f77d32c71c4bd5599 | refs/heads/master | 2022-12-18T00:50:22.204950 | 2020-09-25T15:48:09 | 2020-09-25T15:48:09 | 296,508,383 | 1 | 0 | null | 2020-09-25T03:53:16 | 2020-09-18T03:55:58 | Python | UTF-8 | Python | false | false | 399 | py | 0009_auto_20200924_2139.py | # Generated by Django 3.1.1 on 2020-09-24 21:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main_app', '0008_auto_20200924_0158'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='bio',
... |
d22b06a025a698d3dfcb89ff743c2bc925115470 | f6f8080197e454b2e6595f9e45aee6197e4c44d5 | /gFunctionDatabase/Management/retrieval.py | c4744d09b1cb511595c0ba4dca64ca0dfcf3fa9d | [
"BSD-3-Clause"
] | permissive | j-c-cook/gFunctionDatabase | 2bd3ad0003182b0fbe7ae26afad9c0aa92bb7258 | dec8080e3c16bcdb8cf6827a0ba2c9665eeee190 | refs/heads/main | 2023-08-16T04:43:35.754148 | 2021-09-28T21:25:26 | 2021-09-28T21:25:26 | 335,405,297 | 0 | 0 | BSD-3-Clause | 2021-09-28T21:25:27 | 2021-02-02T19:48:06 | Python | UTF-8 | Python | false | false | 7,517 | py | retrieval.py | from gFunctionDatabase import General
from . import data_definition
import natsort
import logging
class BaseRetrieval(data_definition.BaseDefinition):
"""
Base object for retrieving data from the database.
"""
def __init__(self):
super().__init__()
def load_data(self, configuration):
... |
dad891bf450c300f4867ebf14b8c1b9403c7bc79 | 0c368405f4215f66eb74feed566874a4719c6175 | /BGTKit/foundation_layer/functions/variable_management.py | f398582ddd13fbd7ea4585107be2f072c6b2e42f | [
"MIT"
] | permissive | michaelaraujo1991/BGTKit | cd8c2df250ddc83688c358c8e584670df4cb3781 | fad4f9cdb99bb40295cf07a1cfaa7aae5fa81401 | refs/heads/master | 2022-01-10T19:28:37.598521 | 2019-02-07T03:31:21 | 2019-02-07T03:31:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,586 | py | variable_management.py | import base64
from num2words import num2words
def ascii_to_character(code):
return chr(code)
def character_to_ascii(char):
return ord(char)
def hex_to_string(hex):
return string.decode("hex")
def number_to_hex_string(number):
hex(number)
def number_to_words(number):
return num2words(number)
def string_base64_decod... |