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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
afedb203defccc480f2a3a9851950a0d4e4da3e0 | 613bac317b6094b6d055e1d2e83576611a47b535 | /Lab-3/tsort.py | ed45012b3ddf4d25af6515aa06a8ebe66490c80c | [] | no_license | Bylundc/ME-499-Python | 2b082b9608613e35b5fc046d3e4d74dbb498a68d | 30fedc6855268bc61a2a4f5cf25eeaee442fa502 | refs/heads/master | 2021-01-19T03:52:24.929976 | 2017-07-26T20:11:39 | 2017-07-26T20:11:39 | 87,340,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | tsort.py | #!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
import timeit
# list lengths to be used
values = [1,10,100,1000,10000,100000,1000000]
# create random values
def ransor(k):
return list(np.random.randint(0,1000,size=k))
# function for sorted and sum
def tsort(k):
return sorted(ransor(k))
de... |
d8cccfa9c7b712d34644870d4be3c3203a3466d5 | eef877db6af61b03ce0f1d4ade228bf4f05ed5cf | /Old/config_port_address.py | 4ee86cf8e8d56de4d4824d0b5975cd896b1d84ba | [] | no_license | seeni-dev/Distributed-Math-System | 3f1d272e10eea873b8c8f5dfbfd2dd77203b859f | 583e70191aa747621747b5e54645650e94d842ac | refs/heads/master | 2022-09-20T22:17:08.534791 | 2019-02-19T13:34:47 | 2019-02-19T13:34:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | config_port_address.py | '''Following are the constants for connecting to master'''
MASTER_UDP_ADDRESS="localhost"
#machine-protocol-action-component
#master listening
MASTER_UDP_LISTEN_CLIENT_PORT=9000
MASTER_UDP_LISTEN_SLAVE_PORT = 9001
MASTER_UDP_SEND_CLIENT_PORT=9002
MASTER_UDP_SEND_SLAVE_PORT = 9003
#clients should be using less numbe... |
7e6825fd429236a5ea0520d0f59b194f88f074d6 | 61579fe691f1ad2d15a56d457b6a3f379eef2b42 | /Exercicios/calendarioPython.py | d4799660e1ef065b08ced38af3b10d1a6a8952f2 | [] | no_license | joobond/ExerPython | 766ff9844186407ee23f0a2674edb2d447e44696 | 583ae2053ae42f111caa6b227e6bffbd662b8ff7 | refs/heads/master | 2022-10-08T14:03:38.584732 | 2018-05-09T00:25:26 | 2018-05-09T00:25:26 | 123,592,162 | 0 | 1 | null | 2022-10-01T10:51:57 | 2018-03-02T14:55:14 | Python | UTF-8 | Python | false | false | 68 | py | calendarioPython.py | #Exercicio 7
import calendar
c = calendar.month(2018,3)
print(c)
|
1a81fd643df5e1d5dde70c1657127cedace7296d | 7dc5f409a02ab977d1080589f2d138fceb0fea53 | /例子-0720-02.python的输入.py | 768aa6165e58e16741543d28ffde2e18643e4513 | [] | no_license | blackplusy/0706 | 838b540b22441077b50e7c3e7144384e7ee8e8dd | d371341dd56a4e8308be6d100d6a7b26338089bc | refs/heads/master | 2022-12-01T10:27:28.937082 | 2020-08-01T07:38:03 | 2020-08-01T07:38:03 | 277,418,776 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | 例子-0720-02.python的输入.py | #coding=utf-8
#输入就是把input函数的值传入变量中,操作变量
#name=input()
#print('your name is %s'% name)
name=input('请输入您的法号!')
print('您的法号是%s'% name)
print(type(name))
name=int(input('请输入第一个数字'))
name2=int(input('请输入第二个数字'))
print(name+name2)
|
db61fe1ba2f5b4ba6d5c2bee41f755b38d25accc | fde1dc43145a35d4a7eb6c1dc8987c32caaa7dc8 | /pars/urls.py | 13e9c1a0a7140a5dd2043d394ade2860729027ca | [] | no_license | Ugagen/Discounts-Parser | 8cc7c4e006041750ba9d9c52efed194b07d542d5 | fb676b485486ca0c844614e2b574c0880e722709 | refs/heads/master | 2021-01-17T06:52:40.195069 | 2017-01-07T22:38:49 | 2017-01-07T22:38:49 | 51,495,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | urls.py | """pars URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... |
b79181bda1c2b8a21f1f25d14801c3e0ec3def42 | bbb7dc5807682cb93d71724fb73eb46e11b6205e | /registration/admin.py | 081996153cdce959d55b6cc282da8691b5c21234 | [] | no_license | JuliaCh08/dj_project | b9c8f78915d750215be4fbbeb44d1e9aa0248c2f | 6b3919faf08037a3f441a6925dab07fa70a64e2d | refs/heads/master | 2023-05-08T02:17:38.741030 | 2021-05-31T19:47:53 | 2021-05-31T19:47:53 | 372,616,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 974 | py | admin.py | from django.contrib import admin
from django.utils.safestring import mark_safe
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import UserProfile
class UserInline(admin.StackedInline):
model = UserProfile
can_delete = False
verbose_name_plural = 'До... |
47e4b17a4c718a348c1b63055acbf9b620be5e10 | 5d0054cddc14f6960304162ce1d5232b1a9bdec0 | /peer_reference/DE3-ROB1-FEEDING-master/Food.py | d8855fc01bd4dcc49993efacbe2a43a2b4c1b845 | [] | no_license | Antimony51122/Image_Processing | e94e080fe6f2ff6aea730aef30d65ba69b14967a | da6511ad2fbf10867af88eddb91ba1d43c82e327 | refs/heads/master | 2021-05-03T12:00:31.585425 | 2018-12-26T00:30:37 | 2018-12-26T00:30:37 | 120,491,786 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,815 | py | Food.py | from __future__ import print_function
import roslib
#roslib.load_manifest('my_package')
import message_filters
from message_filters import Subscriber
import sys
import rospy
import cv2
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
imp... |
6742ccb859c5525994419b9ad0e6a4f08949649f | 21399173a03f11fe32f9a62d11920face8540654 | /blockstrings.py | 5e0a0f6ef65b05969bc588ca891cfde068a7e6be | [] | no_license | josh-m/Unicurses-Hexmap | 9cbd209e60054dcb61c2480d66d4fde161942eec | ae506b7d57b70a948344896350486d3e3229f693 | refs/heads/master | 2016-09-05T22:18:13.793786 | 2015-05-14T19:39:20 | 2015-05-14T19:39:20 | 23,526,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,340 | py | blockstrings.py | """
blockstrings.py
Convert strings to 4x5 block characters.
"""
def convert(string):
"""Pass in a string, returns a list of 5 row strings"""
string = string.upper()
rows = ["", "", "", "", ""]
for i in range(len(string)):
b_char = BLOCK_CHAR[string[i]]
for i in range(5):
... |
389b6ca08c26e9ddfca4c067314a669da286f6a2 | 023cdd36da2263f6cb0466ac7b8886a0bd39b6e5 | /you2stems/you2stems.py | df41756bbac075d6b546d3c4541fc295949f17c6 | [] | no_license | johnwmillr/You2Stems | b5ef846ae7b2cf56080066ac05796ea5e98c9316 | 6f9ad78c6e65c4e50b706a61055cc525258d91f4 | refs/heads/master | 2022-04-24T15:11:41.210057 | 2020-04-25T19:07:15 | 2020-04-25T19:07:15 | 256,269,492 | 7 | 2 | null | 2020-04-25T19:09:00 | 2020-04-16T16:25:43 | Python | UTF-8 | Python | false | false | 5,263 | py | you2stems.py | """
You2Stems
John W. Miller
2020
"""
import os
import warnings
from datetime import datetime
import youtube_dl
from spleeter.separator import Separator
warnings.filterwarnings('ignore')
class Logger(object):
def debug(self, msg):
pass
def warning(self, msg):
pass
def error(self, msg)... |
d343c91f02603b5767b43feb28b880b8f3b5c782 | 7a550d2268bc4bc7e2fec608ffb1db4b2e5e94a0 | /0901-1000/0960-Delete Columns to Make Sorted III/0960-Delete Columns to Make Sorted III.py | 72a9207411a08a738f96dfdea94348a8edda71db | [
"MIT"
] | permissive | jiadaizhao/LeetCode | be31bd0db50cc6835d9c9eff8e0175747098afc6 | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | refs/heads/master | 2021-11-05T04:38:47.252590 | 2021-10-31T09:54:53 | 2021-10-31T09:54:53 | 99,655,604 | 52 | 28 | MIT | 2020-10-02T12:47:47 | 2017-08-08T05:57:26 | C++ | UTF-8 | Python | false | false | 361 | py | 0960-Delete Columns to Make Sorted III.py | class Solution:
def minDeletionSize(self, A: List[str]) -> int:
minDel = m = len(A[0])
dp = [1] * m
for j in range(m):
for i in range(j):
if all(A[k][i] <= A[k][j] for k in range(len(A))):
dp[j] = max(dp[j], dp[i] + 1)
minDel = min(... |
996db3de49fae01a0d0601bc9d22fb99d6658fd0 | 3b0d6e3a416150fb03d7a9cd02818f8861bb7acd | /setup.py | 543c16c680c9a97e4a2642c19523a51474af04e4 | [
"MIT"
] | permissive | fasemoreakinyemi/person-name-normalisation | c8a69ebbd2543cf3d626b6e13d454104944b95a8 | f97b5f958b1d33ceacf7757367fd55ea0e80df08 | refs/heads/main | 2023-08-28T07:50:17.283052 | 2021-10-18T13:02:10 | 2021-10-18T13:02:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | setup.py | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="personnamenorm",
version="0.2.12",
author="Klaus Lippert",
author_email="",
description="unifying person names in different notations",
long_description=long_description,
long_desc... |
88ab4a8e8c55227e81ad78c55ca722f3e56742ad | 075685808ae6f9e7ddc45fa70c693d8c541fc742 | /day2_alt.py | 7f806f3a4caafaee7c147c59f39b3a410b76f556 | [] | no_license | amstocker/aoc2018 | b62fb7b74680e177194b47cf1e4cebdf876dbe75 | fa8e22973ede473d73605d887a26c188aa9d3202 | refs/heads/master | 2020-04-09T01:33:14.038338 | 2019-12-05T04:35:30 | 2019-12-05T04:35:30 | 159,909,055 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | day2_alt.py | with open("day2_input.txt") as f:
l = f.read().split()
print(
(lambda l: sum([int(t[0]) for t in l]) * sum([int(t[1]) for t in l]))(
(lambda count, check, i1, i2: [(check(i1, d), check(i2, d)) for d in map(count, l)])(
lambda w: (lambda d, w: [d.update({c: d.get(c,0)+1}) for... |
6444bbe3ffb15c9f025ddd5db6235a44c5583ade | 8a00151dba09082feebb3bd79330cebc3d8e3432 | /turtle/等边三角形.py | 63da73f0be7f48cfc89770dadd9468aed4f6f898 | [] | no_license | yuebaii/python | 204736736e15b3d4c738f4e001bf3709f8b23460 | a00e82956f915eddcf8d750f6ee3ff4f5250587a | refs/heads/master | 2020-05-03T02:08:36.968387 | 2019-03-31T15:26:50 | 2019-03-31T15:26:50 | 178,359,561 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | 等边三角形.py | import turtle
def main():
turtle.setup(1300,800,0,0)
pythonsize = 20
turtle.pensize(pythonsize)
turtle.pencolor("blue")
turtle.fd(120)
turtle.seth(120)
turtle.pencolor("red")
turtle.fd(120)
turtle.seth(-120)
turtle.pencolor("yellow")
turtle.fd(120)
main(... |
7c4c622ab06b5b21b6dd63a1488e985368f51438 | aebe22cb2c7950fa1e40a6b5c084f53765b1c130 | /04.动手深度学习-Pytorch/03.线性回归/codes/01.linearRegression线性回归.py | d00897242a1066919171879f3c6ac8c698e305cb | [] | no_license | lwylx0131/y2x | 9860be11d27f6020626b7d8a72df695c4c0fa9e2 | 74d95d6160abee43c436f3a741bf40f801b486c8 | refs/heads/master | 2020-11-26T13:47:09.785144 | 2020-02-24T13:13:56 | 2020-02-24T13:13:56 | 229,091,204 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,761 | py | 01.linearRegression线性回归.py | # -*- encoding: utf-8 -*-
import torch
from time import time
a = torch.ones(1000)
b = torch.ones(1000)
start = time()
c = torch.zeros(1000)
for i in range(1000):
c[i] = a[i] + b[i]
print(time() - start)
start = time()
d = a + b
print(time() - start)
a = torch.ones(3)
b = 10
print(a + b)
import numpy as np
fr... |
ba21c0dac401f70ff75a402cf9cbb8f389e4cc96 | a656d3e4e6cf3df86ce263767a46cbb7377f99c1 | /dash_v2/uprwebsocket/tornado_handlers.py | a229d774b011ea0d32bdd157ce2bd10e02516992 | [] | no_license | charlysoledad/UPRobotics | c6453eaf2baa61593db5b23a84a1af1ebbb63ccf | 0b2ba62f54328287e6ad75f2ce0ef06c32fa7148 | refs/heads/main | 2023-03-31T08:08:11.658431 | 2021-03-26T21:17:00 | 2021-03-26T21:17:00 | 351,917,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,785 | py | tornado_handlers.py | from os.path import abspath, dirname, join
import json
from tornado.ioloop import IOLoop
from tornado.web import StaticFileHandler
from tornado.websocket import WebSocketHandler, WebSocketClosedError
import logging
from uprwebsocket.udp_socket import *
#from uprwebsocket.http_socket import *
logger = logging.getLog... |
b4b8261d638f9f35c31991fc7c261b14ee677992 | e7727fbb00c73818de931a584af58657eeb69513 | /dymos/examples/aircraft_steady_flight/steady_flight_path_angle_comp.py | 5ed120b89e48ebd6074aff2804319b807b59f7c6 | [
"Apache-2.0"
] | permissive | OpenMDAO/dymos | f3bb20ebccf5f9408295403c72cb1b25c8e48019 | 1aca42a4fedcca6e493c5516fadc2d78e4709797 | refs/heads/master | 2023-08-18T15:30:20.664129 | 2023-08-09T12:33:12 | 2023-08-09T12:33:12 | 121,387,262 | 165 | 56 | Apache-2.0 | 2023-09-14T17:51:14 | 2018-02-13T13:44:34 | Python | UTF-8 | Python | false | false | 1,306 | py | steady_flight_path_angle_comp.py | import numpy as np
import openmdao.api as om
class SteadyFlightPathAngleComp(om.ExplicitComponent):
""" Compute the flight path angle (gamma) based on true airspeed and climb rate. """
def initialize(self):
self.options.declare('num_nodes', types=int)
def setup(self):
nn = self.options[... |
e5f100489c116bcaf6026f377de7e30c745e78f5 | a413f2b2617a830f15737ed1c655af90d2d7f4e9 | /blueprints/donations/donations_blueprint.py | cf5346f5d7e02fbaea70453b9ce9208bd04b0b1c | [] | no_license | qaqaqaqaowh/insta-flask | 679ced528ad169c85eacf0a59f5fc1313c06aa05 | 6d79adc92559b5a09a3e0207a5dba43efb4f7d92 | refs/heads/master | 2022-12-13T21:55:33.147511 | 2018-12-03T03:16:18 | 2018-12-03T03:16:18 | 157,854,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,077 | py | donations_blueprint.py | from init import db
from flask import Blueprint, redirect, request, url_for, flash
from helpers.render import render
from flask_login import login_required, current_user
from helpers.csrf import csrf_validate
from helpers.payment import bt_pay
from models.donation import Donation
from models.image import Image
donatio... |
19360c0371d9779376f5486035213f1e0e0fa6dd | 43f0c348a9a50f606c0a687fe6e491be9ebb5040 | /apps/mock_sets/apps.py | 2e8676018ab223e2711996bcd5cb32ee5692eac8 | [] | no_license | muchemicarol/mock_set | fae5ae6b6124de54cfef5c5c2f65c276798e85f4 | 4326a59c19175710e1f09b113c1ddf73667b70d2 | refs/heads/master | 2023-04-21T08:46:02.291435 | 2021-05-28T19:44:28 | 2021-05-28T19:44:28 | 341,316,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 92 | py | apps.py | from django.apps import AppConfig
class MockSetsConfig(AppConfig):
name = 'mock_sets'
|
d4503c9b6e9b6aa210599c6e3a60b322dfd33ae4 | 89b2f5b08c441d4af0a63ed2ec1a5889bc92f0f7 | /Python OOP 2020/OOP_2020_exam_prep/Retake_22.08.2020/Exam/tests/test_room.py | d06092b90066ca9563027a2fcde18b163bd7c96a | [] | no_license | KoliosterNikolayIliev/Softuni_education | 68d7ded9564861f2bbf1bef0dab9ba4a788aa8dd | 18f1572d81ad9eb7edd04300deb8c81bde05d76b | refs/heads/master | 2023-07-18T09:29:36.139360 | 2021-08-27T15:04:38 | 2021-08-27T15:04:38 | 291,744,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,429 | py | test_room.py | from project.people.child import Child
from project.rooms.room import Room
import unittest
class TestRoom(unittest.TestCase):
def setUp(self):
child_one = Child(5, 1, 2, 1)
child_two = Child(3, 2)
self.room = Room("Test", 500, 2)
self.room.children.append(child_one)
self.ro... |
bcf841e0bae4b8517c76c4dbb8651f35e9cc69ae | fc48d57c92ae3ac81738bbd945c6ac76f15d1745 | /test_temp_conversion.py | e68126b9437ceb033d785e3dfdb1cd1e0d62480f | [] | no_license | tj-ikonen/climate-analysis | 049e95ed8876cf697728cdae96cffe9c8b073a7a | 92a1bf0904e0522b717b5782b2a1ec27db9cdb38 | refs/heads/master | 2021-01-10T02:41:07.097071 | 2015-12-16T14:53:08 | 2015-12-16T14:53:08 | 48,105,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | test_temp_conversion.py |
# test the various temperature conversions
import numpy.testing as npt
from nose.tools import raises
from temp_conversion import fahr_to_kelvin
from temp_conversion import fahr_to_celsius
def test_basic():
"""basic test"""
npt.assert_almost_equal(fahr_to_kelvin(20), 266.483333, decimal=2)
def test_zero_kelvin():... |
4eae9755d37ffb9f3446e117183743a57e40f92a | a939e018333a9ecd26ddc618f99835b7eb381686 | /le_crawler/old_spiders/baidu_index_spider.py | 4a63f28ae518817fb739f347927fd9f637c98170 | [] | no_license | cash2one/crawl_youtube | bff5ba254001c2f31f770e55a4aca39bc54e45ee | 0dc40186a1d89da2b00f29d4f4edfdc5470eb4fc | refs/heads/master | 2021-01-16T22:30:17.800282 | 2016-02-18T11:50:09 | 2016-02-18T11:50:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,924 | py | baidu_index_spider.py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
# Copyright 2015 LeTV Inc. All Rights Reserved.
__author__ = 'guoxiaohe@letv.com'
''' short way for scrapy baidu index '''
import urllib2
import urllib
import cookielib
cj = cookielib.CookieJar()
cookies = urllib2.HTTPCookieProcessor(cj)
opener = urllib2.build_opener(cooki... |
cf8d9572a3ae416bd72d7ddc2c9d7142f96d86fd | 8017daea8a759f90a75eec3341c1cba7fd0c9d1d | /Python/MachineLearning/RegPred/VeriAnaliziProblemTespiti/kategorikveriler.py | c250bf5aa994f82ec03f855c606cf922d32ff02c | [
"MIT"
] | permissive | programmer-666/Codes | 97c89a2c12dd6a3c5544b8c5ec42364fd900369d | fdffe38a789ba3636dff7ceaa9f1b4113ae17c2b | refs/heads/master | 2023-07-16T22:54:48.519533 | 2021-08-28T20:43:27 | 2021-08-28T20:43:27 | 287,129,668 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 422 | py | kategorikveriler.py | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 14 02:40:00 2021
@author: suhar
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
data = pd.read_csv('eksikveriler.csv')
ulke = data.iloc[:, 0:1].values
le = preprocessing.LabelEncoder()
ulke[:, 0] = le.fit_tra... |
c4be357fa06559ccad35929b2bc024424dd5a080 | 0954faaf0c183d130663d76b390284d10112839e | /code/gui.py | a40ba3389a8c111eb98db12d10b28505b25e4b89 | [] | no_license | himanshugharat/proj | 6ac53fd2b34e9260634be68de932b6127d158caf | 91c1be25da5c28f02bd55a4f7ebbfa31bbb6e9e9 | refs/heads/master | 2022-04-24T23:15:17.726152 | 2020-04-21T09:47:04 | 2020-04-21T09:47:04 | 257,548,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,520 | py | gui.py | from tkinter import *
import tkinter as tk
from tkinter import filedialog
import shutil
import os
import sys
import numpy as np
import os
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from skimage.feature import greycomatrix,greycoprops
import pandas as pd
import cv2
from skimage.measure... |
86dcbfa3c3380fc5f8a08a916767d795d15b81b8 | fdc24295d1cb39da093a254efa7a7cb07644a27f | /python_basic/list_to_dict.py | 26b1abf4ec20b46a47fd950fe99fa3404d964b74 | [] | no_license | lijiale0625/lijiale-zuoye1 | 0bba345ac6f511a4cf9bdf054484924cf984e14e | e000ff4f0d8434aa500f558ebda45ac953fccdd6 | refs/heads/master | 2020-12-02T07:57:07.890291 | 2017-11-11T08:53:15 | 2017-11-11T08:53:15 | 96,751,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | list_to_dict.py |
a=[('1', '1'), ('2', '1'), ('3', '1')]
b = [('1', '1'), ('2', '1'), ('3', '1')]
c=[('3', '21609'), ('1', '1'), ('2', '1')]
d = [a,b,c]
result=[]
for list in d:
print dict(list)
result.append(dict(list))
print result |
a44a806edd81edec5de0ecef60a1ad990371f6ab | 4569d707a4942d3451f3bbcfebaa8011cc5a128d | /motdplugin/0.12/tracmotd/motd.py | a558a7e05df55ed9d9f7230ae0ba31e6d3cfd9ed | [] | no_license | woochica/trachacks | 28749b924c897747faa411876a3739edaed4cff4 | 4fcd4aeba81d734654f5d9ec524218b91d54a0e1 | refs/heads/master | 2021-05-30T02:27:50.209657 | 2013-05-24T17:31:23 | 2013-05-24T17:31:23 | 13,418,837 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,991 | py | motd.py | """
Created by Christian Masopust 2011
Copyright (c) 2011 Christian Masopust. All rights reserved.
"""
import re
import time
import datetime
import os.path
from trac.core import Component, implements
from trac.web.api import IRequestFilter
from trac.web.chrome import ITemplateProvider, add_stylesheet, add_script,... |
4290f7dc271e5daf1e245a18a1126cd1db6313e9 | cc0efacbd20829543a243bfea0626238415e3426 | /django-documnet/document-application/admin.py | 71a5680d818140e50b3c8f5219abfb4daf2c71bd | [] | no_license | maldanna/Document-Classification | 3e031c72cf38d25df8ea6aef0982212041d6f6a3 | 55744e344a0f085153d179f4b4887d735b4000db | refs/heads/master | 2020-04-27T07:36:49.644636 | 2019-03-15T16:39:38 | 2019-03-15T16:39:38 | 174,141,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | admin.py | from django.contrib import admin
from .models import Profile1
admin.site.register(Profile1)
|
3e3a54aa3fb2d4a824d9da81eac5693c06286bf5 | 6af98141b74c34685c87759e61afdc2cfde0e8e8 | /programa31.py | f2d211961fc2e6f7b1d0f8e025baf0e2956b0aaa | [] | no_license | Rodagui/Programas_Teor-aComputacional | 33681efa10a8b45096d825c5765c3da9eb8bbaab | 5509e0d2d72e7fec16376b1bd4eb03b8dc8a8411 | refs/heads/master | 2020-07-15T13:58:00.574674 | 2019-08-31T18:00:01 | 2019-08-31T18:00:01 | 205,578,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | programa31.py | #Programa 31: Cuenta las ocurrencias de una subcadena en una cadena.
def cuentaSubcadenas(cadena, subcadena):
veces = 0
indice = 0
while(indice != -1):
indice = cadena.find(subcadena, indice)
if(indice != -1):
veces += 1
indice += 1
return veces
# -------------- Main ------... |
43e3634a34be21efc64b0891ecfded49839dbe05 | 883654a07f5899177c8a45fa39117681b90d6b8d | /reduce.py | cf320b08e40b1c565caa449aae188a3593591b43 | [] | no_license | nadyabessonova/NPL | 0cf45ffc5a5adf50324ac45e84bacf6ccd6d2402 | ef05a913dd5976cd8ff097e0f855f303335f82b7 | refs/heads/master | 2016-09-08T01:29:12.676188 | 2015-04-02T08:35:44 | 2015-04-02T08:35:44 | 32,179,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | reduce.py | import sys
(last_key, sum) = (None, 0)
for line in sys.stdin:
(key, val) = line.strip().split("\t")
try:
val = float(val)
except ValueError:
continue
if last_key == key:
sum = sum + val
else:
if last_key:
print "%s\t%s" % (las... |
2a1df2795c658dcb9ab50e40cbe107b028138e21 | e1fc93bea161969e2e262d5cc4bcb02128dbdd39 | /evaluation.py | 31d8df8665e7899bb5c2f0743cd101bd94ea8efc | [] | no_license | Sojiro323/twitterAPI | 079991b221de5cd963e7615e579982e5fbce68ad | 0c83371c52adc945abf0571791ae40391cd580fa | refs/heads/master | 2021-09-06T18:33:07.126042 | 2018-02-09T19:15:53 | 2018-02-09T19:15:53 | 106,917,864 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,554 | py | evaluation.py | # -*- coding:utf-8 -*-
from connect import database
import os
import math
'''global variable'''
methods = ["", "_friend", "_follower", "_mutual", "_tweet", "_profile"]
path = "../query/evaluation/"
def nDCG(queryID):
rec_list = []
ideal_list = []
SQL = database.select("SELECT ID, result from query where queryI... |
e987841b063233e9da8290405d19a251c6f00edc | 04947b2afbfd685ea1e090378b9356de82774a05 | /src/ANN.py | 103aa33a2bab97a0aea8dd7c712aedbfc18272bc | [] | no_license | leejiaj/Backpropagation-Algorithm-Neural-Networks | 51a4ce1dbcd5964cb91254327df9c1f8e3b5e375 | 15790efcf964448e67f4ca0db7a35b22331b944b | refs/heads/master | 2021-05-12T15:05:37.943417 | 2018-01-10T15:40:44 | 2018-01-10T15:40:44 | 116,974,530 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,433 | py | ANN.py | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 21 16:57:36 2017
@author: leejia
"""
import pandas as pd
import sys
import random
import math
#!/usr/bin/python
if __name__ == '__main__':
global inputDataset
inputDataset = sys.argv[1:][0]
global trainingPercent
trainingPercent = in... |
6e266dfe9d7469c00d0d025cd184f28abce6740c | f80c689b49125321342206930f30dede37b2b117 | /app/api/v1/endpoints/user.py | 782f92acd47774dcbf76718bf871bc43c3789fda | [] | no_license | AnsaganK/NProject | 6c74ee9126989c06ac6f85fedea7da9820b046ca | 6c043fba5b0f2c21724bca5773c4eee898760052 | refs/heads/master | 2023-06-04T13:29:15.789316 | 2021-06-21T13:14:10 | 2021-06-21T13:14:10 | 345,971,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,609 | py | user.py | from app.models.organization import Organization
from db import session
from fastapi import APIRouter
from sqlalchemy.orm import selectinload
from app.schemas.user import UserSchema, userForRolesSchema, allFullUserSchema
from app.schemas.UserRole import UserRoleSchema
from app.models.user import User
from app.models.r... |
44299beff0b1c4a0c968e8513502fbfd38b16a57 | 58e9be5cde51e2e0f7965da85b5c3bed22686a7a | /module1-introduction-to-sql/rpg_queries.py | 3ad11a951f0cebf4fdbd1c17d82790585a271cca | [
"MIT"
] | permissive | maiali13/DS-Unit-3-Sprint-2-SQL-and-Databases | 12356160557bebc330f1c2a9e3ae71f16e642d3a | af3f6b6a11514f8605d4db6c0793f57f0082b14f | refs/heads/master | 2022-04-25T07:36:39.676523 | 2020-04-17T17:59:41 | 2020-04-17T17:59:41 | 255,261,448 | 0 | 0 | MIT | 2020-04-13T07:36:08 | 2020-04-13T07:36:08 | null | UTF-8 | Python | false | false | 3,429 | py | rpg_queries.py | import sqlite3
# construct a path to wherever your database exists
#DB_FILEPATH = "chinook.db"
#DB_FILEPATH = os.path.join(os.path.dirname(__file__), "..", "rpg_db.sqlite3")
conn = sqlite3.connect("/home/mai/Desktop/DS-Unit-3-Sprint-2-SQL-and-Databases//module1-introduction-to-sql/rpg_db.sqlite3")
#print("CONNECTION:... |
d5c7f2347147521826b84a5febba874d2d64a599 | 9f4181980aecd4e98aea0c28c8290e6ea2117265 | /func_factorial.py | 28d43ba393f4bc7d2c2eff226b4d64f4b899b6bc | [] | no_license | IshaBharti/python_list_loop_ifelse_fun | e25d930250e8231dcd72ed9dcf1a15d876446ca7 | 6b278638e6c727cc433858546333c6583e921b82 | refs/heads/master | 2022-11-27T09:01:11.313202 | 2020-08-08T05:55:01 | 2020-08-08T05:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | func_factorial.py | 5. Write a Python function to calculate the factorial of a numbe
def fact(user):
i=1
fact=1
while i<=(user):
fact=fact*i
i=i+1
return fact
a=int(input("enter a numver"))
print(fact((a)))
|
313673a8a9580734f9650afa98cd8f2bc5fa7db4 | 2f5c4bdc5e63b0d104bf1baa2ff3ce0a9a49b2be | /dht22_for_rpi.py | f5881187e83a1c353f8d17dac08fb718d996609b | [] | no_license | keptsecret/Air-Quality-Sensor-Scripts | fed1fb38e2725eda890c55114a93bf917ac93440 | d432b8e320f6995081ad7f9848f23da45cc72b59 | refs/heads/master | 2020-08-10T00:51:19.987381 | 2019-10-10T15:36:49 | 2019-10-10T15:36:49 | 214,214,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | dht22_for_rpi.py | import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(0, GPIO.IN)
humid, temp = GPIO.input(0)
heatindex = -42.379 +
2.04901523 * temp +
10.14333127 * humid +
-0.22475541 * temp*humid +
-0.00683783 * pow(temp, 2) +
-0.05481717 * pow(humid, 2) +
0.00122... |
808288abe0628ce5a0aef2b47808b9c9b34def48 | 4cd537e6d3b65a1d6d54fa4fa7596b98c20abe40 | /lexicon/corpus_wikipedia/filtrar.py | b4847b4b6b8b20453336167db76ff5385e6b62eb | [] | no_license | gsiriani/proyGrado | 3386c6be80b5ea399e6a6bce7b298305aae3f0a3 | ba1e83c7b9b225d3ba236e1dcf6d92629eb7c989 | refs/heads/master | 2020-12-22T03:32:58.673947 | 2018-02-28T23:17:37 | 2018-02-28T23:17:37 | 58,835,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,186 | py | filtrar.py | from codecs import open, BOM_UTF8
import csv
import sys
import io
... |
f39f7276907f925360d6713846a347d972b4ff5f | 166b68758941c2e2cc67b82b946f0e8586b30dff | /thyaura_app/config/thyaura.py | ac1c70be1ce51defddbee972d71f76b6e8fcb423 | [
"MIT"
] | permissive | woakes070048/Thyaura-App | 550dee14112c251af8dc5a83a6f995bee6ca339f | 5efe465094eee8f3765359758df1739b6fac0f7e | refs/heads/master | 2021-03-16T05:24:21.712507 | 2017-04-27T09:20:18 | 2017-04-27T09:20:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | thyaura.py | from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Forms"),
"icon": "icon-star",
"items": [
{
"type": "doctype",
"name": "Payment Voucher Form",
"description": _("Payment Voucher Form"),
},
{
"type": "doctype",
... |
d9362b64f1134bc0bff0023c5b8d480ee89779c3 | 0237cf511716b9882b7c0153c581b1df324153f3 | /2019/xddd.py | 4d3e51de5fd798191bfc058590003f42a62f3d00 | [] | no_license | jakubchudon/Matura | 1b6df524b2f678ffd885cd4e72306825f256736b | a8302be4a121592efe19d23fe46d1789ad7ea827 | refs/heads/master | 2021-03-18T09:44:42.167316 | 2020-07-20T14:45:25 | 2020-07-20T14:45:25 | 247,053,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | xddd.py | def rek(x,p,k):
T=[1,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17]
if p<k:
s=(p+k)//2
if T[s]>=x:
return rek(x,p,s)
else:
rek(x,s+1,k)
else:
if T[p]==x:
return p
else:
return (-1)
hh=rek(2020,5,14)
print(hh) |
c69a7e0c655b6988f760ed0c26fade5e5e72d831 | 779dedfd9e30e8d0a5ff07279f4246c3d2ca863c | /html_to_pdf.py | c04caf12c5ae415ee64a3aac469e509008319d76 | [] | no_license | mukulgupta977/Django-rest-framework-html-to-pdf | 7bc8f1bd1b3493093dcc5159e6cdd0a3758b191f | c1d62723f19b3f6fe5b51196daa680c0f1cddc9c | refs/heads/master | 2020-07-29T10:53:58.870108 | 2019-09-20T11:33:50 | 2019-09-20T11:33:50 | 209,769,699 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,545 | py | html_to_pdf.py | # Django-rest-framework-html-to-pdf
from rest_framework.views import APIView
from weasyprint import HTML
from django.http import HttpResponse
from datetime import datetime
from rest_framework.parsers import BaseParser
import os
class PlainTextParser(BaseParser):
"""
Plain text parser.
"""
media_type ... |
496efa29b288bae261267815c4e4078f3992cd07 | 89c59636afdbbff60e6d7c81513b734a3d0d85c7 | /java/hello.py | 7d96c5242d65c511ac0286421c7d35c83541ca03 | [] | no_license | harrysaini/playground-code | afe966b5f23bf9466e9bfa1c7f40dbafeb2cb1a9 | d1188ebe87916dabb2643c700fe248b38318eb48 | refs/heads/master | 2023-02-05T14:02:58.918268 | 2020-01-13T06:44:07 | 2020-01-13T06:44:07 | 162,682,385 | 0 | 0 | null | 2023-01-14T00:11:52 | 2018-12-21T07:38:27 | Jupyter Notebook | UTF-8 | Python | false | false | 682 | py | hello.py |
# @param A : list of integers
# @return an integer
def largestRectangleArea(A):
map = {}
prevMap = {}
max = -float('inf')
for current in range(len(A)):
height = A[current]
map = {}
for j in range(1, height+1):
prev = current - 1
if(prev >= 0):
... |
b13686f5ed4a82892bc4bd5002e6f145dbd061b6 | 6dc4483e72aca6361d8ef3a8144aab3a64cd0ec5 | /Previous Work/PlotLyZip/plotly/tests/test_optional/test_offline/test_offline.py | 80eea89517f6ffc0e1a18b64fa57b82cd7183bc3 | [
"MIT"
] | permissive | anl6cc/Capstone-Project | 181a9183661014dba27b2ed3a24348104acfa391 | cd57a3444522e3d1d58998af363bf9c289eeb1a2 | refs/heads/master | 2021-01-10T13:54:55.438037 | 2016-05-02T07:15:35 | 2016-05-02T07:15:35 | 44,637,475 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,290 | py | test_offline.py | """
test__offline
"""
from __future__ import absolute_import
import os
from nose.plugins.attrib import attr
from nose.tools import raises
from unittest import TestCase
import plotly
from plotly.exceptions import PlotlyError
dummy_js_url = ('https://gist.githubusercontent.com/chriddyp/'
'f40bd33d1eab... |
c23125018a77508dad6fd2cb86ec6d556fbd1019 | bc81a4613f4e6217aab2c34a98ffabaa62ff82bd | /mkscr_psfex.py | a5ca05a1eed2c2441d5087bde119de3e95f294e6 | [] | no_license | joungh93/HSC_sephot | b147576e7bc9af164f16c37b93a4c54ee7fd5d35 | ae6506265c80482d6d8d9b8c327751cacfd85e8c | refs/heads/master | 2023-02-17T09:15:02.794940 | 2021-01-19T02:40:54 | 2021-01-19T02:40:54 | 205,089,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,332 | py | mkscr_psfex.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 21 11:40:26 2020
@author: jlee
"""
import time
start_time = time.time()
import numpy as np
import glob, os
from astropy.io import fits
import init_cfg as ic
# ----- Making scripts for PSFEx ----- #
os.system("psfex -dd > config.psfex")
if ic.... |
81688d51696156905736b5de7a4929387fd385ab | 24acef31723117e5d17532133a087585296807b5 | /run.py | 066cbd213525df93dcc0133b62724dc2c0cd1c52 | [] | no_license | davzha/DESP | 840470d008495723ee649eb16915724069ca55d4 | bb120c59fb93b5a914ffe6160df3fc14befec810 | refs/heads/main | 2023-06-22T06:17:17.316737 | 2021-07-12T13:05:57 | 2021-07-12T13:05:57 | 331,037,225 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,368 | py | run.py | import argparse
import datetime
import importlib
import pprint
import time
import random
import numpy as np
import torch
from torch.utils.tensorboard import SummaryWriter
from utils import get_git_state, time_print, AverageMeter, ProgressMeter, save_checkpoint
def train(cfg, epoch, data_loader, model):
data_tim... |
d90942f22cbbd9cfc3a431b7857cd909a7690966 | 8245b7125d59aa16dc55bd9ca048de32f582cc81 | /src/utils/constants.py | 40886b8ef9c09ea3b132c9337f366220c3c60f0a | [] | no_license | harmydiano/wallet_system | bec2d089768a52e05caf1e323c78a8ee146c1cb4 | 384f16e7f218ed8014743c0f39f293c3443a80ab | refs/heads/master | 2023-03-19T10:42:39.456213 | 2021-03-08T21:59:40 | 2021-03-08T21:59:40 | 341,209,209 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | constants.py | OK = 200
CREATED = 201
NOT_MODIFIED = 304
UNAUTHORIZED = 401
FORBIDDEN = 403
BAD_REQUEST = 400
NOT_FOUND = 404
CONFLICT = 409
UNPROCESSABLE = 422
INTERNAL_SERVER_ERROR = 500
NOT_IMPLEMENTED = 501
SERVICE_UNAVAILABLE = 503
ADMIN = 'admin'
ELITE = 'elite'
NOOB = 'noob'
WITHDRAW = 'withdraw'
FUND = 'fund'
|
54ec1961f4835f575e7129bd0b2fcdeb97be2f03 | 39749e352f518ee81ee1a6ddc8c13fb959dc1935 | /cli.py | c9fe1674e7d939a2d7d6fdad6c68673300d26cab | [
"MIT"
] | permissive | umich-dbgroup/duoquest | 6fea225cb084d93700739917b6d7b390352936ce | 92c88d90f73b2b5712af6dc024cd32493fc7c8e6 | refs/heads/master | 2022-09-26T23:28:15.312824 | 2020-01-30T17:55:36 | 2020-01-30T17:55:36 | 192,533,609 | 4 | 0 | MIT | 2022-09-23T22:32:55 | 2019-06-18T12:15:21 | Python | UTF-8 | Python | false | false | 3,910 | py | cli.py | import configparser
import sqlite3
import time
import uuid
from duoquest.tsq import TableSketchQuery
def input_db_name(conn):
while True:
db_name = input('Database name (default: concert_singer) > ')
if not db_name:
db_name = 'concert_singer'
cur = conn.cursor()
cur.ex... |
2fe20f28fc7bba6b8188f5068e2b3c8b87c15edc | 58cabb85e32ac75d7b8edfd2fd45dbd9ab99d41c | /nfa2regex.py | e05dfecd14c076f60c731e38f87d5f7c0b35a76a | [
"MIT"
] | permissive | max99x/automata-editor | f834ea528d7d630b46ea8b4116adecaf895ab420 | b700849f0925662acf56b0e50fff0098b94d8a62 | refs/heads/master | 2021-07-03T19:25:46.712321 | 2021-03-19T15:14:07 | 2021-03-19T15:24:12 | 1,699,740 | 18 | 6 | null | 2021-06-08T22:33:20 | 2011-05-04T05:07:10 | Python | UTF-8 | Python | false | false | 11,081 | py | nfa2regex.py | from util import AutomataError
from automata import NFA
from base import Node
from copy import copy, deepcopy
from os.path import commonprefix
DEBUG = False
LAMBDA = u'\u03bb'
PHI = u'\u00d8'
def copyDeltas(src):
out = dict()
for k in src:
out[k] = dict()
for k2 in src[k]:
out[k]... |
aa579025cacd11486a101b2dc51b5ba4997bf84a | 4f885e0190dc13e181ad3f8f5454c16ed46c998f | /src/utils/url_path.py | 124a1d7c7ee9fa6fc3a3d429e6d76f675fb7017f | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | Mallik-G/DeltaWarehouse | 9a874d21c341efae0b5aae382125ee897ab17adf | 2c57e6176d9461a287ee925f9006fdfef8da5653 | refs/heads/master | 2022-11-25T08:44:06.582037 | 2020-07-03T10:38:07 | 2020-07-03T10:38:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | url_path.py | class UrlPath:
@staticmethod
def combine(*args):
result = ''
for path in args:
result += path if path.endswith('/') else '{}/'.format(path)
#result = result[:-1]
return result |
a1304f290e0346e7aa2e22d9c2d3e7f735b1e8e7 | c628fc6e2e501519400d627e3cee58c32f0e2099 | /models.py | 578d2432d40ba9a556def8170a8b0115108ca74f | [
"MIT"
] | permissive | omkz/signup | 9798a6631041a60ed923059f1b4aa3a5e119f944 | fc890e719530aa1271baa05ddf327f4494bbbab5 | refs/heads/master | 2020-12-25T01:43:34.811366 | 2012-04-27T05:02:30 | 2012-04-27T05:02:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | models.py |
# We don't need no stinking models but django likes this file to be there if you are an app
|
368e209f83cc0cade81791c8357e01e7e3f940c8 | 5b5ad0fbf8aa457be87d71723f9a37d143443566 | /Project_3/getkey-secure.py | 7cbb7a0ce00950d8b2f2707ed89ddde7ca0a2e41 | [] | no_license | benkatz-12/CSCI-4830---Computer-Security | c73b49e6ae592d53cda20810a7ee4f374c609057 | 1129d06bb599f3bc8b372fc17b993ade7394624c | refs/heads/main | 2023-09-06T04:29:04.000766 | 2021-11-19T02:07:46 | 2021-11-19T02:07:46 | 357,609,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | getkey-secure.py | #!/usr/bin/python3
import requests
import urllib3
urllib3.disable_warnings()
response = requests.get('https://freeaeskey.xyz', verify=False)
data = response.text.encode('utf-8')
key = data[data.index(b'<b>')+3:data.index(b'</b>')]
print(key.decode('ascii'))
|
57516a17c1f3ee208076852369999d74dbb2b3ba | e9a42249134b740b3c01fc0e1a8183e959028a27 | /code.py | 42d9f0e5c574cd03b928a2fed6d77baa83d128b2 | [] | no_license | GoogleJump/AdvisorAnimals | a292324171c67eeceeb2fd97d4f6cdfc270805be | 06a6bd85f33194bd7f8dcfef04699f6b227d8e10 | refs/heads/master | 2020-03-26T02:53:40.636207 | 2014-03-10T17:34:11 | 2014-03-10T17:34:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | code.py | def helloWorld():
print "We are in DEMO land!"
for i in range(10):
helloWorld()
print listBuilder()
def listBuilder():
b = []
for x in range(5):
b.append(10 * x)
return b
print "[done, for real]"
|
174f744b641ee20272713fa2fe1991cb2c76830a | ed286bbb6319707cdbd6cfb83e6c347e18829afb | /BrokerageTable/models.py | 163d0321d60056d5b4e1d4df957e263e9abb8458 | [] | no_license | lostandlucky/RealtorAdvantage | a1ddccf6d6b0e384b4f312ae5fb17b09e583aab0 | d7da22281e223426576cc68f7a1876428d634ebe | refs/heads/master | 2020-04-06T06:55:47.778736 | 2016-08-21T03:09:23 | 2016-08-21T03:09:23 | 64,322,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | models.py | from django.db import models
class Brokerage(models.Model):
BrokerageName = models.CharField(max_length=500)
#To-Do Fix additional settings for ImagesFields/FileFields
#BrokerageLogo = ImageField
ReviewLink = models.CharField(max_length=1000)
ContactLink = models.CharField(max_length=1000)
TotalAgents = models.I... |
1766e88fb79fb39c3c7ff5f6b8acf4e45849aead | 476ad8174e668872c9ff23cad08eeb5c86b60f03 | /python/triton/ops/blocksparse/softmax.py | 2b0d904fad75c34910a73581fb7ab40b7643226c | [
"MIT"
] | permissive | beyondliyang/triton | d13c4f0922467d9e55c8a7391373274ecbece79b | a598fba0f5ad2db54bf0bbcbe9f23b85c408fc25 | refs/heads/master | 2023-03-31T16:04:54.242519 | 2021-03-29T06:35:13 | 2021-03-29T06:35:13 | 356,510,433 | 1 | 0 | NOASSERTION | 2021-04-10T07:45:55 | 2021-04-10T07:45:54 | null | UTF-8 | Python | false | false | 7,647 | py | softmax.py | import triton
import torch
import os
fwd_src = triton.read(os.path.join(os.path.dirname(__file__), 'softmax.c'), kernel_names=['forward'])
fwd_kernels = dict()
bwd_src = triton.read(os.path.join(os.path.dirname(__file__), 'softmax.c'), kernel_names=['backward'])
bwd_kernels = dict()
class _softmax(torch.autograd.Fun... |
d9b903925047e17f2b4bf90f080785433bb907d6 | df06a3e9c322ec1eb34e2d6668161f1cd9dea915 | /page_objects/locators_login.py | d92c308cebb993de0afe2d8219229c7f1e12066f | [] | no_license | AqueM/TestAutomationBase-RobotFramework | 8e850609d0c3efa67ffa9ba6968c2d4b54894fdd | 3f6fa24539ea43cdb8af8dfd69d0019ad0ae502f | refs/heads/master | 2022-04-17T08:39:22.241562 | 2020-03-16T11:06:12 | 2020-03-16T11:06:12 | 244,051,564 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | locators_login.py | # Login page locators
input_email_register = "name:email_create"
input_email_login = "name:email"
input_password_login = "name:passwd"
btn_sign_in = "name:SubmitLogin"
btn_create_account = "id:SubmitCreate"
txt_invalid_email_register = "id:create_account_error"
txt_invalid_login = "xpath://div[contains(@class,'alert-... |
b507c7e34528061ebc5e85c98fdd482d21635a76 | da070f5ec96a9a9827ee04727558e0ab57334537 | /betaNSE/main.py | 6353ef1a798edea44a571afe92a124b20efdc640 | [] | no_license | kiniamogh/moneygen | d41881cc4f350df83c4003ed14e142d75934a64e | ad608711d617daa113461cc48fe3a8014be41888 | refs/heads/master | 2023-06-28T17:18:55.006661 | 2020-04-23T07:57:39 | 2020-04-23T07:57:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | main.py | from index_derivative_historical_options \
import IndexDerivativeHistoricalOptions
derivative_historical_options = IndexDerivativeHistoricalOptions('BANKNIFTY')
derivative_historical_options.get_available_years()
derivative_historical_options.get_available_expiry_dates()
derivative_historical_options.get_available... |
14e3fbee0dd07ab3475ae8e708af8b12b15a0291 | 0536dae3f8515315abd7407e1432fd971feb41cf | /SSI7X/Static/labels.py | 022005aeba5628f4fa30854302c9e618f5397126 | [] | no_license | robiwimarbu/auth | deb29a219c55b26d0eb0d827bfa856404a496572 | 90d161a49f0e32a857da9954bb5aa6ef0d6deffa | refs/heads/master | 2021-05-14T16:14:00.932290 | 2018-02-20T21:51:42 | 2018-02-20T21:51:42 | 116,015,191 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | labels.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
lbl_nmbr_usrs = 'Nombre de usuario'
lbl_cntrsna_usrs = 'Contraseña de usuario'
lbl_nva_cntrsna = 'Nueva Contraseña'
lbl_cdgo_prfl = 'Codigo Perfil'
lbl_dscrpcn_prfl = 'Descripcion Perfil'
lbl_cdgo= 'Codigo'
lbl_prgnta= 'Descripcion Pregunta'
lbl_rspsta='Descripcio... |
848b43ea55023d793776cb54293abdc19a1d5331 | bdeab00da2088b1b70d79e1ae60c463b83e52de2 | /pokedex/migrations/0006_auto_20170504_1757.py | 3e45a0bf8c356cdaf3f01ef78d6cde7737c5a903 | [] | no_license | tangjl/Pokedex | 4ce255e5a784c0465d4ccf1a0f74095910303605 | a1d2b8133f5520d54027157292e5f9a25e458602 | refs/heads/master | 2021-01-20T10:05:27.268288 | 2017-05-06T03:54:06 | 2017-05-06T03:54:06 | 90,319,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | 0006_auto_20170504_1757.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-04 21:57
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('pokedex', '0005_auto_20170504_1744'),
]
operations... |
b34260b6021c7f387cb7eb23813c83bfa0ce40b2 | 9c6e7f262a967cc698561694b822a666bf37c3d4 | /jinrui/__init__.py | ce15872945aeb1d4f4886e0c548976f7208a8f0d | [
"MIT"
] | permissive | haobin12358/jinrui-test | d2963b27e1b734ed79ba27c0ec19d41655e734d6 | cce7c584e22546a7a1bcb654f82e7b8e78e52edd | refs/heads/main | 2023-02-20T19:31:51.710326 | 2021-01-25T12:10:25 | 2021-01-25T12:10:25 | 302,820,503 | 0 | 1 | MIT | 2021-01-25T12:10:26 | 2020-10-10T05:13:57 | Python | UTF-8 | Python | false | false | 1,831 | py | __init__.py | # -*- coding: utf-8 -*-
from flask import Flask
from flask import Blueprint
from flask_cors import CORS
from .api.APdfUpload import APdfUpload
from .api.AHello import AHello
from .api.AOcr import AOcr
from .api.APpt import APpt
from .api.APaper import APaper
from .api.AAnswer import AAnswer
from .api.AFile import AFil... |
57fe160a3d1a78863bc56cfb159dc1518c52aa73 | 0fd9644616b5658ea960ef86f28b94cc95ce55e0 | /djangoprj/main/models.py | 5cb2ab945279e946614426059da6478c33f097db | [] | no_license | zdimon/time-control | f4db6f26f15a18c89b91dba3f69a696a9d3a6c28 | 3a212d26dcaae13d3ca5a18247a425f63938fd7c | refs/heads/master | 2020-05-13T16:33:53.011992 | 2019-04-19T07:05:01 | 2019-04-19T07:05:01 | 181,640,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,110 | py | models.py | from django.db import models
# Create your models here.
'''
"email": "USER_EMAIL",
"first_name": "USER_FIRST_NAME",
"last_name": "USER_LAST_NAME",
"name": "USER_NAME",
"title": "USER_POSITION",
"avatar": "URL",
"company": "USER_COMPANY... |
05612d676c3d0ec92c0e11931b801df92c7b495c | 9f8f49aa3424d597ae97448b432e262d0ee409de | /randombot.py | 500ba8e457c6ba60adda26645112446a94adefc1 | [] | no_license | morispolanco/python-slackbot-sampleapp | 3b818fce2cc52433bc76b5a19410b2f196a5b490 | 80d6b82125e0cbf293a219b756c63557db57651c | refs/heads/main | 2023-03-31T14:41:07.588193 | 2021-04-08T18:24:37 | 2021-04-08T18:24:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,273 | py | randombot.py | # import the random library to help us generate the random numbers
import random
# Create the RandomBot Class
class RandomBot:
# Create a constant that contains the default text for the message
MESSAGE_BLOCK = {
"type": "section",
"text": {
"type": "mrkdwn",
"text": ""
... |
56c40be0b4de2ffa5c64dadeedc0b1ed138fa0ac | 689940a2f5b4bef685d1296bcd84891980103999 | /test.py | d4f9f1465167af95fef47c45783838c8a6b0844a | [] | no_license | lunant/lessipy | 2fb0e079b414cbb45b5a488405456ad7cb9b1fe7 | 3f865c47803c8bd0c053b8376c5b30ef13cc53ee | refs/heads/master | 2021-01-10T19:24:41.350620 | 2010-11-10T09:12:05 | 2010-11-10T09:12:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 123 | py | test.py | import doctest
from lessipy import *
doctest.testfile("tests/lessipy.txt", optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)
|
41f5f6abbf09e31a8536e7ed1b0edd5045cb6f4c | 154e71cacc72d6f6a83bb93c46533a5dfd165458 | /rotate_img.py | 87a3c302c65f6f33244901bdf92213119d3893eb | [] | no_license | grbzali/exam_booklet_imageprocessing | 4eee5f6e5e1738695da4e0860caeb63929133ef4 | f58ab5a2988d936bc3f6efeffa0402629bb7f079 | refs/heads/master | 2020-05-09T22:56:17.979916 | 2019-06-10T06:50:01 | 2019-06-10T06:50:01 | 181,486,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,345 | py | rotate_img.py | import cv2
import numpy as np
def rotate(image):
image = image
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # gelen görüntü gri tona çeviriliyor
gray = cv2.bitwise_not(gray)
thresh = cv2.threshold(gray, 200, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)[1]
coords = np.column_stack(np.where(thresh ... |
9bdc11a8351af7bf92a7d89c5d77dbff45315921 | 52f8c8ba9a5f42ca19033d9328c1c213d13e0f8a | /Week 4/d2l_chapter_5_pytorch.py | 786f0d7ed9d32cb46199684648bfa1deaffc900b | [] | no_license | immuntasir/d2l_exercises | 2efb24ac768aa9fb53ce2ffdf41f929c9c5f5f97 | 876f26183cd68576ff043df58e80daa12be874ef | refs/heads/main | 2023-07-04T05:18:01.094875 | 2021-08-03T21:05:14 | 2021-08-03T21:05:14 | 370,775,187 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,424 | py | d2l_chapter_5_pytorch.py | # -*- coding: utf-8 -*-
"""d2l_chapter_5_pytorch.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1o8YQEF-hDNji4rr00J3biLKp0FkbldBl
# 5.1. Layers and Blocks
"""
import torch
from torch import nn
from torch.nn import functional as F
net = nn.Sequ... |
bc48386bce568ee1aa7895a9f200edc3f9ce0349 | 8af75151ed8a5a0c0140f105b82749c2622dfd78 | /main.py | 47a60d438c65d6dd70dd84dc5dba5726238aad84 | [] | no_license | kchaudhari2210/LH-Venture | 18ece4a2f152f8ea457a631951e62d2031677394 | 43538e55d8b81e3fcd0c6d4ef0592c41108751e4 | refs/heads/main | 2023-08-20T23:38:55.820960 | 2021-10-14T13:32:31 | 2021-10-14T13:32:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,583 | py | main.py | from prettytable import PrettyTable
import pandas as pd
import datetime
table = PrettyTable()
table.field_names = ['id', 'name', 'price', 'expires']
def read_csv_data(filename):
df = pd.read_csv(filename, index_col=False)
return df
def generate_data(filename, value):
df = read_csv_data(filename)
PRIC... |
7f7eed9c106633a185189c300705c59db3ff55cf | 0ffe190b9d5e2baa9b0be6bece03b93c7f39537a | /app_callbacks/callbacks_newgraphgrid.py | 6c1ec84218bbc0f843034ded70d3cbdc329226b6 | [] | no_license | lwang94/MDD | 1f8587c74c9d8b860013326499eb75a73658206a | 16f6e1cd8d0682c06ef2f806f3bdf4af6d488a33 | refs/heads/master | 2023-01-14T06:08:48.138203 | 2021-01-14T06:14:33 | 2021-01-14T06:14:33 | 252,357,300 | 0 | 0 | null | 2023-01-06T04:47:00 | 2020-04-02T04:43:58 | JavaScript | UTF-8 | Python | false | false | 18,378 | py | callbacks_newgraphgrid.py | from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
from dash.exceptions import PreventUpdate
from dash import callback_context
import plotly.graph_objects as go
import time
import pandas as pd
import numpy as np
import MDDClass as mc
import app_ut... |
ed404405c6ffc348dd714b54c594404cde83849d | e96c1d85bfc706ef19cfff8831837576e22361c5 | /src/group_lasso/__init__.py | 1a0f09b8bc9d139cc50b8acf56b542632e90806e | [
"MIT"
] | permissive | NoahChristiansen/group-lasso | b622735947f1b499c6e99a2d6d36be881abe148f | f7e231ef47d435ee7716bcc0411b4abcb232d265 | refs/heads/master | 2020-06-20T20:06:21.945532 | 2019-07-16T16:10:36 | 2019-07-16T16:10:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | __init__.py | """Group lasso regularised linear models.
"""
__version__ = "0.1.2"
__author__ = "Yngve Mardal Moe"
__email__ = "yngve.m.moe@gmail.com"
from group_lasso._group_lasso import GroupLasso, LogisticGroupLasso
|
82084ee203d7c0d00b188417753f0e5365923597 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc085/A/4182427.py | b4f08a888bc402ed1fedf2569f263ac2e31a010e | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | 4182427.py | #!/usr/bin/env python3
def solve(n, m):
return (100 * n + 1800 * m) * (2 ** m)
def main():
n, m = input().split()
n = int(n)
m = int(m)
print(solve(n, m))
if __name__ == '__main__':
main() |
a950888b6958d25b688c6906a18de48f898ce024 | 2341f875d5db2d9162bccb6e4ddbb3382d830558 | /util.py | be472b875260e104d69faa2aa0e13b31c2d4b492 | [] | no_license | ez4lionky/MAG-new | 9a4e888fa0cbd790468dbaf89f51b241dc4e88c1 | c72d6b5c611c07aafd46d5c45fe8c14c2a436cec | refs/heads/master | 2020-05-01T07:34:08.370467 | 2019-06-14T13:48:37 | 2019-06-14T13:48:37 | 177,354,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,027 | py | util.py | import numpy as np
import os
import os.path as osp
import matplotlib.pyplot as plt
def plot_loss_and_acc(epoch, train_losses, test_losses, train_accs, test_accs, fpath='fig1'):
fpath = '../Graphs/' + fpath
plt.figure()
ax1 = plt.subplot(211)
l1, = plt.plot(range(epoch), train_losses, 'b', label='train_... |
8a39ee877336a9cd5ab89305879d2973d276459f | 6289171f0e58370ef92db809b7364157220b30b6 | /website/event/views.py | 9120d7b40c443a3ae94609cc59fe3b8f4d7e2025 | [] | no_license | RFCorporation/PartaEvents | 30c8cedd86f8c24de5cdb1186e471d323886d8da | cad47a394410e39130edd86fad5285112d7dd347 | refs/heads/master | 2021-01-10T16:08:52.367007 | 2015-06-22T14:11:34 | 2015-06-22T14:11:34 | 36,378,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,533 | py | views.py | from django.shortcuts import render, render_to_response
from django.http import HttpResponse
from django.template.loader import get_template
from django.template import Context
from event.models import EventObject
from forms import SearchForm
from operator import attrgetter
from django.contrib import messages
from djan... |
da6a05367f5bd8f04933b4951fd615b109ec7fd3 | bfe6ca3e1b04b718a8fa88909c0554f28c9aa863 | /app/tweet_api/apps.py | 3d1f0ff96669e6e05c965cd03e3d5c099ab45b0a | [] | no_license | jarekxyz/simple_twitter_app | 7b9f837a2f2816d7105cbc7a3e64c6b5d6c08008 | 40e1bb5f6b1df02b622484bef18d57077f552660 | refs/heads/master | 2022-02-15T11:13:42.574157 | 2019-09-12T19:45:38 | 2019-09-12T19:45:38 | 204,997,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 92 | py | apps.py | from django.apps import AppConfig
class TweetApiConfig(AppConfig):
name = 'tweet_api'
|
0fd2564b62c2cb206db3d1e0509524e7305081b0 | cbed3594128a8e7891aaf67ffc2f64d04fc5cf1a | /TweetMining_v02.py | c83ff2049929dcca652f7d2c5b79a3704e98973b | [] | no_license | GaryPate/Twitter_App | 16732a74763bb60487564e054def81c8e08edae8 | 887cbc75c995cf8fae4f052c77e34f7d99c621b2 | refs/heads/master | 2021-01-13T04:03:04.609410 | 2020-11-01T03:39:56 | 2020-11-01T03:39:56 | 78,168,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,242 | py | TweetMining_v02.py | import tweepy
import time
from tweepy import OAuthHandler
from tweepy import Stream
from tweepy.streaming import StreamListener
import json
from http.client import IncompleteRead
import csv
consumer_key = None
consumer_secret = None
access_token = None
access_secret = None
auth = OAuthHandler(consumer_key, consumer_s... |
e022f6abebdc83f8ca01d58fdcbe181823235dd4 | 4f589f8b122ff1bf3b78f7cf4af1121cf0878de2 | /test.py | 189f18ac470dc5a8c1223ef44ccdf1bcb96232d1 | [] | no_license | ali-linux/xpaychain | 7875543711e0fcb41acbfca3bfa77b820367ff18 | c58e36636878a3d7ef4ec0275e209cec066b5ad4 | refs/heads/main | 2023-03-21T18:20:54.697563 | 2021-03-16T13:52:58 | 2021-03-16T13:52:58 | 321,637,304 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | test.py | password = 'jasdka'
password2 = '12345678'
if len(password2) < 8:
print('bad password')
else:
print('good password') |
e4b304623e54ab020883069ffab78a0078e40739 | 824b0aba24a70ee2bc72d245a0029591170b6db3 | /Tkinter_Project3.py/main.py | 23a3fca7e3674d1da31a7e4010794376d816ede6 | [] | no_license | techyshiv/Tkinter_Project | 9694b84c36d8862bf9139d324fd0c54744e453f0 | 0560821acfa3e712430d5e8c6d1c1b5928db902d | refs/heads/main | 2023-01-28T04:55:13.187802 | 2020-12-13T13:33:10 | 2020-12-13T13:33:10 | 321,068,729 | 1 | 0 | null | 2020-12-13T13:33:11 | 2020-12-13T13:14:38 | null | UTF-8 | Python | false | false | 2,169 | py | main.py | from tkinter import *
from mypeople import MyPeople
from addpeople import AddPeople
from aboutus import AboutPeople
import datetime
date=datetime.datetime.now().date()
#print(str(date))
date=str(date)
class Application(object):
def __init__(self,master):
self.master=master
#Frames
... |
0eb64c877845d3c00a43feade6b81775753ba52a | 54364837a7f80778b3f0c1ac47599da38736e4ca | /src/ui/test.py | b74530d651cb050f1e96d98ea51c4863f306b4ee | [] | no_license | mayurir7/ai-final-project | 902bb24e5bd400c02c31e30f2bcc14546ba0fa2e | 145d33e5847a1adf24dc895cc5c1deb3e109c77b | refs/heads/master | 2022-01-29T03:54:34.226745 | 2019-05-09T16:55:40 | 2019-05-09T16:55:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | test.py | from Tkinter import *
window = Tk()
window.title("Energy Grid Management")
lbl = Label(window, text="Hello", font="")
lbl.grid(column=0, row=0)
btn = Button(window, text="Click Me")
btn.grid(column=1, row=0)
window.geometry('350x200')
window.mainloop()
|
07d46fef45ca10f86c44bdf72420c66f478bbe99 | 032edbd5eccee1896a207f6e0b0ba1d026d4e984 | /basics/threads.py | 86d4e0ae8c859f7bfd652c9ccc8e1ee29e98a117 | [
"MIT"
] | permissive | grzesk075/PythonSandbox | 95812a69e1b53e1faea574c10ec8db6fc79a58d2 | 9fa879b4a15a971258c458bbfe55c7a899c95ce5 | refs/heads/master | 2021-06-10T11:35:06.781026 | 2019-11-20T14:10:18 | 2019-11-20T14:10:18 | 156,559,088 | 0 | 0 | MIT | 2021-04-20T17:46:55 | 2018-11-07T14:31:11 | Python | UTF-8 | Python | false | false | 547 | py | threads.py | import threading
import time
# import queue - designed for inter-thread communication and synchronization
class AsyncPrinter(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
for i in range(20):
time.sleep(0.01)
print('Async:... |
5381fdfacfa7185259509cf6f3d69846f5bcd4bc | 9130c4b30d484c1c19b844339059f762336101e7 | /Class2/Test1代码练习.py | d1db2f9e0777e47fc1de4721dc45e028e40d18d3 | [] | no_license | jianjiachenghub/PythonClass | 65e6b5280efac83405c6752f9750670cf856986e | d7fe96d760fcd7c46e5e370b956f25932c299c8f | refs/heads/master | 2020-08-16T05:26:53.633882 | 2019-12-13T13:20:42 | 2019-12-13T13:20:42 | 215,460,750 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | Test1代码练习.py | # 谁便打印点什么
a = str(1)+'10'
print(a)
d = range(1,10,3)
print(list(d))
x = {"age":19}
print(x.age)
b = [1,2,3,4]
c = (1,2,3,4)
e = "abc"
print(isinstance(a, int)) |
6e894f347a9ad8f6f11a0d4dbac8c28edc0b0d19 | 6fcb0a4cc9c76677bbd79596a6dfee7650e40c64 | /PCC_Text_Book/Lists/Exercises - 5.py | ce9f1ec06a22c31481dfc19acb7a1ae03329d825 | [] | no_license | iampaavan/python_crash_course_solutions | fa51983374704ce318a52d102be57e95d638b6bb | e470232d82df996efc66604de60ffd19828c2ca8 | refs/heads/master | 2020-05-05T09:18:35.401405 | 2019-04-07T05:15:22 | 2019-04-07T05:15:22 | 179,898,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,420 | py | Exercises - 5.py | """5-3: Alien Colors #1"""
"""Imagine an alien was just shot down in a game. Create a variable called alien_color
and assign it a value of 'green', 'yellow', or 'red'"""
alien_color = 'green'
if alien_color == 'green':
print(f'You earned 5 points.')
print(f'***********************************************************... |
9e1c8d2b46610f8d3c1dd0303dc64b0faaa7bbcc | 8cc41372badf9891473aeb24e071e0c35f284249 | /Spearmint/Testing/Diabetes_Dataset/Spearmint_Custom_RBF_No_CV/Diabetes.py | 38d6988b0c4adb939afba73a80593b5388f93467 | [] | no_license | ritwickchaudhry/Bayesian_Optimization_of_Hyperparameters | af0598e2fe294ddf6f0f325f54a59bc98000b275 | b1ccf0edac72bb080c80be4d469e5d4d250e103c | refs/heads/master | 2020-04-10T05:10:32.690953 | 2016-06-16T21:59:07 | 2016-06-16T21:59:07 | 61,328,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,764 | py | Diabetes.py | import pandas as pd
import numpy as np
import csv
import random
import math
from sklearn.svm import SVR
from sklearn.metrics import mean_squared_error
import statsmodels.api as stats
import sklearn.datasets as datasets
from sklearn.cross_validation import KFold
Dataset = datasets.load_diabetes()
# columns = Data.colu... |
4d039049a82f8470dfb85aa3489f121ae1810f59 | c91e1b7199e5ad3dad170d0eaf88d89ee3933e1f | /scripts/3de/flip_tracking_direction.py | 4ea42b7249147c3f7594e1a13920e1f2305cb669 | [] | no_license | csu-xiao-an/MM101 | 9854604f36eaf53757a35b6547590391f34b5ba2 | 312bc52dc5969331d672020d061f6f08b01c8b99 | refs/heads/master | 2020-07-26T17:24:00.802177 | 2019-09-14T09:00:58 | 2019-09-14T09:00:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,172 | py | flip_tracking_direction.py | #
#
# 3DE4.script.name: Flip Tracking Direction
#
# 3DE4.script.version: v1.0
#
# 3DE4.script.comment: This tool will flip the tracking dirction of one selected point.
#
# 3DE4.script.gui: Manual Tracking Controls::View
# 3DE4.script.gui.button: Manual Tracking Controls::Flip Direction, alight-bottom-left ,... |
6329df52660c3a383aca98ebe1121bbd53501ca2 | 4e1dd6791505a154d92d6352e619c254e12ed574 | /wagtail_localize/tests/test_translationsource_model.py | 38429e77bfe1d6961734515ad10d5839b419b13f | [
"BSD-3-Clause"
] | permissive | wagtail/wagtail-localize | fba4b9db6c1b043a96d59178dede31dc117f9674 | 3f060bd061249815a8fbc79dc1c6e3e954ee3ecb | refs/heads/main | 2023-08-04T14:32:06.683373 | 2023-07-27T15:02:52 | 2023-07-27T15:02:52 | 179,706,908 | 183 | 72 | NOASSERTION | 2023-09-07T08:33:48 | 2019-04-05T15:21:14 | Python | UTF-8 | Python | false | false | 31,907 | py | test_translationsource_model.py | import json
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.test import TestCase, override_settings
from django.utils import timezone
from wagtail.blocks import StreamValue
from wagtail.models import Locale, Page, PageLogEntry
from wagtail_loca... |
13ff9a3f2ad84d15140236dac3a6051fa1426c45 | 6a607ff93d136bf9b0c6d7760394e50dd4b3294e | /CodePython/Python/RaptorSeries.py | 3ace9baf35e690a287754ef6d1045535d30067a0 | [] | no_license | n3n/CP2014 | d70fad1031b9f764f11ecb7da607099688e7b1de | 96a7cdd76f9e5d4fd8fb3afa8cd8e416d50b918c | refs/heads/master | 2020-05-15T07:08:17.510719 | 2014-02-14T03:21:05 | 2014-02-14T03:21:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52 | py | RaptorSeries.py | n = input()
print (2 * n ** 3 + 3 * n ** 2 + n ) / 6 |
b9b458466830628cad21f0ca6bea10948588c349 | 0383ce5fb19ff85cb2d272040b41ee3b23bd4f9d | /app-engine/tests/controllers/test_recruiter_emails.py | 67d6ba36f6e2174620c237ee1fc6ba5df46650fa | [
"Apache-2.0"
] | permissive | klenwell/decruiter | 6438b4af9c1c1b6015c5e62f44275c4771ff5bc6 | 90a81e3a6fd29544695ccfeca0fee77592cc94f6 | refs/heads/master | 2022-04-28T04:48:22.735522 | 2022-03-12T18:23:27 | 2022-03-12T18:23:27 | 66,902,387 | 0 | 0 | null | 2017-09-15T04:07:36 | 2016-08-30T03:17:37 | Python | UTF-8 | Python | false | false | 10,207 | py | test_recruiter_emails.py | """
# Recruiter Emails Controller Test
To run individually:
nosetests -c nose.cfg tests/controllers/test_recruiter_emails.py
"""
from datetime import datetime
from controllers.recruiter_emails import app as recruiter_emails_controller
from models.recruiter_email import RecruiterEmail
from models.recruiter import... |
b128028b07aea9cf39090ab4bc61d2737a3bfa7b | 6f9a50afdf93e7b2ae8a2c74fc1a1786e2af0669 | /SQL_sth.py | bf9fdeea4e495b92d4a46be5e828062854cf1523 | [] | no_license | Lobo2008/LeetCode | 2c78a9e6be81904a560e11aa946b89944bfb88ec | 6be4e77f659e80c853e58dceec88990c4065f9de | refs/heads/master | 2021-07-06T07:19:53.738255 | 2019-02-18T15:54:43 | 2019-02-18T15:54:43 | 130,667,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | SQL_sth.py |
#183. Customers Who Never Order
select Name as Customers from Customers where id not in(select CustomerId from Orders)
#182. Duplicate Emails
select Email from Person group by Email having count(Email) > 1
#181. Employees Earning More Than Their Managers
select a.Name as Employee from Employee as a,Employee as b w... |
eb28b464ea9e9d9df212beac35875f83f461fffd | 7fb0025bae8197794281896ea4d8b3605b236b3d | /GPA_Counter/urls.py | dc2ac0e2a10fbcf6781eacd2f96528848644f74c | [] | no_license | HeatDeath/CAU_GPA_Counter_Web_App | 192628c95e021a6e06ac9f737252552bdcfd614c | 64102c1a20bc7d712fcf8adf104c5994f4328308 | refs/heads/master | 2021-01-19T09:03:27.886992 | 2017-04-09T15:08:16 | 2017-04-09T15:08:16 | 87,716,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | urls.py | from django.conf.urls import url,include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^WebCounter/', include('WebCounter.urls',namespace='WebCounter')),
]
|
3159287cda8c9cd06864945db6e31c910a78f5f5 | 72cc9467409269a01fa82d1d606ba801c3e6ac1d | /ultron/extensions/jump_planner/jump_planner.py | bcc80d8eba973036a7beb25e827490ea11dd73a9 | [
"MIT"
] | permissive | Luvlymangos/Ultron | 04e7954401b0e2bc10b5aefd78af1fc728c3fdda | 559a565e8479dd5d75edc21ddd21b67d1c3095e9 | refs/heads/master | 2021-02-09T14:58:43.637950 | 2020-02-27T15:33:57 | 2020-02-27T15:33:57 | 244,295,292 | 0 | 0 | MIT | 2020-03-02T06:18:06 | 2020-03-02T06:18:05 | null | UTF-8 | Python | false | false | 4,474 | py | jump_planner.py | from discord.ext import commands
from ultron.utils import make_embed
from ultron.core import checks
class JumpPlanner(commands.Cog):
"""This extension handles the time commands."""
def __init__(self, bot):
self.bot = bot
self.config = bot.config
self.logger = bot.logger
@command... |
9230b1438174e14c6eeba2c4f8a3fbd0b923fa98 | bc9f66258575dd5c8f36f5ad3d9dfdcb3670897d | /lib/surface/apphub/telemetry/describe.py | accdc78716fd1d99726717ee5fc809c8332980ce | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | google-cloud-sdk-unofficial/google-cloud-sdk | 05fbb473d629195f25887fc5bfaa712f2cbc0a24 | 392abf004b16203030e6efd2f0af24db7c8d669e | refs/heads/master | 2023-08-31T05:40:41.317697 | 2023-08-23T18:23:16 | 2023-08-23T18:23:16 | 335,182,594 | 9 | 2 | NOASSERTION | 2022-10-29T20:49:13 | 2021-02-02T05:47:30 | Python | UTF-8 | Python | false | false | 1,329 | py | describe.py | # -*- coding: utf-8 -*- #
# Copyright 2023 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... |
b744c39be9f6f41e40e835ccf30b0f8857df97fa | f8c17428f34be434f7a1181121729c0af3c92cf3 | /python/common/list_node_to_list.py | 1496e86f92c7f463265864f749426bf54fe44e86 | [
"MIT"
] | permissive | vivaxy/algorithms | 32231eaf6b4d4ce5fd675b698496e9cbf185a96d | 56b99c829921c534dead1563db726042bbd7155d | refs/heads/master | 2023-03-16T00:46:21.408368 | 2023-03-13T05:27:12 | 2023-03-13T05:27:12 | 85,659,008 | 1 | 0 | MIT | 2023-03-13T05:37:27 | 2017-03-21T04:27:43 | Python | UTF-8 | Python | false | false | 135 | py | list_node_to_list.py | def listNodeToList(head):
ans = []
cur = head
while cur:
ans.append(cur.val)
cur = cur.next
return ans
|
480e0e6f32e2c74d28efe57c51164f947a12afe5 | a884039e1a8b0ab516b80c2186e0e3bad28d5147 | /Livros/Introdução à Programação - 500 Algoritmos resolvidos/Capitulo 2/Exercicios 2a/Algoritmo41_lea14.py | b145690af4751a8aa8ccd1e209fbc82e5a7e439d | [
"MIT"
] | permissive | ramonvaleriano/python- | 6e744e8bcd58d07f05cd31d42a5092e58091e9f0 | ada70918e945e8f2d3b59555e9ccc35cf0178dbd | refs/heads/main | 2023-04-10T14:04:24.497256 | 2021-04-22T18:49:11 | 2021-04-22T18:49:11 | 340,360,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | Algoritmo41_lea14.py | # Program: Algoritmo41_lea14.py
# Author: Ramon R. Valeriano
# Description:
# Developed: 14/03/2020 - 20:14
# Updated:
number1 = float(input("Enter with the first number: "))
number2 = float(input("Enter with the segundo number: "))
number3 = float(input("Enter with the third number: "))
number4 = float(input("Enter w... |
49ea36197b2becb7d92b94409b391add3d66fff8 | f779e6aa61ad6ace39688b0470c79c594c8a56f0 | /Seion/Manager.py | bd77f9ffd7e485399a11772e217c50936cf97900 | [] | no_license | StarLamp/demo | 68024e68036fcd5e0e3e2c190fb096b3cd9ad4e1 | 44d10fb0a0bd135a1355411ad9d9a1a2787a15ff | refs/heads/master | 2022-12-25T03:25:17.117832 | 2020-10-13T01:09:41 | 2020-10-13T01:09:41 | 297,112,000 | 0 | 0 | null | 2020-09-20T16:11:05 | 2020-09-20T16:01:45 | Python | UTF-8 | Python | false | false | 3,131 | py | Manager.py | import time
from multiprocessing.managers import BaseManager
from Seion.DataOutput import DataOutput
from Seion.UrlManager import UrlManager
class Manager(object):
def start_manager(self, url_q, result_q):
'''
分布式管理器
:param url_q: url队列
:param result_q: 结束队列
:return:
... |
adc5e131ee136ae524b75026ccd60699ab55ce47 | ed269e9a4d9d6bfbb833381b7aef65a23f391fe2 | /比赛/test1.py | 27e096fe7ce47d498b031a3d0e668ce51d0b8d93 | [] | no_license | Comyn-Echo/leeCode | fcff0d4c4c10209a47bd7c3204e3f64565674c91 | 67e9daecb7ffd8f7bcb2f120ad892498b1219327 | refs/heads/master | 2023-04-28T17:35:52.963069 | 2021-05-19T01:52:16 | 2021-05-19T01:52:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,029 | py | test1.py | import math
import copy
import math
import copy
class Solution(object):
def optimalDivision(self, nums):
"""
:type nums: List[int]
:rtype: str
"""
s= '{}'
def getS(s, count = len(nums) -1): # 一共count +1 个参数
if count ==0:
return s
... |
a33cf40a7435d3e4ca5472f51756534be60d86fd | ee050e135b7bb49cc3c0144052f454284512f6d7 | /OpenRaving/src/plannerWrapper.py | b7b6e005ab45ba7dcf08ef0f56270e1d7c69a682 | [] | no_license | ronuchit/rohan_perception_manipulation | 78f0750891f214bdd1cc111f2568911681b50af2 | 52f8acde7221758f3036691d3eded40300c0c809 | refs/heads/master | 2021-01-10T19:14:37.445048 | 2013-06-28T18:41:00 | 2013-06-28T18:41:00 | 10,830,731 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 755 | py | plannerWrapper.py | #! /usr/bin/python
PKG='perception_manipulation'
import roslib
roslib.load_manifest(PKG)
import rospy
import openravepy
import hybridPlanner
import openrave_input
ENV_FILE_NAME = "created_info.dae"
if __name__=="__main__":
rospy.init_node(PKG, anonymous=False)
# # load new environment
# env = openra... |
2bf6cfb26f352127bce127a23881b9f8f9cc7afc | 04e3e11a65c7eeb9e4616f15e3458187c62633c7 | /server/huddle/router.py | afff82075394659bd0e62a6e36a7e1939ceca162 | [] | no_license | Zhixinb/Huddle | f804a329442c705c5949cfdb7c054593f639f2ec | 47e51ff300fd9e2cb040697804294d41d844a42f | refs/heads/main | 2023-03-27T08:07:38.061667 | 2021-03-27T01:27:24 | 2021-03-27T01:27:24 | 307,011,268 | 0 | 0 | null | 2021-02-18T03:54:21 | 2020-10-25T02:41:27 | Vue | UTF-8 | Python | false | false | 1,384 | py | router.py | from huddle.stateManager import StateManager
#Communicates between clients and state/widget manager
class Router(object):
"""Object for tracking game stats"""
def __init__(self):
self.state_manager = StateManager()
def get_updated_slide(self, key):
return self.state_manager.getSingleData(... |
4543355f1ab3e0259106e64276b54e46940dea81 | b656c527a0a6bcb8df45512e202d1607fe33638e | /migrations/versions/0113_job_created_by_nullable.py | 8b5c751501c27655093f460d97a71c4edad74bbd | [
"MIT"
] | permissive | alphagov/notifications-api | fb6d0b6b952f0e2e8c98776be9adf836cce85c54 | b4c5be42583ef6d6cd004e8c24acaf810d86f65c | refs/heads/main | 2023-09-01T08:58:52.353509 | 2023-08-31T15:00:31 | 2023-08-31T15:00:31 | 46,422,101 | 61 | 33 | MIT | 2023-09-14T14:18:19 | 2015-11-18T13:57:17 | Python | UTF-8 | Python | false | false | 651 | py | 0113_job_created_by_nullable.py | """empty message
Revision ID: 0113_job_created_by_nullable
Revises: 0112_add_start_end_dates
Create Date: 2017-07-27 11:12:34.938086
"""
# revision identifiers, used by Alembic.
revision = "0113_job_created_by_nullable"
down_revision = "0112_add_start_end_dates"
import sqlalchemy as sa
from alembic import op
from s... |
ad8ef3068b515d9f64f810d625e033c5e315d028 | baf148a6acf69b6d0c5d8b1bcba9a95c2c322fc0 | /webchange.py | 906bd285918b7c64bb2a5180faacb5b3078027c4 | [] | no_license | awesomeyang/mblog_tool | 7e1f2e7857df6a07949811a35a930e0f3eb10cd9 | 3675e61b7ab77ef513e1d9e63a1beb81afe59a48 | refs/heads/master | 2021-01-22T03:08:41.543135 | 2017-10-29T07:42:08 | 2017-10-29T07:42:08 | 102,258,224 | 1 | 0 | null | 2017-10-22T13:08:17 | 2017-09-03T10:56:05 | JavaScript | UTF-8 | Python | false | false | 698 | py | webchange.py | '''
change content with textextre
'''
import sys
import os
import json
import sqlite3
if __name__=='__main__':
id=sys.argv[1:]
con=sqlite3.connect(os.path.join('outcome','data.db'))
cur=con.cursor()
try:
sql=cur.execute("SELECT * FROM ARTICAL WHERE ID=?",(id[0],)).fetchone()
jsondata={'i... |
17aa699ee659befdd97e9b06017fdcb1b7d59fbb | 55909fd5282ea210f2221fc467f71f9ed41b0bef | /Aula 20/ex100.py | 74a7233d2fd6f3a305c00e11debdae94f2476145 | [
"MIT"
] | permissive | alaanlimaa/Python_CVM1-2-3 | 163ecd8c9145f2d332e6574d8923373b87a2e1f5 | 6d9a9bd693580fd1679a1d0b23afd26841b962a6 | refs/heads/main | 2023-06-18T16:07:59.930804 | 2021-07-20T16:22:01 | 2021-07-20T16:22:01 | 387,841,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | ex100.py | from random import randint
from time import sleep
def sorteia(valores):
lista = []
print(f'Sorteando {valores} valores da lista: ', end='')
for c in range(1, valores + 1):
num = randint(1, 10)
print(f'{num} ', end='')
sleep(0.4)
lista.append(num)
print(' PRONTO!')
so... |
9e1366bf1e4211d4ccc784a66977ff30f8881b5a | 914e1199ac5e6e383ac724087c9e492f10e1685c | /566_重塑矩阵.py | f4ad935f8f9b1ef1e3682e5dba9f9146029b835c | [] | no_license | laippmiles/Leetcode | 2bd9b481b9db964660d72dcac45e54e418c1a518 | ba1dd095dcbef1d25ed5e5f33b04275abf031116 | refs/heads/master | 2021-04-12T12:32:36.162163 | 2018-08-28T12:28:39 | 2018-08-28T12:28:39 | 126,703,236 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,521 | py | 566_重塑矩阵.py | '''
在MATLAB中,有一个非常有用的函数 reshape,
它可以将一个矩阵重塑为另一个大小不同的新矩阵,但保留其原始数据。
给出一个由二维数组表示的矩阵,以及两个正整数r和c,
分别表示想要的重构的矩阵的行数和列数。
重构后的矩阵需要将原始矩阵的所有元素以相同的行遍历顺序填充。
如果具有给定参数的reshape操作是可行且合理的,则输出新的重塑矩阵;
否则,输出原始矩阵。
示例 1:
输入:
nums =
[[1,2],
[3,4]]
r = 1, c = 4
输出:
[[1,2,3,4]]
解释:
行遍历nums的结果是 [1,2,3,4]。新的矩阵是 1 * 4 矩阵, 用之前的元素值一行一行填充新矩阵。
示例... |
bba4a7e2d7c29a41cf521543228ab30742b50ee9 | af2167fa32cb7f40e716635ae984f2ffee2bba34 | /t-test_2.py | c51049aaec3bc7bb1c3a1e699ca83eb0da36fced | [] | no_license | spencersmith6/Longitudinal_TBI_modeling | 20d2ebdc5dc12efa9f10e35124022243f63c741b | 5250402532101478bd25d3af567a44f0eb958acd | refs/heads/master | 2021-01-17T04:28:34.573066 | 2017-02-23T19:01:00 | 2017-02-23T19:01:00 | 82,957,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,246 | py | t-test_2.py | import csv
import numpy as np
import processingFunctions as pf
import scipy.stats as st
import matplotlib.pyplot as plt
f = open('simulated_long_data_1.csv')
reader = csv.reader(f)
headers = next(reader)
col_index = range(len(headers))
data = np.array([row for row in reader])
trajectories = pf.separate_trajectories... |
a390e7697fb2746148d97d32a16b0e339e8911ab | 7700ab9874c23eeff05fecf4427b79c64a51dc00 | /_09_file_operation_csv.py | 236c82c9b770bdd683135fcc301eb1a6b8cce497 | [] | no_license | hooke-naoto/Python_Training | 1d596b61b9a251c4f7f30a9891936773fdab0dd6 | 6bcb231a2ea98e3e3eefc33ce4f9e9ecbb6a5e7a | refs/heads/master | 2020-03-26T18:25:00.548571 | 2018-09-02T02:26:17 | 2018-09-02T02:26:17 | 145,211,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | _09_file_operation_csv.py | # csv files
import csv # import csv module!
list_123 = ["one", "two", "three"]
list_456 = ["four", "five", "six"]
with open("/Users/hooke/Documents/Coding/Python_Training/test3.csv", "w") as f:
w = csv.writer(f, delimiter=",") # You can use any delimiter (, ; / | ...).
w.writerow(list_123)
w.writerow(li... |
bf33ac39d3a0ef341d0e83d4d284496eb3a4b0d6 | 9901386c6b32cb9da9f705211a29a9801365ce74 | /harvest/trader/__init__.py | 4ba5abeffafd602c03b36d26e224d7882964073c | [
"MIT"
] | permissive | jac08h/harvest | 51f2f3d96920274288426305d22cca42c8eb6996 | 03260a0a3818a5fafc5495c72bca9dba91aa8791 | refs/heads/main | 2023-08-14T23:13:54.994020 | 2021-09-27T06:25:12 | 2021-09-27T06:25:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | __init__.py | from harvest.trader.trader import LiveTrader, PaperTrader
from harvest.trader.tester import BackTester
|
afe591157cfe2bdba3f3eff581697f3370865e38 | b3825e2c93e6dc09fc887f8c855d9e9af99a3816 | /Assignment2/src/config.py | e6384c3772782efb085fdab3e70a39929d331f53 | [] | no_license | JALVITO/CE888 | fd4d0167c03baebcd2becf425dea5bd25a6ed105 | 1ee4719fa8f2aed6d68953551ef7a8e2065f7296 | refs/heads/master | 2023-04-01T15:09:35.159111 | 2021-04-14T18:20:05 | 2021-04-14T18:20:05 | 328,961,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | config.py | # Config variables
DIM = 254
BATCH_SIZE = 32
LEARNING_RATE = 1e-4
EPOCHS = 10
PATIENCE = 2
EXCLUDE_LAKE = False # Exclude lake images from training dataset
# Paths
DATA_PATH = '../data/'
SAVED_MODELS_PATH = '../saved_models/' |
1d8458d77f09122e9c545ae05d3108ddc0992dca | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03053/s790853000.py | ffe0a02864349545345269fe275de7008f4a039d | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | s790853000.py | from collections import deque
h, w = map(int, input().split())
wall = '/'
grid = [[wall] * (w + 2)]
wn = 0
q = deque()
for y in range(1, h+1):
grid.append([wall] + [c for c in input()] + [wall])
for x in range(1, w+1):
if grid[y][x] == '.':
wn += 1
if grid[y][x] == '#':
... |
a1419d90a130f4020a559c6eb328a8a80ab6f626 | 3b1a13edca51449f015086acad1e5a51ae89cba5 | /lang/py/pylib/01/re/re_sub.py | 6d809ee9603824bab3674167ea6becb85cfbf85d | [
"MIT"
] | permissive | ch1huizong/study | 9000042d3ad13b06426b03423ee335aee15fd061 | d3b7c43fc03484839f8bbc7d0d056df1b1eba9cd | refs/heads/master | 2023-09-04T12:45:48.125715 | 2023-08-17T02:49:40 | 2023-08-17T02:49:40 | 162,539,130 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | re_sub.py | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
# 修改字符串
import re
bold = re.compile(r'\*{2}(.*?)\*{2}')
text = 'Make this **bold**. This **too**.'
print'Text:',text
print'Bold:',bold.sub(r'<b>\1</b>',text) #引用了匹配分组
|