blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8e16c78bb2b11eb3c5096dabf2382795cadc9840 | 7b7e11a180c36c94fe9559a01c792fe60e9ccb7f | /StockNest/stock_backend/migrations/0004_company_maxval.py | 0017536ae803acbf83ad91b7ec7bb88e7759f53b | [
"MIT"
] | permissive | pl-lee/Stock-Price-Forecasting-Using-Artificial-Intelligence | 8d833c0d87781d54ad371116cd96584a5b69a97b | 69192454542432c7120cbf95ea443b567a248400 | refs/heads/master | 2021-09-22T11:15:22.873347 | 2018-09-09T07:47:19 | 2018-09-09T07:47:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-26 13:22
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock_backend', '0003_auto_20170726_0910'),
]
operations = [
migrations.Add... | [
"koriavinash1@gmail.com"
] | koriavinash1@gmail.com |
8ad3dd6a89b010a4f7d80ba5e5284a2c0f070bed | 22f1079c111df69711497a0a54f0be2d2556ba62 | /morpfw/crud/util.py | 5344d9a45c49eb2728886f6a4af0ad5941670b99 | [
"Apache-2.0"
] | permissive | morpframework/morpfw | 9b5d320b6d675d8d25d0021de41427c009595c78 | 1a11eb286097f0f6dd39f20e241dd83756ca87b3 | refs/heads/master | 2022-12-12T21:04:18.146975 | 2022-12-02T11:17:07 | 2022-12-02T11:17:07 | 104,162,256 | 8 | 2 | MIT | 2019-07-29T16:21:13 | 2017-09-20T03:43:29 | Python | UTF-8 | Python | false | false | 1,190 | py | import re
from morepath.publish import resolve_model as _resolve_model
from ..interfaces import ISchema
import jsl
import dataclasses
from copy import copy
import typing
from datetime import datetime, date
def resolve_model(request):
newreq = request.app.request_class(
request.environ.copy(), request.app,... | [
"kagesenshi.87@gmail.com"
] | kagesenshi.87@gmail.com |
8bd1a61f2f5b2c302eb15d529ee167dbbc4beabe | 91b68cd2d4e50263ad53be9bf34c28f4b893b29d | /gps_viewer/settings.py | b2a3405df04c3832a53d81c285c277eb73146e39 | [] | no_license | storrellas/gps_viewer | 6145efca4bcf7f48a96a9d08ceb916bc21cd143f | e8577933b68169193f391808488cacd7ffd5ff69 | refs/heads/master | 2020-04-19T12:05:51.128193 | 2019-02-14T07:31:45 | 2019-02-14T07:31:45 | 168,184,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,391 | py | """
Django settings for gps_viewer project.
Generated by 'django-admin startproject' using Django 2.1.5.
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 os... | [
"storrellas@gmail.com"
] | storrellas@gmail.com |
60111fbb419ac10cb39513b5c247ebbd98e7015b | b51f277dfe339ea30dce10040eca40c20bd8a4dd | /src/config/setting.py | 7ac608787b2becd3c5908b109a5108d8a097ac85 | [
"BSD-3-Clause"
] | permissive | jack139/fair | e08b3b48391d0cb8e72bbc47e7592c030f587f48 | fe0ff64f8edbd794c3fb951ab6af420054e9e585 | refs/heads/master | 2021-06-30T15:17:15.590764 | 2020-09-23T07:14:20 | 2020-09-23T07:14:20 | 160,322,019 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,576 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import web
from pymongo import MongoClient
#####
debug_mode = True # Flase - production, True - staging
#####
#
enable_proxy = True
http_proxy = 'http://192.168.2.108:8888'
https_proxy = 'https://192.168.2.108:8888'
proxy_list = ['192.168.2.103']
enable_local_test = Tru... | [
"gt@f8geek.com"
] | gt@f8geek.com |
90a7cddaa492df26fbac0ef47f1980e16f99b2ff | bb0eeade4685dc89ff8a53beb813afdf7394989d | /algorithm_test/saima/股神.py | e55fa66355c3369bf29859dbd5bbab3cf51b548f | [] | no_license | zhaocheng1996/pyproject | 72929cd0ba2f0486d7dc87a7defa82656bf75a8e | 0a1973dda314f844f9898357bc4a5c8ee3f2246d | refs/heads/master | 2021-10-26T08:38:43.675739 | 2019-04-11T13:52:46 | 2019-04-11T13:52:46 | 176,939,063 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | '''
有股神吗?
有,小赛就是!
经过严密的计算,小赛买了一支股票,他知道从他买股票的那天开始,股票会有以下变化:第一天不变,以后涨一天,跌一天,涨两天,跌一天,涨三天,跌一天...依此类推。
为方便计算,假设每次涨和跌皆为1,股票初始单价也为1,请计算买股票的第n天每股股票值多少钱?
输入
输入包括多组数据;
每行输入一个n,1<=n<=10^9 。
样例输入
1
2
3
4
5
输出
请输出他每股股票多少钱,对于每组数据,输出一行。
样例输出
1
2
1
2
3
'''
while 1 :
x =int(input())
k = 3
n = 3
while x-k>=n:
n+... | [
"34829837+zhaocheng1996@users.noreply.github.com"
] | 34829837+zhaocheng1996@users.noreply.github.com |
501a8e701d08eb3184bf15a41bc714ea9b715091 | b76daa106277ef2f7ab7f6e3278546c6da0bb967 | /base/web/server.py | 25c3b1b57642b2270e4f795b12adb9c5b5a914d2 | [] | no_license | DyLanCao/ipython | d071b4659999062106438ec077d27754a711ef92 | 746e070d193de04002d277e5170ddf8b5d9d4d44 | refs/heads/master | 2021-06-12T19:31:44.325346 | 2021-02-20T03:17:58 | 2021-02-20T03:17:58 | 142,657,284 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | #-*- coding:utf-8 -*-
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
'''处理请求并返回页面'''
# 页面模板
Page = '''\
<html>
<body>
<p>Hello, web!</p>
</body>
</html>
'''
# 处理一个GET请求
def do_GET(self):
self.send_response(200... | [
"caoyin2011@163.com"
] | caoyin2011@163.com |
ca44966244b953ca337e34a0e310dced35a4d891 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/venv/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py | aab04ff348d90f3ea88259b7d8b1bdf203e500ca | [] | no_license | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:c855382e9ed32186e6b9539363ea579e5c8667717f82b222f8994b92918df069
size 10783
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
ef5717815e789db410e78d7019e8f61a68415355 | 421fd914fb9c40fa5f8466377d7270dbf3ec1fdb | /Net/tensor/net7.py | 56820dc7e2ee57d1afae113f13bb65fbbaa0a43f | [] | no_license | jon--lee/vision-amt | 382d466647f52cb0c98a84cdb466821615d07b94 | 6a05921dbc2aa82e1aa651b935b57d470d903cbd | refs/heads/master | 2020-04-12T02:31:33.258391 | 2016-07-22T01:11:27 | 2016-07-22T01:11:27 | 50,693,639 | 1 | 1 | null | 2016-07-22T01:11:46 | 2016-01-29T21:47:10 | Python | UTF-8 | Python | false | false | 1,782 | py | import tensorflow as tf
import inputdata
import random
from tensornet import TensorNet
import time
import datetime
class NetSeven(TensorNet):
def __init__(self):
self.dir = "./net7/"
self.name = "net7"
self.channels = 3
self.x = tf.placeholder('float', shape=[None, 250, 250, self.chan... | [
"mdlaskey@umich.edu"
] | mdlaskey@umich.edu |
dbe58b94975afcbf250caa82532fcbdb215e99ef | e23b28fc3ed196866a04af4e790c1c16b1b5183e | /django/login2/apps/login2_app/views.py | 1d07c6c74710450bdc4e95fdb4c868fc722faf28 | [] | no_license | diazmc/Python | 6f47e7fcfb8c263eb154d59a5a9b3866e2c9d6a8 | 89e3d54eeb2b0ed7dc7af24103ace6fb6e45d65e | refs/heads/master | 2021-01-20T01:18:23.954877 | 2017-08-24T10:39:19 | 2017-08-24T10:39:19 | 101,283,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,047 | py | from django.shortcuts import render, redirect
from .models import User
from django.contrib import messages
def index(request):
return render(request, 'login2_app/index.html')
def process(request):
if request.method == "POST":
res = User.objects.register(request.POST)
if res['status']:
... | [
"mc.arthur_d@hotmail.com"
] | mc.arthur_d@hotmail.com |
d6102bc0218c764e7e2e42eaf102ab7f59933f42 | a18539697b2972a2ade5b8175c065f441962047d | /my_mini_web_ok/my_serverwork.py | 1b349b5ef0130071fdb8fa363ab8ac06cacfa637 | [
"MIT"
] | permissive | aGrass0825/mini_web_framwork | a68ecf2007e93ca7add1dd20973ef7bcc1f9501c | cff3881e65aae24e6cd7e1cd4567ffbea684ff89 | refs/heads/master | 2021-11-25T19:05:46.975097 | 2021-11-24T09:47:59 | 2021-11-24T09:47:59 | 226,657,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,639 | py | """
任务:写一个web服务器
1、导入模块socket\threading\sys
2、建立套接字对象
3、地址重写
3、绑定端口号
4、设置监听,套接字由主动变被动
5、接受浏览器的链接accept
6、接收浏览器的请求
8、查找请求目录
9、发送响应报文
10、结束与浏览器的链接
"""
import socket
import threading
import sys
from application import app
class HttpServer(object):
"""服务器类"""
def __init__(self):
self.tcp_server_socket = ... | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
9958750cf4c7f18679fe4caf28b4ef2121d81922 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03910/s508996847.py | 9053d73951bd78510caa8fa55e5777f1f1518c70 | [] | 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 | 168 | py | n = int(input())
cnt = 0
for i in range(1, n + 1):
cnt += i
if cnt >= n:
res = i
break
remove = cnt - n
for i in range(1, res + 1):
if i != remove:
print(i) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
18b2f3f798405ef725faeca6f1b3db16e933b964 | 864755f7d733351b205e460ec54a5f6d13050037 | /devilry/devilry_admin/tests/subject/test_crinstance_subject.py | cbe74d7589cee6ba35a93bdf5ea6b1e7b6b59d04 | [] | permissive | aless80/devilry-django | 27fc14b7bb7356f5f9d168e435a84e7bb43a682a | 416c262e75170d5662542f15e2d7fecf5ab84730 | refs/heads/master | 2020-05-20T12:22:09.255393 | 2019-05-19T21:06:57 | 2019-05-19T21:06:57 | 185,568,847 | 0 | 0 | BSD-3-Clause | 2019-05-08T08:53:52 | 2019-05-08T08:53:51 | null | UTF-8 | Python | false | false | 5,053 | py | from django.conf import settings
from django.test import TestCase, RequestFactory
from model_mommy import mommy
from devilry.devilry_account.models import PermissionGroup
from devilry.devilry_admin.views.subject import crinstance_subject
class TestCrAdminInstance(TestCase):
def test_get_rolequeryset_not_admin(se... | [
"post@espenak.net"
] | post@espenak.net |
a92caba3e5809f7220aed29e8c066b8129f8ccae | 53c4460e8cce123276932b4ddf2fe00fdee75b65 | /format05.py | f2d85db164b628bffe9b45d81b308b9847712256 | [] | no_license | Yush1nk1m/Study_Python | 5ba8a6eeb73184ea7f1e892daae182b78d265e06 | 516f0ba6d9411453fa0d2df00314e383e3f8cabb | refs/heads/master | 2023-07-09T16:22:22.663219 | 2021-08-22T15:22:22 | 2021-08-22T15:22:22 | 398,831,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | output_a = "{:f}".format(52.273)
output_b = "{:15f}".format(52.273) # 15칸 만들기
output_c = "{:+15f}".format(52.273) # 15칸에 부호 추가하기
output_d = "{:+015f}".format(52.273) # 15칸에 부호 추가하고 0으로 채우기
print(output_a)
print(output_b)
print(output_c)
print(output_d)
| [
"kys010306@sogang.ac.kr"
] | kys010306@sogang.ac.kr |
0246403fce1525adbf6c3160b1c8300f3eb2f89b | b1c2e16cff9f0dd9946c61c9504579e0254fef51 | /base/base_data_loader.py | 67d3e8029f2299ca206ffcf1a2af2043b34ead38 | [
"CC-BY-2.0"
] | permissive | JODONG2/semantic-segmentation-level2-cv-02 | 53bfc2a115e62889880ebb1812b790d1b5759c4b | ecef6844454e2339436d5c201392ee55b08781ee | refs/heads/master | 2023-08-26T08:29:01.990496 | 2021-11-08T04:00:49 | 2021-11-08T04:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,972 | py | import numpy as np
from torch.utils.data import DataLoader
from torch.utils.data.dataloader import default_collate
from torch.utils.data.sampler import SubsetRandomSampler
class BaseDataLoader(DataLoader):
"""
Base class for all data loaders
"""
def __init__(self, dataset, batch_size, shuffle, valida... | [
"hanbin@kakao.com"
] | hanbin@kakao.com |
e42f7d87fcb7c317bd746f39df25e50c7f71906b | a5884eb2aed17c25a710370654f28b0b70a4441f | /config.py | 9cbdcb715ad5bbf103039f0b43bbf1a9aaa12f57 | [
"Apache-2.0"
] | permissive | craigderington/celery-example-1 | 9ba2c6c94f422b33f6a73e74109cc20bba47cb3d | 6fdae655e512f96eeb9dbb109c647ae56f357bc9 | refs/heads/master | 2020-07-10T15:30:07.447621 | 2019-09-05T18:03:57 | 2019-09-05T18:03:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | import os
# Debug
DEBUG=True
# Celery Settings
CELERY_BROKER_URL = "pyamqp://rabbitmq:5672/"
CELERY_RESULT_BACKEND = "redis://redis:6379/0"
TASK_SERIALIZER = "json"
RESULT_SERIALZIER = "json"
ACCEPT_CONTENT = ["json"]
# Timezome
TIMEZONE = "America/New_York"
ENABLE_UTC = True
# APIs
IPINFO_API_URL = "http://ip-api.... | [
"craig@craigderington.me"
] | craig@craigderington.me |
12c222037cccef2366cde89f0c450753c7f9765a | d7218d554c9d89369c0677256802ea1eb5995dd0 | /repos/cookiecutter/tasks/config.py | 7c3e457a15e8992724681556d9c943f1c27fe8a1 | [
"MIT"
] | permissive | salotz/jubeo | bf6f76d64e8774b4f1f51a8ddbaeb345d2c3676e | 8b1d715af708a7c933d5c9459c3e2ddb7d40d741 | refs/heads/master | 2022-12-10T17:38:45.957322 | 2021-02-20T02:08:31 | 2021-02-20T02:08:31 | 246,981,335 | 1 | 0 | MIT | 2022-12-08T09:51:30 | 2020-03-13T03:34:22 | Python | UTF-8 | Python | false | false | 166 | py | """User settings for a project."""
# load the system configuration. You can override them in this module,
# but beware it might break stuff
from .sysconfig import *
| [
"samuel.lotz@salotz.info"
] | samuel.lotz@salotz.info |
62520424d1b4e94fed465462661aee85fa68e102 | b29149eeee6a2351fb2904415ad751b009d80dad | /mopidy_internetarchive/backend.py | d780b3153875b51da53ab9254e34c9b153f71cd1 | [
"Apache-2.0"
] | permissive | tkem/mopidy-internetarchive | 7a33d24f6c32ca9ac040531e5725a1eeadf3fa38 | 2b6100a412120c828da8899b81562237fb808840 | refs/heads/master | 2022-05-06T19:31:44.909430 | 2022-04-03T19:57:11 | 2022-04-03T19:57:11 | 15,807,922 | 15 | 3 | Apache-2.0 | 2021-08-03T23:17:26 | 2014-01-10T19:52:25 | Python | UTF-8 | Python | false | false | 1,338 | py | import pykka
from mopidy import backend, httpclient
import cachetools
from . import Extension
from .client import InternetArchiveClient
from .library import InternetArchiveLibraryProvider
from .playback import InternetArchivePlaybackProvider
def _cache(cache_size=None, cache_ttl=None, **kwargs):
if cache_size i... | [
"tkemmer@computer.org"
] | tkemmer@computer.org |
9edbd3d9de0f548de026e32489b971d5050b5d26 | 519f1ac2b8ca9ee2793af13a88eec6eef7c2637d | /rosalind/GCON.py | 7c3bd9f98bccce480c6b529763717996320e61b3 | [] | no_license | teju85/programming | c4da3493b4cf96b8f52da9bb209636cd898310a5 | 5d64b3f5cc868f7a5ad1bac889d69da9dbe356cd | refs/heads/master | 2021-06-16T07:09:25.159021 | 2017-06-05T04:36:07 | 2017-06-05T04:36:07 | 26,383,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,499 | py | import sys
from common import readFasta
syms = {
'A' : 0,
'C' : 1,
'D' : 2,
'E' : 3,
'F' : 4,
'G' : 5,
'H' : 6,
'I' : 7,
'K' : 8,
'L' : 9,
'M' : 10,
'N' : 11,
'P' : 12,
'Q' : 13,
'R' : 14,
'S' : 15,
'T' : 16,
'V' : 17,
'W' : 18,
'Y' : 19,
... | [
"rao.thejaswi@gmail.com"
] | rao.thejaswi@gmail.com |
34cc1bf223f7f56c695b00d0565cca6f6dc989a5 | 8ee8fe3c2acea497a85428bfb3dfde19e58b2bc3 | /test-examples/nD_mixed.py | 83eb382991ac4b297956c5f27d493014c7047df8 | [
"BSD-3-Clause"
] | permissive | sofroniewn/image-demos | a6e46f08fd4ce621aa96d6b6378b50f63ac2b381 | 2eeeb23f34a47798ae7be0987182724ee3799eb8 | refs/heads/master | 2022-11-02T23:50:23.098830 | 2022-10-30T04:38:19 | 2022-10-30T04:38:19 | 179,378,745 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | """
Slide through 3D Volume series in 4D data using the add_volume API
"""
from skimage import data
import numpy as np
import napari
with napari.gui_qt():
blobs = np.asarray(
[
data.binary_blobs(length=64, volume_fraction=0.1, n_dim=3).astype(
float
)
f... | [
"sofroniewn@gmail.com"
] | sofroniewn@gmail.com |
2ef8ad9520e99842ad0aba6bd17b8b532e925ffa | 3cffa92ed70f487a3ea28b73a8f544bbc347e450 | /tests/test_oli.py | 8978a3db7caebc6920c1007df2d339b04994b0e4 | [] | no_license | vahtras/dalmisc | 63962ca86d00c59ea019db2b0e5eebba488f70b5 | 2e344132eaac0d163cdb41a5737baca8e875fc49 | refs/heads/master | 2023-01-31T06:42:38.964477 | 2020-12-15T10:38:29 | 2020-12-15T10:38:29 | 321,618,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | import os
from util.full import unit, init, matrix
from dalmisc import oli
from .common_tests import assert_
def setup():
global suppdir
n, e = os.path.splitext(__file__)
suppdir = n + ".d"
def test_e2n_S():
refe2 = init([
[0.78643356, -0.50624296],
[-0.50624296, 0.78643356]
])... | [
"vahtras@kth.se"
] | vahtras@kth.se |
f54b6de297ca25b541adb6bd4b12906d8bc8fcfd | 077c91b9d5cb1a6a724da47067483c622ce64be6 | /fuzz_pyretic_mesh_proactive_firewall_no_close_check_loop_mcs_with_max_replays_5/interreplay_135_r_4/interactive_replay_config.py | ce9454be78e968ff18bc201ae28a9357ab12050d | [] | no_license | Spencerx/experiments | 0edd16398725f6fd9365ddbb1b773942e4878369 | aaa98b0f67b0d0c0c826b8a1565916bf97ae3179 | refs/heads/master | 2020-04-03T10:11:40.671606 | 2014-06-11T23:55:11 | 2014-06-11T23:55:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,029 | py |
from config.experiment_config_lib import ControllerConfig
from sts.topology import *
from sts.control_flow import InteractiveReplayer
from sts.simulation_state import SimulationConfig
from sts.input_traces.input_logger import InputLogger
simulation_config = SimulationConfig(controller_configs=[ControllerConfig(start_... | [
"cs@cs.berkeley.edu"
] | cs@cs.berkeley.edu |
f6a0fef8c7c0962752e3f0be0a812c8744fff280 | efd8628adc042ae2d58fa89cc31a5c1c80aa94f6 | /bi_conv_lstm/src/convlstm_cell.py | 2fce2759c2fffbd8344d862bd762e4273427b43e | [] | no_license | Xharlie/stochast_dynamic_for_video_infilling | d7e0bfaf8b71cf3f39170793e5a1a50b289aee40 | a825de4c5178f7084925817f0631ac331073866f | refs/heads/master | 2021-03-27T09:11:15.478067 | 2019-10-23T17:59:25 | 2019-10-23T17:59:25 | 110,137,739 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,946 | py | import tensorflow as tf
class ConvLSTMCell(tf.nn.rnn_cell.RNNCell):
"""A LSTM cell with convolutions instead of multiplications.
Reference:
Xingjian, S. H. I., et al. "Convolutional LSTM network: A machine learning approach for precipitation nowcasting." Advances in Neural Information Processing Systems. 2015.... | [
"charlie.xu007@yahoo.com"
] | charlie.xu007@yahoo.com |
82ab7c61bcd07b03c93eb2c5495b8867ec737671 | 9b3e46ef2ffd65cccace3e3e3d93438c077e4f9e | /main/dialog/template.py | 12e827125435f1610370d68c18651b38ebcd624b | [
"BSD-2-Clause"
] | permissive | wizadr/cports | 1dd043045fc63b061f803d1992a9ccdc995850ad | be5f4695305d9c00de9d4e252e67db8081690c3e | refs/heads/master | 2023-08-21T11:35:16.710064 | 2021-10-25T00:38:04 | 2021-10-25T00:38:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | pkgname = "dialog"
_mver = "1.3"
_date = "20210621"
pkgver = f"{_mver}.{_date}"
pkgrel = 0
build_style = "gnu_configure"
configure_args = ["--with-ncursesw", "--disable-nls"]
makedepends = ["ncurses-devel"]
pkgdesc = "Tool to display dialog boxes from shell scripts"
maintainer = "q66 <q66@chimera-linux.org>"
license = ... | [
"q66@chimera-linux.org"
] | q66@chimera-linux.org |
d039d23102a35433edadb4a67f3a22b65f11d99c | 36901e58fbdeabc7380ae2c0278010b2c51fe54d | /gatheros_event/helpers/event_business.py | 55a6a5bce19c24a740033883ffbe597b2be365cc | [] | no_license | hugoseabra/congressy | e7c43408cea86ce56e3138d8ee9231d838228959 | ac1e9b941f1fac8b7a13dee8a41982716095d3db | refs/heads/master | 2023-07-07T04:44:26.424590 | 2021-08-11T15:47:02 | 2021-08-11T15:47:02 | 395,027,819 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,384 | py | """
Esses helpers tem como objetivo identificar o tipo do evento:
- Grátis
- Pago
Além de também mudar o tipo do evento e aplicar as configuração das features
disponiveis de acordo com o tipo em si
"""
from gatheros_event.event_state import EventState, EventPayable
from gatheros_event.mo... | [
"nathan.eua@gmail.com"
] | nathan.eua@gmail.com |
fef0aa9b88d267ea1543943ccc5df703e7c1d7d2 | 45c7693fabf2bf6aa142ea08ed7ec45b9a6aee79 | /apps/belt_app/views.py | 576b7dfeec8067fb6ad1415728705a1827018ea8 | [] | no_license | stuffyUdaya/quote | 95cedd352b493eb29f127cc9be78456652e1cca8 | ae979eeb92b490fa12ee95d4276bef9517286c5a | refs/heads/master | 2021-01-09T06:11:50.343620 | 2017-02-04T14:43:09 | 2017-02-04T14:43:09 | 80,923,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,662 | py | from django.shortcuts import render,redirect
from django.urls import reverse
from django.contrib import messages
from .models import User,Quote,Fav
from django.db.models import Count
def index(request):
return render (request, 'belt_app/index.html')
def process(request):
results = User.objects.userValidator(... | [
"udayatummala1@gmail.com"
] | udayatummala1@gmail.com |
b10b197f934cdecd38564cb304870ecf73768943 | e5329001263e67a4d3c13d57bb91f2502280e206 | /InvTL/lm_py/pypy/jit/metainterp/test/test_ztranslation.py | d5db7f3d2c2fc1f5deaf59451266e18775a8ea35 | [] | no_license | yanhongliu/DARLAB | d9432db6e005a39e33501d7ffffe6e648b95b3fc | f739318c9620b44ef03d155f791c7ed4111d80fa | refs/heads/master | 2021-05-27T19:58:58.458846 | 2014-02-04T12:09:26 | 2014-02-04T12:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,277 | py | import py
from pypy.jit.metainterp.warmspot import rpython_ll_meta_interp, ll_meta_interp
from pypy.jit.backend.llgraph import runner
from pypy.rlib.jit import JitDriver, OPTIMIZER_FULL, unroll_parameters
from pypy.rlib.jit import PARAMETERS, dont_look_inside
from pypy.jit.metainterp.jitprof import Profiler
from pypy.r... | [
"mickg10@gmail.com"
] | mickg10@gmail.com |
a5b0332978d11b16182826ca5685a1f52e032ea8 | afd9c9dd58d0e91b84aab77d24ccf36d8b020f94 | /obonet/io.py | e43afb702a0fc788224648937aaebdb130624ff5 | [
"BSD-2-Clause-Patent"
] | permissive | dhimmel/obonet | 11d8c3b30e77e5910d60733711f28cd756f47d9c | fec6a82e53d01338c85e77039a4dc05288f6ab99 | refs/heads/main | 2023-03-04T00:29:18.215986 | 2023-02-28T17:17:57 | 2023-02-28T17:17:57 | 35,751,761 | 115 | 25 | NOASSERTION | 2022-11-10T11:22:07 | 2015-05-17T04:23:23 | Python | UTF-8 | Python | false | false | 2,137 | py | from __future__ import annotations
import importlib
import io
import logging
import mimetypes
import os
import re
from typing import Callable, TextIO, Union
from urllib.request import urlopen
PathType = Union[str, os.PathLike, TextIO]
def open_read_file(path: PathType, encoding: str | None = None) -> TextIO:
""... | [
"daniel.himmelstein@gmail.com"
] | daniel.himmelstein@gmail.com |
5b7b72098bba09b1082880311e8f3fdb84f678c9 | 5864e86954a221d52d4fa83a607c71bacf201c5a | /eve/client/script/entities/ActionObjectClient.py | 6e27794a321733b47fbd58e3b427686d66348c3b | [] | no_license | connoryang/1v1dec | e9a2303a01e5a26bf14159112b112be81a6560fd | 404f2cebf13b311e754d45206008918881496370 | refs/heads/master | 2021-05-04T02:34:59.627529 | 2016-10-19T08:56:26 | 2016-10-19T08:56:26 | 71,334,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 999 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\eve\client\script\entities\ActionObjectClient.py
import svc
import localization
class EveActionObjectClientSvc(svc.actionObjectClientSvc):
__guid__ = 'svc.eveActionObjectClientSvc'
__replaceservice__ = 'actionObjectClientSvc'
... | [
"le02005@163.com"
] | le02005@163.com |
7a177033a21ab52312bd03811c74b9fa2fc6488c | 04164e028417ff8472b9f2bfec0ec45b0888f743 | /development/utilities/qh-interpolate | 23660381db250d30447b73d6e97d1e567b0a7eff | [] | no_license | Huaguiyuan/quantum-honeycomp | c2b810ff5f5e25d41b1f0c1c1ff7ae500b04dc31 | 50deb0e59fffe4031f05094572552ca5be59e741 | refs/heads/master | 2020-03-22T19:09:58.148862 | 2018-07-08T19:51:58 | 2018-07-08T19:51:58 | 140,510,217 | 1 | 2 | null | 2018-07-11T02:20:32 | 2018-07-11T02:20:32 | null | UTF-8 | Python | false | false | 1,527 | #!/usr/bin/python
import numpy as np
import numpy
def write_interpolation(centers=[[0.,0.,0.]], heights=[10.0],name=""):
""" Creates a set of lorentzian at that position and with a height"""
if len(heights)<len(centers):
heights = [10. for i in centers]
fac = 5.0 # factor to mix the gaussians
... | [
"jose.luis.lado@gmail.com"
] | jose.luis.lado@gmail.com | |
9dc965a73917db5c9bc735c53cda18a3e9a59059 | fb98f1e69cb6e14d804c916c4d4ab45acb4f7215 | /setup.py | 5e81d07c8ab9ac906e6ad46326bb23fed7fc220a | [
"Apache-2.0"
] | permissive | q759729997/qytPython | 6c8f65b954e43ea2a75a1fd1286b7c2e896ba9f2 | f468ef0a4495eb7ce58cb052e0370a8f22bca008 | refs/heads/master | 2020-12-05T13:57:43.794982 | 2020-03-29T15:00:27 | 2020-03-29T15:00:27 | 232,131,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,049 | py | #!/usr/bin/env python
# coding=utf-8
import os
from setuptools import setup, find_packages
__version__ = None
with open("qytPython/version.py") as f:
exec(f.read())
with open('README.md', encoding='utf-8') as f:
readme = f.read()
with open('LICENSE', encoding='utf-8') as f:
license = f.read(... | [
"qiaoyongtian@qq.com"
] | qiaoyongtian@qq.com |
ab2d4503b34fd674906127afc68cf789f6a4702b | f27f3dc88ea4b777063aa449d882663606e45990 | /pySDC/implementations/collocation_classes/equidistant_spline_right.py | 737e1a3071509125ce1512f83ab8bba7c8498ec7 | [
"BSD-2-Clause"
] | permissive | DmytroSytnyk/pySDC | 81a0a6ff86572d687338c7b0c9d2a274e78cb6ef | 9c7c41ac00411cdc58dfa30be794c3bb77a58293 | refs/heads/master | 2020-04-16T13:58:44.021412 | 2018-11-19T07:55:42 | 2018-11-19T07:55:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | from __future__ import division
import numpy as np
import scipy.interpolate as intpl
from pySDC.core.Collocation import CollBase
from pySDC.core.Errors import CollocationError
class EquidistantSpline_Right(CollBase):
"""
Implements equidistant nodes with right end point included and spline interpolation
... | [
"r.speck@fz-juelich.de"
] | r.speck@fz-juelich.de |
b15b1831c7bab23eae614a8ac41760cd3b32dee6 | 214d0b18e3bed9ae2ba33e9a3d9d2b447c13dd2e | /k_fold_cross_validation.py | cd1ff51f751ee9b217b204fc08df53afb3dec931 | [] | no_license | janFrancoo/Machine-Learning-Tutorials | 3cc1d47939fac44630b475ce5bd5dc52f84bde1e | 56dab9722606dc27df2f613bfbd277f27122eb88 | refs/heads/master | 2020-06-17T14:16:06.423200 | 2019-08-03T11:44:47 | 2019-08-03T11:44:47 | 195,948,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | from sklearn.datasets import load_iris
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score, confusion_matrix
from sklearn.model_selection import train_test_split, cross_val_score
df = load_iris()
x = df.data
y = df.target
x_train, x_test, y_train, y_test = train_test_split(x,... | [
"noreply@github.com"
] | janFrancoo.noreply@github.com |
cc5cf5398f77652abe718d6ae45d9eb527566a58 | f7772d2d686811610763aa177cc37a1ae4e0cb95 | /cosmosis/cosmosis/samplers/star/star_sampler.py | 5a497f019d6d5948cb292f3a5944d94223152aaa | [
"BSD-2-Clause"
] | permissive | joezuntz/summer-school-1 | 51d5cfb9e62a99e33bc1fd89b8ced2aa96440c63 | 0575e0d7cab34a616e107967147c9cc97f0953a6 | refs/heads/master | 2021-05-21T17:56:44.732129 | 2020-04-03T13:40:38 | 2020-04-03T13:40:38 | 252,744,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,535 | py | from __future__ import print_function
from builtins import zip
from builtins import map
from builtins import str
import itertools
import numpy as np
from .. import ParallelSampler
def task(p):
i,p = p
results = star_sampler.pipeline.run_results(p)
#If requested, save the data to file
if star_sampler.... | [
"joezuntz@googlemail.com"
] | joezuntz@googlemail.com |
90666c5cc6eff1cf432eac73b42bd2a8ba4eba13 | b9adf873bc36f8e1244d889cedeee22ad9a3cb6b | /PythonForArcGIS/SF_PFA2/ch10/script/bufferLoopRange.py | 88a69b10d0421228a1d531d3d0412cb609489a48 | [] | no_license | forgetbear/B_PYTHON_GIS | e2860b1dfdf1e714ffef0fad90949c083b1d4ab4 | a92cdb97f601a4c61c399ad75c5f839983fab956 | refs/heads/master | 2023-06-08T03:18:03.786982 | 2023-05-28T16:42:37 | 2023-05-28T16:42:37 | 104,445,746 | 0 | 0 | null | 2017-09-22T07:34:40 | 2017-09-22T07:34:40 | null | UTF-8 | Python | false | false | 595 | py | # bufferLoopRange.py
# Purpose: Buffer a park varying buffer distances from 1 to 5 miles.
import arcpy
arcpy.env.workspace = 'C:/gispy/data/ch10'
outDir = 'C:/gispy/scratch/'
arcpy.env.overwriteOutput = True
inName = 'park.shp'
for num in range(1, 6):
# Set the buffer distance based on num ('1 miles', '2 miles', .... | [
"aaronhsu219@gmail.com"
] | aaronhsu219@gmail.com |
5c18aa542642be81a4a39dd0d778ab66114f13fa | cc13092b652113221a877db2bf907c050dc30aaa | /meta_reward_learning/textworld/lib/graph_search.py | 71904064535272cd066fb4381f410246e4c7b088 | [
"MIT",
"Apache-2.0"
] | permissive | Th-Fo/google-research | 1e62ee50f76c2931fdb6db1de736a85e94251e25 | 9d7bd968843c27216d01c92ff832b1cd58cafa85 | refs/heads/master | 2020-12-27T17:30:43.916109 | 2020-05-25T17:06:20 | 2020-05-25T17:06:20 | 237,989,659 | 1 | 3 | Apache-2.0 | 2020-05-25T17:06:22 | 2020-02-03T14:52:08 | null | UTF-8 | Python | false | false | 2,199 | py | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
69245191cd77a6704b51bcdadfef4132821d8865 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /eXe/rev2283-2409/base-trunk-2283/exe/engine/idevice.py | bfd60b87586091ea323f16d24950704388984cf6 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,006 | py | """
The base class for all iDevices
"""
import copy
import logging
from exe.engine.persist import Persistable
from exe.engine.translate import lateTranslate
log = logging.getLogger(__name__)
class Idevice(Persistable):
"""
The base class for all iDevices
iDevices are mini templates which the user uses to cr... | [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
915dabab5c458624fe039b5c88de3417309b62b0 | 779bf1355be59dc85a231d7d8fe822d0fca78c9f | /coords.py | 046bee245816be8db92b594b2c0d343b263de4e8 | [
"MIT"
] | permissive | euribates/Jupyter-Intro | a37ee963e56b0335fcd58f1897ee698b2fca6368 | a199655436cc4ccd41ec22398a1c5212c541f24b | refs/heads/master | 2018-10-01T02:42:55.713920 | 2018-06-20T15:02:49 | 2018-06-20T15:02:49 | 81,320,064 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,678 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import random
import math
import pygame
pygame.init()
size = width, height = 640, 480
center = offset_x, offset_y = width // 2, height // 2
zoom = 20
screen = pygame.display.set_mode(size)
# Colores
black = (0, 0 , 0)
white = (255, 255, 255)
red = (255, ... | [
"euribates@gmail.com"
] | euribates@gmail.com |
55e9f2f4de361a1f709ffdf0a753ec52d4d177e2 | 2581fbdc72887143376a8f9d8f0da0f1508b9cdf | /Flask/06-Larger-Flask-Applications/01-Using-Blueprints/myproject/owners/forms.py | a398f9af17e4d3efc9a0b241ea479d29218f4db5 | [
"Apache-2.0"
] | permissive | Sandy1811/python-for-all | 6e8a554a336b6244af127c7bcd51d36018b047d9 | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | refs/heads/master | 2022-05-16T02:36:47.676560 | 2019-08-16T08:35:42 | 2019-08-16T08:35:42 | 198,479,841 | 1 | 0 | Apache-2.0 | 2022-03-11T23:56:32 | 2019-07-23T17:39:38 | Jupyter Notebook | UTF-8 | Python | false | false | 241 | py | from flask_wtf import FlaskForm
from wtforms import StringField, IntegerField, SubmitField
class AddForm(FlaskForm):
name = StringField('Name of Owner:')
pup_id = IntegerField("Id of Puppy: ")
submit = SubmitField('Add Owner')
| [
"sndp1811@gmail.com"
] | sndp1811@gmail.com |
5fb26953854ce78b6558fe662ba2e222f16ae8ce | 99cf54dd53c956c12d27c15fc15b206c70a462cf | /ch05/5-4-continue.py | 29da73ff9e7640d03ce16ab64176b2b3ebd5660f | [] | no_license | 404232077/python-course | b5707735fd899af5be07b5c643f0188db54a2ae3 | 6845010db7aa8414138b0cfd8101745532c6c01e | refs/heads/master | 2020-06-15T16:54:17.367489 | 2019-07-05T06:40:14 | 2019-07-05T06:40:14 | 195,346,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | for i in range(1,6):
if i == 3:
continue
print(i)
i = 0
while (i<5):
i += 1
if i == 3:
continue
print(i) | [
"40423207@gm.nfu.edu.tw"
] | 40423207@gm.nfu.edu.tw |
75786aef013e828db98c42bcabea6ce32f0e6106 | cbc27ca33656dc85d462b2e7dc515fb991b7eda4 | /app/colors.py | 04a4108cff5f335df2c2112a2731227d9952c16d | [] | no_license | AlexandreMarcotte/PolyCortex_Gui | d82ea86bb1c068005835ad305c7e4fdaaca89405 | c3e70783daea793988ea8bd3b0a58f87fc50ec8f | refs/heads/master | 2022-10-26T06:31:59.343475 | 2019-05-17T16:31:57 | 2019-05-17T16:31:57 | 141,066,152 | 3 | 0 | null | 2021-03-25T22:40:29 | 2018-07-15T23:43:34 | Python | UTF-8 | Python | false | false | 1,865 | py | # Colors used for the regions in the signal where event occur
red = (255, 0, 0, 10)
p300_red = (255, 0, 0, 255)
pale_red = (255, 0, 0, 35)
green = (0, 255, 0, 45)
p300_green = (0, 255, 0, 255)
p300_white = (255, 255, 255, 255)
blue = (0, 0, 255, 10)
yellow = (255, 255, 0, 45)
purple = (146, 56, 219, 45)
dark_grey = (3,... | [
"alexandre.marcotte.1094@gmail.com"
] | alexandre.marcotte.1094@gmail.com |
ae5550ca8397473eab8016c7442730089e83b4c7 | 65dce36be9eb2078def7434455bdb41e4fc37394 | /66 Plus One.py | 6576b5adcd01a259a42b93a3c4bea3c281e1c33e | [] | no_license | EvianTan/Lintcode-Leetcode | 9cf2d2f6a85c0a494382b9c347bcdb4ee0b5d21a | d12dd31e98c2bf24acc20c5634adfa950e68bd97 | refs/heads/master | 2021-01-22T08:13:55.758825 | 2017-10-20T21:46:23 | 2017-10-20T21:46:23 | 92,607,185 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | 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... | [
"yiyun.tan@uconn.edu"
] | yiyun.tan@uconn.edu |
30c81a894419eab115ec96db9261083590ebfc47 | dae212cb615e5eba3fe8108799a39bc09d7bddb6 | /leetcode/0114_flatten_binary_tree_to_linked_list.py | 279786e78ff2bcc7c0585f3c696750b0a152436c | [] | no_license | cs-cordero/interview-prep | a291b5ce2fb8461449e6e27a1f23e12b54223540 | c3b5b4612f3641572d2237e36aa23019c680c799 | refs/heads/master | 2022-05-23T10:39:59.817378 | 2020-04-29T12:57:12 | 2020-04-29T12:57:12 | 76,767,250 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 844 | py | from utils import Empty, TreeNode
class Solution:
def flatten(self, root: TreeNode) -> None:
if not root:
return
if root.right and root.left:
traverse_to_next(root.left).right = root.right
if root.left:
root.right = root.left
root.left = Non... | [
"ccordero@protonmail.com"
] | ccordero@protonmail.com |
77d28f6918656e3e80ca82ecd1f0f0d266db8677 | a6610e191090e216b0e0f23018cecc5181400a7a | /robotframework-ls/tests/robotframework_ls_tests/test_signature_help.py | 52c4d14f1ade79e59b100f9e7482619e5995ca6a | [
"Apache-2.0"
] | permissive | JohanMabille/robotframework-lsp | d7c4c00157dd7c12ab15b7125691f7052f77427c | 610f0257fdcd79b8c38107a0ecf600f60160bc1f | refs/heads/master | 2023-01-19T10:29:48.982578 | 2020-11-25T13:46:22 | 2020-11-25T13:46:22 | 296,245,093 | 0 | 0 | NOASSERTION | 2020-09-17T06:58:54 | 2020-09-17T06:58:53 | null | UTF-8 | Python | false | false | 774 | py | def test_signature_help_basic(workspace, libspec_manager, data_regression):
from robotframework_ls.impl.completion_context import CompletionContext
from robotframework_ls.impl.signature_help import signature_help
workspace.set_root("case4", libspec_manager=libspec_manager)
doc = workspace.get_doc("case... | [
"fabiofz@gmail.com"
] | fabiofz@gmail.com |
d5e085cb5ff4e318e55a21d55d80d6291f46ef1a | 5d06a33d3685a6f255194b13fd2e615e38d68850 | /opytimark/markers/boolean.py | b94c6a3c83585ca07ebb257de8df8a53c75b5e43 | [
"Apache-2.0"
] | permissive | sarikoudis/opytimark | 617a59eafaabab5e67bd4040473a99f963df7788 | cad25623f23ce4b509d59381cf7bd79e41a966b6 | refs/heads/master | 2023-07-24T04:19:55.869169 | 2021-09-03T13:09:45 | 2021-09-03T13:09:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,964 | py | """Boolean-based benchmarking functions.
"""
import itertools as it
import numpy as np
import opytimark.utils.constants as c
import opytimark.utils.decorator as d
import opytimark.utils.exception as e
from opytimark.core import Benchmark
class Knapsack(Benchmark):
"""Knapsack class implements a boolean-based v... | [
"gth.rosa@uol.com.br"
] | gth.rosa@uol.com.br |
444a1bdc1e196a8d209a09c69e8e5c15df8aa12a | c0a49527d2d6bf56c04349bda832875625451a39 | /project/apps/stats/urls.py | 6b857438a50d724df7c3f12febe3c65ead52540e | [
"MIT"
] | permissive | mbi/chin-up | 03d3dd7c74320aee3924ad587f4c78e8dcee815b | 4e55082996c53fcbf3e70157ba59c9c40d1fdbcc | refs/heads/master | 2023-08-21T23:14:26.368231 | 2014-05-20T08:05:55 | 2014-05-20T08:05:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
url(r'stats[/]$', 'stats.views.stats_view', name='stats'),
)
| [
"eric@ckcollab.com"
] | eric@ckcollab.com |
2f84b40b125e8d1ca2183e5d813edf383ecb7ec2 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/92/usersdata/250/37892/submittedfiles/atividade.py | d3db75de167513632efef98cec11cea616e0aa85 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | # -*- coding: utf-8 -*-
import math
n=int(input('digite um vlor:'))
i=1
contaor=0
while i<=n:
if n>0:
s=i/(n-1)
contador=0
i=i+1
print('%.5f'%s)
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
ac27f07c1d4dcebea6d5af25abd002e5e717a87c | eaf4408fd01ced7acbee7bd72cbae386c6249842 | /Projects/01-MidtermProject/tests/q1_14a.py | da8b80dab10b6f009f005d279943667830c30639 | [] | no_license | ucsd-ets/dsc10-wi21 | 54176ac31bf5bed75ab33bb670f7aec6358fd886 | 9ffe29f5af2cc58b58a08c82943f91a17b90fe91 | refs/heads/main | 2023-03-21T04:32:42.873980 | 2021-03-13T02:59:59 | 2021-03-13T02:59:59 | 325,040,482 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | test = { 'name': 'q1_14a',
'points': 1,
'suites': [{'cases': [{'code': '>>> isinstance(weekday_pos_avg, float)\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
| [
"yal319@ucsd.edu"
] | yal319@ucsd.edu |
d94fa9f50b45c677b965d5e716e5003ff19c3882 | c05ed32f1ef7e1eb7d73efd674e7d1fd710ad171 | /daily-coding-problems/problem231.py | 9db45bfef6c22729c0abe839d101f948f9ed752e | [] | no_license | carlhinderer/python-exercises | c8367517fdf835fa1117f96dbfee3dccc596afa6 | 4e09bbb4c4e2bd5644ed50e997db9f3c289a18f7 | refs/heads/master | 2021-06-01T16:17:00.389134 | 2021-02-09T18:21:01 | 2021-02-09T18:21:01 | 150,902,917 | 0 | 0 | null | 2021-04-20T20:33:11 | 2018-09-29T21:03:36 | Python | UTF-8 | Python | false | false | 286 | py | # Problem 231
# Easy
# Asked by IBM
#
# Given a string with repeated characters, rearrange the string so that no two
# adjacent characters are the same. If this is not possible, return None.
#
# For example, given "aaabbc", you could return "ababac". Given "aaab", return None.
# | [
"carl.hinderer4@gmail.com"
] | carl.hinderer4@gmail.com |
0e3cb13687bee190c90eda8bf825e45860f50c81 | 757705e98cc059b0ada491489660ac3bd6e49607 | /udun/balrog/updates.py | 49ddba3688bd32b4c19bca89934d0e2cbe18b651 | [] | no_license | mozilla-services/udun-bridge | 997ef4b83c0e33cab4a12ce25aef13843e279896 | c9494b89416c181c8de2771542089588e3087040 | refs/heads/master | 2021-01-10T06:11:23.530733 | 2019-03-28T14:12:08 | 2019-03-28T14:12:08 | 44,543,019 | 3 | 4 | null | 2019-03-28T14:12:10 | 2015-10-19T15:08:04 | Python | UTF-8 | Python | false | false | 801 | py | # tarek from
# https://hg.mozilla.org/build/tools/file/default/lib/python/balrog/submitter/
# version 9f4e6a2eafa1
import jsonmerge
def merge_partial_updates(base_obj, new_obj):
"""Merges 2 update objects, merging partials and replacing completes"""
schema = {
"properties": {
# Merge parti... | [
"tarek@ziade.org"
] | tarek@ziade.org |
7680615359e2adab26c0a4e6929c0f2a1f392e18 | e2de3f6fe4373f1d98b67af61dd558a813250d54 | /Algorithm/baekjoon/2312_수복원하기.py | b65b63e92206cee06f30380b4dcfbacde3b509fd | [] | no_license | Hansung-Lee/TIL | 3fd6d48427a8b24f7889116297143855d493535b | c24ebab8b631f5c1b835fdc8bd036acbebc8d187 | refs/heads/master | 2020-04-14T11:18:54.035863 | 2019-04-05T07:26:55 | 2019-04-05T07:26:55 | 163,810,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | T = int(input())
for t in range(T):
N = int(input())
li = [0] * (N-1)
for i in range(len(li)):
while not N%(i+2):
N = N//(i+2)
li[i] += 1
for i in range(len(li)):
if li[i]:
print (f"{i+2} {li[i]}") | [
"ajtwlsgkst@naver.com"
] | ajtwlsgkst@naver.com |
4a5cf4b293ba338af36939e2ae54ccc79a1b1a16 | f33364172d2408304fbc5064774d8a864f7c1478 | /django_products/app/views_user.py | fee116c43f4275f85831dbcdcd6eb4f58ec3952e | [] | no_license | pytutorial/py2005E | 4506e13ef37810b7f5b20fcafbaee1467f9f6e97 | 7765a2d812def499ab2a8eb7dff3ad3cdcd7716f | refs/heads/master | 2022-12-09T23:09:26.657784 | 2020-09-11T13:38:05 | 2020-09-11T13:38:05 | 284,680,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,841 | py | from django.shortcuts import render, redirect
from .models import *
from .forms import OrderForm, SearchForm
from datetime import datetime
import math
def getPriceRangeValue(priceRange):
if str(priceRange) == '1': return None, 10
if str(priceRange) == '2': return 10, 20
if str(priceRange) == '3': return 20... | [
"duongthanhtungvn01@gmail.com"
] | duongthanhtungvn01@gmail.com |
6bf10ed48864690d532c2218b82c770acc6a402c | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_subdivided.py | 4577fabad755648b5b6de69c364b017a654052bb | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 259 | py |
from xai.brain.wordbase.verbs._subdivide import _SUBDIVIDE
#calss header
class _SUBDIVIDED(_SUBDIVIDE, ):
def __init__(self,):
_SUBDIVIDE.__init__(self)
self.name = "SUBDIVIDED"
self.specie = 'verbs'
self.basic = "subdivide"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
c8033a45df8ddb48b786a6272cfb49e950150c1a | 6a8bc7da3104726f894ae360fce6a43a54b30812 | /gradio/themes/app.py | 0c4c5a5e4050d81fc1ba684175f285cfef7670db | [
"Apache-2.0"
] | permissive | gradio-app/gradio | 0b6b29bb0029ad3b8fc1b143f111b1230b29d23a | e4e7a4319924aaf51dcb18d07d0c9953d4011074 | refs/heads/main | 2023-09-01T10:56:50.822550 | 2023-09-01T00:28:01 | 2023-09-01T00:28:01 | 162,405,963 | 21,224 | 1,537 | Apache-2.0 | 2023-09-14T21:42:00 | 2018-12-19T08:24:04 | Python | UTF-8 | Python | false | false | 5,249 | py | import time
import gradio as gr
from gradio.themes.utils.theme_dropdown import create_theme_dropdown
dropdown, js = create_theme_dropdown()
with gr.Blocks(theme=gr.themes.Default()) as demo:
with gr.Row().style(equal_height=True):
with gr.Column(scale=10):
gr.Markdown(
"""
... | [
"noreply@github.com"
] | gradio-app.noreply@github.com |
c6bbd6594ae99077c6c3adcd262581a0fa470645 | ecad2803537295a24fe8274f99dfb85ead3a7191 | /debian/tmp/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/ips.py | 6ad888fd720bc78a4e2aa588ff7eaa17984c7526 | [
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] | permissive | bopopescu/stacklab-nova | 98400585ec3b4e3e94269dcb41578fffe7e2c8c1 | 4ab1698659b663ef222255610d1a5c042706dd65 | refs/heads/master | 2022-11-20T12:07:18.250829 | 2012-12-13T04:43:00 | 2012-12-13T04:43:00 | 282,166,345 | 0 | 0 | Apache-2.0 | 2020-07-24T08:31:57 | 2020-07-24T08:31:56 | null | UTF-8 | Python | false | false | 3,472 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | [
"yuanotes@gmail.com"
] | yuanotes@gmail.com |
5cafe1b409dddcffba908a42582d4795944108ff | 74ab22a81ac24e6e13335b6873674de180b14c26 | /search/search_dictionary.py | 1a8acef12ca20267c97848bf4832af217fc04276 | [] | no_license | attiakihal/MazeSolver | e92d39c62a582b564bfb437c8dde06754407c626 | f737b3f4236884a70df0e35977704fe0d2836292 | refs/heads/master | 2022-04-22T22:30:40.153668 | 2019-12-08T00:56:42 | 2019-12-08T00:56:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | from search.a_star_euclidean import a_star_euclidean
from search.a_star_manhattan import a_star_manhattan
from search.bidirectional_bfs import bidirectional_bfs
from search.bfs import bfs
from search.dfs import dfs
search_dictionary = {
"a_star_euclidean": a_star_euclidean,
"a_star_manhattan": a_star_manhattan... | [
"jonathan@Jonathans-MacBook-Pro.local"
] | jonathan@Jonathans-MacBook-Pro.local |
e5fae4b360e137a154ade338c6c6deca8b1e06e0 | d4157df22a19225b23e52476e00d854409b1f43c | /LogisticRegression/Regularized/CostReg.py | 3709d94c0be8f818e14101053f38ab8635f9bd3e | [] | no_license | shan18/Solutions-to-Machine-Learning-by-Andrew-Ng | fc4f3cd49b807ef9ce91586a4de027aa1520b04f | bcdd3a34da925944c5e03ebcf3b2c6998f731c87 | refs/heads/master | 2020-12-02T21:25:05.049786 | 2017-10-01T11:19:34 | 2017-10-01T11:19:34 | 96,312,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | import numpy as np
from LogisticRegression.Sigmoid import sigmoid
def cost_reg(theta, X, y, learning_rate):
theta = np.matrix(theta)
X = np.matrix(X)
y = np.matrix(y)
first = np.multiply(-y, np.log(sigmoid(X * theta.T)))
second = np.multiply(1 - y, np.log(1 - sigmoid(X * theta.T)))
reg = (lea... | [
"thegeek.004@gmail.com"
] | thegeek.004@gmail.com |
2e523a5434e9acf6c16fdb2354db39bc2eda42dc | 37a3c2ae904998a10ad6ec9f3cd715cdda718b21 | /pythonforandroid/recipes/opencv/__init__.py | 7e70162ea315ee1144d82eb1fb473565ecba8c89 | [
"Python-2.0",
"MIT"
] | permissive | agilewalker/python-for-android | 311a97422545b5861baaeeb9c52ee7f53959acb8 | a2fb5ecbc09c4847adbcfd03c6b1ca62b3d09b8d | refs/heads/master | 2021-09-14T07:14:02.044913 | 2017-12-12T08:13:23 | 2018-01-04T12:54:31 | 113,962,045 | 1 | 2 | MIT | 2018-05-09T11:29:50 | 2017-12-12T08:11:25 | Python | UTF-8 | Python | false | false | 2,228 | py | import os
import sh
from pythonforandroid.toolchain import (
NDKRecipe,
Recipe,
current_directory,
info,
shprint,
)
from multiprocessing import cpu_count
class OpenCVRecipe(NDKRecipe):
version = '2.4.10.1'
url = 'https://github.com/Itseez/opencv/archive/{version}.zip'
#md5sum = '2ddfa9... | [
"frmdstryr@gmail.com"
] | frmdstryr@gmail.com |
45b1b8c35f3cf8c84f1fe49e5ff6aa9be0228989 | 6ab67facf12280fedf7cc47c61ae91da0bcf7339 | /service/yowsup/yowsup/demos/echoclient/layer.py | df0d73c7ce854b213f893a6fb7a43a51cb2d7fde | [
"MIT",
"GPL-3.0-only",
"GPL-3.0-or-later"
] | permissive | PuneethReddyHC/whatsapp-rest-webservice | 2f035a08a506431c40b9ff0f333953b855f9c461 | 822dfc46b80e7a26eb553e5a10e723dda5a9f77d | refs/heads/master | 2022-09-17T14:31:17.273339 | 2017-11-27T11:16:43 | 2017-11-27T11:16:43 | 278,612,537 | 0 | 1 | MIT | 2020-07-10T11:04:42 | 2020-07-10T11:04:41 | null | UTF-8 | Python | false | false | 1,646 | py | from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
class EchoLayer(YowInterfaceLayer):
@ProtocolEntityCallback("message")
def onMessage(self, messageProtocolEntity):
if messageProtocolEntity.getType() == 'text':
self.onTextMessage(messa... | [
"svub@x900.svub.net"
] | svub@x900.svub.net |
6d669d90ebcebb6b738d3b848a30cd772f7906d8 | 9e335834e7be81068f001d5451781d5c1530ebbf | /CorePython/chapter15/my_card.py | 9a24af345fd158da0a3259cb26a492e7278bfb39 | [] | no_license | jtr109/SelfLearning | c1dbffa5485d0cd2f444ea510da62a8e3d269dbc | cc920ed507647762b9855385be76869adac89e7c | refs/heads/master | 2020-04-06T04:11:31.143688 | 2016-07-22T02:19:39 | 2016-07-22T02:19:39 | 58,049,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | # !/usr/bin/python
# -*- coding: utf-8 -*-
import re
def is_legal(data):
patt = '(\d{15,16})|(\d{4}-\d{6}-\d{5})|(\d{4}(-\d{4}){3})'
try:
for i in range(1, 4):
if re.match(patt, data).group(i):
pd = purify(data, i)
return legal_card(pd)
except Attribute... | [
"lyp_login@outlook.com"
] | lyp_login@outlook.com |
5c28d0b822397cf4e9ac5940634bfe9334e9babc | f2cc45e46a55c09570574eeaf358919491b4fae9 | /作业/7石头剪刀布.py | e48814caaf4f0f0203e12107fa0f806dc29be394 | [] | no_license | 2099454967/python_wang | f4f5e10891ed9be6112f8f3d0d6313975e2f914f | c9dd8a5f6a9864d2a3e61bad9a12cea566ebdec9 | refs/heads/master | 2020-03-11T17:43:43.288920 | 2018-04-24T05:27:53 | 2018-04-24T05:27:53 | 130,155,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | #1---石头
#2---剪刀
#3---布
import random
a = random.randint(1,3)
b = int(input('请输入1---石头 2---剪刀 3---布'))
if (a==1 and b==2) or (a==2 and b==3) or (a==3 and b==1):
print('玩家赢')
elif a==b:
print('平局')
else:
print('电脑赢')
| [
"2099454967@qq.com"
] | 2099454967@qq.com |
3388e852acf0ee62545acf09ca024839f5401c63 | 67c0d7351c145d756b2a49e048500ff361f7add6 | /xpresso/ai/admin/infra/packages/ubuntu/utility/docker_distribution_package.py | 81af3bf83624d6377f690deef24079eac561889b | [] | no_license | Krishnaarunangsu/XpressoDataHandling | ba339ae85b52e30715f47406ddb74966350848aa | 0637a465088b468d6fdb6d1bb6f7b087547cec56 | refs/heads/master | 2020-06-27T19:58:43.358340 | 2019-08-29T16:59:08 | 2019-08-29T16:59:08 | 200,035,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,425 | py | """Abstract base class for packages object"""
__all__ = ['DockerDistributionPackage']
__author__ = 'Naveen Sinha'
import os
import shutil
from xpresso.ai.admin.infra.packages.abstract_package import AbstractPackage
from xpresso.ai.admin.infra.packages.local_shell_executor import \
LocalShellExecutor
from xpresso... | [
"arunangsutech@gmail.com"
] | arunangsutech@gmail.com |
2bfdde0bcb495db0d4fffb4b7621471a705ddae0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/138/usersdata/210/47892/submittedfiles/volumeTV.py | d81c84c26ad1a6f289f01b721bd8d351fc33d0df | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py |
e=int(input('digite e:'))
f=int(input('digite f:'))
cont=e
for i in range(1,f+1,1):
a=int(input('digite alteração:'))
if (cont+a)<=100 and cont>=0:
cont=cont+a
elif (cont+a)>=100:
e=cont-100
cont=cont-e
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
d18fe269d04f86552cec9fbf8aa058fd36933eb2 | 4421cdef9d23204d392726db4e3886b8aec3072d | /Django/SDD/HEHE/migrations/0005_auto_20200913_1127.py | 058d909ce14f025e64ab9d7d4d3d2cb91ca114cb | [] | no_license | Sanketdave12/PRACTICE | f38b8eae569ee670db55610202ef6f3e60fade87 | 0f71359cf5326be73b3d9d4b1219bea4832cc194 | refs/heads/master | 2022-12-27T08:08:45.953842 | 2020-09-18T17:31:23 | 2020-09-18T17:31:23 | 296,587,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | # Generated by Django 3.1.1 on 2020-09-13 05:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('HEHE', '0004_delete_profile'),
]
operations = [
migrations.RemoveField(
model_name='notice',
name='branch',
),
... | [
"sddave1998@gmail.com"
] | sddave1998@gmail.com |
df748b62727262acccea6b2dec74421a653c6b2d | fae5487c5e50d0f42cd4fc82011c67df17b424c0 | /generatorify.py | ced38a537b4f15b00af87cc145d7e2ebb0febbc2 | [
"MIT"
] | permissive | eric-wieser/generatorify | b970dbda12f7e3dca481b29647a685294dc370c9 | 7bd759ecf88f836ece6cdbcf7ce1074260c0c5ef | refs/heads/master | 2020-06-25T05:37:03.755586 | 2019-07-28T07:03:47 | 2019-07-28T07:03:47 | 199,217,917 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,760 | py | import queue
import threading
import collections.abc
class generator_from_callback(collections.abc.Generator):
"""
A generator wrapper for a function that invokes a callback multiple times.
Calling `send` on the generator emits a value from one callback, and returns
the next.
Note this starts a ... | [
"wieser.eric@gmail.com"
] | wieser.eric@gmail.com |
52cef1b52cab1ee988800a17d8e10bdc0f556955 | ef8a358a3f54a26610eadcac6d0ebca406fa2578 | /undermythumb/files.py | 36b90251fc9af101bfca1712b36bdec09229c64d | [
"BSD-3-Clause"
] | permissive | GunioRobot/django-undermythumb | af8f2f0ac0ec65d6d4c777eaf380510b8e81bd1b | f70be02998cbe97e452d8e0d66e8efc276e77621 | refs/heads/master | 2020-12-25T09:18:40.332593 | 2011-11-08T20:17:56 | 2011-11-08T20:18:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,632 | py | from django.db.models.fields.files import ImageFieldFile
__all__ = ['ThumbnailFieldFile', 'ImageWithThumbnailsFieldFile']
class ThumbnailSet(object):
def __init__(self, field_file):
self.file = field_file
self.field = self.file.field
self.instance = self.file.instance
self._cac... | [
"mattdennewitz@gmail.com"
] | mattdennewitz@gmail.com |
2e826a8d46d2e1211a1caa8a225498c5824b60a3 | 52a61caff0aeb434c32e5657e38762643e9f57dd | /DataStructuresAndAlgorithms/SearchAndSort/Sort/Count&CountingSort&Digital(Bitwise)Sorting/socks.py | 189a8837bd71a575381bfb18e4a7ee984d0e9355 | [] | no_license | AndrewErmakov/PythonTrainingBasics | 1480a6378d1ec59884760e2b3014ccc3d28f058f | 639e15bbfc54da762cb9e366497754cfece30691 | refs/heads/master | 2021-06-10T15:57:58.682335 | 2021-03-25T13:37:30 | 2021-03-25T13:37:30 | 153,678,760 | 0 | 0 | null | 2018-10-30T13:52:51 | 2018-10-18T19:45:47 | Python | UTF-8 | Python | false | false | 542 | py | len_table, count_socks, count_points = map(int, input().split())
def determination_thickness(length_table, number_socks, number_points):
count_list = [0] * (length_table + 1)
for _ in range(number_socks):
left_border, right_border = map(int, input().split())
for i in range(left_border, right... | [
"andrew.67@list.ru"
] | andrew.67@list.ru |
4c350d9b6720d62fa21156d31748be72346a2283 | ca3150c69ef477ea53902c51d3840195262f2903 | /ISStreamer-r-3-bucket.py | 797f6edf0693846d02d60e183933d15353f5a284 | [] | no_license | chaeplin/dash-mainnet | 66c8df6f4a6df25c53e9ba1572a39e12d9e61daf | 10891c210a3cf40f2e052ee9d2657a97a71efba6 | refs/heads/master | 2021-01-19T21:15:49.790385 | 2017-11-14T20:25:52 | 2017-11-14T20:25:52 | 82,476,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,549 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import io, os, sys
import simplejson as json
import datetime
import time
import redis
from ISStreamer.Streamer import Streamer
# bucket1 = dash121
iss_bucket_name1 = 'dash121'
iss_bucket_key1 = 'xxx'
iss_access_key1 = 'xxxx'
QUE_NAME1 = 'INITIALSTATE_PUSH' + iss... | [
"chaeplin@gmail.com"
] | chaeplin@gmail.com |
7dfe6483c3bf294fe7a02d964523db051a1eb588 | f166278e5e626c142245e4a9164ab4ed610a5cd4 | /apps/utils/requests_wrapper.py | 8d554e89487b84d6e723d8a0a51469e5668965e3 | [
"MIT"
] | permissive | wumulong/advance_django_example | 4cffd6de2eb9fdccefff7b995317a81e63b459be | 4832438a7db1065f7351a6cf4d4580ca1b6fffeb | refs/heads/master | 2021-06-24T13:34:31.873207 | 2017-09-11T15:13:40 | 2017-09-11T15:13:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,514 | py | import requests
def requests_get(protocal, host, port, url, headers={}, params={}):
reqeusts_result = {}
if port:
requests_url = '{0}://{1}:{2}{3}'.format(protocal, host, port, url)
else:
requests_url = '{0}://{1}{2}'.format(protocal, host, url)
try:
r = requests.get(requests_... | [
"lsdlab@icloud.com"
] | lsdlab@icloud.com |
320615428a22aa133469f7c75f2279ba09ba1719 | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/list_az2_migrate_request.py | 82455211ce51806b36c1f4d66474c9564882e62b | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,026 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListAz2MigrateRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The ... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
deb19ce4bc3e611f561d6ea04d4999f2e9b15fc3 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /bJxNHk7aovkx8Q776_10.py | 69e76a086c61099322e2b65ff967b675005faf40 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py |
def gold_distribution(gold):
totals, p = [0, 0], 0
while gold:
idx = -1 if gold[-1] > gold[0] else 0
totals[p] += gold.pop(idx)
p = 1 - p
return totals
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
9e0aa6a22faffb9424db0cf20701f012fab75424 | 59b72b8f662cd605b3ce31f54779c17e5ca066d0 | /interview_q/leet_code/解码方法.py | 84496ba3e188f5a6b9f0ffc14b200e43e24c76c6 | [] | no_license | dongyang2/hello-world | c1f5853ccafd6b8f23836192547ab36f898e0891 | 1f859b53e2b21ed5a648da09b84950f03ec1b370 | refs/heads/master | 2022-12-11T22:07:22.853912 | 2022-11-24T03:52:35 | 2022-11-24T03:52:35 | 119,025,960 | 0 | 0 | null | 2018-01-26T10:09:58 | 2018-01-26T08:28:10 | null | UTF-8 | Python | false | false | 4,137 | py | # https://leetcode-cn.com/problems/decode-ways/
# coding:utf-8
# Python 3
# 数字与字母一一对应,求转换结果。解法参考本文件夹下的爬楼梯和电话号码的字母组合。
"""
此题和爬楼梯是同一个类型的问题,难点在于其添加了许多限制条件,只要避开限制条件就可以完美解题了
每次递进,可以选取一个数也可以选取两个数:
s[i] != '0'
如果 s[i-1]s[i] <= 26, 则 dp[i] = dp[i-1] + dp[i-2]
如果 s[i-1]s[i] > 26, 则 dp[i] = dp[i-1], 这是因为 s[i-1]s[i... | [
"dongyangzhao@outlook.com"
] | dongyangzhao@outlook.com |
73a708a16278b09791fad51bf5d305698e82b80d | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/pg_2352+180/sdB_PG_2352+180_coadd.py | 4f361c9b0b46950c02cba15a5912a175c25af4eb | [] | 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 | 430 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[358.821833,18.337653], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_PG_2352+180/sdB_PG_2352+180_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sdB... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
e391925b4696862a60c04799026bcb83b93c85ed | 6e507e231d37d0b61d70d6694ffc928c1c638973 | /lab07password_generator.py | e140d562109bb3555972e6c8641cf57aee410451 | [] | no_license | pjz987/pdx_code_intro_class | 7a4998be23b90883aad55664ceb97baffe3fcf92 | e85c2e01718e75124b956b924af01e87cdd95ee1 | refs/heads/master | 2020-09-12T21:25:50.152682 | 2019-11-18T23:10:38 | 2019-11-18T23:10:38 | 222,561,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,271 | py | '''
filename : lab07password_generator.py
Lab 7: Password Generator
Let's generate a password ten characters long using a loop (while loop or for loop) and random.choice, this will be a string of random characters.
'''
#always import random first if needed
import random
#using import string to quickly call up alphab... | [
"pwj2012@gmail.com"
] | pwj2012@gmail.com |
130b6512484065d4534c3cc77c76a9869d44fb1d | 9dcac6f93c2e460009e3355976989adf3bf1af68 | /PrintSum.py | 3bfb387f9a676c65a8c7e920354df4dc5c3b67e6 | [] | no_license | lpham4/PythonPractice | 99a4db621a6e524b2264314f1d4d47e2474260f9 | fac0931d09441ad03c4b34abae01f928342d53d7 | refs/heads/main | 2023-01-02T11:56:39.192524 | 2020-10-21T23:45:52 | 2020-10-21T23:45:52 | 306,173,850 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | # Class: 1321L
# Section: 02
# Term: Fall 2018
# Instructor: Malcolm
# Name: Ly Pham
# Lab: Python
integer = int(input('Enter an integer between 1 and 100: '))
print('You entered:', integer)
if integer < 1 or integer > 100:
print('Invalid input. Try again.')
else:
count = 0
sum = 0
while count <= integ... | [
"lpham4@students.kennesaw.edu"
] | lpham4@students.kennesaw.edu |
0f5ce3b78bff791a5a68f6e7abc26fc45e210335 | 6f6997efe1a15d57688c12ff0197790fb2eac6bc | /database/old/Init_analysisdb.py | 1c3641363d82c7f49cc1994332fc27e6559afddc | [] | no_license | montanaviking/waferprobe | 29fa5f0eb07e60820162916e48059f63374902c5 | fb2786b376153f9b6e9495b6faf3ee5960f90a06 | refs/heads/master | 2022-11-06T10:57:01.539733 | 2020-06-19T23:47:59 | 2020-06-19T23:47:59 | 273,601,408 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 680 | py | # Phil Marsh Carbonics
# initialize database
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime
from sqlalchemy import (Column, Integer, Numeric, String, DateTime, ForeignKey, Boolean, create_engine)
from sqlalchemy.orm import relationship, backref, sessionmaker
Base=declarative_base... | [
"microcraftx@gmail.com"
] | microcraftx@gmail.com |
4f98779fdde462765812a9d5470c61c3ca5eb16d | 442dae0500db1653541100292a356ab6452363da | /alchemy/test/autoencoder_test.py | 27b9d8e0d4d73dda490f172cd0b0abfcaf1ae4a2 | [
"MIT"
] | permissive | williamd4112/alchemy | b5da5092abd29f2541f0e91c4ed5da033318b9f5 | 6ca509aa2e332170666a67a53bea22f7749c2bc7 | refs/heads/master | 2021-09-07T22:57:15.198254 | 2018-03-02T15:30:27 | 2018-03-02T15:30:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | # -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
import unittest
from alchemy import layers, utils
class AutoEncoderTest(unittest.TestCase):
def test_conv2d_autoencoder(self):
tf.reset_default_graph()
inputs_ph = tf.placeholder(tf.float32, [None, 8, 8, 1])
scope = 'autoencoder'
... | [
"samwenke@gmail.com"
] | samwenke@gmail.com |
6f5a06f1011e0d3399391a74601845265556fd8b | f6348e051252ad0be630a815e33a3f85fbe64c69 | /capture/noworkflow/now/persistence/models/environment_attr.py | a367c23b7af82ec6f6631b0f5bae34e22e5c1dad | [
"MIT"
] | permissive | stefan-grafberger/noworkflow | 74f3e2fd0358621ac785a5f1441645be2d69688b | cbb8964eba7d58a5e87f96fb5bb91ac452b80763 | refs/heads/master | 2023-01-06T02:51:27.881742 | 2020-04-15T21:18:29 | 2020-04-15T21:18:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
"""Environment Attribute Model"""
from __future__ import (absolute_import, print_function,
... | [
"joaofelipenp@gmail.com"
] | joaofelipenp@gmail.com |
ef497c88746e8bec9bf1fe0a637dd05339029c94 | 73361fc6f7ecd9a19359a828b2574499a991bde4 | /gallery2/alembic/versions/3b387b077506_tags.py | 0e50457320a7e40f4de8f43b0812513c399eb1f1 | [] | no_license | danjac/gallery2 | 3a28cd3ca364a30eaf277bfd9db3cac72dd2463a | ff8c50bdfc30d9ac5fff910589b7f976a4b40bcf | refs/heads/master | 2020-05-19T07:59:00.047308 | 2014-01-15T13:44:06 | 2014-01-15T13:44:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,272 | py | """tags
Revision ID: 3b387b077506
Revises: 48641cbf69d7
Create Date: 2014-01-11 11:01:56.791153
"""
# revision identifiers, used by Alembic.
revision = '3b387b077506'
down_revision = '48641cbf69d7'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please ad... | [
"danjac354@gmail.com"
] | danjac354@gmail.com |
372bd628e91fbeb9aec915bafa8af0824234caf7 | a0e777ea7e0d00c061068db132a30a8fa545cc75 | /FluentPython/coro_exc_demo.py | d91049232e9f0fe4694695ec88f001a1a1574ad1 | [] | no_license | aadisetyaa/Python-Cookbook | 87215b64d2d3631d6b18e90a68a09400e7d80919 | a8df0343a39725312686423296bfd860dbaf70ad | refs/heads/master | 2022-04-08T13:41:27.255352 | 2017-11-27T03:54:29 | 2017-11-27T03:54:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | class DemoException(Exception):
"""An exception type for the demonstration."""
def demo_exc_handling():
print('-> coroutine started')
while True:
try:
x = yield
except DemoException:
print('*** DemoException handled. Continuing...')
else:
print('-> coroutine received: {!r}'.format(x))
raise RuntimeE... | [
"wpr101@hotmail.com"
] | wpr101@hotmail.com |
33c243c408ec59eec4ffca44e97be6a52731d741 | 8d753bb8f19b5b1f526b0688d3cb199b396ed843 | /osp_sai_2.1.8/system/apps/rpcapi/vcl/config.py | 9b18d6ac23705afdaa4d0d8f5c3548bd9a168816 | [] | no_license | bonald/vim_cfg | f166e5ff650db9fa40b564d05dc5103552184db8 | 2fee6115caec25fd040188dda0cb922bfca1a55f | refs/heads/master | 2023-01-23T05:33:00.416311 | 2020-11-19T02:09:18 | 2020-11-19T02:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 597 | py | #!/usr/bin/python
#-*- coding: utf-8 -*-
is_dev = True
remote = '10.10.39.167'
dut_regexp = r'DUT\d#'
dut_stdout_pwd_info = r'Password:'
shell_pwd = '!@#'
cmd_regexp = r'\[\w+@.+\]\$'
login_stdout_username_info = r'Username:'
login_stdout_pwd_info = r'Password:'
login_username = 'admin'
login_pwd = 'admin'
RPC_ERROR... | [
"zhwwan@gmail.com"
] | zhwwan@gmail.com |
ab0c31da7017d28b92c6f4359ffeff58c6e480e1 | af4b5830b2a23d1f3d126297c7eb057bb3f8e42f | /pymatflow/cp2k/base/pw_dft_iterative_solver.py | add890dd42de47199b7e0d715dad071d6063957a | [
"MIT"
] | permissive | mukhtarbayerouniversity/pymatflow | de2b2d573ceed68c1dd3c149c538588394029137 | 9ab61e56659519cd6c83d5bd32da1262f44da065 | refs/heads/master | 2023-02-13T01:50:32.993401 | 2021-01-13T15:19:36 | 2021-01-13T15:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | #!/usr/bin/evn python
# _*_ coding: utf-8 _*_
import numpy as np
import sys
import os
import shutil
"""
usage:
"""
# ============================================
# CP2K / PW_DFT / ITERATIVE_SOLVER
#=============================================
class cp2k_pw_dft_iterative_solver:
"""
""... | [
"deqi_tang@163.com"
] | deqi_tang@163.com |
4595c1a0ffd3faf673a9269141df638ad665012f | 37d5b97c54e48f3de690724c01f3b14248c2b194 | /origin/cartpole-a3c.py | 42cb24898277d39b5f3ade93e1e7f38d89d786f2 | [] | no_license | verystrongjoe/a3c-sketch | ae9e60ee87155b7991a7fab4dfa55702e4cc56e9 | 7c8d9bfc76396ef652b609f1b366f98807adbf53 | refs/heads/master | 2020-03-06T14:41:04.358586 | 2018-05-08T09:37:32 | 2018-05-08T09:37:32 | 126,940,203 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,911 | py | import threading
import numpy as np
import tensorflow as tf
import pylab
import time
import gym
from keras.layers import Dense, Input
from keras.models import Model
from keras.optimizers import Adam
from keras import backend as K
# global variables for threading
episode = 0
scores = []
EPISODES = 2000
# This is A3C(... | [
"verystrongjoe@gmail.com"
] | verystrongjoe@gmail.com |
d6f6ff67d8a4ab492c8c24d10ca6a25088ee5e15 | de59ece5d773d8607ba7afe747088ff07062494c | /py-core/tuples/tuples.py | 6198cdf35d43671e60083fd9e761259bb727ab13 | [] | no_license | loggar/py | 4094c6919b040dfc0bb5453dc752145b5f3b46ba | 1116969fa6de00bbc30fe8dcf6445aa46190e506 | refs/heads/master | 2023-08-21T16:47:41.721298 | 2023-08-14T16:12:27 | 2023-08-14T16:12:27 | 114,955,782 | 0 | 0 | null | 2023-07-20T15:11:04 | 2017-12-21T03:01:54 | Python | UTF-8 | Python | false | false | 556 | py | tuple1 = ('abcd', 786, 2.23, 'john', 70.2)
tinytuple = (123, 'john')
print(tuple1) # Prints complete tuple
print(tuple1[0]) # Prints first element of the tuple
print(tuple1[1:3]) # Prints elements starting from 2nd till 3rd
print(tuple1[2:]) # Prints elements starting from 3rd element
print... | [
"webnl@DT-Charly.koi.local"
] | webnl@DT-Charly.koi.local |
aa6662318c74771c0ab32e588e4a200a782bdb3a | 556db265723b0cc30ad2917442ed6dad92fd9044 | /tensorflow/python/client/pywrap_tf_session.py | 96f42ef026b82b874aacfc3b1778ce72ac5c3785 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | graphcore/tensorflow | c1669b489be0e045b3ec856b311b3139858de196 | 085b20a4b6287eff8c0b792425d52422ab8cbab3 | refs/heads/r2.6/sdk-release-3.2 | 2023-07-06T06:23:53.857743 | 2023-03-14T13:04:04 | 2023-03-14T13:48:43 | 162,717,602 | 84 | 17 | Apache-2.0 | 2023-03-25T01:13:37 | 2018-12-21T13:30:38 | C++ | UTF-8 | Python | false | false | 2,973 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
8b0b6d0d068e5c0c0d871706b8de364a8b45b874 | 805593291790843645dc884616c2a672f9cf953a | /graph/spanning_tree/kuraskal.py | 9959bd549a7ac8edeac8ec868b9f23f7ff5978db | [] | no_license | Shumpei-Kikuta/library | 1aa3e5aa1a619734441b431eaf2a872784030ee0 | cfa5a035df2e98641259032c936e063767e53230 | refs/heads/master | 2020-08-03T01:03:31.859006 | 2019-10-25T01:58:30 | 2019-10-25T01:58:30 | 211,575,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,336 | py | """クラスカル法"""
class Node:
def __init__(self, idx):
self.idx = idx
self.parent = None
def unite(x: Node, y: Node, nodes):
"""xを含む集合とyを含む集合を併合"""
x_root, x_depth = root(x, 0)
y_root, y_depth = root(y, 0)
# xの根を併合後の根とする
if y_root != x_root:
if x_depth >= y_depth:
... | [
"shunpei-kikuta775@g.ecc.u-tokyo.ac.jp"
] | shunpei-kikuta775@g.ecc.u-tokyo.ac.jp |
2e9b4bb92dd86faf0815ab836243cd924a9fd5ca | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc088/C/4904355.py | 50700176dd66473e27c6decd361c1ba164066058 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | c1 = list(map(int, input().rstrip().split()))
c2 = list(map(int, input().rstrip().split()))
c3 = list(map(int, input().rstrip().split()))
answer = 'No'
#a1?????a2,a3,b1,b2,b3?????????
for i in range(101):
a1 = i
b1 = c1[0] - a1
b2 = c1[1] - a1
b3 = c1[2] - a1
a2 = c2[0] - b1
a3 = c3[0... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
d3ee9535e42a5f92a997d4814a06b0f8fa25b6c0 | 41a4887a52afe81f203d0917c5ef54ccbe2389fe | /toys/kids/flip_fen.py | 2cc78123c07ce81bb982af2c037ea82d657d8293 | [] | no_license | tgandor/meats | 2efc2e144fc59b2b99aeeaec5f5419dbbb323f9b | 26eb57e49752dab98722a356e80a15f26cbf5929 | refs/heads/master | 2023-08-30T20:35:47.949622 | 2023-08-25T13:26:23 | 2023-08-25T13:26:23 | 32,311,574 | 13 | 9 | null | 2022-06-22T20:44:44 | 2015-03-16T08:39:21 | Python | UTF-8 | Python | false | false | 193 | py | #!/usr/bin/env python
import sys
while True:
line = sys.stdin.readline().split()
if not line:
break
line[0] = '/'.join(line[0].split('/')[::-1])
print(' '.join(line))
| [
"tomasz.gandor@gmail.com"
] | tomasz.gandor@gmail.com |
85b78518837e1b6109966119e16266b004ade7f8 | d66818f4b951943553826a5f64413e90120e1fae | /hackerrank/10 Days of Statistics/Day 8 - Least Square Regression Line/test.py | f5478d0354c945b2bef65095410b7eec0bb973e3 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 521 | py | import io
import unittest
from contextlib import redirect_stdout
from unittest.mock import patch
class TestQ(unittest.TestCase):
@patch('builtins.input', side_effect=[
'95 85',
'85 95',
'80 70',
'70 65',
'60 70',
])
def test_case_0(self, input_mock=None):
te... | [
"hbinhct@gmail.com"
] | hbinhct@gmail.com |
c4d3467d4d06eb14220feda8004d28995b35fb8d | 8acffb8c4ddca5bfef910e58d3faa0e4de83fce8 | /ml-flask/Lib/site-packages/sklearn/metrics/cluster/setup.py | ee0fc49bd4888209bfc12eab6d56e2a17ddf12c9 | [
"MIT"
] | permissive | YaminiHP/SimilitudeApp | 8cbde52caec3c19d5fa73508fc005f38f79b8418 | 005c59894d8788c97be16ec420c0a43aaec99b80 | refs/heads/master | 2023-06-27T00:03:00.404080 | 2021-07-25T17:51:27 | 2021-07-25T17:51:27 | 389,390,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | version https://git-lfs.github.com/spec/v1
oid sha256:e3107d1ba6c899cf749991d704ff933206baa46ff4c7d81e504222277355d67d
size 667
| [
"yamprakash130@gmail.com"
] | yamprakash130@gmail.com |
8fcbd338b424590aa21d59e3c91d905708a89c6c | 1be3fd4f49ff1ba41b36bdb45ad1cd738b7e2e97 | /动态规划/序列型动态规划/LeetCode53_最大子序和.py | 6e96ab053d5009923bc8cc47501246da1dcd9274 | [] | no_license | ltzp/LeetCode | d5dcc8463e46b206515c1205582305d8ce981cc5 | f43d70cac56bdf6377b22b865174af822902ff78 | refs/heads/master | 2023-07-28T02:36:44.202092 | 2021-09-08T15:55:09 | 2021-09-08T15:55:09 | 308,343,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/04/09
# @Author : yuetao
# @Site :
# @File : LeetCode53_最大子序和.py
# @Desc :
"""
输入:nums = [-2,1,-3,4,-1,2,1,-5,4]
输出:6
解释:连续子数组 [4,-1,2,1] 的和最大,为 6 。
在状态的计算过程中我们可以发现,后面状态的计算只与当前状态的值有关,而与此阶段之前的值无关,所以具有无后效性。
"""
class Solution(object):
def ma... | [
"806518802@qq.com"
] | 806518802@qq.com |
d7b51f7ff602b1bd5707500365b2f4011d95eb01 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_ethiopian.py | c12e2d18374d3610fe33cc409fbae8d3b9221e7b | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py |
#calss header
class _ETHIOPIAN():
def __init__(self,):
self.name = "ETHIOPIAN"
self.definitions = [u'belonging to or relating to Ethiopia or its people']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jsond... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
c8609399aa50011c76fc5e290f0e4ee907c1c282 | e4fcd551a9d83e37a2cd6d5a2b53a3cc397ccb10 | /codes/t2i_models/CogView2/SwissArmyTransformer-main/examples/roberta/finetune_roberta_rte.py | 2a97af8db773d45f62776f782c3b787a6622c713 | [
"Apache-2.0"
] | permissive | eslambakr/HRS_benchmark | 20f32458a47c6e1032285b44e70cf041a64f842c | 9f153d8c71d1119e4b5c926b899bb556a6eb8a59 | refs/heads/main | 2023-08-08T11:57:26.094578 | 2023-07-22T12:24:51 | 2023-07-22T12:24:51 | 597,550,499 | 33 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,667 | py | import os
import torch
import argparse
import numpy as np
from SwissArmyTransformer import mpu, get_args
from SwissArmyTransformer.training.deepspeed_training import training_main
from roberta_model import RobertaModel
from SwissArmyTransformer.model.mixins import PrefixTuningMixin, MLPHeadMixin
class Classification... | [
"islam.bakr.2017@gmail.com"
] | islam.bakr.2017@gmail.com |
17d251d9dfe4693be09b37532fad90b492e6416d | 11ccb6827cf643b37c44a2e174422f9c6f9497f2 | /falcon/bench/dj/manage.py | 1ed3638a4df1bec17ec47502b337b01f857ace4a | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | falconry/falcon | 7506f838520e5105714702d9a9b2f0e608a704b9 | 32207fe8a7ebdfb95271d8430c4977c7a654928c | refs/heads/master | 2023-08-31T05:32:03.755869 | 2023-08-21T21:45:34 | 2023-08-21T21:45:34 | 7,040,500 | 8,922 | 1,183 | Apache-2.0 | 2023-09-09T20:58:36 | 2012-12-06T18:17:51 | Python | UTF-8 | Python | false | false | 808 | py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dj.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
... | [
"john.vrbanac@linux.com"
] | john.vrbanac@linux.com |
78e28807403ebdbf2c4fe8e40201ff5e0fc9d861 | b8cc6d34ad44bf5c28fcca9e0df01d9ebe0ee339 | /入门学习/datetime_eg.py | a136cabe3d671ca43e319ccc8cc933f54ffd180a | [] | no_license | python-yc/pycharm_script | ae0e72898ef44a9de47e7548170a030c0a752eb5 | c8947849090c71e131df5dc32173ebe9754df951 | refs/heads/master | 2023-01-05T06:16:33.857668 | 2020-10-31T08:09:53 | 2020-10-31T08:09:53 | 296,778,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | #coding:utf-8
import datetime
#datetime常见属性
#datetime.date():一个理想和的日期,提供year,month,day属性
dt = datetime.date(2018,3,26)
print(dt)
print(dt.day)
print(dt.year)
print(dt.month)
#datetime.time:提供一个理想和的时间
#datetime.datetime:提供日期与实践的组合
#datetime.timedelta:提供一个时间差,时间长度
from datetime import datetime
import time
#常用类方法:today、n... | [
"15655982512.com"
] | 15655982512.com |
f044f713fb899779529717704ff3f507de299d33 | a905f5b56732cb49d5d692b75c7334d772b67144 | /Gui/t2.py | bf8c4c91ef955c1e02ec9ad8aec3f390ced0d5f7 | [] | no_license | weilaidb/PythonExample2 | d859acee3eb3e9b6448553b4f444c95ab2b2fc8f | 492fa2d687a8f3b9370ed8c49ffb0d06118246c7 | refs/heads/master | 2022-04-20T00:35:35.456199 | 2020-04-26T00:32:12 | 2020-04-26T00:32:12 | 114,774,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | '''''5.向Listbox中添加一个item'''
# 以上的例子均使用了insert来向Listbox中添加 一个item,这个函数有两个属性一个为添加的索引值,另一个为添加的项(item)
# 有两个特殊的值ACTIVE和END,ACTIVE是向当前选中的item前插入一个(即使用当前选中的索引作为插入位置);END是向
# Listbox的最后一项添加插入一项
# 先向Listbox中追加三个item,再在Listbox开始添加三项
from tkinter import *
root = Tk()
lb = Listbox(root)
for item in ['python','tkinter','widget']... | [
"wxjlmr@126.com"
] | wxjlmr@126.com |
374eb79ae24863d43ed492b428e933b87a306275 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_43/66.py | 6e5512c1daca685a498a0b628f17dadb6578b723 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | import sys
lines = sys.stdin.readlines()
i = 1
while i<len(lines):
s = set()
msg = lines[i].rstrip()
for each in msg:
s.add(each)
#print len(s)
maxbase = len(s)
if maxbase == 1:
maxbase = 2
cost = maxbase ** (len(msg)-1)
cands = range(len(s))
cands.reverse()
tr... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
52b9507585c470c8c272b918d3b8c1f3741990ae | 651a296c8f45b5799781fd78a6b5329effe702a0 | /subset/i4_sqrt.py | 15231735ca1b9e9e6b31120a626bc3326da2d377 | [] | no_license | pdhhiep/Computation_using_Python | 095d14370fe1a01a192d7e44fcc81a52655f652b | 407ed29fddc267950e9860b8bbd1e038f0387c97 | refs/heads/master | 2021-05-29T12:35:12.630232 | 2015-06-27T01:05:17 | 2015-06-27T01:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,042 | py | #!/usr/bin/env python
def i4_sqrt ( n ):
#*****************************************************************************80
#
## I4_SQRT finds the integer square root of N by solving N = Q^2 + R.
#
# Discussion:
#
# The integer square root of N is an integer Q such that
# Q^2 <= N but N < (Q+1)^2.
#
# A simpl... | [
"siplukabir@gmail.com"
] | siplukabir@gmail.com |
bd49b4bc90efd2d2ceda83f672ca908ee94d8909 | 520e7d0bdc294e89e807ffc5d0277e0b1df035d4 | /taskloaf/object_ref.py | 4021c994f4aaf111c88d9cb39bd4b13d507c22d4 | [
"MIT"
] | permissive | tanwanirahul/taskloaf | 5a454e683dbf681f0a417911280c12176bd4a3a6 | 7f7b027ef18b8475922054ccc44dfcb5de0433bc | refs/heads/master | 2020-04-20T20:55:52.124091 | 2018-12-10T19:21:45 | 2018-12-10T19:21:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,008 | py | import asyncio
import taskloaf.serialize
import taskloaf.allocator
import taskloaf.refcounting
def put(worker, obj):
return FreshObjectRef(worker, obj)
def alloc(worker, nbytes):
ptr = worker.allocator.malloc(nbytes)
def on_delete(_id, worker = worker, ptr = ptr):
worker.allocator.free(ptr)
re... | [
"t.ben.thompson@gmail.com"
] | t.ben.thompson@gmail.com |
4cce22269773651f5e8260b8a82c4e13ef2f377d | e2de3f6fe4373f1d98b67af61dd558a813250d54 | /Algorithm/baekjoon/1546_평균.py | 01a88b1be3fc1e2c36405cedb1ab135649d5e59f | [] | no_license | Hansung-Lee/TIL | 3fd6d48427a8b24f7889116297143855d493535b | c24ebab8b631f5c1b835fdc8bd036acbebc8d187 | refs/heads/master | 2020-04-14T11:18:54.035863 | 2019-04-05T07:26:55 | 2019-04-05T07:26:55 | 163,810,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | import sys
N = int(sys.stdin.readline())
X = list(map(int, sys.stdin.readline().split()))
M = max(X)
new_X = []
for score in X:
new_X.append(score/M*100)
print(sum(new_X)/len(new_X)) | [
"ajtwlsgkst@naver.com"
] | ajtwlsgkst@naver.com |
27b0dfc843974ab2897bb7c12bc2b7fa9de0dd72 | e76f47d5e6752b838d5f7e23e22cfef65482b8e1 | /SeniorProject/pages/forms.py | d830a5d3dfe4395e0c5225d7ae57c111cf95cde5 | [] | no_license | AmirIdris/Final-Project | b006adfc4074df6687abaac83942b1b151300a51 | 7b0e28d01b7d5b4e4825d5d8b98ba193bd3f49e8 | refs/heads/master | 2023-06-10T21:13:12.875771 | 2021-07-08T20:23:59 | 2021-07-08T20:23:59 | 362,912,491 | 0 | 1 | null | 2021-07-08T20:24:00 | 2021-04-29T18:34:24 | CSS | UTF-8 | Python | false | false | 520 | py | from django import forms
from django.contrib.auth.forms import UserCreationForm,UserChangeForm
from django.contrib.auth.models import User
from django.forms import fields
class CustomUserCreationForm(UserCreationForm):
def __init__(self,*args,**kwargs):
super(CustomUserCreationForm, self).__init__(*args,*... | [
"you@example.com"
] | you@example.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.