blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a87a8e5d278ede9d444df333d662804bf68b370 | fbd347498b4ec04440dd91da0f62d3bc8aa85bff | /ex.031.precoPassagemOnibus.py | a323c227e902c1c41edaa64acec1370c78d468cd | [
"MIT"
] | permissive | romulorm/cev-python | 254ae208b468aa4e23bf59838de389d045f7d8ef | b5c6844956c131a9e4e02355459c218739ebf8c5 | refs/heads/master | 2021-05-18T22:27:31.179430 | 2020-04-17T01:39:04 | 2020-04-17T01:39:04 | 251,455,084 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | # Exercício Python 031: Desenvolva um programa que pergunte a distância de uma viagem em Km. Calcule o preço da passagem,
# cobrando R$0,50 por Km para viagens de até 200Km e R$0,45 parta viagens mais longas.
distancia = float(input("Qual a distância da viagem, em quilômetros? "))
preco = distancia * 0.45 if distancia... | [
"62728349+romulorm@users.noreply.github.com"
] | 62728349+romulorm@users.noreply.github.com |
0d0379c91606561fd1684c3b56b5a59c7ac79ac6 | 2147b03faa984c3f82b452bfa2e44738762c0620 | /users/models.py | 0e5dba17c8ef60df08f56723c7b7cee4655f5822 | [] | no_license | crowdbotics-apps/pawn-shop-30678 | 44d485d1e4bf5540320518921750293c8649ea53 | 844572b9e385948fdfbe1c3113481bf0961e810e | refs/heads/master | 2023-07-30T16:02:19.844017 | 2021-09-19T11:07:57 | 2021-09-19T11:07:57 | 408,103,844 | 2 | 0 | null | 2021-10-06T00:15:01 | 2021-09-19T11:05:16 | Python | UTF-8 | Python | false | false | 890 | py | from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
class User(AbstractUser):
# WARNING!
"""
Some officially supported features of Crowdbotics Dashboard dep... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
9327c7c353f57edc531a78952f182e4b45b0c405 | a46e3ab5260c819e2b1a20343205b248a76314f3 | /pycharm_dict_str_split_unexpected.py | 9c4c8332fb5b3185d40c302f5e19bc170359ecf9 | [] | no_license | albertz/playground | 97ea882eb077e341c69f9e593918d38f89f8bc64 | f30c6330d855056f1756eeb558aa51fe72040c4e | refs/heads/master | 2023-08-16T16:33:01.780047 | 2023-07-31T11:46:58 | 2023-07-31T11:46:58 | 3,687,829 | 10 | 3 | null | null | null | null | UTF-8 | Python | false | false | 139 | py |
"""
https://youtrack.jetbrains.com/issue/PY-43916
"""
s = "a=b,c=d"
opts = dict([opt.split("=", 1) for opt in s.split(",")])
print(opts)
| [
"albzey@gmail.com"
] | albzey@gmail.com |
74dfd93a93cab894593cc99b17f0005ace2dc769 | 3e71f4d64b63e74a61447994a68f497f66c5e905 | /nnutil/model/adversarial_transformer.py | b216c878941bcd5cfa1c15722b704591dca182ec | [
"BSD-3-Clause"
] | permissive | aroig/nnutil | 40a648ec56214dbad8610ec8d9c1bdc642f136e9 | 88df41ee89f592a28c1661ee8837dd8e8ca42cf3 | refs/heads/master | 2020-03-25T18:58:01.708160 | 2019-06-18T22:00:54 | 2019-06-18T22:00:54 | 144,058,380 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,274 | py | import os
import numpy as np
import tensorflow as tf
import nnutil as nn
from .base_model import BaseModel
class AdversarialTransformer(BaseModel):
def __init__(self, name, shape):
super(AdversarialTransformer, self).__init__(name)
self._shape = shape
self._transformer = None
s... | [
"abdo.roig@gmail.com"
] | abdo.roig@gmail.com |
f55c8a4be2c1181299895c4fe33e44f6c2de40c5 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /ia95ckhN5ztgfJHe4_7.py | 3ba1f214826ddee32eec6ed44940399db61237ca | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,202 | py | """
In JavaScript, there are two types of comments:
1. Single-line comments start with `//`
2. Multi-line or inline comments start with `/*` and end with `*/`
The input will be a sequence of `//`, `/*` and `*/`. **Every`/*` must have a
`*/` that immediately follows it**. To add, there can be **no single-line
c... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
6f0da9774e428291d826ce32f0b2b035b3d95848 | adb6fe118613d60af9abfa73055599d205cf2108 | /视觉/XLwork/XL4/XL4_2.py | 5566d364d670d79d8f81b8ab2cda2c8a9d120eab | [] | no_license | lijianmin01/Third_college_grade | 18845f666a7fc1ece24d2ee45ee287e1efc0ca11 | 5e5b1f64375506de79ed94c8b2fc266fe1af4d6a | refs/heads/master | 2022-12-31T15:26:05.521297 | 2020-10-17T01:34:32 | 2020-10-17T01:34:32 | 295,317,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,738 | py | import cv2
import numpy as np
# 全局变量
# 第几张图片 0 第一张 1 第二张
img_flag = 0
# 第一张图片
def on_EVENT_LBUTTONDOWN1(event, x, y,flags, param):
# 点击三次,获得三个位置的坐标,销毁窗口
if event == cv2.EVENT_LBUTTONDOWN:
xy = "%d,%d" % (x, y)
a.append(x)
b.append(y)
cv2.circle(img1, (x, y), 1, ( 0, 0,255)... | [
"lijianmin01@126.com"
] | lijianmin01@126.com |
b741ff399ab76da7346243c4a6b8b998babe038f | b3f33d53507b09bc8193c5fc113fe2f28d95f6da | /empinfo/forms.py | 4e01d73915ed2eae414d2d03cf9e13da6356e549 | [] | no_license | Jayant2185/Django_Employee | f07beb3b3497a84c75ba43a623a7ebb7390b18b4 | ac3650670ddecd634b847bb39c3f0e9372b1bb4f | refs/heads/master | 2020-04-24T07:49:20.986569 | 2019-02-21T06:13:06 | 2019-02-21T06:13:06 | 171,810,493 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | from django import forms
from empinfo.models import Employee
class EmployeeForm(forms.ModelForm):
class Meta:
model = Employee
fields = "__all__" | [
"me@gmail.com"
] | me@gmail.com |
07f5f0febe13636216e15925edf3d44f1db27c2f | 2d80791a21a049243dd2bf7dd95a46c4d4b2510b | /domains/datastructures/linkedlist/CompareLists.py | c0436a2864f8f8fe985aca810532048acb762799 | [] | no_license | jayrav13/jr-hackerrank | 909346d101fdf08a54ff75ec2ee39c90e661b251 | b7e0130fdd1c2eb4436871be3255200eac8ca3d9 | refs/heads/master | 2021-01-15T15:36:16.772814 | 2016-11-21T18:59:15 | 2016-11-21T18:59:15 | 48,657,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 586 | py | """
Compare two linked list
head could be None as well for empty list
Node is defined as
return back the head of the linked list in the below method.
"""
class Node(object):
def __init__(self, data=None, next_node=None):
self.data = data
self.next = next_node
def CompareLists(headA, headB):
count = 0
whil... | [
"jayrav13@gmail.com"
] | jayrav13@gmail.com |
f875953eeb6bc655bf365406127b7e55f238a6e8 | d91fe0e972f2befab71987a732111b56245c5efc | /example_sm_pkg/nodes/subscriber_publisher_class_example.py | 9c626cf9b3902a827c6dde41ecd95bc0f3438280 | [] | no_license | karla3jo/robocup2014 | 2064e8102d5a3251ae582b7ed37ab80d0398f71c | 3d8563956fd1276b7e034402a9348dd5cb3dc165 | refs/heads/master | 2020-07-26T08:22:13.932741 | 2014-07-14T13:58:48 | 2014-07-14T13:58:48 | 21,850,936 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 22 12:00:00 2013
@author: sampfeiffer
"""
import roslib; roslib.load_manifest('example_sm_pkg')
import rospy
import sys
from std_msgs.msg import String
class myNode():
def __init__(self, argument_one):
# my class variables
sel... | [
"sammypfeiffer@gmail.com"
] | sammypfeiffer@gmail.com |
995e5340e3e9b0c8c5de25b5387d45937c15f28d | ac7e039a70ba627f6d9a7a02c9a8849ed5e18a89 | /unep.project-database/tags/0.5/reports/ProjectsByStaffReportFactory.py | 098ba274cf4516efa70e202f34be5109ec024408 | [] | no_license | jean/project-database | 65a2559844175350351ba87e820d25c3037b5fb2 | e818d322ec11d950f2770cd5324fbcd1acaa734d | refs/heads/master | 2021-01-01T06:27:24.528764 | 2014-01-31T11:11:45 | 2014-01-31T11:11:45 | 32,125,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 791 | py | from Report import Report
class ProjectsByStaffReportFactory(object):
def __init__(self, context, **kw):
self.context = context
self.params = kw
def getReport(self):
# create and fill the report
name = "Projects by Staff Report"
report = Report(name)
report.set... | [
"jurgen.blignaut@61ed036f-b72b-0410-9ea5-b9ec1d72d98d"
] | jurgen.blignaut@61ed036f-b72b-0410-9ea5-b9ec1d72d98d |
ea9d3ee3230d73f421fb22d2f59af8f113c81b91 | c1bd12405d244c5924a4b069286cd9baf2c63895 | /azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/load_balancing_rule_py3.py | 695a8e63e56403f3519346e6c5ce8aa055f7b53e | [
"MIT"
] | permissive | lmazuel/azure-sdk-for-python | 972708ad5902778004680b142874582a284a8a7c | b40e0e36cc00a82b7f8ca2fa599b1928240c98b5 | refs/heads/master | 2022-08-16T02:32:14.070707 | 2018-03-29T17:16:15 | 2018-03-29T17:16:15 | 21,287,134 | 1 | 3 | MIT | 2019-10-25T15:56:00 | 2014-06-27T19:40:56 | Python | UTF-8 | Python | false | false | 5,391 | 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 ... | [
"noreply@github.com"
] | lmazuel.noreply@github.com |
32299d75b478e539707e32ef50bd264407775fda | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02796/s396415723.py | 183a9157222ec19c1853c4eb1252eb8dcabd5ca6 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | rs = [(x - l, x + l) for x, l in (map(int, input().split()) for _ in range(int(input())))]
rs.sort(key=lambda x: x[1])
last = - 10 ** 9
ans = 0
for l, r in rs:
if last <= l:
ans += 1
last = r
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
122b76e57de2082a15a22ffe30f332ef29d31dd6 | 8245ecc361319340b5b196b76dc8cf1d5075c3b1 | /reservations/views.py | 6872d1de2dbff040b8a1412b6e1b63bdd5a01625 | [] | no_license | Korimse/airbnb_clone | bc267e384fc098f179387ba3153614c71f999edc | c20a82cb196ad9ad6b697cf874bca34b5461c87e | refs/heads/master | 2023-06-30T11:17:53.412006 | 2021-08-03T16:30:47 | 2021-08-03T16:30:47 | 391,269,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,313 | py | import datetime
from django.views.generic import View
from django.contrib import messages
from django.shortcuts import render, redirect, reverse
from django.http import Http404
from rooms import models as room_models
from reviews import forms as review_forms
from . import models
class CreateError(Exception):
pass... | [
"korimse@gmail.com"
] | korimse@gmail.com |
66af24b8e79c42a8dc7aa3ebdc1ace6b22534927 | f9e8733ed87858b12bfee6b70ccdddd6a616b60a | /73.py | 1b81f914bf328740233161f9aaa72772c4032d9f | [] | no_license | MajestyLee/leetcode_TopInterview | c1c9c923d3bf42cd4777bb2a2ccd21654a7c6dbb | 30b7d5acec716b7d754141835fc8bafe4411437e | refs/heads/master | 2020-04-01T12:19:20.837383 | 2018-11-06T02:13:44 | 2018-11-06T02:13:44 | 153,200,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,201 | py | '''
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
Example 1:
Input:
[
[1,1,1],
[1,0,1],
[1,1,1]
]
Output:
[
[1,0,1],
[0,0,0],
[1,0,1]
]
Example 2:
Input:
[
[0,1,2,0],
[3,4,5,2],
[1,3,1,5]
]
Output:
[
[0,0,0,0],
[0,4,5,0],
[0,3,1,0]
]
Follow up:
... | [
"binjie_lee@163.com"
] | binjie_lee@163.com |
b91382be96010e2e1aefacdcb707ef46b39f8400 | 3ca6302ebdc0e47d5d462435ad24a2886cfa5063 | /64.py | 5ce1111db6333ea60c31349788bb7a2df4797496 | [] | no_license | Sem31/PythonBasics | 3859276820d484025d6c3d8f9efaf131b8626da8 | d9bfd520b67056a3cbb747f7a4b71fe55871c082 | refs/heads/master | 2020-04-24T19:09:48.608293 | 2019-02-23T10:56:26 | 2019-02-23T10:56:26 | 172,203,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | #create csv file by this programs
import csv
with open("example1.csv",'w')as obj:
field = ["name","salary"]
writer = csv.DictWriter(obj, fieldnames=field)
writer.writeheader()
writer.writerow({'name':'bob','salary':10000})
writer.writerow({'name':'sem','salary':40000})
writer.writerow({'name... | [
"semprajapat31@gmail.com"
] | semprajapat31@gmail.com |
43171e67ff9e36899ce8b565c03eaac899555a02 | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /components/policy/tools/PRESUBMIT.py | 8d6bc1a9cc400f3e06219f8a9d4ecd123cddc991 | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | Python | false | false | 847 | py | # Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
def RunOtherPresubmit(function_name, input_api, output_api):
# Apply the PRESUBMIT for components/policy/resources to run the syntax check.
presubmit_pa... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
a6a6984813486278c4dc89f5e5201d922504d0eb | fcaa66bb55cb96342fc673e88363337fac95a184 | /MovieApp/migrations/0004_auto_20210610_1948.py | c749cbeeb8d6a5a28e0b123163bcbbfbf191e942 | [] | no_license | rushabhgediya38/MovieTicketBooking | 3f0ab4fbea6011c47968ae0d50a42d8bacf4ffdb | beeb59d671d96418c0959ed072f4ffcf517a1b0c | refs/heads/main | 2023-05-14T05:55:09.176174 | 2021-06-13T15:02:42 | 2021-06-13T15:02:42 | 375,613,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | # Generated by Django 3.2.4 on 2021-06-10 14:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('MovieApp', '0003_images'),
]
operations = [
migrations.CreateModel(
name='M_lang',
fields=[
('id', m... | [
"rushabhgediya38@gmail.com"
] | rushabhgediya38@gmail.com |
baf02ed9910963e5ed29164ba414f88415d59e00 | ae5bdb32f5ae61f422e537222601e0fe4f86739c | /py2app_tests/argv_app/setup.py | 432f60efe00ec2498ecebe46d1699b3bb23c06bb | [
"MIT",
"Python-2.0"
] | permissive | acclivity/py2app | beeefa84eaeaa40edfcbed25d4edb500ddd60a61 | a3dafb2c559dc9be78ebe1c44887820f9451806c | refs/heads/master | 2021-03-26T09:11:01.176301 | 2020-03-16T22:25:26 | 2020-03-16T22:25:26 | 247,691,716 | 0 | 0 | NOASSERTION | 2020-03-16T12:04:10 | 2020-03-16T12:04:09 | null | UTF-8 | Python | false | false | 148 | py | from setuptools import setup
setup(
name='BasicApp',
app=['main.py'],
options=dict(py2app=dict(
argv_emulation=True,
)),
)
| [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
d4dd8d3af20c272a50ffd0226634bd7465a6f2ee | 6ff12f51b9a1b9f751cec3df21813803d2455f1e | /tools/link_graph_generator.py | cf503594caed97072da3912f1fad3b5706416592 | [] | no_license | prdx/PoliteScrapper | 5d40089bb399c3d08fb848355b73cdc530c8327c | e84a49fa197e484361d2e69421b32fd4240c884c | refs/heads/master | 2020-03-23T18:36:21.340544 | 2018-08-01T21:48:14 | 2018-08-01T21:48:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,554 | py | from bs4 import BeautifulSoup
import os
import pickle
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith(".xml")]
outlinks = {}
inlinks = {}
def generate_outlink_file():
print("Generating outlinks file ...")
# Generate outlinks
for xml in files:
try:
with open(xml... | [
"astungkara.project@gmail.com"
] | astungkara.project@gmail.com |
1b00196825631a6f44decdbf3560208ff455bf28 | d354d2da2a6bd47aa0f545a0bf351e982882ea4c | /setup.py | 03aded87728f2e3159fcc416da43efee5d4887cd | [
"MIT"
] | permissive | acodebreaker/pywsd | 27dffb27a0961dbe5d09e71cc4f18e3dba10bfdf | ec8dd4bead6108e04250591d1732afcc9b0fb1bb | refs/heads/master | 2021-01-18T01:40:48.909216 | 2014-11-24T07:25:17 | 2014-11-24T07:25:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD)
#
# Copyright (C) 2014 alvations
# URL:
# For license information, see LICENSE.md
from distutils.core import setup
setup(
name='pywsd',
version='0.1',
packages=['pywsd',],
long_description='Python Implementations ... | [
"alvations@gmail.com"
] | alvations@gmail.com |
838027b05c4975fc5f55b86184077144347a1bad | 4f21e3301c1a8699745528177b3210b4f1a1f1d5 | /week10/project2/library/settings.py | 4dbdb1bf1faf2c3a9ac45fabe288d8e6aa05c0ca | [] | no_license | ndina/webdev2019 | 7fd0250b662b378d55e24e931f82d0b2538d63a5 | eae4808e2f0bfcdd5a366fd4692c041b96faaa0b | refs/heads/master | 2020-05-03T22:05:12.392913 | 2019-05-04T02:46:56 | 2019-05-04T02:46:56 | 167,550,783 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,688 | py | """
Django settings for library project.
Generated by 'django-admin startproject' using Django 1.8.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | [
"dbom12360@gmail.com"
] | dbom12360@gmail.com |
e3d781a3f7d2d498cb5c6001e32a838461a0daa6 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_054/ch2_2020_09_16_11_34_55_516156.py | cb769d528b4f741eaac3317840c0153eb23c362a | [] | 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 | 143 | py | # Está função é para calcular a velocidade média
def velocidade_media (d,t):
velocidade_media = d / t
return velocidade_média
| [
"you@example.com"
] | you@example.com |
c0e29612bc1ab99f21ed31d148930eda30c512c3 | 2a67dc681af4c4b9ef7a8e18c2ff75377dc5b44f | /aws.ses.EventDestination.sns-destination-python/__main__.py | d32f60d788281d4b38651670141a088b90714d15 | [] | no_license | ehubbard/templates-aws | e323b693a18234defe6bd56ffcc64095dc58e3a1 | 2ae2e7a5d05490078017fed6d132dcdde1f21c63 | refs/heads/master | 2022-11-17T13:53:14.531872 | 2020-07-10T21:56:27 | 2020-07-10T21:56:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | import pulumi
import pulumi_aws as aws
sns = aws.ses.EventDestination("sns",
configuration_set_name=aws_ses_configuration_set["example"]["name"],
enabled=True,
matching_types=[
"bounce",
"send",
],
sns_destination={
"topic_arn": aws_sns_topic["example"]["arn"],
})
| [
"jvp@justinvp.com"
] | jvp@justinvp.com |
aa103ea582f1fe1dccda82638cc5841b408a0c7a | 321b4ed83b6874eeb512027eaa0b17b0daf3c289 | /988/988.smallest-string-starting-from-leaf.233252752.Accepted.leetcode.py | 22432d1b1812c2fa9c180ef407130c342025bc17 | [] | no_license | huangyingw/submissions | 7a610613bdb03f1223cdec5f6ccc4391149ca618 | bfac1238ecef8b03e54842b852f6fec111abedfa | refs/heads/master | 2023-07-25T09:56:46.814504 | 2023-07-16T07:38:36 | 2023-07-16T07:38:36 | 143,352,065 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | class Solution(object):
def smallestFromLeaf(self, root):
self.result = "~"
def dfs(node, A):
if node:
A.append(chr(node.val + ord('a')))
if not node.left and not node.right:
self.result = min(self.result, "".join(reversed(A)))
... | [
"huangyingw@gmail.com"
] | huangyingw@gmail.com |
5cb9c51015c50cab850bea8216889f5c99c937d9 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2_neat/16_0_2_Jormungandr_Revenge_of_the_pancakes.py | d9925b4d479f3e794bba1c134eedd620908d2b23 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 1,096 | py | #!/usr/bin/env python
__author__ = 'Bill'
def check_pancakes(n):
"""(check_pancakes):
function to test for all face up
:param n: the pancakes string
"""
for ch in n:
if ch == '-':
return False
return True
def flip_pancakes(n):
"""(flip_pancakes... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
56749342e68294136dbbbacb342a3d9b2f01f30b | 18b3ad3b0e1f7f10969738251e1201d01dfbc6bf | /backup_files/samplepy/passbyvalue.py | 26689727f2944f32dee1688daef3ff1dc4632725 | [] | no_license | sahthi/backup2 | 11d509b980e731c73733b1399a8143780779e75a | 16bed38f0867fd7c766c2a008c8d43b0660f0cb0 | refs/heads/master | 2020-03-21T12:39:56.890129 | 2018-07-09T08:12:46 | 2018-07-09T08:12:46 | 138,565,151 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | def changeme(mylist):
mylist = [1,2,3,4 ]
print "values inside the function",mylist
return
mylist = [10,20,30]
changeme(mylist)
print"values outside the function ",mylist
| [
"siddamsetty.sahithi@votarytech.com"
] | siddamsetty.sahithi@votarytech.com |
057695d4910d814affa1cef49fbca93b9b520c88 | df690ac0484ff04cb63f71f528a9d0a0e557d6a3 | /.history/ws_20210608130810.py | 59216ed4c38672800e718b0909e4e451e853a45b | [] | no_license | khanhdk0000/Mqtt-Web-Socket | 437777c740c68d4197353e334f6fe6a629094afd | 4f9e49a3817baa9ebc4e4f8dcffc21b6ea9d0134 | refs/heads/master | 2023-06-20T17:08:09.447381 | 2021-06-08T17:42:37 | 2021-06-08T17:42:37 | 375,090,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,612 | py | from flask import Flask, jsonify, request
from flask_sock import Sock
import time
app = Flask(__name__)
sock = Sock(app)
import threading
BROKER = 'io.adafruit.com'
USER = 'khanhdk0000'
PASSWORD = 'aio_FfID10QWNVSKUC2j15nLtOSeckin'
TOPIC = 'khanhdk0000/feeds/'
LIGHT = 'light'
SOUND = 'sound'
TEMP = 'temp'
LCD = '... | [
"khanhtran28092000@gmail.com"
] | khanhtran28092000@gmail.com |
09f47ffa874febc1dd80bb23531d909ac281739b | 694c187c8a00bee8c670c1690170099bad9b16b3 | /hindex.py | edded2784cbd958ce569e1997c2a49c5589810d0 | [] | no_license | ajayvenkat10/Competitive | 301f220b6d296f7e34328f192c43c4d7ef208cb1 | 14f2ecebe10eb19f72cc412dd0c414b3b1de9b4d | refs/heads/master | 2022-11-20T14:31:33.590099 | 2020-07-23T15:39:14 | 2020-07-23T15:39:14 | 281,599,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | t = int(input())
for _ in range(t):
n = int(input())
arr = list(map(int, input().split()))
final = [1]
val = 2
for i in range(1,len(arr)):
count = 0
for j in range(i+1):
if(arr[j] >= val):
count += 1
if(count>=val):
final.append(val... | [
"37923623+ajayvenkat10@users.noreply.github.com"
] | 37923623+ajayvenkat10@users.noreply.github.com |
6452090ca100845c839848f14ac2d04f85352f4d | 934235f70a390a3ba0d7b464cddd10872f31cda3 | /rango/server/.history/tango_with_django/rango/admin_20210103130028.py | 361f6ca167ae05dc1771706293718383039c718e | [] | no_license | deji100/Projects | 6919041ba23e77a5c74e5ab7692bfcee38ececcb | 17e64d954d1d7805be57ec5d8d4344e4944889e6 | refs/heads/master | 2023-04-30T05:25:03.143303 | 2021-05-20T15:00:43 | 2021-05-20T15:00:43 | 338,844,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | from django.contrib import admin
from .models import Category, Page, User
# Register your models here.
class PageInline(admin.StackedInline):
list_display = ('title', 'category', 'url')
# fields = ('title', 'url', 'category')
model
class CategoryAdmin(admin.ModelAdmin):
list_display = ('name', ... | [
"68882568+deji100@users.noreply.github.com"
] | 68882568+deji100@users.noreply.github.com |
0ea09ec878674f42ce2fb633727af303b0ff9662 | 830398bc5ae951b153ff695a40be7239742bc73e | /exercises/parse_dhcp_snooping.py | 27114f9e94d30bcea5c6296a1383f9c2e461987f | [] | no_license | dmikos/pyneng | ff67f1d617a97d73103a7785a7bf86140e7baa82 | 543fb0d9fc63a2afee45d2465af3a4c3966e4a86 | refs/heads/master | 2021-01-25T14:56:44.181140 | 2018-04-23T04:31:00 | 2018-04-23T04:31:00 | 123,739,447 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | # -*- coding: utf-8 -*-
import re
#'00:09:BB:3D:D6:58 10.1.10.2 86250 dhcp-snooping 10 FastEthernet0/1'
regex = re.compile('(?P<mac>\S+) +(?P<ip>\S+) +\d+ +\S+ +(?P<vlan>\d+) +(?P<port>\S+)')
result = []
with open('dhcp_snooping.txt') as data:
for line in data:
match = regex.search(lin... | [
"dkostinov@gmail.com"
] | dkostinov@gmail.com |
8435baa0b8beaab331ff8904a8889f896a8d23c0 | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/services/services/third_party_app_analytics_link_service/transports/__init__.py | 502d5cf2169f355fb53779b340f3900e0e913770 | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 1,141 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
ce7050ab38a7683c7b476a80901ac6beac9d0799 | 4fbd844113ec9d8c526d5f186274b40ad5502aa3 | /algorithms/python3/maximize_distance_to_closest_person.py | 37e744aa546a7f515c70e1f156bc63f0f499ee8d | [] | no_license | capric8416/leetcode | 51f9bdc3fa26b010e8a1e8203a7e1bcd70ace9e1 | 503b2e303b10a455be9596c31975ee7973819a3c | refs/heads/master | 2022-07-16T21:41:07.492706 | 2020-04-22T06:18:16 | 2020-04-22T06:18:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,203 | py | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty.
There is at least one empty seat, and at least one person sitting.
Alex wants to sit in the seat such that the distance between him and the closest person to him... | [
"capric8416@gmail.com"
] | capric8416@gmail.com |
a4a27e3eb0c39273105293f96a89dc9b05e6f10a | b6a84594f8c29d968014faaddd49abeb7537a5fc | /python/1040.moving-stones-until-consecutive-ii.py | 799deed3b361b4636ffa827b1e859308649b708d | [] | no_license | nickyfoto/lc | 8a6af3df114e693e265d0ede03f4d4e1283e010e | 3633b4df3e24968057c7d684689b931c5a8032d3 | refs/heads/master | 2020-09-16T19:23:07.765917 | 2020-06-07T17:18:06 | 2020-06-07T17:18:06 | 223,866,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,913 | py | #
# @lc app=leetcode id=1040 lang=python3
#
# [1040] Moving Stones Until Consecutive II
#
# https://leetcode.com/problems/moving-stones-until-consecutive-ii/description/
#
# algorithms
# Medium (52.07%)
# Likes: 152
# Dislikes: 231
# Total Accepted: 4.5K
# Total Submissions: 8.7K
# Testcase Example: '[7,4,9]'
#
... | [
"nickyfoto@gmail.com"
] | nickyfoto@gmail.com |
9adf50d27141869fb0693ddeb11ca31431191545 | bd93fa910151c278be8249055bc084e5a5c35a6a | /Python/DjangoTest2/booktest/models.py | 3735ebb85498b072da8a92f26cec7a80e612790c | [] | no_license | ahojcn/practice-code | bd81595b80239cd2550183093566bd536a83ed3f | b65f4e76271479269463e92fd3fd41585c2ac792 | refs/heads/master | 2021-07-10T14:15:08.036592 | 2020-07-09T11:32:16 | 2020-07-09T11:32:16 | 153,059,349 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | from django.db import models
# Create your models here.
# 创建模型
class BookInfo(models.Model):
"""图书模型类"""
# 图书名
btitle = models.CharField(max_length=20)
# 出版日期
bpub_date = models.DateField()
def __str__(self):
return self.btitle
class HeroInfo(models.Model):
"""书中的英雄人物类"""
# ... | [
"hanoi_ahoj@icloud.com"
] | hanoi_ahoj@icloud.com |
564d81d0051cf261ea8cf3a8060afb2cc81c2406 | 718f4a6f53da14dbd79031928900a26c4de65ccb | /optimize_NMDA_KIN2.py | bf70c8a044f4ff48aa4d86895cd5e68a6e41e55f | [] | no_license | neurosutras/CA1Sim | ff37e5ae96cc00d923bbcf333d75842c34156b5b | 9a5796e5de9b9be477d61837c164fcbccbe3c8ce | refs/heads/master | 2023-04-08T01:39:09.559475 | 2022-01-13T20:20:45 | 2022-01-13T20:20:45 | 29,497,263 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 7,046 | py | __author__ = 'Aaron D. Milstein'
from specify_cells import *
from plot_results import *
import scipy.optimize as optimize
import random
"""
This simulation uses scipy.optimize to iterate through NMDA_KIN mechanism parameters to fit target EPSP kinetics.
"""
#morph_filename = 'EB1-early-bifurcation.swc'
morph_filename =... | [
"neurosutras@gmail.com"
] | neurosutras@gmail.com |
da748d34cb6a27059cecf0ee84bd84376e2809bf | d5ad13232e3f1ced55f6956bc4cbda87925c8085 | /cc_mcc_seq/SNVINDEL/tmp/3.1_tumor_minus_normal_exome_somatic_number/1_tumor_minus_normal_somatic.py | fb9fd44707bd9d72ef21d0edd8631473db5d86f3 | [] | no_license | arvin580/SIBS | c0ba9a8a41f59cb333517c286f7d80300b9501a2 | 0cc2378bf62359ec068336ea4de16d081d0f58a4 | refs/heads/master | 2021-01-23T21:57:35.658443 | 2015-04-09T23:11:34 | 2015-04-09T23:11:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,722 | py | def tumor_minus_normal_to_somatic(tumorFile,normalFile,oFile) :
dict_Normal=dict()
ouFile=open(oFile,'w')
inFile=open(normalFile)
for line in inFile :
line=line.strip()
fields=line.split('\t')
k='\t'.join(fields[1:-1])
dict_Normal[k]=1
inFile.close()
inFile=open(... | [
"sunhanice@gmail.com"
] | sunhanice@gmail.com |
d22b6020a2b3d2bfacf12fcb9cb93b0bc3d641d9 | a30362e51cb3291daf26d0c62e56c42caeec837f | /python/codeup/solved/_1068.py | 87813e822e0529ad4c300ab4f9c21997748b240f | [] | no_license | TERADA-DANTE/algorithm | 03bf52764c6fcdb93d7c8a0ed7a672834f488412 | 20bdfa1a5a6b9c378e588b17073e77a0126f7339 | refs/heads/master | 2023-04-14T21:40:11.250022 | 2023-04-12T13:00:37 | 2023-04-12T13:00:37 | 288,335,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | n = int(input())
if 90 <= n:
print('A')
elif 70 <= n:
print('B')
elif 40 <= n:
print('C')
elif 0 <= n:
print('D')
| [
"55175301+TERADA-DANTE@users.noreply.github.com"
] | 55175301+TERADA-DANTE@users.noreply.github.com |
b3faa68ddf38c6d15ad43fc82a48744cdae5c15b | 56f5b2ea36a2258b8ca21e2a3af9a5c7a9df3c6e | /CMGTools/H2TauTau/prod/25aug_corrMC/up/mc/DY2JetsToLL_M-50_TuneZ2Star_8TeV-madgraph/Summer12_DR53X-PU_S10_START53_V7C-v1/AODSIM/V5_B/PAT_CMG_V5_16_0_1377544840/HTT_24Jul_newTES_manzoni_Up_Jobs/Job_225/run_cfg.py | c1d2c055a93f6f5950d43132a49f5e864889fafd | [] | no_license | rmanzoni/HTT | 18e6b583f04c0a6ca10142d9da3dd4c850cddabc | a03b227073b2d4d8a2abe95367c014694588bf98 | refs/heads/master | 2016-09-06T05:55:52.602604 | 2014-02-20T16:35:34 | 2014-02-20T16:35:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | import FWCore.ParameterSet.Config as cms
import os,sys
sys.path.append('/afs/cern.ch/user/m/manzoni/summer13/CMGTools/CMSSW_5_3_9/src/CMGTools/H2TauTau/prod/25aug_corrMC/up/mc/DY2JetsToLL_M-50_TuneZ2Star_8TeV-madgraph/Summer12_DR53X-PU_S10_START53_V7C-v1/AODSIM/V5_B/PAT_CMG_V5_16_0_1377544840/HTT_24Jul_newTES_manzoni_... | [
"riccardo.manzoni@cern.ch"
] | riccardo.manzoni@cern.ch |
fc8f7fd662fe988e7f5f65c94869efdafc5af3eb | 7f0548b7191b7589712af19baebafddae1d0505f | /dojoassignments/python/django/full_stack_django/login_and_registration/apps/login_registration_app/migrations/0001_initial.py | 2e5994f927a8fa2ce9b4a5d96fd6c594f3453aa5 | [] | no_license | mtjhartley/codingdojo | dd8eab1bd61fb847e44766e89fe3db2340468102 | 65dc558d19adbe62f85ad61c32cb1c392b56567c | refs/heads/master | 2022-12-14T23:06:11.927445 | 2017-08-16T21:08:35 | 2017-08-16T21:08:35 | 92,218,728 | 1 | 5 | null | 2022-12-07T23:59:48 | 2017-05-23T20:46:03 | Python | UTF-8 | Python | false | false | 884 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-06-20 19:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
... | [
"mtjhartley@gmail.com"
] | mtjhartley@gmail.com |
1bc2bad1c8d403cdc99de557444a6e0a0f503eb2 | fe3759747f709a41e5ff3acf78872dd6b74f772a | /samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py | 81432c292c6459b54e18f5be8a654084c4f140d5 | [
"Apache-2.0"
] | permissive | Januson/openapi-generator | c50e3b52765e41adba9712d745918cea39dfa490 | 5b6b4c9d4829b57716741dc35b3f1033e5483784 | refs/heads/master | 2022-10-19T04:16:38.042495 | 2022-04-23T08:42:21 | 2022-04-23T08:42:21 | 238,659,737 | 0 | 0 | Apache-2.0 | 2023-09-05T01:01:23 | 2020-02-06T10:12:38 | Java | UTF-8 | Python | false | false | 2,359 | py | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | [
"noreply@github.com"
] | Januson.noreply@github.com |
fd96964145fbc06b436ee1ecbbf561c15f201c00 | caf192dbc1ca90fee18bb4ce170d37eb14870ec5 | /Chapter-5/7. Caesar cipher.py | f827a177676fc978c4d7d8bfee8324bfba34dc4a | [] | no_license | Dfredude/PythonZelle | 858b00f5eacce841173c64b3cecd978dedbeb145 | 1923fe84df604968eebc5269f23b7c0f167d55f0 | refs/heads/main | 2023-08-30T21:45:57.070344 | 2021-10-17T01:32:57 | 2021-10-17T01:32:57 | 359,041,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | def main():
#Get plaintext(p_text) and key(x) from the user
p_text = input("Enter the message you'd like encrypted.\n")
key = eval(input("What's the key? : "))
p_text = p_text.lower()
#Create string of letters
table = "abcdefghijklmnopqrstuvwxyz"
#Convert plaintext to ciphertext(c_text) using ci... | [
"dominguezlucio@outlook.com"
] | dominguezlucio@outlook.com |
80338f57e4494dc5fd84346bfab8cd6f883a4347 | b5dabe2e6da0e53498650b3c3f3f944c20f3e050 | /dolo/compiler/function_compiler_numexpr.py | e20ec37370ffaf43ad7e04c17d62a3028aaf64d8 | [
"BSD-2-Clause"
] | permissive | christophe-gouel/dolo | 12d582ecf3289aa9168f5d825da83a6284d5a669 | d9aef6d78d19899e2669e49ee6b7ad9aacf0e35d | refs/heads/master | 2020-12-24T09:31:19.389548 | 2018-01-04T20:42:19 | 2018-01-04T20:42:19 | 6,064,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | from __future__ import division
from dolo.symbolic.derivatives import DerivativesTree
from dolo.symbolic.symbolic import TSymbol
from dolo.compiler.function_compiler import compile_multiargument_function as compile_multiargument_function_regular
DerivativesTree.symbol_type = TSymbol
def compile_multiargument_functi... | [
"pablo.winant@gmail.com"
] | pablo.winant@gmail.com |
91dbf8f944594010b21f4e33cdd5c303b603daa0 | 50948d4cb10dcb1cc9bc0355918478fb2841322a | /azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/outbound_nat_rule.py | 509f9e9922798df037d6dab645f99d2111cc92f6 | [
"MIT"
] | permissive | xiafu-msft/azure-sdk-for-python | de9cd680b39962702b629a8e94726bb4ab261594 | 4d9560cfd519ee60667f3cc2f5295a58c18625db | refs/heads/master | 2023-08-12T20:36:24.284497 | 2019-05-22T00:55:16 | 2019-05-22T00:55:16 | 187,986,993 | 1 | 0 | MIT | 2020-10-02T01:17:02 | 2019-05-22T07:33:46 | Python | UTF-8 | Python | false | false | 2,886 | 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 ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
bedf0931ccef770750040887a803cdba60d8d515 | de1f9d660cfb738afdb66e4a2d63a4577c07d9c6 | /test/webapi/controllers/test_wmts.py | ad52d78c1aaca58531a54c0ef0ecba42c5079c04 | [
"MIT"
] | permissive | rabaneda/xcube | db47eb416db85df891a924063482a7943cae9d4f | 0d38ca513987184dbc4a37da1616e4076964d0f1 | refs/heads/master | 2020-11-24T00:11:17.107630 | 2020-02-11T10:11:34 | 2020-02-11T10:11:34 | 227,877,138 | 0 | 0 | MIT | 2019-12-13T16:14:51 | 2019-12-13T16:14:50 | null | UTF-8 | Python | false | false | 703 | py | import os
import unittest
from test.webapi.helpers import get_res_test_dir, new_test_service_context
from xcube.webapi.controllers.wmts import get_wmts_capabilities_xml
class WmtsControllerTest(unittest.TestCase):
def test_get_wmts_capabilities_xml(self):
self.maxDiff = None
with open(os.path.jo... | [
"norman.fomferra@gmail.com"
] | norman.fomferra@gmail.com |
a21dfa9182883f7045cd35880f722f3d9a36a0ab | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /tests/terraform/checks/resource/azure/test_SynapseWorkspaceEnablesDataExfilProtection.py | 2f0a8e8e46b503edb13ed42ed956bc6d6a70830a | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 1,453 | py | import unittest
from pathlib import Path
from checkov.runner_filter import RunnerFilter
from checkov.terraform.checks.resource.azure.SynapseWorkspaceEnablesDataExfilProtection import check
from checkov.terraform.runner import Runner
class TestSynapseWorkspaceEnablesDataExfilProtection(unittest.TestCase):
def tes... | [
"noreply@github.com"
] | bridgecrewio.noreply@github.com |
1ebd7b2c006bec2429d3ea7c144429ca6a16ab58 | 34599596e145555fde0d4264a1d222f951f49051 | /pcat2py/class/235864d6-5cc5-11e4-af55-00155d01fe08.py | 203705756d386be4768e626b13c813ce06acf1fd | [
"MIT"
] | permissive | phnomcobra/PCAT2PY | dc2fcbee142ce442e53da08476bfe4e68619346d | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | refs/heads/master | 2021-01-11T02:23:30.669168 | 2018-02-13T17:04:03 | 2018-02-13T17:04:03 | 70,970,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,212 | py | #!/usr/bin/python
################################################################################
# 235864d6-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | [
"phnomcobra@gmail.com"
] | phnomcobra@gmail.com |
d09e8f1f8f6ce69f17db42f0cc74904c1ba4e74e | e48375c39c0d1fc71742b1964dffdd3af0ff86c0 | /nlu/components/sentence_detectors/deep_sentence_detector/deep_sentence_detector.py | ab4ea95db84960ec483781f792af9daed7b121c3 | [
"Apache-2.0"
] | permissive | ahmedlone127/nlu | b8da5a84f0e47640cb09616559bf8b84c259f278 | 614bc2ff94c80a7ebc34a78720ef29a1bf7080e0 | refs/heads/master | 2023-02-09T05:10:29.631583 | 2022-05-20T15:16:33 | 2022-05-20T15:16:33 | 325,437,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | from sparknlp.annotator import *
class SentenceDetectorDeep:
@staticmethod
def get_default_model():
return SentenceDetectorDLModel\
.pretrained()\
.setInputCols(["document"]) \
.setOutputCol("sentence")
@staticmethod
def get_pretrained_model(name,lang, buck... | [
"christian.kasim.loan@gmail.com"
] | christian.kasim.loan@gmail.com |
70568dbd8fea74a804629bbf8c0ba8699ea10aaf | b0d7d91ccb7e388829abddb31b4aa04a2f9365cd | /archive-20200922/uncategorized/quick_palindrome_check.py | 4e1d9675666f0b9bddffa3ece524d351e0e26a37 | [] | no_license | clarkngo/python-projects | fe0e0aa02896debe82d1e9de84b1ae7d00932607 | 139a20063476f9847652b334a8495b7df1e80e27 | refs/heads/master | 2021-07-02T10:45:31.242041 | 2020-10-25T08:59:23 | 2020-10-25T08:59:23 | 188,570,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py |
# function which return reverse of a string
def reverse(s):
return s[::-1]
def isPalindrome(s):
# Calling reverse function
rev = reverse(s)
# Checking if both string are equal or not
if (s == rev):
return True
return False
# Driver code
s = "malayalam"
ans = isPalindrome(s)
if ans ... | [
"clarkngo@gmail.com"
] | clarkngo@gmail.com |
848b00dce8c68b93c85b751b4d5c57683f6980f1 | 2ed86a79d0fcd299ad4a01310954c5eddcf01edf | /homeassistant/components/airzone/coordinator.py | ba0296557a1be58bacea112719a507f82be0fb6b | [
"Apache-2.0"
] | permissive | konnected-io/home-assistant | 037f12c87bb79e19220192eb918e49db1b1a8b3e | 2e65b77b2b5c17919939481f327963abdfdc53f0 | refs/heads/dev | 2023-05-11T08:57:41.891518 | 2023-05-07T20:03:37 | 2023-05-07T20:03:37 | 109,931,626 | 24 | 10 | Apache-2.0 | 2023-02-22T06:24:01 | 2017-11-08T05:27:21 | Python | UTF-8 | Python | false | false | 1,309 | py | """The Airzone integration."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Any
from aioairzone.exceptions import AirzoneError
from aioairzone.localapi import AirzoneLocalApi
import async_timeout
from homeassistant.core import HomeAssistant
from homeassistant.he... | [
"noreply@github.com"
] | konnected-io.noreply@github.com |
3016c687ec5ae81b1cd9d16c05eb06f58500219f | 968968aa5e81043cad5af6883f23ef077c36b65f | /load_model.py | 87518857933f46b083d4611584a50ca9100d20e9 | [] | no_license | Guya-LTD/profanity-detector | 59dbcb2e3e2fe4eba29cd49f5f028c48413f035f | ba957c42c4d14dd3c68ef2c48fce317e9db17f8f | refs/heads/main | 2023-02-11T18:26:59.205036 | 2021-01-10T06:41:25 | 2021-01-10T06:41:25 | 307,553,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | import numpy as np
import joblib
def _get_profane_prob(prob):
return prob[1]
def predict(lang, texts):
vectorizer = joblib.load(lang + '/vectorizer.joblib')
model = joblib.load(lang + '/model.joblib')
return model.predict(vectorizer.transform(texts))
def predict_prob(lang, texts):
vectorizer = joblib.load(... | [
"simonbelete@gmail.com"
] | simonbelete@gmail.com |
e6ea4e632b0b731721851c7db5ec5498ae307b76 | 3cb06711ab1a6e379e5778456fce5770ac994ba9 | /python/wait_functions_test_py3.py | 02cab39f268b7e1880b29bbcbcffa372099fe449 | [
"MIT"
] | permissive | glenn-edgar/chain_flow | 7e8238c1f5e5c00f4c5906e2eb356d33c2b4696c | 750a9b126de04e46b71a58c5bd3e7500c4d26459 | refs/heads/master | 2021-01-02T22:41:30.066536 | 2017-09-05T19:34:57 | 2017-09-05T19:34:57 | 99,368,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,444 | py |
from py_cf_py3.chain_flow_py3 import CF_Base_Interpreter
def test_function_1( cf_handle, chainObj, parameters, event ):
print("test function 1 ",event)
def wait_test_function( cf_handle, chainObj, parameters, event ):
print("event",event)
return_value = False
if event["name"] == "INIT":
parameter... | [
"glenn-edgar@onyxengr.com"
] | glenn-edgar@onyxengr.com |
d82a7c81e00fa27c5ad59a4fc4811c1928d2518e | 63daf225819636397fda6ef7e52783331c27f295 | /taobao-sdk/top/api/rest/TmallProductSpecsGetRequest.py | b7150211c3b1b6c63e9ce9e9c0ee66bd56c5f336 | [] | no_license | cash2one/language-Python | e332ecfb4e9321a11407b29987ee64d44e552b15 | 8adb4f2fd2f023f9cc89b4edce1da5f71a3332ab | refs/heads/master | 2021-06-16T15:15:08.346420 | 2017-04-20T02:44:16 | 2017-04-20T02:44:16 | 112,173,361 | 1 | 0 | null | 2017-11-27T09:08:57 | 2017-11-27T09:08:57 | null | UTF-8 | Python | false | false | 356 | py | '''
Created by auto_sdk on 2014.02.28
'''
from top.api.base import RestApi
class TmallProductSpecsGetRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.cat_id = None
self.product_id = None
self.properties = None
def getapiname(self):
... | [
"a@ie9.org"
] | a@ie9.org |
ce502221c2081beadd2ed01aa5ddd02cf7cf7901 | 89a90707983bdd1ae253f7c59cd4b7543c9eda7e | /data_structures_and_algorithms_in_python/ch04/power_fast.py | c7f98d650facb9e5b5bb39c4db5cd09f1ee64c4c | [] | no_license | timothyshull/python_reference_code | 692a7c29608cadfd46a6cc409a000023e95b9458 | f3e2205dd070fd3210316f5f470d371950945028 | refs/heads/master | 2021-01-22T20:44:07.018811 | 2017-03-17T19:17:22 | 2017-03-17T19:17:22 | 85,346,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | def power(x, n):
if n == 0:
return 1
else:
partial = power(x, n // 2) # rely on truncated division
result = partial * partial
if n % 2 == 1: # if n odd, include extra factor of x
result *= x
return result
| [
"timothyshull@gmail.com"
] | timothyshull@gmail.com |
e8fb8b6c7a2c7ba04314e431ec618dd22761941e | 612325535126eaddebc230d8c27af095c8e5cc2f | /src/build/android/pylib/utils/device_dependencies.py | c448396fbc0ab0c74370a723afeb7c9fb47be053 | [
"BSD-3-Clause"
] | permissive | TrellixVulnTeam/proto-quic_1V94 | 1a3a03ac7a08a494b3d4e9857b24bb8f2c2cd673 | feee14d96ee95313f236e0f0e3ff7719246c84f7 | refs/heads/master | 2023-04-01T14:36:53.888576 | 2019-10-17T02:23:04 | 2019-10-17T02:23:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,315 | py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
from pylib import constants
_BLACKLIST = [
re.compile(r'.*OWNERS'), # Should never be included.
re.compile(r'.*\.crx'... | [
"2100639007@qq.com"
] | 2100639007@qq.com |
b1dea3c4983f09b3a6dc08bf597ea9ff4f8bd617 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2158/60876/250371.py | 2410110cab9dc4be3dd9ff187554b0e5447e6868 | [] | 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 | 537 | py | string=input()
index=0
while string[index]==' ':
index+=1
temp=""
if string[index]=='-':
temp+="-"
index+=1
while index<len(string) and string[index].isdigit():
temp+=string[index]
index+=1
if int(temp)<-2**(31):
print( -2**(31))
else:
print(temp)
elif not string[... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
4371051b460fbdb7f7e35435ddd12876a32f7a6e | 21b0b4c27193898207751c91b8b2ed168a1b1638 | /py/py_0198_ambiguous_numbers.py | ca312ac6f6f03c67908c6bd6ae8705a25e557c7b | [
"MIT"
] | permissive | lcsm29/project-euler | 67560a4e66968f1671a3d7ecf2dda6c956893dca | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | refs/heads/main | 2023-07-04T11:45:24.374841 | 2021-08-07T08:20:41 | 2021-08-07T08:20:41 | 371,808,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,130 | py | # Solution of;
# Project Euler Problem 198: Ambiguous Numbers
# https://projecteuler.net/problem=198
#
# A best approximation to a real number $x$ for the denominator bound $d$ is a
# rational number $\frac r s$ (in reduced form) with $s \le d$, so that any
# rational number $\frac p q$ which is closer to $x$ than $... | [
"lcsm29@outlook.com"
] | lcsm29@outlook.com |
cac2318a8b307ad741c58dda75e970b204bed67a | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_4/bgrtej001/piglatin.py | 8a3ae80180102da97b97c2eee4594a3e8512b2c3 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | #Tejasvin Bagirathi
#Assignment 4, Question 3
def toPigLatin(s):
wrdno = 1
new = ""
for i in range(len(s)):
if s[i] == " ":
wrdno+=1
string = s.split(" ")
for i in range(wrdno):
wrd = string[i]
#If word starts with vowel
if wrd[0] in "aeiou":
wrd =... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
9fb17ce7b6fb0a7b73112825f591381e23c30c80 | fe70774ff6898c5bdb0c941b4f335de576abfdb6 | /autotest/test_flopy_io.py | bb09cd2207661c1b0258d7feb56b3d6788f12990 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | robinthibaut/flopy | 35af468415d1ba6e1de119a7cb335381304fada9 | 22ef330bcfb9259fc23735d6b174d27804b624a0 | refs/heads/develop | 2023-06-30T21:43:24.101593 | 2023-06-13T19:46:03 | 2023-06-13T19:46:03 | 255,560,877 | 0 | 0 | BSD-3-Clause | 2022-10-10T12:23:38 | 2020-04-14T09:05:42 | null | UTF-8 | Python | false | false | 3,153 | py | import os
import platform
from os import getcwd
from os.path import relpath, splitdrive
from pathlib import Path
from shutil import which
import pytest
from modflow_devtools.markers import requires_exe
from modflow_devtools.misc import set_dir
from flopy.utils.flopy_io import line_parse, relpath_safe
def test_line_... | [
"noreply@github.com"
] | robinthibaut.noreply@github.com |
2676c8b70cc62e532379d2c46e363e54f2d94d14 | 97999ecca9e50972cc9e80df27d4768d83498dba | /credentials/migrations/0008_aboutme_resume.py | 0ca7767e117e9ddde7e97056617a2f2465605750 | [] | no_license | apatten001/portfolio | c79312d13f7a75f909e2d4d66ab6ef275b69543e | 4fdb503afccea83b849b62e3b12539e25a0b722f | refs/heads/master | 2020-04-25T05:45:20.946946 | 2019-03-07T16:53:00 | 2019-03-07T16:53:00 | 172,554,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | # Generated by Django 2.1.5 on 2019-02-27 19:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('credentials', '0007_auto_20190128_1630'),
]
operations = [
migrations.AddField(
model_name='aboutme',
name='resume',... | [
"apatten001@yahoo.com"
] | apatten001@yahoo.com |
bf87b37a2e04bb39ba5a09c86b581bd34be15a03 | cde373aef58da4226bfadee3d1a7086d22f33414 | /Matplotlib/20-AddingMoreIndicatorData.py | 6deebcb3c6cd32cf086b49db0aff5da22174f70c | [] | no_license | ravi4all/ML_WeekEnd_Feb | 6c66c6e6845062928834986980e5c229a19da6cd | 43891ff36cfcd557861b4eebb99c44c68d24954e | refs/heads/master | 2021-01-09T06:10:34.007131 | 2017-06-12T03:57:54 | 2017-06-12T03:57:54 | 80,917,805 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,150 | py | import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.ticker as mticker
from matplotlib.finance import candlestick_ohlc
from matplotlib import style
import numpy as np
import urllib
import datetime as dt
#style.use('ggplot')
style.use('fivethirtyeight')
MA1 = 10
MA2 = 30
... | [
"noreply@github.com"
] | ravi4all.noreply@github.com |
d3b5d2220dfd64a054fc44c58b941464e11c9a62 | bb2b6422476f5bd80171a31517465f9f62e15558 | /catkin_ws/build/scan_tools/laser_ortho_projector/catkin_generated/pkg.installspace.context.pc.py | a7beec3bd992862819cd8c913a124d3586a9795b | [] | no_license | Forrest-Z/MyKitAgv | ccd7b1c5fdb3a046bc5267d1827c4a08d89e74a4 | db9506ad8c8a9012fb49775e188932e28526337e | refs/heads/master | 2022-12-07T17:49:23.140713 | 2020-09-07T14:25:04 | 2020-09-07T14:25:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;nodelet;sensor_msgs;tf;pcl_ros;pcl_conversions;geometry_msgs;message_filters".replace(';', ' ')
PKG_C... | [
"nhamtung125@gmail.com"
] | nhamtung125@gmail.com |
34c9d63c64f37b6a17a2adfae7b3bb9d3677a416 | 0130c8b14927097663157846adc4b146d67d2fda | /tests/common/test_run/softplus_run.py | 72090ba2620e11675993ae68cec770d88f6b7703 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-3-Clause",
"NCSA",
"LLVM-exception",
"Zlib",
"BSD-2-Clause",
"MIT"
] | permissive | Shigangli/akg | e8be3e0ee1eafe3e42b4cc4d424c28f08ef4c0bc | 3766c54e0b109541932d147a6b5643a334b82403 | refs/heads/master | 2023-09-06T05:13:40.571583 | 2021-11-23T03:44:54 | 2021-11-23T03:44:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,615 | py | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"1027252281@qq.com"
] | 1027252281@qq.com |
43a0cab3c9c839ec46266c935ecdf82958e35ef6 | ba3c06f9ae89479fa4987fe841ac09b5b5d71383 | /python_for_kids/book/Projects/monster6.py | a10a99ac4030b0d5d0cfab3769dc4e6741f8afab | [] | no_license | mary-tano/python-programming | 6d806e25011e770a04a0922d0b71bf38c222d026 | 829654a3274be939fa529ed94ea568c12f7f1a27 | refs/heads/master | 2021-05-17T15:30:32.710838 | 2020-04-01T13:37:18 | 2020-04-01T13:37:18 | 250,846,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | # Лаборатория Франкенштейна
from monsterlab import *
# Основная программа
Frank = Monster("Фрэнки", "необычный")
Frank.show()
Albert = GMonster("Альберт", "задумчивый")
Albert.show()
Sigmund = SMonster("Зигмунд", "веселый")
Sigmund.show()
| [
"masha.mary.tano@gmail.com"
] | masha.mary.tano@gmail.com |
db668ec99a3e918fab75689d177f3b571a030a86 | 8ef5a09d76a11c56963f18e6a08474a1a8bafe3c | /leet_code/7. Reverse Integer.py | 79b791271388c6874618159d647c255bde2e2e06 | [] | no_license | roiei/algo | 32c4677649c7666db148f6183fbfbf66c8b1969f | ae8bb8bf4ae4026ccaf1dce323b4098547dd35ec | refs/heads/master | 2022-04-01T19:21:27.768675 | 2022-02-19T06:15:29 | 2022-02-19T06:15:29 | 169,021,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py |
class Solution:
def reverse(self, x: 'int') -> 'int':
if x > float('inf') or x < float('-inf'):
return 0
sign = 1
if x < 0:
sign = -1
xstr = str(x)
if -1 == sign:
xstr = xstr[1:]
xstr = xstr[::-1]
skip_cnt = 0
... | [
"hyoukjea.son@hyundai.com"
] | hyoukjea.son@hyundai.com |
1d49c638c84d9cfa20e25fd85489966f882c7123 | bfda3af75d94767a5cb265bd68c17cfbf94e3ee1 | /rosalind/qrt/rosalind_qrtd_tung.py | c6d0de60e3be4d40377362c4f3b26bdba3ad70ce | [] | no_license | orenlivne/euler | d0e5b956a46eacfe423fbd6c52918beb91eea140 | 2afdd8bccdc5789c233e955b1ca626cea618eb9b | refs/heads/master | 2020-12-29T02:24:36.479708 | 2016-12-15T21:27:33 | 2016-12-15T21:27:33 | 20,263,482 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,129 | py | '''
============================================================
http://rosalind.info/problems/qrtd
Given: A list containing n taxa (n<=2000) and two unrooted
binary trees T1 and T2 on the given taxa. Both T1 and T2 are
given in Newick format.
Return: The quartet distance dq(T1,T2).
==================================... | [
"oren.livne@gmail.com"
] | oren.livne@gmail.com |
710bcc0fb5dcc70b3aacdae1595043478681cdb2 | 02560440f9f91e583fe98d80ab11e18aa6c7a525 | /apps/usuarios/migrations/0003_usuario_correo.py | ad084ca9dc73a72604d08e401a8af1a08f618f45 | [] | no_license | eduardogpg/wamadeusV1 | a36c89176543e638486009620c5131f46743edbc | 82d93293dc6afc95a6661f727162f4055ab83a43 | refs/heads/master | 2020-12-28T01:57:47.831689 | 2015-01-08T05:14:25 | 2015-01-08T05:14:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('usuarios', '0002_auto_20141215_1710'),
]
operations = [
migrations.AddField(
model_name='usuario',
n... | [
"eduardo78d@gmail.com"
] | eduardo78d@gmail.com |
48067e4ceef655c896f3a35b0571079df7c10a52 | 97a4d29863d1ce96f366554fdd985c3ce580bb5d | /061.py | f14890c43a1e22228adf9d4732a5d4ba2c6c44f6 | [] | no_license | Everfighting/Python-Algorithms | 5c3a102fed3a29858f3112d657c69e077efc7e28 | 235e9b4c66602035be39a8d3b3ad9cf016aebbb9 | refs/heads/master | 2021-01-20T22:19:18.902687 | 2018-03-02T05:38:27 | 2018-03-02T05:38:27 | 61,302,323 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
a = []
for i in range(10):
a.append([]) #创建十行
for j in range(10):
a[i].append(0) #每行创建i列
# 杨辉三角边界都为1
for i in range(10):
a[i][0] = 1
a[i][i] = 1
# 杨辉三角定义,下一行数值为上一行数与上一行前面数之和(除边界)
f... | [
"cbb903601682@163.com"
] | cbb903601682@163.com |
e1bf319ac4b1a93b08f0dafc5fd453b9cd95d5b1 | 4e44974b9e59dfd4324d84b12b10f008117814cd | /test_autofit/integration/src/dataset/dataset.py | c3dc9773c00b8b4cc97f43fc249734b1546be650 | [
"MIT"
] | permissive | PriyatamNayak/PyAutoFit | 2cc2608943f8c3bdbda3b268142e7307014ccaf2 | 32c0c30acd219030c86a12db82ae54e406fd7119 | refs/heads/master | 2023-03-04T07:27:41.547966 | 2021-02-11T23:21:00 | 2021-02-11T23:21:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,487 | py | from astropy.io import fits
import numpy as np
# The 'dataset.py' module has been extended to give the dataset a name and metadata.
class Dataset:
def __init__(self, data, noise_map, name=None):
"""A class containing the data and noise-map of a 1D line dataset.
Parameters
----... | [
"james.w.nightingale@durham.ac.uk"
] | james.w.nightingale@durham.ac.uk |
3a59b6324f48032a8c58f34957ffbed79c1fcb08 | 72f2f37c3c33e5bc02ec6c707a7c858d7990db3a | /examples/tour_examples/driverjs_maps_tour.py | 33fb342608c1c2cd08a48da9c5a1aab3f8ac71a0 | [
"MIT"
] | permissive | matthewxuda/SeleniumBase | 190e4917dec8c731f17fd9d6a1247f8c17086d0c | efd282a860206dad81d0d4e61a472138eb04328d | refs/heads/master | 2023-09-01T09:17:57.608760 | 2021-10-21T02:48:32 | 2021-10-21T02:48:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,129 | py | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_create_tour(self):
self.open("https://www.google.com/maps/@42.3591234,-71.0915634,15z")
self.wait_for_element("#searchboxinput", timeout=20)
self.wait_for_element("#minimap", timeout=20)
self.wait_for_element("... | [
"mdmintz@gmail.com"
] | mdmintz@gmail.com |
edc117b558873902ee1d38b226f7af11cebc80c9 | 58df99d96af6a688852993e38da89b75fea1d0dc | /exps/NATS-Bench/draw-correlations.py | 6afac3b804703bc53660e618d2c2a6e820974d3e | [
"MIT"
] | permissive | yuezhixiong/AutoDL-Projects | 0f24ed98389b70f452a79c8ef825d5e563ac5d8c | 0d3c63bdbe2d648c2119ffe8d0491f8a07cf85cb | refs/heads/master | 2023-03-22T17:15:37.013837 | 2021-03-02T05:13:51 | 2021-03-02T05:13:51 | 315,518,182 | 0 | 1 | MIT | 2021-02-26T06:36:34 | 2020-11-24T04:28:29 | Python | UTF-8 | Python | false | false | 3,860 | py | ###############################################################
# NATS-Bench (arxiv.org/pdf/2009.00437.pdf), IEEE TPAMI 2021 #
###############################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020.06 #
###############################################################
... | [
"280835372@qq.com"
] | 280835372@qq.com |
becb97ab51bd113a00a2a0c169559e348ee0f82c | a46b14b44c87adb0288224a0e7e31d9bed30223f | /guest_project/apps/guest_app/models.py | f6db55f42203f80a0a458a0b4a83ca4f50478693 | [] | no_license | JeffLawrence1/Python-Django-Intermediate | 0b663e5d706dc6b35ff2785ae38d7bf0f2f3b651 | d1efc3e6385286ab25bae36042987a85ae94e359 | refs/heads/master | 2020-03-09T03:42:47.348420 | 2018-04-07T21:42:04 | 2018-04-07T21:42:04 | 128,570,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
# Create your models here.
class User(models.Model):
name = models.CharField(max_length=255) | [
"jefflaw13@hotmail.com"
] | jefflaw13@hotmail.com |
592cca932c6d29898437e2362af88c8d578e9466 | a735cc0b04b3227720bfd97c74ef13bda5bdf571 | /python/documentation/doc/conf.py | 87be3541d59a67e9c9cc135f03e7e0690fa181a4 | [
"MIT"
] | permissive | abstractfactory/labs | beed0aab27cd3028c67ece87ef91d18b55114eb1 | f0791fb92686456d4cef3a11f699590a949fd6a9 | refs/heads/master | 2021-01-23T20:50:07.613682 | 2014-11-18T10:30:29 | 2014-11-18T10:30:29 | 20,175,862 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 8,179 | py | # -*- coding: utf-8 -*-
#
# Labs documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 24 15:49:19 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | [
"konstruktion@gmail.com"
] | konstruktion@gmail.com |
5242f6f122ece46875d63baf451df2044a5956d8 | ce083128fa87ca86c65059893aa8882d088461f5 | /python/pytest-labs/.venv/lib/python3.6/site-packages/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py | d0005352b87cf20f8700d3c56dda97efc9a99ee6 | [] | no_license | marcosptf/fedora | 581a446e7f81d8ae9a260eafb92814bc486ee077 | 359db63ff1fa79696b7bc803bcfa0042bff8ab44 | refs/heads/master | 2023-04-06T14:53:40.378260 | 2023-03-26T00:47:52 | 2023-03-26T00:47:52 | 26,059,824 | 6 | 5 | null | 2022-12-08T00:43:21 | 2014-11-01T18:48:56 | null | UTF-8 | Python | false | false | 1,973 | py | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | [
"marcosptf@yahoo.com.br"
] | marcosptf@yahoo.com.br |
254e98217498dea904c67279827063013f34b5fb | e6421de3f06af8be4234e9901d71f86b31c6c3a7 | /pdenv/bin/easy_install-3.5 | 5e6b880f3fb8150f6afd21b014f591583dfa7719 | [
"MIT"
] | permissive | Elmartin913/PanDjango | bdb5446ee18ee297c23199cd3f9dd59cae555135 | 3b1eb52d53c87365f3d2fa5bd7ef72843ed5af32 | refs/heads/master | 2022-12-11T04:44:05.229530 | 2018-05-11T10:16:07 | 2018-05-11T10:16:07 | 128,903,323 | 0 | 0 | MIT | 2022-12-08T00:57:53 | 2018-04-10T08:54:10 | CSS | UTF-8 | Python | false | false | 276 | 5 | #!/home/elmartin913/workspace/app/PanDjango/pdenv/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"marcin.jab@wp.pl"
] | marcin.jab@wp.pl |
e57aebb6fb7ca69bcb5a28998f4b3016e5559651 | 47366be5cbee9d7e086291c20f97f10ab2bf74fe | /cluster/cluster_create_inequalities_subset_kdd.py | a030a3765bc70ab81a1b6e0dfd314582797a9901 | [] | no_license | nipunbatra/journal | 3d44eed05c95970606649d17402da54fc0a415ff | 94a8b88589e8f60e6f0314f8c5a374f22336b3e9 | refs/heads/master | 2021-01-09T20:40:45.844121 | 2016-07-27T15:16:29 | 2016-07-27T15:16:29 | 62,874,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,042 | py | import time
import pandas as pd
import pickle
import os
import numpy as np
SLURM_OUT = "../slurm_out"
from subprocess import Popen
import time
print "a"
out_overall = pickle.load(open('../data/input/all_regions.pkl','r'))
num_trials=25
print "b"
K = 3
for train_region in ["SanDiego"]:
if train_region=="Austin... | [
"nipunb@iiitd.ac.in"
] | nipunb@iiitd.ac.in |
05f02000e82ea0aa84a9665a9401fad1feec02b2 | 03587c34370995706871e45320264c2636d795f0 | /app/views/loja/AvaliacaoView.py | a391584f99994610a29e9c4c605cadf597837918 | [] | no_license | caiomarinhodev/fastdelivery | 29d1f95dc7204369806e6b99298c9aaafab5ea9f | 6ad45aa596e204b793ba47f7a0c1b918a2e0890a | refs/heads/master | 2020-03-12T03:18:04.507010 | 2018-04-20T23:49:13 | 2018-04-20T23:49:13 | 130,421,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,139 | py | from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect
from django.views.generic import DetailView
from app.models import Request, Avaliacao
class AvaliacaoView(LoginRequiredMixin, DetailView):
template_name = 'loja/avaliacao_cliente.ht... | [
"caiomarinho8@gmail.com"
] | caiomarinho8@gmail.com |
368438d6bd6eb2e764a63f7c2983f6a8380944e8 | 80775c192c7084171a0371b0fe14330b8cd89f0f | /stickerizer/emojis.py | 7070fbc525378011ade618d9b44d039bdcc88f9a | [
"MIT"
] | permissive | vanyakosmos/face2sticker | 5435ddbbc123c782a6501a78f6142e1ce88f9bc7 | 7b82eb12dd3e4c54c5033caee77f57b751f637b8 | refs/heads/master | 2021-09-13T07:40:51.156215 | 2018-04-26T17:16:24 | 2018-04-26T17:16:24 | 105,321,918 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,318 | py | import numpy as np
from emotion_clf.emotion import load_clf, vectorize, emotions
clf = load_clf('emotion_clf/clf2.pkl')
def associate_emojis(face_landmarks):
emotions_probs = predict_probabilities(face_landmarks)
emoji = map_emoji(emotions_probs)
return emoji
def predict_probabilities(face_landmarks:... | [
"bachynin.i@gmail.com"
] | bachynin.i@gmail.com |
8f7d2e670202fe46834fd31c9e7eaf218bed9b04 | ca3d6e6683f4736792fc93352424c6e6d216ab4d | /chapter9/chapter9_app_external_api_test.py | ccdbb3f2d629abb50083ae1be6495e4b66566be2 | [
"MIT"
] | permissive | msg4rajesh/Building-Data-Science-Applications-with-FastAPI | 11ac071583002b15bc955fc3bc72ab86d2800222 | 99b472d8295a57c5a74a63d8184ac053dc4012f2 | refs/heads/main | 2023-07-16T09:48:48.536002 | 2021-08-26T05:02:39 | 2021-08-26T05:02:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,297 | py | import asyncio
from typing import Any, Dict
import httpx
import pytest
from asgi_lifespan import LifespanManager
from fastapi import status
from chapter9.chapter9_app_external_api import app, external_api
class MockExternalAPI:
mock_data = {
"data": [
{
"employee_age": 61,
... | [
"fvoron@gmail.com"
] | fvoron@gmail.com |
ff7e5353de2674b363d6503c65205bd258975026 | dfff7fef4d49266db475856d4c0afef8ca672e00 | /tests/cantfit.py | 54f692c8b57158768e4561a4098cae020b3eafbe | [
"MIT"
] | permissive | funilrys/black | 70a5a251338ab67fed0771ab6ec97cca03aa378b | b4cee97c99d5513ef81fdf2bff1809721662f87d | refs/heads/master | 2020-03-17T14:41:13.259870 | 2018-05-16T05:15:28 | 2018-05-16T05:15:28 | 133,682,656 | 1 | 0 | null | 2018-05-16T14:57:35 | 2018-05-16T14:57:35 | null | UTF-8 | Python | false | false | 2,983 | py | # long variable name
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 0
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = 1 # with a comment
this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use_one_like_it = [
1, 2, 3... | [
"lukasz@langa.pl"
] | lukasz@langa.pl |
6ec673beb0c506a5c90bb8c68908c0c73c13587c | 3a74ac2e7db63069945e5bc620342b4b89b8b201 | /python/dgl/distributed/rpc_server.py | ad47de7104c4d92fc64b87b7cdc82f26fefd6a38 | [
"Apache-2.0"
] | permissive | vishalbelsare/dgl | 5d17ba82f720d742e1274c5d48dac64eca234504 | 512a80b00d2cd35607a542eb5544fa1f1c93a6f6 | refs/heads/master | 2023-08-17T15:09:55.082014 | 2022-01-22T04:25:14 | 2022-01-22T04:25:14 | 167,955,673 | 0 | 0 | Apache-2.0 | 2022-01-23T13:57:57 | 2019-01-28T12:05:37 | Python | UTF-8 | Python | false | false | 4,476 | py | """Functions used by server."""
import time
from . import rpc
from .constants import MAX_QUEUE_SIZE
def start_server(server_id, ip_config, num_servers, num_clients, server_state, \
max_queue_size=MAX_QUEUE_SIZE, net_type='socket'):
"""Start DGL server, which will be shared with all the rpc services.
This... | [
"noreply@github.com"
] | vishalbelsare.noreply@github.com |
f2ed1999ab2fe5b10597c440649a3b93645b82d3 | c1e305171afcd18fdd66a46cbcf81d8dbcc3fd0c | /PyTorch/Py09_dropout.py | 447dd6e594089cf2812c287b60aa6a968b1ae24c | [] | no_license | ANRhine/PyTorch_Tutorial | 2f0d9fcc94dfec37a352b5dcb37fc66738abc37d | 378d03d2f2cfa08ff2040096218078a2e3cd659a | refs/heads/master | 2021-04-07T06:24:28.608860 | 2018-03-16T14:43:03 | 2018-03-16T14:43:03 | 125,291,327 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,116 | py | #! /usr/bin/env python
# -*- coding:utf-8 -*-
"""
-------------------------------------
File name: Py09_dropout.py
Author: Ruonan Yu
Date: 18-1-30
-------------------------------------
"""
import torch
import matplotlib.pyplot as plt
from torch.autograd import Variable
import torch.nn as nn
t... | [
"you@example.com"
] | you@example.com |
c44a67a3eaabc76d6e5635f62a79a69aa80faa77 | e5a511e346f5be8a82fe9cb2edf457aa7e82859c | /PythonNEW/Practice/StringRemoveExistingIdentitaion.py | f66992651f064d1098bc0a3e95b04ea1ee0ff896 | [] | no_license | nekapoor7/Python-and-Django | 8397561c78e599abc8755887cbed39ebef8d27dc | 8fa4d15f4fa964634ad6a89bd4d8588aa045e24f | refs/heads/master | 2022-10-10T20:23:02.673600 | 2020-06-11T09:06:42 | 2020-06-11T09:06:42 | 257,163,996 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | """ Write a Python program to remove existing indentation from all of the lines in a given text."""
import textwrap
sample_text = '''
Python is a widely used high-level, general-purpose, interpreted,
dynamic programming language. Its design philosophy emphasizes
code readability, and its syntax allows prog... | [
"neha.kapoor070789@gmail.com"
] | neha.kapoor070789@gmail.com |
9393d21961b0043d35b932fd166c21ca22c72e0c | e456cdf76c1419413931d218317d44ea4b7c3fb7 | /demo/django/pokedex/admin.py | fd91861f03cd25790e7dec41cc349aba98f35f27 | [
"MIT"
] | permissive | Nekmo/angular-django | cbbd8bb0c6baeea6e788c5623fb98102b443f1e9 | 0464747806ce4e79571d3a72db0f04e15f0c6e5e | refs/heads/master | 2023-08-27T16:03:10.006482 | 2021-11-08T23:15:14 | 2021-11-08T23:15:14 | 298,419,330 | 14 | 6 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | from django.contrib import admin
# Register your models here.
from pokedex.models import Specie
@admin.register(Specie)
class SpecieAdmin(admin.ModelAdmin):
pass
| [
"contacto@nekmo.com"
] | contacto@nekmo.com |
cc175ac74f032d57d8641a106ebead8e8f7f8a10 | 7c9707f0f1cb8e633ac605934f3dbd8036790868 | /projet/rpi_manager/migrations/0002_ph.py | 71da2a49b682367bb47761ea2e6341addf2a5fc5 | [] | no_license | ometeore/hydropo | 891e1abd4c1b8ccd0a3b27a043abf894b70ceb5b | 324076d4b7ddbd14e718c424eb24d129c2a2243c | refs/heads/master | 2023-06-14T08:35:55.838469 | 2021-07-04T16:28:09 | 2021-07-04T16:28:09 | 290,198,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 991 | py | # Generated by Django 3.1 on 2020-08-25 13:49
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("rpi_manager", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="Ph",
fi... | [
"pilt64@hotmail.fr"
] | pilt64@hotmail.fr |
89e026a18c52f389d46597ba589fee07cc32a352 | d44d33899aaab3d2a8b693b648701d49810aca12 | /cip5-multiprofile-wave.py | e001a331576902efdc7df62b78d3e40a59f81237 | [] | no_license | izham-sugita/CIP | 208eee2e108a910abd3a137083638244b8f60303 | a0cd77531a34ad32a0cebeb6069123e89aceb0b5 | refs/heads/master | 2021-06-27T14:51:45.696969 | 2021-01-07T11:44:04 | 2021-01-07T11:44:04 | 204,810,048 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,796 | py | import numpy as np
import matplotlib.pyplot as plt
#Changing the default size
#fig_size = plt.rcParams["figure.figsize"]
#fig_size[0] = 20
#fig_size[1] = 16
#plt.rcParams["figure.figsize"] = fig_size
imax = 2001
imax = int( input("Enter imax ") )
length = 2.0 #-1<=x<=1
dx = length/(imax-1)
u = np.ndarray((imax),dtype... | [
"sugita5019@gmail.com"
] | sugita5019@gmail.com |
898a057527760f01aeb95b618322cf09388c1f42 | 02e23da0431623db86c8138bda350a1d526d4185 | /Archivos Python Documentos/Graficas/.history/TRABAJO_SPT_v3_20200224230649.py | 0fe0123926d8f3bed47ddd88db91bc709c442b12 | [] | no_license | Jaamunozr/Archivos-python | d9996d3d10ff8429cd1b4c2b396016a3a5482889 | 1f0af9ba08f12ac27e111fcceed49bbcf3b39657 | refs/heads/master | 2022-08-05T14:49:45.178561 | 2022-07-13T13:44:39 | 2022-07-13T13:44:39 | 244,073,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,848 | py | import os
import pylab as pl
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np
#------------------------------------------------------------------------------
os.system("clear")
fig = pl.f... | [
"jaamunozr@gmail.com"
] | jaamunozr@gmail.com |
423824d04b9ff1a989d3a18f132c057b03f82f22 | 4554f8d3ab1a6267b17dad2b4d2c47b0abe8d746 | /benchmarking/remote/devices.py | c7cacd80d2eb8e3a4eb17eebb98a6ac45237cf32 | [
"Apache-2.0"
] | permissive | jteller/FAI-PEP | 44fead3ca26f4844067d455c86ac8c5bfaf79a14 | 73b8a08815675135e9da7d68375d1218cbd04eaa | refs/heads/master | 2020-04-29T06:04:19.197966 | 2019-03-15T23:32:54 | 2019-03-15T23:32:54 | 175,904,011 | 0 | 0 | Apache-2.0 | 2019-03-15T23:30:04 | 2019-03-15T23:30:04 | null | UTF-8 | Python | false | false | 2,484 | py | #!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
431a60378e86b4b85d841143ab2f513bb7bbeeff | 1b5cc8dc487da59455dfe6749796870d51d5ab87 | /src/collective/iptvusp/tests/test_uspvideo.py | 72b74796685ac00b3964064bc7a733813671c2c5 | [] | no_license | simplesconsultoria/collective.iptvusp | eddcd726a800933127b04959bba90c63210049dc | 89b14ee4a01e19ef5cd7198c5bdf808ef555f1f0 | refs/heads/master | 2021-01-01T18:29:41.272115 | 2013-03-12T19:01:25 | 2013-03-12T19:01:25 | 6,388,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,806 | py | # -*- coding: utf-8 -*-
import unittest2 as unittest
from zope.component import createObject
from zope.component import queryUtility
from plone.app.testing import TEST_USER_ID
from plone.app.testing import setRoles
from plone.dexterity.interfaces import IDexterityFTI
from plone.app.dexterity.behaviors.exclfromnav im... | [
"erico@simplesconsultoria.com.br"
] | erico@simplesconsultoria.com.br |
6a28e7551bac14d5e50e838a962b64b49a7008ae | 057722b227e9f51c78bd77b622859674016f19dc | /homework4/code/p7/trysvm.py | 8783e7fd91174a983250421516e6938b0597d778 | [] | no_license | walkerning/Homework-pattern_recognition | 56508bc66d0932ad8c9899658d8229169d800551 | 843a79d1f4cc278839ade27a593ae66e603ac4ba | refs/heads/master | 2021-03-19T15:30:55.581932 | 2017-05-31T15:51:22 | 2017-05-31T15:51:22 | 84,166,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,740 | py | # -*- coding: utf-8 -*-
import numpy as np
from sklearn import svm
samples_w1 = np.array([[-3.0, 0.5, 2.9, -0.1, -4.0, -1.3, -3.4, -4.1, -5.1, 1.9],
[-2.9, 8.7, 2.1, 5.2, 2.2, 3.7, 6.2, 3.4, 1.6, 5.1]]).T
samples_w2 = np.array([[-2.0, -8.9, -4.2, -8.5, -6.7, -0.5, -5.3, -8.7, -7.1, -8.0],
... | [
"foxdoraame@gmail.com"
] | foxdoraame@gmail.com |
d2f6e5faa8e1f124af00e0502dca3ad30670785e | b5fabc6c6de064690f8d4ee423001cf9365a3d9f | /flash/image/segmentation/model.py | 9296db60cbcff1e6220d5aee051ddb36549a8b1f | [
"Apache-2.0"
] | permissive | dmarx/lightning-flash | 021dfd76bde6e30309f14feb5853020b0babe90d | 4cda031c1f9c8d8754fd36b5720d2a5a7d866765 | refs/heads/master | 2023-09-06T06:24:29.856354 | 2021-11-24T23:38:14 | 2021-11-24T23:38:14 | 422,352,910 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,182 | py | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
"noreply@github.com"
] | dmarx.noreply@github.com |
bf2bb21fe32c046e31ac269a94e444f91dc0217b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03626/s873858203.py | 5c64e4b78d0537220084f2cc138a77120c711579 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | MOD = 1000000007
n = int(input())
s1 = input()
s2 = input()
if s1[0] == s2[0]:
ans = 3
i = 1
prev = 1
else:
ans = 6
i = 2
prev = 2
while i<n:
if s1[i] == s2[i]:
i += 1
if prev == 1:
ans *= 2
else:
prev = 1
else:
i += 2
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
deb150440060e0d6c968a2ccf2812970012b495a | 27c4e774f053594473da202c1c45dcbf237465be | /Scorm.py | 566403fdd0e407806057a4daa6e2727586ed572a | [] | no_license | Gamboua/zope-migration | 34e6b27962859352fe08a4277a8215b36b01889c | 7a83ed67c5ea561bfa8aa300728390b7220f3633 | refs/heads/master | 2020-12-25T14:49:22.173420 | 2017-10-19T20:47:50 | 2017-10-19T20:47:50 | 67,830,154 | 0 | 1 | null | 2016-10-20T21:42:09 | 2016-09-09T20:20:57 | PHP | UTF-8 | Python | false | false | 1,910 | py | import paramiko
import os
from scp import SCPClient
from config import *
from Command import Command
import random, string
class Scorm:
def __init__(self, scorm, course):
self.course = course
self.scp = None
self.type = 'scorm'
self.section = 0
self.folder = self.get_if_... | [
"gabriel.bonfim@4linux.com.br"
] | gabriel.bonfim@4linux.com.br |
4a5b7c6844ca194b50ed70323648cba57b6e0b8d | c6e5bbafd810d23e0ee46d69026cba35339d1dbd | /accounts/managers.py | 42d3aae755fba1358031994ccd3a06d4ca8dcdd1 | [] | no_license | mfonism/django-inqueerstigate | 9c8b729848bf3df9fb9ec991ec47391b69ad7b66 | af5420bf8adf6aa89533cd1462d9eeed6e8c88db | refs/heads/main | 2023-05-26T12:59:55.774989 | 2021-06-07T11:46:48 | 2021-06-07T11:46:48 | 323,681,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,179 | py | from django.contrib.auth.models import BaseUserManager
class UserManager(BaseUserManager):
use_in_migrations = True
def _create_user(self, email, password, **extra_fields):
if not email:
raise ValueError("The given email must be set")
email = self.normalize_email(email)
us... | [
"mfonetimfon@gmail.com"
] | mfonetimfon@gmail.com |
847e83de22c9dbcb04f87362a0d956c786584799 | caace044baf7a6f2b0bda65ae361eed06bddfc3c | /dailyQuestion/2020/2020-06/06-01/python/solution_items.py | 1f7df5de69c465f7a57e918ca5eee350c02c2603 | [
"Apache-2.0"
] | permissive | russellgao/algorithm | fd6126e89c40d7d351c53bbd5fde690c9be899ef | ad5e724d20a8492b8eba03fc0f24e4ff5964b3ea | refs/heads/master | 2023-03-28T03:00:02.370660 | 2021-03-28T10:56:38 | 2021-03-28T10:56:38 | 259,038,372 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,550 | py |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
# 迭代
def sortList(head: ListNode) -> ListNode:
head_len = 0
invc = 1
h = head
while h :
head_len += 1
h = h.next
result = ListNode(0)
result.next = hea... | [
"gaoweizong@hd123.com"
] | gaoweizong@hd123.com |
db0454c4c301f4b509ebb198c08bac7e87c6a3bd | d19d16ddc922b0915aff982568c5c71ee58fb8b9 | /dataset/utils.py | f13a627e795ae92c6dca77770e719e98d0542e2e | [] | no_license | zhaoyuzhi/HSGAN | 036a6fec722d564f9b203f6032bf47039c1eadd4 | f974761ec4a65ef58283ae4ccba618b97e79c4bc | refs/heads/main | 2023-08-03T10:06:05.195187 | 2023-07-27T14:21:54 | 2023-07-27T14:21:54 | 337,642,689 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,688 | py | import os
import numpy as np
# ----------------------------------------
# PATH processing
# ----------------------------------------
def check_path(path):
if not os.path.exists(path):
os.makedirs(path)
def get_files(path):
# read a folder, return the complete path
ret = []
... | [
"noreply@github.com"
] | zhaoyuzhi.noreply@github.com |
971930662e9f48b55e5e7268f17b00a473b909c6 | 4fb5b869f6690b73e32a2d8624f5fc8954540b42 | /pypiplot/examples.py | b73f61adfb29a23b32d768d116b50680a0502255 | [
"MIT"
] | permissive | erdogant/pypiplot | cc8eb15f9b6855cba270256591ba8b1ec4ae41f6 | 2016cca3d0b4022cda1806c2c4b8c4eb2d31ee19 | refs/heads/master | 2023-04-16T03:26:26.935072 | 2023-02-21T23:46:01 | 2023-02-21T23:46:01 | 293,334,020 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,271 | py | import pypiplot
# print(pypiplot.__version__)
# print(dir(Pypiplot))
from pypiplot import Pypiplot
# %% Update all libraries to date.
pp = Pypiplot(username='erdogant', repo_type=['owner', 'fork'])
pp.update()
results = pp.stats()
pp.plot_year(vmin=700)
pp.plot()
pp.plot_year()
# %% Top 10 best repos
pp = Pypiplot... | [
"erdogant@gmail.com"
] | erdogant@gmail.com |
a60ce595e94bd01b6f46c0cb382957eebfd7ab07 | 576cc83449e10fd3f98281970c46016ea7a5aea2 | /Tensorflow/CNN/莫烦python02.py | 2e08d2c51048bcd31c14f4a4a131722ae38111f1 | [] | no_license | HotView/PycharmProjects | 215ab9edd341e3293daebcf86d97537f8cd28d75 | 61393fe5ba781a8c1216a5cbe7e0d06149a10190 | refs/heads/master | 2020-06-02T07:41:53.608742 | 2019-11-13T08:31:57 | 2019-11-13T08:31:57 | 191,085,178 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,519 | py | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("data",one_hot=True)
def add_layer(inputs,in_size,out_size,activaion_function = None):
Weights = tf.Variable(tf.random_normal([in_size,out_size]))
... | [
"864773190@qq.com"
] | 864773190@qq.com |
6567d0f8b19425ebfd1cd990c73c0e2498f971f2 | 41294ab88364fbb40ee67fcc643a91cc355c25d5 | /solution/accounting.py | 368251986f18af4b2806c42760073666909b3c70 | [] | no_license | tessajules/underpaid-customers-HB-homework | 96e542cc736d03b1476c88c43cd931081b03926d | ec3526debea68ecbf7aed25d041baf26110e40b2 | refs/heads/master | 2021-05-28T22:11:25.106565 | 2015-04-10T02:56:36 | 2015-04-10T02:56:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | MELON_COST = 1.00
def melon_payment_calculator(payment_data):
"""Calculate cost of melons and determine who has underpaid."""
payment_data = open(payment_data)
for line in payment_data:
order = line.split('|')
customer_name = order[1]
customer_first = customer_name.split(" ")[0]... | [
"info@hackbrightacademy.com"
] | info@hackbrightacademy.com |
ea8bb3f37fef6e37cd9f9274f22db69548ed5b99 | 1a59a9076c1e9f1eb98e24ff41a4c1c95e2b353e | /xcp2k/classes/_program_run_info36.py | df87e8835f3ba808b0a2fb5f2bbb04a979030521 | [] | no_license | Roolthasiva/xcp2k | 66b2f30ebeae1a946b81f71d22f97ea4076e11dc | fc3b5885503c6f6dc549efeb4f89f61c8b6b8242 | refs/heads/master | 2022-12-23T06:03:14.033521 | 2020-10-07T08:01:48 | 2020-10-07T08:01:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | from xcp2k.inputsection import InputSection
from xcp2k.classes._each343 import _each343
class _program_run_info36(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Section_parameters = None
self.Add_last = None
self.Common_iteration_levels = None
self.File... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
acc4aef5d2a6eb365488380fe43780058d19a3d6 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_1623+386/sdB_PG_1623+386_lc.py | 79bf55d3e02753efc2d185b0d3025a46f7a7b55a | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[246.351292,38.505214], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_PG_1623+386 /sdB_PG_1623+386_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
if __name... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.