blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 220
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 257
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a981616802effa951af949ca29f15efb99f8b3f8 | 8d8788a356767d58a2aa4ebe0db476e0ca07b39b | /src/mqttsub_bsp.py | 2d60cd3cf4da3bd1a010f8f29a30f1034b99961e | [
"CC0-1.0"
] | permissive | essentialprogramming/IoTDeeperDiveOOP2020 | da64a1f3044c3bbb5fca6f5913b2c30e9904c667 | a8080076e3182623d1b69e52cb106eced8e233de | refs/heads/master | 2022-03-30T22:20:45.752250 | 2020-02-07T19:38:03 | 2020-02-07T19:38:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 635 | py | import paho.mqtt.client as mqtt
# Callback für Verbindungsaufbau
def on_connect(client, userdata, flags, rc):
print("Verbindung aufgebaut mit Fehlercode " + str(rc))
client.subscribe("oop2020/test")
# Callback für Nachrichtenempfang
def on_message(client, userdata, msg):
print("Neue Nachricht im Topic " +... | [
"noreply@github.com"
] | essentialprogramming.noreply@github.com |
269747f3eeef5378c3f14c48fb365a3b2159e355 | d7757d2215d00307504426ccf87ceaeb1f4536ed | /2708.py | 476536aea6289425fe14dcc72f57c81362af51d8 | [] | no_license | paulaandrezza/URI-Solutions | e23a69164cbdbac636db73a3ba29cabb08a32db6 | 7694fa27d68b2ec2dbd426505ab680fb8ea9ace7 | refs/heads/master | 2022-10-29T06:45:27.791115 | 2020-06-06T00:35:17 | 2020-06-06T00:35:17 | 265,044,304 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | p = 0
j = 0
while True:
entrada = input().split()
if entrada[0] == "ABEND":
break
elif entrada[0] == "SALIDA":
j += 1
p += int(entrada[1])
else:
j -= 1
p -= int(entrada[1])
print(p)
print(j) | [
"noreply@github.com"
] | paulaandrezza.noreply@github.com |
0d7158803ac2c899a965502d20b12d441c224e5f | 51e1c73f751f28c738dd55f465bc074cd5a6bd6e | /data_structures/linked_list/linkedlist.py | bfe3e2af6f529c6147b4bf58531309ed06287023 | [
"MIT"
] | permissive | MthwBrwn/data_structures_and_algorithms | 10c5e1d289590ac8f613f285f13e52485baba3fa | 376f02346c67d495d8a3e8580c101f1244b78a78 | refs/heads/master | 2020-04-08T13:40:23.799620 | 2019-01-23T07:29:02 | 2019-01-23T07:29:02 | 159,401,541 | 0 | 0 | MIT | 2019-01-24T07:51:24 | 2018-11-27T21:27:20 | Python | UTF-8 | Python | false | false | 4,701 | py | from .node import Node
class LinkedList(object):
""" This class should be aware of the len of the list,
which represents the count of Nodes in the list at any time """
def __init__(self, iterable=None):
self.head = None
self._size = 0
if iterable is None:
iterable = [... | [
"mthwbrwn@gmail.com"
] | mthwbrwn@gmail.com |
343f224c3b95a445b3a306ce80c44244a21ca995 | 0224a22c3b9960a177a5c962eeb75d53a76a9841 | /src/0-9/4/4.py | 3bd05b4269182b36a6c68891b44079fd872ce269 | [] | no_license | jepatti/euler_solutions | 6619621efb9da62de3ae983b4fc260da87b881bc | bcf11d87178fda4f30a471762d14e38cabe4b293 | refs/heads/master | 2021-01-13T01:56:00.946092 | 2012-01-19T05:38:09 | 2012-01-19T05:38:09 | 3,159,581 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | '''
Created on Jan 11, 2011
@author: Jeff Patti
'''
def isPalindrom(s):
if len(s)<=1:
return True
if s[0]==s[-1]:
return isPalindrom(s[1:-1])
else:
return False
max = 0
for i in range(1000):
for j in range(1000):
prod = i*j
if isPalind... | [
"jeffpatti@gmail.com"
] | jeffpatti@gmail.com |
71c821509417c94ee842caec376a6a4c2803b333 | d9a22d4dcdfc0c28176c0e8afd784b30d275597e | /test_suite/shared_data/dispersion/Fyn_SH3_R1rho/relax_results/solution_tp02.py | 6e2250c6b7fdf8ea287e0c2e8ad080017c2505a3 | [] | no_license | jlec/relax | fda1b3ff77be0afc21c2e6cc52348ae7635cd07a | c317326ddeacd1a1c608128769676899daeae531 | refs/heads/master | 2016-09-08T00:27:57.256090 | 2015-02-10T12:24:55 | 2015-02-10T12:24:55 | 30,596,131 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,039 | py | """Compare the synthetic cpmg_fit data to the relax solution.
To run this, type:
$ rm -f solution_tp02.log; ../../../../../relax --tee solution_tp02.log solution_tp02.py
"""
# Python module imports.
from os import remove
from shutil import move
# relax module imports.
from lib.dispersion.variables import EXP_TYPE_R... | [
"bugman@b7916896-f9f9-0310-9fe5-b3996d8957d5"
] | bugman@b7916896-f9f9-0310-9fe5-b3996d8957d5 |
400c4825be91859d206dbc84ac0bef043e1582b7 | 66a05459831aef06fc86316ecb782848c116b226 | /collective/etherpad/Extensions/Install.py | be56c049b8b686cc2c19c1f049088f75de18d462 | [] | no_license | toutpt/collective.etherpad | 8d01323b3e31ff0872afa1fd8e4bc85b14a3f123 | 590414ddd3ed7437cefea91c853d291feb9b328f | refs/heads/master | 2020-05-18T05:31:36.603712 | 2013-09-26T12:45:35 | 2013-09-26T12:45:35 | 8,142,351 | 2 | 0 | null | 2013-09-18T16:42:41 | 2013-02-11T17:13:59 | Python | UTF-8 | Python | false | false | 709 | py |
def uninstall(portal, reinstall=False):
"""We uninstall things that are not handles by quickinstaller"""
if not reinstall:
# lets remove action on content types
types = portal.portal_types
for _type in ('Document', 'News Item', 'Event', 'Topic'):
_typeinfo = getattr(types, ... | [
"toutpt@gmail.com"
] | toutpt@gmail.com |
294685dafab114b23a0eb33d3a01804c6c97700c | c9d0f92ac66c5a3985561644af95104e280989ff | /dynamic_정수삼각형.py | d98dbe5d4765b113590344bab5bf4703ade49c5e | [] | no_license | yuheunk/practice_codes | e0dcafd9c0a9cadef65ac08608502e92123b37b5 | 4a32b89bc970d1a8fecd69246fa9a8564bd25a60 | refs/heads/main | 2023-06-13T08:22:41.164562 | 2021-07-06T16:24:42 | 2021-07-06T16:24:42 | 359,150,260 | 0 | 0 | null | 2021-06-22T10:49:15 | 2021-04-18T13:25:58 | Python | UTF-8 | Python | false | false | 402 | py | n = int(input())
array = []
for _ in range(n):
array.append(list(map(int, input().split())))
for i in range(1, len(array)):
for j in range(len(array[i])):
if j == 0:
array[i][j] += array[i-1][j]
elif j == len(array[i])-1:
array[i][j] += array[i-1][j-1]
else:
... | [
"noreply@github.com"
] | yuheunk.noreply@github.com |
86315daf9a0d96a287b57218e982382650d20fb7 | e71e6f545790e58447dc94bc404b215388b7e65b | /apps/inscricao/urls.py | 3e8075b6211c029ccdfd658f3262b30b14c27af3 | [
"MIT"
] | permissive | akaytatsu/inscricao_conferencia | e53e04314ebabd9a71d634d3ea3d6f456edd3310 | 9ab774c6fe30cdb1a45d3732ade394df6e3b4258 | refs/heads/master | 2020-09-23T08:50:36.352756 | 2020-07-19T17:33:10 | 2020-07-19T17:33:10 | 225,456,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | from django.urls import path
from .views import (
HomeView, LoginView, PagarView, LogoutView, ContatoView, DependentesView, NovaInscricaoView, inscricaoView
)
urlpatterns = [
path('', LoginView.as_view(), name="home"),
path('dashboard', HomeView.as_view(), name="dashboard"),
path('inscricao', inscrica... | [
"thiagosistemas3@gmail.com"
] | thiagosistemas3@gmail.com |
eb2ee2569095255a25d0a28fed528f065fdf0706 | 7bd8dfafc3494110faabcf6c677e6c2def533f1f | /src/features/generate_design_features.py | 5fe8ba44630b87e93180f5ec6768c15251023185 | [] | no_license | leaflettuce/tdwpDB | 3d3be8c365853e104f1414d2cadc112624186fbe | c72c5a93ea06ac474f6a23cb31b04b2fee4b663e | refs/heads/master | 2021-08-06T20:45:39.798834 | 2018-12-02T21:44:27 | 2018-12-02T21:44:27 | 147,001,421 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,910 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 20 13:04:58 2018
@author: andyj
"""
import pandas as pd
import numpy as np
from generate_sales_features import add_region, add_day_of_week, states
# import data
data_dir = '../../data/processed/design/'
file_name = 'design_1.0.csv'
df = pd.read_csv(data_dir + file_name... | [
"andyjtrick@gmail.com"
] | andyjtrick@gmail.com |
fb76c4be1b0cf81a073e5af609eb98406eaa239c | fe528368f75a5123bd07e1337e57c11e042ee358 | /lesson4/problem4.py | c4b72c5d2e2630651adc5f44520b367f17b40c4e | [] | no_license | kailaaa/unit4-lesson4 | 7bda1ba128656b9b2e5602c9f83bf184381ecad4 | 2ba095024f16ac0269b338d94d647489d6971416 | refs/heads/master | 2020-04-22T05:55:54.419815 | 2019-02-11T17:37:05 | 2019-02-11T17:37:05 | 170,172,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | from turtle import *
boogie = Turtle()
noel = Turtle()
boogie.color("turquoise")
boogie.pensize(8)
boogie.speed(3)
boogie.turtlesize(4,4,4)
boogie.shape("turtle")
noel.color("red")
noel.pensize(8)
noel.speed(3)
noel.turtlesize(4,4,4)
noel.shape("turtle")
for x in range(3):
boogie.forward(80)
boogie.left(120)
... | [
"noreply@github.com"
] | kailaaa.noreply@github.com |
ab94d7bd5e5676a2761a12e1ed5b005ffe772cb9 | cb6cfbb5c44b47ca5cd153cb950462d6a59c9bf4 | /get-subcat.py | 74a506d0023f436df8f77517e8f2e421f1a2eeed | [] | no_license | ludwig/cat3 | 56d789ca14529a00a113738b782e64b2a25aeb04 | 54cb60b1ba6cc79906e7feab1f1231f36774d947 | refs/heads/master | 2020-05-24T11:05:08.260492 | 2017-03-19T17:08:15 | 2017-03-19T17:08:15 | 84,850,553 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | #!/usr/bin/env python3
import sys
import json
import wiki
# Example: https://en.wikipedia.org/w/api.php?action=query&format=json&list=categorymembers&cmtype=subcat&cmtitle=Category:Anatomy
def main():
if len(sys.argv) < 2:
# NOTE: The category can be specified with either spaces or underscores.
s... | [
"luis.armendariz@gmail.com"
] | luis.armendariz@gmail.com |
947991d0f4f5393e08a326b1cd55967248d091f8 | 7a25f12d96ba6f1fa87f0618bd839186096bccb2 | /vision/template_matching.py | fc927e47f7810ab2cf7731353fd9ec2d8a5ba307 | [] | no_license | asack20/ME-184-AdvancedRobotics | aba6259d59a4395af3b687c2d88f2da8aac13ead | 90e525ac12a604dc7650a411c62808dacc96a7d7 | refs/heads/master | 2020-07-25T04:46:29.367413 | 2019-12-11T22:40:55 | 2019-12-11T22:40:55 | 208,168,193 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,275 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 17 15:40:12 2019
@author: Andrew
"""
import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt
img = cv.imread('training/wood/img103.jpg',0)
img2 = img.copy()
template = cv.imread('training/wood_Template/img002.jpg',0)
w, h = template.shape[::-1]
# All the... | [
"andrew.sack@tufts.edu"
] | andrew.sack@tufts.edu |
01e31b5def65ba66a0b5b8c58dd666c03742a49f | 00ed1eb9f4875be9c116eae90c850b4c5f0ebd4d | /tests/funcat/utils/test_yahoo.py | 8cf228d677cb84b693c54063b84d932589854b5c | [
"Apache-2.0"
] | permissive | pchaos/funcat2 | a64fbcfc5c1d7b6ed1356cd9558a2efabae90c0e | ff554cc134906a5a182fc31774488d62a839b314 | refs/heads/master | 2023-09-02T19:56:16.017728 | 2021-09-03T01:57:15 | 2021-09-03T01:57:15 | 356,155,099 | 12 | 5 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | # -*- coding: utf-8 -*-
import unittest
import warnings
from funcat.utils import save_sp500_tickers, get_data_from_yahoo
__updated__ = "2021-08-10"
class TestYahoo(unittest.TestCase):
"""Test case docstring."""
@classmethod
def setUpClass(cls):
super(TestYahoo, cls).setUpClass()
# 隐藏wa... | [
"drifthua@gmail.com"
] | drifthua@gmail.com |
d5fa36d59cc984969ce718738f359abd86ae766d | 5536c48b1d65a998edcd906ed04aafd47430359a | /music/urls.py | 9a3d34939e7b6f8de99b2d72a0a25c3d9e5ad718 | [] | no_license | Stilen/MyMusic | c29aeec4163a6a80f38edf26adca89566cd8b884 | ff4ed2b22e50de53d30f3abc2234921f80a805b0 | refs/heads/master | 2020-12-04T07:10:25.609352 | 2016-09-03T16:29:56 | 2016-09-03T16:29:56 | 67,233,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 680 | py | from django.conf.urls import url
from . import views
app_name = 'music'
urlpatterns = [
# /music/
url(r'^$', views.IndexView.as_view(), name='index'),
# /music/register/
url(r'^register/$', views.UserFormView.as_view(), name='register'),
# /music/album_id/
url(r'^(?P<pk>[0-9]+)/$', views.Detai... | [
"Pedro Silva"
] | Pedro Silva |
f1c5d60ef3020dba050246f8b6a601a8e31a3732 | a53a4a0b4e8f3c617cbe979f74b8a7a71c4cd489 | /learning_logs/migrations/0001_initial.py | 1d27dd77adddeea19811e183d06ba4c30e3e636a | [] | no_license | Afra55/learning_log | af36cf72ce3931fa119360035cb92ab35d436a80 | 1ae5a174d284badbcd97b80012cadaf4632dedfc | refs/heads/master | 2021-05-06T02:36:19.794596 | 2017-12-27T15:20:51 | 2017-12-27T15:20:51 | 114,651,043 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 556 | py | # Generated by Django 2.0 on 2017-12-18 14:22
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Topic',
fields=[
('id', models.AutoField(auto... | [
"1937525930@qq.com"
] | 1937525930@qq.com |
f70e536426fbc6618d6c2e9737ac42819cdfa80c | 8c5db66899c4dc428e699becce752a3fba03b302 | /opencv/face_detection_using_haarCascade.py | 508a1461e6b074262e3b0a935e1c33a9ffc3e32a | [
"MIT"
] | permissive | aliakbar09a/Practising_CV_using_opencv-python | 477280f14942408db37de937b43899c68a70b64d | ed797d4a29ae16aeec5f833c32a94b10cf92ffe7 | refs/heads/master | 2020-03-14T06:20:48.110610 | 2018-05-25T12:15:04 | 2018-05-25T12:15:04 | 131,482,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,081 | py | import cv2
import numpy as np
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml')
smile_cascade = cv2.CascadeClassifier('haarcascade_smile.xml')
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
gray = cv2.cvtColor... | [
"aliakbar09a@gmail.com"
] | aliakbar09a@gmail.com |
be8b873cdb97399f0932d2e2bf37c94e9760b317 | 6b51b7729812b5b7c06128feca32889c31e87ae3 | /runtests.py | 7479d9a69a1e7fcc12eb26398b946c3a4e3a1e46 | [
"MIT"
] | permissive | Krishnamurtyp/pytest-example-1 | 50ec8deb997ddd2eec2657fa32a190b9e50846d7 | 70d0ed2a69dc4631f85d8cec1c2c5617d7b24e78 | refs/heads/master | 2021-12-07T12:20:42.807914 | 2015-11-27T22:04:13 | 2015-11-27T22:04:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 962 | py | #!/usr/bin/env python
import os
import re
import subprocess
html_prefix = "./html/"
idx_html = "<table>\n<tr><td>test</td><td>status</td></tr>\n"
for root, dirs, files in os.walk("tests"):
for fname in files:
if re.search("\\.py$", fname) is not None:
sname = os.path.join(root, fname)
... | [
"afiskon@gmail.com"
] | afiskon@gmail.com |
ebadb75044a2caaba7d6421c16390c9a2c51c683 | fa4f2c0e17d397ac5756bd13197847dda71dd5a1 | /sympy/matrices/expressions/tests/test_permutation.py | 9be3a82f3773008e6eb10070825467bde2930445 | [
"BSD-3-Clause"
] | permissive | MaanasVohra/sympy | 14911337e4d2a4250de71f449ffcaba66458f5e9 | f5af41f27a3f5542a76077176f2990d49922a817 | refs/heads/master | 2020-11-28T13:36:08.221923 | 2019-12-23T18:01:23 | 2019-12-23T18:01:23 | 229,828,941 | 1 | 0 | NOASSERTION | 2019-12-23T22:03:15 | 2019-12-23T22:03:14 | null | UTF-8 | Python | false | false | 5,585 | py | from sympy.combinatorics import Permutation, SymmetricGroup
from sympy.core.expr import unchanged
from sympy.matrices import Matrix
from sympy.matrices.expressions import \
MatMul, BlockDiagMatrix, Determinant, Inverse
from sympy.matrices.expressions.matexpr import \
MatrixSymbol, Identity, ZeroMatrix, OneMatri... | [
"sylee957@gmail.com"
] | sylee957@gmail.com |
323b2f19eecc771d3c9a96cedb3d48e2ed15d5d8 | f6d5a09f9de8a66e764d593171fd9f27235ea013 | /comic.py | cf4cbfa4d406e1a1c81c2633b351797ea78699b4 | [] | no_license | Popoola-Sinaayo/Python-Projects | bd443c49c970b2296488e0382aa78de295514d11 | 2a703dd2d36f34d1f8a4cae33e2246dc37c1fb8a | refs/heads/master | 2022-12-10T02:18:19.089516 | 2020-08-31T08:20:16 | 2020-08-31T08:20:16 | 291,574,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | import requests
#res = requests.get("https://gateway.marvel.com")
#433/v1/public/characters?apikey=e14291a7ea40ad3a82bd126eba5b813fc068aa0")
#res0 = requests.get("https://www.google.com")
#ponse = res.json()
joke = requests.get("https://api.imgflip.com/get_memes")
jokes = joke.json()
koke = jokes["data"]["data.mem... | [
"olusegunpopoola4real@gmail.com"
] | olusegunpopoola4real@gmail.com |
4533e7f4106a08d6c60606ae85e081356575fbf3 | 0c40e97b69dcd00f0b0b05f249d0fce448320fd8 | /test/functional/feature_segwit.py | 2d82afd598a56df99062522ce243f7c32495d618 | [
"MIT"
] | permissive | Arhipovladimir/Earthcoin | 9908912df9b10b97512c545b855c3670767039d9 | bc5b5ee538c76e7232e93434aedd8688bae70792 | refs/heads/main | 2023-07-16T05:50:52.755250 | 2021-08-25T09:19:40 | 2021-08-25T09:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,664 | py | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Earthcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the SegWit changeover logic."""
from decimal import Decimal
from test_framework.address import... | [
"mail@deveac.com"
] | mail@deveac.com |
110f03f1ca08186fa594f660cabd56e1c35ab2e9 | caaf1b0754db1e676c37a6f1e58f19183754e654 | /sdk/network/azure-mgmt-network/generated_samples/private_link_service_delete.py | 97258f9c138bda212fe46732ae74449e11fcba41 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | rdomenzain/azure-sdk-for-python | 45dfb39121a0abda048c22e7309733a56259f525 | 58984255aeb904346b6958c5ba742749a2cc7d1b | refs/heads/master | 2023-07-07T06:53:12.967120 | 2023-07-04T16:27:37 | 2023-07-04T16:27:37 | 258,050,134 | 0 | 0 | MIT | 2020-04-23T00:12:14 | 2020-04-23T00:12:13 | null | UTF-8 | Python | false | false | 1,518 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | rdomenzain.noreply@github.com |
815555a0b9ba8d3eef9e459b9d19cd9f6e6e9305 | 824f831ce0921b3e364060710c9e531f53e52227 | /Leetcode/Python_Basics/02_C_Collection_OrderedDict.py | 4c7578f24feadc8a52aabb12cbb8fd63c8f4f69d | [] | no_license | adityakverma/Interview_Prepration | e854ff92c10d05bc2c82566ea797d2ce088de00a | d08a7f728c53943e9a27c33f8e4249633a69d1a6 | refs/heads/master | 2020-04-19T19:36:06.527353 | 2019-06-15T23:02:30 | 2019-06-15T23:02:30 | 168,392,921 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 948 | py |
# 8.3.6.1. OrderedDict Examples and Recipes
# OrderedDict Examples and Recipes
#
# Since an ordered dictionary remembers its insertion order, it can be used in
# conjunction with sorting to make a sorted dictionary:
# >>>
#
# >>> # regular unsorted dictionary
# >>> d = {'banana': 3, 'apple': 4, 'pear': 1, 'or... | [
"noreply@github.com"
] | adityakverma.noreply@github.com |
a74ea7563849fb0b7db1fc75e082d1c42015a4ea | 91dc3061601924efb35d0fa4faf3e87ddc68ae91 | /lab/pytest/pytest-tut/test_calculate_stat.py | ec5ae6ad72be550d5a9b0240640cc554c0cf6061 | [
"MIT"
] | permissive | MaxIsWell42/SPD-refactoring-challenges | 6a189882ddbf87dd8dd21ba362bfd8b6e4846d37 | ef2a8a13cb1fcd412e2fb0035bb1cf76527b0dc9 | refs/heads/master | 2023-03-14T02:13:14.011597 | 2021-03-02T18:36:30 | 2021-03-02T18:36:30 | 339,496,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,479 | py | # Written by Kamran Bigdely
# Example for Compose Methods: Extract Method.
# Refactored.
import math
def display_grade_stat():
"""Gathers stats and print them out."""
grade_list = read_input()
# Calculate the mean and standard deviation of the grades
mean, standard_deviation = calculate_stat(grade_lis... | [
"maxfin13@gmail.com"
] | maxfin13@gmail.com |
d59271d0be300afe258e06412fce1d17daee84a4 | f7e592ac06e642b0c1db6779db919b136fea09cf | /blog/views.py | 8756ab2aabac1d3a317a9d316643010cc2a91e08 | [] | no_license | xero7689/myDjangoBlog | c2ccf02b64b452ad162b24a4a43dc900ba4d18be | 9507e2fad44955521b97160d9456be30a623cbe9 | refs/heads/master | 2016-09-15T17:27:38.455029 | 2014-06-09T12:15:29 | 2014-06-09T12:15:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,190 | py | from django.shortcuts import render, get_object_or_404, HttpResponseRedirect
from blog.models import Post, postTag
from work.models import Image
from django.utils import timezone
from django.views.generic.dates import YearArchiveView, MonthArchiveView
from django.views.generic import ListView
from django.core.paginato... | [
"volleyp7689@gmail.com"
] | volleyp7689@gmail.com |
b8ba4c0311d5dd7238535ad3b2ce2e24d54e21ec | 870932f5edf527b643db7bf63b42f873d9adffc6 | /p4-smartcab/smartcab/q_table.py | c6aa1759cccddcbe977fb83b67e2911231736415 | [] | no_license | aalhour/udacity-machine-learning-nanodegree | 4342229c7212ef48d6d919c3c6ea759547d88d6f | 45285374fd30848552cbe331d2376a6358dd906c | refs/heads/master | 2021-01-20T23:36:42.197748 | 2018-01-17T11:30:45 | 2018-01-17T11:30:45 | 61,887,809 | 0 | 1 | null | 2018-01-17T11:30:46 | 2016-06-24T13:53:54 | Jupyter Notebook | UTF-8 | Python | false | false | 3,857 | py | # Given a state, figure out which action to take
# best_action_given_state
# Take an action, get reward
# Update entry for old state-action
# TODO: refactor by extracting value object StateActionMapper
import json
class QTable():
def __init__(self, alpha=1.00, gamma=0.5):
self._alpha = alpha
s... | [
"edderic@gmail.com"
] | edderic@gmail.com |
da26f0c6745f08a990a23ec69c9a44cd5661d825 | 3e91e2ec469a6eaf47986c8f2d42e417d77df181 | /unregisteredCustomer.py | 1af94dcdbd65e35f0d867df9fcb62b62b5207bde | [] | no_license | Kowenjko/Python_Homework_15_Kowenjko | cafa799822c078dd0546b4cd8a900d1c6aae6f7d | 968022726bb17bffa268e19edfe3dc7028dc108d | refs/heads/master | 2023-06-20T14:09:10.005936 | 2021-07-25T07:39:17 | 2021-07-25T07:39:17 | 389,289,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,884 | py | import psycopg2
from settings import *
from connection import Connection
class UnregisteredCuctomer(Connection):
# Реєструємо customer
def register_self(self, first_name, last_name, city, login, password):
if self._register(login, password, 'customer'):
table = 'customer'
data ... | [
"OrtosWT@gmail.com"
] | OrtosWT@gmail.com |
c80b70662baa200840e1c1155e06769053238ef2 | 9a28a82f6c3b9ccff3f7a7c0d157dc6ddf0af232 | /User/views.py | 2935cec4a0129b814ee248bd75b1afe4ee8c140f | [
"MIT"
] | permissive | KarryBanana/ckr-zfy | df30811ddfee379908a5dcd4dede3b8cf8df1e9e | 926160fc23e18b10189cd17861b81448b770c50d | refs/heads/master | 2022-12-01T23:49:22.645046 | 2020-08-19T16:28:47 | 2020-08-19T16:28:47 | 288,340,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,338 | py |
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.hashers import check_password, make_password
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from .models import Profile
from django.contrib.auth.mode... | [
"bill881@126.com"
] | bill881@126.com |
dcc88e38c7a728e2513325e8b7fea3dc04f5b694 | aaa55b54be6a2c52b1e1ea3f36ef25d0e9b6fd53 | /quotes_multiple_items.py | 46c2fd738ebb7f05e34da9c392f604da56b7b00e | [] | no_license | fairlyoddparents/Scrapy-Tutorials-My-Answers- | 312f3c373ae06cf4855f2db74dbc5d411180a2b8 | ba745057b55d837e7d2e22459725075cd9d7c8c4 | refs/heads/master | 2022-12-15T12:54:12.345895 | 2020-09-19T06:46:25 | 2020-09-19T06:46:25 | 296,803,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | # -*- coding: utf-8 -*-
import scrapy
class QuotesSpider(scrapy.Spider):
name = 'quotes'
allowed_domains = ['toscrape.com']
start_urls = ['http://quotes.toscrape.com']
def parse(self, response):
self.log('I just visited: ' + response.url)
#I cannot use for quote in response.css('div.qu... | [
"noreply@github.com"
] | fairlyoddparents.noreply@github.com |
ee174d0cc480a106ac3d73263d219cb9230f19cc | b9f98b763ca714908ece20e03075659512e1fe53 | /4th Lab/tttlib+.py | 694e00f34a5034ae42ebcc5c7df7bbd4dc5983c7 | [] | no_license | TheozZeng/CSC180 | 83e8ad1ecfcdca39ab822e67657be57026197786 | 45e4fa42524620dae73fc6d3d978c32b0b91518e | refs/heads/master | 2022-03-06T22:09:43.608914 | 2019-08-20T10:49:04 | 2019-08-20T10:49:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,526 | py | class ttt:
T=[0,0,0,0,0,0,0,0,0]
#printBoard
def printBoard(self):
L=[0,1,2,3,4,5,6,7,8]
for i in range(0,9):
if(len(T)!=9)or((T[i]!=1)and(T[i]!=2)and(T[i]!=0)):
return(False)
else:
if T[i]==0:
L[i]=i
elif T[i]==... | [
"noreply@github.com"
] | TheozZeng.noreply@github.com |
29cebf2f85aaf258c124b6e61c0068e22a3be8d3 | 7ed1f496f9d4a936c8d07192f625e930018490f6 | /wrapped_qt.py | 262ccc8c1934386209f891a7e785252c0f3f760b | [
"MIT"
] | permissive | akashiro000/Superslick | ac28af5f97d81a139a062b5071cf55457b861398 | f7a9827cbc974522e2ac2bee330c1e43ca0e9e15 | refs/heads/master | 2021-03-10T15:21:17.245284 | 2020-03-15T20:40:25 | 2020-03-15T20:40:25 | 246,463,991 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | # coding: utf-8
from PySide2 import QtWidgets, QtGui, QtCore
class QIconLabel(QtWidgets.QLabel):
COLOR = (30, 30, 30)
OPACITY = 255 / 2
CONSTRUCTED = False
clicked = QtCore.Signal(QtGui.QMouseEvent)
@classmethod
def _construct(self):
if self.CONSTRUCTED is False:
self.o... | [
"Takumi.Akashiro000@gmail.com"
] | Takumi.Akashiro000@gmail.com |
601b7e3a344d8fd631ff88dae9299ee5af5140c9 | d6ef240cc3b0babd0a96d51b4a54477f36725f4b | /setup.py | 19acbbaf660b7bd84e3d37dfcaa4adfe953dafef | [] | no_license | alorenzo175/grib2nc | bc972b2cd4e523947533b02628d53311f66e9ea8 | ee6a54c17a4acaec059a97de1102763bdade22fd | refs/heads/master | 2021-01-18T14:05:44.314776 | 2016-02-14T18:38:40 | 2016-02-14T18:38:40 | 25,052,295 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | import os
import sys
try:
from setuptools import setup, find_packages
except ImportError:
raise RuntimeError('setuptools is required')
import versioneer
PACKAGE = 'grib2nc'
if sys.version_info[:2] < (2, 7):
sys.exit('%s requires Python 2.7 or higher.' % PACKAGE)
requirements = ['numpy', 'pandas', '... | [
"alorenzo175@users.noreply.github.com"
] | alorenzo175@users.noreply.github.com |
2d2395a8709438a1b0590fef8e3b2f746722f1e2 | b9702abaddfecfe045f3a03d9a3100f42b45d4bd | /flask-example.py | 74f6125e2081a7c8f4d39ab23637a49a5f513755 | [] | no_license | CachingFoX/j-test | fa1cbee9afe7de7bbedb56b894ffde572fbe1405 | a15f41ed4e6a2b0f22d326f93e4b8979b43f6c23 | refs/heads/master | 2021-03-05T21:54:35.406154 | 2020-03-09T23:20:43 | 2020-03-09T23:20:43 | 246,155,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
name = request.args.get("name", "World")
return f'Hello, {escape(name)}!'
if __name__ == '__main__':
app.run()
| [
"noreply@github.com"
] | CachingFoX.noreply@github.com |
30debcb3894b2bc2521cb65ad73c0f8d57f19288 | 8952661cf90c1c6e65e792b0499b8183f0fcb3f5 | /Browser.py | 76b26658ac39d728061c50bcd408dc7d09a22ac7 | [] | no_license | 527088995/s-analysetooldemo | 46c9c9ddb5bd9e6f654eb29f8194435d07b2033a | ccd511c688cabb17c65de60c5cc39aa27831b92e | refs/heads/master | 2022-12-17T21:51:34.376473 | 2020-09-15T07:13:33 | 2020-09-15T07:13:33 | 295,623,705 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,054 | py | from selenium import webdriver
from bs4 import BeautifulSoup
from SearchEngine import EngineConfManage
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import hashlib
import time
import xlwt
class Brow... | [
"527088995@qq.com"
] | 527088995@qq.com |
1e0916ff486568e516869d103e124d84262fa9f7 | 57ea2c9205d3e288af4e31aef5d70249f92bcbfc | /armature/cli/packer.py | 338e569a2e4cab5ccb0a3f2bff724de598c08721 | [
"MIT"
] | permissive | buuren/armature | 6899b6946e8dc2bf5f8912cee01ed13e38d24d9b | 6675ba872dbeee59dd992890fb22b37490aa145c | refs/heads/master | 2022-12-11T18:18:02.309200 | 2018-03-07T20:23:19 | 2018-03-07T20:23:19 | 123,180,203 | 0 | 0 | MIT | 2021-06-01T21:54:27 | 2018-02-27T19:52:05 | Python | UTF-8 | Python | false | false | 1,105 | py | import click
from modules.executor import Executor
from utils.config_parser import ConfigParser
json_data = ConfigParser(
path="/home/vlad/infra/armature/armature/conf/modules.json"
).return_json()
MODULE = "packer"
@click.group()
def cli():
pass
@cli.command()
def prepare_template():
"""Validate conf... | [
"vkolesni@gmail.com"
] | vkolesni@gmail.com |
9b06754ff330693fa3c3a481c929c2371cbfe84d | 15e0ae665ffbed837c4912dfbea8db1ced8a43db | /show_help.py | 843d36b9f3b16409a6fa3eacaba625a8008b4f79 | [] | no_license | mhcrnl/TkEditor | a664af328c1f69d6a776c1ed90130d08b569c9c9 | 90e45abcfc8e9f7ce25cc9fb8ac183eb68d85037 | refs/heads/master | 2023-08-25T13:55:26.086446 | 2021-10-24T10:41:19 | 2021-10-24T10:41:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,590 | py | from tkinter import *
from tkinter import ttk
from platform import uname
class HelpWindow(Toplevel):
def __init__(self, **kwargs):
super().__init__(**kwargs)
# # # # # # Window Options # # # # # # #
# Transient
self.transient(self.master)
# Title
self.title("About T... | [
"noreply@github.com"
] | mhcrnl.noreply@github.com |
900556a23162d352469f42f1d15d3b22de3a5b9c | b598183f47c3ffdc5e2610b63a2e579c24ecafce | /from_image_cli.py | 3ad531649cff8d3d4a1f48b72ca1be6b09586ebf | [] | no_license | bouttier/jps | 81ba8ee05a19aee0b6fa6868733215996f516d92 | cec8093a4ad877bdd5dc809d0080e6739bd14ead | refs/heads/master | 2020-05-09T10:38:34.167917 | 2013-01-18T01:59:41 | 2013-01-18T01:59:41 | 7,328,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,469 | py | #!/usr/bin/env python2
#-*- coding: utf-8 -*-
from PIL import Image
from jps import *
import sys
if __name__ == "__main__":
if len(sys.argv) !=2 and len(sys.argv) !=6:
print "\nUtilisation :\n\t"+sys.argv[0]+" image.(png|jpeg) [xDepart yDepart xFin yFin]\n"
sys.exit(1)
mapImage = Image.open(s... | [
"franklin.delehelle@etu.enseeiht.fr"
] | franklin.delehelle@etu.enseeiht.fr |
14a3acc0bab16e60abbf783682b7aa042165a154 | 20bb1ae805cd796a7c377e55966633441d1d9fd5 | /uva/10680 LCM/lcm.py | b168af4bd0eee42ae91ee9c4dc81041695a8fe27 | [] | no_license | nathantheinventor/solved-problems | 1791c9588aefe2ebdc9293eb3d58317346d88e83 | c738e203fa77ae931b0ec613e5a00f9a8f7ff845 | refs/heads/master | 2022-10-27T08:58:23.860159 | 2022-10-13T20:18:43 | 2022-10-13T20:18:43 | 122,110,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | py | ans = [0, 1]
cur = 1
factors = [[] for _ in range(1000001)]
for i in range(2, 1000001, 2):
factors[i].append(2)
for i in range(3, 1000001, 2):
if len(factors[i]) == 0:
for k in range(i, 1000001, i):
factors[k].append(i)
for i in range(2, 1000001):
if len(factors[i]) == 1:
for fa... | [
"nathantheinventor@gmail.com"
] | nathantheinventor@gmail.com |
03d379607640948529f39b747829d1c818888cf2 | 3ba73ee31160769d1736b1516024fdf40dd7492c | /10.Trees/CheckIfvalidBT.py | a85952b9bf39dc31b41aaec8d4e6c5100cb36233 | [] | no_license | chaerim-kim/Data-Structures-and-Algorithms | 86d4dfcd4948a08b16ead1492e9a825adc4deaad | 80d685ef2fcb54f3299225fa080df7d64e672735 | refs/heads/master | 2023-03-31T01:32:49.638962 | 2021-04-07T16:12:20 | 2021-04-07T16:12:20 | 290,717,702 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | # Check if an array of integer pairs can form a binary tree
# 1. Parent node can only have 2 children
# 2.*All the children node should be unique;
from collections import Counter
def TreeConstructor(strArr):
parents = []
children = []
print(strArr)
for strTup in strArr:
for i,v in eval(strTup)... | [
"kcl0720@gmail.com"
] | kcl0720@gmail.com |
2bcf2ce88da8de40f0c8896ff08e2b09b79815cb | e60573cca7a015aace1eb03bb14fbb10eab0a699 | /profiler.py | d663c58292fcb26faf428e377ffe961cd913c1cd | [] | no_license | Atoqaz/ludo | 424f4e9e9ec3caf984efeec2f7e309389a03b8ca | e6140120d3962d2936e505bf7b4dd2b347d0bc92 | refs/heads/master | 2023-03-17T18:02:14.220857 | 2023-03-02T19:47:04 | 2023-03-02T19:47:04 | 249,055,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,172 | py | """ Tool to measure the time each function takes.
Use it by adding the @profile decorator to a function:
@profile
def myFun(args):
...
"""
import cProfile, pstats, io
def profile(fnc):
""" A decorator that uses cProfile to profile a function
Sort by:
calls (call count)
cum... | [
"atoqaz@gmail.com"
] | atoqaz@gmail.com |
15e529e0b3ced8be4239c5ac1780af25170e7b51 | 0a02fb9f8c2439a10847ffb666c07965e8e5fabc | /BuddyString/buddystrings.py | eb953dc0a3f285144e75bbba42fb4875143b590f | [] | no_license | HJ23/Algorithms-for-interview- | cf40125789a6a7378e376035ac8fe6b4e4c96eb5 | 28525bd097a702d3597d5ffd3cc4800e0499e5b5 | refs/heads/master | 2021-07-11T07:40:00.044046 | 2020-12-08T19:44:12 | 2020-12-08T19:44:12 | 223,262,957 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | import sys
sys.path.append("..")
from BasicTester import BasicTester
def find(C):
A,B=C
if(len(A)!=len(B)):
return False
if(A==B and len(set(A))!=len(A)):
return True
found=False
index=-1
A=list(A)
B=list(B)
for i,x in enumerate(A):
if(B[i]!=x and not found):
found=T... | [
"carleuler@outlook.com"
] | carleuler@outlook.com |
29c3de812a7aef8d6a7d2ed00d6ccaedd0e88d7b | 366f551437d4e014d6ba8943ac080009fd2f74ca | /pro1.py | dec346ee50ac9f947709460e2ce36a1f6e742498 | [] | no_license | Raviraghul2210/GuviPythonPrograms | feb294804e0c7c0f6da3af9601bf857d57392cf1 | 42f6439bcf4358332c44ba1f653dbc977aa7f8c5 | refs/heads/master | 2020-06-17T00:28:11.611190 | 2019-08-09T09:32:34 | 2019-08-09T09:32:34 | 195,743,797 | 0 | 1 | null | 2019-07-08T05:40:33 | 2019-07-08T05:40:33 | null | UTF-8 | Python | false | false | 178 | py | sum=int(input())
p=[]
for x in range(0,sum):
la=input()
p.append(la)
new=[]
for x in zip(*p):
if(x.count(x[0])==len(x)):
new.append(x[0])
else:
break
print(''.join(new))
| [
"noreply@github.com"
] | Raviraghul2210.noreply@github.com |
01e5ecf71f7dfe0f32d7efff5e02ec11532e4f44 | 8ee64f13d2b837113ba86d42d0a308d550ee8297 | /aiyuke.py | 072038998f066853ee60a8039ddcfc00e127e2a6 | [] | no_license | wang598842739/GenerateRSSFeedForWebPages | 9eb9c126e5f7d308c752133f11cc12942d9fa741 | aaadda52b4a2d7c56f5aaf0b9fab8b955cb432f5 | refs/heads/master | 2021-01-12T08:37:44.568388 | 2016-12-12T13:12:05 | 2016-12-12T13:12:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | #coding:UTF-8
import re
import urllib
import rss
#爱羽客见招拆招
c = urllib.urlopen("http://www.aiyuke.com/video_special/254.html").read().decode('utf8')
site = "http://www.aiyuke.com/video_play/"
rss.rssify("aiyuke", site, [{'title': id, 'link':site+id} for (id) in re.findall('<a href="http://www.aiyuke.com/video_play/(.... | [
"ning.liu4@hpe.com"
] | ning.liu4@hpe.com |
e2a04da04bde7810a7710cff56f97ed8ec041933 | 5c48106efcc2f9de006a3c4bbe66d08a17c6e97f | /zuoye/kaoshi3.py | 4098696654c24ccf005557485885b83d192ef3df | [] | no_license | phpcolt/python | 83631eb00481d8cbbe317196183efc1ae605c69b | 493b1a5c132650f4c7c1fb33ed4c01f1e91c13be | refs/heads/master | 2020-03-09T04:32:10.420134 | 2018-04-09T09:24:18 | 2018-04-09T09:24:18 | 128,590,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,427 | py | #coding=utf-8
import os
goods = [
{"name": "电脑", "price": 1999},
{"name": "鼠标", "price": 10},
{"name": "游艇", "price": 20},
{"name": "美女", "price": 998},
]
'''
功能要求:
基础要求:
1、启动程序后,输入用户名密码后,让用户输入工资,然后打印商品列表
2、允许用户根据商品编号购买商品
3、用户选择商品后,检测余额是否够,够就直接扣款,不够就提醒
4、可随时退出,退出时,打印已购买商品和余额
5、在用户使用过程中, 关键输出,如余额,商品已加入购物车等消息,需高亮显示... | [
"macbookpro@192.168.100.109"
] | macbookpro@192.168.100.109 |
b9dde9ef681c952721f0165bff9acbd9a024ba59 | 95740c67e49e1528919eb8f96ae8086e7386e558 | /project/reports/election_prediction/pattern/web/__init__.py | 67bf0c5ef521ac625225815154e73cffa6a8de32 | [
"MIT"
] | permissive | mdeff/ntds_2016 | 5449fd5b7a1e4aa8721d0ae33a1f8a097f73b265 | 2d597838cb2688471cc6122a5570441585393148 | refs/heads/master | 2021-01-17T17:47:01.434340 | 2019-12-16T17:53:04 | 2019-12-16T17:53:04 | 69,178,943 | 109 | 51 | null | null | null | null | UTF-8 | Python | false | false | 149,004 | py | #### PATTERN | WEB #################################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
############... | [
"michael.defferrard@epfl.ch"
] | michael.defferrard@epfl.ch |
486bbddf0faf146b052d081cc375d1cb0c315478 | 04819640c733981008b41e1829da5b2158e2a689 | /books.py | e7aa06556f5318efd5a8bc6beb1743889f6ad5af | [] | no_license | FlorentRevest/WCPS2017 | a5147ff88f1ed5c44ddefed7ff8d1b529aa0cd7d | a3dafc149b6fe33549945b3123fcad915fc56e5d | refs/heads/master | 2020-03-09T19:09:31.907021 | 2018-04-10T15:00:20 | 2018-04-10T19:57:01 | 128,950,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py | #!/usr/bin/env python3
def adjustedVal(m, n, sub, ai, endVal):
if(m+firstBookIndex >= n):
return abs(ai[m+firstBookIndex-n]-sub+endVal)
else:
return abs(ai[m+firstBookIndex]-sub)
def howManyBooksUnder(x, ai, n, firstBookIndex, sub):
l = 0
r = n-1-firstBookIndex
endVal = ai[n-1]
... | [
"revestflo@gmail.com"
] | revestflo@gmail.com |
f8c788c479d7d8f11e632b6695c8b920e39dfdce | f546e965b0ecf452ceec74e20d53d7c0844336a8 | /wechat/weixin/views.py | 34e609bf6e6557e4cb1b19a6185fb078aa4d63a4 | [] | no_license | hanwenlu/WeChat | 6add8365673084badb3895555b8803e2b32ddf48 | a01c824ce8ed88453cb17173429ba0fbbf862d66 | refs/heads/master | 2021-01-01T19:05:29.865329 | 2016-03-13T16:16:23 | 2016-03-13T16:16:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,656 | py | #-*- coding:utf-8 -*-
# deal with unicode error(support chinese)
import sys
reload(sys)
sys.setdefaultencoding('utf8')
# import module from django & wechat_sdk
# pip install django && pip install wechat_sdk first
from django.http.response import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf i... | [
"fanhr5@gmail.com"
] | fanhr5@gmail.com |
ed769e058750777e05debebbc99e7842fd3bfc5f | a5b53e7b32713015d9ce970a4cc622756188f4b0 | /app/catalog/urls.py | f5f311f32a156fb468b49d717cd0f03c9c1b2ab9 | [] | no_license | kimzod/library_app | f1eef4ccc011569af10f7db7327d5d647498505e | 73ef6f383f901de2f17dacd8f6170c0f3ed3b856 | refs/heads/master | 2021-05-22T01:15:29.411376 | 2020-04-08T16:09:43 | 2020-04-08T16:09:43 | 252,902,555 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | from django.urls import path
from . import views
app_name = 'catalog'
urlpatterns = [
path('', views.index, name='index'),
path('books/', views.BookListView.as_view(), name='books'),
path('book/<int:pk>/', views.BookDetailView.as_view(), name='book-detail'),
path('authors/', views.AuthorListView.as_vie... | [
"51065991+kimzod@users.noreply.github.com"
] | 51065991+kimzod@users.noreply.github.com |
fa9b86655cac7f7c177ccfad6c58f3e8c1771c23 | 8932c700bd52683670e10e870f8b116f25fb6e1f | /melanoma_classification/isicdownload/loadisicmetadata.py | 8a59435b0113bb7f4b54374d98935bc62fbdc6d6 | [
"Unlicense"
] | permissive | michaelsiemmeister/melanomaclassification | 1d09b0ccfe67e16e4052242eaf1b81f8e9deb555 | bf8866e1a4b35faecf89168f5af2ff23139cdf5a | refs/heads/master | 2023-01-10T00:02:18.270578 | 2019-12-18T15:06:09 | 2019-12-18T15:06:09 | 228,863,541 | 0 | 0 | Unlicense | 2022-12-26T21:09:37 | 2019-12-18T15:00:40 | Python | UTF-8 | Python | false | false | 461 | py |
import os
import pandas as pd
def load_isic_df(metadata_path):
'''
I:
metadata_path ... str, relative or absolute path to metadata csv file.
return pandas DataFrame
- set the 'name' column as index with name 'id'
'''
metadata_path = os.path.abspath(metadata_path)
df = pd.read_c... | [
"m.siemmeister@gmail.com"
] | m.siemmeister@gmail.com |
4cd078afb5311f126095acf7b92ad0506caea81c | 87796f8b79b325cdfca7a98b120d690a13ebd267 | /capture/noworkflow/tests/prov_definition/__init__.py | b9e742c0dad1702ab87430c5fbb2e8279693e496 | [
"MIT"
] | permissive | raffaelfoidl/noworkflow | c53c6be45960a93aa546fd8f6c967af2b7c31c93 | aa4ca189df24fec6c7abd32bcca6a097b21fdf31 | refs/heads/master | 2021-01-06T16:32:57.036864 | 2020-03-23T14:12:37 | 2020-03-23T14:12:37 | 241,398,493 | 0 | 0 | MIT | 2020-02-18T15:36:16 | 2020-02-18T15:36:15 | null | UTF-8 | Python | false | false | 426 | py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
from __future__ import (absolute_import, print_function,
division, unicode_li... | [
"joaofelipenp@gmail.com"
] | joaofelipenp@gmail.com |
793e9294a57ac70deb5e9b9239bca0e35c91a5b5 | a609f05150d73cae683ccffd9f892366277891f8 | /faculty_list_crawler/deploy.py | f2a2a40c79c6a6ed69a8b8a995383358cf2b9e2b | [] | no_license | bt3101-project-1/bt3101-project | f7e4ed7eafc6023ea0887cff3311ffffdc2f9377 | 2260bc7b1520bac5c0adabab35968ab3fa97f08b | refs/heads/master | 2021-01-21T03:20:46.668560 | 2017-11-03T08:24:09 | 2017-11-03T08:24:09 | 101,890,028 | 0 | 1 | null | 2017-10-29T05:09:32 | 2017-08-30T14:15:50 | JavaScript | UTF-8 | Python | false | false | 621 | py | from apscheduler.schedulers.blocking import BlockingScheduler
from main import *
import logging
from datetime import datetime
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
downloader = Downloader()
analyser = Analyser()
scheduler = Blocking... | [
"syk950527@gmail.com"
] | syk950527@gmail.com |
af1500f48507bd5b50ceff204c9f8e2e4da6218b | 3a5c94dce25e38fc083619a2a0bf8a657b9afb8c | /vol_001/p188.py | 387317b23d9bda987694f67124fd476f61f4c1fa | [] | no_license | tkoz0/problems-online-judge | a322e296fb14fdf4ca616352ead28895465879e9 | 3372c6fe75556a9dd3e6eb8b06ae65058290ab31 | refs/heads/master | 2022-07-23T01:20:57.380524 | 2022-07-10T07:15:56 | 2022-07-10T07:15:56 | 157,949,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 864 | py | import sys
import random
def hash(word):
m = 1 # base 32 multiplier
h = 0 # hash
for c in word[::-1]:
h += (1+ord(c)-ord('a'))*m
m <<= 5
return h
def find_collision(W,C):
n = len(W)
new_C = 0
for i in range(n):
for j in range(n):
if i != j and ((C//W[i])... | [
"tkozlowski1999@gmail.com"
] | tkozlowski1999@gmail.com |
bdbb71121709de6f4abd49f0053eba8ee7a0b09b | 6477bd1a2da7ce9426c41a04674e19d801d358ef | /AOJ_introductionToProgramming/Topic05/printARectangle.py | 50f699ebfc9deeb0d08c53a34840d8efa1d9cf8b | [] | no_license | takuma375/AtCoder | 6b917153d1597cdd6178db16417bf3b0a0d41850 | 9c24ac600ec80c3ebbc718c66437997462196ee3 | refs/heads/main | 2023-06-28T10:09:26.018064 | 2021-07-25T09:54:53 | 2021-07-25T09:54:53 | 382,631,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 583 | py | # たてH cm よこ W cm の長方形を描くプログラムを作成して下さい。
# 1 cm × 1cm の長方形を '#'で表します。
# 入力は複数のデータセットから構成されています。各データセットの形式は以下のとおりです:
#H W
# H, W がともに 0 のとき、入力の終わりとします。
while True:
H, W = list(map(int, input().split()))
if H == 0 and W == 0:
break
else:
for i in range(H):
for j in range(W):
... | [
"takuma-shimizu-10174@keio.jp"
] | takuma-shimizu-10174@keio.jp |
0d015aa9ad6f1df598a7cf9e8e117438071a312b | 2ad7fcfbc6bac1e39ebe0aa4be8c1de058857619 | /Problemas_repaso/lista.py | 4006768e1d7cff7f02cc162ca7ff01ab0579236e | [] | no_license | alulec/CYPAlexisCC | 0fc50b714516da9ed5336e03dd19ed869780e37b | fce0617205178c8380d9b65b986a50f485a1a753 | refs/heads/master | 2022-06-09T01:28:05.005107 | 2022-05-31T01:23:55 | 2022-05-31T01:23:55 | 207,672,079 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | lista = []
lista2 = list()
print(lista)
print(lista2)
numeros = [3,4,52,45,7,64,546,567,0]
print(numeros)
print(numeros[2])
print(numeros[-1])
#slicing
print(numeros[3:-1:1])
print(numeros[::-1])
cosas = ["Alexis",545,9,34,35,True,None,[3,4,5,6,7,8]]
print(cosas)
print(cosas[7])
print(cosas[7][2])
cosas[1] = 10001
co... | [
"alexisjesuscordovadelacruz@gmail.com"
] | alexisjesuscordovadelacruz@gmail.com |
130fc956a500655a11b7c5323910c4856b1883bc | cdab20971d99fcf94b414e1060ffb15b6e60d821 | /ara/steps/printer.py | bb736509c71b774a97336ba23ddd8d9164b78314 | [] | no_license | florommel/ara | d27f60b2334bc03fb711dec5722c324a20eb2be9 | 0b0dac6083af10134dccd23db426a354c054a9ba | refs/heads/main | 2023-04-21T10:29:17.084071 | 2021-05-03T13:47:29 | 2021-05-03T13:47:29 | 363,943,723 | 0 | 0 | null | 2021-05-03T13:45:05 | 2021-05-03T13:45:05 | null | UTF-8 | Python | false | false | 9,282 | py | """Container for Printer."""
from ara.graph import ABBType, CFType, Graph, NodeLevel, CFGView
from .option import Option, String, Choice, Bool
from .step import Step
import pydot
import html
import os
import os.path
import graph_tool.draw
class Printer(Step):
"""Print graphs to dot."""
SHAPES = {
... | [
"entrup@sra.uni-hannover.de"
] | entrup@sra.uni-hannover.de |
8614ee5eeee6d74b19ddc1e1113d47b06dddb8bd | 4e5141121d8b4015db233cbc71946ec3cfbe5fe6 | /samples/basic/crud/gnmi/models/cisco-ios-xr/Cisco-IOS-XR-ethernet-lldp-cfg/gn-create-xr-ethernet-lldp-cfg-20-ydk.py | 3d8398de12dc3fa89df78ddc852a3fa57177f1dc | [
"Apache-2.0"
] | permissive | itbj/ydk-py-samples | 898c6c9bad9d6f8072892300d42633d82ec38368 | c5834091da0ebedbb11af7bbf780f268aad7040b | refs/heads/master | 2022-11-20T17:44:58.844428 | 2020-07-25T06:18:02 | 2020-07-25T06:18:02 | 282,382,442 | 1 | 0 | null | 2020-07-25T06:04:51 | 2020-07-25T06:04:50 | null | UTF-8 | Python | false | false | 2,824 | py | #!/usr/bin/env python
#
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"deom119@gmail.com"
] | deom119@gmail.com |
429b4412b055802871c256416b0d6854b4f8d28e | d0baa28c977d8828389e12dd09dc1766cd870c7f | /DecisionTree.py | 47019ede0a891b9a9b5d8e54ee9dc24d0d1bc6f8 | [] | no_license | hsbarbosa/teachingmachines2019 | b586d49657dc933b8b238c7fbf01dc02da57f969 | 198a2d6e78b757f7982a27265208ba144ed4afaa | refs/heads/master | 2020-05-07T00:56:49.949999 | 2019-04-09T13:01:17 | 2019-04-09T13:01:17 | 180,251,948 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,710 | py | """Code to accompany Machine Learning Recipes #8.
We'll write a Decision Tree Classifier, in pure Python.
"""
# For Python 2 / 3 compatability
from __future__ import print_function
# Toy dataset.
# Format: each row is an example.
# The last column is the label.
# The first two columns are features.
# Feel free to pl... | [
"hugobarbosa@Hugos-MacBook-Pro.local"
] | hugobarbosa@Hugos-MacBook-Pro.local |
174b23a0701205e2da87894ca11e6fddd5a246d5 | 38a263d52c52a8834b175e867330d8415dad7384 | /Regression_suite_bigc/api/test_shipping_method_api.py | 39dd52af582926da309c4c1bc141b4d413de60a9 | [] | no_license | testing-sravan/tests-scripts-worked | 4e57c47c4ea9a9bc22e85a8b6d628615907537bd | 33c579918356f6ff1cdfd5635d6eba1d85eba0b7 | refs/heads/master | 2021-01-10T20:39:12.805680 | 2014-09-15T04:54:02 | 2014-09-15T04:54:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,893 | py | from lib.api_lib import *
from lib.shipping_class import *
AUSPOST_AUTH_KEY = "bzfac4efaf7e7e51a4b1dbd7cc76cb31"
@pytest.mark.skipif("True")
def ttest_disable_shipping_reboot(browser, url, email, password):
shipping = ShippingClass(browser)
shipping.go_to_admin(browser, url, email, password)
shipping.set... | [
"jenkins@localhost"
] | jenkins@localhost |
71b887b18f04dbb09643ce203964d622b53650b9 | 0a7f44c008390453ad4ae433d653b3b6356d5116 | /projects/Translator/08/translator.py | 7d519f98baed1b6aee76f9bc3c6ae608403ae0d3 | [] | no_license | njnareshjoshi/nand2tetris | 3bd4d47da10b1735727c05a772d01e1b9146df2e | 95461633662723398268952c161b001a08990b35 | refs/heads/main | 2023-07-01T07:06:16.388884 | 2021-08-06T15:08:28 | 2021-08-06T15:08:28 | 354,068,797 | 0 | 0 | null | 2021-04-02T16:20:40 | 2021-04-02T16:07:51 | null | UTF-8 | Python | false | false | 10,915 | py | """
Translator program to convert vm instructions to assembly instructions.
We can run the translator in following ways
python3 translator.py vm_file.vm
python3 translator.py vm_file1.vm,vm_file2.vm
python3 translator.py directory_of_vm_file
If present then Sys.vm file needs to be passed in as first file t... | [
"njnareshjoshi@gmail.com"
] | njnareshjoshi@gmail.com |
56ad5604f7e320ff4f9ebd5141cab661611ffddc | cc2a18b152391ffaf437b1b3fe32bd0cec019179 | /setup.py | 0ff918d318adc1d6ecc7628483b3fb0b10ef91b8 | [
"BSD-2-Clause"
] | permissive | theobdt/boundary_tracing | 7da71a69c8f18ba32df3f18a6a7e8f54cf2b6565 | 615883b620f119c85c944ff2a5073619a8e32024 | refs/heads/master | 2021-07-09T12:30:17.718750 | 2020-08-31T09:51:30 | 2020-08-31T09:51:30 | 161,060,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | """Compare a python and a cython version of the boundary tracing algorithm
$ python setup.py build_ext --inplace
"""
from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup(ext_modules=cythonize('bt_cy.pyx'),
include_dirs=[numpy.get_include()])
| [
"theo.bodrito@hotmail.fr"
] | theo.bodrito@hotmail.fr |
ae79db95820afa78fc580aa49376922c0c238952 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/ms_data/datatypes/facets/float_pkg/float_min_inclusive005_xsd/__init__.py | 2aa44ebe2b8660a5c90d5e944cdea45e6804713b | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 180 | py | from output.models.ms_data.datatypes.facets.float_pkg.float_min_inclusive005_xsd.float_min_inclusive005 import (
FooType,
Test,
)
__all__ = [
"FooType",
"Test",
]
| [
"tsoulloftas@gmail.com"
] | tsoulloftas@gmail.com |
e189976241518966256753784a9ed61e7a1eaae9 | a4bf1ffc22f9124818f20a5c737ecb1b73ef4ff2 | /navi/gui/ui/analyse_threshold_dialog.py | ccc8cd1b229a59eff8cff04d3b9410b4343b420d | [] | no_license | ivancrneto/tcc | 06d9b8e706a6706083994c51503f6acc725b7cb3 | 58a25c14322a5dc30d22bd7bea8b1447ae89e33d | refs/heads/master | 2021-01-20T10:42:51.058583 | 2011-12-16T18:50:42 | 2011-12-16T18:50:42 | 1,485,093 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,864 | py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'analyse_threshold_dialog.ui'
#
# Created: Mon Oct 17 21:32:14 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUt... | [
"ivan.cr.neto@gmail.com"
] | ivan.cr.neto@gmail.com |
9fa7e5be11a4f14d83f3b8f814d5be4788b10a96 | 93b8e319817b9e317b25a469bc6e4ee60ac780cb | /stonks_COMPLETE/solve.py | cc190e983d7e4494a539fb687319b4408fe288ca | [] | no_license | cyberchaud/ctf_picoctf2021 | 08de27d116b62929c7b71b72a32cf4c3e4c1b3b2 | 327b7a9391eb1f34ce65184a19b87d6db28dbf0d | refs/heads/master | 2023-05-09T13:19:15.315119 | 2021-06-03T00:23:49 | 2021-06-03T00:23:49 | 372,087,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | revstring = 'ocip{FTC0l_I4_t5m_ll0m_y_y3n58a025e3ÿ'
n = 4
revlist = [revstring[i:i+n] for i in range(0, len(revstring), n)]
chunks = [chunk[::-1] for chunk in revlist]
print(''.join(chunks))
| [
"cyberchaud@gmail.com"
] | cyberchaud@gmail.com |
b8819c397f4ac71efe866b205c79d513ff737cc9 | 1c74e301621022e1afa006d8cede10dc8f5100a1 | /ex40a.py | 3311b41306a2694f8aed9f771cd9cb91dee6bcbb | [] | no_license | JohnnyB95/LearnPython3 | ab9cd8d0f257936c77eeec594a084954386241aa | 7c20e30ba2908193175c8ae23007d92485b5c56a | refs/heads/master | 2020-04-12T16:11:33.317910 | 2019-01-06T23:51:03 | 2019-01-06T23:51:03 | 162,605,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py |
# VERSION 1
# import ex40_mystuff #import library
# ex40_mystuff.apple() #execute function apple()
# print(ex40_mystuff.mystuff['apple']) #access an item in a list in module
# print(ex40_mystuff.tangerine) #print variable tangerine in module
# VERSION 2
class MyStuff(object):
... | [
"Johnny.Benitez@gmail.com"
] | Johnny.Benitez@gmail.com |
25e8f520ef46a65b0ef6c388729b48c84eba5852 | a6e2e9c9c79dd3e067d3c92402e56b541abed22b | /covid_chatbot/_data_refresh.py | 0d0301b56b9b773396d90938ffa086f99236f8fe | [] | no_license | kavurisrikanth/COVID_chatbot_Telegram_Implemented | 857b112ddbc215e75ef8adc1b73902a2267d0c62 | 90edfa9847ad81ed8a965448470996a57e41b520 | refs/heads/master | 2023-03-17T06:10:33.042674 | 2021-01-24T19:16:55 | 2021-01-24T19:16:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | import pandas as pd
import requests
import json
url1 = f'https://api.covid19india.org/data.json'
url2 = f'https://api.covid19india.org/v2/state_district_wise.json'
response1 = requests.get(url1)
response1_dict = json.loads(response1.text)
response2 = requests.get(url2)
response2_dict = json.loads(response... | [
"noreply@github.com"
] | kavurisrikanth.noreply@github.com |
5d9ce4429edd0489a94eab7a8b153785da989b4b | 64f96027c700c13c621affd0574cfc56e57394ed | /courseinfo/migrations/0004_semseter_data.py | 97959abb651a07630d971fff986b9fe4d04c0d25 | [] | no_license | JourneyWoo/UniversityEducationSystem | d251cffb6307aeabd598c64c4ac68f314d9ee89a | 7ada09b7354f915d7269714ecf15000f8a4b9dff | refs/heads/master | 2020-04-25T00:19:28.573609 | 2019-04-21T07:30:03 | 2019-04-21T07:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,197 | py | # Generated by Django 2.1.1 on 2019-03-17 19:08
from django.db import migrations
SEMESTERS = [
{
"semester_name": "2019 - Summer",
},
{
"semester_name": "2019 - Fall",
},
{
"semester_name": "2020 - Spring",
},
{
"semester_name": "2020 - Summer",
},
{... | [
"zw35@illinois.edu"
] | zw35@illinois.edu |
2ab2d7b03e3c836115023be23e59321e084e65e9 | 6fc07cd05bfe0dcf9d1f5c6d040e5391e53ba65e | /gCloud/google-cloud-sdk/lib/surface/compute/target_pools/get_health.py | 86b76ea44bdb0780e9f23e45177a4310856b5f74 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | bopopescu/MeedMems | a43ca33704da52cb0bd989ed8d45c018190313bf | 69fa61c1a326159be4c30a0506869b6ad15525cf | refs/heads/master | 2022-11-23T16:23:50.642724 | 2016-04-26T00:17:24 | 2016-04-26T00:17:24 | 282,374,101 | 0 | 0 | null | 2020-07-25T05:00:53 | 2020-07-25T05:00:52 | null | UTF-8 | Python | false | false | 3,566 | py | # Copyright 2014 Google Inc. 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 required by applicable law or ag... | [
"89445.seenivasan@students.itu.edu"
] | 89445.seenivasan@students.itu.edu |
563677ad56806cad1bc1fd74bdc8d5c4027bd6ef | cf8c8118c16e7f38a190bc4a96b28d8c4b89ff58 | /tests/test_pipeline/test_test_augment_utils.py | 26bf00681f12374676096fa9d0004b46994c3e9c | [
"Apache-2.0"
] | permissive | encore-zhou/mmdetection3d | a7a5e21c0ec8f99843301b89b1e9b079f0a983c5 | c3d7f97baecd1beff1e9757d51523778c38f118b | refs/heads/master | 2023-03-21T17:03:22.723259 | 2020-09-22T07:08:45 | 2020-09-22T07:08:45 | 283,723,083 | 1 | 1 | Apache-2.0 | 2020-09-22T07:08:46 | 2020-07-30T09:07:38 | Python | UTF-8 | Python | false | false | 2,104 | py | import numpy as np
import torch
from mmdet3d.datasets.pipelines import MultiScaleFlipAug3D
def test_multi_scale_flip_aug_3D():
np.random.seed(0)
transforms = [{
'type': 'GlobalRotScaleTrans',
'rot_range': [-0.1, 0.1],
'scale_ratio_range': [0.9, 1.1],
'translation_std': [0, 0, ... | [
"noreply@github.com"
] | encore-zhou.noreply@github.com |
19278d8ef7d38d9fef53807d8b5f43c6599c1860 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_310/ch24_2019_02_28_22_51_17_076072.py | a696f9213b91ef86ad0fdb8ed69e705024d7c53c | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | def classifica_triangulo(l1, l2, l3):
if l1==l2 and l1==l3:
return "equilátero"
elif l1==l2 and l1!=l3 or l1!=l2 and l1==l3:
return "isóceles"
else:
return "escaleno" | [
"you@example.com"
] | you@example.com |
8b315feae897c34875ac54d7346c9f3fa36a7ae9 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_28421.py | e88056b6d7429d3371507942c15ea0699c845088 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 64 | py | # Python yagmail attachment not working
pip3 install -U yagmail
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
12b57b06ca8399fdc27fa38e011de43de67a8a30 | 94f4bb0f6e43b2eb2f1bdb284a580b76121fa9af | /559.py | 36b10d1ab3ede26c95a47dba50b8ef0aa9c74592 | [] | no_license | huosan0123/leetcode-py | f1ec8226bae732369d4e1989b99ab0ba4b4061c4 | 22794e5e80f534c41ff81eb40072acaa1346a75c | refs/heads/master | 2021-01-25T11:48:17.365118 | 2019-09-12T15:45:34 | 2019-09-12T15:45:34 | 93,934,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | """
# Definition for a Node.
class Node(object):
def __init__(self, val, children):
self.val = val
self.children = children
"""
class Solution(object):
def maxDepth(self, root):
"""
:type root: Node
:rtype: int
"""
if not root:
return 0
... | [
"noreply@github.com"
] | huosan0123.noreply@github.com |
abc71170bebc5eeabbc454115b8a9dcc7b9a858e | 7db0883137d119565540f2d071638c4016f39213 | /Note/Spider/2.28-selenium/selenium+phantomjs学习/selenium_study3.py | 452662361c9123151650e6ef605f1db84e6b3d4e | [] | no_license | PhilHuang-d/python--- | cf22a4cc00d4beaaf75ef7ca87a4c5d31a9d5efe | 152c18f51838ce652b79a0cd24765b1a1c237eee | refs/heads/master | 2021-09-13T05:32:53.754865 | 2018-04-25T13:36:40 | 2018-04-25T13:36:40 | 108,812,447 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,975 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
__author__ = 'Terry'
USER_AGENTS = [
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36',
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)',
'Mozilla/5.0 (Wind... | [
"32259595+PhilHuang-d@users.noreply.github.com"
] | 32259595+PhilHuang-d@users.noreply.github.com |
bfc54acf5cfe74cdca27af81c9e898c7ad2005c3 | 37a67a9531f8c32739ae70fc5be55b4c6acae60d | /multinomial.py | 61b5f29f47a1620d45a703bb42a374da45ab4e3d | [
"MIT"
] | permissive | gongkecun/distribution-is-all-you-need | da1b1b363df3343e0753e55564311e323cd6c890 | 93ae5ed7fa63607474d61723d2d28d1a4b3c653a | refs/heads/master | 2020-08-27T10:03:21.144561 | 2019-10-24T15:04:43 | 2019-10-24T15:04:43 | 217,326,807 | 0 | 0 | MIT | 2019-10-24T15:02:48 | 2019-10-24T15:02:48 | null | UTF-8 | Python | false | false | 1,217 | py | """
Code by Tae-Hwan Hung(@graykode)
https://en.wikipedia.org/wiki/Multinomial_distribution
3-Class Example
"""
import numpy as np
from matplotlib import pyplot as plt
import operator as op
from functools import reduce
def factorial(n):
return reduce(op.mul, range(1, n + 1), 1)
def const(n, a, b, c):... | [
"nlkey2022@gmail.com"
] | nlkey2022@gmail.com |
92ec23a0074b50b4007c2cf6742887a1c9e52911 | 3a8293c7f766c75c6bbb5858497566594fd049d1 | /7.数据类型详解/9.元组-生成器与 yield 关键字.py | 0bd9f11d4144ecfb40ea60fd286cd1091c870c29 | [] | no_license | 18303585361/Zero | fe986d966096989e752fa90cf7c913d0b07ca4d8 | f96ddcd26180afc724575e1b33fcb26468c34118 | refs/heads/master | 2021-02-14T05:15:18.080310 | 2020-05-05T15:03:03 | 2020-05-05T15:03:03 | 244,773,467 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,131 | py | # yield 关键字
'''
yield 关键字使用在生成器函数中
+ yield 和函数中的 return 有点像
+ 共同点:执行到这个关键字后会把结果返回
+ 不同点:
+ return 会把结果返回,并结束当前函数的调用
+ yield 会返回结果,并记住当前代码执行的位置,下一次调用时,会从上一次离开的位置继续向下执行
'''
# 定义一个普通函数
# def hello():
# print('hello 1')
# return 1 # return 在函数中会把结果返回,并且结束当前的函数,后面的代码不再执行
# print('w... | [
"58509299+18303585361@users.noreply.github.com"
] | 58509299+18303585361@users.noreply.github.com |
d88ff0811eb5f461c537ac6d26faeed75c32d583 | c23a6efb27b02f4656d0c4782ba2377879dffb4e | /python/paddle/fluid/tests/book/high-level-api/image_classification/notest_image_classification_vgg.py | e83afeed2f72635a40aa2ac21dc0c8611c309de4 | [
"Apache-2.0"
] | permissive | wanglei828/Paddle | 785ff6027bd445eae7aa2c8fbd4179e9607be193 | 177324b0674d9f325823a02336d32319f4925601 | refs/heads/develop | 2021-04-15T08:41:39.885729 | 2018-05-11T21:52:32 | 2018-05-11T21:52:32 | 126,545,587 | 0 | 0 | Apache-2.0 | 2018-05-04T04:02:46 | 2018-03-23T22:39:59 | C++ | UTF-8 | Python | false | false | 4,242 | py | # Copyright (c) 2018 PaddlePaddle Authors. 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 required by app... | [
"noreply@github.com"
] | wanglei828.noreply@github.com |
121e800c3ac86e4da98ebf88fb6d4c414cff0c2b | 0328188ecef8313c564e0aca2a8c30bc865a41c7 | /test_fixture.py | 05ba5fcfb63d3a9728f1d1712076df9bdc95102b | [] | no_license | manitagahlayan/PyTest | 2c69baaf29064c160738f6666a97a96bf3b19c2f | bd5ad05b6476abeb0dc445c48a2daae125644250 | refs/heads/master | 2020-12-30T10:50:48.828549 | 2017-08-07T06:35:23 | 2017-08-07T06:35:23 | 98,830,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 30 15:06:38 2017
@author: manitagahlayan
"""
import pytest
@pytest.fixture
def i_set_things_up():
projector = {'status': 'doing fine',
'flashing': "dicts can't flash!"}
return projector
def test_fixture_contents(i_set_thin... | [
"manitagahlayan87@gmail.com"
] | manitagahlayan87@gmail.com |
0800900797c3fab99952243dd452d66397117afe | 3ca58506042b4023fb6c16df5aec5a34b0a82c73 | /manage.py | 4b7df74437dd65d65c75eb020d57e8253cb5ccb5 | [] | no_license | jeanpzanatta/PatchApp | ddd8658813f2318a3108f0720e182468629edd0d | b334556fa1b2efa6b0a0d4acc173c2760b9b73a7 | refs/heads/master | 2022-05-27T18:56:03.163466 | 2019-07-03T22:31:21 | 2019-07-03T22:31:21 | 172,410,275 | 0 | 0 | null | 2022-04-22T21:05:05 | 2019-02-25T00:59:09 | Python | UTF-8 | Python | false | false | 541 | py | #!/usr/bin/env python3
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'PatchApp.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Ar... | [
"jeanpedrozanatta@gmail.com"
] | jeanpedrozanatta@gmail.com |
779939847b2d66cd1cb2763b157c70d4e565b6d8 | c68fd1e7827fc702e096ee94449e8cd2b845b54f | /utils/re_ranking_feature.py | d602da3ca11decd3c65367e0ec8c11ab5e0ac314 | [] | no_license | ChengpengChen/Reid-mask | b61ddccb7dc9b0b19fa19e5b8567b354b3cbec8a | 03e0c12b91b4c6280388c1b36e2014b5699115fe | refs/heads/master | 2020-03-28T12:04:00.690557 | 2018-09-11T07:31:36 | 2018-09-11T07:31:36 | 148,267,700 | 9 | 4 | null | null | null | null | UTF-8 | Python | false | false | 4,558 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 26 14:46:56 2017
@author: luohao
"""
"""
CVPR2017 paper:Zhong Z, Zheng L, Cao D, et al. Re-ranking Person Re-identification with k-reciprocal Encoding[J]. 2017.
url:http://openaccess.thecvf.com/content_cvpr_2017/papers/Zhong_Re-Ranking_Person_Re-Identification_CVPR_2017_... | [
"ChengpengChen@github.com"
] | ChengpengChen@github.com |
92059b88931811604299e929a3b325fe2aae275b | 8ebf4276a30d56e8cba1458940fe258bfb8613ec | /eith/interpreter/errors.py | 4e267f1309d0794628f2982bfc7bfbb62a902615 | [
"MIT"
] | permissive | mufeedvh/jam0001 | a71bcd467d714f8b41874c442587232a98902731 | a730c739daf2c99870d4873ac9b2d65ede9f5bad | refs/heads/main | 2023-07-19T01:54:44.898023 | 2021-08-22T18:45:10 | 2021-08-22T18:45:10 | 398,377,041 | 1 | 0 | null | 2021-08-20T19:09:51 | 2021-08-20T19:09:51 | null | UTF-8 | Python | false | false | 97 | py | class NotCommentException(Exception):
"""Exception if line is not a comment.
"""
pass | [
"noreply@github.com"
] | mufeedvh.noreply@github.com |
9bcd652c815dcdaf6b8d072681a0b441049ad36c | 4fe66c71db6d2338f42cc811f4ebcb0d83830c90 | /main.py | 903206e9a895d188d83abec61ebedbbd8ef042a7 | [] | no_license | srivatsa96/image-captioning | 4ab32d91a920ea4c0a6ca532ba75e897d9540117 | 969641819edefbd110820d8b9e57bde12b05c0dd | refs/heads/master | 2021-08-26T09:13:41.412566 | 2017-11-22T20:35:51 | 2017-11-22T20:35:51 | 108,882,691 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | import tensorflow as tf
import numpy as np
from model.ImageCaptioning import ImageCaptioning
from operations.train import TrainCaptionModel
from configuration.config import ModelConfig, TrainingConfig
## Load Configuration
print("Loading Model Configuration")
model_config = ModelConfig()
train_config = TrainingConfig... | [
"srivatsasinha@gmail.com"
] | srivatsasinha@gmail.com |
cd321ea545950a4fdef7d3d855a59651b053ef01 | a29e436db2fb4569ffc896c836bfd6f28b9f6b16 | /2020/2020_17.py | f10f4a909b9c19fb372163ef327dd9916f324f56 | [] | no_license | sjshide/AdventOfCode | a25033747f41630c208d7fd021f3427b9c758792 | 4c5323d7945482d925a1a345ccb9d54c6517dd49 | refs/heads/master | 2022-02-16T17:34:17.448417 | 2022-01-04T23:44:51 | 2022-01-04T23:44:51 | 228,530,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,028 | py | from utils import *
from copy import deepcopy as dc
from collections import defaultdict as dd
inp = get_input(2020,17)
# lol
# truly hideous
# seems like everyone was thrown by his
# shifting indices in example
# spent a decent amount of time trying to debug against his examples
l_A = dd(str)
l_B = dd(str)
for i ... | [
"noreply@github.com"
] | sjshide.noreply@github.com |
4d6845e592d1f3488d99b7a800a98e65b252ade7 | 4e8cb93aa4fb941030319fae339c291a2aabffe2 | /wonderbits/WBNebulier.py | f2c79128ea99a5c55ba15596f35b6c69058f3481 | [
"MIT"
] | permissive | BigCircleLaw/wonderguy | 9e63cba6066bc826ad2aced99a63704e4b167775 | d78a100784c414b9c3945c301d07c4e1b04aab8f | refs/heads/master | 2020-06-20T03:37:36.432422 | 2020-04-28T03:03:13 | 2020-04-28T03:03:13 | 196,978,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 852 | py | from .WBits import WBits
from .event import Event
def _format_str_type(x):
if isinstance(x, str):
x = str(x).replace('"', '\\"')
x = "\"" + x + "\""
return x
class Nebulier(WBits):
def __init__(self, index = 1):
WBits.__init__(self)
self.index = index
def s... | [
"794557226@qq.com"
] | 794557226@qq.com |
245925707f4f6c6c98786d629ccf351760017361 | 80ae9b5cfb45b6e9cf7873ef7c46e17e117e4019 | /data/HackerRank-Python/Matrix Script.py | 114fa5ab8380753bbc2fe298d07e8f760aeb97f0 | [] | no_license | Ritvik19/CodeBook | ef7764d89b790e902ede5802f36d5ca910d8a50e | 2b4ed7938bbf156553d6ba5cba6216449528f0fc | refs/heads/master | 2021-07-04T08:25:52.478719 | 2020-08-08T06:54:14 | 2020-08-08T06:54:14 | 138,744,302 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | #!/bin/python3
import math
import os
import random
import re
import sys
n, m = map(int, input().rstrip().split())
matrix = []
for _ in range(n):
matrix_item = input()
matrix.append(matrix_item)
print(re.sub(r'(?<=[A-Za-z0-9])([^A-Za-z0-9]+)(?=[A-Za-z0-9])',' ',"".join("".join(decode) for decode in zip(*matri... | [
"rastogiritvik99@gmail.com"
] | rastogiritvik99@gmail.com |
796454219f8845841252c8af4719c448a62f6eeb | cab2340e8279179e9810e3a3abd024db5be78fec | /tvm/urls.py | 3dc8c8399b83995595755ed5d75e940ac452d8aa | [] | no_license | pankajanand26/fabric-tvm-frontend | 93f72a3f1240425546139b553ff8fc4bfe4833b6 | 2eb1e68fa3a85aa183a4b192c26884b7ef1ad0b2 | refs/heads/master | 2020-04-08T08:16:42.958667 | 2018-11-30T13:02:16 | 2018-11-30T13:02:16 | 159,172,910 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | """tvm URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | [
"rarunk16@ford.com"
] | rarunk16@ford.com |
ff8d2f7f813791d5786182273a3be57319e04640 | edc22de2bd6917e5fbc61bfba9e655b390c3c1c4 | /source/input_data_initialization.py | 972c86eff2522d58f0b7261af18596baa6648f09 | [] | no_license | cycbill/Local-Vol-Calibration | 0d35cc2de510ad80b1206e53e6350b86925cec86 | eeda77d760d2376afd0b5f747cb0c5465aaa6466 | refs/heads/master | 2020-08-26T22:16:44.519980 | 2019-12-11T04:13:51 | 2019-12-11T04:13:51 | 217,164,823 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,672 | py | import numpy as np
import xlwings as xw
from rate_curve_class import RateCurve
from strike_grid_discretization import StrikeGridsAllTenors
from tenor_market_data import TenorMarketData
from implied_vol_class import ImpliedVolatility
from compute_sum_sqr_vol_T import compute_sum_sqr_vol_T
from new_pillar_strike_extra... | [
"cuiyechang1991@gmail.com"
] | cuiyechang1991@gmail.com |
879419e98b0be90eff8d2a02105700d40f59e5d9 | 27033910ff8f2ad621866080d0e2cf62231fac6e | /banks_main.py | 12b1fb0c1d74edde427751e40a78b4fceef79ca0 | [] | no_license | johnurb/scrape_shadow_bank_websites | b0fef6fcc23cd19b99bb84cfb53937a56450b20f | b0800cfe2ce9376c9de3527666a11d313805362b | refs/heads/master | 2020-08-31T16:54:29.189776 | 2019-10-31T10:10:55 | 2019-10-31T10:10:55 | 218,737,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,292 | py | import os
import csv
import json
import re
import requests
from bs4 import BeautifulSoup
import csv
import tldextract
from time import sleep
import html2text
import browser_cookie3
import random
import signal
from contextlib import contextmanager
import io
from pdfminer.converter import TextConverter
from pdfminer.pdfi... | [
"urbine.5@buckeyemail.osu.edu"
] | urbine.5@buckeyemail.osu.edu |
ddef20ef25a9208e085f1a1eb4c35bc805874298 | 9a0eeaeaffdeeec9228851c763851772ea898741 | /examples/contextmanager.py | 3b715e43309fcce17776ad0fe7d27358c7690605 | [
"MIT"
] | permissive | Gr1N/aiodogstatsd | ff8ccfabb633d36b585f5a634af573c1bf7bfb50 | 4c363d795df04d1cc4c137307b7f91592224ed32 | refs/heads/master | 2021-12-22T08:41:15.105876 | 2021-12-12T21:48:00 | 2021-12-12T21:48:00 | 171,884,198 | 32 | 11 | MIT | 2021-12-12T21:31:30 | 2019-02-21T14:13:45 | Python | UTF-8 | Python | false | false | 392 | py | import asyncio
from random import random
import aiodogstatsd
async def main():
async with aiodogstatsd.Client(
host="0.0.0.0", port=9125, constant_tags={"whoami": "I am Batman!"}
) as client:
for _ in range(5000):
client.timing("fire", value=random())
if __name__ == "__main__":
... | [
"gr1n@protonmail.com"
] | gr1n@protonmail.com |
5084136ecc21efc516abb29d7cfe6c0acda3e829 | 27225cfbbc5e03a0ab48ea1457038b37d4d9fe37 | /app/core/config.py | aa7fd612a0429a367bb067996e910358d8dc2b88 | [] | no_license | CameronXie/python-api | 2d936d6da3849cff4bd5058caa060e85acb53e99 | 2ab8d71ccf7edadf4a74d4df9d22b8a75964655c | refs/heads/master | 2023-03-26T07:10:59.520959 | 2021-03-22T20:27:17 | 2021-03-22T20:27:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | from typing import List
from pydantic import BaseSettings
class Settings(BaseSettings):
API_VERSION: int = 1
ALLOWED_ORIGINS: List[str] = [
'*'
]
class Config:
case_sensitive = True
settings = Settings()
| [
"cameron@cameron.com"
] | cameron@cameron.com |
e4076d56d19e0b60f79ef0b63139cbc98873367c | e92d752737f3e90a47355d5502a364a9e2d0c08b | /tests/test_reverseproxy.py | c93c3521ab514877f5527c50f379fbd88223bb84 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | miri64/aiocoap | c7815758371f0a83c51b058fb0c24e8024feae9f | 93e699280b644465213fc8ba29bae556475fb6fc | refs/heads/master | 2023-08-15T16:46:27.985718 | 2021-10-05T17:15:00 | 2021-10-05T17:15:00 | 404,324,558 | 0 | 0 | NOASSERTION | 2021-09-08T11:39:12 | 2021-09-08T11:39:12 | null | UTF-8 | Python | false | false | 4,526 | py | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | [
"chrysn@fsfe.org"
] | chrysn@fsfe.org |
4ed9816040733bed4f0d0f33e93b66edd9fd06ed | 71b6495c16859d2d6c61b5f56c51fad53a23feb9 | /AppStore_logic/admin.py | ebc2e6d03b436eabf18327007a39b43d130cbaae | [] | no_license | didghwns0514/Learning_Django | 46368ac21f802886150691a6a636116da3fae529 | 8f731c7f885fe5e51e4970bdc7882e7825217723 | refs/heads/master | 2023-03-07T02:03:42.427154 | 2021-02-15T08:30:32 | 2021-02-15T08:30:32 | 338,614,736 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | from django.contrib import admin
# Register your models here.
from .models import AddOrder, RobotState
admin.site.register(AddOrder)
admin.site.register(RobotState)
| [
"uib58518@contiwan.com"
] | uib58518@contiwan.com |
fcc2088991a5e82f1fa12fd20e80de370702d0a6 | fd3eff76297b61f7045d4180115ff300e09b4208 | /01 神经网络与深度学习/02 编码与实战/01 Python Basic/02 broadcasting.py | 4ee743232e53b6a8adcbd41806ed07b47efbd132 | [] | no_license | xiangjl623/AI | c220b2c88a8fdcd4e371576ff20c2498cdef45ff | 0dc945b95fcf0658519a0e9292660efa6720f91d | refs/heads/master | 2020-03-29T06:20:15.613089 | 2018-11-01T06:44:54 | 2018-11-01T06:44:54 | 149,620,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | import numpy as np
A = np.array([[56.0, 0.0, 4.4, 68.0],
[1.2, 104.0, 52.0, 8.0],
[1.8, 135.0, 99.0, 0.9]])
print(A)
print(A.shape) #(3,4)三行四列
print(A[2])
#sum的参数axis=0表示求和运算按列执行
#axis用来指明将要进行的运算是沿着哪个轴执行,在
#numpy中,0轴是垂直的,也就是列,而1轴是水平的,也就是行。
cal = A.sum(axis=0)
print(cal)
#百分比
percent = 100*... | [
"xiangjl@glodon.com"
] | xiangjl@glodon.com |
f137566360c570f51a4657f4d857b543cb8dc0aa | 49a0241e7478fd860fdd57288c85184dd086f7e4 | /Visualisation/bullet_visualisation.py | b18d06eea6817e50066c71ef5911908b4ed28b74 | [] | no_license | Killjoyer/Battle-City | 4520e2634fd0e5cf2b610f75a27302af37430967 | a5347a3059148992d24f6d994911b06080acd0d2 | refs/heads/master | 2023-02-04T18:50:55.127693 | 2020-12-28T10:25:22 | 2020-12-28T10:25:22 | 247,949,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | from constants import Bullets, MovingWills
from tank import Bullet
from Visualisation.moving_entity_visualisation import MovingEntityVisualisation
class BulletVisualisation(MovingEntityVisualisation):
def __init__(self, father, bullet: Bullet):
bullet.speed = 8
super().__init__(father, bullet, Bul... | [
"saidelsam@ya.ru"
] | saidelsam@ya.ru |
144ef0cc0cda5eab5d3bbf7481c744754b6bdcb1 | 18a6ead35b3402323110fb83507f1ed386d3e5d5 | /ipynb_images/fig_gen.py | 3138a9f2c79d6f772c6ab9e12d0c0620d8ce547c | [
"MIT"
] | permissive | WhoIsJack/python-bioimage-analysis-tutorial | 9cd5badbc0a2b9573635b826cb9f4e2febe12dc4 | 1d2473994c0151d8b83f0385f007425ad4c7a055 | refs/heads/master | 2023-03-08T18:33:21.013828 | 2023-02-17T12:08:27 | 2023-02-17T12:08:27 | 104,102,696 | 72 | 34 | MIT | 2021-06-18T14:12:18 | 2017-09-19T16:56:54 | Jupyter Notebook | UTF-8 | Python | false | false | 4,846 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 01 00:30:59 2017
@author: Jonas Hartmann @ Gilmour group @ EMBL Heidelberg
@descript: Quick & dirty script to generate illustrations for the python image
analysis course's tutorial pipeline.
"""
# IMPORTS
import numpy as np
import scipy.ndimage as ndi
i... | [
"jonas.hartmann@embl.de"
] | jonas.hartmann@embl.de |
449248113ab98dd46f92d9e76576d832177aefbd | f9acfbff2744c014cd4adbc53d75316cacc00896 | /pycspr/api/get_node_peers.py | caff8d058e48be88cc650078538c0c1ab16f9b24 | [
"Apache-2.0"
] | permissive | Shr1ftyy/casper-python-sdk | 30fb3edc42551faef0b9bf10bf5a13ed8b5ac9f5 | 1c32ef89ef269f0307d530cfd635cfcbb3f29290 | refs/heads/main | 2023-07-27T17:17:40.054075 | 2021-07-29T09:58:12 | 2021-07-29T09:58:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | import jsonrpcclient as rpc_client
from pycspr.client import NodeConnectionInfo
# Method upon client to be invoked.
_API_ENDPOINT = "info_get_peers"
def execute(connection_info: NodeConnectionInfo) -> dict:
"""Returns node peers information.
:param connection_info: Information required to connect to a no... | [
"mark@casperlabs.io"
] | mark@casperlabs.io |
99e8a8fefb709cc55f68edfa97511059a68da167 | 6e0b0add44605c5864fef6ac62aec0567d80ebee | /src/models/trainer.py | adb8aaf25b4e4cc2c10f3f958329354be0a23d12 | [] | no_license | tomoyaf/YouyakuMan | 7ea160d1bde97f9c357bd752994dcb7b869f16dd | 9960829491b04a3ca7da48cb0fa869e07eb8564d | refs/heads/master | 2022-05-30T22:22:45.419082 | 2020-05-06T07:27:22 | 2020-05-06T07:27:22 | 259,449,354 | 0 | 0 | null | 2020-04-27T20:47:08 | 2020-04-27T20:47:08 | null | UTF-8 | Python | false | false | 4,367 | py | import os
import torch
from src.models.reporter import ReportMgr
from src.models.stats import Statistics
def build_trainer(args, model, optim):
gpu_rank = 0
print('gpu_rank %d' % gpu_rank)
report_manager = ReportMgr(args.report_every, start_time=-1)
trainer = Trainer(args, model, optim, report_mana... | [
"keitei_go@lscc.co.jp"
] | keitei_go@lscc.co.jp |
d0f53eed70c9349c2199a4b19053373dff0df022 | ef03753086b41d9afd528d33e4ee0f6ca56f7600 | /find-hackerrank/ans.py.3 | 7be8c8d8d1d2897ed41ac12c72b27ed2f99ffa91 | [] | no_license | chris-r-harwell/HackerRankRegex | 6c15f61d14541c0087a69d17c08ac842fb493653 | 72aaa5bafdbffd0c9c037ebddbc5d63b32ff1397 | refs/heads/master | 2021-01-23T09:47:34.652257 | 2017-09-06T11:44:11 | 2017-09-06T11:44:11 | 102,601,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | 3 | #!/bin/env python3
import re
if __name__ == '__main__':
"""
-1 if line neither starts nore ends with hackerrank
1 if line starts with hackerrank
2 if line ends with hackerrank
0 if line both starts and ends with hackerrank
"""
n = int(input())
for i in range(n):
s = str(in... | [
"chris-r-harwell@gmail.com"
] | chris-r-harwell@gmail.com |
149ec873645dfb5e8d20b0153a10ad6d72a42aca | 5f0308ac178902eed5147e8141904853aacb70a5 | /scripts/cli.py | e505800d883498cf7d04507268234068cddb3187 | [] | no_license | jfjlaros/pyvcf-cli | 39b9a3c1233cab535fce9174a44018d0faa80e8a | 92405685502eb5e4b1d3328b378b77a1cae9fe04 | refs/heads/master | 2021-01-25T12:31:13.072541 | 2014-08-29T10:00:39 | 2018-03-01T18:21:56 | 123,475,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,886 | py | #!/usr/bin/env python
"""
VCF manipulation toolkit.
Copyright (c) 2014 Leiden University Medical Center <humgen@lumc.nl>
Copyright (c) 2014 Jeroen F.J. Laros <J.F.J.Laros@lumc.nl>
Licensed under the MIT license, see the LICENSE file.
"""
from __future__ import division
import argparse
import itertools
import os
... | [
"J.F.J.Laros@lumc.nl"
] | J.F.J.Laros@lumc.nl |
dfe782ae44d0c826f1cf828ff12d497febd5767c | 7b1a4d3c3ccdbb95202f8f38babaae087165928c | /backend/home/management/commands/load_initial_data.py | 7f4e12075bdbcce12eaff178de5c46492cd6885a | [] | no_license | crowdbotics-apps/find-me-4086 | cf5d7e6c9c48a3c0fd3cad669008e17f9056329c | e715d40c825b325ac4bd09f267f1c0a66e0b6645 | refs/heads/master | 2023-01-10T13:25:12.442913 | 2019-05-31T22:46:36 | 2019-05-31T22:46:36 | 189,666,285 | 0 | 0 | null | 2023-01-03T23:14:40 | 2019-05-31T22:39:01 | Python | UTF-8 | Python | false | false | 717 | py |
from django.core.management import BaseCommand
from home.models import CustomText, HomePage
def load_initial_data():
homepage_body = """
<h1 class="display-4 text-center">Find me</h1>
<p class="lead">
This is the sample application created and deployed from the crowdbotics slack app.... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
70f0c42a9f45b0c0587d68145739c19c27479312 | 6efea391d0dd6087d8753057cff45867884fe5f1 | /google/cloud/logging_v2/proto/logging_pb2_grpc.py | e1759bbc1b990fe9d20bf576c1c5f12009895806 | [
"Apache-2.0"
] | permissive | tswast/python-logging | d9c4ae1ee87fb29436e2f16d9adac2a7a2d08378 | c4387b307f8f3502fb53ae1f7e1144f6284280a4 | refs/heads/master | 2022-12-30T19:50:14.840163 | 2020-08-12T20:28:40 | 2020-08-12T20:28:40 | 298,009,362 | 0 | 0 | Apache-2.0 | 2020-09-23T15:12:47 | 2020-09-23T15:12:46 | null | UTF-8 | Python | false | false | 6,922 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.logging_v2.proto import (
logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class LoggingServiceV2Stub(object... | [
"noreply@github.com"
] | tswast.noreply@github.com |
1c191670b95cd97eb7e9927c5966fe0fe092eed3 | c259bd9e4a570a1fa37949655530d778e5f5c46d | /mysite/.history/mysite/settings_20211014220254.py | edf1209e555479d4892a4fb712109c1d5b7bea7a | [] | no_license | ritikalohia/django-rest-students | 0cc56f435b7b2af881adfd7cace54eef98213c57 | ca5f9f466fcd74fef8ce91f019bcb6e7d83c8e20 | refs/heads/main | 2023-08-15T21:51:18.988691 | 2021-10-14T18:19:04 | 2021-10-14T18:19:04 | 417,219,011 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,239 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib ... | [
"rtklohia@gmail.com"
] | rtklohia@gmail.com |
f565c7f1049dafaeb6f59a5d1402e33d61f66f26 | cccf8da8d41ae2c14f5f4313c1edcf03a27956bb | /python/python2latex/writeLTXnonfrenchspacing.py | 500b80bebf55e18223970983e73099ddd5dc5c8a | [] | no_license | LucaDiStasio/transpilers | e8f8ac4d99be3b42a050148ca8fbc5d025b83290 | c55d4f5240083ffd512f76cd1d39cff1016909b8 | refs/heads/master | 2021-01-12T01:57:00.540331 | 2017-11-01T13:59:55 | 2017-11-01T13:59:55 | 78,448,378 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,438 | py | # Autogenerated with SMOP
from smop.core import *
#
@function
def writeLTXnonfrenchspacing(filepath=None,args=None,options=None,*args,**kwargs):
varargin = writeLTXnonfrenchspacing.varargin
nargin = writeLTXnonfrenchspacing.nargin
##
#================================================================... | [
"luca.distasio@gmail.com"
] | luca.distasio@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.