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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70ffe5314419bb5044b3a9f8f244447a6aad5a93 | c1267fbec95318184e7388cddf9b7085f797d514 | /2023/05 May/db05232023.py | 5dc2d55800b8a6bd5a3a2bcf895e58b5ac20691d | [
"MIT"
] | permissive | vishrutkmr7/DailyPracticeProblemsDIP | 1aedfd2e173847bf22989a6b0ec550acebb2bd86 | 2c365f633a1e1bee281fbdc314969f03b17ac9ec | refs/heads/master | 2023-05-31T23:49:52.135349 | 2023-05-28T09:32:12 | 2023-05-28T09:32:12 | 199,596,248 | 10 | 4 | MIT | 2022-11-02T21:31:59 | 2019-07-30T07:12:46 | Python | UTF-8 | Python | false | false | 1,310 | py | """
You are on the command line of a computer in the root directory and given a list of commands to run.
The commands consist of three possible operations, ../ which brings you to the parent directory (or
nowhere if you’re already in the root directory), ./ which keeps you in the current directory, and
directory_name/ ... | [
"[email protected]"
] | |
a87207e9eff593413fc1fe99434da4f68da15b15 | 025abc9e70eb347e688a90bdf3030db120e8824b | /python_script/test_rolling_sphere.py | c4f43ab61ff56c9f2f8b47da5e867ab321a5335b | [
"BSD-3-Clause"
] | permissive | listenzcc/3D_model_matlab | 6953a2ebbb55373a749aebc5101166e327c45cb5 | 2dcaf50a51cf02591737aaa6b4924ed3848f1840 | refs/heads/master | 2020-04-24T02:34:58.093612 | 2019-05-28T04:05:29 | 2019-05-28T04:05:29 | 171,641,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,090 | py | # code: utf-8
from mpl_toolkits.mplot3d import proj3d
from matplotlib import animation
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_aspect("equal")
# draw sphere
def init():
u, v = np.mgrid[0:2*np.pi:20j, 0:np.pi:10j]
x = np.cos(u)*np.sin(v)
... | [
"[email protected]"
] | |
3eb0059440e55929683569010648a2bfee9d1a04 | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/services/services/campaign_criterion_simulation_service/transports/base.py | aa5d97f44787ec6884d649ce8947e8a4c96799a0 | [
"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 | 4,107 | 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]"
] | |
81218cbe35e6ef4a09627951ac0eab617bd94d2c | fa0c53ac2a91409eaf0fc7c082a40caae3ffa0d8 | /com/lc/python_1_100_Days_Demo/Day01-15/Day09/code/employee.py | ac82d97c526cf06934a23fa8d2368df0c8c0cd8a | [] | no_license | ahviplc/pythonLCDemo | aba6d8deb1e766841461bd772560d1d50450057b | 22f149600dcfd4d769e9f74f1f12e3c3564e88c2 | refs/heads/master | 2023-07-24T01:41:59.791913 | 2023-07-07T02:32:45 | 2023-07-07T02:32:45 | 135,969,516 | 7 | 2 | null | 2023-02-02T03:24:14 | 2018-06-04T04:12:49 | Python | UTF-8 | Python | false | false | 1,824 | py | """
抽象类 / 方法重写 / 多态
实现一个工资结算系统 公司有三种类型的员工
- 部门经理固定月薪12000元/月
- 程序员按本月工作小时数每小时100元
- 销售员1500元/月的底薪加上本月销售额5%的提成
输入员工的信息 输出每位员工的月薪信息
Version: 0.1
Author: LC
DateTime:2018年9月18日13:55:50
一加壹博客最Top-一起共创1+1>2的力量!~LC
LC博客url: http://oneplusone.top/index.html
"""
from abc import ABCMeta, abstractmethod
class Employee(o... | [
"[email protected]"
] | |
8ca313a6343af6f39fca663bf4e7b08003d71448 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/klmale001/question2.py | 74abd3ce5a120172d6cab928acbe28d3e19dd740 | [] | 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 | 2,046 | py | print('Welcome to the 30 Second Rule Expert')
print('------------------------------------')
print('Answer the following questions by selecting from among the options.')
if input('Did anyone see you? (yes/no)\n')=="yes":
if input('Was it a boss/lover/parent? (yes/no)\n')=='yes':
if input('Was it expensi... | [
"[email protected]"
] | |
4f531645d7a4cba97eb51cd0a69edb942d7d08f9 | 1eab574606dffb14a63195de994ee7c2355989b1 | /ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocolstack/pppoxrange_rwb2ludc9yyw5nzs9wchbvefjhbmdl.py | eeb6bd5a63619fdcf2aee82bef8f279788621efa | [
"MIT"
] | permissive | steiler/ixnetwork_restpy | 56b3f08726301e9938aaea26f6dcd20ebf53c806 | dd7ec0d311b74cefb1fe310d57b5c8a65d6d4ff9 | refs/heads/master | 2020-09-04T12:10:18.387184 | 2019-11-05T11:29:43 | 2019-11-05T11:29:43 | 219,728,796 | 0 | 0 | null | 2019-11-05T11:28:29 | 2019-11-05T11:28:26 | null | UTF-8 | Python | false | false | 37,686 | py | # MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | [
"[email protected]"
] | |
bceef0b93c3691d490c863dae8725908c66c9136 | 92a6b3dfbaa5ee932b7ecebcb5dad66c878163d5 | /机器学习的代码/hello_world_linear_model.py | c4455c7476f4610d89a4df7aabe14b25e497a6d2 | [] | no_license | Color4/2017_code_updata_to_use | c99e9cf409904531813e69e5106b4650a1863979 | a531d2b61d6984b4101af68bf1e54783d5e0843b | refs/heads/master | 2020-03-31T20:14:34.366303 | 2018-10-08T04:58:10 | 2018-10-08T04:58:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,835 | py | import tensorflow as tf
import numpy
import matplotlib.pyplot as plt
rng = numpy.random
# Parameters
learning_rate = 0.01
training_epochs = 2000
display_step = 50
# Training Data
train_X = numpy.asarray([3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,7.042,10.791,5.313,7.997,5.654,9.27,3.1])
train_Y = numpy.asa... | [
"[email protected]"
] | |
b0b0f2739ca965c635b18a5027894999d2f8ca3c | ddaef23fe2e8da8153d69c5fc95421cc70f0d76c | /hc/api/decorators.py | bff56dda347bd98b691fd63c97deb7217b1f5210 | [
"BSD-3-Clause"
] | permissive | PagerTree/healthchecks | ee706b7b86a96c86d00428bdae96f4711e03bbde | ae53aaaa3a9f3e420858f9b877dd5047fae689ee | refs/heads/master | 2023-01-10T00:14:15.735248 | 2022-12-20T14:23:33 | 2022-12-20T14:23:33 | 114,281,135 | 0 | 1 | null | 2017-12-14T18:03:00 | 2017-12-14T18:03:00 | null | UTF-8 | Python | false | false | 3,708 | py | from __future__ import annotations
import json
from functools import wraps
from django.db.models import Q
from django.http import HttpResponse, JsonResponse
from hc.accounts.models import Project
from hc.lib.jsonschema import ValidationError, validate
def error(msg, status=400):
return JsonResponse({"error": m... | [
"[email protected]"
] | |
29922bc33b6c89fc40112d18ddfad5c53622011d | 16270d37d819a35777ab6d6a6430cd63551917f1 | /handlers/newpost.py | 7299307b23a91c08ba2ee439648df4749e4e1c09 | [] | no_license | SteadBytes/multi-user-blog | de28673155b81bd22e6cb57825670beca9ffdcf0 | a3269a949753c72fad0915a1a6feafe50d75c4e3 | refs/heads/master | 2021-06-22T13:42:58.381491 | 2017-06-28T15:22:14 | 2017-06-28T15:22:14 | 89,211,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | from handlers.blog import BlogHandler
from models.blogpost import BlogPost
from helpers import *
class NewPostHandler(BlogHandler):
"""Handler for '/blog/newpost'.
"""
def render_new_post(self, subject="", content="", error=""):
self.render("new_post.html.j2", subject=subject,
... | [
"="
] | = |
a5911ccfb35e51051246e197db71d55138d3c634 | 6df062cecf36b3e0ae46a84e28b3af50f179c442 | /autouri/metadata.py | e5ab73e28370c1cdcc262b3ccad79285964efd3d | [
"MIT"
] | permissive | ENCODE-DCC/autouri | 81b8b0807c05f17c125fe90f125f516a5a1fcec7 | 73d97ac2ee98bd153abe2f34cbdd89bf3c7aea24 | refs/heads/master | 2023-05-12T06:11:00.576561 | 2023-05-04T17:33:52 | 2023-05-04T17:33:52 | 222,572,865 | 0 | 1 | MIT | 2023-05-04T17:33:53 | 2019-11-19T00:33:18 | Python | UTF-8 | Python | false | false | 1,380 | py | """URIMetadata and helper functions for metadata
"""
import warnings
from base64 import b64decode
from binascii import hexlify
from collections import namedtuple
from datetime import datetime, timezone
from dateparser import parse as dateparser_parse
from dateutil.parser import parse as dateutil_parse
URIMetadata = n... | [
"[email protected]"
] | |
a5a87d9cb88235ea15ab3e8f5388bacc96dbfbea | b1926953762b3720a9b5e4f7e136c3f296765f4b | /0x09-utf8_validation/0-validate_utf8.py | c026393dd80a6751dde74b661baa470fb11e7cea | [] | no_license | Nukemenonai/holbertonschool-interview | 2fd637e50d943fb5735012eee074f4c272c86e83 | 3c2727aaf91f4cccfce7c05406cac8b9c10f6e2d | refs/heads/master | 2023-06-26T13:32:30.568587 | 2021-07-29T01:20:08 | 2021-07-29T01:20:08 | 280,456,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | #!/usr/bin/python3
"""
utf validator
"""
def validUTF8(data):
"""
checks if an array if integers representing a UTF-8 is valid UTF-8
data: list of integers
returns: true if valid else 0
"""
n_bytes = 0
for num in data:
bin_rep = format(num, '#010b')[-8:]
if n_bytes == 0:
... | [
"[email protected]"
] | |
9bb14ece250d2ec5a2cf8da15216e6244b49cb44 | d7df481f20826849b208f2b62eff53d8d107eeff | /ch5/multi3.py | 3ec9f68a0da4de3c70e95033f4d0a2367ec0ee86 | [] | no_license | jemuelb/programming-python-2 | 5f847d591129ae2071cf2937f7853fda654a4e09 | 07f1b36f6017f7c310ac89a62fa8f8280aac9b8c | refs/heads/master | 2021-05-01T19:23:15.748425 | 2018-03-04T22:53:30 | 2018-03-04T22:53:30 | 121,020,259 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,457 | py | """
Use multiprocess shared memory objects to communicate.
Passed objects are shared, but globals are not on Windows.
Last test here reflects common use case: distributing work.
"""
import os
from multiprocessing import Process, Value, Array
procs = 3
count = 0
def showdata(label, val, arr):
"""
print data ... | [
"[email protected]"
] | |
bbdaf5b5723f6bf90d7a7615c82525fa5e2c3298 | 50e375bdc8affc1a8c09aa567a740fa19df7d5a6 | /DSBQ/venv/bin/chardetect | 5b47b8e5fd7a90a96a565e185674e79a64bd2b81 | [] | no_license | michTalebzadeh/SparkStructuredStreaming | ca7a257626e251c7b03a9844cfd229fa8ea95af5 | 87ef34ffe52061fcbb4f22fcd97764037717696a | refs/heads/master | 2023-07-13T00:49:10.753863 | 2021-07-12T16:39:50 | 2021-07-12T16:39:50 | 364,826,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | #!/home/hduser/PycharmProjects/DSBQ/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from chardet.cli.chardetect import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
1fe8d88dbb1f77c4ea991f377fb063188a87e733 | 6810a482759afd585db7bb0b85fd0416f0450e6d | /Open Kattis/tolower.py | 7daf83d10d73126578159f631168fa5092a44ace | [] | no_license | BenRStutzman/kattis | 01b000ac2353c8b8000c6bddec3698f66b0198ef | 005720f853e7f531a264227d0d9aaa19d4d7cf1b | refs/heads/master | 2020-07-15T23:52:45.785021 | 2019-11-09T03:28:06 | 2019-11-09T03:28:06 | 205,675,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | import sys
def main():
inp = sys.stdin.read().splitlines()
P, T = [int(num) for num in inp[0].split()]
num_right = 0
for problem in range(1, P * T + 1, T):
#print('NEW PROBLEM')
for case in range(problem, problem + T):
string = inp[case]
#print(string)
... | [
"[email protected]"
] | |
144944f86d23e3dd519eba2f3a2d474bfcad06bc | c36d9d70cbb257b2ce9a214bcf38f8091e8fe9b7 | /75_sort_color.py | 7bcae70f22da475f20b84852253654c068fa61d1 | [] | no_license | zdadadaz/coding_practice | 3452e4fc8f4a79cb98d0d4ea06ce0bcae85f96a0 | 5ed070f22f4bc29777ee5cbb01bb9583726d8799 | refs/heads/master | 2021-06-23T17:52:40.149982 | 2021-05-03T22:31:23 | 2021-05-03T22:31:23 | 226,006,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | class Solution:
def sortColors(self, nums):
"""
Do not return anything, modify nums in-place instead.
"""
self.recur(nums,0,len(nums)-1)
def recur(self,nums, lt, rt):
if lt<rt:
print(lt,rt)
pivot_idx = self.rearrange(nums, lt, rt)
... | [
"[email protected]"
] | |
d12aec597ccbdf191c9024d967f7c6d1b7b636ed | 2ff2f41c6fe48a4961513ca6deefbc5b393c406e | /python/tvm/contrib/dlpack.py | 11db29f98b3ea308493040c592bdc92c390450a9 | [
"Apache-2.0"
] | permissive | zhiics/tvm | 9f5a39c6373349800b9255d74225d5dd65aba70f | 4782b1fc153d6614808f542155d58188f2dc8255 | refs/heads/master | 2021-12-21T03:24:31.176090 | 2018-09-05T22:48:37 | 2018-09-05T22:48:37 | 143,820,078 | 6 | 2 | Apache-2.0 | 2020-05-13T00:54:21 | 2018-08-07T04:34:08 | C++ | UTF-8 | Python | false | false | 1,251 | py | """Wrapping functions to bridge frameworks with DLPack support to TVM"""
from .. import ndarray
def convert_func(tvm_func, tensor_type, to_dlpack_func):
"""Convert a tvm function into one that accepts a tensor from another
framework, provided the other framework supports DLPACK
Parameters
---------... | [
"[email protected]"
] | |
c9f4124207254efef396011f078633f4edf00400 | 8e39f7ab3d728aaa593a0c0ddd113ea8e6f287c6 | /14_ulter)table.py | b0ca45650e4fa1679ae40301ec502f9c1fd74489 | [] | no_license | tamercs2005/Python-MySQL-Guide | 423ffd502cd08de2850f25f3cfad47983e0949eb | 01917a31038517dfcabe7f5400262792d5b86ef7 | refs/heads/master | 2021-05-22T01:01:21.988815 | 2020-04-02T08:41:40 | 2020-04-02T08:41:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | import mysql.connector
myconn = mysql.connector.connect(
host="localhost" ,
user = "root" ,
passwd = "toor" ,
database='mydatabase'
)
mycursor = myconn.cursor()
# mycursor.execute(" ALTER TABLE movies ADD COLUMN language VARCHAR(30)")
mycursor.execute(" ALTER TABLE movies CHANGE language language... | [
"[email protected]"
] | |
d7d8e8c5e21f43299f74516f10cb59ddbb9faaba | 9680ba23fd13b4bc0fc3ce0c9f02bb88c6da73e4 | /Bernd Klein (520) ile Python/p_20702.py | fdd42efc88e98cd52221dee5ff8c40475d982f06 | [] | no_license | mnihatyavas/Python-uygulamalar | 694091545a24f50a40a2ef63a3d96354a57c8859 | 688e0dbde24b5605e045c8ec2a9c772ab5f0f244 | refs/heads/master | 2020-08-23T19:12:42.897039 | 2020-04-24T22:45:22 | 2020-04-24T22:45:22 | 216,670,169 | 0 | 0 | null | null | null | null | ISO-8859-9 | Python | false | false | 7,337 | py | # coding:iso-8859-9 Türkçe
# p_20702.py: Grafik sınıfıyla, yumru, bağlantı, izole, yeni yumru ve bağlantı ekleme örneği.
class Grafik (object):
def __init__ (self, grafikSözlüğü=None):
if grafikSözlüğü == None: grafikSözlüğü = {}
self.__grafikSözlüğü = grafikSözlüğü
def yumrular (self)... | [
"[email protected]"
] | |
d02aa2b17cff92893dbbc39c51ae250ff988bac9 | 472578974401c83509d81ea4d832fc3fd821f295 | /python资料/day8.1/day02/exercise06.py | 55b143dd621190359b3f5a9fd71213fb7e669ccc | [
"MIT"
] | permissive | why1679158278/python-stu | f038ec89e9c3c7cc80dc0ff83b76e7c3078e279e | 0d95451f17e1d583d460b3698047dbe1a6910703 | refs/heads/master | 2023-01-05T04:34:56.128363 | 2020-11-06T09:05:16 | 2020-11-06T09:05:16 | 298,263,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | """
古代的秤,一斤十六两。
在终端中获取两,计算几斤零几两。
"""
total_liang = int(input("请输入两:"))
jin = total_liang // 16
liang = total_liang % 16
print(str(jin) + "斤零" + str(liang) + "两")
| [
"[email protected]"
] | |
67048f55cb3fb75a8cae9b2b21d1dfcb147d6a37 | 70b339d0b2638a7914d0d56c5edf8a2637c9f4b0 | /sortedSquares.py | 2903b4c61f859f1b2a07c241e19027f5d65a4f57 | [] | no_license | pflun/advancedAlgorithms | 9991da7514024e18ba08de8688966b9220e12571 | 5520dbcd26999b98e1229bf03c2f62dd690a2ddc | refs/heads/master | 2023-02-19T12:05:26.902535 | 2023-02-14T06:08:54 | 2023-02-14T06:08:54 | 189,055,701 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | class Solution(object):
# brutal force
def sortedSquares(self, A):
res = []
for a in A:
a *= a
res.append(a)
return sorted(res)
def sortedSquares2(self, A):
l = 0
r = len(A) - 1
res = []
while l <= r:
if A[l] * A[l]... | [
"[email protected]"
] | |
4c428bc89f8805b8ef2093c63845593d05c4ce62 | 39cd9aa81927c20d85d1b65e55523455626ee902 | /python_work/chapter_9/exercises/9_7_admin.py | bfa5186b5cf37e58e1617c832d9bc40acb9e8e8f | [] | no_license | SMS-NED16/crash-course-python | acf363562a813f7deb36614dc935be4ed2d07fee | e6e6cb787d208f51f114f71331c43af1ddc1e4c2 | refs/heads/master | 2020-03-09T02:29:35.241621 | 2018-04-21T16:09:16 | 2018-04-21T16:09:16 | 128,541,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,544 | py | class User():
"""A class that models a user for an online forum"""
def __init__(self, f_name, l_name,
age, city, hometown, *languages):
"""Constructor - creates attributes, initialises them"""
self.first_name = f_name;
self.last_name = l_name;
self.age = age
self.city = city
self.hometown = hometown
... | [
"[email protected]"
] | |
b8583d8e9f7866f782b43f9711befcd5252146ac | ea393959886a5cd13da4539d634f2ca0bbcd06a2 | /573.py | 42d030dc870c94f3d9e8565f14b11a340a9c8cdf | [] | no_license | zhangchizju2012/LeetCode | f605f35b82f16282559af71e4e61ec2629a90ebc | 0c4c38849309124121b03cc0b4bf39071b5d1c8c | refs/heads/master | 2020-04-05T12:12:14.810639 | 2018-08-09T10:24:52 | 2018-08-09T10:24:52 | 81,021,830 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 900 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun May 7 10:19:34 2017
@author: zhangchi
"""
class Solution(object):
def minDistance(self, height, width, tree, squirrel, nuts):
"""
:type height: int
:type width: int
:type tree: List[int]
:type squirrel: List... | [
"[email protected]"
] | |
affa813021fb253b56dceef1f271826d715e645c | 150d9e4cee92be00251625b7f9ff231cc8306e9f | /NumbersSmallerThanCurrent.py | 2bae72ae2f809266720b4eaf4ce851d1171905a7 | [] | no_license | JerinPaulS/Python-Programs | 0d3724ce277794be597104d9e8f8becb67282cb0 | d0778178d89d39a93ddb9b95ca18706554eb7655 | refs/heads/master | 2022-05-12T02:18:12.599648 | 2022-04-20T18:02:15 | 2022-04-20T18:02:15 | 216,547,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | '''
1365. How Many Numbers Are Smaller Than the Current Number
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].
Return the answer in an array.
Example 1:
In... | [
"[email protected]"
] | |
64fb7280e68ec5647db275e2630d86e34c3f4531 | 751d837b8a4445877bb2f0d1e97ce41cd39ce1bd | /codegolf/ryleys-theorem.py | d1cab6a350c802b71d7905109a1cbddc1681610b | [
"MIT"
] | permissive | qeedquan/challenges | d55146f784a3619caa4541ac6f2b670b0a3dd8ba | 56823e77cf502bdea68cce0e1221f5add3d64d6a | refs/heads/master | 2023-08-11T20:35:09.726571 | 2023-08-11T13:02:43 | 2023-08-11T13:02:43 | 115,886,967 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,365 | py | #!/usr/bin/env python
"""
S. Ryley proved following theorem in 1825:
Every rational number can be expressed as a sum of three rational cubes.
Challenge
Given some rational number r∈Q find three rational numbers a,b,c∈Q such that
r=a^3+b^3+c^3.
Details
Your submission should be able to compute a solution for every ... | [
"[email protected]"
] | |
35f1888cc5c9fc51aa085d4c3396ea1d040525b6 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /070_oop/008_metaprogramming/_exercises/templates/abc_Abstract Base Classes/a_002_abc_register.py | b8bfec0995c22298e2201c8eea4bad38aa21ba9e | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 1,704 | py | # # abc_register.py
#
# # Registering a Concrete Class
# # There are two ways to indicate that a concrete class implements an abstract API: either explicitly register the class
# # or create a new subclass directly from the abstract base. Use the register() class method as a decorator on a concrete
# # class to add it ... | [
"[email protected]"
] | |
8f0df066964b1e9be5746d2af2975bece4df73dd | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/histogram/_textangle.py | 68378b446f6808b2e7ee34ebc5568780f31bdf59 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 403 | py | import _plotly_utils.basevalidators
class TextangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(self, plotly_name="textangle", parent_name="histogram", **kwargs):
super(TextangleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | [
"[email protected]"
] | |
cfeb60f14d9f1e186676c152db7dd3af3517173d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02390/s045787689.py | a21b79fd1538b4ffbba1f951c4b89420ceafd49e | [] | 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 | 83 | py | sec=int(input())
print(":".join(map(str, [int(sec/3600), int(sec/60)%60, sec%60]))) | [
"[email protected]"
] | |
96eb608a4aec47b59d732212d9a262773a22af35 | a428f3465eb1f8b038acf96b4f6bdc1d4bb9786b | /src/developer/main/uvtools/widget/ui/moveuvUI.py | 0969c5d1fe159d8e423a4d8822bb25b97e948fdf | [] | no_license | code-google-com/mayatools | 1672137562beae17803cd0ea267e0247528ba1a1 | f2177440b9e5316fdc2fe4d41bf64b504cb8bab7 | refs/heads/master | 2020-12-24T14:57:25.711451 | 2014-11-06T11:46:52 | 2014-11-06T11:46:52 | 32,266,328 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,095 | py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\maya_Tools\src\developer\main\uvtools\widget\ui\moveuvUI.ui'
#
# Created: Thu Oct 23 16:43:13 2014
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGu... | [
"trungswat@8bed79ed-7f0b-6351-1bc4-4d70257ffec2"
] | trungswat@8bed79ed-7f0b-6351-1bc4-4d70257ffec2 |
1b5b98a0ebbbde2b3c9439d1ebe83df300ce4cec | e5eec1428da1d24d3e9b86f5723c51cd2ca636cd | /graph/크루스칼 알고리즘.py | ae3bd36d2be0371b0a25c5e8ea7b41ba0d1f97a7 | [] | no_license | jamwomsoo/Algorithm_prac | 3c36c381f59277721517d331a8f1640399d80c1d | 8393f3cc2f950214c47f3cf0b2c1271791f115d0 | refs/heads/master | 2023-06-09T06:49:14.739255 | 2021-06-18T06:41:01 | 2021-06-18T06:41:01 | 325,227,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | # 특정 원소가 속한 집합을 찾기
def find_parent(parent, x):
# 루트 노드가 아니라면, 루트 노드를 찾을 때까지 재귀적으로 호출
if parent[x] != x:
parent[x] = find_parent(parent, parent[x])
return parent[x]
# 두 원소가 속한 집합을 합치기
def union_parent(parent, a, b):
a = find_parent(parent, a)
b = find_parent(parent, b)
if a < b:
... | [
"[email protected]"
] | |
2bea1ae3617b943a23524ad0d2ec64b1e7edbabf | 38422c3edeb269926502fed31a0761aff8dd3d3b | /Swanepoel_analysis/Swanepoel_Python3_PyQt5_v180101/Swanepoel_GUI_v5.py | 1e6a933adde3406d72566e4c768e5fbd2247c0b9 | [] | no_license | vfurtula/Alle-projekter | 2dab3ccbf7ddb6be3ee09f9f5e87085f354dd84a | da3d7c9611088043e2aea5d844f1ae6056215e04 | refs/heads/master | 2022-06-07T05:17:35.327228 | 2020-04-30T10:28:48 | 2020-04-30T10:28:48 | 260,180,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,164 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 12 09:06:01 2018
@author: Vedran Furtula
"""
import matplotlib.pyplot as plt
import os, sys, re, time, numpy, yagmail, configparser, pathlib
from PyQt5.QtCore import QObject, QThreadPool, QTimer, QRunnable, pyqtSignal, pyqtSlot, Qt
from PyQt5.QtGui i... | [
"[email protected]"
] | |
a439223a06d02e7d8088ceb8471a3751f271d18a | 2e0e549394fefc3e7332170603f0be3b96fcb8f5 | /src/compas_ghpython/artists/lineartist.py | e6f8a82ad85c337d0de61df00022aa80fe98d0ce | [
"MIT"
] | permissive | irfanirw/compas | 02f6f15dc2e20de886faf5d77420fd55f6a03c4e | 41048e71610c3e063e3e9085440b3cba0a00b603 | refs/heads/master | 2022-11-29T18:59:18.344232 | 2020-08-17T19:04:14 | 2020-08-17T19:04:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_ghpython
from compas_ghpython.artists.primitiveartist import PrimitiveArtist
__all__ = ['LineArtist']
class LineArtist(PrimitiveArtist):
"""Artist for drawing lines.
Parameters
--... | [
"[email protected]"
] | |
b124149598b75875c924a95d429ff80af9708bdd | c9bae3b822cf8c098e656486d455d88646d1712b | /starnavi_task/settings.py | db077ea080b9e03e959ce8620862d8c3de3557a8 | [] | no_license | sergiy-chumachenko/starnavi | f9967eeeec8803b58ecb0bdab28063431afc9cc7 | 1aa901ba42be1ef4322c9766ec58edecca07ce74 | refs/heads/master | 2022-12-10T20:25:46.923932 | 2020-07-18T17:22:07 | 2020-07-18T17:22:07 | 172,897,429 | 2 | 0 | null | 2022-12-08T01:39:44 | 2019-02-27T10:49:10 | Python | UTF-8 | Python | false | false | 5,260 | py | """
Django settings for starnavi_task project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import... | [
"[email protected]"
] | |
f59b3577b280e77e01de5f4b1a661591fa9d69c2 | 8d23f941ade6e18df9094760c4e3ad5676e96fef | /advanced/05/05pymsql.py | f0982c9fb3bf720ae5266437de8f47d03b214b74 | [] | no_license | asdwsxzc123/python | 95c7b6ed39d47a48e5a2630a3f221c20a8347764 | b2422a7c6b62d4bfa9d1488a6dff322a57ba4c48 | refs/heads/master | 2020-04-03T14:34:06.299282 | 2019-02-05T13:14:16 | 2019-02-05T13:14:16 | 155,326,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | from pymysql import connect
# 链接数据库
conn = connect(host='172.16.20.46', port=3306, user='root', password='123456', database='jing_dong', charset='utf8')
# 获取cursor对象
cs1 = conn.cursor()
# sql注入
# # 执行select语句
# cs1.execute('select * from goods;')
# # print(row)
# for row in cs1.fetchall():
# print(row)
# 插入数据
... | [
"[email protected]"
] | |
e76a57551d81a6271b7c5fa8396a47b474218e4a | 432c55838cad26bb6233a799e35e9187a3451434 | /q2_diversity/tests/test_beta_correlation.py | f511afbe0c9ea946466122955ad84cfb567a9924 | [
"BSD-3-Clause"
] | permissive | wasade/q2-diversity | 5a46d7a34bfae05d26fd285f2bfd180e55d58f2a | cdcf24c551a8ca4246dce658fd6b608b174e224d | refs/heads/master | 2023-06-27T19:16:48.985517 | 2018-08-31T21:56:10 | 2018-08-31T21:56:10 | 150,510,254 | 0 | 0 | BSD-3-Clause | 2018-09-27T01:19:35 | 2018-09-27T01:19:35 | null | UTF-8 | Python | false | false | 1,744 | py | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | [
"[email protected]"
] | |
ddbedb9961f05627dcdc40f9668733b593051ada | e7190289cea8006fb99a54347a57439cdd7047b8 | /stock/industry/tonghuashun_industry-master/industry_current.py | 3100023a4c07be3e3a7b23b8aae3a3b4853d9479 | [] | no_license | hong0396/start_up_git | 282fe3845ad4c81ee7b23785a73052e3a5749fea | a6f9fa2da126382577e05869ff5a2fc98e29a7fb | refs/heads/master | 2021-07-09T06:16:16.955217 | 2019-03-30T13:43:13 | 2019-03-30T13:43:13 | 119,171,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,030 | py | #coding:utf-8
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
from selenium import webdriver
from sqlalchemy import create_engine
import datetime
import pymysql
import requests
import pandas as pd
import time
import random
import re
#获取动态cookies
def get_cookie():
options = webdri... | [
"[email protected]"
] | |
f0eb93788821d074784c29b88e667723b67a6989 | 10d17864a685c025bb77959545f74b797f1d6077 | /capitulo 02/02.22.py | bbe2a8217430cbaaf8609a9daa1183c8464aeb0a | [] | no_license | jcicerof/IntroducaoPython | 02178d2dfcaa014587edbd3090c517089ccef7c2 | 02e619c7c17e74acdc3268fbfae9ab624a3601dd | refs/heads/master | 2020-04-24T18:12:21.422079 | 2019-02-23T05:14:43 | 2019-02-23T05:14:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2019
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3
# Terce... | [
"[email protected]"
] | |
1b185f68bd117dbd36f56f53bb64319b0b1072cf | f8580d2c963b6a3c34e918e0743d0a503a9584bd | /unittests/test_dcDrawLists.py | f72721a02be41c67ddfde98034ae0e79396d6ec2 | [] | no_license | pypy/wxpython-cffi | f59c3faeed26e6a26d0c87f4f659f93e5366af28 | 877b7e6c1b5880517456f1960db370e4bb7f5c90 | refs/heads/master | 2023-07-08T21:13:22.765786 | 2016-12-02T22:10:45 | 2016-12-02T22:10:45 | 397,124,697 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,196 | py | import imp_unittest, unittest
import wtc
import wx
import random
try:
import numpy as np
haveNumpy = True
except ImportError:
haveNumpy = False
#---------------------------------------------------------------------------
w = 600
h = 400
num = 500
colornames = ["BLACK",
"BLUE",
"BLUE... | [
"[email protected]"
] | |
6a598ec973d39b8857bf8e4b3513591117312264 | c036befbd9a4b81c0f082273dd0eb007e7f9582d | /dort-core/util/ints.py | fae6a3dcebe1b48a086026ebb082e01903b1f5c2 | [
"Apache-2.0"
] | permissive | Dortchain/dort-blockchian | 889f52f36dcdeffe0f852b413cdd32879741462f | 14f16e321a60f9d70f849f58e4e9964fa337a084 | refs/heads/main | 2023-06-16T01:31:30.718415 | 2021-07-11T03:03:12 | 2021-07-11T03:03:12 | 384,694,718 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,995 | py | from typing import Any, BinaryIO
from Dort.util.struct_stream import StructStream
class int8(StructStream):
PACK = "!b"
class uint8(StructStream):
PACK = "!B"
class int16(StructStream):
PACK = "!h"
class uint16(StructStream):
PACK = "!H"
class int32(StructStream):
PACK = "!l"
class uint... | [
"[email protected]"
] | |
48fa8d2e0ea8bb9d65ab82b01db7bab8b5d6fe5c | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /HXkpnCxJgxkFwaReT_10.py | 0ac63cec767a5f117ae4d9a6bd8853f9c41acfad | [] | 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,039 | py | """
Given a function that accepts **unlimited** arguments, check and count how
many data types are in those arguments. Finally return the total in a list.
List order is:
[int, str, bool, list, tuple, dictionary]
### Examples
count_datatypes(1, 45, "Hi", False) ➞ [2, 1, 1, 0, 0, 0]
count_datatype... | [
"[email protected]"
] | |
221b3f687c962dfdad26902aaab6ea7207f0a7f4 | 3f16e66b33b39df8866947fcf1d8249476725c03 | /mymodule/main2.py | d795c5f9a1a68ab6babb2f8a5d75a813193cacd7 | [] | no_license | VadimVolynkin/learning_python3 | ea3559e0f01b4c9e09ae82b76ca315de8e41ecc4 | 872f0a2ac296ec3242ac9b81f63a29f09bc614fa | refs/heads/main | 2023-08-10T05:39:04.376172 | 2021-09-07T14:44:20 | 2021-09-07T14:44:20 | 339,133,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25 | py |
m2 = 'hello from m2'
| [
"[email protected]"
] | |
8888162efa48c3b16541f45d0afbca742d5c9197 | f504253210cec1c4ec6c3ea50a45564db7d6cd7f | /prettyqt/custom_widgets/adjustingboxlayoutdockwidget.py | 35beb69676ef4e03eeb813230ff08764a12d6637 | [
"MIT"
] | permissive | phil65/PrettyQt | b1150cb4dce982b9b8d62f38f56694959b720a3e | f00500d992d1befb0f2c2ae62fd2a8aafba7fd45 | refs/heads/master | 2023-08-30T21:00:08.905444 | 2023-08-17T12:24:45 | 2023-08-17T12:24:45 | 177,451,205 | 17 | 5 | MIT | 2020-08-15T22:21:18 | 2019-03-24T18:10:21 | Python | UTF-8 | Python | false | false | 2,620 | py | from __future__ import annotations
from prettyqt import constants, widgets
DockWidgetArea = constants.DockWidgetArea
class AdjustingBoxLayoutDockWidget(widgets.DockWidget):
"""DockWidget adjusting its child widget QBoxLayout direction.
The child widget layout direction is set according to dock widget area... | [
"[email protected]"
] | |
c95ff0ea213f72ba08dca8053a412519590fdd91 | c89543dd926c1787c40616ed174a3d1371c54449 | /superset/views/users/api.py | 675b918847c461140578a642453c1a429f620198 | [
"Apache-2.0",
"OFL-1.1"
] | permissive | j420247/incubator-superset | 7c7bff330393f0e91f5e67782f35efe8c735250a | c9b9b7404a2440a4c9d3173f0c494ed40f7fa2bd | refs/heads/master | 2023-03-11T21:53:16.827919 | 2023-02-03T19:04:17 | 2023-02-03T19:04:17 | 157,780,350 | 1 | 1 | Apache-2.0 | 2023-03-07T00:14:51 | 2018-11-15T22:24:29 | TypeScript | UTF-8 | Python | false | false | 3,465 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"[email protected]"
] | |
9061a8446b430d608a4cab7867f06179ed62a610 | 65f5a6e6455cc76558dfcc95a9b2a42aeb3f4205 | /add_contextual_info.py | d525a56fa2fb24b5f5497ae7a2d20d022a748ab8 | [
"MIT"
] | permissive | robertdstein/millipede_parser | af84b3bd650215e09d200bff67fea11cc52cd031 | 7f3ad22aea3eca6385e55fd084ce43b2d7000f92 | refs/heads/master | 2020-08-12T19:12:59.643359 | 2020-01-06T16:01:40 | 2020-01-06T16:01:40 | 214,826,592 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,639 | py | import pickle
import os
import numpy as np
from astropy.io import fits
from astropy.time import Time
import argparse
from parse_archival_scan import get_v0_output_dir
from contextual_info import archival_data
import healpy as hp
import logging
import requests
def extract_az_zen(nside, index):
return hp.pix2ang(nsi... | [
"[email protected]"
] | |
6707141a302ed93cafaf82cad187723588c435d7 | 769d4ba08db6ad3707d8435b2d6ec3ca7fbf4a5d | /blender/arm/lib/make_datas.py | 9b55b2ad2b1abb6ce38c1f0db1a1ca12ec5f1e2f | [
"GPL-2.0-only",
"Zlib"
] | permissive | Leonix/armory | 9f2eee057f2fa66efc306e9e832806aa6ea124ba | 3eaf2dc569d7caf4a7a7c928575d45cbb9aa3c14 | refs/heads/master | 2020-04-15T11:45:55.385644 | 2019-01-07T14:41:06 | 2019-01-07T14:41:06 | 164,643,287 | 0 | 0 | Zlib | 2019-01-08T12:22:26 | 2019-01-08T12:22:25 | null | UTF-8 | Python | false | false | 10,943 | py | import os
import arm.utils
import arm.assets as assets
def parse_context(c, sres, asset, defs, vert=None, frag=None):
con = {}
sres['contexts'].append(con)
con['name'] = c['name']
con['constants'] = []
con['texture_units'] = []
con['vertex_elements'] = []
# Names
con['vertex_shader'] =... | [
"[email protected]"
] | |
0325fa1080c27994e0fa2c8ee857985828ccad3d | 5c72a7214bcf1d0cf185bce57393b201cf1b9dd9 | /pyigm/surveys/tests/test_llssurvey.py | 4545d6d8d0a006e1798263ad87f132c1a49e6145 | [] | no_license | JianiDing/pyigm | 6e9b960a0e8617e8861f45b0699f5e1847b5aff8 | d72f84a27fb25386aab8035bd49b21b37008f0af | refs/heads/master | 2021-08-24T09:06:49.810451 | 2017-12-07T01:17:53 | 2017-12-07T01:17:53 | 110,727,652 | 1 | 0 | null | 2017-12-09T00:00:27 | 2017-11-14T18:18:43 | Python | UTF-8 | Python | false | false | 2,416 | py | # Module to run tests on initializing AbsSurvey
# TEST_UNICODE_LITERALS
import numpy as np
import glob, os, imp, pdb
import pytest
from pyigm.surveys.llssurvey import LLSSurvey
from ..lls_literature import load_lls_lit
remote_data = pytest.mark.remote_data
lt_path = imp.find_module('linetools')[1]
'''
def data_pa... | [
"[email protected]"
] | |
7e539a9efa9026a14bd5bab19690d3be70235f37 | 951e433b25a25afeea4d9b45994a57e0a6044144 | /NowCoder/百度_二叉树深度.py | d30d251bea18bf6991eba6cc5047bd36ce19bac8 | [] | no_license | EricaEmmm/CodePython | 7c401073e0a9b7cd15f9f4a553f0aa3db1a951a3 | d52aa2a0bf71b5e7934ee7bff70d593a41b7e644 | refs/heads/master | 2020-05-31T14:00:34.266117 | 2019-09-22T09:48:23 | 2019-09-22T09:48:23 | 190,318,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from tool import TreeNode
def depth(root):
# 递归
if not root:
return 0
return max(depth(root.left), depth(root.right)) + 1
def depth1(root):
# 层次遍历:队列
depth = 0
tmp = []
tmp.append(root)
while tmp:
depth += 1
for i in range(len(tmp)):
new = tmp[0]
... | [
"[email protected]"
] | |
715651fb3db0cf699d68d033c0188c829fb5d7bc | 8b713697ba8c40179393e069f07d750480c21d4a | /django_tutorial/test.py | 21287d83ef06d9670784440e3ce3f515b7d1db5c | [] | no_license | navill/pytest_tutorial | ca24bcd742d5f8c7273694ebf0a0dd38af095bdb | 27b4d163abe8581996503c851949c9f75aebb786 | refs/heads/master | 2023-02-02T03:06:11.784673 | 2020-12-23T04:53:16 | 2020-12-23T04:53:16 | 323,780,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | import pytest
from django.test import TestCase
from django.contrib.auth.models import Group, User
class MyTest(TestCase):
fixtures = ['group.json', 'user.json']
def test_should_create_group(self):
group = Group.objects.get(pk=1)
self.assertEqual(group.name, 'appusers')
def test_should_cr... | [
"[email protected]"
] | |
f7a4ceae9be0677a9d7c43d574dbb721e9efbe82 | 52ba0511e188a289f73a226f616d0f34bd96ebdb | /blog/models.py | 9a2f84d21a454b24a62e1c3f0bc9a3f456aa58db | [] | no_license | Tyaro2/my-first-blog | a4d96e33481e3a5a4373b41c4e5099f2c9561837 | 7d3139a010be719d96b4e94f9439c083078ff1c3 | refs/heads/master | 2023-04-04T05:12:03.278013 | 2021-04-06T09:36:29 | 2021-04-06T09:36:29 | 339,306,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,338 | py | from django.conf import settings
from django.db import models
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.models import PermissionsMixin
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_u... | [
"[email protected]"
] | |
11465b5b97e1db0d850bb05e9a72d69ab7a6968f | 62fe739a9485a2bf547b6d96777f6a01c32dd2f5 | /tarefas/forms.py | 8b1285266859e81df676add9789352e1a9f79d9d | [] | no_license | jgjefersonluis/pdmytest1 | 950c84016a153e931f49b47a7366d7677dfeb62d | 7bb3b377af1fdffe2ad307352a82e2f39005b909 | refs/heads/master | 2023-06-16T14:36:01.388219 | 2021-06-29T05:27:51 | 2021-06-29T05:27:51 | 380,875,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from django import forms
from tarefas.models import Tarefas
class TarefasModelForms(forms.ModelForm):
class Meta:
model = Tarefas
fields = '__all__' | [
"[email protected]"
] | |
117d079ed37845edbeb098e4e4257bb6044dda54 | 05f06a1b104526c5262289e663df855e1335f32a | /User/views.py | 682030b507801c942c3b37a8305cfb6ddf3afb55 | [] | no_license | Harshvartak/E-commerce-DRF | 784ebecce95730996a9553fef1f3a9218e942749 | b2eea09d7f965b8e8c9397f636c7ea8703813539 | refs/heads/master | 2022-12-13T11:39:11.854643 | 2020-01-03T07:54:41 | 2020-01-03T07:54:41 | 229,832,815 | 0 | 0 | null | 2022-11-22T04:19:28 | 2019-12-23T22:41:40 | JavaScript | UTF-8 | Python | false | false | 714 | py | from django.shortcuts import render
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework.authtoken.models import Token
from .serializers import RegistrationSerializer
@api_view(['POST', ])
def registration_view(request):
... | [
"[email protected]"
] | |
8c68a5907b798fbc88de11c624c0c63918f8322b | 46d13216824f95f29da7672bf83ae1128a835a97 | /tests/unittests/test_user.py | 4a07b07fb597d183b4ae04f5c989e43c5abc6294 | [] | no_license | lucascandidoff/crudzin | 0a426b754d925e2990dd60cdd9cf2f90424c68b6 | bad721c62fa5f7f9905724838dbc61113ccc25ec | refs/heads/master | 2022-11-27T22:03:45.185391 | 2020-08-01T12:40:51 | 2020-08-01T12:40:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | from flask import url_for
from flask_base_tests_cases import TestFlaskBase
class TestUserBP(TestFlaskBase):
def test_api_deve_registrar_usuario_na_base(self):
user = {
'username': 'test',
'password': '1234'
}
esperado = {
'id': '1',
'usernam... | [
"[email protected]"
] | |
737252ca9ba41c369ac7335e2c5f7e8fcb7042d2 | 1721445a6635af8604a1f2693660bb0c4ae88ca8 | /6/dest.py | 4eec336a4587bfb3fd4f69becc8e2938e75848a9 | [] | no_license | nelhage/aoc2018 | fdc01f557f9d9b82b533decaff64ebbe1909f9ba | c42a44ea2f86bf42ab4a0c9034f75a6827daf69e | refs/heads/master | 2020-04-13T06:50:10.134072 | 2018-12-25T18:07:31 | 2018-12-25T18:07:31 | 163,032,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | import numpy as np
import sys
coords = [list(map(int, line.rstrip().split(", "))) for line in sys.stdin]
xs = np.array([x for (x, y) in coords])
ys = np.array([y for (x, y) in coords])
def closest(x, y):
ds = np.abs(xs - x) + np.abs(ys - y)
m = np.argmin(ds)
if np.sum(ds == ds[m]) == 1:
return m
return No... | [
"[email protected]"
] | |
254d63e307baef0548c91c75b02f9877069f9a09 | f52cc8feb8c7cc18fdc8dc29359eb26409a26cad | /huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/__init__.py | 3cb57de739e08584db2dd9d63415b326aa152bd4 | [
"Apache-2.0"
] | permissive | KingfaLuis/huaweicloud-sdk-python-v3 | b8890d6a289366a69ab974a8130fee9a7a4f6fd2 | 114bc594ccced867189b74ee4915a7ec2ba7f226 | refs/heads/master | 2023-02-14T16:06:52.790497 | 2020-12-31T10:02:03 | 2020-12-31T10:02:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,807 | py | # coding: utf-8
from __future__ import absolute_import
# import BssintlClient
from huaweicloudsdkbssintl.v2.bssintl_client import BssintlClient
from huaweicloudsdkbssintl.v2.bssintl_async_client import BssintlAsyncClient
# import models into sdk package
from huaweicloudsdkbssintl.v2.model.account_manager import Accou... | [
"[email protected]"
] | |
0ab99563f7ecd9e09c49f930b365411a52e51bb9 | 5c7f2ce11f440c1abc1e2052c1ec725fadb3e8c9 | /ckanext/youckan/controllers/organization.py | 0bf3b89e498d1fd7027313f5e49ceff6fa1450a8 | [] | no_license | morty/ckanext-youckan | e06f2877270ba215b3dbbbb5b8a8c21ab33f71f6 | 8303e94363805a49d3cf93ee5216c7135b22e481 | refs/heads/master | 2021-01-18T07:47:11.510353 | 2014-02-26T14:24:03 | 2014-02-26T14:24:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,114 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from ckan import model
from ckan.model import Group
from ckan.plugins import toolkit
from ckanext.youckan.controllers.base import YouckanBaseController
from ckanext.youckan.models import MembershipRequest
DB = model.meta.Session
log = ... | [
"[email protected]"
] | |
b029233ca5db7a28e56f90072761bd0020303006 | e781909485258415cb01e2bb2f7aaaaa0b14eb3b | /trunk/pyinstaller-1.3/optparse.py | 8d231fe52eed9349d83fc923a56d765d04b3f47f | [] | no_license | BGCX067/fabriciols-svn-to-git | 408cce031243125ed13c1b01deeb077c55519ac6 | 6fbd5eccdc8af831e3c7f3a313a5c300ab39b4aa | refs/heads/master | 2016-09-01T08:53:02.311545 | 2015-12-28T14:39:38 | 2015-12-28T14:39:38 | 48,847,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | """
optparse -- forward-compatibility wrapper for use with Python 2.2.x and
earlier. If you import from 'optparse' rather than 'optik', your code
will work on base Python 2.3 (and later), or on earlier Pythons with
Optik 1.4.1 or later installed.
"""
from optik import __version__, __all__
from optik import *
... | [
"[email protected]"
] | |
c6a65f5a53a29204372352da2ae26a5aa39b946b | 195b8d12796872c05d539aa9283fc3f407b8d8b5 | /python-cinderclient/tests/v1/fakes.py | ed0a640205d1db699fbed6ee2e955407cea334c1 | [
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | rvbelapure/openstack-nova-sched | afaa5928da3a8430b64bc23aedb251bae0e7d3ef | 325da0e08979d79b7470d7506ced1b4210e2b696 | refs/heads/master | 2021-01-17T05:28:44.474242 | 2013-04-20T21:18:35 | 2013-04-20T21:18:35 | 9,082,500 | 0 | 1 | null | 2021-09-07T08:33:18 | 2013-03-28T17:30:46 | Python | UTF-8 | Python | false | false | 10,355 | py | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2011 OpenStack, 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
#
... | [
"[email protected]"
] | |
0a17c4a3a96f46c1b448dc93700c7c55373c4752 | e9757274ddb8484e27590ff0cc3f24550776c6cc | /Solved/0072/0072.py | 55dea79789686cbd455c67813dc7f05c68eda8de | [] | no_license | Jinmin-Goh/LeetCode | 948a9b3e77eb03507aad6f3c78640aa7f00e6ad5 | d6e80b968032b08506c5b185f66d35c6ff1f8bb9 | refs/heads/master | 2020-09-22T10:22:18.443352 | 2020-09-06T06:34:12 | 2020-09-06T06:34:12 | 225,153,497 | 1 | 1 | null | 2020-01-29T15:16:53 | 2019-12-01T11:55:25 | Python | UTF-8 | Python | false | false | 2,045 | py | # Problem No.: 72
# Solver: Jinmin Goh
# Date: 20191228
# URL: https://leetcode.com/problems/edit-distance/
import sys
# good solution link: https://leetcode.com/problems/edit-distance/discuss/159295/Python-solutions-and-intuition
class Solution:
def minDistance(self, word1: str, word2: str) -> int:
... | [
"[email protected]"
] | |
83a51b7834034e76de94905bbd610c06a4d17331 | 587dbdf730b6cc3e693efc5dca5d83d1dd35ee1a | /extra/exam/tencent/t4.py | a3655900a722fb09c95050c6251460968144bb67 | [] | no_license | Rivarrl/leetcode_python | 8db2a15646d68e4d84ab263d8c3b6e38d8e3ea99 | dbe8eb449e5b112a71bc1cd4eabfd138304de4a3 | refs/heads/master | 2021-06-17T15:21:28.321280 | 2021-03-11T07:28:19 | 2021-03-11T07:28:19 | 179,452,345 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 713 | py | # -*- coding: utf-8 -*-
# ======================================
# @File : t4.py
# @Time : 2020/5/10 20:35
# @Author : Rivarrl
# ======================================
def f(n, board):
def dfs(l, r, x=0):
if l > r: return 0
if l == r: return board[l]
res = mi = min(board[l:r+1]) - x
... | [
"[email protected]"
] | |
90d367495fd4f5c2f02d3b37e2e010af2cff3534 | c7faffdc340eb72737315efb017beee97cbd016d | /GetSharedWithAnyoneTeamDriveACLs.py | 52723eee417c2f398f7db170df420c32af2f7da5 | [] | no_license | boussagf/GAM-Scripts | d4b1c840cc2d25e67960262758b2a59f844d452b | bc1e05ddd4e9c94a3fd78c4566fe1df13a8d2e68 | refs/heads/master | 2020-04-29T16:35:57.279614 | 2019-03-01T18:43:49 | 2019-03-01T18:43:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,418 | py | #!/usr/bin/env python2
"""
# Purpose: For a Google Drive User(s), delete all drive file ACLs for Team Drive files shared with anyone
# Note: This script requires Advanced GAM with Team Drive support:
# https://github.com/taers232c/GAMADV-XTD, https://github.com/taers232c/GAMADV-XTD3
# Customize: Set FILE_NAME and ALT_F... | [
"[email protected]"
] | |
1397d36dbb305c040e0bbfc8b2899aeedbdc85a6 | 22bbb6b46239db876059a4ba43999cf4ddcd0e1e | /train_vidreid_xent_htri.py | 69c4b5f3f02591ed5cbb22b499cfafa4c80bb015 | [
"MIT"
] | permissive | honglongcai/deep-person-reid | 9c524ce379a8ae2a24c9da0460dc2ff8457dd262 | 478da99655849f471ebade2ab50f6bc4976cf2dd | refs/heads/master | 2020-04-03T17:44:00.874297 | 2018-10-25T16:45:00 | 2018-10-25T16:45:00 | 155,457,232 | 1 | 0 | MIT | 2018-10-30T21:15:35 | 2018-10-30T21:15:34 | null | UTF-8 | Python | false | false | 15,983 | py | from __future__ import print_function
from __future__ import division
import os
import sys
import time
import datetime
import argparse
import os.path as osp
import numpy as np
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
from torch.optim import lr_sch... | [
"[email protected]"
] | |
f439595cb39ef495936efad8712fa16400e44651 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Introduction_to_numerical_programming_using_Python_and_CPP_Beu/Ch04/Python/P04-SortComp0.py | 75189e60cc98e52081bce1ec35954c3f6ea24a9d | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 5,186 | py | # Comparison of operation counts for sorting methods
from random import *
#============================================================================
def BubbleSort(x, n):
#----------------------------------------------------------------------------
# Ascending sort of array x[1..n] by modified bubble sort
#... | [
"[email protected]"
] | |
8a93acb3e5d67ecd8aa7a59639df91384b829756 | 8e0070b28f5377b94c50de2c979f92194a4ac88d | /tests/test_svg_colorful.py | 6b5c35925b757675b537c35c42fe91fbd1853ceb | [
"BSD-3-Clause"
] | permissive | AgentIvan/segno | c04ce887c3ee71ae0173d8e7653442fa16eea3b5 | 1033b9d21c6d82cf76f90927702f79599097ca1d | refs/heads/master | 2023-07-26T04:30:52.640466 | 2021-08-30T21:06:42 | 2021-08-30T21:06:42 | 416,811,279 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,735 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - 2020 -- Lars Heuer
# All rights reserved.
#
# License: BSD License
#
"""\
SVG related tests for multicolor support.
"""
from __future__ import absolute_import, unicode_literals
import io
import xml.etree.ElementTree as etree
import pytest
import segno
from segno import w... | [
"[email protected]"
] | |
84052a80f462cd5b12c1788672f6bf0953a8177f | 128dac2cee9a1022fafcc15a8d4903af678d88ee | /066. Plus One.py | 0875b8224bda1402b93baa32b1120090bfe89fbb | [] | no_license | wangtaodd/LeetCodeSolutions | b998d9de408bc2e01b6bff11fcb315b453389bc8 | 364107c1a74b2fbe72cbf7076f38b9089f7017fb | refs/heads/master | 2021-09-11T19:21:10.223002 | 2018-04-11T11:18:32 | 2018-04-11T11:18:32 | 125,821,429 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | """
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.
You may assume the integer do not contain any leading zero, except the number 0 itself.
The digits are stored such that the most significant digit is at the head of the list.
"""
class Solution(object):
def plu... | [
"[email protected]"
] | |
5a1e56872d5452c032dc23c23ca192b621aa38e1 | a296dc8f628111cab2b5b96cc22fb1b35f776a1d | /arbitrage/public_markets/paymiumeur.py | 009e357742af71f7cb84d275af7b1d5d2d6a43d1 | [
"MIT"
] | permissive | caojun105/bitcoin-arbitrage | e67e9c6bfb4280f1f3cc79292844f2365a28f964 | 9677b77829005c928c7a0b738c5fd28ad65a6331 | refs/heads/master | 2021-01-18T20:47:54.084419 | 2016-07-08T07:31:56 | 2016-07-08T07:31:56 | 63,140,117 | 2 | 0 | null | 2016-07-12T08:22:20 | 2016-07-12T08:22:19 | null | UTF-8 | Python | false | false | 1,112 | py | import urllib.request
import urllib.error
import urllib.parse
import json
from .market import Market
class PaymiumEUR(Market):
def __init__(self):
super(PaymiumEUR, self).__init__("EUR")
# bitcoin central maximum call / day = 5000
# keep 2500 for other operations
self.update_rate =... | [
"[email protected]"
] | |
f74c1bef0bbf6a21fca6e1d069017b460f2ca0e0 | 03e7552ca43d6d1be2c867acfb013da2a96a32c1 | /examples/drake/manipulation_station/manipulation_station_plan_runner.py | 31ed4ba6e31afad4714fdea3e4611444363dee50 | [
"MIT"
] | permissive | ronuchit/pddlstream | 65a7c1b789363636219cb2127604007dd5d838f2 | 3471834ce5f6710c9871dd1dad94365fd5b5c0a9 | refs/heads/master | 2021-07-17T11:07:05.974594 | 2020-07-13T15:37:03 | 2020-07-13T15:37:03 | 196,050,963 | 2 | 0 | MIT | 2019-07-09T17:07:07 | 2019-07-09T17:07:07 | null | UTF-8 | Python | false | false | 9,446 | py | import numpy as np
import sys
from pydrake.all import (
BasicVector,
LeafSystem,
PortDataType,
)
from pydrake.util.eigen_geometry import Isometry3
from pydrake.trajectories import (
PiecewisePolynomial
)
from pydrake.math import RollPitchYaw
from robot_plans import *
class ManipStationPlanRunner(Lea... | [
"[email protected]"
] | |
647b30379f37a277c78f8b6e9cfad34e77374880 | 18da2e6f54184313f9d36107fd7d6a60acc3df92 | /0x0F-python-object_relational_mapping/model_state.py | dc00ab58c9b0ba6aab8f141c4ec7660efe4e191c | [] | no_license | decolnz/HS_higher_level_programming | a92311faed6ecdeeb6db81ebd8da330126d0e139 | 4ff903992945e7f021db9a7e7499dccd35395446 | refs/heads/master | 2022-07-09T12:34:57.847768 | 2020-05-15T06:45:39 | 2020-05-15T06:45:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | #!/usr/bin/python3
"""
Creating a class
"""
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class State(Base):
"""Class State"""
__tablename__ = 'states'
id = Column(Integer, autoincrement=True, unique=True, nullable=False... | [
"[email protected]"
] | |
762f66561d8648aca6e0784e3ebccc8d36a7e4c0 | 3ead257c7b6413fd6f0831652f367b926f39f337 | /data/cites/utils.py | 1107ce533303981d9e6153144a29dfeba0b07994 | [] | no_license | syyunn/tex | 88558b993f561f0370e9b8ad1500220f6c7578c9 | 6b5976c2f668d115ef2dbfa22cd16d1fac9c2b0c | refs/heads/master | 2022-12-31T21:09:05.073341 | 2020-10-21T11:27:41 | 2020-10-21T11:27:41 | 300,886,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,323 | py | def create_cooccurrence_matrix(cites):
"""Create co occurrence matrix from given list of sentences.
Returns:
- vocabs: dictionary of word counts
- co_occ_matrix_sparse: sparse co occurrence matrix
Example:
===========
sentences = ['I love nlp', 'I love to learn',
'nlp i... | [
"[email protected]"
] | |
e18b3657bcf036d792f980438845cacd61d5bd51 | 9adc810b07f7172a7d0341f0b38088b4f5829cf4 | /experiments/shikhar/corl2019/mulitobj_cvae/multiobj_cvae2.py | 23bef1e12a07541089ac824be0af1db3efcbb747 | [
"MIT"
] | permissive | Asap7772/railrl_evalsawyer | 7ee9358b5277b9ddf2468f0c6d28beb92a5a0879 | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | refs/heads/main | 2023-05-29T10:00:50.126508 | 2021-06-18T03:08:12 | 2021-06-18T03:08:12 | 375,810,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,161 | py | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in
from rlkit.launchers.launcher_util import run_experiment
# from rlkit.torch.grill.launcher... | [
"[email protected]"
] | |
2a21be4baa493ba4ebbd659cb4cf4c518e170455 | 11583bb4cbcd1518bec8f1316cb3588b2bc2c1c6 | /zaif_last_price.py | c57d70cc6face15056fbc3e7e9755b12f1a1cb0f | [] | no_license | aki-06/zaif_last_price | e41ac7bfa55f6a5e959e0b757ec4f6924e69a0aa | 2f6eae8f1df5443d8da0776f2a617a1b7b938a06 | refs/heads/master | 2021-08-14T11:31:48.766514 | 2017-11-15T14:25:38 | 2017-11-15T14:25:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | import zaifapi
from zaifapi import *
if __name__ == '__main__':
zaif = ZaifPublicApi()
zaif_btc_jpy = zaif.last_price(('btc_jpy'))
zaif_xem_jpy = zaif.last_price(('xem_jpy'))
zaif_eth_jpy = zaif.last_price(('eth_jpy'))
zaif_mona_jpy = zaif.last_price(('mona_jpy'))
zaif_bch_jpy = zaif.last_... | [
"[email protected]"
] | |
d29d81888de9710a4d0837f9f00eb13263a04e23 | a9e3f3ad54ade49c19973707d2beb49f64490efd | /Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/theming/helpers.py | 0e1da2a4ae268d323d4b630e7673b15f47aacfce | [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | luque/better-ways-of-thinking-about-software | 8c3dda94e119f0f96edbfe5ba60ca6ec3f5f625d | 5809eaca7079a15ee56b0b7fcfea425337046c97 | refs/heads/master | 2021-11-24T15:10:09.785252 | 2021-11-22T12:14:34 | 2021-11-22T12:14:34 | 163,850,454 | 3 | 1 | MIT | 2021-11-22T12:12:31 | 2019-01-02T14:21:30 | JavaScript | UTF-8 | Python | false | false | 10,224 | py | """
Helpers for accessing comprehensive theming related variables.
This file is imported at startup. Imports of models or things which import models will break startup on Django 1.9+. If
you need models here, please import them inside the function which uses them.
"""
import os
import re
from logging import getLogge... | [
"[email protected]"
] | |
0ea91e5a0cf17f128231b27e498ed8faef5c8244 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03131/s109288213.py | d83fd52fecf6c54b08e12805530c326dab31a380 | [] | 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 | 199 | py | K,A,B=map(int,input().split())
b_count=1
if B-A<=2:
b_count+=K
else:
b_chenge_count=max(0,int((K-(A-1))/2))
b_count+=b_chenge_count*(B-A)+(A-1)+(K-(A-1)-b_chenge_count*2)
print(b_count) | [
"[email protected]"
] | |
250fe633342902421e18eb42c4191f6bdbac2e32 | 05536893d069dd87256ba74ecdee06bdf481d44b | /args_api/ORAEXA/ORAEXA-ORA11G.py | 1a7cf8c1ba362166fa07740f18ac0c81f9aa7995 | [] | no_license | TheRockStarDBA/DataBuddy | b2d889e11745d0afe1b39a11aab5945e2bd08cf7 | 38fa7adfdd228e2b2e4b4408393505163c5702e8 | refs/heads/master | 2020-12-25T23:27:02.363977 | 2015-05-28T19:14:12 | 2015-05-28T19:14:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,347,642 | py | #do not change
aa={'ORAEXA_Partition_NoClient.ORA11G_Partition': [{'field_term': ('-t', '--field_term', '"|"', 'Field terminator.'), 'num_of_shards': ('-r', '--num_of_shards', 1, 'Number of shards.'), 'pool_size': ('-o', '--pool_size', 1, 'Pool size.'), 'copy_vector': ('-w', '--copy_vector', 'oraexa-ora11g', 'Data copy... | [
"[email protected]"
] | |
83240fb402ffb441f8ea27fc70d086d6e2787731 | 276dd5dd778adefd039e6f6a71dc574386729401 | /demo2/grpc-services/users/client/sample_client.py | 861eb08c3d04ea39c85a816e156ae04b0ad6b8a4 | [
"MIT"
] | permissive | amitsaha/python-grpc-demo | 4880e64b4b993df4b7eb96f2946b6607fb2dfa82 | 48546bfda83062a3fcb015d352fecb46346e8c92 | refs/heads/master | 2023-01-12T10:01:36.396783 | 2022-10-08T05:10:39 | 2022-10-08T05:10:39 | 101,063,881 | 145 | 52 | MIT | 2022-12-27T17:26:21 | 2017-08-22T13:07:17 | Python | UTF-8 | Python | false | false | 777 | py | import users_pb2_grpc as users_service
import users_types_pb2 as users_messages
from client_wrapper import ServiceClient
def run():
users = ServiceClient(users_service, 'UsersStub', 'localhost', 50051)
# Insert example metadata
metadata = [('ip', '127.0.0.1')]
response = users.CreateUser(
user... | [
"[email protected]"
] | |
787d0ead8e3e61a69f630621e29795a58e9c52c3 | 3531bbff49b36aff6289911bc061865e7e59bd46 | /src/HttpGenerator/Plugins/PythonNullWebserverContentProcessorPlugin.py | ef8a2dc856cbfc76161efbbb5e7a1f253b0867ea | [
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0",
"Python-2.0"
] | permissive | davidbrownell/Common_Web | c5e66fc7ca03cdbd640ef1fe7cc12dafa9c04ef6 | fe3ee9d46cf9f2184434cf950d2c4281b5ec21e7 | refs/heads/master | 2022-09-05T18:33:34.014472 | 2022-06-08T16:44:54 | 2022-06-08T16:44:54 | 95,167,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,940 | py | # ----------------------------------------------------------------------
# |
# | PythonNullWebserverContentProcessorPlugin.py
# |
# | David Brownell <[email protected]>
# | 2020-08-28 22:15:38
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Browne... | [
"[email protected]"
] | |
3e859dd4d8c7da1dd8f6989bb05ffe7879d48075 | 505343f6ace00d22f8753c1a943a5794a619e698 | /katas/Python/8 kyu/Transportation on vacation 568d0dd208ee69389d000016.py | b4a45d8a8d95e7a907075fea11eac61bcc059cae | [] | no_license | bullet1337/codewars | 7652e50bf768bc47976a9124dd98b93602d4d458 | ba7f13ddd766158b41e036dae5d6b15f7f08761a | refs/heads/master | 2020-03-27T05:04:03.751302 | 2019-04-30T17:45:39 | 2019-04-30T17:45:39 | 145,991,995 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | # https://www.codewars.com/kata/568d0dd208ee69389d000016
def rental_car_cost(d):
return d * 40 - (50 if d >= 7 else 20 if d >= 3 else 0) | [
"[email protected]"
] | |
a17c64a742a45832da07a086ce11578fdb82b72e | d532b85841b459c61d88d380e88dd08d29836d43 | /solutions/1418_display_table_of_food_orders_in_a_restaurant.py | 70d472684cea39e66b5cec60e2c88f8f5d159460 | [
"MIT"
] | permissive | YiqunPeng/leetcode_pro | ad942468df5506de9dc48a4019933f658e2a3121 | 4a508a982b125a3a90ea893ae70863df7c99cc70 | refs/heads/master | 2022-05-15T09:32:02.699180 | 2022-05-14T16:32:17 | 2022-05-14T16:32:17 | 182,453,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | class Solution:
def displayTable(self, orders: List[List[str]]) -> List[List[str]]:
"""Hash table.
"""
foods = set()
tables = {}
for order in orders:
t, f = int(order[1]), order[2]
if t not in tables:
tables[t] = {f: 1}
else... | [
"[email protected]"
] | |
8050dc76614b274c3c99011b53fa8d657839b7a3 | c3c7398ec14865ea34c7f03aa5e012ddb19f0d5b | /DjangoUeditor/adminx.py | e98927add372e607762b88e5328ade5003c6c29b | [] | no_license | mzm5466/blog | 0e022f0ce85a0079cb72ffd9f472c7684f94d9fb | 13625fe7028a0df11a30d7de32751e34d681de00 | refs/heads/master | 2021-01-23T16:51:58.296591 | 2018-11-17T06:05:50 | 2018-11-17T06:05:50 | 102,748,039 | 0 | 0 | null | 2018-11-12T23:28:57 | 2017-09-07T14:36:32 | JavaScript | UTF-8 | Python | false | false | 1,388 | py | #!/usr/bin/python
#-*- coding:utf-8 -*-
#__author__ = 'sai'
#DjangoUeditor Xadmin plugin
import xadmin
from django.db.models import TextField
from xadmin.views import BaseAdminPlugin, ModelFormAdminView, DetailAdminView
from DjangoUeditor.models import UEditorField
from DjangoUeditor.widgets import UEditorWidget
from ... | [
"[email protected]"
] | |
c102131c6d4a516bfdb9a46b2857ea494a2a4e61 | 2dfedaf52ea247e7545bcf1b62e78e306dbb369f | /tele_theta_gang_bot.py | a352295798f52ff7912945a3006f56b417923c49 | [
"MIT"
] | permissive | nasgoncalves/trading-utils | 5602d6e52d6b62f138d38fe80877af0d0bec58e3 | aa9d3cdb6e9052ff1022a23d5074ec1c540f9161 | refs/heads/main | 2023-04-19T19:47:16.050050 | 2021-05-17T18:53:13 | 2021-05-17T18:53:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,794 | py | import logging
import os
from datetime import datetime
from telegram import Update
from telegram.ext import (
Updater,
CommandHandler,
MessageHandler,
Filters,
CallbackContext,
)
from common.bot_wrapper import start, help_command
from common.environment import TELEGRAM_THETA_GANG_BOT
from common.e... | [
"[email protected]"
] | |
df02039395f5072d5716d3dda7922462f52db60f | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startQiskit_QC35.py | 47df0d95aeb43e7c3b36125d2db8b174fe628db7 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,509 | py | # qubit number=3
# total number=9
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collection... | [
"[email protected]"
] | |
5c1262d982e0f6f45641b15959d0970ac3994a78 | 312d40d6023858891dd32bda67579f7284a54c15 | /29/00/add_history.py | 2bd0fedf2437bfc094faa83500c7f3938f0ff799 | [
"CC0-1.0"
] | permissive | pylangstudy/201708 | b67a49f091f5f949954e7b9a910a07761fe9a7d1 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | refs/heads/master | 2021-01-01T20:49:15.973299 | 2017-08-31T00:18:55 | 2017-08-31T00:18:55 | 98,936,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | import readline
import datetime
history_file = 'history_file.txt'
readline.set_history_length(1000)
readline.read_history_file(history_file)
print(f'readline.get_history_length():{readline.get_history_length()}')
#ファイル保存はせず、履歴に追加する
for i in range(5): readline.add_history(f'{datetime.datetime.now():%Y-%m-%d %H:%M:%S.%f... | [
"[email protected]"
] | |
a76bf89cd9ee66550c29ffffd5bd08c7c8ea0fbd | 3cb6bf94471cf493963c62103bffd3522d432a1e | /backend/users/migrations/0002_auto_20210110_2318.py | 5bf0cc03769bacd76deade31efff899f15fa33a4 | [] | no_license | crowdbotics-apps/triss-tv-app-23760 | be8603d67beacf744474d8bf193d629188e209a4 | a2d50e494b7b601657d70b970d6d161ba3c4bd3f | refs/heads/master | 2023-02-13T14:18:11.525879 | 2021-01-10T23:19:06 | 2021-01-10T23:19:06 | 328,499,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 894 | py | # Generated by Django 2.2.17 on 2021-01-10 23:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='email',
field... | [
"[email protected]"
] | |
3c8c38ea7cc58deaec59f3c9d44ae9a8059ae81c | 367d2670c75d385d122bca60b9f550ca5b3888c1 | /gem5/env/lib/python3.6/site-packages/celery/security/utils.py | 4714a945c6eed54165b302ff53b82d81957f194c | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"MIT"
] | permissive | Anish-Saxena/aqua_rowhammer_mitigation | 4f060037d50fb17707338a6edcaa0ac33c39d559 | 3fef5b6aa80c006a4bd6ed4bedd726016142a81c | refs/heads/main | 2023-04-13T05:35:20.872581 | 2023-01-05T21:10:39 | 2023-01-05T21:10:39 | 519,395,072 | 4 | 3 | Unlicense | 2023-01-05T21:10:40 | 2022-07-30T02:03:02 | C++ | UTF-8 | Python | false | false | 845 | py | """Utilities used by the message signing serializer."""
import sys
from contextlib import contextmanager
import cryptography.exceptions
from cryptography.hazmat.primitives import hashes
from celery.exceptions import SecurityError, reraise
__all__ = ('get_digest_algorithm', 'reraise_errors',)
def get_digest_algorit... | [
"[email protected]"
] | |
b86a9562f3902796cc68cf7e02f02d019b41d8ab | 0a8edda10672e26aa7f3da6f02cff73a2fcb0d98 | /backend/manage.py | a8760740a89a4369038a1ab1b3a99221b669df50 | [] | no_license | crowdbotics-apps/ferpa-22254 | 54de3adca4816f59a5ce1b98cc99202416fb336f | b77ac0392302f1bc94e73dbc4cc68d65ede36401 | refs/heads/master | 2023-01-03T07:55:12.034687 | 2020-11-03T14:47:00 | 2020-11-03T14:47:00 | 309,697,677 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ferpa_22254.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | [
"[email protected]"
] | |
c88e2f5ce525712cffc7291eb254f0f2c831710b | 0499622f93b196f828db7443c05e029fb07f7819 | /miic/src/app/course/serializers.py | eba8782401a4b63095df45533942a46179813cc0 | [] | no_license | kradalby/enigma | ba868d09fb86151de8bab60f2e8c96621d96817c | 1be944ae0a731fc39fdcb2733661520060c8b8f9 | refs/heads/master | 2021-03-22T05:00:31.626446 | 2018-12-21T11:47:27 | 2018-12-21T11:47:27 | 88,087,880 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | from rest_framework import serializers
from .models import Course
class CourseSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Course
field = '__all__'
| [
"[email protected]"
] | |
ec374bf3fdb296ed277d629d332a16e10b662344 | 390a705b795ce223a932cb9fed39f28dcb96933a | /fts/test_ph4_4addcommittee.py | c0ce75fb2fc9e4ab0d706f3e4bc2fd4326cf9874 | [
"LicenseRef-scancode-public-domain"
] | permissive | DonaldMcC/gdms | d74765b4c2356b709adf44438fe929f1e848117a | ee427c28435c9fc76b5c81835fd749789529dd1a | refs/heads/master | 2021-06-22T17:36:08.806735 | 2021-06-18T18:35:39 | 2021-06-18T18:35:39 | 30,919,501 | 6 | 3 | null | 2016-05-30T21:09:09 | 2015-02-17T14:05:53 | Python | UTF-8 | Python | false | false | 4,258 | py | # These tests are all based on the tutorial at http://killer-web-development.com/
# if registration is successful this may work but lets
# try and get user logged in first
from functional_tests import FunctionalTest, ROOT, USERS
import time
from selenium.webdriver.support.ui import WebDriverWait
class AddEvent (Fun... | [
"[email protected]"
] | |
a7c91ccdca3907968a379edf1b5c5e93736b9841 | 1aaba2be0479b43a76f3e85ea62cad8d42827d49 | /lib/pymedphys/_experimental/streamlit/apps/wlutz/_config.py | 729cb4145a1f603bd63282aa604a23adbd1edcdf | [
"Apache-2.0"
] | permissive | changran/pymedphys | a44a9aa9ec375c17ea73815c1a8e2a6a5a002c1e | 164a7a5c6051ab4c8fd6efdb79c3bfb0684b65df | refs/heads/main | 2023-07-30T21:32:07.697743 | 2021-09-10T11:37:02 | 2021-09-10T11:37:02 | 407,394,958 | 1 | 0 | Apache-2.0 | 2021-09-17T03:42:49 | 2021-09-17T03:42:48 | null | UTF-8 | Python | false | false | 426 | py | import pathlib
import pymedphys
from pymedphys._streamlit.utilities import config as st_config
def download_demo_data():
cwd = pathlib.Path.cwd()
pymedphys.zip_data_paths("wlutz-demo-files.zip", extract_directory=cwd)
return cwd.joinpath("wlutz-demo-files")
def get_config(demo_mode):
if demo_mode:... | [
"[email protected]"
] | |
90248ea8ac3c346f7327722ae33c64935738b31e | a24e34fd3a40d74b487cac0db7a26e3c15eec3f2 | /feature_experiment/__init__.py | 301895c9656dc07cfcd0f5fc0018fd5754d3b013 | [
"MIT"
] | permissive | PKQ1688/image_retrieval | 7e51a4e56dea7bd418dd658a9b95f87c4f7d36e5 | c9269e2b1dc6bfe3c1f4c37e1fb47d9697cb4872 | refs/heads/master | 2023-02-01T02:26:59.314285 | 2020-07-23T05:40:26 | 2020-07-23T05:40:26 | 271,463,472 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40 | py | # -*- coding:utf-8 -*-
# @author :adolf
| [
"[email protected]"
] | |
699b4704ebf635c6003115c3036eecf1060a2e4c | 45ba55b4fbdaf1657fde92beaeba4f173265afcd | /strawberry/experimental/pydantic/_compat.py | acc666f6203a928f1eb2d7b33d69d2381976ca54 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | strawberry-graphql/strawberry | af96afd4edd1788c59e150597a12501fbc7bf444 | 6d86d1c08c1244e00535840d9d87925431bc6a1c | refs/heads/main | 2023-08-30T03:34:12.929874 | 2023-08-24T12:01:09 | 2023-08-24T12:01:09 | 162,690,887 | 3,408 | 529 | MIT | 2023-09-14T21:49:44 | 2018-12-21T08:56:55 | Python | UTF-8 | Python | false | false | 3,165 | py | import dataclasses
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type
import pydantic
from pydantic import BaseModel
from pydantic.version import VERSION as PYDANTIC_VERSION
if TYPE_CHECKING:
from pydantic.fields import FieldInfo
IS_PYDANTIC_V2: bool = PYDANTI... | [
"[email protected]"
] | |
b5ee6d5a3b546ae9bfd3fe883befddb05375e281 | 4324d19af69080f45ff60b733c940f7dc1aa6dae | /google-ads-python/google/ads/google_ads/v0/proto/resources/topic_view_pb2.py | 8479d48ea067e902b438526e2c67da3d9c2985f8 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | ljborton/Forked_Work | cc8a3813c146ea4547aca9caeb03e649bbdb9076 | 7aaf67af8d9f86f9dc0530a1ad23951bcb535c92 | refs/heads/master | 2023-07-19T22:26:48.085129 | 2019-11-27T02:53:51 | 2019-11-27T02:53:51 | 224,321,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 3,068 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v0/proto/resources/topic_view.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from ... | [
"[email protected]"
] | |
0c7a2e5aca3dd8f431def73dd1ccb655570c9897 | 84297380d00453e71f65c591dca046bd41a32184 | /ABC/ABC165/A.py | 52ca6878fd2f4b0799ac8c12ddf0293950e1d009 | [] | no_license | daiki1998/atcoder | a5ef25245b1bbc3a5e33044846a3c16213603bd3 | d864a7cb11e41dbf6a691f5d128fdfe122b07046 | refs/heads/main | 2023-03-06T22:55:29.863716 | 2021-02-18T12:01:24 | 2021-02-18T12:01:24 | 323,401,954 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py |
K = int(input())
A, B = map(int, input().split())
res = "NG"
for i in range(B+1):
if A <= K*i <= B:
res = "OK"
print(res) | [
"[email protected]"
] | |
c25fc95d3fd80a2aaae02c8f79e75ce5c24a2c92 | 4f8a6af26d8220238e608577202ffc88c14f403e | /pedido/migrations/0002_remove_pedido_numero.py | e3535aa67a570fbec3c9f9f6c9be5a3d236b2e69 | [] | no_license | ryujiin/dc | 87338fb9820d8768391ea65c5b6cc1a6ea94db4f | b6f5b6a8624611f6513fd581457f171783800935 | refs/heads/master | 2021-01-01T06:33:38.940622 | 2015-08-24T02:42:55 | 2015-08-24T02:42:55 | 31,668,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('pedido', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='pedido',
name='numero... | [
"[email protected]"
] | |
a92c0a10aeeed0a16c66d9b710b73c346446f7a8 | d99eba79ac942f4ca4dbc3187ef97f593d6dbc46 | /anatomy_tagging/migrations/0019_auto_constraints.py | b6c370a32b240276bc6d4139c4420397cab504f0 | [] | no_license | adaptive-learning/anatomy-tagging | 6028b0749b54efaac7d32738959b5eaf4d78f0bd | 46561468d96c5cc9cc4c6c9b093b27cea69b65b6 | refs/heads/master | 2020-04-10T01:47:14.149395 | 2017-06-19T17:08:36 | 2017-06-19T17:08:36 | 30,142,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,569 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('anatomy_tagging', '0018_auto_composite_relation_type'),
]
operations = [
migrations.AlterField(
model_name='term... | [
"[email protected]"
] | |
46c93d3cf171f2c155c9f767abf4d8d7896ab549 | 890c8b8e90e516a5a3880eca9b2d217662fe7d84 | /armulator/armv6/opcodes/abstract_opcodes/ldrh_immediate_arm.py | 82362526630b6123504a3ea2f746261e0e88d05c | [
"MIT"
] | permissive | doronz88/armulator | b864135996f876c7857b79a314d4aa06cc19c549 | 0294feac2785c8947e5943ac0c34f941ee4b5fff | refs/heads/master | 2022-11-05T08:14:42.405335 | 2020-06-18T23:53:17 | 2020-06-18T23:53:17 | 273,363,061 | 2 | 0 | null | 2020-06-18T23:51:03 | 2020-06-18T23:51:02 | null | UTF-8 | Python | false | false | 1,383 | py | from armulator.armv6.opcodes.abstract_opcode import AbstractOpcode
from armulator.armv6.bits_ops import add as bits_add, sub as bits_sub, zero_extend
from bitstring import BitArray
class LdrhImmediateArm(AbstractOpcode):
def __init__(self, add, wback, index, imm32, t, n):
super(LdrhImmediateArm, self).__i... | [
"[email protected]"
] | |
de1e554cbb1e97d15a561b0089ad7efb7e68848a | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-codeartsdeploy/huaweicloudsdkcodeartsdeploy/v2/model/env_execution_body.py | b1206af38ed6c9f476f85bc485956faecbbe6825 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 5,498 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class EnvExecutionBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute n... | [
"[email protected]"
] | |
50688ed44d8bd1d4a1ef450b21069878a4a36032 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/EightTeV/EstarToEG_L10000_M2400_8TeV_pythia8_cff.py | 5391ffb60a29f8eaa4a3b41e7b1861224dd1978b | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 874 | py | import FWCore.ParameterSet.Config as cms
generator = cms.EDFilter("Pythia8GeneratorFilter",
maxEventsToPrint = cms.untracked.int32(0),
pythiaPylistVerbosity = cms.untracked.int32(1),
pythiaHepMCVerbosity = cms.untracked.bool(False),
... | [
"[email protected]"
] | |
3789c4bb30efb30fcd70b94d844283827ef69b86 | 3f60f9e1081fd08824254006f7fd2fd1b4b56731 | /POI/no_salary_dec_tree.py | c31cfe251192ddb24877623e1ef3d4958b723947 | [] | no_license | mihirkelkar/Text_Mining_Enron | 0e37abfe7cc916b6f278ddd6bb72ac4b48283425 | b7e2d59bc38bb62e68a61d2348aa5302f5cf5918 | refs/heads/master | 2020-04-15T21:49:42.673886 | 2015-04-18T00:03:58 | 2015-04-18T00:03:58 | 30,212,104 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,798 | py | import matplotlib.pyplot as plt
import sys
import pickle
import sklearn
import time
import numpy as np
from data_sorter import featuresProcess
from data_sorter import split
from sklearn import cross_validation
from sklearn.tree import DecisionTreeClassifier
outliers = ["SKILLING JEFFREY K", "LAY KENNETH L", "FREVERT ... | [
"[email protected]"
] | |
2ea00a15afca3cb49583cb81775e962b8e8bf4b4 | f62ff90d7850af458d8f12386fc9ee9134dbe7c1 | /Plots/Thesisplots/Model_7/Current_Voltage_Curves.py | 493ccafbc13c2df1aac1fefcad93ba1a953d0b12 | [] | no_license | AlexSchmid22191/EIS_R_Sim | 51b431f078cb455fc38637c192436c0523449565 | 851b061e60811e1e58a5b2fd4e393e529c3f86ac | refs/heads/master | 2023-06-27T17:40:59.177270 | 2021-07-22T11:50:27 | 2021-07-22T11:50:27 | 380,768,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,878 | py | from matplotlib.pyplot import subplots, show
from matplotlib.style import use
from numpy import load, log10
from Equations import e, k, T
from Semilog_Slope import semilog_slope
from matplotlib.ticker import LogLocator, NullFormatter, MultipleLocator
use('../Thesis_Small.mplstyle')
data = load('../../../Currents_Res... | [
"[email protected]"
] | |
1da5bc816ff092ff1efd02e934a8a810db7b83ba | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /AtCoder_Virtual_Contest/20190105-ganariya2525/abc096/c.py | c0bd9f5ae1b4dfa37263a8c56a23310888195f2c | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 671 | py | # -*- coding: utf-8 -*-
def main():
h, w = map(int, input().split())
board = [list(input()) for _ in range(h)]
dx = [0, 0, -1, 1]
dy = [-1, 1, 0, 0]
for i in range(h):
for k in range(w):
if board[i][k] == '#':
count = 0
for m in r... | [
"[email protected]"
] | |
38e50d3f24f37b25e2e10924332a53123811847a | 49ba5356bdc5df7dd9803b56fe507c5164a90716 | /shortest-unsorted-continuous-subarray/solution.py | 68ff764fd997e9bff5e3f3237167c7e462af3c0e | [] | no_license | uxlsl/leetcode_practice | d80ad481c9d8ee71cce0f3c66e98446ced149635 | d8ed762d1005975f0de4f07760c9671195621c88 | refs/heads/master | 2021-04-25T18:12:28.136504 | 2020-03-11T07:54:15 | 2020-03-11T07:54:15 | 121,472,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | class Solution(object):
def findUnsortedSubarray(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
nums_s = sorted(nums)
i = 0
while i < len(nums) and nums_s[i] == nums[i]:
i += 1
j = len(nums) - 1
while 0 <= j and nums_s[j] =... | [
"[email protected]"
] | |
06ab1173149ebf74e0df8962d78ccda462a2138a | 1d7eec692553afc411ec1e7325634f71a2aed291 | /backend/social_auth/urls.py | a8a59a7deeb00710a61c0465859ccf7d521cd772 | [] | no_license | Andy-Nkumane/Tilde | a41a2a65b3901b92263ae94d527de403f59a5caf | 80de97edaf99f4831ca8cb989b93e3be5e09fdd6 | refs/heads/develop | 2023-05-09T10:02:41.240517 | 2021-05-28T09:20:51 | 2021-05-28T09:20:51 | 299,501,586 | 0 | 0 | null | 2020-10-25T22:37:30 | 2020-09-29T04:10:48 | Python | UTF-8 | Python | false | false | 465 | py | from django.urls import path
from . import views
urlpatterns = [
path(
"github_oauth_start/",
views.authorize_github_start,
name="authorize_github_start",
),
path(
"github_oauth_callback/",
views.authorize_github_callback,
name="authorize_github_callback",
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.