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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7866615db4088601b520ceb0509c4eb8ed8a28e | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_120/713.py | 24cfd7c29cd4cf82e619addf3c3a2ef74f627af3 | [] | 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 | 343 | py | import math
T = int(raw_input())
for i in xrange(T):
r, t = raw_input().split()
r = int(r)
t = int(t)
n = ((1.0 - 2*r) + math.sqrt( (2*r - 1.0)**2 + 8*t ))/4.0
n = int(n)
total = (2*r + 1) * n + n*(n-1)*2
if total <= t:
print 'Case #%s: %s' % (i+1, n)
else:
print 'Case... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
f77ef9ebe4b1bb015901d003bfa80073a0be69f0 | 5c1531b47fb4dc4d7e5998d44f7200bf1786b12b | /__UNSORTED/139_word_break/word_break.py | 2de3f3f3df7205cae92ad800b5382c18f49e4c3a | [] | no_license | Web-Dev-Collaborative/Leetcode-JS-PY-MD | d1f560051aad1896a80eccdd4b4fbb389e7033e3 | 675b94fa5da8d40f0ea79efe6d3ef1393221425f | refs/heads/master | 2023-09-01T22:30:32.313793 | 2021-10-26T02:17:03 | 2021-10-26T02:17:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py | class Solution:
# @param s, a string
# @param wordDict, a set<string>
# @return a boolean
def wordBreak(self, s, wordDict):
self.tree = {}
self.memo = {}
for word in wordDict:
self.buildNode(word, self.tree)
return self.traverse(s)
def traverse(self, s):
... | [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
03dd76a38abe323de5bb3342d57232631262aac6 | d7e4be3752a3b659d198893ebc4347c77f56a3b8 | /flaskr/repair/forms.py | 0e67749642c7c5607e0314eb0d443010e35c3527 | [] | no_license | maria-j-k/library_v2 | c76aa0b77f3103aab43e5339d5e468e28c9e485c | fdc292d152aec1ea596733b79126caecca8b93ac | refs/heads/main | 2023-03-19T20:13:06.104296 | 2021-03-11T12:16:37 | 2021-03-11T12:16:37 | 322,952,448 | 0 | 0 | null | 2021-01-19T13:13:38 | 2020-12-19T22:52:37 | Python | UTF-8 | Python | false | false | 4,328 | py | from flask_wtf import FlaskForm
from wtforms_sqlalchemy.fields import QuerySelectField
from wtforms import BooleanField, FieldList, FormField, HiddenField, IntegerField, TextAreaField, SelectField, StringField, SubmitField
from wtforms.widgets import HiddenInput
from wtforms.validators import DataRequired, AnyOf, Opti... | [
"maria77julia@gmail.com"
] | maria77julia@gmail.com |
baa23174ec0a53364cec169399118e44e0da551e | 5c668379197a236d3a961dbba32aba606d661111 | /chapter13/brother1.py | 5ddb4a359161e1d5221298537cb7ab4a76b44356 | [] | no_license | RobbiNespu/wargames.unix-heaven.org | a7cf1afbc7f5983a85638c0a63dfd5764fd74b4e | 6ad914d020f696bf6148bf33d66de72aaf001589 | refs/heads/master | 2021-04-05T23:27:17.027998 | 2015-06-26T14:38:28 | 2015-06-26T14:38:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,357 | py | #!/usr/bin/env python
# code taken from the examples from the Python documentation on SocketServer
# daemon1 returns base64'd message, which is xxd'ed
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
"""
The RequestHandler class for our server.
It is instantiated once per connect... | [
"dnaeon@gmail.com"
] | dnaeon@gmail.com |
bab2a8a108c7ebf93bc6405b7b31741a934d2815 | 54147931d6e9eecb797c4d3665337a6c2b27160c | /chapter2_string_text/2_2.py | c5d96d4ab2ab814774508068c66f69d48702b497 | [] | no_license | miniyk2012/python_cookbook | 1fefe857f22d1145e7335c15c45e8b12356d7a49 | c01daee2d5349ea018a0a8768be7b011df70b566 | refs/heads/master | 2020-06-10T19:53:45.749970 | 2017-01-16T15:23:51 | 2017-01-16T15:23:51 | 75,891,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | # -*- coding:utf-8 -*-
import logging
_logger = logging.getLogger(__name__)
url = 'http://www.python.org'
print(url.startswith('http:'))
import os
filenames = os.listdir('../')
print(filenames)
print([name for name in filenames if name.endswith(('algorithm', '.md'))])
print(any(name.endswith('.idea') for name in fi... | [
"yangk@ersoft.cn"
] | yangk@ersoft.cn |
0b14592d0ba3665b7175831dfac9b89160af3f0e | 414239752b2bfc4cb3a947474f2662af7588b6eb | / protobufeditor/Tests/MarathonTests/TestCases/ProtoSearch/ProtoSearch6.py | 53ffee71fcdf81ff114b1db15c02e1c24c9934ad | [] | no_license | dtracers/protobufeditor | 8c7f9671c3b3a7d1cd3094321d030f6e6afcc7e8 | b65d06bce93165eebf9798c533e2447a5992d384 | refs/heads/master | 2020-12-24T19:28:22.486207 | 2016-04-19T23:41:57 | 2016-04-19T23:41:57 | 56,340,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | useFixture(default)
def test():
from Modules import commonBits
java_recorded_version = '1.6.0_22'
if window('Protocol Buffer Editor'):
select('FileChooser', commonBits.sampleDir() + 'Ams_LocDownload_20041228.bin')
click('Proto Search')
assert_p('Table1', 'Content', r'[[' + commonBits.stdCopybookDir() + 'Ams_... | [
"bm_tas@yahoo.com.au"
] | bm_tas@yahoo.com.au |
a804d5d5ce3df83393ae6bff5898fb1f6cc6e43b | e780a5bd72f98ca2513c993d64a85b08578166a6 | /buildout-cache/eggs/plone.autoform-1.7.5-py2.7.egg/plone/autoform/form.py | 5f38b7215aa23d0fecdc261c29372fd0c2f0f2dc | [] | no_license | vedantc98/Plone-test | 023246597ffe848e2a49b9f65742ff49127b190b | 9fd520fc78481e2c0b9b7ec427821e7f961c777e | refs/heads/master | 2021-03-30T22:14:33.368739 | 2018-03-11T19:22:58 | 2018-03-11T19:22:58 | 124,671,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,316 | py | # -*- coding: utf-8 -*-
from plone.autoform.base import AutoFields
from plone.autoform.interfaces import IAutoExtensibleForm
from plone.autoform.interfaces import IAutoObjectSubForm
from plone.z3cform.fieldsets.extensible import ExtensibleForm
from zope.interface import implementer
_marker = object()
@implementer(I... | [
"vedantc98@gmail.com"
] | vedantc98@gmail.com |
95135697228d557cb3d8a41bb0ecbf01bf2709f0 | 169e75df163bb311198562d286d37aad14677101 | /tensorflow/tensorflow/python/util/compat.py | a24a52eea9710e98bd56025457e6fda5449a5197 | [
"Apache-2.0"
] | permissive | zylo117/tensorflow-gpu-macosx | e553d17b769c67dfda0440df8ac1314405e4a10a | 181bc2b37aa8a3eeb11a942d8f330b04abc804b3 | refs/heads/master | 2022-10-19T21:35:18.148271 | 2020-10-15T02:33:20 | 2020-10-15T02:33:20 | 134,240,831 | 116 | 26 | Apache-2.0 | 2022-10-04T23:36:22 | 2018-05-21T08:29:12 | C++ | UTF-8 | Python | false | false | 4,224 | py | # Copyright 2015 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... | [
"thomas.warfel@pnnl.gov"
] | thomas.warfel@pnnl.gov |
5bace3fe8c8b3966f2c6c49d67a01a79ff42c1a1 | 4bc6028ed8ba403b69adfd6f5cbd139baece0f4d | /basic/hello_world.py | 2bc192cf9dc891b27de6eabd3ffdaa95d2fe90f4 | [] | no_license | xrw560/learn-pyspark | 0ef9ed427ff887ceed1c5e5773bf97ed25ecae04 | 618d16dafd73165e714111670119d9cdecc0bf1f | refs/heads/master | 2020-03-07T00:12:36.885000 | 2019-01-04T09:51:32 | 2019-01-04T09:51:32 | 127,152,051 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | #!/usr/bin/python
# -*- encoding:utf-8 -*-
if __name__ == '__main__':
"""
Hello World 程序
"""
print "hello world!!!!!!!!!!!!!!!"
| [
"ncutits@163.com"
] | ncutits@163.com |
c1a1eebde481557cb5e8673730e08fa7eff20636 | d191a04a3ded41175ea84ae88ebddb4f262b7fb1 | /Dynamic_program/33_palindromic_substring.py | d7e049406dc272a2923b0bce1e168fc05b3c3c98 | [] | no_license | YLyeliang/now_leet_code_practice | ae4aea945bae72ec08b11e57a8f8a3e81e704a54 | 204d770e095aec43800a9771fe88dd553463d2f7 | refs/heads/master | 2022-06-13T20:22:51.266813 | 2022-05-24T05:29:32 | 2022-05-24T05:29:32 | 205,753,056 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,343 | py | # Given a string, your task is to count how many palindromic substrings in this string.
#
# The substrings with different start indexes or end indexes are counted as different substrings even they consist of same characters.
#
# Example 1:
#
# Input: "abc"
# Output: 3
# Explanation: Three palindromic strings: "a", "b",... | [
"k87974@163.com"
] | k87974@163.com |
e1a70e8fa8ccf663700a94f2d16d3b20110080f5 | 03d07de94fc22d1583c45ca84c711a06df8a40ff | /lc/graph/lc_207_course-schedule.py | f5045d8a606e37fc0a05f3d15c5182ff10bcd859 | [] | no_license | gaopenghigh/algorithm | 94e04293c69a2ad6903495e1cf6e1b75556535bb | f5d78c98c7201c56f9d4c3a9c0c76e9447a17985 | refs/heads/master | 2022-03-11T18:46:38.712923 | 2022-02-20T14:20:54 | 2022-02-20T14:20:54 | 54,484,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,696 | py | # 207. 课程表
# 你这个学期必须选修 numCourses 门课程,记为 0 到 numCourses - 1 。
# 在选修某些课程之前需要一些先修课程。 先修课程按数组 prerequisites 给出,其中 prerequisites[i] = [ai, bi] ,表示如果要学习课程 ai 则 必须 先学习课程 bi 。
# 例如,先修课程对 [0, 1] 表示:想要学习课程 0 ,你需要先完成课程 1 。
# 请你判断是否可能完成所有课程的学习?如果可以,返回 true ;否则,返回 false 。
# 抽象为判断一幅有向图是否有环
# 抽象为判断一幅有向图是否有环
# 使用 DFS 遍历
# 不能简单地记录哪些... | [
"jh.gao@ucloud.cn"
] | jh.gao@ucloud.cn |
c55a5ab14f9f3d22bf01db0767cfa494e6709ed6 | 8cb0ace888d6dfe0b781e21906cab598cfb3783d | /apps/wop/wop/widgets/level_widget.py | c5349c5c427f2b346893af999b365c1f790900e3 | [] | no_license | DerThorsten/appdev | fefe1929af15f33d7848f03664b345df0f2aeaaf | 5c24328b8ba08ad57aa6b77296d68ece00b4154b | refs/heads/master | 2021-01-17T05:10:48.033350 | 2016-08-06T21:01:49 | 2016-08-06T21:01:49 | 33,121,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,725 | py | from kivy.logger import Logger
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.clock import Clock
from kivy.graphics import *
from kivy.properties import NumericProperty, ReferenceListProperty,\
ObjectProperty
im... | [
"thorsten.beier@iwr.uni-heidelberg.de"
] | thorsten.beier@iwr.uni-heidelberg.de |
d45809a86a61969897ea0f9adf6b683a1732e968 | 79839ab9d00afabdaeb9e4ea0ffdb50db8fdde4e | /LudoGame/controller.py | 4b1be36912f187cbdb11bff8a34564d2e27f4406 | [
"Apache-2.0"
] | permissive | surajsinghbisht054/LudoGame | 85968d57d6432e9d56edab1b71f9eb967ef5d5be | 20352646230bc541208e93dfbf0818e42eb0c6b3 | refs/heads/master | 2021-01-11T13:54:12.932791 | 2018-01-09T10:18:32 | 2018-01-09T10:18:32 | 94,885,322 | 1 | 5 | null | null | null | null | UTF-8 | Python | false | false | 6,260 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Written By:
# S.S.B
# surajsinghbisht054@gmail.com
# bitforestinfo.blogspot.com
#
#
#
#
##################################################
######## Please Don't Remove Author Name #########
############### Thanks ###########################
#############################... | [
"surajsinghbisht054@gmail.com"
] | surajsinghbisht054@gmail.com |
95f27ad073deba4419d29e314fd828507e60ea62 | 0cb46d3c14ed82627ca7ffb4de2a80e9c3013c50 | /model/base.py | 21accadb14e32119bdef0da1932da4ef01752672 | [] | no_license | five3/zyw | 40533cd6eb1d17f98c055893d9cdfba30fa69696 | 7fcd4d7a4a877c907d59df153e42360fc616f9a5 | refs/heads/master | 2020-12-24T08:55:11.207216 | 2017-08-18T13:12:03 | 2017-08-18T13:12:03 | 38,229,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,135 | py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#coding=utf-8
from model.db.database import *
class base:
def getTable(self):
return self.__class__.__name__
def getDb(self):
return database()
def insert(self,data):
return self.getDb().insert(self.getTable(),data)
d... | [
"five3@163.com"
] | five3@163.com |
1afd17c2c1370a54520917228db7e4bd9cc00e5c | 1a114943c92a5db40034470ff31a79bcf8ddfc37 | /stdlib_exam/strop-example-1.py | d9e343e3aa7690e690e6a82f444da61173972665 | [] | no_license | renwl/mylinux | 1924918599efd6766c266231d66b2a7ed6f6cdd1 | 0602fc6d2b0d254a8503e57310f848fc3e1a73b4 | refs/heads/master | 2020-07-10T22:12:03.259349 | 2017-01-02T12:32:04 | 2017-01-02T12:32:04 | 66,467,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | import strop
import sys
# assuming we have an executable named ".../executable", add a
# directory named ".../executable-extra" to the path
if strop.lower(sys.executable)[-4:] == ".exe":
extra = sys.executable[:-4] # windows
else:
extra = sys.executable
sys.path.insert(0, extra + "-extra")
import mymodule
| [
"wenliang.ren@quanray.com"
] | wenliang.ren@quanray.com |
4513fb0f5b0c0dacd59247201f0afd9c4f9b4c5b | 05e0429c617209530b212987f169640e6b75c8f0 | /Chapter 8/powerballLottery.py | 7fdd170731091cdea9226f01a1bb878352f84a87 | [] | no_license | nishantchaudhary12/Starting-with-Python | ac33baf01e3cf869cc1cf7f97991ecda4ee893bd | 9031fa64b19698c060d134cb0416812db01f1f7b | refs/heads/master | 2020-04-24T00:06:15.177647 | 2019-05-28T23:12:16 | 2019-05-28T23:12:16 | 171,555,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,186 | py | #powerball lottery
def records(file):
number_dict = dict()
pow_num_dict = dict()
overdue_num = list()
line = file.readline()
line = line.rstrip('\n')
while line != '':
num_list = line.split(' ')
for each in num_list:
if each in overdue_num:
overdue_n... | [
"chaudharynishant025@gmail.com"
] | chaudharynishant025@gmail.com |
a62a9c5b492057a1f8eaf18d3667012243bed748 | ad080bd1612b980490ef2d1b61647cbc6beddf5d | /my_game/administrator/asteroid_generation.py | bface5faa562653e2b5a47965d18e18a78871d13 | [] | no_license | rokealva83/my_game | 8f915076986144234950aa4443e8bc51ad019664 | 76ecc1dbf60c7f93621ddca66d62d5fea2826d0e | refs/heads/master | 2020-12-24T17:54:59.491881 | 2016-05-10T20:06:53 | 2016-05-10T20:06:53 | 29,264,967 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,035 | py | # -*- coding: utf-8 -*-
import random
from django.shortcuts import render
from my_game.models import System, AsteroidField
# функция генерации астероидных полей
def asteroid_generation(request):
if request.method == "POST" and request.POST.get('add_button') is not None:
asteroid = int(request.POST.get('... | [
"tolik20002@bigmir.net"
] | tolik20002@bigmir.net |
6df00727a21728a05316441890050263c914ffd5 | f47626fd3b236dd42f335952a3f3edf55f7e6075 | /region-app/app/tools/constants.py | 1b3a6661296e13c1420a27b4a2ce3b33edcd6574 | [] | no_license | reritom/region-app-example | da541afee5faf04bac65cceda15b6d2c265b7e79 | d0f4c2507c62755f8bbdc1400fb2fc538646ee76 | refs/heads/master | 2022-12-02T20:04:32.028450 | 2020-08-15T08:19:46 | 2020-08-15T08:19:46 | 287,619,909 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | # Constants related to the application should be located here
# Currently we only have one constant used by the RegionController, but this allows us to scale.
COUNTRY_FRANCE = "France"
| [
"reikudjinn@gmail.com"
] | reikudjinn@gmail.com |
74a66ecda7c167ce393132bd9d092d8ca7413ac3 | 1cb97b0fe8b275efd540716cb6e742fc44e927bf | /setup.py | 3b851f54849494044ef8725faa00a353b62ae451 | [
"MIT"
] | permissive | khushjammu/rljax | 31e4d0f9c6aa57a0a07a35f7f8854cc78360ae5a | f2d5e81240d99187fcb625d2caa630c3c7deecfc | refs/heads/master | 2023-06-27T17:15:43.437065 | 2021-07-30T16:55:47 | 2021-07-30T16:55:47 | 391,125,669 | 0 | 0 | MIT | 2021-07-30T16:18:23 | 2021-07-30T16:18:22 | null | UTF-8 | Python | false | false | 2,890 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import sys
from shutil import rmtree
from setuptools import Command, find_packages, setup
NAME = "rljax"
DESCRIPTION = "A collection of RL algorithms written in JAX."
URL = "https://github.com/ku2482/rljax"
EMAIL = "watanabe.toshiki@outlook.jp"
AUTHO... | [
"kuboy2482@gmail.com"
] | kuboy2482@gmail.com |
ccc0c4a0baf39caf1e00f362fe8192eb9b77a0ee | 0635da394505415471efd89d542f225cae3e668b | /networkapi/api_environment_vip/facade.py | 38fb69529f25b6633b6b2dfd9aa6273ac730bec2 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | enterstudio/GloboNetworkAPI | 5e2fbe7ef3f4a70aaa0ae474a0c5493e5568cb24 | ea8eebc0337636f9250e628cc392514934db8edd | refs/heads/master | 2023-07-25T20:36:40.717818 | 2017-01-27T20:22:40 | 2017-01-27T20:22:40 | 82,249,922 | 0 | 0 | Apache-2.0 | 2023-09-04T21:56:15 | 2017-02-17T02:48:54 | Python | UTF-8 | Python | false | false | 2,827 | py | # -*- coding: utf-8 -*-
import logging
from networkapi.ambiente.models import EnvironmentVip
from networkapi.requisicaovips.models import OptionVip
from networkapi.requisicaovips.models import OptionVipEnvironmentVip
log = logging.getLogger(__name__)
def get_option_vip_by_environment_vip_ids(environment_vip_ids):
... | [
"ederson.brilhante@corp.globo.com"
] | ederson.brilhante@corp.globo.com |
60417ad7a9157ae72a147b6ef908a2afe7e87952 | b523a7d337ce60e1e1ca779be396eeeaab786b7d | /Python/leetcode_075_sort_colors_2nd.py | 41d2d71cf4a12c7dd6fea12fced690b2be118682 | [] | no_license | bakker4444/Algorithms | 3a65f83fde6a22a82646f6ee463a487f889291d0 | 453e92109494c962c36280cd0d32fb28aa771615 | refs/heads/master | 2021-05-25T11:56:18.424622 | 2019-05-08T22:07:15 | 2019-05-08T22:07:15 | 127,337,782 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,912 | py | ## 75. Sort Colors
#
# Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.
# Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively.
# Note: You are not... | [
"bakker4444@gmail.com"
] | bakker4444@gmail.com |
635ff42ad41b2d8a6c0bda55e9fabefb122925cf | ba59629d53d9500ff620387d8bcbadd639796719 | /code_examples/pytorch/mnist/test_mnist.py | d860a89a1604f92dba036e6cf333c20f03eb83fd | [
"MIT"
] | permissive | Joejiong/examples-2 | 7d423e9bd4e68b29613903158a50d391ffc72ef8 | 553b90b57d2ed8c996c74cbe5d48bb2b7dba5a88 | refs/heads/master | 2023-03-08T02:54:32.583139 | 2021-01-22T18:29:13 | 2021-01-22T18:29:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,157 | py | # Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import inspect
import os
import subprocess
import unittest
import torch
from mnist_poptorch import accuracy
def run_poptorch_mnist(**kwargs):
cwd = os.path.dirname(os.path.abspath(inspect.stack()[0][1]))
cmd = ["python3", 'mnist_poptorch.py']
out = ... | [
"philb@graphcore.ai"
] | philb@graphcore.ai |
ecd1837e2da77b2be6d2f8094e2424221ab60afb | 7a7a818f482b4781e15948bb64ea6ae79a631175 | /deephyper/benchmark/nas/candleP1B3/data_utils.py | 3e360a5f557773f482433a7ca850a8b4ea64eb0c | [
"BSD-2-Clause"
] | permissive | BethanyL/deephyper | 85157a856b8a35a180d5b56e2b00321ea384ebcc | 42cbb846f2815223c6843e92e234c3b0a765aeb6 | refs/heads/master | 2020-04-11T00:36:49.519366 | 2019-01-13T16:35:11 | 2019-01-13T16:35:11 | 161,391,202 | 1 | 1 | null | 2018-12-11T20:41:41 | 2018-12-11T20:41:41 | null | UTF-8 | Python | false | false | 4,665 | py | from __future__ import absolute_import
from __future__ import print_function
import tarfile
import os
import sys
import shutil
import hashlib
from six.moves.urllib.request import urlopen
from six.moves.urllib.error import URLError, HTTPError
from deephyper.benchmark.candleP1B3Nas.generic_utils import Progbar
# Unde... | [
"romainegele@gmail.com"
] | romainegele@gmail.com |
6376c69e303c4688ca205d4b3661e35929db601a | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /Yfm3h3nT3apARd4gC_13.py | fdf5b9abdb03a54e6ec2254ddc78f755dd346d28 | [] | 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 | 910 | py | """
Create a function that takes a list consisting of dice rolls from 1-6. Return
the sum of your rolls with the following conditions:
1. If a 1 is rolled, that is bad luck. The next roll counts as 0.
2. If a 6 is rolled, that is good luck. The next roll is multiplied by 2.
3. The list length will always be 3... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
e7e4db5403fa269998ca5914755f189c589de9c1 | 3c847175b995991414bda789eabda8c9b150af4a | /raspberry_pi_unit/opencv_ball_tracking.py | 1eb8096cb52c8b781bf8e6e7eb78f2df29b566d3 | [] | no_license | DamoM73/10-Digital-Technologies | 4ed0149b1c94eecf31e4f6060d79219ad8690832 | 5bf20cacf2b323bee8fcf1ee2260808e86d8f7c2 | refs/heads/master | 2023-05-01T07:02:29.146224 | 2021-05-20T03:17:42 | 2021-05-20T03:17:42 | 294,894,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,869 | py | # import necessary packages
from collections import deque
from imutils.video import VideoStream
import numpy as np
import argparse
import cv2
import imutils
import time
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video",
help="path to t... | [
"damomurtagh@gmail.com"
] | damomurtagh@gmail.com |
6c15f08b036a6a77f7b91f708de56490fb8b681c | ef187d259d33e97c7b9ed07dfbf065cec3e41f59 | /work/atcoder/abc/abc070/C/answers/504659_wi.py | d7d7a14e475b780741e10f7ddca3d9fa61389074 | [] | no_license | kjnh10/pcw | 847f7295ea3174490485ffe14ce4cdea0931c032 | 8f677701bce15517fb9362cc5b596644da62dca8 | refs/heads/master | 2020-03-18T09:54:23.442772 | 2018-07-19T00:26:09 | 2018-07-19T00:26:09 | 134,586,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()
def gcd(a, b):
while(b > 0):
c = a % b
a = b; b = c
return a
n = ni()
g = 0
for i in range(n):
v = ni()
if g == 0:
g = v
else:
g... | [
"kojinho10@gmail.com"
] | kojinho10@gmail.com |
509671c52ef3aab37220d37a55e97f13b9680c63 | 41f7085fffd12bb53222fdba00d033a43b9d7081 | /users/apps.py | b776938c9d4d9c5d420b841f16abfb29baea989c | [] | no_license | arifgafizov/online_store | b852e1bd32149268bbed9159f1037561a3d7e9a0 | 25c32f0ae65469e904509772d414a79a743ae31b | refs/heads/master | 2023-08-01T06:28:47.302377 | 2021-09-18T18:30:28 | 2021-09-18T18:30:28 | 345,300,892 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = 'users'
def ready(self):
from .signals import post_save_signup
| [
"agafizov@gmail.com"
] | agafizov@gmail.com |
10c4c8bcbc5ddcf5716aa35f9122b26965c9d62e | 2d80791a21a049243dd2bf7dd95a46c4d4b2510b | /domains/algorithms/warmup/TimeConversion.py | a7612996332e029de98c463eec1bd8e7fe9209aa | [] | no_license | jayrav13/jr-hackerrank | 909346d101fdf08a54ff75ec2ee39c90e661b251 | b7e0130fdd1c2eb4436871be3255200eac8ca3d9 | refs/heads/master | 2021-01-15T15:36:16.772814 | 2016-11-21T18:59:15 | 2016-11-21T18:59:15 | 48,657,803 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | #!/bin/python
import sys
time = raw_input().strip().split(':')
if time[2][-2:] == 'PM' and int(time[0]) < 12:
time[0] = str(int(time[0]) + 12)
if time[2][-2:] == 'AM':
if time[0] == '12':
time[0] = '00'
if int(time[0]) == 24:
time[0] = "00"
time[2] = time[2][:-2]
print ":".join(time)
| [
"jayrav13@gmail.com"
] | jayrav13@gmail.com |
0742aaed6d2a00c0265fa9c84921f8017affaa93 | 6630694f401f6f475dd81bb01ff9368db844ccff | /configs/_base_/models/mobilevit/mobilevit_s.py | f6a4e05d2c8f1fc4f7b6a6b5953ff52cdfc7a2c6 | [
"Apache-2.0"
] | permissive | open-mmlab/mmpretrain | 98a4d6b3bb747efc3d50decebf84fc3ffa41076a | d2ccc44a2c8e5d49bb26187aff42f2abc90aee28 | refs/heads/main | 2023-08-30T19:11:24.771498 | 2023-08-23T02:45:18 | 2023-08-23T02:45:18 | 278,415,292 | 652 | 186 | Apache-2.0 | 2023-09-08T08:01:40 | 2020-07-09T16:25:04 | Python | UTF-8 | Python | false | false | 339 | py | # model settings
model = dict(
type='ImageClassifier',
backbone=dict(type='MobileViT', arch='small'),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=640,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
t... | [
"noreply@github.com"
] | open-mmlab.noreply@github.com |
dd98d05f369e5f312af1cbd5ef5826092fa4e837 | 24a9f32ae09cb545caf9984cedfad3ff89c0aad0 | /supportsystem/admin.py | c6edd541c0ab347389ef7d8782acc547463ce7be | [] | no_license | Jordonguy/TechCPRSupportSystem | 8bf81708ee3873795a76ad9ff5f79422c9a64d82 | e035fc0cd7502a726d8946f17e4d025ce3a83988 | refs/heads/master | 2020-04-27T13:43:39.318886 | 2019-10-24T23:48:15 | 2019-10-24T23:48:15 | 174,381,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | from django.contrib import admin
# Register your models here.
from .models import Role, Company, Post, Comment, ExtendedUserProfile
admin.site.register(ExtendedUserProfile)
admin.site.register(Role)
admin.site.register(Company)
admin.site.register(Post)
admin.site.register(Comment)
| [
"you@example.com"
] | you@example.com |
fa75cf84f7c515ac5987b1a3387c4d6f759455b9 | 34745a8d54fa7e3d9e4237415eb52e507508ad79 | /Python Fundamentals/03 Lists Basics/More exercises/03_Josephus_Permutation.py | be8fe4e63778f129a03973856fc846ee279e0ba4 | [] | no_license | DilyanTsenkov/SoftUni-Software-Engineering | 50476af0dc88b267d72c56fa87eeb88d841164b2 | fe446e3a50a00bb2e48d71ab8f783e0a4a406094 | refs/heads/main | 2023-08-12T18:18:42.144210 | 2021-09-25T11:10:38 | 2021-09-25T11:10:38 | 317,235,419 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | elements = input().split(" ")
number = int(input())
new_elements_list = []
counter = 0
while len(elements) != 0:
for i in range(len(elements)):
counter += 1
if counter % number == 0:
new_elements_list.append(elements[i])
elements[i] = None
elements = [... | [
"noreply@github.com"
] | DilyanTsenkov.noreply@github.com |
2885153df53235cefe140f7a4cd0be1e421959a6 | 5cd740c36bff792dec540f02ee95336b12808f36 | /account/views.py | eef1484898abccb1e4ecaa69fd7b5cbc5853f694 | [] | no_license | Pyxic/swipe | b4362a9e17d23b4b9f7d9cfcb3a63900119eb9e8 | 584062dfd5c8a5328c22bfcd2e194bb2f94a078c | refs/heads/master | 2023-09-03T21:38:34.577685 | 2021-11-17T12:23:06 | 2021-11-17T12:23:06 | 422,495,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,428 | py | from datetime import date
from django.conf import settings
from django.shortcuts import render, get_object_or_404
from django.utils.decorators import method_decorator
from drf_yasg.utils import swagger_auto_schema
from rest_framework import viewsets, permissions
from rest_framework.permissions import AllowAny
from ac... | [
"mishakalita3@gmail.com"
] | mishakalita3@gmail.com |
478ebf23b298e716de7e6cb64c4e04d287263c94 | 9994709e43d108ca49af5f5961f56a6492c84eb1 | /src/RegistrationWithConfirmation/settings.py | c1340257f4d192671f4dacebc9156788531fa0de | [] | no_license | achiengcindy/RegistrationWithConfirmation | f115bc8d5dc0ac6f3e832d4d159bc24c41e80915 | a47cca9bd519894684a8b2dbcb1a909c23fed40a | refs/heads/master | 2020-04-11T11:34:57.184708 | 2018-12-14T08:14:42 | 2018-12-14T08:14:42 | 161,752,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,459 | py | """
Django settings for RegistrationWithConfirmation project.
Generated by 'django-admin startproject' using Django 2.1.4.
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/settin... | [
"achiengcindy36@gmail.com"
] | achiengcindy36@gmail.com |
89070d14e64f9f1511324e3516874a9b389fcbeb | a87810b7abad09b642399e6b83ceabea17a6d9f2 | /lock.py | c6b4ce6650ff9655be2b4a325fb0ebb652ac12e1 | [] | no_license | Sendhub/sh_util | 452fb85386b669657c9c8cadffdfb3520c0ab7e4 | 739c14cdcfeebac2fab9a2e5f76f98ecd524d7bd | refs/heads/master | 2023-07-20T06:43:46.212443 | 2019-06-24T23:24:26 | 2019-06-24T23:24:26 | 10,512,240 | 0 | 0 | null | 2021-06-29T13:45:29 | 2013-06-05T20:35:28 | Python | UTF-8 | Python | false | false | 615 | py | __author__ = 'brock'
import settings
_redis = settings.REDIS
def acquireLock(lockId, timeout=60):
# make sure these redis locks always have a valid timeout
assert timeout > 0
acquired = _redis.setnx(lockId, "true")
if acquired:
_redis.expire(lockId, timeout)
else:
# if there is ... | [
"outtatime@gmail.com"
] | outtatime@gmail.com |
17e2629a616b6de3e7c6b1f78079b754c52ef6ea | 862588320887ec451870fb35856d4315bd2b9685 | /simple_operations/generate_backrub_ensemble.py | 8aae652d80bb8410c64e9cb270f782ef186394d3 | [] | no_license | xingjiepan/pyrosetta_scripts | 6522aa8fef43b89adac6fba1bc6072f0df2425d2 | 640ea455319d55a0cb167c50f2722778dbdde1f1 | refs/heads/master | 2021-03-16T05:35:52.560752 | 2020-05-12T22:58:54 | 2020-05-12T22:58:54 | 111,063,960 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 646 | py | #!/usr/bin/env python3
'''Generate a backbrub ensemble for a given protein.
Usage:
./generate_backrub_ensemble.py input_pdb
'''
import sys
import pyrosetta
from pyrosetta import rosetta
if __name__ == '__main__':
pyrosetta.init()
input_pdb = sys.argv[1]
pose = rosetta.core.pose.Pose()
rose... | [
"xingjiepan@gmail.com"
] | xingjiepan@gmail.com |
7e6cd1bfda829bc0090b0db86435f83cc639abda | d1aa6e7d5631d7806531660febbd1f856eaeece7 | /python/paddle/distributed/ps/utils/ps_factory.py | ddf5c1e3ec0315397d52c93cfb4eb2b01c3ccb4e | [
"Apache-2.0"
] | permissive | gongweibao/Paddle | 510cd4bc0ef89bc6ccee7b6b8eca52c00e014b77 | 60f9c60cd8196c66c391d79c35d341e9072f8838 | refs/heads/develop | 2023-03-13T17:43:35.675875 | 2022-09-20T08:46:15 | 2022-09-20T08:46:15 | 82,279,237 | 3 | 2 | Apache-2.0 | 2021-05-26T06:17:43 | 2017-02-17T09:16:16 | Python | UTF-8 | Python | false | false | 1,880 | py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"noreply@github.com"
] | gongweibao.noreply@github.com |
654ea14d4f78784922eedf0686a4f756d0dd078a | cbe264842df4eae3569b28ed4aae9489014ed23c | /books/PythonCleanCode/ch7_generator/generators_coroutines_1.py | 65fbfdd9702000177e66d098a1a4ad1ae29048ae | [
"MIT"
] | permissive | zeroam/TIL | 31e176c2f4c3e1ef72b1155353690cc2f7160f96 | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | refs/heads/master | 2021-07-23T01:43:34.135033 | 2021-07-10T06:47:17 | 2021-07-10T06:47:17 | 167,952,375 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,505 | py | """Clean Code in Python - Chapter 7: Using Generators
> Methods of the Generators Interface.
"""
import time
from log import logger
class DBHandler:
"""Simulate reading from the database by pages."""
def __init__(self, db):
self.db = db
self.is_closed = False
def read... | [
"imdff0803@gmail.com"
] | imdff0803@gmail.com |
eac8016636cfd014537c66a16982d00c21173836 | ade45967ee95ba61217658b479604bb97e86770e | /isint.py | b13dbef9269d8217ec1be98c8f2ae0469f7a8094 | [] | no_license | parkseohui/git | fb0c3b41e4efd8b7a5220864c935fff7a32523db | 238580378df8772bc47045843db52baac49e658c | refs/heads/master | 2020-04-17T10:45:07.983727 | 2019-02-27T14:27:13 | 2019-02-27T14:27:13 | 166,512,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | #문자열을 제거한뒤 숫자만반환
'''난이도:(쉬움) 현우는 축구를보다가 우리나라선수들의몸값을 알고싶었다
그래서 검색을해서 메모장에 적는데 키보드가 조그만하고 안좋은지라
자꾸 숫자가아닌 문자를 같이입력해버린다
ex: xxx : 1627000000 > xxx : 1w627r00o00p00 만 (특수문자제외)
현우는 왜인지모르지만 뜻대로안되는것에
너무화가나서 자신이수량을입력하면 문자열만 딱빼서 숫자만 반환하는 코드를 만들고싶어한다
화가난 현우를위해 코드를 만들어보자!
'''
print(''.join(i for i in input('') if i.isdigi... | [
"skfhddl003@gmail.com"
] | skfhddl003@gmail.com |
4de909fdf690d158215c7a5f55c16f8c14efc0df | 2a54e8d6ed124c64abb9e075cc5524bb859ba0fa | /.history/3-OO-Python/5-encapsulaton_20200415212038.py | 120d237cce96f90aac71a89b9a9b9197e28bc4e1 | [] | no_license | CaptainStorm21/Python-Foundation | 01b5fbaf7a913506518cf22e0339dd948e65cea1 | a385adeda74f43dd7fb2d99d326b0be23db25024 | refs/heads/master | 2021-05-23T01:29:18.885239 | 2020-04-23T19:18:06 | 2020-04-23T19:18:06 | 253,171,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | class PlayerCharacter:
def __init__(self, name, age):
self.name = name
self.age = age
def run (self):
print('run')
def speak(self):
print(f'my name is {') | [
"tikana4@yahoo.com"
] | tikana4@yahoo.com |
753ab077a5840cea3bc5b736b02cdb6ba8ab9c6a | 8fe833d3751486cf03130bfdfafffeaf60c01ff8 | /hwilib/devices/trezorlib/btc.py | f9c56cf0a74ad3b604cc460f66e6170a3fc5193f | [
"MIT"
] | permissive | fmr-llc/HWI | 50726924292c92e857c1ad13458af92a2ca23037 | 4c13daed3b62635320e2411c1dd6a8ee307012e5 | refs/heads/master | 2020-12-11T14:18:51.610966 | 2020-01-13T14:57:30 | 2020-01-13T14:57:40 | 233,870,798 | 1 | 1 | MIT | 2020-01-14T15:20:33 | 2020-01-14T15:20:32 | null | UTF-8 | Python | false | false | 5,700 | py | # This file is part of the Trezor project.
#
# Copyright (C) 2012-2018 SatoshiLabs and contributors
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software Foundation.
#
# This library is distrib... | [
"achow101-github@achow101.com"
] | achow101-github@achow101.com |
a2a8f7739a9aee7ce46c3440d4a2914bb62cb20f | 1c4a19c0d1953280f79193f30ad8c4759e3aff58 | /ansys/dpf/core/operators/math/cos_fc.py | 877e5d8eb4f4e277d7a79f318f9792673e6c3de6 | [
"MIT"
] | permissive | hoangxuyenle/DPF-Core | d02c843b678560f12715ea90dc8c9764b3bffc99 | a404dd290c7b3ee75463b2487cafb8bf48468691 | refs/heads/master | 2023-06-15T15:27:02.597938 | 2021-06-22T15:19:04 | 2021-06-22T15:19:04 | 381,611,135 | 0 | 0 | MIT | 2021-06-30T07:18:30 | 2021-06-30T07:18:30 | null | UTF-8 | Python | false | false | 4,828 | py | """
cos_fc
======
"""
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs, _modify_output_spec_with_one_type
from ansys.dpf.core.operators.specification import PinSpecification, Specification
"""Operators from Ans.Dpf.Nat... | [
"lea.paradis@ansys.com"
] | lea.paradis@ansys.com |
acda52f070fb154262908ba31dbace2d0a3c92c6 | 93b8a4be20a0a6b56bc7709b3ab4690135257ebe | /BrowserSession.py | 51cf187550b12d8774319d4032fed37519c2acfc | [] | no_license | kordless/crawlapart | 1c551b300b91d7da245a76dc0e13cde63d7bea00 | da308154be03a08bd752e37a3c6088a356f48208 | refs/heads/master | 2021-04-22T23:16:32.699117 | 2020-03-26T20:49:33 | 2020-03-26T20:49:33 | 249,879,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,609 | py | #!/usr/bin/env python3
import webdriver
import json
import base64
import sys
import requests
import traceback
import logging
import time
# TODO Setup Interaction with DB rather than with flags and config files
# ideally we just want something like -> LookUpWord -> Provider -> Google
# ideally we just want somethi... | [
"kordless@gmail.com"
] | kordless@gmail.com |
cfd3122f8016f9ea2f13eeb32f84937b90620619 | 743e3ab9bc94ada35913d03b77bf159c1ec75930 | /ZIJIE复习/11.py | 305043a736f576cc494d81217b9306b9ce2da630 | [] | no_license | Stella2019/leetcode- | 04d3978ba97ab321a5cefc061beefbf3c76cf795 | 60c8a20af961a57f73feb4ccd883dfc73370d994 | refs/heads/main | 2023-03-31T04:08:20.450791 | 2021-04-01T05:38:00 | 2021-04-01T05:38:00 | 353,585,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,674 | py | # 给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。##给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。
"""
def binarySearch(nums, target);
return binarySeachHelper(nums, target, 0, len(nums) -1 )
def binarySearchHelper(nums, target, left, right):
if left > right:
return -1
middle = ... | [
"noreply@github.com"
] | Stella2019.noreply@github.com |
2fd671f0c486f88eddcb6ce484cf4129ba4f765f | 2d4af29250dca8c72b74e190e74d92f1467120a0 | /TaobaoSdk/Request/MallEaiOrderRefundGoodReturnRefuseRequest.py | 4efc69ca0a81e8aeb3c00f91dc7995a2141a3370 | [] | no_license | maimiaolmc/TaobaoOpenPythonSDK | 2c671be93c40cf487c0d7d644479ba7e1043004c | d349aa8ed6229ce6d76a09f279a0896a0f8075b3 | refs/heads/master | 2020-04-06T03:52:46.585927 | 2014-06-09T08:58:27 | 2014-06-09T08:58:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,457 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set ts=4 sts=4 sw=4 et:
## @brief 卖家拒绝退货
# @author wuliang@maimiaotech.com
# @date 2013-09-22 16:52:42
# @version: 0.0.0
import os
import sys
import time
def __getCurrentPath():
return os.path.normpath(os.path.join(os.path.realpath(__file__), os.path.pardi... | [
"chenke@maimiaotech.com"
] | chenke@maimiaotech.com |
cf54b3ebe7c2041a3817e65718bd1ffbe5bd3061 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03372/s980518099.py | 89fcc36b313a8f6192a1d4f6805dda59e1da0858 | [] | 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 | 1,800 | py | def main():
from collections import namedtuple
import sys
input = sys.stdin.readline
Sushi = namedtuple('Sushi', 'x cal')
n, c = map(int, input().split())
a = []
for _ in range(n):
x, v = map(int, input().split())
a.append(Sushi(x=x, cal=v))
# x昇順ソート済
clock = [0] ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
e7bd3908c39dac626bf71a69c7afdbf3231e9f2a | ba80ca143ba35fd481730786a27ebdb1f88ce835 | /algorithm/backjoon/35.DFS/1890.py | aca1cfcee092c960fd8624f4d28c8de0c983167f | [] | no_license | uiandwe/TIL | c541020b65adc53578aeb1c3ba4c6770b3b2e8b3 | 186544469374dd0279099c6c6aa7555ee23e42fe | refs/heads/master | 2022-02-15T08:33:07.270573 | 2022-01-01T15:22:54 | 2022-01-01T15:22:54 | 63,420,931 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | map = [
[2, 3, 3, 1],
[1, 2, 1, 3],
[1, 2, 3, 1],
[3, 1, 1, 0]
]
min_step = float('inf')
position_x = [0, 1]
position_y = [1, 0]
def dfs(x, y, step):
global min_step
if x == 3 and y == 3:
if step < min_step:
min_step = step
return
c = map[x][y]
for i in range(2):
d... | [
"noreply@github.com"
] | uiandwe.noreply@github.com |
c12ed3555353b036fbee254e5955d663e05c5577 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/tcp/const.py | 3a42736c753ef8a6036d4568a0522b0ac67010f0 | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 328 | py | """Constants for TCP platform."""
from __future__ import annotations
from typing import Final
CONF_BUFFER_SIZE: Final = "buffer_size"
CONF_VALUE_ON: Final = "value_on"
DEFAULT_BUFFER_SIZE: Final = 1024
DEFAULT_NAME: Final = "TCP Sensor"
DEFAULT_TIMEOUT: Final = 10
DEFAULT_SSL: Final = False
DEFAULT_VERIFY_SSL: Final... | [
"noreply@github.com"
] | home-assistant.noreply@github.com |
0571fd0e83d3c8cedd7d3130d18e0298230f8218 | 2c4763aa544344a3a615f9a65d1ded7d0f59ae50 | /playground/test_fail/wscript | 95c282a2af9a13a02b6175cb035208d83d474246 | [] | no_license | afeldman/waf | 572bf95d6b11571bbb2941ba0fe463402b1e39f3 | 4c489b38fe1520ec1bc0fa7e1521f7129c20f8b6 | refs/heads/master | 2021-05-09T18:18:16.598191 | 2019-03-05T06:33:42 | 2019-03-05T06:33:42 | 58,713,085 | 0 | 0 | null | 2016-05-13T07:34:33 | 2016-05-13T07:34:33 | null | UTF-8 | Python | false | false | 1,163 | #! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2011 (ita)
"""
Map a compilation failure to a success status. People playing with C++ templates
might need this.
"""
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx')
def configure(conf):
conf.load('compiler_cxx')
def buil... | [
"anton.feldmann@outlook.de"
] | anton.feldmann@outlook.de | |
792f0e26fb0531faa14be43065ca915945d46398 | f771e83756436594a145bd7b80e5e5d8bca53268 | /test_app/migrations/twitter/0002_auto_20180530_0935.py | 7f522ac7dda3d0cc45602484943d733bdcf6df26 | [
"MIT"
] | permissive | bnzk/djangocms-baseplugins | b76ed75460fbeacb62366935824d2bcfac52b25e | 98e390482aa4facc35efe2412ff1603d85e2c8ba | refs/heads/develop | 2023-06-17T23:55:41.574828 | 2023-06-09T09:22:01 | 2023-06-09T09:22:01 | 68,296,521 | 2 | 0 | MIT | 2023-04-17T09:18:11 | 2016-09-15T13:32:05 | Python | UTF-8 | Python | false | false | 2,319 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-05-30 09:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('twitter', '0001_initial'),
]
operations = [
migrations.AddField(
... | [
"bnzk@bnzk.ch"
] | bnzk@bnzk.ch |
f847203df4ede5b0fbb299394fd26184af8cdc8a | 88ed6ed99589f7fb8e49aeb6c15bf0d51fe14a01 | /049_group-anagrams.py | be39e43dcb820a52855a524f2c1fe18e6cb730a2 | [] | no_license | ryeLearnMore/LeetCode | 3e97becb06ca2cf4ec15c43f77447b6ac2a061c6 | 04ec1eb720474a87a2995938743f05e7ad5e66e3 | refs/heads/master | 2020-04-07T19:02:43.171691 | 2019-06-23T15:09:19 | 2019-06-23T15:09:19 | 158,634,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,642 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#@author: rye
#@time: 2019/3/13
'''
总结:
思路正解差不多,但是过不了,原因在于如果strs里有重复的字符串就无法处理。
还没想好怎么解决。
'''
class Solution(object):
def groupAnagrams(self, strs):
"""
:type strs: List[str]
:rtype: List[List[str]]
"""
arr = []
... | [
"noreply@github.com"
] | ryeLearnMore.noreply@github.com |
5aa4056b5a3b3b7562859e1199fa04a338390c39 | 5730110af5e4f0abe538ed7825ddd62c79bc3704 | /pacu/pacu/core/model/analysis_fixture.py | 392c070eabf6f44a81418eea1b412337f5febeca | [] | no_license | jzeitoun/pacu-v2 | bdbb81def96a2d87171ca20b89c878b2f66975e7 | 0ccb254a658263b4fe8c80ea623f860cb7dc1428 | refs/heads/master | 2021-06-03T18:50:50.890399 | 2020-04-27T16:31:59 | 2020-04-27T16:31:59 | 110,889,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | # one = dict(
# type=u'i3d',
# title=u'First transplantation',
# user=u'Sunil',
# desc=u'The brain has the remarkable capacity to rewire its connections and thereby reorganize its function. In the juvenile brain, the plasticity of neuronal connections mediates the fine-tuning of a wide range of behavior... | [
"jzeitoun@uci.edu"
] | jzeitoun@uci.edu |
c32eb96335d89570632c54e7cfe7bbea03eb18aa | b22205aa21ac51c7b14dfaab556eea1f8902a922 | /bin/foamOutputDirs.py | e6882006845de0e8a6ce636f6f9e54ca763c15b1 | [] | no_license | ewquon/pylib | a1c6a64a0127c5078e19f190ec252ccd00b5035e | c34afb2a13fc0075f95a43bac99219b25b3984a2 | refs/heads/master | 2023-07-12T11:32:31.671093 | 2023-06-21T15:59:15 | 2023-06-21T15:59:15 | 41,262,844 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | #!/usr/bin/env python
import sys
import os
dirs = [ dname for dname in os.listdir('.') if os.path.isdir(dname) ]
dirlist = []
numlist = []
for d in dirs:
try:
step = float(d)
numlist.append(step)
dirlist.append(d)
except ValueError: pass
# sort list of floats
indices = [i[0] for i in... | [
"eliot.quon@nrel.gov"
] | eliot.quon@nrel.gov |
609a9ef66b72016bf583dc87d491d71c0fe4395e | 18a0e8f672359f8f0e0e1b8a356e87627399be87 | /testproject/settings.py | 62082bdfc9780bf034cf882de53e64e6c9ab93ca | [
"BSD-2-Clause"
] | permissive | ptim/formulation | 69ee3cf24981ded2552ef47f1c8ba999820e038d | 2351cc85cd189c7029a35801a8f95e7450b175d3 | refs/heads/master | 2021-01-18T05:47:46.960270 | 2014-07-23T14:04:59 | 2014-07-23T14:04:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | # test project django settings
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'name': ':memory:',
},
}
ROOT_URLCONF = 'testproject.urls'
SECRET_KEY = 's3cr3t'
INSTALLED_APPS = (
'formulation',
)
TEMPLATE... | [
"curtis@tinbrain.net"
] | curtis@tinbrain.net |
3938f608cebd2d4198512b2979b0290982d04b86 | 6dfb7fe44b6c5bfb7feb5a101656e3d3402a621f | /simp_py_examples/course/SM1801/t012.py | a660e43c7dba6f39eeb873127d7ed0732ab05063 | [
"MIT"
] | permissive | kcfkwok2003/Simp_py | 11d6813fac83ab6309eb8efc22fcd8edde5b19b8 | f75e66da01b45dc8688dda602f8b33d4258f0c31 | refs/heads/master | 2021-05-11T00:36:36.872754 | 2018-12-19T01:41:15 | 2018-12-19T01:41:15 | 118,306,332 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | # t012.py
from machine import Pin
led=Pin(26,Pin.OUT)
while True:
led.value(0) # 0V
time.sleep(1)
led.value(1) # 3.3V
time.sleep(1)
| [
"kcfkwok@gmail.com"
] | kcfkwok@gmail.com |
627a2e28b59cabee99cdbfa37daee24e496a77f5 | 561a032be5f4f37f40e49ed70740d167e3a12d56 | /django_movie/movies/migrations/0002_auto_20210820_0202.py | cfcce499af7dc2452be06bb99ba4325e264a6a22 | [] | no_license | Mazev/django_movie | 6f3e0cfbd4e46431f03bd900a86cae4dca9f27f3 | af5a194d5fb5a08a944358ba2226a2e1db2e137b | refs/heads/main | 2023-07-12T21:11:07.410313 | 2021-08-21T16:38:58 | 2021-08-21T16:38:58 | 397,938,816 | 0 | 0 | null | 2021-08-21T16:38:58 | 2021-08-19T12:40:24 | JavaScript | UTF-8 | Python | false | false | 1,270 | py | # Generated by Django 3.2.6 on 2021-08-19 23:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('movies', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='movie',
... | [
"77510376+Mazev@users.noreply.github.com"
] | 77510376+Mazev@users.noreply.github.com |
be33e0ee19c20030f9a4e0d0e74e372a872cd5e7 | 784a030b7afb119b5b7024339117a33549db4d74 | /taravel/locations/migrations/0002_auto_20160409_0001.py | 526d2deaffc258d532fb5a657c28a7d49a7b052a | [
"MIT"
] | permissive | ad-m/taravel | bb136d789cf3a22ffe3744fe3cc273edd5c74640 | 4697ee51eec48ed8bb57d7b4a00f352f47e40ba0 | refs/heads/master | 2020-12-29T02:32:04.320280 | 2017-04-09T18:05:28 | 2017-04-09T18:05:28 | 55,809,856 | 0 | 0 | null | 2016-07-21T14:54:38 | 2016-04-08T21:10:20 | JavaScript | UTF-8 | Python | false | false | 473 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-09 00:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('locations', '0001_initial'),
]
operations = [
migrations.AlterField(
... | [
"naczelnik@jawnosc.tk"
] | naczelnik@jawnosc.tk |
2d7fb17440dde49931c5efae141b324e970191e8 | eab1756b01717e81537133400f36aea4d7a0876f | /yuxin_numpy/variable_fetch_bug_report.py | 5e9afe5df43ac413eecfdf31779316e614e6e14c | [] | no_license | bearpelican/cluster | d677fe392ac1196b77e3f8fb79e530ec8371080f | 2e316cf1def0b72b47f79a864ed3aa778c297b95 | refs/heads/master | 2020-03-21T06:52:57.514901 | 2018-08-10T10:20:26 | 2018-08-10T22:33:05 | 138,246,892 | 3 | 1 | null | 2018-06-22T02:51:07 | 2018-06-22T02:51:07 | null | UTF-8 | Python | false | false | 5,162 | py | # Run D2H and H2D benchmark with synthetic workload with feed-fetch step
import tensorflow as tf
import argparse
import numpy as np
import time
import ray
import os
import portpicker
import subprocess
import sys
import tensorflow as tf
import threading
import time
import pickle
from collections import OrderedDict... | [
"yaroslavvb@gmail.com"
] | yaroslavvb@gmail.com |
28a011661f24c1229e4e973964de433c47835416 | fd0328f6a5f78cfa80d61094517fa0f32943bb9e | /superlists/urls.py | 902f87670539d653d465801868e9194a9774418b | [] | no_license | liangsongyou/superlists | 3eee6ae492e89a13a54aec55f4b94c78c1fa049a | fd1704a14d18fe9fa7dc1074a172d9b0708ba1f3 | refs/heads/master | 2020-03-16T21:50:41.382819 | 2018-05-31T07:44:14 | 2018-05-31T07:44:14 | 111,548,891 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,036 | py | """superlists URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | [
"yuebei58@gmail.com"
] | yuebei58@gmail.com |
b92f292c218ba6dc7a54c573b10dc237a4ac6bff | 7a0070b15636653f404c2b2b85d300e949db1fb2 | /muglaSepetiApp/migrationsex/0033_auto_20200921_0209.py | 8d9ec33af59cb6b3643d7afcc29b60c2de0cea8c | [] | no_license | furkankykc/MuglaSepeti | 8d0f29faf8a868b159ca0d158cdb2e312784c626 | 58a650e68fd283baeaa0ae6716c8ea316b996c16 | refs/heads/master | 2023-01-08T22:15:00.878505 | 2020-11-09T21:18:13 | 2020-11-09T21:18:13 | 287,108,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | # Generated by Django 3.0.8 on 2020-09-20 23:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('muglaSepetiApp', '0032_auto_20200921_0208'),
]
operations = [
migrations.AlterField(
model_name='config',
name='abou... | [
"furkanfbr@gmail.com"
] | furkanfbr@gmail.com |
b26759a3ad30279cdb6e5e3d1504992e161eee56 | 9cbab916088192af67a19aaee25fe7d6e5d27a31 | /file/create.py | 255728651113829e6fdd6bb10971222ec7e3638c | [] | no_license | ddayzzz/Pythonlearning | 806c75304d7d954f2c935031d4d7516be7ce7300 | 54e92aa5282da97b6d4bd2355a668a16c272ee68 | refs/heads/master | 2020-12-30T12:44:49.465356 | 2017-05-25T15:12:53 | 2017-05-25T15:12:53 | 91,356,527 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Python | false | false | 361 | py | #create py
#coding=gb2312
import os,shelve,pprint
selffile='createfile'
selfptr=shelve.open(selffile)
dic=[{'name':'Ãû×Ö'},{'USSR':'former soviet'},{'China':{'1':'china','2':'Chinese'}}]
selfptr['dic']=dic
crepy='create1.py'
fptr=open(crepy,'a')
fptr.write('#coding=gb2312\nimport pprint,shelve\nprint(pprint.pformat(she... | [
"wangshu214@live.cn"
] | wangshu214@live.cn |
9124499c826b46e8fc759077b08027aae9b2d2d4 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02709/s723829299.py | 01a4d49022c1c656def13e678e9cfeee8f882cc1 | [] | 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 | 618 | py | n=int(input())
a=list(map(int,input().split()))
a=list(zip(range(n),a))#[index,a]の配列
a.sort(key=lambda x:x[1])#aの昇順で並べる
dp=[[0 for i in range(n+1)]for j in range(n+1)] #dp[x][y]:=左にx、右にy人並べたときの最大値
ans=0
for k in range(n):# k人目まで終了、k+1人目に対して
i,ai=a.pop()#aの大きいものから取り出す
dp[k+1][0]=dp[k][0]+ai*(i-k)
dp[0][k+1]=dp[0][... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4c8ab6bc0205d4424c71cea52b683546ac62f73b | c4313edda0f14795490080af1ba400b826611be8 | /lib/Crypto.lin.x64/Crypto/SelfTest/Hash/test_SHA3_224.py | 69128d9f74da2ba9b5b697ea56e7343ea0daab7a | [
"MIT"
] | permissive | tosher/Mediawiker | 821a4eab9f812e820bab3a8f4d3f3d542d3aeafa | 89c25d4fa6c6224edbaf5f06794a03594bcccad0 | refs/heads/master | 2023-07-06T02:45:05.924541 | 2023-07-01T18:32:09 | 2023-07-01T18:32:09 | 6,582,157 | 104 | 22 | NOASSERTION | 2023-09-14T18:00:30 | 2012-11-07T16:18:25 | Python | UTF-8 | Python | false | false | 2,874 | py | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/test_SHA3_224.py: Self-test for the SHA-3/224 hash function
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone... | [
"to.tosher@gmail.com"
] | to.tosher@gmail.com |
19c10d17f3d2fb83cd470c70b8a4a7eaa4e2d4c5 | 5b5145ce47a6e14f342f21ba3752ab8823d8043a | /panoptes_aggregation/tests/reducer_tests/test_shape_reducer_fan.py | 1e05d18634e45d2e3d228b12da528f8c96a1801f | [
"Apache-2.0"
] | permissive | isabella232/aggregation-for-caesar | 335f40c801e2cd18e807b6f10d8228e9c659df97 | 9ce7616b60ab32b13791868ace1637801ea937e9 | refs/heads/master | 2023-03-20T08:21:44.889957 | 2020-12-14T11:54:55 | 2020-12-14T14:17:28 | 322,817,491 | 0 | 0 | Apache-2.0 | 2021-02-23T23:28:33 | 2020-12-19T10:06:10 | null | UTF-8 | Python | false | false | 6,281 | py | from panoptes_aggregation.reducers.shape_reducer_dbscan import process_data as process_data_dbscan, shape_reducer_dbscan
from panoptes_aggregation.reducers.shape_reducer_hdbscan import process_data as process_data_hdbscan, shape_reducer_hdbscan
from .base_test_class import ReducerTest
import copy
extracted_data = [
... | [
"coleman.krawczyk@gmail.com"
] | coleman.krawczyk@gmail.com |
d3c4d7c5e6c299881eefffeaddcf06d19bd78463 | 4ccaf5252f5936414638f254ca5932ad922cd582 | /ex034 - Aumentos multiplos.py | 66bc546db7f4f138303f01e794b214d8ad0051a7 | [] | no_license | carlosaugus1o/Python-Exercicios | b0a525436d7cf24e3fc9ccfd046278ad383eb01c | 6216430dac9d5fc6fe3b75ae9625063d4971e419 | refs/heads/main | 2023-07-03T22:59:31.913494 | 2021-07-28T03:05:50 | 2021-07-28T03:05:50 | 390,193,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | salário = float(input('Informe o salário do funcionário: R$ '))
if salário < 1250:
aumento = salário * 1.15
else:
aumento = salário * 1.1
print('O novo salário do funcionário será de {:.2f}'.format(aumento))
| [
"noreply@github.com"
] | carlosaugus1o.noreply@github.com |
6f9bb16e2b0de1dc1aaabf69938acdcbe66f7819 | b7d0f003cfb0ec6fa25f99d9f7b544dc38ae6aa8 | /concept/greedy/fractionalKnapsack.py | a04a8c99034d44bba0bd5bf14a0d3aa537b69b91 | [] | no_license | Kimyechan/dataStructureAndArgorithm | 43c2cfa0d12a5c729f687d786ef6dde23bf193a7 | c9f8f614621aee9e236ffef20e5e563b37bab0b3 | refs/heads/master | 2021-07-09T03:31:31.405725 | 2021-03-09T13:18:55 | 2021-03-09T13:18:55 | 231,402,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 541 | py | data_list = [(10, 10), (15, 12), (20, 10), (25, 8), (30, 5)]
def getMaxValue(dataList, capacity):
dataList = sorted(dataList, key=lambda x: x[1] / x[0], reverse=True)
detail = list()
value = 0
for data in dataList:
if capacity - data[0] >= 0:
value += data[1]
capacity... | [
"vlvkcjswo7@naver.com"
] | vlvkcjswo7@naver.com |
eba37ec8db396d0c781197f2c79e8b1305138bf5 | 537e30c108e7a575cec1b7a9332439e1abac811d | /venv/bin/list_instances | c49900bc82f96c01a5302e64f08b84b988637fd1 | [] | no_license | kangqiwang/extractOntology | d5401bb27603e94264d84ec41fc9e994ece92278 | 89b3d7bc1cf08ea8856cb9221448e988d4d2f992 | refs/heads/master | 2020-08-13T01:44:19.399402 | 2019-11-18T18:52:28 | 2019-11-18T18:52:28 | 214,881,034 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,136 | #!/home/kang/Project/myGit/extractOntology/venv/bin/python
import sys
from operator import attrgetter
from optparse import OptionParser
import boto
from boto.ec2 import regions
HEADERS = {
'ID': {'get': attrgetter('id'), 'length':15},
'Zone': {'get': attrgetter('placement'), 'length':15},
'Groups': {'ge... | [
"kangqiwang@outlook.com"
] | kangqiwang@outlook.com | |
e8d97fc8a462b5ec994919115a9da2beb1399e1e | f8967772b9c67b3917285e5c14ff0c26440c75ad | /p_code/for.py | f4319f51509e38e57cfff177e4c91bdcb0e10193 | [] | no_license | mdAshrafuddin/python | 9302b5285f5f83ee4e03c001b2fa1234a54affbf | ae84e5c677a649c9916af38e60d91491b498a36f | refs/heads/main | 2023-02-17T13:56:19.855635 | 2021-01-13T16:45:17 | 2021-01-13T16:45:17 | 329,363,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,828 | py | # # for target_list in expression_list: suite
# # [else:suite]
# # n = [1, 3, 5, 6]
# for i in range(10):
# print(i)
# if i == 5:
# break
# # # string, tuple or list
# # persion = ["AShraf", 'tanjil', 'tamim', 'asj']
# # for p in persion:
# # print(p, len(p))
# phone_book = {
# "Mom": "123-... | [
"mdtanjil01753511918@gmail.com"
] | mdtanjil01753511918@gmail.com |
5f43704fc9571b6699a66ef7258a37a6851a5d9f | d4adf8e72bfc767bb6ad32e81a2d24a0309d90b7 | /Clients/Python/DBSAPI/UserExamples/dbsUpdateLumiSection.py | e7cdc9a58acf08ed3e61d61816c2246ec9745685 | [] | no_license | dmwm/DBSAPI | 5c55dd10161a1bb1fb6f646ca92dd3c4f263a256 | 3117ac30672a1932cef4606fbf7693ce4952b79d | refs/heads/master | 2021-01-21T19:28:22.329112 | 2013-10-30T12:07:54 | 2013-10-30T12:07:54 | 13,984,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | #!/usr/bin/env python
#
# Revision: 1.3 $"
# Id: DBSXMLParser.java,v 1.3 2006/10/26 18:26:04 afaq Exp $"
#
#
import sys
from DBSAPI.dbsApi import DbsApi
from DBSAPI.dbsException import *
from DBSAPI.dbsApiException import *
from DBSAPI.dbsLumiSection import DbsLumiSection
from DBSAPI.dbsOptions import DbsOptionParser
... | [
"giulio.eulisse@cern.ch"
] | giulio.eulisse@cern.ch |
0f71e7d1375a7e6b6ec28cf3c3c93b812af90331 | 33af6185b48bd76f97f0a74390a3a812ee216c78 | /angr-doc/examples/mma_howtouse/solve.py | 590cbe00ab75741931603ffef1f242a6c027b2ee | [
"BSD-2-Clause"
] | permissive | Ruide/angr-dev | dab0cabd907fce47ac698f890c3f3a8b80ab7e2a | 964dc80c758e25c698c2cbcc454ef5954c5fa0a0 | refs/heads/master | 2022-11-10T11:27:13.355024 | 2017-10-07T14:29:09 | 2017-10-07T14:29:09 | 104,417,044 | 0 | 1 | BSD-2-Clause | 2022-10-16T04:48:10 | 2017-09-22T01:35:12 | C | UTF-8 | Python | false | false | 1,329 | py | #!/usr/bin/env python
#
# This binary, from the MMA CTF, was a simple reversing challenge. THe biggest
# challenge was actually *running* this library in Windows. Luckily, with angr,
# we can avoid having to do this!
#
# The approach here is to use angr as a concrete execution engine to call the
# `howtouse` function ... | [
"rd.cheung.bupt.sms@gmail.com"
] | rd.cheung.bupt.sms@gmail.com |
fdf6a8987be76bdec8c219e115f22fc45208bdc9 | c41bbe6374d896c6bb36fe6c94a83f474388214e | /train.py | 079bc9699d85b1dd9a766040f43a84bc48c4fd4a | [] | no_license | DableUTeeF/sift_rep | dce8f0d15d80a7d41b7f97480eb13ef744806888 | 922109478bd33e7e3de74e352a99023ef479bcbf | refs/heads/master | 2020-04-24T16:28:24.124287 | 2019-02-22T17:38:40 | 2019-02-22T17:38:40 | 172,108,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | import natthaphon
import models
import datagen
from torch import nn, optim
import json
import os
def lrstep(epoch):
if epoch < 150:
a = 0.05
elif 150 < epoch < 225:
a = 0.005
else:
a = 0.0005
print(f'Epoch: {epoch+1} - returning learning rate {a}')
return a
if __name__ ==... | [
"palm22180@gmail.com"
] | palm22180@gmail.com |
129fa6a2abc715f1b035273b3ccc5bae8d183bf9 | fe3bc38d2a9f80a6b258e2c61dbe4557323a1d71 | /corehq/apps/smsbillables/management/commands/add_moz_zero_charge.py | 3d49a8b4d97eb67199c33df40d022eb1d8355668 | [] | no_license | ekush/commcare-hq | 077eb3f525ffb7d1acca0848b9c7678baf776832 | 97a1f55f24f79224724b2ecdc7d5cea87d42f65b | refs/heads/master | 2021-01-17T22:25:09.734898 | 2015-08-25T23:07:49 | 2015-08-25T23:07:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,981 | py | from decimal import Decimal
import logging
from couchdbkit import ResourceNotFound
from django.core.management.base import LabelCommand
from corehq.apps.accounting.models import Currency
from corehq.apps.sms.backend.http_api import HttpBackend
from corehq.apps.sms.models import INCOMING, OUTGOING
from corehq.apps.sms... | [
"npellegrino@dimagi.com"
] | npellegrino@dimagi.com |
36012a75fd7fc8f9abd7cf667e21753bedc9c361 | c8362b6beb84577a89b90fa729beec35c094cf96 | /generate_json.py | 9e7aece6f258377d56e8c121de372110e0547509 | [] | no_license | akx/twitter-swagger-api-defs | 651f4117341fb5476e586a93940b5f663ec9e4f5 | 0fbb55527a990df35ebe659d7adcfbcab4ab123a | refs/heads/master | 2016-09-05T22:19:51.440050 | 2013-06-04T16:31:23 | 2013-06-04T16:31:23 | 10,478,163 | 1 | 5 | null | null | null | null | UTF-8 | Python | false | false | 2,929 | py | import os
import re
import urlparse
from lxml.html import HTMLParser
from lxml import etree
url_param_re = re.compile(r":([a-z_]+)", re.I)
def inner_text(el):
if not el:
return None
if isinstance(el, list):
el = el[0]
return etree.tostring(el, method="text", encoding="UTF-8").decode("UTF-... | [
"akx@iki.fi"
] | akx@iki.fi |
5393132b63d05209be58fd2eecf5fdb158d8cfab | 8cf9c32fcad16c4109809447a530b435d290aa25 | /desktop/libs/notebook/src/notebook/connectors/altus.py | c5b7c4646ffa65ca93d8617617fa8b39dfbde67d | [
"Apache-2.0"
] | permissive | veritascl/hue | 38618e923d43bc167be6dd15c9d4b084758655d3 | ceb267982049638d306aff975bf0c9572db1560d | refs/heads/master | 2020-03-26T13:57:57.673750 | 2018-08-15T16:27:06 | 2018-08-15T16:54:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,082 | py | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | [
"romain@cloudera.com"
] | romain@cloudera.com |
6b48c0a42b044f51c67f1fc12bca48691e1a126d | f594c17d04a882d80d0cc2bbcb54163fbeca0aa8 | /geotagging/fixes/gis/admin/options.py | f98e796036a2cbe5a280338ce47b51b5a5287cea | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] | permissive | AlphaRomeo13/django-geotagging | 9f3752c16260d4eab3592975ac9930ebe87f9244 | c846bdb82556a64e16ba08730c85921c66ca01eb | refs/heads/master | 2021-01-12T09:22:11.384120 | 2016-12-11T18:23:59 | 2016-12-11T18:23:59 | 76,152,012 | 1 | 0 | null | 2016-12-11T03:30:44 | 2016-12-11T03:30:44 | null | UTF-8 | Python | false | false | 6,161 | py | from django.contrib.admin.options import BaseModelAdmin, InlineModelAdmin, \
StackedInline, TabularInline
from geotagging.fixes.gis.admin.widgets import OpenLayersWidgetFixed as OpenLayersWidget
from django.contrib.gis.gdal import OGRGeomType
from django.contrib.gis.db import m... | [
"pete@lincolnloop.com"
] | pete@lincolnloop.com |
047ee7629aacfb019abe87491bacab106a583b03 | efb7180c05964aee07756dbd4f9982f81559d7e3 | /TradeBot/tradebotapp/admin.py | d151aa6b4efce4984dc6473207db707c1514746f | [] | no_license | ShunnoSaiful/Trade-Bot | 920ba75225d921f54530fc9f0d10a8eb9eabdaaf | d07489dea5fcf1d1d51a918a3127f620682107f2 | refs/heads/master | 2022-11-24T08:22:00.946773 | 2019-10-29T05:20:08 | 2019-10-29T05:20:08 | 218,207,062 | 0 | 0 | null | 2022-11-22T04:18:04 | 2019-10-29T04:54:41 | JavaScript | UTF-8 | Python | false | false | 372 | py | from django.contrib import admin
# Register your models here.
from .models import Question, Answer, Plan, Description, Download, Section, FeatureCategory
admin.site.register(Question)
admin.site.register(Answer)
admin.site.register(Plan)
admin.site.register(Description)
admin.site.register(Download)
admin.site.regis... | [
"sunnosaiful@gmail.com"
] | sunnosaiful@gmail.com |
f8fbeb582f0bc1475af2524ec4a330871d14c9f0 | 98efe1aee73bd9fbec640132e6fb2e54ff444904 | /loldib/getratings/models/NA/na_maokai/__init__.py | d2c95d6f119c057f7496b2ef8fedde90603c8eda | [
"Apache-2.0"
] | permissive | koliupy/loldib | be4a1702c26546d6ae1b4a14943a416f73171718 | c9ab94deb07213cdc42b5a7c26467cdafaf81b7f | refs/heads/master | 2021-07-04T03:34:43.615423 | 2017-09-21T15:44:10 | 2017-09-21T15:44:10 | 104,359,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | from .na_maokai_top import *
from .na_maokai_jng import *
from .na_maokai_mid import *
from .na_maokai_bot import *
from .na_maokai_sup import *
| [
"noreply@github.com"
] | koliupy.noreply@github.com |
c2c263958c80fabd4c1e349cb2fe676374cc2a1d | 36fc492ad0d36e9d4a4452007d57c733a84ccaac | /python_programming_drive/mixed/list/List funtion.py | 4b832abee986c92c6691bdb575dd49dc49ed18bb | [] | no_license | mahmudgithub/Core-python | 864568994490f857ba89e2c66fbf10a65a4aea98 | c37cb4218fe1e216a4e3e80544cae262582cf4b5 | refs/heads/master | 2023-04-29T02:14:47.106443 | 2021-05-14T12:36:26 | 2021-05-14T12:36:26 | 346,885,590 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,549 | py | # creat a simple list method
list=[2,3,4,5,6,7,8,9]
print(list)
mh=[2,3,4,5,6,7,8,9]
print(mh)
#list into list or sub list
list=[2,[3,[4,4,[5,5,5],4],3],3,4,5,6,7,8,9]
print(list)
# find similar cherecter in a list
list=[2,3,4,5,6,7,85,5,5,5,9]
x=list.count(5)
print("similar cherecter in list is:",x)
#find index nu... | [
"mahmudhossain838@gmail.com"
] | mahmudhossain838@gmail.com |
d4b595bf7439bdd8d1befa931a7f24802be5c9ee | 4e02eefa71196aac8d62a61e3d698b1d1257a523 | /豆瓣电影词云/爬取豆瓣影评生成词云.py | 378f32ac017fa8828f836d40976b8a828b7d8472 | [] | no_license | onism7/spider | e7723f9cc8727184b0edf468c8821b57a80af501 | 5a0fe16f367876ab5f63aa7737a9e0a0efdb3b09 | refs/heads/爬虫学习 | 2023-04-04T23:59:02.385924 | 2020-07-05T15:10:08 | 2020-07-05T15:10:08 | 268,724,369 | 1 | 0 | null | 2021-03-30T12:10:27 | 2020-06-02T06:54:24 | null | UTF-8 | Python | false | false | 2,951 | py | import jieba.analyse
import re
from urllib import request
from bs4 import BeautifulSoup
from wordcloud import WordCloud
import matplotlib.pyplot as plt
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'}
# 分析网页函数
def getNo... | [
"1125699801@qq.com"
] | 1125699801@qq.com |
6296f20f61cae4491766f0d1526cc1ef1f53687d | 26be744685a62eb921e4d27f5c98cd4dd795a5b8 | /start_gui_for_nodes.py | 31dd718d98096eecc4a2f0c238c00731633603ff | [] | no_license | AlexDobrushskiy/python_layer | 51c7b736eb8997ede2d24899020b565ca11c4153 | 5ed47f2eacf920cfb285d0763a9170abfe5f5e95 | refs/heads/master | 2023-01-11T19:57:39.854724 | 2019-03-06T11:29:03 | 2019-03-06T11:29:03 | 173,755,304 | 0 | 0 | null | 2023-01-01T05:00:06 | 2019-03-04T14:00:08 | Python | UTF-8 | Python | false | false | 1,234 | py | # -*- coding: utf-8 -*-
import multiprocessing
import logging
import sys
from core_modules.blackbox_modules.keys import id_keypair_generation_func
from core_modules.masternode_discovery import discover_nodes
from client_prototype.cefpython.cefpython import start_cefpython
def initlogging():
logger = logging.ge... | [
"a.dobrushskiy@gmail.com"
] | a.dobrushskiy@gmail.com |
983aa700f8495ac6e419b73ea7de4a40ea515472 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_95/925.py | 469e68f78efb9387f7b68d65ff2ee906763fbb7b | [] | 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 | 523 | py | raw_alphabet = "yhesocvxduiglbkrztnwjpfmaq"
alphabet = {}
for i in xrange(len(raw_alphabet)):
alphabet[chr(ord('a') + i)] = raw_alphabet[i]
def decrypt(text):
output = ""
for c in text:
if alphabet.has_key(c):
output += alphabet[c]
elif c != "\n":
output += c
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
cf68c743a79485c7d70e3f054c624e33b93dcc81 | c67627680973129e8f3cefa8778c12366a11621d | /test/unit/test_cli_utils.py | 66c58c5a02653b51c83d59eb27445f65f8f79dd7 | [
"Apache-2.0"
] | permissive | eprtvea/curator | f3fb0d5a02f3ed33c23da5153f8e192609b75f62 | f6d25bca20d66437d367956c812988c6d88431c4 | refs/heads/master | 2020-12-01T01:08:35.279466 | 2016-02-11T00:34:22 | 2016-02-11T00:34:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,565 | py | from datetime import datetime, timedelta
from unittest import TestCase
from mock import Mock
import sys
import click
from click import testing as clicktest
import logging
logger = logging.getLogger(__name__)
import curator
named_indices = [ "index1", "index2" ]
named_alias = 'alias_name'
alias_retval = { "pre_... | [
"aaron@mildensteins.com"
] | aaron@mildensteins.com |
d4179f61ac0365aa5d0843892018d942a29ed243 | e972dc486e62152981177f85b5f9cff919ac0867 | /sams/tmp/category_db.py | 744d848a0aa3b864e1139359886c0c5aed4d9f96 | [] | no_license | yeongsunpark/cute | d81b9b03f747f65bed742b10b2f9a59f69efea96 | d69f918f9a1f1d6db70bc62272fc0ce582d7bf50 | refs/heads/master | 2020-03-27T12:43:41.728918 | 2019-04-29T04:41:47 | 2019-04-29T04:41:47 | 146,564,948 | 0 | 2 | null | 2018-11-06T07:45:59 | 2018-08-29T07:52:20 | Python | UTF-8 | Python | false | false | 5,664 | py | import os, sys
import pymysql
import logging
import ys.cute.sams.ys_logger as ys_logger
import concurrent.futures
sys.path.append(os.path.abspath('..'))
logger = logging.getLogger('root')
logger.setLevel("INFO")
logger.addHandler(ys_logger.MyHandler())
logger.info("Finish setting logger")
class SquadDb():
def ... | [
"ylunar@naver.com"
] | ylunar@naver.com |
54f3b6909a21adf8a488b8156ea3dd3eff4e9bce | f2428051b3f7d77dc4cb2d61ee18cc31fe5eaa67 | /tiddlywebplugins/docs.py | 2afab067e1c13c5fcb7bb688dd7bb7e5300c03c6 | [
"BSD-3-Clause"
] | permissive | tiddlyweb/tiddlywebplugins.docs | b306ab081957c81c0f172fd2a11752f3f3252842 | af5df2369c794fea6f44ff8823f9ab0958909a80 | refs/heads/master | 2021-01-18T23:48:12.217948 | 2011-11-10T17:18:35 | 2011-11-10T17:18:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,898 | py | """
Autogenerate TiddlyWeb API docs via a serialization.
"""
from tiddlyweb.serializer import (Serializer, NoSerializationError,
TiddlerFormatError, BagFormatError, RecipeFormatError)
from tiddlyweb.serializations import SerializationInterface
from tiddlywebplugins.templates import get_template
import urllib
... | [
"chris.dent@gmail.com"
] | chris.dent@gmail.com |
44b136ab3b9b77bb0ad55b20ac6da575b4601836 | 4fca17a3dbc3e74ba7e46bd7869eb6d138e4c422 | /_1725_Number_Of_Rectangles_That_Can_Form_The_Largest_Square.py | ae7a0dd9651d89effd3109888fcae48736d25659 | [] | no_license | mingweihe/leetcode | a2cfee0e004627b817a3c0321bb9c74128f8c1a7 | edff905f63ab95cdd40447b27a9c449c9cefec37 | refs/heads/master | 2021-06-19T07:46:46.897952 | 2021-05-02T05:13:17 | 2021-05-02T05:13:17 | 205,740,338 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | from collections import Counter
class Solution(object):
def countGoodRectangles(self, rectangles):
"""
:type rectangles: List[List[int]]
:rtype: int
"""
return max(Counter(map(min, rectangles)).items())[1]
| [
"hemingwei2017@gmail.com"
] | hemingwei2017@gmail.com |
8ca7c327e6dcb11955cc3b53b864c85fe94c2207 | f250ee8189a91b9cc12d57665dfb09a34c343d38 | /setup.py | 16512f4d5054ee5e87cb774f96dd7d384736f418 | [] | no_license | duckworthd/optim | 4abb64b74c8df32175580b70d450963dbd099865 | 510e8fb81342fb145e140194dad0957724d124f7 | refs/heads/master | 2021-01-25T08:38:39.295589 | 2014-07-21T05:22:18 | 2014-07-21T05:22:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 930 | py | from setuptools import setup, find_packages
import os
def version(name):
fname = os.path.join(name, '_version.py')
environ = {}
execfile(fname, environ)
return environ['__version__']
if __name__ == '__main__':
NAME = 'optim'
setup(
name = NAME,
version = version(NAME),
author ... | [
"duckworthd@gmail.com"
] | duckworthd@gmail.com |
99216479731815d1597e49465789a7c49782de16 | 345fdc5971db81240722901cbd1fef619b271676 | /chapter8/snippets/views.py | 4690d46532cbffce84863775e9a821a8b80a8d38 | [] | no_license | hisakin/practical-django | 093c449f42fe428320f5dce80db5b6708619e45d | a25e00d6283e1eb7a79728bbb99141f13c0f4692 | refs/heads/main | 2023-07-30T15:37:26.492059 | 2021-09-16T14:49:57 | 2021-09-16T14:49:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,637 | py | from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from snippets.forms import SnippetForm
from snippets.models import Snippet
def top(request):
snippets = Snippet.objects.all()
context = {"snippets": ... | [
"contact@c-bata.link"
] | contact@c-bata.link |
9819935bdeb231eee38a6eb8298167a33dd66791 | a9b24a31f27afc42736d923b7ba4df300e13a8cf | /qidian_book/start.spec | 06a4f3fef319e84fc683ec0a381d53cd51f3024f | [] | no_license | 520wsl/python-scrapy-test | 8dcb216a91c8f03266ae29d3b9590b124088eb67 | 2f93e161c849aabfe9efb90e719906c9ae5bee1c | refs/heads/master | 2022-12-13T00:47:44.177505 | 2020-05-23T05:05:57 | 2020-05-23T05:05:57 | 184,033,077 | 2 | 0 | null | 2022-12-08T05:25:05 | 2019-04-29T08:40:13 | HTML | UTF-8 | Python | false | false | 823 | spec | # -*- mode: python -*-
block_cipher = None
a = Analysis(['start.py'],
pathex=['E:\\GIT\\python-scrapy-test\\qidian_book'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_... | [
"395548460@qq.com"
] | 395548460@qq.com |
3bf2cae52d2734325db33a0646b8d648195c5ee6 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc054/A/4891080.py | da5c0c65d36312ef415307fd75b5c38f13c0880a | [] | 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 | 185 | py | A, B = map(int, input().split())
if (A == B):
print('Draw')
elif (A == 1):
print('Alice')
elif (B == 1):
print('Bob')
elif (A > B):
print('Alice')
else:
print('Bob') | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
b1fa11cb1e9e3e99ea81b0ac5ea8466267d71a9a | f4ff27b8a5ab314659925eaf4be83151a1846bb5 | /cachetools_ext/fs.py | 744ff797e789a18e0a734d98e990346eb2afa9bd | [
"MIT"
] | permissive | thanakijwanavit/cachetools_ext | 0e9934ad9d264f3eb157d20973ed1c2751501e57 | 4355393d660c047ef3a286411f17795905476c91 | refs/heads/master | 2023-02-09T04:42:43.904587 | 2021-01-06T01:45:57 | 2021-01-06T01:45:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,429 | py | import datetime
import os
import pickle
import shutil
from collections.abc import MutableMapping
from pathlib import Path
from typing import Any, Optional, Union
class FSLRUCache(MutableMapping):
"""Filesystem LRU cache with optional TTL"""
def __init__(
self,
maxsize: int,
path: Opti... | [
"github@oliverrice.com"
] | github@oliverrice.com |
10a042b54434cd65b7b1f5ac8d959ac31181fc38 | a3e626f9893982c549d1f8d98237e9601c2ddfef | /importXPZcurve.py | 9ca5f8b16b7eab9faf2fd57411761780b9f48b31 | [] | no_license | richstoner/connectivity-blend | e515ef19e57179cdd30c98aa235f3feb586095c0 | dae27b67e6de58a33354b200b34cf045d37fa035 | refs/heads/master | 2020-04-25T22:20:33.640843 | 2013-09-24T18:22:36 | 2013-09-24T18:22:36 | 8,784,866 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,333 | py | print("Hello")
from mathutils import Vector
import bpy
import glob
import csv
import math
import struct
import os
import urllib.request
w=1
def clearAllCurves():
# gather list of items of interest.
candidate_list = [item.name for item in bpy.data.objects if item.type == "CURVE"]
# select t... | [
"stonerri@gmail.com"
] | stonerri@gmail.com |
59afa20535e5200ed4863696e830c84019f868a0 | 67f86bb3d09cbc86cac698b3f0abaf01457a966a | /master/nameko-master/nameko-master/test/standalone/test_event_dispatcher.py | 52657eb8d8a0c8264c82b40e327629c03d339992 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | tied/DevArtifacts | efba1ccea5f0d832d4227c9fe1a040cb93b9ad4f | 931aabb8cbf27656151c54856eb2ea7d1153203a | refs/heads/master | 2020-06-06T01:48:32.149972 | 2018-12-08T15:26:16 | 2018-12-08T15:26:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,942 | py | import pytest
from amqp.exceptions import NotFound
from mock import Mock, patch
from six.moves import queue
from nameko.amqp import UndeliverableMessage
from nameko.events import event_handler
from nameko.standalone.events import event_dispatcher, get_event_exchange
from nameko.testing.services import entrypoint_waite... | [
"alexander.rogalsky@yandex.ru"
] | alexander.rogalsky@yandex.ru |
949312734036c00781d898b942bfafcd063a4d23 | a3fba5e8ecc502ff262b737d05f5b719e1cd4148 | /SlackWorkflows.py | 87db380e13a643f85a2702bae0537fe51abd266a | [] | no_license | cthacker-udel/Python-Slack-API | 6eccfbd97d564c4d8d4325fba22fab4db721a146 | 1bee3d77c4bf3179a348e83d760284bab3c13d24 | refs/heads/master | 2023-06-16T15:23:46.224602 | 2021-07-15T06:13:51 | 2021-07-15T06:13:51 | 378,105,544 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | from SlackClient import SlackClient
class SlackWorkflows(SlackClient):
def __init__(self):
self.workflow_step_execute_id = None
self.outputs = None
self.inputs = None
self.step_image_url = None
self.step_name = None
def generate_queries(self):
body = {}
... | [
"cthacker@udel.edu"
] | cthacker@udel.edu |
eb8e8ca7dac3dc3988a7a6219e8a6e4e15e4a9af | 0cba5529e387ba0f077b4e8ddeb96f914004f5df | /setup-gpu.py | 3bc6c47fe699a7d4a30bdddecd315bf0b0a3e42e | [
"MIT"
] | permissive | AsyrafAzlan/Malaya | dc78398ee6880578f40c5646a48882a5913217ae | 3d5166173cf74881f7a56fffaaf391813c55d4f1 | refs/heads/master | 2021-05-21T22:47:41.863857 | 2020-04-03T15:00:21 | 2020-04-03T15:00:21 | 252,841,526 | 1 | 0 | MIT | 2020-04-03T21:04:44 | 2020-04-03T21:04:44 | null | UTF-8 | Python | false | false | 1,367 | py | import setuptools
__packagename__ = 'malaya-gpu'
setuptools.setup(
name = __packagename__,
packages = setuptools.find_packages(),
version = '3.4',
python_requires = '>=3.6.*',
description = 'Natural-Language-Toolkit for bahasa Malaysia, powered by Deep Learning Tensorflow. GPU Version',
autho... | [
"husein.zol05@gmail.com"
] | husein.zol05@gmail.com |
a34fa47c41a776883e5322039c8a4ea490ae734f | f2604a924b5cc6638dba6e246a6aea38d335f3b1 | /gym_splendor_code/envs/mechanics/splendor_observation_space.py | fab06fe86b21933bdca0b151313882be48691a6b | [
"MIT"
] | permissive | StanczakDominik/gym-splendor | 379507c066dc8756f5514c3760000bed6bf28020 | b7d6b0356d96ad1c528371f52412b81687a0ecc6 | refs/heads/master | 2020-08-28T00:38:06.076814 | 2019-10-25T13:09:17 | 2019-10-25T13:09:17 | 217,536,093 | 0 | 0 | MIT | 2019-10-25T13:09:40 | 2019-10-25T13:09:39 | null | UTF-8 | Python | false | false | 2,426 | py | from gym.spaces import Space
class SplendorObservationSpace(Space):
"""This class contains all information we want to share with the agents playing Splendor. The difference between
SplendorObservationSpace and State is that State contains all information about the state of game (including list
of cards th... | [
"tomeko314@gmail.com"
] | tomeko314@gmail.com |
ac4dad4eb9fe62c08acc70ad3022a95b11ea530d | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /aptamers_mlpd/simulation/utils.py | addb9740cbb0a633a07ab031f48e0ace1eddf5c8 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | null | UTF-8 | Python | false | false | 3,197 | py | # coding=utf-8
# Copyright 2022 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 |
a7d3deb5e20d6442018c8bb519bec6820cd71cf0 | e3eead40e93fdf5186269536edefab4f08e9a5a2 | /LeetCode/393-utf8_validation.py | 9d69670d9f142e05f0ee5a6645188ff7b8527595 | [] | no_license | davll/practical-algorithms | bbc930b42363cae00ce39e8a686854c19131d334 | 0e35e4cc87bd41144b8e34302aafe776fec1b356 | refs/heads/master | 2021-08-22T13:12:34.555074 | 2020-03-28T08:56:13 | 2020-03-28T08:56:13 | 147,224,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,124 | py | def validate_utf8(data):
n = len(data)
i = 0
while i < n:
nb = _nsucc_bits(data[i])
if nb < 0:
return False
i += 1
for _ in range(nb):
if i < n:
if not _follow_check(data[i]):
return False
i += 1
... | [
"davll.xc@gmail.com"
] | davll.xc@gmail.com |
e88aae5ad5a2fd54f63aeec3e9e2ec2f17efeae8 | de33d709be6667a1972322fcd514edca80cfa6a0 | /snipps/check_mode.py | b20227c7ee97409be989525f4c0593c4f51b97ad | [
"MIT"
] | permissive | akshaynagpal/number_recognition | 8ecbc6affc970a9e9ffeb70cc290db9a4ed43489 | 363606205ccfe4a43320c2452c0ae0dd4e026ec2 | refs/heads/master | 2020-05-09T16:19:08.562084 | 2015-10-03T10:01:14 | 2015-10-03T10:01:14 | 30,975,567 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | import PIL
from PIL import Image
image_name = raw_input("enter name of image to open!")
imgfile=Image.open(image_name)
print imgfile.mode
raw_input()
| [
"akshay2626@gmail.com"
] | akshay2626@gmail.com |
819d61a9de591bf744f7ebad7563c9fd8559d4dc | e8dba002d8916a468e559a52f254c0d92532d6b2 | /homeassistant/components/airnow/config_flow.py | 67bce66e1673ab24e42ba7ed70d4ad657b614040 | [
"Apache-2.0"
] | permissive | thomasgermain/home-assistant | 32b0f4d888220f4ce49dc85e506d0db39445c6c0 | 9673b93842ddcecc7e6a6d65e6d4f5b8a1089c43 | refs/heads/vaillant | 2023-08-21T23:50:24.679456 | 2020-05-20T21:01:18 | 2023-08-03T07:11:35 | 197,781,893 | 8 | 4 | Apache-2.0 | 2023-02-10T06:56:47 | 2019-07-19T13:57:53 | Python | UTF-8 | Python | false | false | 3,692 | py | """Config flow for AirNow integration."""
import logging
from pyairnow import WebServiceAPI
from pyairnow.errors import AirNowError, EmptyResponseError, InvalidKeyError
import voluptuous as vol
from homeassistant import config_entries, core, exceptions
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF... | [
"noreply@github.com"
] | thomasgermain.noreply@github.com |
c6526829039453f2cd279cccdd18b6d5e6844b8a | 1ebe5a07e7f6260c2c2ceb6ca00dcf2a0341e544 | /op_impl/built-in/ai_core/tbe/impl/dynamic/slice.py | d61346ea6f4566518203eebc550f23fe6dc7f588 | [] | no_license | gekowa/ascend-opp | f5e09905336d85f9974d555d03d37a75cb8185c1 | 5c28a2faf9d2a117ea6f0923efe35fcd53904dd2 | refs/heads/master | 2023-04-09T12:14:40.337104 | 2021-04-19T23:00:59 | 2021-04-19T23:00:59 | 359,620,865 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,539 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the Apache License Version 2.0.You may not use
this file except in compliance with the License.
This progra... | [
"gekowa@gmail.com"
] | gekowa@gmail.com |
51e2085c83cb053c92ea24c9e86320bb8b126d03 | 8e3a3c845ca3320483b233e8a0db4081aa3b8664 | /clases/migrations/0005_auto_20160623_0039.py | bee89b25480c363feacc339deffa53fc94c63a41 | [] | no_license | sofide/loiprocesos | 7d56398395e6f3302f4d9ec3627ed1b4c24bc17a | 4047fa02d0cfbcf744c80d59e3402215f8b294d3 | refs/heads/master | 2021-07-08T03:26:55.171459 | 2020-08-04T03:23:10 | 2020-08-04T03:23:10 | 61,167,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-23 03:39
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('grupos', '0001_initial'),
('clases', '0004_auto_2016... | [
"sofi.denner@gmail.com"
] | sofi.denner@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.