blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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... | [
"[email protected]"
] | |
cdc14ab92541df567c2da2c71eab1580caecb1c9 | 73dadaa1c10ba149cf42fe3600edee9565b2e418 | /pythonBasicsHandsOn.py | 92dfdf4b8dab6dd981c4aea7320a988e9e35c5e3 | [] | no_license | Sankarb475/Python_Learning | 078826e5087bf1c6d2e18e9176af1bad3e345eb1 | 1b0d929a66f99b86bfd41590c1ce8781385223a0 | refs/heads/master | 2022-06-14T07:45:10.053327 | 2022-06-09T05:11:44 | 2022-06-09T05:11:44 | 167,215,150 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,865 | py | # Shallow Copy and Deep Copy
# When you use "=" to create a copy of an object, It only creates a new variable that shares the reference of the original object.
a = [1,2,3,4]
b = a
a.append(5)
a[2] = 100
print(a,b)
=> [1, 2, 100, 4, 5] [1, 2, 100, 4, 5]
-- Shallow copy creates a copy of t
import copy
a = [1,2,3,4]
... | [
"[email protected]"
] | |
aa08416cec64433ef17052cae24d44ab961b544f | 2d9a17e2b896d2f6a90913a4ba02d41f0ede5dd0 | /_gsinfo/qiyecxb-ct/qycxb_spider.py | c629ad7e0a0c3154e2b6a4ad7ae34b42379b6c08 | [] | no_license | wolfwhoami/xxxxx | 1cf2ed2c8ed78048d87cccf2953ca86c0871a783 | 670787ec71127bc05c1645cc3d8ef7c3a91fe84b | refs/heads/master | 2020-03-30T00:44:55.864817 | 2016-12-16T01:45:03 | 2016-12-16T01:45:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,218 | py | #!/usr/bin/env python
# -*- coding:utf8 -*-
import os
import sys
sys.path.append(sys.path[0]+"/..")
print sys.path
import time
from spider.spider import Spider, AccountErrors
import re
from spider.savebin import BinSaver
import random
import threading
import traceback
import spider.util
from spider.savebin import File... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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"],
})
| [
"[email protected]"
] | |
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)))
... | [
"[email protected]"
] | |
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... | [
"[[email protected]]"
] | |
43762e6631bb0431b80bd2656e2d2522d44b3bed | 3d228d5eac44b31d460dd81767b43309b7356577 | /extra/graph/company_tree.py | f1637b2f1a04bcbe1902f64e15364798ff383c47 | [
"BSD-3-Clause"
] | permissive | lsbardel/mathfun | da65a6f09faacdb4815111dae287c9b974acf928 | 98e7c210409c2b5777e91059c3651cef4f3045dd | refs/heads/master | 2021-05-02T08:56:05.565539 | 2020-07-30T09:14:04 | 2020-07-30T09:14:04 | 26,242,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41 | py | from mathfun.graph.template import Graph
| [
"[email protected]"
] | |
3da8f7b040ba3e4364324d6671fd5826cd2494b7 | 1dacbf90eeb384455ab84a8cf63d16e2c9680a90 | /pkgs/odo-0.4.2-py27_0/lib/python2.7/site-packages/odo/backends/sparksql.py | 80e27ad318d1981f6194e3e20d84b782da1089e7 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown"
] | permissive | wangyum/Anaconda | ac7229b21815dd92b0bd1c8b7ec4e85c013b8994 | 2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6 | refs/heads/master | 2022-10-21T15:14:23.464126 | 2022-10-05T12:10:31 | 2022-10-05T12:10:31 | 76,526,728 | 11 | 10 | Apache-2.0 | 2022-10-05T12:10:32 | 2016-12-15T05:26:12 | Python | UTF-8 | Python | false | false | 9,639 | py | from __future__ import division, print_function, absolute_import
import os
import glob
import itertools
import tempfile
import shutil
from functools import partial
from collections import Iterator
from datetime import datetime, date
import pandas as pd
import toolz
from toolz.curried import get, map, memoize
from t... | [
"[email protected]"
] | |
7e718881b9c46f43e2cc9329438179cd7fbc6988 | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp/CISCO-CDSTV-FSI-MIB.py | cb16a25f5a07fa321bae26f7dbc8039adcc9a510 | [
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 6,231 | py | #
# PySNMP MIB module CISCO-CDSTV-FSI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-CDSTV-FSI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:35:42 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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 = '... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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', ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
d86e1749616a76d2d38d3047025c8bd2f53d42fd | 53438732c6bc70b0d15eea99d961d6036f8839df | /Auth1/venv/bin/pip3.7 | 7e7d4a7ec99e985fd6466a5c34625337413e6453 | [] | no_license | Amarjeet2629/MyPycharmProjects | 6e07c972dce8ef12453ae0246bcbfcfd03cba1fb | 179a87f327d7c036a6192d0c6e372f2f1e3588ff | refs/heads/master | 2023-05-07T20:32:22.091132 | 2021-04-20T17:06:15 | 2021-04-20T17:06:15 | 224,671,445 | 0 | 0 | null | 2023-04-21T20:51:29 | 2019-11-28T14:32:13 | Python | UTF-8 | Python | false | false | 410 | 7 | #!/home/amarjeet-pc/PycharmProjects/Auth1/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.7'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
... | [
"[email protected]"
] | |
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]'
#
... | [
"[email protected]"
] | |
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):
"""书中的英雄人物类"""
# ... | [
"[email protected]"
] | |
8d1a3522d4cfd4b873a8f1089516307ab89e8605 | d0281cecabd070c399d18612bbb3ba11913c0ab1 | /venv/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py | 2f6941ef65e3378a7104657698538b9f1db55d8d | [
"MIT"
] | permissive | yuxuan1995liu/darkflowyolo_detection | f0b7aa0a667591da9736fb2860d6080b2fc41577 | a7807e9b85833e3f877d46bb60e8fa7d0596a10b | refs/heads/master | 2022-11-03T04:00:42.996414 | 2019-05-10T01:58:59 | 2019-05-10T01:58:59 | 185,880,108 | 0 | 1 | MIT | 2022-10-30T16:38:49 | 2019-05-09T22:28:01 | Python | UTF-8 | Python | false | false | 514,131 | py | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: array_ops.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
from te... | [
"[email protected]"
] | |
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 =... | [
"[email protected]"
] | |
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(... | [
"[email protected]"
] | |
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')
| [
"[email protected]"
] | |
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_... | [
"[email protected]"
] | |
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',
... | [
"[email protected]"
] | |
ddbc0c95647448fd2b5ee0f7983a9b7eda1fc03c | 7b054cd92eece331d2494b1ecbd6ebae76deed55 | /ecommerce/urls.py | 748d4606d02d80bf738204eb134afca866a6623b | [] | no_license | Tanmoy-Sarkar/Django-Ecommerce-Website | f23ec5a60b64f6b3f614bb9dd7aced2c694d1d75 | 24810153dcb51ae1d57c1b182b59cb40fbb8a3d2 | refs/heads/master | 2023-07-03T17:23:58.746887 | 2021-07-31T08:21:35 | 2021-07-31T08:21:35 | 389,021,036 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | """ecommerce URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/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-bas... | [
"[email protected]"
] | |
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
"""
... | [
"[email protected]"
] | |
833980c8158fa0f25d3ae7485542f3655bc24ef9 | 18e48f22f88fe80ce54d12fdbf9d05a7ca5bd65a | /0x04-python-more_data_structures/3-common_elements.py | bdcdc3ae779109657e7ebde98aeb7e93558c88ae | [] | no_license | SantiagoHerreG/holbertonschool-higher_level_programming | 426c4bc9bc080a81b72d2f740c8ed2eb365023eb | ca2612ef3be92a60764d584cf39de3a2ba310f84 | refs/heads/master | 2020-07-22T19:33:48.507287 | 2020-02-14T04:34:00 | 2020-02-14T04:34:00 | 207,305,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | #!/usr/bin/python3
def common_elements(set_1, set_2):
new_set = set_1 & set_2
return (new_set)
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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 ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
3be06eb873cdd1760ff6e5f63aa67790705e4936 | 70cdf0741a22c678401a306229003bf036ffe5a6 | /ocbind/interfaces/interface/routed_vlan/ipv4/state/counters/__init__.py | fc80550902dca33ef1415b13bb6c12c3d63fa5ce | [] | no_license | zsblevins/nanog81-hackathon | 5001e034339d6b0c6452ae2474f06916bcd715cf | 1b64fd207dd69837f947094fbd6d6c1cea3a1070 | refs/heads/main | 2023-03-03T09:39:28.460000 | 2021-02-15T13:41:38 | 2021-02-15T13:41:38 | 336,698,856 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,316 | py | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
# [email protected]
# [email protected]
#
# 10/24/2014 Original Construction
################################################################... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
6312c87325c4ac19ffd4a502d580ce4c926c0ab6 | 6f269812a96d47c5670b4a7d5512f01bc7156217 | /manage.py | 18c1b3390a3f1f98873d26d42fc900e32bb82d06 | [] | no_license | kalkins/buk-django | 00a1724c19127840ac19182f003e28ed4f4f4480 | 708071d144b06ab289abdea6046437c40a81d230 | refs/heads/dev | 2022-12-13T05:51:30.664433 | 2019-02-12T03:10:04 | 2019-02-12T03:10:04 | 77,866,135 | 4 | 0 | null | 2022-12-08T01:28:31 | 2017-01-02T22:34:59 | Python | UTF-8 | Python | false | false | 801 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "buk.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | [
"[email protected]"
] | |
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 ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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(... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
cb20e9e52b32e9c6326a763015d867ba85acb885 | 7b5f7dc5b6a0fc063aeabc9f2408dc867586c129 | /env/lib/python2.7/site-packages/sure/old.py | 59cef893c4075eff83a691a530ebb8822e678328 | [] | no_license | kingbifoe/django-calendar-reminder | 687dfa419895cfc67f5fad542179d9d4a716e75d | 3325717f53fd9825e036f21f391510f6a754aa93 | refs/heads/master | 2023-01-02T05:10:47.418059 | 2016-04-10T19:04:44 | 2016-04-10T19:04:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,705 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <sure - utility belt for automated testing in python>
# Copyright (C) <2010-2013> Gabriel Falcão <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... | [
"[email protected]"
] | |
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):
... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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'... | [
"[email protected]"
] | |
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[... | [
"[email protected]"
] | |
745598179a1f4f9fc81a7259c54c7e70776b17c7 | 7083f3e6121a63b0c21e15d8b23c32067d7e4e5e | /scripts/debugging/test_data_utils.py | 471d21749014c77fe08ae8e78ca5ffb1b5c2ab15 | [] | no_license | nathanin/milk | e46317cf0d1b2162fd301a144f5aa3b889cf5d27 | 9afb3b01715a4f65a03b7cd45dcd121745b117f8 | refs/heads/master | 2023-02-22T05:23:06.850961 | 2019-10-26T19:08:20 | 2019-10-26T19:08:20 | 154,750,122 | 2 | 0 | null | 2023-02-15T21:36:19 | 2018-10-25T23:29:33 | Jupyter Notebook | UTF-8 | Python | false | false | 79 | py | import sys
sys.path.insert(0, '../..')
from milk.utilities import data_utils
| [
"[email protected]"
] | |
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 $... | [
"[email protected]"
] | |
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 =... | [
"[email protected]"
] | |
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_... | [
"[email protected]"
] | |
5593fcb9ec3b1417a331b3952f8d5f7cd229fa92 | 11bb0cbe6de2a0a4e94fc0ba610f61894d5593a1 | /VBS_Zgamma/Significance/Invert_detajj/data_cards/th2_to_txt.py | 40511394bf0a015827f544aacee6e14b17f68643 | [] | no_license | AnYpku/PKU-Cluster | 0dc4a88445aeb3ca239b2d7d7f796c6a67f3f69c | f9ffbcb7988053f4618fd015c1bb656d92ff51c6 | refs/heads/master | 2022-11-01T23:46:59.442037 | 2022-10-21T06:37:43 | 2022-10-21T06:37:43 | 188,202,345 | 0 | 4 | null | null | null | null | UTF-8 | Python | false | false | 10,414 | py | #!/usr/bin/env python
from ROOT import gROOT, THStack, TH1D, TList, TFile
import sys
from math import sqrt
from numpy import sum
def merge_bin(th1):
nbins=th1.GetNbinsX()
print 'nbins', nbins
th1.SetBinContent(nbins-2,th1.GetBinContent(nbins-2)+th1.GetBinContent(nbins-1)+th1.GetBinContent(nbins))
... | [
"[email protected]"
] | |
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',... | [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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()
| [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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).
==================================... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
58e06984a80bfb1f133e9e4eee18958f1fe78fb2 | 0f5bdddfb93154d7f3cf097ede0a8c9ac403e027 | /tests/test_rtcrtpreceiver.py | cb6865f41e23a94d28ffbaf0933d26f08ec809e6 | [
"BSD-3-Clause"
] | permissive | pslq/aiortc | 13061885fc06eef42a05a0d8ad6eb3a3708873a3 | b27b27d3509c2a8335aadd949511b24b93530d86 | refs/heads/master | 2020-03-27T02:17:50.118454 | 2018-08-22T16:44:03 | 2018-08-22T17:58:11 | 145,780,077 | 1 | 0 | null | 2018-08-23T00:54:52 | 2018-08-23T00:54:52 | null | UTF-8 | Python | false | false | 9,343 | py | import asyncio
from unittest import TestCase
from unittest.mock import patch
from aiortc.codecs import PCMU_CODEC
from aiortc.exceptions import InvalidStateError
from aiortc.mediastreams import AudioFrame
from aiortc.rtcrtpparameters import RTCRtpCodecParameters, RTCRtpParameters
from aiortc.rtcrtpreceiver import (Nac... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
----... | [
"[email protected]"
] | |
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("... | [
"[email protected]"
] | |
c216efa4d1718ae2ddfb65ef0d24f2825156d9ab | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03455/s808955934.py | 5a703a489b980a233dbc16c583c6ec0ff1dc188d | [] | 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 | 102 | py | # ABC 086
A,B= map(int,input().split())
if (A* B)%2==0:
ans ='Even'
else:
ans='Odd'
print(ans) | [
"[email protected]"
] | |
f5e3f313c4584c8f5380fa9186122cf9b6227947 | 4cda6686b659c0bf34213a4c5faf050c4c866eea | /ExperimentSpecificCode/_2018_2019_Neuroseeker_Paper/_2019_Neuroseeker_Paper_Expanded/_33p1/NeuropixelSim/Sparce/spikesort_and_timelock_analysis.py | 841c428d900ac79f30a6bfcc8d9155a019730e56 | [] | no_license | georgedimitriadis/themeaningofbrain | da99efcf62af67bc6c2a71e504765026a4491217 | f138cf500a3ca6c8d76613c942787d9f073d67a7 | refs/heads/master | 2023-02-21T10:52:18.771691 | 2023-02-17T08:23:09 | 2023-02-17T08:23:09 | 50,346,965 | 3 | 1 | null | 2017-06-17T16:29:47 | 2016-01-25T11:42:43 | Python | UTF-8 | Python | false | false | 12,478 | py |
"""
The pipeline for spikesorting this dataset
"""
import numpy as np
from os.path import join
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import preprocessing as preproc
from BrainDataAnalysis.Spike_Sorting import positions_on_probe as spp
from spikesorting_tsne_guis import clean_kilosort_templ... | [
"[email protected]"
] | |
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 #
###############################################################
... | [
"[email protected]"
] | |
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) | [
"[email protected]"
] | |
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 ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
824fe2517075df54beda8ff30d6a67ef447af8ae | 7a7bbdaab3cedcd9b89d9245d67fe7cc472fc288 | /1_dimention/2577.py | 057b91d168293a509f38fbb985532bb1d9aba21b | [] | no_license | rheehot/baekjun | cd213c6903e69a8e48b4942c950048c1c3e03c34 | 44792c6d125af7d9b0739c571e7918c802f73c01 | refs/heads/master | 2023-02-12T08:42:47.578842 | 2020-12-21T00:40:35 | 2020-12-21T00:40:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 123 | py | a = int(input())
b = int(input())
c = int(input())
mul = str(a * b * c)
for i in range(10):
print(mul.count(str(i))) | [
"[email protected]"
] | |
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())
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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:... | [
"[email protected]"
] | |
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,
... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
8a16b83756f3b6f2cc7e3bf1f7c8a50c5bc43058 | f171072a6390997ea4cf398f32ff3c7b7680af3a | /bumerang/apps/video/albums/migrations/0005_auto__add_field_videoalbum_created.py | 598fadaa544415799e09f3de533bda105c00bcce | [] | no_license | onewaterdrop/bumerang | f1ab153d033072c49de2edb976fa761bd4293bba | 0466c8b37ad1073d7ba4fc4dc00a5c6debb343a7 | refs/heads/master | 2021-01-15T23:41:23.379010 | 2014-06-23T07:57:48 | 2014-06-23T07:57:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,622 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'VideoAlbum.created'
db.add_column('albums_videoalbum', 'created',
self... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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.
################################... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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],
... | [
"[email protected]"
] | |
f6d6555a8ba6236ab372c46d3874d38c6e764625 | db7660d3541c26b418ea84ca08fbf41f9ebd726b | /brax/jumpy.py | 7486fd1ac0b8ac9b44e57f3f0ed88c4c3ca5f7a4 | [
"Apache-2.0"
] | permissive | proceduralia/brax | 8727ada08184fe9f60356d17a15ea671df0906d6 | d54dc479a32e5e99641cde921c7988d69cd5bb7b | refs/heads/main | 2023-08-27T15:39:44.618414 | 2021-11-08T21:35:42 | 2021-11-08T21:37:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,680 | py | # Copyright 2021 The Brax Authors.
#
# 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 in wri... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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_... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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 = []
... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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]))
... | [
"[email protected]"
] | |
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]... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.