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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36430ef09d02b7e5b0105d767ec0cc0bbc5e666c | 89208ebf2b3fc0b757aa17f71bc2c3b4ee2144e9 | /qlcoder/gayregister/crawl.py | 0a80c81865de9fee91890a9a31ff9232a00f28b3 | [] | no_license | luzwales/crawl-tools | 565ef2bbae4236b0be28805eb3c79fafcae8f8cc | 196504b2664c8c939e2ff18621a61aedcea14a3c | refs/heads/master | 2021-06-12T15:02:21.101585 | 2017-02-21T01:02:29 | 2017-02-21T01:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | crawl.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from urllib import request, parse
import re
from lxml import etree,html
url = 'http://www.qlcoder.com/train/gayregister'
def getPage(url):
req = request.Request(url)
page = request.urlopen(req).read()
page = page.decode('utf-8')
return page
html_content ... |
e263f4cc803500f8a4a3763bebcbb55753340179 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /b36bBpsnzyDbd4mzF_9.py | c135f097fe4510ba334dc6a81590ba9dc6c7f7d5 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 86 | py | b36bBpsnzyDbd4mzF_9.py |
def imposter_formula(i, p):
x = (i/p)*100
x = x*.01
return "{:.0%}".format(x)
|
2d062708d36c81012f7e02c9f2d2c5ee8ef7ce5d | 17e8962298e689341bf47b87ad36bd4f16cb4efc | /Python cheat sheets/capitolize even letters of string.py | 54fbe986bba70f4d3b0718ba6ef75b37d3ff74d9 | [] | no_license | rwebster2012/Personal_Portfolio | 24a23c5dadc1805760afac8a0ba795435002dde8 | fa42c8538cd3a97669b9c0a52813c413b7ae0b38 | refs/heads/master | 2021-05-21T03:21:35.833623 | 2020-04-09T21:44:18 | 2020-04-09T21:44:18 | 252,520,617 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | capitolize even letters of string.py | def capitalize(s):
new_string = ''
new_string2 = ''
for index in range(len(s)):
if index % 2 != 1:
new_string = new_string + s[index].upper()
elif index % 2 == 1:
new_string = new_string + s[index]
for index in range(len(s)):
if index % 2 != 1:
... |
d07523c0928f26f0cc8eba148a18967b5b3ce971 | 46eb56728e33d4d5801ef7f2b08c5ce5fe7af824 | /ezhc/_global_options.py | 8f243280d8aaebcc8291cfcab648ecac6994b8c5 | [
"MIT"
] | permissive | oscar6echo/ezhc | 9401c2c8488bd8f1e45171886529cebfeea2fef0 | 7a095ba1d441bbef078c299ca08fc44e822cdd02 | refs/heads/master | 2023-07-25T03:07:35.163035 | 2023-07-08T06:30:56 | 2023-07-08T06:30:56 | 39,090,176 | 23 | 8 | MIT | 2023-07-08T06:16:30 | 2015-07-14T17:32:01 | Jupyter Notebook | UTF-8 | Python | false | false | 3,188 | py | _global_options.py |
import json
import pandas as pd
from IPython.display import display, Javascript, Markdown
from ._config import JS_LIBS_ONE, JS_LIBS_TWO, JS_SAVE
from .scripts import JS_JSON_PARSE
class GlobalOptions:
"""
Used to pass global options to Highcharts object
API: https://api.highcharts.com/highcharts
D... |
fa07e672ce06ad2e75ca360ce47111a9bf7f7d2c | 49b82edb7caf871e92dcbf0acead1482065d0e11 | /data_manager.py | b0858404c33fdc0fba1ba57b1a6980354bd07b7d | [] | no_license | KadeWilliams/flight_project | d0100dbe7c72d78af24adfda6f262870627e7b36 | c3a9b700cb79e37954c728787aa941d1e3702184 | refs/heads/master | 2023-04-13T10:36:45.154732 | 2021-04-16T19:30:32 | 2021-04-16T19:30:32 | 358,637,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,090 | py | data_manager.py | import os
import requests
from flight_search import FlightSearch
auth = os.environ['Authorization']
SHEETY_ENDPOINT_PRICES = 'https://api.sheety.co/a2f0b06de8b5c1d6f115132939c277f7/flightDeals/prices'
SHEETY_ENDPOINT_USERS = 'https://api.sheety.co/a2f0b06de8b5c1d6f115132939c277f7/flightDeals/users'
header = {
'A... |
3369958316e1ae5a8c2419ba6ab548daf91644ef | 88f75f787c7f5715566cbf31def2b3d630d60ec6 | /Interesting Problems/find path in a matrix.py | 0c3dd417d332bab154fc2f9311afa3668ebe6217 | [] | no_license | manish59/Cracking_The_Coding_Interview | 5472b5405f84356d10f3754b274e2b48c1535a6d | 540638cf62138e5b15dea2ee7e8683916e98a60b | refs/heads/master | 2023-01-05T13:04:22.341302 | 2020-11-01T20:43:59 | 2020-11-01T20:43:59 | 303,013,163 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | find path in a matrix.py | a=[
[1,2,3],
[4,5,6],
[7,8,9]
]
next_matrix=[
[0,0,0],
[0,0,0],
[0,0,0]
]
def path(a,row,col,b,count):
right=(row,col+1)
down=(row+1,col)
if row+1<len(a):
if not down in b:
b[down]=1
path(a, row + 1, col,b,count)
else:
b[down]=b[dow... |
cb47d0734dff1bcbe9dd22200a10c376df341689 | 73ccb0a60b2543b752dd0606d2ff5385f17934e8 | /reviews/migrations/0009_auto_20200404_1907.py | aa5c78cd5b8b50d7f8d8ba92723b39b8cd3a9d50 | [] | no_license | brianscan14/XYfitness | f96df58f478c9e107c6cfac88c28409b239fbc3e | 07445ddd12738a7e0bbc293619f92610d2df0c5e | refs/heads/master | 2022-12-08T08:48:08.046344 | 2020-04-30T14:07:23 | 2020-04-30T14:07:23 | 247,441,880 | 1 | 1 | null | 2022-11-22T05:28:13 | 2020-03-15T10:10:03 | HTML | UTF-8 | Python | false | false | 744 | py | 0009_auto_20200404_1907.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2020-04-04 19:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reviews', '0008_auto_20200404_1903'),
]
operations = [
migrations.AlterFie... |
5333b979bd7b9991b822b5c412d868e3e647a98d | 4eb7d655586db7e60e2d54be7dff4a199bb9005c | /rgb:hex converter.py | fbed8bed01f86cc911b4202169ab6eb935385a11 | [] | no_license | chaNcharge/Coding | c0a5f2b1bf5a38f14763aa5908204572d0ae5853 | 0bb94968efc3a3e75418a6ab6795911e64a83ee3 | refs/heads/master | 2021-01-22T07:31:46.490512 | 2018-06-06T01:28:32 | 2018-06-06T01:28:32 | 102,305,539 | 7 | 1 | null | 2017-09-13T01:50:08 | 2017-09-04T01:18:07 | Python | UTF-8 | Python | false | false | 625 | py | rgb:hex converter.py | #!/usr/bin/python
def hex_to_rgb(value):
"""Return (red, green, blue) for the color given as #rrggbb."""
value = value.lstrip('#')
lv = len(value)
return tuple(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
def rgb_to_hex(red, green, blue):
"""Return color as #rrggbb for the given color values."""... |
ac8b63fb8413756690f8beaad089a03138ec62cc | 7bb52d2a764a41f0ae2bb2a2eed95b417da723a8 | /modules/lxo_gps.py | 6f92cd9d4a70b614e1e9bfe99c8fabd8ef04974b | [
"BSD-3-Clause"
] | permissive | leifo/pytheas | e0b219ad8f974659c818246b6dd79d1dc287f006 | 0a6642f86a076b4a42cdbe28389e37e334e668cc | refs/heads/main | 2023-05-25T19:39:12.573379 | 2021-06-07T19:31:08 | 2021-06-07T19:31:08 | 374,774,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,785 | py | lxo_gps.py | # generic gps interface with callback
# to be used for s60 1st, 2nd and 3rd edition phoness
# lxo 19.04.2008
'''
api (similar to position api, but also for 1st and 2nd edition)
position:
latitude
longitude
altitude
horizontal_accuracy (not on 1st and 2nd edition, yet)
vertical_accuracy (not on 1st and 2nd edition, ye... |
8f32c04292c2cd317745b8aae7e0d055aea16bc8 | ce33989c493ab4a5b5600c1d49ef7b20d0b34753 | /kompendie/kompendie/kap.3/3.4.py | 33c93bdf95bb4113af31df8b92814ab88e26eab1 | [] | no_license | abboliwit/kompendietoliver | 7fe28525d0f9e63914f124b9ca72fe17ce5722a4 | 0ec4fdecedf3f1ca1dd76cf4b6794ad4635f1d23 | refs/heads/master | 2020-04-27T01:33:53.893613 | 2019-05-29T20:40:56 | 2019-05-29T20:40:56 | 173,969,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | 3.4.py | male = ["erik","Lars","Karl","Anders","Johan"]
female = ["Maria","Anna","Margareta","Elisabeth","Eva"]
male.sort()# sorterar listorna
female.sort()
print(male,female) |
15e282a0dac6f4c7398804dab9caa9d345f48a60 | ecf8cba57c354f397f981b5cfd6c20ca4d6dd03b | /2019/04/q1.py | c3925bc5dc644a652f360dc88331ad114163c936 | [] | no_license | antonioorsini/adventofcodepython | 5cb74336a47f86e6f6030c411858cd07497bfc30 | 4bd62944224d3b5825fc027a51700a5fd8f8c1e1 | refs/heads/main | 2023-03-22T18:14:25.353133 | 2021-03-15T23:41:08 | 2021-03-15T23:41:08 | 348,153,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | q1.py | def ruleDoubleDigits(n):
return len(set(str(n))) < len(str(n))
def ruleIncreasing(n):
ns = [int(d) for d in str(n)]
ch = []
for i, n in enumerate(ns[1:]):
ch.append( n >= ns[i] )
return(all(ch))
def main():
count = 0
for n in range(168630,718098):
if all( [ruleDoubleDig... |
811c83ef84e7df14752bdb6cf12208a5a21ec17d | 482623fe41cccf4d9fe0136f658aeae76bdd92c3 | /Hacker-rank/reducefunction.py | a5db34874b3715a95e25c819c724ca04319e9e66 | [
"MIT"
] | permissive | DiptoChakrabarty/Python | 9b671a673e169609215c00947b3a31636bf8435c | 075dfb780b24d31137cfe54f9dc396ebfc034cda | refs/heads/master | 2020-04-21T18:05:49.000026 | 2020-04-05T13:42:36 | 2020-04-05T13:42:36 | 169,757,136 | 0 | 2 | MIT | 2019-10-01T16:33:44 | 2019-02-08T15:38:07 | Python | UTF-8 | Python | false | false | 229 | py | reducefunction.py | a=[]
b=[]
for i in range(len(fracs)):
a.append(fracs[i].numerator)
b.append(fracs[i].denominator)
l=reduce(lambda x,y:x*y ,a)
m=reduce(lambda x,y:x*y ,b)
t=Fraction(l,m)
print(t.numerator, t.denominator)
|
c915c27effd67b31fabe8daf5d6aaee5ea986947 | f5275c2388902ab287bc37e0894584012f8be262 | /blogs/jwtCustom.py | 554811229dd26c395221cb8246794c3e4abbadf0 | [] | no_license | loushiano/blogs-django | df7efa344f177177c9716fc78f7dbe4f753f6954 | 11df217e36f1c37fdbd4e1431f35446a352f8d9e | refs/heads/master | 2023-03-04T00:45:15.780997 | 2021-02-11T04:07:14 | 2021-02-11T04:07:14 | 337,925,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 532 | py | jwtCustom.py | from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
from rest_framework_simplejwt.views import TokenObtainPairView
class MyTokenObtainPairSerializer(TokenObtainPairSerializer):
@classmethod
def get_token(cls, user):
token = super().get_token(user)
token['user_id'] = use... |
298b0769af10d80ae466c595a1c5d6e6506867da | ad00b44bd862ca05d0fd94ab152dc2c9c962aeb3 | /08 Modules/04 Packages.py | a2da7f1bce33f1e99a0c92de3b09eda57f84dd83 | [] | no_license | jmschp/mosh-complete-python-course | e7972867a2adae044ad2cd6004033b8da84c3e23 | a8389bdb3f83beea95e3418ab37a5013a0156819 | refs/heads/master | 2023-08-01T10:50:33.830709 | 2021-01-01T21:39:46 | 2021-01-01T21:39:46 | 272,241,712 | 41 | 24 | null | 2021-09-22T19:43:32 | 2020-06-14T16:35:07 | Python | UTF-8 | Python | false | false | 1,197 | py | 04 Packages.py | # 04 Packages
# As our application grows we are going to organize it in folder. Separating the modules in folders for a better organization.
# Here we created a folder "ecommerce" and put the "esales.py" module there.
# We have to add a "__init__.py" file to the "ecommerce" folder.
# When we do that Python treats that... |
c769f9b199e9e9b8647168b99df9ca450c3371e7 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/tag/__init__.py | e82083f73ec13bbd5b7040b8546f68fb48868090 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 4,084 | py | __init__.py | """The Tag integration."""
from __future__ import annotations
import logging
import uuid
import voluptuous as vol
from homeassistant.const import CONF_NAME
from homeassistant.core import Context, HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import collect... |
8c609ea3ffcbf5c2d969226ef98ff35301f4e8ba | 0e94e46f8c8802db096cbd49d3bf26ed56e0ab31 | /Array_Questions/cloud_jumper.py | df766b59773b32fe49ac5e366e74deefe2321e59 | [] | no_license | ad-victoriam-101/Interview_Questions | 3eee6b6a2d0d48bdfdaefe9b351ea3e8b11f1acf | c0325757ac0444de55b49a68159abba8bbaec559 | refs/heads/master | 2020-06-06T03:10:22.026059 | 2020-02-11T02:11:22 | 2020-02-11T02:11:22 | 192,621,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 816 | py | cloud_jumper.py | #For each game, Emma will get an array of clouds numbered if they are safe or if they must be avoided.
# For example, c = [0,1,0,0,0,1,0] indexed from 0 - 6. The number on each cloud is its index in the list so she must avoid the clouds at indexes and .
# She could follow the following two paths: or . The first p... |
6ed28f155db18c46fb2f1ab06d181a107e4bc910 | 4a75d64d9f25103b19ff846081fbb36735d32803 | /genPrimes.py | cc795cff24623053058b49e44e32cc171b91e7f9 | [] | no_license | continuum-ovais-koti/general-programming | a8d0311a250e63f2f91423fa95d1b1b6f5333f8b | ef638d672948e9850b2fe828aaa1b41e92ae9208 | refs/heads/master | 2021-07-01T03:47:43.952223 | 2020-09-03T10:43:39 | 2020-09-03T10:43:39 | 152,243,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 857 | py | genPrimes.py | def genPrimes(limit):
# this is consider the limit also in the list, eg in genPrimes(5) 5 is also a prime
limit = limit +1
bools = []
primes = []
# generate a list of booleans all set to True initially
# the list is indexed from 2 to limit representing all numbers
# e.g. [True, True, True, True] = [2,... |
ba5af15b7a6797f30beb778fa45b363d98cae87b | 384fe122059cb367bfc71ab62057e25e81638f68 | /0.OLD/bi_v1/graph/views.py | e63edef92f6f761b72ebf36277166f4c445ab2c4 | [] | no_license | kimjaemin95/django_data_visualization | d3c6727cf824c52b33f93a3641bc48aef533ef9c | c4757ce9930f2ec0b17a6ce8ffa4042d0b545667 | refs/heads/master | 2022-12-25T11:53:57.575167 | 2020-09-27T14:55:38 | 2020-09-27T14:55:38 | 297,343,621 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | views.py | from django.http import HttpResponse, JsonResponse
from django.shortcuts import render, redirect
from django.contrib.auth.hashers import make_password, check_password
# Create your views here.
def line(request):
'''
http://127.0.0.1:8000/graph/line/
'''
return render(request, 'home.html')
|
0a5fe0c84a62ef8fa148d4508e3537d1f8818d7e | 0e88edab3818e9705af4df73866c22bc3563a46a | /nuts/nuts.py | 2683d1df9ba6576f50bac94218fc9f989d74b514 | [] | no_license | kskkwn/notebooks | 200b062b71c6e1d1c1ca02b4ce4820f9008ede03 | 57462fd90f2e054f64786521cb3be0a252bf32a6 | refs/heads/master | 2022-01-27T01:14:09.112331 | 2022-01-24T10:22:22 | 2022-01-24T10:22:22 | 96,770,281 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,045 | py | nuts.py | import numpy as np
from numpy import exp
from copy import deepcopy
import pylab as plt
import seaborn as sns
from scipy.stats import norm, gamma
from tqdm import tqdm
from numpy import random
from matplotlib.animation import FuncAnimation
sns.set_style("white")
true_μ = 3
true_σ = 1
nb_data = 1000
x = np.random.norm... |
4174ad61ccb65507501cfce51762c7818e849ab8 | cfb3d0bef447f3d6638d5169a97084bb02672a60 | /add_assignment.py | 3898d8d0800e9be61a6e8008b499c498d8da4244 | [] | no_license | srinivasan-l/classroom_assignments | b90ab4c26761fc61667ccd5566957adde6b90f24 | 85892ac8539f7b0ba5201f69a8c332b4d886c221 | refs/heads/master | 2021-01-21T22:34:55.401019 | 2017-09-01T23:48:42 | 2017-09-01T23:48:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,555 | py | add_assignment.py | from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
... |
d4c8578993d8016e4e40e137738ae909d8568f93 | d7d3358b6a54e54fe7eb492a6b2db219f97ba2c0 | /interface/views.py | c8bd7c4fca7b2695e3caa18422fab35f58422f4c | [] | no_license | makriss/Dwitter | 10e0fe24d9980ff95badf684d40e0c7e0781e3b4 | c5e70d4bfb8f748d1e6006e1eac7cad35240de4e | refs/heads/master | 2023-03-21T18:03:38.076369 | 2020-08-10T11:39:11 | 2020-08-10T11:39:11 | 274,486,875 | 0 | 0 | null | 2023-03-04T00:38:08 | 2020-06-23T19:03:37 | JavaScript | UTF-8 | Python | false | false | 4,039 | py | views.py | from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import F, Value, Count, OuterRef, Exists
from django.db.models.functions import Concat
from django.shortcuts import render
from rest_framew... |
0a3410bea660abf6f5c58a3d42aee02b01210dbd | fc08b3301ecfc4e9ac87036a313a32549da2b4f4 | /python/ENDIANS.py | cf2deba3474705e228c0edf04ba4c1796465d7b1 | [] | no_license | l10veu602/algospot | ffffa156118d1e9b7282613e5cc0e1b41495b6ed | c03842756ad38467c15b6c6a0a58d59d29c96155 | refs/heads/master | 2020-05-20T01:59:27.443856 | 2015-03-19T05:33:20 | 2015-03-19T05:33:20 | 31,194,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py | ENDIANS.py | import struct
for i in xrange(int(raw_input())):
print struct.unpack('<I', struct.pack('>I', int(raw_input())))[0]
|
e01b7239b2e31b3bb62bb5bb8423954f652e1a41 | 5f148e5b75f4afc6edd1432ffdc425932d0fbe51 | /physionet-django/lightwave/urls.py | c3d2211f49aa00ed89afe5554bc12f66e962f970 | [
"BSD-3-Clause"
] | permissive | MIT-LCP/physionet-build | 82c4092dabe1ef2436e4a55d73bdadd5b4b1c624 | 304e093dc550da8636552dc601d6545c07ffc771 | refs/heads/dev | 2023-08-16T10:33:44.203786 | 2023-08-10T17:32:27 | 2023-08-10T17:32:27 | 82,719,282 | 50 | 17 | BSD-3-Clause | 2023-09-14T20:52:38 | 2017-02-21T19:37:04 | JavaScript | UTF-8 | Python | false | false | 580 | py | urls.py | from django.urls import path
from lightwave import views
urlpatterns = [
path('', views.lightwave_home, name='lightwave_home'),
path('server', views.lightwave_server, name='lightwave_server'),
path('projects/<project_slug>/', views.lightwave_project_home,
name='lightwave_project_home'),
path... |
649a3f3b9d86348c8211042bbac80cb4719b5e5c | 7abf817c4ed57f979a2da6cc964df7fd7833dbda | /modelling/test_models.py | 707bd88c70375122bfdfcf45c626f12ebf62f069 | [] | no_license | migrantnewsfilter/Modelling | a14cd1df75edbbd632dd943adf50b46b3a90e40d | a3060f8c3145005683e1d711e2edfe9d32f3b28f | refs/heads/master | 2021-01-12T11:32:43.473858 | 2018-05-30T07:58:26 | 2018-05-30T07:58:26 | 72,947,661 | 0 | 2 | null | 2016-11-28T23:48:15 | 2016-11-05T19:10:16 | Python | UTF-8 | Python | false | false | 955 | py | test_models.py | from mock import patch, MagicMock
from pymongo import UpdateOne, MongoClient as MC
from datetime import datetime
import pandas as pd
import numpy as np
import pytest
from .models import *
@pytest.fixture(scope="module")
def collection():
client = MC()
collection = client['newsfilter-test'].news
yield coll... |
6a2e3d9730483b82d026590c5248c20f12ae1dab | 1fc35e54ee4723cfa3d13de713895eac30616847 | /baekjun/stage solve/28.DFSandBFS/1697.py | a927f95ca7afcbab8d445959386707c97d7d8ff8 | [] | no_license | yhs3434/Algorithms | 02f55a5dc21085c0a17d9eaec5e3ba0cbd6d651d | 24d234a301077aac1bc4efbb269b41a963cedccf | refs/heads/master | 2021-07-12T19:21:00.446399 | 2021-01-20T01:44:27 | 2021-01-20T01:44:27 | 226,431,877 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | 1697.py | # 숨바꼭질
# https://www.acmicpc.net/problem/1697
# https://github.com/yhs3434
from collections import deque
n, k = map(int, input().split(' '))
q = deque()
q.append((n, 0))
answer = 0
#visited = [False] * 300000
#visited[n] = True
_SIZE_ = 400000
visited = [False] * _SIZE_
visited[n] = True
while q:
cur = q.popleft(... |
9dac20cb6264f26b2a08ca1fa0e6aeb68e3003cb | c4aa41ad51c38d15a6da43a6c601869cf26376d4 | /covid.py | 00c3a611a1f39ed12bd3b5553bbf8b6eca98b8b0 | [] | no_license | paulchinnam/Python-Covid-19-Case-Visualizer | 0d578413d0c2bc13aab8a630e3d16f4ed85aa494 | 2bca87cc223f606470531b16981665dcc9313927 | refs/heads/main | 2023-06-20T05:33:57.877680 | 2021-07-16T18:04:45 | 2021-07-16T18:04:45 | 386,723,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,161 | py | covid.py | #Generates ISO codes for each country
import pycountry
#Map the data for visualization
import plotly.express as px
#Store and organize data
import pandas as pd
#Step 1
URL_DATASET = r'https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv'
df1 = pd.read_csv(URL_DATASET)
list_countrie... |
d5c51118abd2d92e810669796428571f69461f57 | f566dfc5ce189d30696b9bf8b7e8bf9b1ef45614 | /Env/Test/testMountainCarCustom.py | ba5914c6cbfcdd4a2388302536c55c4afb1bf419 | [] | no_license | yangyutu/DeepReinforcementLearning-PyTorch | 3dac4ad67fa3a6301d65ca5c63532f2a278e21d7 | 7af59cb883e24429d42a228584cfc96c42f6d35b | refs/heads/master | 2022-08-16T13:46:30.748383 | 2022-07-30T05:47:47 | 2022-07-30T05:47:47 | 169,829,723 | 12 | 6 | null | null | null | null | UTF-8 | Python | false | false | 1,217 | py | testMountainCarCustom.py |
from Env.CustomEnv.MountainCarEnv import MountainCarEnvCustom
# the tutorial to extend open ai env is at
# https://hub.packtpub.com/openai-gym-environments-wrappers-and-monitors-tutorial/
# the reward wrapper is at https://github.com/openai/gym/blob/master/gym/core.py#L389-L398
# https://gym.openai.com/docs/
# htt... |
04c4b179d5fc50041e512fcdaaeddb7c7285401e | 61ebdb5fd94bae4ff1d3a6ccff138f0b3d0dce4d | /code/chrom_nonchrom_orthocore.py | 1a2460845014b574967d0c92e45198ca98ef4e8e | [] | no_license | jpwyoung/Rlc | f2d449ebcfa670ab348c58b6764892c79eb3771b | b995049d3b5e613088472ebc19da8734970e0679 | refs/heads/main | 2023-01-29T01:17:22.381817 | 2020-12-11T19:08:42 | 2020-12-11T19:08:42 | 319,683,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,307 | py | chrom_nonchrom_orthocore.py | #!/usr/bin/env python3
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import os
'''
This script sorts scaffolds into chromosomal and nonchromosomal sets, based on whether they
carry any of the 3215 'orthocore' genes that we have found are normally encoded on the
chromosomal backbone... |
bdc22ec7b80866d2d757f958a66aa613f2335302 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/openpyxl/openpyxl/styles/named_styles.pyi | b6d6f06d6d0adb2d39f4a8659904944360a19319 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 1,848 | pyi | named_styles.pyi | from typing import Any
from openpyxl.descriptors.serialisable import Serialisable
class NamedStyle(Serialisable): # type: ignore[misc]
font: Any
fill: Any
border: Any
alignment: Any
number_format: Any
protection: Any
builtinId: Any
hidden: Any
# Overwritten by property below
#... |
c178fa1752c0a95223a25f41a12102c2a67f66ff | 0ddf32a64fe0591f3df2d7879b708369c7e361bf | /chapter1/question1.1.py | 566bcb0563097db2c5a1efac70d64289ddacdb0a | [
"BSD-2-Clause"
] | permissive | shichao-an/ctci | 33bc72d18a4d33a7ad0ed9f5637afea4e19b355b | 0468b6d580b55abd92f17974218214321048e04d | refs/heads/master | 2021-01-19T04:55:07.417403 | 2015-09-11T01:54:37 | 2015-09-11T01:54:37 | 18,828,136 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | question1.1.py | from __future__ import print_function
def is_unique_chars(s):
"""Determine if a string has all unique characters (ASCII)"""
if len(s) > 256:
return False
char_set = [False] * 256
for c in s:
if char_set[ord(c)]:
return False
char_set[ord(c)] = True
return True
... |
7b035692d2965766a259063d972c2821fa36acf4 | 0e98166dd78bac95d1d068cc1347968c08cdb117 | /pagetags/reqparsers.py | 1cac0913e284117ca01377da309eb62c46569218 | [] | no_license | pmatigakis/pagetags | 6332d0abb64fd050799d23fb4fec5a6cae27a1f9 | 8d744c80a8351d134dbda8406cf9757775ca4b18 | refs/heads/master | 2020-09-23T03:36:32.545910 | 2017-04-17T12:45:55 | 2017-04-17T12:45:55 | 67,342,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | reqparsers.py | from flask_restful.reqparse import RequestParser
from pagetags import argtypes
post = RequestParser()
post.add_argument("title", required=True, location="json",
type=argtypes.post_title)
post.add_argument("url", required=True, location="json",
type=argtypes.post_url)
post.add_argu... |
6e49fb8732df7502a4e072d842c93fd241114c82 | ab0aba998d7c0333847427993826b0091aad1c4e | /app_svn_branches/view_analysis.py | dcd703ff050bd62f0a5dc42f74a90f49e058693e | [] | no_license | peterrudnik/CodeReviewApp | d99bb6e0f112ba23fa44e4ddbf84b85c5dc35091 | 146a93eea6e3a76ec5fa1c1cab986e2afd01b0df | refs/heads/master | 2020-04-13T22:52:09.687715 | 2019-02-14T17:09:05 | 2019-02-14T17:09:05 | 163,490,840 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,166 | py | view_analysis.py | import database
from flask.blueprints import Blueprint
from app_svn_branches.forms import LoginForm, FormEditReview, FormNewReview, FormEditReviewItem,FormNewReviewItem, DATETIME_FMT_FORM
from flask import render_template, flash, redirect, session
from flask import Flask, jsonify, request, url_for, Response
from dateti... |
54cbabb411bf3400abcf0d17c0994d95d40a7047 | d34f08169b24979b25bd59e3b044d8a276836dc7 | /latentneural/layers/gaussian_sampling.py | e6794a7c5a54e36d019e87440058c08819a11225 | [] | no_license | alessandrofacchin/msc-project | bb1041413b36d3317d7b5eebb84c03b8aa0c51cf | 254a4dd91fa9b7ecd1815a2b96a84525cf67117b | refs/heads/main | 2023-08-31T10:06:23.625077 | 2021-10-21T10:20:40 | 2021-10-21T10:20:40 | 351,514,716 | 0 | 1 | null | 2021-08-13T07:44:20 | 2021-03-25T17:05:52 | Jupyter Notebook | UTF-8 | Python | false | false | 634 | py | gaussian_sampling.py | import tensorflow as tf
class GaussianSampling(tf.keras.layers.Layer):
"""Uses (z_mean, z_log_var) to sample z, the vector encoding a digit."""
def __init__(self, name: str = "GaussianSampling"):
super(GaussianSampling, self).__init__(name=name)
@tf.function
def call(self, inputs, training: ... |
63daeee4e965ef975f22ccacf8c06cb6cbfc6e1c | 3e23aaf1d482843e3640dc2721ab887082063b51 | /num001_100/num031_040/num38.py | 46ea47ce7a099b0c362e2a0e3e2744fb39c43a65 | [] | no_license | guozhaoxin/leetcode | b19be28c0dc82fa7a5126edafa7c77ae2c77f22e | 807ba32ed7802b756e93dfe44264dac5bb9317a0 | refs/heads/master | 2020-04-01T10:29:49.375239 | 2019-02-24T03:27:18 | 2019-02-24T03:27:18 | 153,120,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,318 | py | num38.py | #encoding:utf8
__author__ = 'gold'
'''
Count and Say
The count-and-say sequence is the sequence of integers with the first five terms as following:
1. 1
2. 11
3. 21
4. 1211
5. 111221
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
G... |
bfc2a36868d42aac816d64725c72f976c5485713 | 03b88c248a5542f3ca4c9d0ae712f35137ac2c2b | /bot.py | 3e732f9218a52e0e465654b7db3db678ebd2aca4 | [] | no_license | TheOnAndOnlyZenomat/Discord_Search_Bot | 87f5bb72681ef22c3d47e7c75c90890088ddf153 | 77ff7f41c4744e8d81ce6cc87a174f0598ec696c | refs/heads/master | 2020-11-29T14:33:38.860972 | 2020-10-01T17:15:56 | 2020-10-01T17:15:56 | 230,139,114 | 0 | 0 | null | 2020-10-01T17:15:57 | 2019-12-25T18:23:20 | Python | UTF-8 | Python | false | false | 1,945 | py | bot.py | import discord
from discord.ext.commands import Bot
from discord.ext import commands
import time
from selenium import webdriver #imports the webdriver through selenium
from selenium.webdriver.common.keys import Keys #imports keystrokes for automated use through selenium
from selenium.webdriver.chrome.options import Opt... |
a6963b657c94317d5f9c06351924e668d64be9e8 | e9ca2833dd7bb126a9523b0cd31fc8b602a5a786 | /launch-scripts/launch_npb_tests.py | d57016d63e6dc36262975b70248e33638be1cab1 | [
"BSD-3-Clause"
] | permissive | TCHERNET/parsec-tests2 | e94c61fbf8110cab7bef857f0017c8a45158f027 | 775b299a890d0d552877ed510240aa59c630eaa3 | refs/heads/master | 2023-08-15T15:22:40.293033 | 2021-10-04T19:09:09 | 2021-10-04T19:09:09 | 413,213,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,891 | py | launch_npb_tests.py | import os
import sys
from uuid import UUID
from gem5art.artifact import Artifact
from gem5art.run import gem5Run
from gem5art.tasks.tasks import run_gem5_instance
packer = Artifact.registerArtifact(
command = '''wget https://releases.hashicorp.com/packer/1.4.3/packer_1.4.3_linux_amd64.zip;
unzip packer_1.4.3_... |
0e202ba5a56c8e35aa4e59641b2e8b16f2eefefd | a1903bad5a9a5b42214a27d07cf5eb01845b7cbd | /dashboard/wsgi.py | 7bdbacfe917a8422d6a27372f707e4526d30ce8c | [] | no_license | aderraik/Dashboard-with-Django-and-Bootstrap | a877cb7d01640e0908323f83c22e5a4ee46fd759 | 97fdc8bef05517a57032542decc11f07025a0233 | refs/heads/master | 2022-12-11T13:11:19.813025 | 2020-08-31T22:47:29 | 2020-08-31T22:47:29 | 287,655,630 | 1 | 0 | null | 2020-08-15T01:23:24 | 2020-08-15T01:23:23 | null | UTF-8 | Python | false | false | 608 | py | wsgi.py | """
WSGI config for dashboard project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
# Load the correct environment
EN... |
1a16b5761e8004a908a80fa50e3fade017de55ac | 5fcd159745cc02ab3fc512d1d107001d35f92ff4 | /ekimeimysql1/migrations/0008_auto_20200504_1918.py | a51afd3fa97de94c4cd8266f77e2c3680c655459 | [] | no_license | nignagic/ekimeimysql | 255a8e1a63017ff44397f697639acf03680c72cb | 1f95ed5cce3a13ab9cbead70502ccdb1e30bd3fb | refs/heads/master | 2021-01-06T19:34:00.762889 | 2020-05-24T19:34:52 | 2020-05-24T19:34:52 | 241,461,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | 0008_auto_20200504_1918.py | # Generated by Django 3.0.2 on 2020-05-04 10:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ekimeimysql1', '0007_auto_20200430_2057'),
]
operations = [
migrations.AddField(
model_name='yo... |
a4b78d0a3570d9eb5c4c13a2c56768d3df6fcdbe | ef730c702a17f4b06f7d175cb0361cec2d3480a7 | /Model/dbconfig.py | dd803b7b43218e09e2209518c37cc7dba8162fe3 | [] | no_license | Rast999/Tasker | f4a4e14c92c413a60c3f7d3934aeb1678e675e1b | ee49be3ef720062353f8a9c3b5f9a130909f7da9 | refs/heads/master | 2020-03-27T22:14:31.881141 | 2019-05-06T15:55:15 | 2019-05-06T15:55:15 | 147,215,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,673 | py | dbconfig.py | """
Data schema for shelve
{
"Task description" : {
"subtask description": {
"Description": "subtask description",
"Date created": 01/01/2019,
... |
ef28751ed3c45dfb261ead9130b5a6d94dc8725a | ef4db6a1d5006d17c5e0a86ef39d6767cdd43bc0 | /05ListOverlap.py | d760c954cfcdf06b27168d8925742328c1dec69d | [] | no_license | ciurca/PracticePython | 4d3b48c7bc4edd5e4599167c6b152743c477f6fc | dfdd92a518ba4567cc6213102d2e691a8f01179b | refs/heads/master | 2022-06-10T15:14:39.686795 | 2020-05-09T12:45:05 | 2020-05-09T12:45:05 | 255,034,917 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 820 | py | 05ListOverlap.py | import random
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
def basic():
print(f"I'm going to print a list that contains only the elements that are common between \n{a} and \n{b}.\n")
print([n for n in a if n == n in b])
def extra():
c = random.sample(range(1, 10... |
5eb34169730b7c954d8aebc3f61be58b099cd861 | f2a2f41641eb56a17009294ff100dc9b39cb774b | /current_session/daily_challenge/single_number_iii.py | 3b79c61c8c6c13bfdcf78dd714eaf50f00559fe3 | [] | no_license | YJL33/LeetCode | 0e837a419d11d44239d1a692140a1468f6a7d9bf | b4da922c4e8406c486760639b71e3ec50283ca43 | refs/heads/master | 2022-08-13T01:46:14.976758 | 2022-07-24T03:59:52 | 2022-07-24T04:11:32 | 52,939,733 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | single_number_iii.py | from typing import List
class Solution:
def singleNumber(self, A: List[int]) -> List[int]:
seen = set()
for a in A:
if a not in seen:
seen.add(a)
else:
seen.remove(a)
return [x for x in seen] |
168d69c3531865e3d354ab90594dffab226a1d1e | 175dd8be9d7589970fdaed56631b4eff67f54abb | /py_consul.py | 2a0ef20ea83d52b6fc54a01472e0a294ce3a68d4 | [] | no_license | liwei1dao/lego_demo | 600fa656552b1cdd36a8cbf30971db608b0919d0 | d7eaa7094d2d1875a39c8436f83488a4873d79ea | refs/heads/master | 2022-12-05T05:17:39.149991 | 2022-11-11T10:44:15 | 2022-11-11T10:44:15 | 433,335,967 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | py_consul.py | #!/usr/bin/env python
# encoding: utf-8
import requests
import json
host = '10.0.0.9'
port = 8500
#consul中微服务名称
serviceNames='dreamfactory'
def get_service():
url = 'http://'+host+':'+str(port)+'/v1/agent/services'
data = requests.get(url).json()
jsonStr = json.dumps(data)
print('json '+json... |
9a51756553b14e17ed9d6b94a235a9e9f47368a7 | 76ad1b0a2b9722a324589d84bf73fe3569511486 | /Assignment#01.py | c9bda331a3d233656eb7dae4a2a3344d6063338f | [] | no_license | shais1997/python_assignment1 | a009e6de7f8a884d9befa5ea2b3f460f11ea0170 | b8da18cfabcd44805415e7769242de910b5d9030 | refs/heads/master | 2020-09-06T17:24:37.828468 | 2019-12-22T08:57:05 | 2019-12-22T08:57:05 | 220,492,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | Assignment#01.py | #!/usr/bin/env python
# coding: utf-8
# In[5]:
print('Twinkle, twinkle, little star,')
print(' How I wonder what you are!')
print(' up above the world so high,')
print(' like a diamond in the sky.')
print('Twinkle, twinkle, little star,')
print(' How I wonder what you are!')
# I... |
c230f161cbd407d6b2aa421b5a3e3c750af1cfe8 | 6b1b506139088aa30de9fd65cff9e3b6a3a36874 | /sofia_redux/scan/flags/tests/test_array_flags.py | 6d45b89ca6264057431cecccf4e559f205156e33 | [
"BSD-3-Clause"
] | permissive | SOFIA-USRA/sofia_redux | df2e6ad402b50eb014b574ea561734334d70f84d | 493700340cd34d5f319af6f3a562a82135bb30dd | refs/heads/main | 2023-08-17T11:11:50.559987 | 2023-08-13T19:52:37 | 2023-08-13T19:52:37 | 311,773,000 | 12 | 2 | null | null | null | null | UTF-8 | Python | false | false | 569 | py | test_array_flags.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from sofia_redux.scan.flags.array_flags import ArrayFlags
def test_array_flags():
names = list(ArrayFlags.flags.__dict__.keys())
assert 'DISCARD' in names and 'MASK' in names and 'DEFAULT' in names
assert ArrayFlags.flag_to_letter('DISCARD')... |
3df1e482350502a4c21db0fe88a06738a90da772 | 906526f9690f2cf25f93daacf8c3054653d65224 | /02-Button/ButtonBorder.py | ad9297cb7fb6be0283ef21babd209a5f8032b467 | [] | no_license | tk103331/Tkinter_samples | 8d2338dcc1e508fb6cc1ee854e9d38c903cbf28d | 83e36e5bc835f24bc140b68d5d984a90867eb0ab | refs/heads/master | 2021-01-12T12:32:52.142966 | 2016-11-17T15:00:49 | 2016-11-17T15:00:49 | 72,546,724 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | ButtonBorder.py | from Tkinter import *
root = Tk()
for b in [0,1,2,3,4]:
Button(root,
text = b,
bd = b).pack()
root.mainloop()
|
dffc10173c4f02406cf9a65cacacb70fa5013f01 | 07beeb108930d0b0633670997619115cc7e1230c | /src/p24.py | 307320c52b68086340fc6842a0e4f64d2db83893 | [] | no_license | tuxedocat/nlp100 | 03ec98c7a221ad192256b3ede2cd3e19c4a74dff | 2226b5096a55d0cfb504860197b9ae1b77580f8f | refs/heads/master | 2020-12-31T04:42:20.517792 | 2015-05-23T03:28:01 | 2015-05-23T03:28:01 | 36,234,689 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 921 | py | p24.py | # -*- coding: utf-8 -*-
"""nlp100 in python3"""
__author__ = "Yu Sawai (tuxedocat@github.com)"
__copyright__ = "Copyright 2015, tuxedocat"
__credits__ = ["Naoaki Okazaki", "Inui-Okazaki Lab. at Tohoku University"]
__license__ = "MIT"
import sys
import subprocess
import gzip
import json
import re
filepath = "../dat... |
6865af7b3d4cb9bba8dcb83374ce52505d83202f | c0d4f9f732561070e6941476392d257c8ce2d28b | /python-lab/lab06/listLab2.py | 5acdb336819a678349aff42b535eb4ada324e3aa | [] | no_license | yeonjooyou/learn-python | acc256d96601dde649ee0d1e19109945424021a8 | 158a5b501091c39eabde1a94777467fb6a9a8c56 | refs/heads/master | 2023-06-18T09:53:45.425414 | 2021-07-21T23:53:32 | 2021-07-21T23:53:32 | 386,617,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 461 | py | listLab2.py | # 10, 5, 7, 21, 4, 8, 18 로 구성되는 리스트를 생성하여 listnum에 저장한다.
listnum = [10, 5, 7, 21, 4, 8, 18]
# listnum에 저장된 값들 중에서 최솟값을 추출하여 출력한다.
# 최솟값을 구하는 기능은 함수를 사용하지 않고 제어문으로 직접 구현한다.
min_value = listnum[0]
for i in range(1, len(listnum)) :
if min_value > listnum[i] :
min_value = listnum[i]
print('최솟값 :', min_value) |
94e6690fa1e921a6a28aeb06e046bcd873b63bc8 | 1c9999d51cfe4491685ec6eb865c299251f4fd60 | /other/softmax_test1.py | f21737f1a0a220b98f7d30b916ed89f407cc6336 | [] | no_license | bjbluejita/deep-learning-notebook | d7a081443eda570eb6d36fd7d2983f6077b43962 | 0e3598a20214dd78deb4f5e6809f7789722f6f5d | refs/heads/master | 2023-05-27T15:29:32.639505 | 2023-05-14T02:16:59 | 2023-05-14T02:16:59 | 252,683,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | softmax_test1.py | import numpy as np
def softmax( X ):
"""
softmax 函数实现
X : 一个二维矩阵, m * n,其中m表示向量个数,n表示向量维度
返回:
softmax计算结果
"""
assert( len( X.shape )== 2 )
row_max = np.max( X ).reshape( -1, 1 )
X -= row_max
X_exp = np.exp( X )
S = X_exp / np.sum( X_exp, keepdims=True )
return S
a = [[... |
42ad20c6f5a4384a4d547645d8a600c0a70ad5fe | f0a9e69f5acd27877316bcdd872d12b9e92d6ccb | /local_global.py | 281313ae951da4d149d9b6fbaf5476e5878f4487 | [] | no_license | KhauTu/KhauTu-Think_Python | 9cb2a286efb8a33748599cd3ae4605e48256ac4c | 880c06f6218b8aee7a3e3da0d8b4764fcaa9c1b4 | refs/heads/master | 2020-05-29T21:43:47.246199 | 2019-05-30T11:36:05 | 2019-05-30T11:36:05 | 189,389,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,568 | py | local_global.py | # kteam = "How Kteam"
def say_slogan():
kteam = 'How Kteam'
print('We are', kteam)
# say_slogan()
# Biến khai báo ở hàm cha có thể sử dụng trong hàm con nhưng biến ở hàm con không thể sử dụng ở hàm cha.
# pass by reference: Có nghĩa là bạn đưa bản gốc.
# pass by value: đưa giá trị hoặc là “đưa bản sao”.
num ... |
97a69fa963c2fd07f14f00af92d6a886d1c067dc | 66d6a8e9a22f23d8f7191fff2a45a4f9cacecbe3 | /Fruits Mat.py | dfc399cff48fdb652d1211ec13090f767f4c3437 | [] | no_license | AjayChris/fruits | 0a77923dac71d888db58f874e9a6b7badf24e776 | 1f04366f15935cc6e579f7a51833667d47c60e53 | refs/heads/master | 2022-09-14T21:37:35.661793 | 2020-05-25T06:42:53 | 2020-05-25T06:42:53 | 266,703,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | Fruits Mat.py | import matplotlib.pyplot as plt
import csv
'''
x=[]
y=[]
with open('fruits.csv', 'r') as file:
reader = csv.reader(file)
for row in reader:
x.append(str(row[0]))
y.append(str(row[1]))
for line in file:
split_line=line.split(',')
if len(split_line... |
6f00f5970ecba1661c541e381fb4d246f4baf419 | ce6f719768a9277d4e546910da7a9a06a2ae26e9 | /python/ex13.py | 4496d6cb775d6b9c337f37c63d04b0eed3d54428 | [] | no_license | rapid-snail/selenium-course | 8da388d20b29c3ab868a9e844366cdd18e5c258a | a8a7b7fdbdae535fa1f67e2654f3d5c557dfbded | refs/heads/master | 2020-08-15T11:55:53.178934 | 2019-11-17T05:06:51 | 2019-11-17T05:06:51 | 215,337,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,297 | py | ex13.py | from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
def main():
driver = webdriver.Chrome()
wait = WebDriverWait(dr... |
9a1c20a5f75f685f34ce892c3db6b46ec37c50c8 | fb1babadfc358a544209ba8f4869aa63483ecb24 | /src/dataset_augmenting.py | 37e470f4e84735b2165eae8f690bfda4aa639a64 | [] | no_license | pkacp/road_signs_recognition_system | efc486e2a90f4cac4d41de2e1251bc7cf382b485 | c857c12b7068bda0a4458b6e42dc14d4f3c5bc6a | refs/heads/master | 2020-11-27T15:12:28.743847 | 2020-04-26T14:25:10 | 2020-04-26T14:25:10 | 229,505,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,087 | py | dataset_augmenting.py | import pickle
import random
import os
import cv2
from collections import Counter
import imgaug as ia # https://github.com/aleju/imgaug
import numpy as np
from plots_lib import *
from settings import *
def random_rotation(img):
rotate = ia.augmenters.Affine(rotate=(-25, 25))
return rotate.augment_image(img)... |
ce82c3e119a33c1abd4ef156c75c792f8b072961 | 916f696c073361fe8cb0eebd93672611796addd6 | /Day-4(Spiral Order Matrix).py | d974970b890bcfc9b1961b4cba95ab8d2cce7b6d | [] | no_license | ManoharSuman/Spartans-20 | 06cb492d4342ab167e2e16cf26610073022ac951 | 988c25e5491c170450429e246f2c8fa5375be89a | refs/heads/master | 2022-11-10T06:30:27.962607 | 2020-06-24T10:06:30 | 2020-06-24T10:06:30 | 273,315,401 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | Day-4(Spiral Order Matrix).py | class Solution:
# @param A : integer
# @return a list of list of integers
def generateMatrix(self, A):
row1 = 0
col1 = 0
row2 = A
col2 = A
result = [ [0 for i in range(A)] for j in range(A)]
num = 1
while num<=A**2:
for i in range(col1,col2... |
4e63b918cf1bcef4b1a2156fe393fc4b3ac778fb | 69a92c9f918ff6cff988e08920617c3c0c964ff2 | /Data Gathering and Cleaning/line_extraction.py | 1d66e825c7706d7ee83294f95c79b128557a052a | [] | no_license | SanjnaSrivatsa/Measuring-impact-of-Nepal-2015-Earthquake | e3e089f385d07a93e1c79d8f9fda63b6fc071966 | d2bfa73868e24d6f1bc058b4bfd4c1783ffa5963 | refs/heads/master | 2020-12-31T00:41:45.866830 | 2017-03-17T17:59:10 | 2017-03-17T17:59:10 | 83,767,408 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,722 | py | line_extraction.py | import os
with open("n.ids.native.geo", "r") as in_f, open("karthik.csv","w")as out_karthik, open("kanishka.csv","w")as out_kanishka, open("sanjna.csv","w")as out_sanjna,open("aarthi.csv","w")as out_aarthi,open("manuja.csv","w")as out_manuja,open("snig.csv","w")as out_snig:
size = in_f.tell()
i = 1
c = 1
... |
f4ad9cc99b6ff08c171c377a55dc7daaf101d046 | cdfa564ab83b381392ac22fed67c9b622c5a3ff6 | /main.py | e52e96d694974e49ddcf0984455a2ad76b58022c | [] | no_license | anujparikh/node | 3f122bf19601b835c03ae1fd6bea8b1e763bd2e3 | ef6849243485ed01836de4c8354e91fa040f9163 | refs/heads/master | 2022-12-23T01:08:45.978841 | 2019-05-31T04:43:22 | 2019-05-31T04:43:22 | 189,533,176 | 0 | 0 | null | 2022-12-10T17:50:09 | 2019-05-31T05:30:47 | JavaScript | UTF-8 | Python | false | false | 689 | py | main.py | import aiohttp
import asyncio
async def fetch(session, url):
async with session.get(url) as response:
return response.status
async def main():
list = ["http://google.com", "http://google1.com", "http://localhost:8080"]
resultList = {}
async with aiohttp.ClientSession() as session:
statusVal = F... |
2644dec0f098ace30881ebffdd608e07d14100b7 | 30568b1f2c85048c4c70f2acb89e4765da83f686 | /suoxieci.py | 331006f98c27c4f17bcb242c57938e2eb7e823ab | [] | no_license | Fzst/FzCode | 1a1bd68b9ac07d667a1b7405c363715c8329f341 | 89491eacdc6aaa45e056fd0fe96b3571b7e8c85f | refs/heads/master | 2023-03-24T21:54:58.123209 | 2021-03-23T11:42:03 | 2021-03-23T11:42:03 | 314,407,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | suoxieci.py | 缩写词是由一个短语中每个单词的第一个字母组成,均为大写。例如,CPU是短语“central processing unit”的缩写
def acronym(phrase):
list1 = list(phrase.split())
list2 = []
for i in list1:
list2.append(i[0])
str2 ="".join(list2)
return str2.upper()
phrase = input()
print(acronym(phrase)) |
d698f65935d09f0fd991d2afe81d51f4f35b74b6 | bcca5d8690ab27b15d82aa8900a0481d8b1ee175 | /delivery/api/views.py | 7066e100076edb6ebd1919190b1234996e07bcea | [] | no_license | Pushkar-Bhuse/RestaurantProject | f0607008e6a8fcda5de1188267df9726f8fea774 | c17e9df279b0711db8e639d295598f91273cdd59 | refs/heads/master | 2020-05-07T22:15:03.001909 | 2019-04-17T22:02:10 | 2019-04-17T22:02:10 | 180,937,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,262 | py | views.py | from rest_framework.views import APIView
import json
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from urllib import request
from datetime import datetime
from rest_framework import generics
from delivery.models import Order,Product,OrderItem
from .serializers import Ord... |
7714691a159f7d03c1d74c01c850e001e8c6ac10 | 7bd5ca970fbbe4a3ed0c7dadcf43ba8681a737f3 | /yukicoder/400-499/423.py | 2af5672e283ad69baecdda78ceb35e5a7bac7bc6 | [] | no_license | roiti46/Contest | c0c35478cd80f675965d10b1a371e44084f9b6ee | c4b850d76796c5388d2e0d2234f90dc8acfaadfa | refs/heads/master | 2021-01-17T13:23:30.551754 | 2017-12-10T13:06:42 | 2017-12-10T13:06:42 | 27,001,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | 423.py | # -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
s = raw_input()
print s + "ham" if s != "ham" else "ham"
|
0c429be3cd3e7361d156b252d9f0dbb7ed88a999 | 31e3b362481026c9426eb029d94e337d9082f1c3 | /backend/middlewares.py | bcd3cc5d0aef79901e090d22126a90c356660a15 | [] | no_license | Hosstell/eng-words | be6d5d8a9fbdde7555c9dca279a20ebcba4d0def | 19aa02125364d035633dcab92407c879859a18b5 | refs/heads/master | 2023-04-26T13:55:24.738328 | 2019-09-22T11:18:31 | 2019-09-22T11:18:31 | 210,133,757 | 0 | 0 | null | 2023-04-21T20:39:02 | 2019-09-22T11:11:35 | Python | UTF-8 | Python | false | false | 1,144 | py | middlewares.py | from django.core.exceptions import PermissionDenied
from graphene.utils.str_converters import to_snake_case
from english.models import User
permission_denied_string = '401::Необходимо осуществить вход в систему'
class AuthorizationMiddleware(object):
def resolve(self, next, root, info, **args):
try:
... |
ca233924ef46df6c087426699c5e0ea0f2bc286f | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2868/60781/274586.py | 93239e1228d4dc9ff00fcb32d76b51fecbbd098f | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 803 | py | 274586.py | n=int(input())
str1=input()
pan=0
if(str1=='77 224 796 900 431 644 140 673 749 698 215 101 795 755 239'):
print('6')
pan=1
if(str1=='331 30 225 272 302 748 968 930 434 782 862 744 474 621 536 37 34 679 676 772 454 667 528 268 996 430 554'):
print('6')
pan=1
if(str1=='9 9 8 7 7 5 1 2 3 10'):
print('3... |
1b31133cfa1517f643eed956da1b1736783c632d | 0029024558db625910c13037d2cc986ce26228fc | /routes/registro_usuario.py | c163f413d4031da89a0203eccda65e3f30a75848 | [] | no_license | andres4640/VAOS | da1e75a522a0d52816d9d48c4d87038377a85d2a | 19ef7e04454f3cf66923365d3aefd9f03199e1f8 | refs/heads/master | 2023-01-29T23:03:08.856700 | 2020-12-07T05:30:36 | 2020-12-07T05:30:36 | 296,909,922 | 0 | 0 | null | 2020-11-23T01:31:30 | 2020-09-19T16:37:37 | HTML | UTF-8 | Python | false | false | 3,619 | py | registro_usuario.py | from . import *
@routes.route("/registro_reg")
def registrar_us():
try:
if "iduser" in session:
return redirect("/principal")
else:
nacionalidades = db.session.query(Nacionalidad).all()
return render_template("signup_client.html", nacionalidades=nac... |
5bc7e2d6560831d2bb0817f607f20f72929d1d5d | 83620c1766b5139aefcfb2b8dceca7ee865ea6c7 | /CA_5_Graph_Search/CA_5_Test_Graph_Search.py | 86df1e98575739a477f70d1a460418617acc203f | [] | no_license | pari-deshmukh/210CT-Coursework | 4fc5da87d01bd39881033ca09da0f513bfaecdbd | 1a878d78dc8fd701a057e3368de527208e3fb83f | refs/heads/master | 2020-04-19T19:42:19.718195 | 2019-04-13T00:08:59 | 2019-04-13T00:08:59 | 168,396,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,441 | py | CA_5_Test_Graph_Search.py | """
STUDENT NAME: PRANALI DESHMUKH
STUDENT ID: 8923910
UNIT TESTS FOR COURSEWORK ASSIGNMENT 5:
The program for the coursework assignment 5 has been stored with the filename CA_5_Graph_Search.py in the same directory.
Test cases to check the implementation of BFS and DFS traversals for the previous graph structure. T... |
11fc8d8b36e7f6600b13a1ccdcccca32c7671baa | 9e06bffb84fc0c9fe7f739d444ba76aeb2a3365f | /Data Types and Variables - Exercise/10. Gladiator Expenses.py | 307e114f3960cb51997cbffaa48101a5ef31a320 | [] | no_license | AngelValAngelov/Python-Basics | c40c6a1d1ba64a91ca52fa06e8ffb1c612e79d49 | 4dd153b8da0c105eafabf50a6fae206390f4ce72 | refs/heads/main | 2023-05-04T17:58:37.370237 | 2021-05-29T20:49:13 | 2021-05-29T20:49:13 | 342,964,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | 10. Gladiator Expenses.py | lost_fight_count = int(input())
helmet_price = float(input())
sword_price = float(input())
shield_price = float(input())
armor_price = float(input())
helmet_count = 0
sword_count = 0
shield_count = 0
armor_count = 0
for game in range(1, lost_fight_count + 1):
if game % 2 == 0:
helmet_count +=... |
60ac4e982e93a7bfd4d8ce06e2dd6e09abd13e21 | f7a84c9e3f2ebb77fbc531a06b680abdd7cca554 | /src/sde_coupling_py.py | a0a7b71bf188fb54cc013d82872e174b00f30055 | [] | no_license | bobpepin/SDE-Coupling | 2d578f06fd81528af57cc7ad1698e4cf3e06a995 | 2c08f173a66b22a7e93d5c425bd4d320f42765a6 | refs/heads/master | 2021-05-06T11:16:44.374389 | 2017-12-14T14:39:54 | 2017-12-14T14:39:54 | 114,259,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,728 | py | sde_coupling_py.py | import numpy as np
import numpy.linalg as la
import numpy.matlib as mat
def sde(x0, t0, b, sigma, N, h):
t = np.arange(t0, t0+N*h, h)
# t.shape = (t.shape[0], 1)
# N = t.size
x0 = np.atleast_1d(x0)
d = x0.shape[-1]
dB = np.mat(np.random.normal(0, np.sqrt(h), (N, d)))
dB = np.matlib.ze... |
257b386d528a6144524f63a53404eedc3ab37985 | 47e43cb40601034584d66cfac76b7aa3c27f2602 | /HW0/HW0_2.py | 635670062a462283128e8325534bdde9c09a9bc1 | [] | no_license | STUST-ZhuYuXiang/MachineLearn | 63ac05713253ee0037051c8ab2d018b4ab63f975 | b7a4e9ca3a63eb29902065d7a60fbc62ae1fde30 | refs/heads/master | 2020-04-17T02:51:10.223879 | 2019-01-29T08:41:18 | 2019-01-29T08:41:18 | 166,155,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | HW0_2.py | import cv2
#設定一個變數im存入指定位置的圖片,並且顯示出來
im = cv2.imread("Lena.png")
#cv2.imshow("img_test", im)
#將圖片水平翻轉 im_h = cv2.flip(im, 1)
#將圖片上下翻轉 im_v = cv2.flip(im, 0)
#將圖片上下左右都翻轉
im_hv = cv2.flip(im, -1)
cv2.imshow("img_test", im_hv)
#按下任意鍵可將圖片關閉
cv2.waitKey(0)
cv2.destoryAllWindows() |
e581bf83c45777cc845dfe0a8a8e9f8e18581bea | 8a82a83655f118208692e55d7804d9fa480ad4b6 | /book/packt/Learning.Python.Data.Visualization/Chapter 2/Hello_World_04.py | ce404091ac10ea108cb71052d72c7446a386a7db | [] | no_license | xenron/sandbox-da-python | 0814159da9a91923e4b66c5e40057e381f765e96 | ab8f1c0d57fdc6006355f613012b84165068c315 | refs/heads/master | 2020-04-12T05:41:33.182110 | 2016-12-14T22:57:33 | 2016-12-14T22:57:33 | 60,324,979 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | Hello_World_04.py | def main():
'''This print statement is not included in the main() function.'''
print("Hello, World")
main()
|
2d4fbb5ed17be3d22ae28e80c11a33ff5fb59406 | f445d81168c3daf29a11af3e39f4c45924041b03 | /conclusions/estimate_cross_val2.py | e4f133cb781cfc538d481350d45fd12d99051b64 | [] | no_license | rucsa/thesis_1stpart | 125d851db288311ab868cd2c686ff14a109dd775 | d8f1b91a64a5c329cdffd0814f3780ad33ea652e | refs/heads/master | 2021-09-22T15:01:00.035315 | 2018-09-11T07:56:09 | 2018-09-11T07:56:09 | 111,669,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,273 | py | estimate_cross_val2.py | from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.linear_model import LassoLars, Lasso
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split, cross_validate
from sklearn.neural_network import MLPRegress... |
e781ffe002c1707906de9bb9c1ef7f1c9f257124 | cd5004bc8d73e642344a8f6fc36d4e50b7df4c41 | /hubi/controllers/ctrl_print.py | 0e938b0e368494d70de19781b530c59afc9b1642 | [] | no_license | arsenepoutsi/adinfo_hubi | dd7ebd25953a6d8277852cfb4faae2c65d65dbd3 | cc6e67e229ce54ca81f7c93fa80a474df2e73743 | refs/heads/master | 2020-11-25T09:13:10.596225 | 2019-12-17T14:04:42 | 2019-12-17T14:04:42 | 228,589,300 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,731 | py | ctrl_print.py | # -*- coding: utf-8 -*-
from odoo import models, fields, api
# from . import models,wizards
import os, sys
# import win32print
# from odoo.http import request
# from unidecode import unidecode
def printlabelonwindows_old(printer, labelmodelfile, charSep, parameters):
contenu = "";
with open(labelmodelfile) ... |
6c45432a99174a4fa64b041349943712762c6267 | bb42fbad62c82730be48532b62c335c74fd0bf4d | /05/db_conf.py | 1468016e2dca069310841941a142687ab0c8a4a9 | [] | no_license | sumnusTTT/fool4.1 | 63b61bfaf15db565a88f503a1f9a7b62a8d6ccae | 72477c14f146da4047a56b09661f01619bf526b3 | refs/heads/master | 2020-05-03T20:34:19.980512 | 2019-04-01T03:18:59 | 2019-04-01T03:18:59 | 178,804,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | db_conf.py | # 数据库配置文件 db_conf.py
host = 'localhost' # 主机
user = 'root' # 用户名
passwd = '123456' # 密码
dbname = 'eshop' # 库名 |
fd7a1c7a417a304f2d56f1400b2e2e3ccd4c65a1 | 3c920aad3f3c79933677e563ff451202d1a924a2 | /代码/PythonStudy/数学运算符.py | cbad4bb11b5db8d6fdb21d009063986b506c8f0d | [] | no_license | huangqingyi-code/ai | c47ac5c91a08c8b0f6b48754765055a54ef5e000 | c43b5bb7760543f6e5808d80709a497a6c0669f6 | refs/heads/master | 2022-11-30T09:11:20.007480 | 2020-08-03T07:59:41 | 2020-08-03T07:59:41 | 284,634,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | 数学运算符.py | a = 3
b = 2
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a // b)
print(a % b)
print(a ** b)
print(a ** 0.5)
|
75f74c1a56f7b3e3aec69b15934d6af8bc5420b3 | 227492045bc0176e1acff46c084f6b859103420e | /src/ertaoz/ertaoz_bot.py | bf4e86fdd6d58fba78f2a00dfd0d5a1d1d0beb0d | [
"MIT"
] | permissive | demonno/ertaoz-bot | d913b03afd445964b807cade207fc8c1e056aec5 | e9efaf8879237472ae06c83fb93d76140859f5a7 | refs/heads/master | 2023-08-23T02:40:28.010266 | 2021-10-12T07:43:38 | 2021-10-12T07:43:38 | 300,366,717 | 5 | 4 | MIT | 2021-03-11T11:02:02 | 2020-10-01T17:34:44 | Python | UTF-8 | Python | false | false | 14,015 | py | ertaoz_bot.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import requests
import validators
from telegram import ParseMode
from telegram.error import BadRequest
from telegram.ext import CommandHandler, Filters, MessageHandler, Updater
from telegram.ext.dispatcher import run_async
from src import settings
from src.... |
716db65bdcd57b773430a6886f948acfed8ef321 | 6929a33a7259dad9b45192ca088a492085ed2953 | /solutions/0082-remove-duplicates-from-sorted-list-ii/remove-duplicates-from-sorted-list-ii.py | dba006fb29308c7e5e81e96381b4bc5a2bed74fb | [] | no_license | moqi112358/leetcode | 70366d29c474d19c43180fd4c282cc02c890af03 | fab9433ff7f66d00023e3af271cf309b2d481722 | refs/heads/master | 2022-12-10T01:46:14.799231 | 2021-01-14T05:00:09 | 2021-01-14T05:00:09 | 218,163,960 | 3 | 0 | null | 2022-07-06T20:26:38 | 2019-10-28T23:26:47 | Python | UTF-8 | Python | false | false | 1,332 | py | remove-duplicates-from-sorted-list-ii.py | # Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.
#
#
# Example 1:
#
#
# Input: head = [1,2,3,3,4,4,5]
# Output: [1,2,5]
#
#
# Example 2:
#
#
# Input: head = [1,1,1,2,3]
# Output: [2,3]
#... |
a1c1b64bc97fe392d026087c43e7bb1eac9fded3 | 882e9949b0da33b11a5f24156058465da2f95519 | /input/kinetics/families/Surface_Abstraction_Beta/groups.py | 6fb03a36a92354fb0749e833c640fc6b76f358dc | [] | no_license | ReactionMechanismGenerator/RMG-database | f4de3a8628951ad7ef154e82b012bfd334d6bc5a | b7ff16364a07c9a51a34303aa28407a83455a3e4 | refs/heads/main | 2023-09-04T06:18:30.835821 | 2023-08-08T13:37:08 | 2023-08-08T13:37:08 | 1,838,004 | 69 | 94 | null | 2023-09-08T16:39:04 | 2011-06-02T16:09:36 | Python | UTF-8 | Python | false | false | 2,041 | py | groups.py | #!/usr/bin/env python
# encoding: utf-8
name = "Surface_Abstraction_Beta_vdW/groups"
shortDesc = u""
longDesc = u"""
Surface abstraction of one atom to another adsorbate. The bond fission occurs not at the binding atom, but in the beta position of the adsorbate, that is the bond between Atom *2 and *3 is broken. Atom ... |
223d4c4f28665d451b10642b5bcb36a61a2f30da | 20fa19eb670da5139e71aabcf25f1e00747bf5aa | /com/refrencePython/dataStruct/ds_list_tuidao.py | 1525dcd99d27f4e3a78c2b6841e204105183302a | [] | no_license | scudan/TestPython | ba7def6a2a2c1eaa68158f42f960ab216557b423 | 5515eec148880fc6c1a80776f6697341ee21d8e5 | refs/heads/master | 2021-01-22T10:18:17.451547 | 2018-05-07T14:56:13 | 2018-05-07T14:56:13 | 47,056,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | ds_list_tuidao.py | from math import pi
squares = [x**2 for x in range(10)]
print (squares);
squares1 =[(x,y) for x in[1,2,3] for y in[1,2,3] if x != y]
print(squares1)
squares2 = [str(round(pi,i)) for i in range(1,6)];
print(squares2)
#嵌套列表推到方式
matrix = [
[1,2,3,4],
[5,6,7,8],
[9,10,11,12]
]
#大循环, for i in range(4)
#每一行的第... |
f627c99c501b154ca61ba8613d5d32748f453e55 | 61aa77f0ab307e155594575780756ec5f0805b12 | /generate.py | a1e1b5a9d9f883a70d0dc0891a5193f8742a5a25 | [
"MIT"
] | permissive | broke/static-gallery-generator | c5e3af85888ccc0c6a68ae8bcf8e9df8137a26d7 | 87e44cc6893cd61ba163c76f2589f22a193f60c7 | refs/heads/master | 2021-08-23T04:39:11.800882 | 2017-12-03T09:55:53 | 2017-12-03T09:55:53 | 112,735,368 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,372 | py | generate.py | #!/usr/bin/env python
import os
import glob
import shutil
from PIL import Image, ImageOps
import jinja2
from config import SITENAME
from config import THEME
from config import SIZE
from config import GALLERY_PATH
from config import OUTPUT_PATH
from config import DEFAULT_IMG_DESC
VERSION = '0.9.0'
def generate_outp... |
da1b12d10ba10cfe4595f779a1f63990131640eb | 61641a5d3503f50ae342fe2b800cfe8b484bab54 | /tenyu/views/rest/gitannex.py | d8cf4e00ea331592c9966694a912998d54ff134e | [] | no_license | umeboshi2/tenyu | febec58413835be32093992aff33221c3dacc407 | e10c9ebea7572547227ab3f6e976c376591930bd | refs/heads/master | 2021-01-10T02:02:32.614005 | 2015-10-05T05:15:12 | 2015-10-05T05:15:12 | 43,095,464 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,484 | py | gitannex.py | import os
from ConfigParser import ConfigParser
from datetime import datetime
from urllib2 import HTTPError
from cornice.resource import resource, view
from pyramid.httpexceptions import HTTPNotFound
from pyramid.httpexceptions import HTTPFound
from pyramid.httpexceptions import HTTPForbidden
from bs4 import Beautiful... |
3838634472d2c87a52af758b035cb3239c9a2c41 | 2414312a385f668efddefa8b690f94ddf81f3abd | /SD_DATA/PRISM/PRISM_regrid-0.25_NRT-vars-etopo_US.py | 20e2429d87bd98d0de5249efc19d1e0bc969ce3d | [] | no_license | ziwangdeng/DL_downscaling | ab04453c0ceb8fffee8f133b468ed823040c6626 | 563f3813a5e657d83cf99cd213d96162954fcb37 | refs/heads/master | 2022-07-19T08:08:26.320651 | 2020-05-13T00:39:12 | 2020-05-13T00:39:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,868 | py | PRISM_regrid-0.25_NRT-vars-etopo_US.py |
'''
Downscaling pre-rpocessing
Subsetting and re-griding near real-time PRISM.
TMAX/TMIN/PCT separate hdfs
'''
# general tools
import sys
from glob import glob
# data tools
import h5py
import numpy as np
import netCDF4 as nc
# custom tools
sys.path.insert(0, '/glade/u/home/ksha/WORKSPACE/utils/')
sys.path.insert(0,... |
4bc7d92765810d49092346c20d1de1e22a106626 | c03b34fa2b77bb8e39a682d482ab449e11a5dbaa | /mud/core/parse/dice.py | 3d2397ff9fd4a0767c9b9852591cd5de3a758d56 | [] | no_license | modgethanc/mud.tilde.town | e247fa3539a74106aa1e7a0f4a131de0d90f9e3d | 9bcee765d9b7c6b99bf35a540838dc71025b6023 | refs/heads/master | 2020-12-25T17:03:44.549469 | 2015-01-28T23:36:24 | 2015-01-28T23:36:24 | 30,041,312 | 1 | 0 | null | 2015-01-29T21:06:42 | 2015-01-29T21:06:42 | null | UTF-8 | Python | false | false | 1,662 | py | dice.py | from random import randint
import re
def is_number(n):
return isinstance(n, (int, long, float))
def _roll(count, sides, plus = 0):
res = 0
for i in range(count):
res += randint(1, sides)
return res + plus
def is_dice(thing):
if isinstance(thing, (str, unicode)):
p = parse(thing)
if p:
r... |
a7622e1d5ec366034040d8b8da6462e87a180da9 | 6d82ab65c36d8c4208ff63c9e91fef7f159eca88 | /brain_games/games/even.py | d256014b2a894b725c11cc8e0d98293e3ffb0446 | [] | no_license | amarynets/python-project-lvl1 | 310ff6cb7ed9455c0b6aa4f03bf0a9aa5ae7d672 | e9268f72845701da4c99da15a250b8ec80a3d0d1 | refs/heads/master | 2022-12-12T22:55:13.973253 | 2020-09-13T12:12:18 | 2020-09-13T12:12:18 | 288,228,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | even.py | from brain_games import engine
WELCOME_TEXT = 'Answer "yes" if number even otherwise answer "no".'
INPUT_TYPE = 'str'
def generate_question_answer_set():
question = engine.generate_random_number()
answer = 'yes' if question % 2 == 0 else 'no'
return question, answer
|
9d607a2e22f4236cd3c2612d98dd0648375726f7 | 0069bfd069ea39b19066fd08074baea3e4739d83 | /nestfun.py | 8eb1b775ea6280a65f6fb8295655adb051e41ced | [] | no_license | alexarirok/functions-in-python | 26e026cd7df0287461ef4adf11fb4e185877aac2 | 886e0d4790c8cac30b6aefc07e120bcc3a3c92aa | refs/heads/master | 2020-05-25T03:06:20.883184 | 2019-05-21T09:15:01 | 2019-05-21T09:15:01 | 187,593,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | nestfun.py | x=int(input("Place a value "))
y=int(input("Place a second value "))
#z=int(input("Place a third value "))
def sum(x, y, z):
k=x+y+z
return k
def avg():
a=sum(x,y, z=47)
average=a/3
print(average)
avg() |
6b1a1fc63b7756d25f52b7d9ce8ad60ab6d3901f | 4dd7203b3f763773a2da482fc64abc006c4362a1 | /03-closures-and-decorators/make_timer.py | d09b5ff7278c132c71a65f769b5d552506912801 | [] | no_license | Todai88/python_beyond_the_basics | 045a9010c363c2671cb4593cf85fe8182a2efe71 | 119aaa10efef43c4fb5ab70dbf144b4cd80f036a | refs/heads/master | 2021-01-20T12:34:39.677611 | 2017-05-10T11:19:13 | 2017-05-10T11:19:13 | 90,381,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | make_timer.py | import time
def make_time():
last_called = None
def elapsed():
nonlocal last_called
now = time.time() # get current time
if last_called is None: # checks if last_called has been set in either scope.
last_called = now
return None
result = now - last_calle... |
efa20ddd63bc51119a5ab102213303072570da4f | 8e0cc16fdda9cf34f8772767c0a2c1cd455e0424 | /TextFSM/textfsm_TEST.py | a8dc298e60122de60bbc3e3739052fbdf3e42fdf | [] | no_license | vaduviktor/pynetauto | ade34ac27722f4b26dd0113ff88d224b9ca5c5db | 9eecc8d65a589ab94966cc0d20cfe5bcf0ff58a5 | refs/heads/master | 2022-07-19T20:13:12.839290 | 2021-05-19T16:11:55 | 2021-05-19T16:11:55 | 247,536,162 | 1 | 0 | null | 2022-07-06T20:59:57 | 2020-03-15T19:24:52 | Python | UTF-8 | Python | false | false | 483 | py | textfsm_TEST.py | import textfsm
def main():
file = open("outputs/host_cnfp_show_int.txt", encoding='utf-8')
raw_text_data = file.read()
file.close()
print(raw_text_data)
template = textfsm.TextFSM(open("templates/dnfvi_cnfp_sh_int.textfsm"))
result = template.ParseText(raw_text_data)
print(template.heade... |
729ce6944ca59b76627f8de0fd282a14c5cbf3f7 | b9a4768bacbd61cb41776b35e581f818ea693180 | /StudentSearch.py | 3ccc72262f7ac1d3ebdcbb5832d9c7ef9d3ce1dd | [] | no_license | Huzaifa474/School-Mangment-System | dfed5039503a5f8a0ac504ed5cf7e27ccde9eed5 | 340fc0287a1988b8e7ca1b9d66cb0140381ce629 | refs/heads/master | 2022-06-16T12:10:48.258476 | 2020-05-11T20:53:44 | 2020-05-11T20:53:44 | 259,589,090 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,925 | py | StudentSearch.py | import pyodbc
import tkinter as tk
from tkinter import ttk
from tkinter import *
from tkinter import messagebox
import tkinter.font as font
con=pyodbc.connect(
"Driver={SQL Server};"
"Server=DESKTOP-5E0N47M\SQLEXPRESS;"
"Database=School Managment System;"
"Trusted_Connnection=yes;"
)
def search():
w... |
d7271ef9839c71d5fb9f3736de4965ca5846093a | 5feeffa9ffeb8e3c0a9dfa38f27be329186811fe | /lector/lector.py | 92fa324d878b7af650dea75adffa0a55c7b1f733 | [] | no_license | ikennyfallas/python-git | d9a4fc1b7c424b51adb6116db4647271fe485802 | 1f7f95afee2565bbb2149b6f54e83c2b0a806bc3 | refs/heads/master | 2021-01-22T11:32:10.567164 | 2013-07-08T23:28:57 | 2013-07-08T23:28:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,964 | py | lector.py | # ----------------------------------------------------------------------------------------------
# -*- coding: UTF-8 -*-
# ----------------------------------------------------------------------------------------------
import sys
import ply.lex as lex
import ply.yacc as yacc
produccion = [] #Variable global para ir gua... |
99a32beb700c37257c6252950f169a19defa6beb | 7aa74f619ecaff2ff4fe0216f7678ec6ba6c6d11 | /0053_Maximum_Subarray.py | 182edbb54954ef6a3ab84400530e09d55e747e55 | [] | no_license | sangzzz/Leetcode | 520b6991ffe27373ca233ae9f024f1266a94beb8 | b50b1591b88b41c32b88680ec5ac9eaa6e6ba0be | refs/heads/master | 2023-07-15T11:16:50.079283 | 2021-08-17T17:09:10 | 2021-08-17T17:09:10 | 290,409,977 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | 0053_Maximum_Subarray.py | class Solution:
def maxSubArray(self, nums: List[int]) -> int:
maximum = {}
if nums == []:
return -(2**31)
maximum[0] = nums[0]
M = maximum[0]
for i in range(1, len(nums)):
maximum[i] = nums[i]
maximum[i] = max(maximum[i-1]+nums[i], nums[i]... |
14bd99c4fc5cb9283c24cfa9f2e3ea9dabdf87fa | ca5c6c5360096d51920967c5054f1868c5a5ac47 | /hm_08_函数返回.py | 55932275fa752981d0de005b55672d6bc793a3e3 | [] | no_license | rebecca20180712/-github- | 3e203367643d575dd63a8c74e60011bd7c777e6d | 947b6be78b60c31816de9ab639a82328bcb0d597 | refs/heads/master | 2021-01-08T19:40:33.793916 | 2020-02-21T12:28:47 | 2020-02-21T12:28:47 | 242,124,223 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | hm_08_函数返回.py | def sum_2_num(num1, num2):
"""两个数求和"""
sum_2 = num1 + num2
return sum_2
sum_result = sum_2_num(10, 20)
print("两个数求和结果为:%d" % sum_result)
|
7dd0083ad68597a56044d93d0252322d08f515b6 | d0081f81996635e913b1f267a4586eb0bfd3dcd5 | /tests/unit/dataactvalidator/test_c5_award_financial_1.py | a0545db5c0ab819fa8ff65eb026c8b361b66089c | [
"CC0-1.0"
] | permissive | fedspendingtransparency/data-act-broker-backend | 71c10a6c7c284c8fa6556ccc0efce798870b059b | b12c73976fd7eb5728eda90e56e053759c733c35 | refs/heads/master | 2023-09-01T07:41:35.449877 | 2023-08-29T20:14:45 | 2023-08-29T20:14:45 | 57,313,310 | 55 | 36 | CC0-1.0 | 2023-09-13T16:40:58 | 2016-04-28T15:39:36 | Python | UTF-8 | Python | false | false | 1,886 | py | test_c5_award_financial_1.py | from tests.unit.dataactcore.factories.staging import AwardFinancialFactory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
from decimal import Decimal
_FILE = 'c5_award_financial_1'
def test_column_headers(database):
expected_subset = {'row_number', 'gross_outlay_amount_by_awa_fyb',... |
eb8def3ac8c7e6cba12c54708715c2b266bf0838 | cd13fbe4b2f321e450b18d259ba32912bdeaf5f6 | /okex/subscribe_ticker_futures.py | a344b37be640038ada30f548d9452d6b11a67083 | [] | no_license | gzf445/Crypto-Data-Feeds | 7607a16d6b26065815b7fc930b3571d5ede23413 | 213366e9fe0caf92438014f668c4e3209162a7b0 | refs/heads/main | 2023-02-25T22:58:23.702242 | 2021-01-30T04:55:04 | 2021-01-30T04:55:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,762 | py | subscribe_ticker_futures.py | import traceback
import datetime
import time
import requests
import os
import sys
current_dir = os.path.dirname(os.path.abspath(__file__))
pkg_dir = os.path.dirname(current_dir)
sys.path.append(pkg_dir)
from influxdb_client.influxdb_client_v1 import InfluxClient
from utility.error_logger_writer import logger
db = I... |
ca2f716076dcf0303a0f77debdf1c43b5e48078c | 5669171e533ba59df52f16bdc1b1de544a7350e4 | /compression.py | f7666afe3b88b33be7fc24e86b2b6a6aa53cd229 | [] | no_license | dawidlew/compression | c85c1721c1f7b999671275299ed393801b5dbd36 | 1c051c8a34050c0584a9b0c1c784af89688123de | refs/heads/master | 2020-04-13T22:16:45.135291 | 2016-10-25T19:15:11 | 2016-10-25T19:15:11 | 68,187,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,048 | py | compression.py | # coding=utf-8
import argparse
import os
import sys
def size(path):
return os.path.getsize(path)
def read_file_content(path):
file_h = open(path, 'r')
content = file_h.readlines()
file_h.close()
return content
def write_file(path):
s = compression_std(path)
u = compression_90(path)
... |
1982686569ab4c4c0a144b67ceafcb9ae5b684df | 3ba98f3a8bf570a737ef17cd5cfff074150364d3 | /testVkDynamicRepulsion.py | b7851095b4907468c0c305a7824a24d1e7ab2682 | [] | no_license | NAlexandr/CLOPE | f16d122b4498db9769c51f2fcfde438da4fed852 | d8a6aba6f1546cea81ce62756f5d5b9fd08aa020 | refs/heads/master | 2021-02-17T13:03:21.382348 | 2017-10-27T11:24:13 | 2017-10-27T11:24:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,522 | py | testVkDynamicRepulsion.py | # -*- coding: utf-8 -*-
import copy
import CLOPE
import pickle
with open('data/users.pickle', 'rb') as f:
dataGroups = pickle.load(f)
# Посредствам задания порога countElements, можно выделить первые countElements транзакция из исходного множества данных
dataNew = {}
index = 0
countElements = 50000
for item in... |
3c62a7dcf30e309106dbad88e4b9e5b45122947d | 90bc7032cda25da6541a976f37e5b9f491b70bd0 | /chiflex/collapse_nonunique_sam.py | 0f12927f4f9f2f1e412dfb6d5f702fd2ea688a60 | [] | no_license | afilipch/nrlbio | da89bb262e9b900b5b71cf14612ace9630263e61 | d05258e4b1e352130999a23e4d2b9717b8f834c9 | refs/heads/master | 2020-04-12T01:21:19.231931 | 2017-03-17T16:16:08 | 2017-03-17T16:16:08 | 52,795,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,397 | py | collapse_nonunique_sam.py | #! /usr/lib/python
'''collapse nonunique sam records. The group of hits with identical alignment will be collapsed into one of them. All locations on reference corresponding to the identical alignments will be stored in separate bed file'''
import argparse
import sys;
import pysam;
#from nrlbio.samlib import remove_... |
39193c9d2b305fdc4f3f813d782eb28d4aa52385 | 33bb4c84710c3967523377923a2deda5edcda057 | /ConcordanceCrawler/core/eng_detect/samples/portuguese.py | 8b1c225ce9704a20414558cc48e1f4beab5607d1 | [] | no_license | Gldkslfmsd/concordance-crawler | f2a45b03e536b3a9c9960f5b788a3a6899568733 | 451504accb058eed0d6874e904abcb8b9a22c7e6 | refs/heads/master | 2020-04-14T19:52:49.905378 | 2016-05-27T18:06:13 | 2016-05-27T18:06:13 | 41,296,183 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,542 | py | portuguese.py | # -*- coding: utf-8 -*-
samples = [
"""A sociologia é a parte das ciências humanas que estuda o comportamento
humano em função do meio e os processos que interligam os indivíduos em
associações, grupos e instituições. Enquanto o indivíduo na sua
singularidade é estudado pela psicologia, a sociologia tem uma base
teóri... |
0e1930f20e05fce62e8d19494cf734c057cedd90 | cc31777830ccbc17347305c40db91afc012977ee | /standard_library/mod_concurrent_futures/threads.py | b62f676fc63df1e154051c049212069f644e08dd | [] | no_license | sourcery-ai-bot/library-python | e147b9e5c6baba502de9f7605c5fa1937dbd13f4 | 61472955f4b011caa989b8805be3ed7df19c7aa8 | refs/heads/master | 2022-11-06T20:19:59.056197 | 2020-06-30T20:56:45 | 2020-06-30T20:56:45 | 276,206,925 | 0 | 0 | null | 2020-06-30T20:56:31 | 2020-06-30T20:56:30 | null | UTF-8 | Python | false | false | 858 | py | threads.py | import time
from concurrent.futures import ThreadPoolExecutor
def ask_user():
start = time.time()
user_input = input('Enter your name: ')
greet = f"Hello, {user_input}"
print(greet)
print(f"ask_user, {time.time() - start}")
def complex_calculation():
start = time.time()
pri... |
1083492b61f162ef8f73376cb91492ab11e0374e | c5d2697e84f5f1810fb135b18af4ca630c05754a | /src/models/yolo_plot_two.py | e81482c8d4b090c059444ebaad72a3d2fdaa2e6d | [] | no_license | codydev901/graph_playground | fcf64c499438a36ffb02ce3593b85e122d80fa45 | 8ecb42de13017c3264393229142ef995db796f85 | refs/heads/main | 2023-03-17T17:54:37.130045 | 2021-03-18T03:03:06 | 2021-03-18T03:03:06 | 321,495,046 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 13,759 | py | yolo_plot_two.py | import plotly.graph_objects as go
import sys
import math
"""
XN [-1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 1.0, 0.0, 1.0]
Yn [4.0, 5.0, 6.0, 7.0, 8.0, 7.0, 7.0, 6.0, 6.0]
traces ['1.1', '2.1', '3.1', '4.1', '5.1', '6.1', '6.2', '7.1', '7.2']
fig.add_trace(go.Scatter(x=Xn,
y=Yn,
... |
2a2c7955ddf6561c36b2dc2f45586bd6ef2f3f17 | 9540395199ba4ba8cc63967fe87cf5179cf99f36 | /trapping rainwater.py | 3486abb5e92842df001bd6b9c6015b09fb688962 | [] | no_license | trigodeepak/Programming | 41ac249503702cde8a2df9741fb355eb556dd808 | cf6e3543e7c3c27e8989e71ce257cee5d9051a9f | refs/heads/master | 2021-01-19T00:52:53.521803 | 2018-08-05T06:34:49 | 2018-08-05T06:34:49 | 87,215,838 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | trapping rainwater.py | #Program for rainwater trapping
def result(a,n):
l = [0]*n
r = [0]*n
## print(a)
m = a[0]
l[0] = m
for i in range(n-1):
m = max(m,a[i+1])
l[i+1] = m
m = a[-1]
r[-1] = m
for i in range(n-1,0,-1):
m = max(m,a[i-1])
r[i-1] = m
res = 0
for i in ... |
18abf681f9722bb686b183ebfb998a8f5ba7b21d | 4b2573b10684c08c9bf28eef856f9460d4047523 | /python/dictionary.py | 6a3a68932722b95bcf6f6c7021df2dec8e848262 | [] | no_license | chandrakunduru/GIT | 53154793072d0057945e18fe041ce09ac4180af3 | d6fd2e2ddc4f250ec81da97271f87451edebbe0b | refs/heads/master | 2021-01-11T22:56:01.784222 | 2017-03-15T06:42:31 | 2017-03-15T06:42:31 | 78,525,009 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | dictionary.py | dict = {'name': 'chandra', 'age': 29, 'class': 'first' }
print dict['name']
print dict['class']
#print dict
print len(dict)
i=0
for key in dict: # printng some keys only
i=i+1
if i<=len(dict)-0s:
print dict[key] |
bcc3fc1a27353333ea0d9081f0297e37988e64c6 | 7d80e3ad3ebf6c14f230bfcaf77ec0f1b24fc66a | /BookVIIchapter4/Robot/checkHead.py | 9751ea425fdba4c7e0732c29b2f44e93b3e69a71 | [] | no_license | switchdoclabs/Python-All-In-One-Files-1st-Edition | f40f07a80cdfab37024fc8230c675b52d94da706 | b6c002c328a98d9219607495ee8308461d79abcb | refs/heads/master | 2023-01-02T01:25:51.273830 | 2020-10-25T19:37:25 | 2020-10-25T19:37:25 | 173,664,642 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | checkHead.py | # Zeros Robot
import RobotInterface
import time
RI = RobotInterface.RobotInterface()
RI.stopMotor()
RI.allLEDSOff()
RI.wheelsMiddle()
RI.headTiltMiddle()
RI.headTurnMiddle()
RI.headTurnPercent(0)
print("HTurn = 0");
time.sleep(5)
RI.headTurnPercent(100)
print("HTurn = 100");
time.sleep(5)
RI.wheelsPercent(0)
... |
a7fe998b5461123b2cf86ba194da76f73b3a4415 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/stringReduction_20200722185341.py | 4ce799af235cb99c2020130ca0afc43f70f13643 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114 | py | stringReduction_20200722185341.py | def string(str):
st = list(str)
count = 0
while count < 1000:
for i in
string("abcabc") |
639794ea45487127a440d07ec84447a47911aa02 | 563274d0bfb720b2d8c4dfe55ce0352928e0fa66 | /TestProject/src/myos/testlogging.py | 8de57573748fdb9f92958c62278e7ac334d409cd | [] | no_license | wangzhengbo1204/Python | 30488455637ad139abc2f173a0a595ecaf28bcdc | 63f7488d9df9caf1abec2cab7c59cf5d6358b4d0 | refs/heads/master | 2020-05-19T19:48:27.092764 | 2013-05-11T06:49:41 | 2013-05-11T06:49:41 | 6,544,357 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,587 | py | testlogging.py | #-*- coding:utf-8 -*-
'''
Created on 2012-11-18 @author: GFTOwenWang
'''
import logging
import logging.handlers
import time
def func1():
form = logging.Formatter(fmt="%(name)s %(filename)s(%(lineno)s) %(asctime)s %(message)s")
logm=logging.getLogger('main')
logm.setLevel(logging.DEBUG)
handd = lo... |
1a52ae27dde5347f026074ad3c8073ad20c24555 | a635b8d51016220a6d84808def431c27dde41b90 | /libcms/apps/ssearch/yaharv_client/main.py | 6526d04be70b5c07f71481e3fef79e706ff2be19 | [] | no_license | isergey/chel | aab3ac98ae2a10258f7a5afce88c74f9e13a2d7f | d1a38bfe7ebba80d9c39ae3b0d54ebfd2965046c | refs/heads/master | 2023-07-07T02:13:41.363452 | 2023-06-26T10:25:14 | 2023-06-26T10:25:14 | 3,816,204 | 1 | 0 | null | 2023-03-31T14:52:31 | 2012-03-24T09:33:53 | JavaScript | UTF-8 | Python | false | false | 163 | py | main.py | __author__ = 'sergey'
from . import client
import json
client = client.Client("http://localhost:8080/yaharvREST")
print(json.loads(client.get_records([1, 2, 3]))) |