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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bdf608e30942d1e434a5454fe9cbc342f5efd52f | d10e19f07b209b2fa661fb616947d0382fd0bbb0 | /util/reload/del_e.py | ddff6d5f5e907b62b99314dae8f2bfa3b02afe35 | [] | no_license | Do3956/test | 6bda9633aa2762b8f0f4b05b154810107c40d9ee | 15bbc285dc3acbbabaefb188cb264e56fb24c84d | refs/heads/master | 2021-07-02T23:52:29.519329 | 2018-02-07T06:19:28 | 2018-02-07T06:19:28 | 95,771,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | # -*- coding: utf-8 -*-
"""
__author__ = 'do'
__mtime__ = '2018/1/11'
__content__ = '析构函数重载'
"""
class Life:
def __init__(self, name='name'):
print 'Hello', name
self.name = name
def __del__(self):
print 'Goodby', self.name
brain = Life('Brain') # call __init__
brain = 'loretta' #... | [
"395614269@163.com"
] | 395614269@163.com |
ce2ea39a792d9d09f4cc66658a211858bd44ab01 | 5667cc877342204b7d54b6c3cc5a9f4854f08829 | /.history/apppersona/forms_20201101194225.py | fafb266b000ff5ea951dc20c6446324342a53378 | [] | no_license | Nyckhos/TestCommit | d62e3f6fefb04ab5647475cc7ead0d72cbd89efa | 9aa8e2e35280b7862960cc8a864e9c02ac7f4796 | refs/heads/main | 2023-01-05T05:57:59.223641 | 2020-11-02T02:08:18 | 2020-11-02T02:08:18 | 309,237,224 | 2 | 0 | null | 2020-11-02T02:30:43 | 2020-11-02T02:30:43 | null | UTF-8 | Python | false | false | 3,647 | py | from django import forms
from django.db import models
from django.db.models.fields import CharField, EmailField
from django.forms import ModelForm, Textarea
from django.forms.widgets import EmailInput, HiddenInput, PasswordInput, Select, TextInput
from .models import Persona
from django.contrib.auth.models import User... | [
"fernandox_240997@live.com"
] | fernandox_240997@live.com |
7b3468eb08adcb7c9eab99a524080c7e23f65b33 | 255e7b37e9ce28bbafba5a3bcb046de97589f21c | /suqing/fuckal/python/linkedlist/reverse-nodes-in-k-group.py | 99781eaab54715ab585558e6417e2f13b6e426ff | [] | no_license | dog2humen/ForTheCoffee | 697d2dc8366921aa18da2fa3311390061bab4b6f | 2f940aa9dd6ce35588de18db08bf35a2d04a54f4 | refs/heads/master | 2023-04-15T09:53:54.711659 | 2021-04-28T13:49:13 | 2021-04-28T13:49:13 | 276,009,709 | 2 | 2 | null | 2020-07-01T08:29:33 | 2020-06-30T05:50:01 | Python | UTF-8 | Python | false | false | 1,684 | py | # coding:utf8
"""
25. K 个一组翻转链表
给你一个链表,每 k 个节点一组进行翻转,请你返回翻转后的链表。
k 是一个正整数,它的值小于或等于链表的长度。
如果节点总数不是 k 的整数倍,那么请将最后剩余的节点保持原有顺序。
输入:head = [1,2,3,4,5], k = 2
输出:[2,1,4,3,5]
链接:https://leetcode-cn.com/problems/reverse-nodes-in-k-group
"""
# Definition for singly-linked list.
# class ListNode:
# ... | [
"116676671@qq.com"
] | 116676671@qq.com |
61d453f7043d551d259a951e4642f47d5429b7cd | f6302d4915f1186106270ac78273534920bdc553 | /tests/test_scripts/test_gen_jsonld.py | 385e3a242135665eba7991fc0854bfad5e25d86a | [
"CC0-1.0"
] | permissive | biolink/biolinkml | 7daeab5dfbefb8c9a6ce15176725be4b0faf86c7 | 34531bd9cb8805029035c7b7726398ebee972b97 | refs/heads/master | 2021-06-10T20:10:56.718829 | 2021-04-04T20:05:59 | 2021-04-04T20:05:59 | 167,634,946 | 25 | 19 | CC0-1.0 | 2021-10-02T01:45:34 | 2019-01-26T01:07:26 | Python | UTF-8 | Python | false | false | 4,595 | py | import os
import re
import unittest
# This has to occur post ClickTestCase
from functools import reduce
from typing import List, Tuple
import click
from rdflib import Graph, URIRef
from biolinkml import METAMODEL_NAMESPACE
from biolinkml.generators.jsonldcontextgen import ContextGenerator
from biolinkml.generators im... | [
"solbrig@jhu.edu"
] | solbrig@jhu.edu |
a23323ac53143abd4e91ae0d35c314a55e9716cb | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /r6ywkSJHWqA7EK5fG_14.py | e1800ffbfe2d70f4996996c5a58be1d4e86742ab | [] | 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 | 773 | py | """
Write a method that accepts two integer parameters rows and cols. The output
is a 2d array of numbers displayed in column-major order, meaning the numbers
shown increase sequentially down each column and wrap to the top of the next
column to the right once the bottom of the current column is reached.
### Exampl... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
e8c56a08cc5141e47f33f2dd24e7959853718791 | d82ac08e029a340da546e6cfaf795519aca37177 | /chapter_06_model_evaluation_hyperparameter_tuning/09_precision_recall.py | 8ed40b8d08c5c3316ccb51e1e9aa19e22539551a | [] | no_license | CSwithJC/PythonMachineLearning | 4409303c3f4d4177dc509c83e240d7a589b144a0 | 0c4508861e182a8eeacd4645fb93b51b698ece0f | refs/heads/master | 2021-09-04T04:28:14.608662 | 2018-01-15T20:25:36 | 2018-01-15T20:25:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,384 | py | import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split, GridSearchCV, cross_val_score
from sklearn.svm import SVC
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.metrics ... | [
"jean.mendez2@upr.edu"
] | jean.mendez2@upr.edu |
0f376f00c936710d9751db5444a986c0a3a66788 | 17dcc3e6a5e418a7c4c2e79f6e34ae7df39fdbcd | /polyaxon_lib/datasets/imdb.py | b9f921cf262d4dc58eef86b59c760646f5f749fc | [
"MIT"
] | permissive | polyaxon/polyaxon-lib | 55358fa8f56a1cd12a443672f4d6cb990c51ae8f | d357b7fee03b2f47cfad8bd7e028d3e265a10575 | refs/heads/master | 2021-09-11T19:43:59.391273 | 2018-04-11T15:35:03 | 2018-04-11T15:35:03 | 94,631,683 | 7 | 4 | MIT | 2018-01-25T14:08:54 | 2017-06-17T15:18:04 | Python | UTF-8 | Python | false | false | 4,981 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import json
import os
import six.moves.cPickle as pickle # pylint: disable=import-error
import numpy as np
import tensorflow as tf
from polyaxon_lib import Modes
from polyaxon_lib.datasets.converters.sequence_converters import... | [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
d345272523d8337ac757fdf062c2baac998b6531 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/2946.py | 87758d9e393a1e5e783c705de41a6ed22abb34c8 | [] | 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 | 584 | py | numbers = []
t = int(raw_input())
for i in xrange(1, t + 1):
numbers = [int(s) for s in list(raw_input())]
numbers = [0] + numbers
while True :
change = False
for j in xrange(1, len(numbers)):
if (numbers[j] < numbers[j-1]):
numbers[j-1] = numbers[j-1] -1
change = ... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
bdd20ca186269d2759e9ecf5ae8ac0a444d8f194 | cd9c2c6df0567bd7be18909f4150a26a45c8a4f7 | /utils/rpi3/setup-system.py | cce2a6faf5e0796d16d7210a85c82987f73b6111 | [
"Apache-2.0"
] | permissive | zeta1999/mjmech | d98fd506e6d7e799953a328ebe5db06e379591cb | 9e44f82849afc35180d4bda22282dba1cde42be0 | refs/heads/master | 2022-04-19T19:24:44.638122 | 2020-04-16T16:41:54 | 2020-04-16T16:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,530 | py | #!/usr/bin/python3 -B
# Copyright 2018 Josh Pieper. 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 requir... | [
"jjp@pobox.com"
] | jjp@pobox.com |
66e70df8459191ede0a0d58d871bb1cceccfeaa2 | e29734c2b3543a05a28b6bc460c3248ea37aaf5c | /apps/course/migrations/0012_auto_20190417_1723.py | 3f626f2c421f9e72f9bb96824deeb14fd09983c7 | [] | no_license | simida0755/PopularBlogs | fda6dbe06751dde013ba57f73c708fd7106a49ee | 3a86989232206d0727223306c0e2d2c62d35fa9b | refs/heads/master | 2020-05-21T15:54:09.853341 | 2019-05-13T02:15:28 | 2019-05-13T02:15:28 | 186,101,555 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | # Generated by Django 2.0.2 on 2019-04-17 17:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('course', '0011_auto_20190416_1459'),
]
operations = [
migrations.RenameField(
model_name='blogposts',
old_name='Like_nums',
... | [
"simida027@163.com"
] | simida027@163.com |
7aefc106ad42e43fe1b6ff523e1dac4fc64c01d2 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_fume.py | ce796bac3558af33ff267419b8d051aff846cfaa | [
"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 | 326 | py |
#calss header
class _FUME():
def __init__(self,):
self.name = "FUME"
self.definitions = [u'to be very angry, sometimes without expressing it: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'verbs'
def run(self, obj1 = [], obj2 = []):
return self.jso... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
df5c7b8d6d7517e53f42e5a9d2b47dc530a7a8e4 | aedf65a662083d82fd2ef021a883dd842961d445 | /webapp/linkstop/apps/accounts/admin.py | bb93b6b45bbaaaf78846834daee1847aa3489c47 | [] | no_license | hercules261188/Locidesktop | b95f9f4dd709d33f21b7b9f43d52e3b76c99912b | cab3a3bda807780244e4e5ce9c3745b6d04ddbc9 | refs/heads/master | 2021-12-02T15:12:47.876242 | 2011-01-10T09:21:27 | 2011-01-10T09:21:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | from django.contrib import admin
from models import *
class ProfileAdmin(admin.ModelAdmin):
list_display = ('user',)
admin.site.register(Profile, ProfileAdmin)
class InviteAdmin(admin.ModelAdmin):
list_display = ('code', 'uses_remaining')
admin.site.register(Invite, InviteAdmin)
| [
"willmcgugan@gmail.com"
] | willmcgugan@gmail.com |
9b6387e95c7865363144a250492269e8afc55560 | af4d559792c4255d5f26bc078cd176b70c0e643f | /hpsklearn/components/compose/_target.py | 47122eee5792a436fd2494fc78ae7673a5121e0f | [
"BSD-3-Clause"
] | permissive | hyperopt/hyperopt-sklearn | ec7d5f97ba8fd5a2c283dfec2fa9e0170b61c6ce | 4b3f6fde3a1ded2e71e8373d52c1b51a0239ef91 | refs/heads/master | 2023-08-02T07:19:20.259964 | 2022-12-15T17:53:07 | 2022-12-15T17:53:07 | 8,293,893 | 1,480 | 292 | NOASSERTION | 2022-12-15T17:53:08 | 2013-02-19T16:09:53 | Python | UTF-8 | Python | false | false | 1,423 | py | from hyperopt.pyll import scope
from sklearn import compose
@scope.define
def sklearn_TransformedTargetRegressor(*args, **kwargs):
return compose.TransformedTargetRegressor(*args, **kwargs)
def transformed_target_regressor(name: str,
regressor: object = None,
... | [
"38689620+mandjevant@users.noreply.github.com"
] | 38689620+mandjevant@users.noreply.github.com |
28b398292b9bf6064d42889b0c2063af30c40fc2 | 58c3dd075b87ec882ccbce27d81928ea5dd46223 | /presentation/views/user/stories_views.py | ee43e98b33a2556704a7c743fbe22155926874aa | [] | no_license | panuta/storypresso | 706328652f583f7d3574eccca2bc885c49a9d0b9 | ef0fecacbd67b09c8ab64d842709344fa6e2773d | refs/heads/master | 2021-01-02T06:32:05.443474 | 2013-04-11T12:47:55 | 2013-04-11T12:47:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,890 | py | # -*- encoding: utf-8 -*-
import urllib2
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.shortcuts import render, get_object_or_404, redirect
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http ... | [
"panuta@gmail.com"
] | panuta@gmail.com |
344de7f08b6061681f6b255140a70d46b64199c1 | 2416a6bde05651717f99dd45c5116cd13a7a38f7 | /docs/source/clear_docs.py | 3514db0143d1ddae01c133c04f99d3a02fbd37f2 | [
"BSD-3-Clause"
] | permissive | modulexcite/nbgrader | b1080a61d0ba5252c16c3d7471e13a40ce659624 | 1748c40f47b69c81e19068d4ba3c3205af72317d | refs/heads/master | 2021-01-20T21:40:48.115091 | 2015-08-13T01:57:08 | 2015-08-13T01:57:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,105 | py | import os
import sys
import subprocess as sp
from copy import deepcopy
try:
from IPython.nbformat import read, write
from IPython.nbconvert.preprocessors import ClearOutputPreprocessor
except ImportError:
print("Warning: IPython could not be imported, some tasks may not work")
def run(cmd):
print(" "... | [
"jhamrick@berkeley.edu"
] | jhamrick@berkeley.edu |
1ec1ad8fe95f163e80301f541560976b55f7b599 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_viewed.py | f9f11fcee4bddc5beedae71b386206b85ee7bebc | [
"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 | 216 | py |
#calss header
class _VIEWED():
def __init__(self,):
self.name = "VIEWED"
self.definitions = view
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['view']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
f6fdf258262e61f9b025e4447b78e2845eb335c1 | 0d86bb399a13152cd05e3ba5684e4cb22daeb247 | /python-basics/unit12-modules/py119_from_import.py | d62586d3be78b54a6b3a96b8e4acc2e3c31b4925 | [] | no_license | tazbingor/learning-python2.7 | abf73f59165e09fb19b5dc270b77324ea00b047e | f08c3bce60799df4f573169fcdb1a908dcb8810f | refs/heads/master | 2021-09-06T05:03:59.206563 | 2018-02-02T15:22:45 | 2018-02-02T15:22:45 | 108,609,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 18/1/4 下午10:06
# @Author : Aries
# @Site :
# @File : py119_from_import.py
# @Software: PyCharm
'''
from .. import 语句
多行导入
'''
from Tkinter import Tk, Frame, Button, Entry, \
Canvas, Text, LEFT
'''
PEP 8风格
加入括号更易读
'''
from Tkinter import (Tk, Frame,... | [
"852353298@qq.com"
] | 852353298@qq.com |
f591f2f5000f55dde12dac4747b15d2cd0031f76 | 0809ea2739d901b095d896e01baa9672f3138825 | /ORMproject1_ver_2/ORMproject1_ver_2/settings.py | db3c8140ebb48988e3492dcf972169f97a75ed03 | [] | no_license | Gagangithub1988/djangoprojects | dd001f2184e78be2fb269dbfdc8e3be1dd71ce43 | ea236f0e4172fbf0f71a99aed05ed7c7b38018e2 | refs/heads/master | 2022-11-15T23:46:46.134247 | 2020-07-15T06:37:51 | 2020-07-15T06:37:51 | 273,479,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,275 | py | """
Django settings for ORMproject1_ver_2 project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
im... | [
"djangopython1988@gmail.com"
] | djangopython1988@gmail.com |
35659b938f37e4feeafc513cf7fc00b3e2457ce9 | 10d98fecb882d4c84595364f715f4e8b8309a66f | /tunas/schema_io_test.py | ab7f6ca4f294916dca7c1d63ac50e89c1bc14eeb | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | afcarl/google-research | 51c7b70d176c0d70a5ee31ea1d87590f3d6c6f42 | 320a49f768cea27200044c0d12f394aa6c795feb | refs/heads/master | 2021-12-02T18:36:03.760434 | 2021-09-30T20:59:01 | 2021-09-30T21:07:02 | 156,725,548 | 1 | 0 | Apache-2.0 | 2018-11-08T15:13:53 | 2018-11-08T15:13:52 | null | UTF-8 | Python | false | false | 7,843 | py | # coding=utf-8
# Copyright 2021 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 |
3cbe84dc02307edb834d241e25626fe9c1b861d0 | e9a5033ac69ef690602eb1206217dac6d09c1e63 | /netharn/util/util_io.py | 74d56ad483aade482c02c454104a746a9cfed118 | [
"Apache-2.0"
] | permissive | Erotemic/netharn | ba030df2c9d79fe0b392f8823bc2819383d8756f | bc4a6d75445c949e709e5ab903ba72813ec68b79 | refs/heads/master | 2021-05-26T05:05:24.931026 | 2020-08-27T00:13:34 | 2020-08-27T00:13:34 | 127,506,937 | 43 | 8 | Apache-2.0 | 2020-02-19T17:51:56 | 2018-03-31T06:49:03 | Python | UTF-8 | Python | false | false | 1,392 | py | # -*- coding: utf-8 -*-
"""
DEPRECATED
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
def read_h5arr(fpath):
import h5py
with h5py.File(fpath, 'r') as hf:
return hf['arr_0'][...]
def write_h5arr(fpath, arr):
import h5py
with h5py.Fil... | [
"jon.crall@kitware.com"
] | jon.crall@kitware.com |
9e21f133bfc9f87dea5673c020cb62a394593f31 | ef243d91a1826b490e935fa3f3e6c29c3cc547d0 | /PyQt5/QtNetwork/QSslKey.py | c5246b49969c93f51c37ee8902d23b3a1e0668d5 | [] | no_license | VentiFang/Python_local_module | 6b3d0b22399e817057dfd15d647a14bb1e41980e | c44f55379eca2818b29732c2815480ee755ae3fb | refs/heads/master | 2020-11-29T11:24:54.932967 | 2019-12-25T12:57:14 | 2019-12-25T12:57:14 | 230,101,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,212 | py | # encoding: utf-8
# module PyQt5.QtNetwork
# from F:\Python\Python36\lib\site-packages\PyQt5\QtNetwork.pyd
# by generator 1.147
# no doc
# imports
import enum as __enum
import PyQt5.QtCore as __PyQt5_QtCore
import sip as __sip
class QSslKey(__sip.simplewrapper):
"""
QSslKey()
QSslKey(Union[QByteArray, by... | [
"5149528+ventifang@user.noreply.gitee.com"
] | 5149528+ventifang@user.noreply.gitee.com |
e5b0008119735c1b9e21aa25ea5e1a98dd42cef7 | 2a4a17a67b9069c19396c0f8eabc8b7c4b6ff703 | /BGP3D/Chapter05/AdditionalCode/MarkerClass.py | 168ea6c1929f070d29038c045e9feff5ed2cc174 | [] | no_license | kaz101/panda-book | 0fa273cc2df5849507ecc949b4dde626241ffa5e | 859a759c769d9c2db0d11140b0d04506611c2b7b | refs/heads/master | 2022-12-19T09:36:05.794731 | 2020-09-16T19:04:10 | 2020-09-16T19:04:10 | 295,784,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | '''
This class is used to define the markers placed along the track. These markers are
referenced by multiple parts of the game in order to understand the shape and position
of parts of the track.
'''
from pandac.PandaModules import Vec3
class Marker:
def __init__(self, pos):
self.lane = 0
# Creates a... | [
"kaz101130@gmail.com"
] | kaz101130@gmail.com |
3c5bd952d9054dcd4e8a2ac805219cc5d33ea51d | 009f8f1f77ef4bdfd67999058d33bccd8e743654 | /leetcode/1470_shuffle_the_array.py | 378d8363f5c46ac30fe2cf886b70ecbc5fe218d2 | [
"MIT"
] | permissive | coocos/leetcode | 4bd5faa46e916af666db025c8182f1c30cd49ee3 | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | refs/heads/master | 2021-06-13T13:11:10.699941 | 2021-05-01T05:55:12 | 2021-05-01T07:17:52 | 192,551,170 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | import unittest
from typing import List
class Solution:
"""
This solution simply slices the list into two, zips the slices together
and then keeps appending numbers from the zipped iterable to a new list, finally
returning the new list.
"""
def shuffle(self, nums: List[int], n: int) -> List[i... | [
"1397804+coocos@users.noreply.github.com"
] | 1397804+coocos@users.noreply.github.com |
ade92b08072be4fbfd43b37ed4a6fcf0b292740d | 68f836bf5d9f849722c322e9207d842c766cac6f | /backend/project_notes.py | 90146bb70cf48ade623b4dd2778474b8661a07d0 | [
"MIT"
] | permissive | valmsmith39a/u-p2-trivia-api | 061f9fd216bb93f58a83b20413dcaacbf0f36239 | 0c4a66a97af13b76a55bac6e210566f1258ea9ba | refs/heads/main | 2023-07-16T02:40:42.623996 | 2021-08-28T22:41:46 | 2021-08-28T22:41:46 | 380,091,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,495 | py | """
@TODO: DONE: Set up CORS. Allow '*' for origins. Delete the sample route after completing the TODOs
"""
"""
@TODO: DONE: Use the after_request decorator to set Access-Control-Allow
"""
"""
@TODO: DONE
Create an endpoint to handle GET requests
for all available categories.
"""
"""
@TODO: DONE
Create an... | [
"valmsmith39a@gmail.com"
] | valmsmith39a@gmail.com |
555460ca29e841d4a013d93d658324dae5e47e2a | 4d2238210813c1581bf44f64d8a63196f75d2df4 | /getspecialpath.py | 3c73e511700aad0decdddd01f448faddafea15e9 | [] | no_license | wwtang/code02 | b1600d34907404c81fa523cfdaa74db0021b8bb3 | 9f03dda7b339d8c310c8a735fc4f6d795b153801 | refs/heads/master | 2020-12-24T14:10:33.738734 | 2012-12-14T04:24:47 | 2012-12-14T04:24:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | # LAB(begin solution)
def get_special_paths(dirname):
"""Given a dirname, returns a list of all its special files."""
result = []
paths = os.listdir(dirname) # list of paths in that dir
for fname in paths:
match = re.search(r'__(\w+)__', fname)
if match:
result.append(os.path.abspath(os.path.join... | [
"andytang1994@gmail.com"
] | andytang1994@gmail.com |
9a2eecac8235d57fb18fba8bf51a48013a539f4d | f68732bc40a7a90c3a1082e4b3a4154518acafbb | /script/dbus/sessionBus/daemonLauncher/010_requestRemoveFromDesktop_01.py | 970c505fbf5f8c7eb2441038c3f4030b30cfba08 | [] | no_license | lizhouquan1017/dbus_demo | 94238a2307e44dabde9f4a4dd0cf8ec217260867 | af8442845e722b258a095e9a1afec9dddfb175bf | refs/heads/master | 2023-02-11T19:46:27.884936 | 2021-01-08T05:27:18 | 2021-01-08T05:27:18 | 327,162,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,232 | py | # -*- coding: utf-8 -*-
# ***************************************************
# @Test Case ID: 010_requestRemoveFromDesktop_01
# @Test Description: 请求将指定id的程序桌面图标删除
# @Test Condition: 桌面图标不存在桌面
# @Test Step: 1.清除应用程序桌面图标
# 2.调用RequestRemoveFromDesktop接口,请求将指定id的... | [
"lizhouquan@uniontech.com"
] | lizhouquan@uniontech.com |
e176c56fefcc0010af610eee90e483989a3c41ca | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/cogdominium/CogdoLevelMgr.py | 92a534dd21bec6683b43174708b853632a575be3 | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 174 | py | from otp.level import LevelMgr
from direct.showbase.PythonUtil import Functor
from toontown.toonbase import ToontownGlobals
class CogdoLevelMgr(LevelMgr.LevelMgr):
pass
| [
"jwcotejr@gmail.com"
] | jwcotejr@gmail.com |
eb86b016fc192ce35a1af4257388a6a1699682b9 | d58f26ef4bfacc50d32306f27ea9628214aa53aa | /panoptes_aggregation/tests/extractor_tests/test_survey_extractor.py | 0f35fc2c2c8c2e1ac6fe86d1d4946c98f49bcb26 | [] | no_license | miclaraia/python-reducers-for-caesar | 893073ce1551d953d82a59bd87dea3deffe5e6ae | f1e28992ae73e131fb400d4b400fdf8d4d597828 | refs/heads/master | 2021-01-01T18:51:04.763162 | 2017-07-25T14:04:06 | 2017-07-25T14:04:06 | 98,448,810 | 0 | 0 | null | 2017-07-26T18:01:03 | 2017-07-26T17:30:17 | Python | UTF-8 | Python | false | false | 1,955 | py | import unittest
import json
import flask
from panoptes_aggregation import extractors
class TestSurveyExtractor(unittest.TestCase):
def setUp(self):
self.classification = {
'annotations': [{
'task': 'T0',
'value': [
{
'... | [
"coleman.krawczyk@gmail.com"
] | coleman.krawczyk@gmail.com |
50394fff8cb70405e3d6a9d2739f994d49fa25ba | 37edb81c3fb3dfc09d14bb228e5f8df610d21c50 | /source/_static/lecture_specific/mccall/mccall_resw_c.py | 1cf5709382e34082f3a31af6fd0fc53a6fe3ee7f | [
"BSD-3-Clause"
] | permissive | bktaha/lecture-python | 68cb003640323d8600b1396898f2fb383b417769 | b13db12120b977d1c661c9a68c5b8ddfc1b6dc89 | refs/heads/master | 2022-11-02T23:05:32.647316 | 2020-06-09T09:15:18 | 2020-06-09T09:15:18 | 272,172,927 | 0 | 0 | BSD-3-Clause | 2020-06-14T09:44:53 | 2020-06-14T09:44:52 | null | UTF-8 | Python | false | false | 535 | py | grid_size = 25
c_vals = np.linspace(2, 12, grid_size) # values of unemployment compensation
w_bar_vals = np.empty_like(c_vals)
mcm = McCallModel()
fig, ax = plt.subplots(figsize=(10, 6))
for i, c in enumerate(c_vals):
mcm.c = c
w_bar = compute_reservation_wage(mcm)
w_bar_vals[i] = w_bar
ax.set_xlabel... | [
"mamckay@gmail.com"
] | mamckay@gmail.com |
30eee56cb38f4efbea3d3964f8dd219c0e33b62f | 4c38cf22642d01720b41b0700b17c481da47ac1c | /实战项目/家用电器用户行为分析与事件识别/阈值寻优模型.py | 99f676399cef2aa5ccd7d503f9f034cfcf8c4d3a | [] | no_license | fwmmmrm/DataMining-2 | ff2e2d75e32e54e629accc6209c23604637c6afb | c20431d90264d84fcee9ddc1dd2d71db16b36632 | refs/heads/master | 2023-02-03T12:53:01.006916 | 2020-12-19T06:26:51 | 2020-12-19T06:26:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | # -*- coding: utf-8 -*-
"""
在1-9分钟进行阈值寻优
"""
import numpy as np
import pandas as pd
def event_num(ts):
'''
得到事件数目
:param ts:
:return:
'''
d = data[u'发生时间'].diff() > ts
return d.sum() + 1
if __name__ == '__main__':
inputfile = 'data/water_heater.xls'
# 使用以后四个点的平均斜率
n = 4
t... | [
"1695735420@qq.com"
] | 1695735420@qq.com |
3632c60cac2a105337f609999d00fbcb845ae306 | 33836016ea99776d31f7ad8f2140c39f7b43b5fe | /fip_collab/2015_03_25_alpha_Ti_composite_7th/main008.py | 15496dbf4af81557e35e3ca2f7ead381096d4b64 | [] | no_license | earthexploration/MKS-Experimentation | 92a2aea83e041bfe741048d662d28ff593077551 | 9b9ff3b468767b235e7c4884b0ed56c127328a5f | refs/heads/master | 2023-03-17T23:11:11.313693 | 2017-04-24T19:24:35 | 2017-04-24T19:24:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,110 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 17 16:46:35 2014
@author: nhpnp3
"""
import time
import fegrab
import microstructure_function as msf
import validation_viz
import results
import calibration
# import matplotlib.pyplot as plt
Hi = 2 # number of distinct local states in microstructure
order = 1 # choose... | [
"noahhpaulson@gmail.com"
] | noahhpaulson@gmail.com |
edfc5ecf4e08ebc51d70cccfa64033266fcd94d5 | f00ae2cb4709539e8a78247678d9bb51913e0373 | /oacids/exported/ifaces.py | 6291040a82a66812250500bc05295488b82dd8c9 | [
"MIT"
] | permissive | openaps/oacids | 576351d34d51c62492fc0ed8be5e786273f27aee | ed8d6414171f45ac0c33636b5b00013e462e89fb | refs/heads/master | 2021-01-10T06:03:53.395357 | 2016-03-21T04:02:47 | 2016-03-21T04:02:47 | 51,559,470 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 390 | py |
# BUS='org.openaps.oacids'
BUS='org.openaps'
IFACE='org.openaps.Service'
ObjectManager = 'org.freedesktop.DBus.ObjectManager'
PATH_BASE='/org/openaps'
PATH='/org/openaps/Services'
ManagerPath = PATH
INTROSPECTABLE_IFACE='org.freedesktop.DBus.Introspectable'
# class WithProperties (dbus.service.Object):
TRIGGER_IF... | [
"bewest@gmail.com"
] | bewest@gmail.com |
76974675ed4f3f5348441293a1ee00f825fc5953 | 7173978a10fc738ef6ee1d7c63e608da9a715d19 | /keyboards/inline/category_industrial_buttons.py | 2b046d54afb57b03c1337c4e5267bdcfa52dec6b | [] | no_license | stillnurs/telegram_bot | 80498de7489a3d99f0288f4c96ffe0b5a6ece937 | e7c3cd84f78d24484703c95e9d596ac682ef10a5 | refs/heads/master | 2023-02-09T19:54:08.919475 | 2020-12-28T19:43:44 | 2020-12-28T19:43:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 281 | py | from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
category_industrial_choice = InlineKeyboardMarkup(inline_keyboard=[
[
InlineKeyboardButton(text="Общие вопросы",
callback_data="about_industrial")
]
],
)
| [
"noorsultan.mamataliev@gmail.com"
] | noorsultan.mamataliev@gmail.com |
9d983f524780487331f1a5a8f745b286f2a278df | 1531345172f997e42b861ddd2063d7e357a3b4f2 | /python/tf_idf_demo.py | 58cd7d7e88c95d87ddc076d432d50f3384af59dd | [] | no_license | claralinanda/MIS3545-Spring2017 | 5c83e671b19cc75857fcbfb941adb88272953c60 | 8b097453558f9a5c2c5c11ada7d98423dfa24254 | refs/heads/master | 2021-01-19T11:54:06.392757 | 2017-04-03T14:05:23 | 2017-04-03T14:05:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,724 | py | from math import log
def tf(term, doc, normalize=True):
doc = doc.lower().split()
if normalize:
return doc.count(term.lower()) / float(len(doc))
else:
return doc.count(term.lower()) / 1.0
def idf(term, corpus):
num_texts_with_term = len([True for text in corpus if term.lower()
... | [
"zli@babson.edu"
] | zli@babson.edu |
f48b108217790987b181bc014327e857ca7cc522 | 3c6b0521eb788dc5e54e46370373e37eab4a164b | /FlowScore/eval_single.py | cda6c141996523b2197a00407f922861a8825b8d | [] | no_license | y12uc231/DialEvalMetrics | 7402f883390b94854f5d5ae142f700a697d7a21c | f27d717cfb02b08ffd774e60faa6b319a766ae77 | refs/heads/main | 2023-09-02T21:56:07.232363 | 2021-11-08T21:25:24 | 2021-11-08T21:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 849 | py | from flow_score import *
import numpy as n
import argparse
import json
def parse_args():
parser = argparse.ArgumentParser(description='')
parser.add_argument('--eval_data', type=str, default=None)
parser.add_argument('--output', type=str)
args = parser.parse_args()
return args
def main(args):... | [
"yitingye@cs.cmu.edu"
] | yitingye@cs.cmu.edu |
f2f4abba432d2c0b97599ad83d7485f8c0eb3203 | 9088d49a7716bdfc9b5770e8e54ebf7be6958fcf | /09 - Repetition structure while/Des_059.py | a745d5bba64cfbc51c17879a26b37f1a9b2d9a9e | [
"MIT"
] | permissive | o-Ian/Practice-Python | 579e8ff5a63a2e7efa7388bf2d866bb1b11bdfe2 | 1e4b2d0788e70006096a53a7cf038db3148ba4b7 | refs/heads/main | 2023-05-02T02:21:48.459725 | 2021-05-18T18:46:06 | 2021-05-18T18:46:06 | 360,925,568 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py | from time import sleep
n = 0
while n != 5:
n1 = int(input('Digite um número inteiro: '))
n2 = int(input('Digite outro número inteiro: '))
print('=-' * 25)
print('Digite [1] para somar \nDigite [2] para multiplicar\nDigite [3] para saber qual número é o maior\n'
'Digite [4] para digitar novos n... | [
"ianstigli@hotmail.com"
] | ianstigli@hotmail.com |
05f23b2d032c3d8618084d240d489fbcc40895b0 | b69b6a68a7bd7cfa274cbbe27c185be32eba7b54 | /rpc_start/go_json_rpc_client.py | e17222899d551985f37d07640b271ca208d3f91f | [] | no_license | ZhiyuSun/code-kingdom | 3f4d2c023ffdc2a18523c3144bb7271b9835f3ba | 318c292dec5a43de1131a171678a6874613bc087 | refs/heads/master | 2021-06-23T20:29:03.682412 | 2021-06-14T08:52:41 | 2021-06-14T08:52:41 | 201,889,194 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | import json
import socket
# request = {
# "id":0,
# "params":["sunzhiyu"],
# "method": "HelloService.Hello"
# }
#
# client = socket.create_connection(("localhost", 2222))
# client.sendall(json.dumps(request).encode())
#
# #获取服务器返回的数据
# rsp = client.recv(1024)
# rsp = json.loads(rsp.decode())
#
# print(rsp[... | [
"zcgyxlgy@sina.com"
] | zcgyxlgy@sina.com |
95dc9559d334108df8bfa5d29c11957bbcfcf14a | 7b13e6acb2a1f26936462ed795ee4508b4088042 | /算法题目/算法题目/剑指offer/题15二进制中1的个数.py | 8b9f4af0a2c3eeefc3b9e876e3e82af26d04cedf | [] | no_license | guojia60180/algorithm | ed2b0fd63108f30cd596390e64ae659666d1c2c6 | ea81ff2722c7c350be5e1f0cd6d4290d366f2988 | refs/heads/master | 2020-04-19T08:25:55.110548 | 2019-05-13T13:29:39 | 2019-05-13T13:29:39 | 168,076,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | #Author guo
# -*- coding:utf-8 -*-
class Solution:
def NumberOf1(self, n):
# write code here
count = 0
if n<0:
n=n&0xffffffff
while n:
count += 1
n = (n - 1) & n
return count
def Numberof2(self,n):
if n<0:
s=bin(n&0... | [
"44565715+guojia60180@users.noreply.github.com"
] | 44565715+guojia60180@users.noreply.github.com |
b010ac476488c1ddac5a903d34b68d757fd309a7 | 8cb8bfd2dae516612251039e0632173ea1ea4c8a | /modules/contact/triggers.py | baf79680e6675358cf535d3c8d1db77215c8a039 | [] | no_license | nyzsirt/lift-prod | 563cc70700d26a5812a1bce0bd9795998dce6e99 | 9a5f28e49ad5e80e422a5d5efee77a2d0247aa2b | refs/heads/master | 2020-04-22T01:05:42.262876 | 2019-02-09T13:31:15 | 2019-02-09T13:31:15 | 170,003,361 | 1 | 0 | null | 2019-02-10T17:11:50 | 2019-02-10T17:11:50 | null | UTF-8 | Python | false | false | 361 | py |
class ContactTrigger:
@classmethod
def pre_save(cls, sender, document, **kwargs):
names = []
if document.name or document.surname:
if document.name:
names.append(document.name)
if document.surname:
names.append(document.surname)
... | [
"mutlu.erdem@soft-nec.com"
] | mutlu.erdem@soft-nec.com |
270cf00b72424c4ab5ef2e7ed3870a0b805ced8e | 60a831fb3c92a9d2a2b52ff7f5a0f665d4692a24 | /IronPythonStubs/release/stubs.min/System/Diagnostics/__init___parts/DebuggerBrowsableState.py | 7599756d739f37be9fff917e09f66f45fd9f7b82 | [
"MIT"
] | permissive | shnlmn/Rhino-Grasshopper-Scripts | a9411098c5d1bbc55feb782def565d535b27b709 | 0e43c3c1d09fb12cdbd86a3c4e2ba49982e0f823 | refs/heads/master | 2020-04-10T18:59:43.518140 | 2020-04-08T02:49:07 | 2020-04-08T02:49:07 | 161,219,695 | 11 | 2 | null | null | null | null | UTF-8 | Python | false | false | 963 | py | class DebuggerBrowsableState(Enum,IComparable,IFormattable,IConvertible):
"""
Provides display instructions for the debugger.
enum DebuggerBrowsableState,values: Collapsed (2),Never (0),RootHidden (3)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
... | [
"magnetscoil@gmail.com"
] | magnetscoil@gmail.com |
799b4aaf7edaef6728d0dd5d5676703185f9f2f5 | 07131e91dcf2529e9c7058f8a8f239d419c8f7e0 | /1450.number-of-students-doing-homework-at-a-given-time.py | c9ff2ab40bfb09aa40ca1baf90d6766f217d4c97 | [] | no_license | Code-Wen/LeetCode_Notes | 5194c5c5306cb9f4a0fac85e06fefe6c02d65d44 | 791fc1b43beef89d668788de6d12f5c643431b8f | refs/heads/master | 2021-07-04T14:41:00.830723 | 2020-09-27T16:31:22 | 2020-09-27T16:31:22 | 178,456,323 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,163 | py | #
# @lc app=leetcode id=1450 lang=python3
#
# [1450] Number of Students Doing Homework at a Given Time
#
# https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/description/
#
# algorithms
# Easy (82.11%)
# Likes: 55
# Dislikes: 14
# Total Accepted: 13.4K
# Total Submissions: 16.3K
# Tes... | [
"chenxu.wen.math@gmail.com"
] | chenxu.wen.math@gmail.com |
19cd2e3f1b9fb6e63d4dc44321ba9996e824be86 | 4236d2613e2a4f9aaf87cb9f400a63d6254aebb6 | /app/teacher/homework/test_cases/test003_home_item_list.py | 8f069373c235c2cda1b44e392f337aed518b65bb | [] | no_license | MerdLead/test_andriod_app | 3a79efb01a5185bf4e35c259ca0236afa8ec4214 | 7eac7a68eaf1bd77a4c78b5f1e1c311ea888f529 | refs/heads/master | 2020-03-30T07:25:14.285758 | 2018-09-30T06:42:35 | 2018-09-30T06:42:35 | 150,938,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,809 | py | #!/usr/bin/env python
import unittest
from app.teacher.homework.object_page.release_hw_page import ReleasePage
from app.teacher.login.object_page.home_page import ThomePage
from app.teacher.login.object_page.login_page import TloginPage
from app.teacher.homework.object_page.homework_detail_page import HwDetailPage
fro... | [
"merdlead@163.com"
] | merdlead@163.com |
4793099a4c76af4e4083bf262be99aa6c059769e | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /get_important_work.py | 15db59ad1383646a2662973fea34080ba0a76d6d | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py |
#! /usr/bin/env python
def man(str_arg):
try_thing(str_arg)
print('ask_week_by_great_week')
def try_thing(str_arg):
print(str_arg)
if __name__ == '__main__':
man('week')
| [
"jingkaitang@gmail.com"
] | jingkaitang@gmail.com |
7b02309bae0bf6468085e6e3fbfe3cb4bdb6e5e9 | d6791a60af5570dbf925b26f3b9ec7608a47fbeb | /setup.py | 611dca753801f3fb6854624ad7a27c02aec9e99c | [] | no_license | ammubhave/sqlalchemy-simql | e9c2e45d5629087b1be96be58118b362b42725c6 | 4e9947a49502355e65d30eec64b1e86af0428287 | refs/heads/master | 2020-05-17T22:28:22.030723 | 2014-07-15T14:41:44 | 2014-07-15T14:41:44 | 21,827,961 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | #!/usr/bin/env python
from setuptools import setup
setup(
author='Amol Bhave',
author_email='ambhave' '@' 'mit.edu',
description='SQLAlchemy extension for SimQL',
entry_points="""
[sqlalchemy.dialects]
simql = sqlalchemy_simql.dialect:SimqlDialect
""",
install_requires=[
'SQLA... | [
"ammubhave@gmail.com"
] | ammubhave@gmail.com |
dc2b1eb5e5daa541ad0ab6f159afdcfccb90587c | 11692a0e0b784252dea9ce5c2d97297d890ab520 | /arquivos-py/CursoEmVideo_Python3_DESAFIOS/desafio06.py | 7abbef956bcec92837a5f7e19dd35bfce23beca3 | [
"MIT"
] | permissive | oliveiralecca/cursoemvideo-python3 | bcd6dde54e26702f964e002221dda36c6eb8fd9f | e0a3e27d73a49ce0e72ae4faa9ac0c6da9811d2e | refs/heads/master | 2023-03-31T07:21:34.739162 | 2021-03-29T00:38:42 | 2021-03-29T00:38:42 | 271,679,170 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | print('======= DESAFIO 06 =======')
n = int(input('Digite um número: '))
d = n * 2
t = n * 3
rq = n ** (1/2) # ou: pow(n,(1/2))
print('Dobro: {}\nTriplo: {}\nRaiz Quadrada: {:.2f}'.format(d, t, rq))
| [
"oliveiraslc@yahoo.com.br"
] | oliveiraslc@yahoo.com.br |
2cecbfd5cadee6e7d888a5e28743114b68e47a97 | e1e5ffef1eeadd886651c7eaa814f7da1d2ade0a | /Systest/tests/acl/ACL_FUN_002.py | 460f887024066ecc12d883efdf8e0848b3fe6b7c | [] | no_license | muttu2244/MyPython | 1ddf1958e5a3514f9605d1f83c0930b24b856391 | 984ca763feae49a44c271342dbc15fde935174cf | refs/heads/master | 2021-06-09T02:21:09.801103 | 2017-10-10T07:30:04 | 2017-10-10T07:30:04 | 13,803,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,009 | py | #!/usr/bin/env python2.5
"""
#######################################################################
#
# Copyright (c) Stoke, Inc.
# All Rights Reserved.
#
# This code is confidential and proprietary to Stoke, Inc. and may only
# be used under a license from Stoke.
#
####################################################... | [
"muttu2244@yahoo.com"
] | muttu2244@yahoo.com |
df67d820d16d861532c29149ce9e341f4afbc2f8 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/192c0dc9d16458255102ce13d1707d8285defe12-<_construct_url_3>-bug.py | bc88419c2462fff4e03343f512cece7788534609 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,779 | py | def _construct_url_3(self, root, parent, obj, child_includes):
'\n This method is used by get_url when the object is the third-level class.\n '
root_rn = root['aci_rn']
root_obj = root['module_object']
parent_class = parent['aci_class']
parent_rn = parent['aci_rn']
parent_filter = ... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
5bd7c7213bc5d8d57013a4f313bf573a5ed1efca | 3d31d1ebeac4586a455c08d551e81e5596f4a8c4 | /dev/06_21_2018/UPS_Error.py | 34ccb3e8a9a17add7d24bebf44b7e78b6d4fa47d | [
"Python-2.0"
] | permissive | npwebste/UPS_Controller | 0ff9670abd6f4ff5d4f3a5ec3003e4f4ddfcf148 | a90ce2229108197fd48f956310ae2929e0fa5d9a | refs/heads/master | 2021-05-10T10:00:03.186490 | 2018-08-04T23:37:16 | 2018-08-04T23:37:16 | 118,942,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,599 | py | # Universal Power Supply Controller
# USAID Middle East Water Security Initiative
#
# Developed by: Nathan Webster
# Primary Investigator: Nathan Johnson
#
# Version History (mm_dd_yyyy)
# 1.00 03_24_2018_NW
#
######################################################
def UPS_Error(ErrorCode):
if (ErrorCode == 'Error... | [
"30417327+npwebste@users.noreply.github.com"
] | 30417327+npwebste@users.noreply.github.com |
d320b73bc06a0e30403bc1b844e6b62680e3ca62 | d8b1a010bec02de76f179e0d3df113903d91db71 | /TRP_api/TRP_api/urls.py | 055e259fb94ae21368deb72c31aa206e3420ccdd | [] | no_license | vineetkashyap/api12may | 2e933815972bf24cd7ff5efe6800e5fe70122cb1 | 29c1b6fa9c55c900a2bdd1175e0e74a5113fdbdd | refs/heads/master | 2023-05-01T16:54:09.949319 | 2021-05-16T09:37:15 | 2021-05-16T09:37:15 | 366,686,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,606 | py | from django.contrib import admin
from django.urls import path,include
from api import views
from django.conf.urls.static import static
from django.conf import settings
from rest_framework.authtoken.views import obtain_auth_token
from knox import views as knox_views
from rest_framework.routers import DefaultRouter
route... | [
"vkvineet66@gmail.com"
] | vkvineet66@gmail.com |
41306b320939acb879a6f70f56bcdaf86f2f1648 | 47eb0bcfee356f35a607e4a31b150662d6b0f0bb | /app/shop/admin.py | d2afdb3bb984e827e90b5209645446251a790204 | [] | no_license | HyungtaeMoon/IAMPORT-ShoppingMall | 955183f2ea2a573737bc236940457733b1ead659 | 2c19290380e1c739df31583a9c55bb9d719c6af8 | refs/heads/master | 2022-12-09T14:15:48.563197 | 2019-03-22T13:02:35 | 2019-03-22T13:02:35 | 154,930,700 | 0 | 0 | null | 2022-07-29T22:51:19 | 2018-10-27T05:47:04 | Python | UTF-8 | Python | false | false | 1,637 | py | from django.contrib import admin
from django.utils.safestring import mark_safe
from .models import Item, Order
@admin.register(Item)
class ItemAdmin(admin.ModelAdmin):
list_display = ['photo_tag', 'name', 'amount']
def photo_tag(self, item):
if item.photo:
return mark_safe('<img src={} s... | [
"blessmht@gmail.com"
] | blessmht@gmail.com |
2649375b6ae17e806f70ee2bf3a16d2a3073137b | bc91d344ed2ee3f4f93547ec16350f2713e5f704 | /.history/CRUD/views_20190108015459.py | 2867d966ebaada4cf94ef22ab56fdacbeb9fdf8a | [] | no_license | SabitDeepto/Chitra | 10ecf0c4a7588234f0a50adf038783c9ce8706d0 | 160e5d64c8e4ee56a95bb639386785590160ff07 | refs/heads/master | 2020-04-27T21:55:09.685341 | 2019-03-09T16:14:35 | 2019-03-09T16:14:35 | 174,716,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | from django.shortcuts import render
from urllib3 import request
from CRUD.models import Executive
# Create your views here.
def home(request):
executive = Executive.objects.all()
templates = 'index.html'
context = {
'name': 'deepto',
'ex':executive
}
return render(request, template... | [
"deepto69@gmail.com"
] | deepto69@gmail.com |
901c1ff1b89ae7d1354864bb1bf830a4d212d44a | e71b6d14fbdbc57c7234ca45a47329d7d02fc6f7 | /flask_api/venv/lib/python3.7/site-packages/vsts/gallery/v4_1/models/answers.py | edb392c5bc4c0196922c3ebb9c193159982a3ed4 | [] | no_license | u-blavins/secret_sasquatch_society | c36993c738ab29a6a4879bfbeb78a5803f4f2a57 | 0214eadcdfa9b40254e331a6617c50b422212f4c | refs/heads/master | 2020-08-14T00:39:52.948272 | 2020-01-22T13:54:58 | 2020-01-22T13:54:58 | 215,058,646 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | [
"usama.blavins1@gmail.com"
] | usama.blavins1@gmail.com |
823d055c9fbcc5df091127861acf22ab33ef3444 | 884249dc53b3e1a4461f44cc07f3c11b798a8bee | /tests/null/test_dropna.py | 9963ab1313220b26c0d86461aafd76144fe03e77 | [
"MIT"
] | permissive | MacHu-GWU/learn_pandas-project | b82ca64061c0afd2e470e0a7d17a8997981fd219 | 86d51d11d6f0a50ffcffbf743da197f4a7b12d61 | refs/heads/master | 2021-01-15T11:29:59.682659 | 2018-02-02T16:55:41 | 2018-02-02T16:55:41 | 99,621,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 778 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
import pandas as pd
from learn_pandas import assert_value_equal
def test_dropna():
data = [[1, 2, 3],
[None, 5, 6],
[7, 8, 9]]
df = pd.DataFrame(
data,
index=[1, 2, 3],
columns=list("ABC"),
)
r... | [
"MacHu-GWU@users.noreply.github.com"
] | MacHu-GWU@users.noreply.github.com |
4366e63b4ea98f08dfbfb6348ad3e918f1f35b63 | 080c13cd91a073457bd9eddc2a3d13fc2e0e56ae | /MY_REPOS/awesome-4-new-developers/tensorflow-master/tensorflow/python/keras/distribute/distributed_training_utils.py | d77ef72ddd8e104d640d119c9d5f06aca8845479 | [
"Apache-2.0"
] | permissive | Portfolio-Projects42/UsefulResourceRepo2.0 | 1dccc8961a09347f124d3ed7c27c6d73b9806189 | 75b1e23c757845b5f1894ebe53551a1cf759c6a3 | refs/heads/master | 2023-08-04T12:23:48.862451 | 2021-09-15T12:51:35 | 2021-09-15T12:51:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,556 | py | # Copyright 2018 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... | [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
6bd5a404f883d52e21e57ccb4185601a09c9c35c | ac4b9385b7ad2063ea51237fbd8d1b74baffd016 | /.history/utils/ocr/handle_image_20210209180144.py | 622b08919b45fce1289c8a8afa9b1bf7344a199b | [] | no_license | preethanpa/ssoemprep | 76297ef21b1d4893f1ac2f307f60ec72fc3e7c6f | ce37127845253c768d01aeae85e5d0d1ade64516 | refs/heads/main | 2023-03-09T00:15:55.130818 | 2021-02-20T06:54:58 | 2021-02-20T06:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,887 | py | import os
import cv2
import re
import numpy as np
from PIL import Image
import pytesseract
from pytesseract import Output
from fpdf import FPDF
import matplotlib.pyplot as plt
'''
IMAGE HANDLING METHODS
'''
# get grayscale image
def get_grayscale(image):
return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# blur re... | [
"{abhi@third-ray.com}"
] | {abhi@third-ray.com} |
3ae0a854793798036d9b002c8839bb944baf9a81 | 466912406272829982f75854cf0104c6ce8c9814 | /data/spider2/migrate/clean_beian_bywhois.py | 3638dc4f8cbceed4d78ca34670fd75b8d298adef | [] | no_license | logonmy/Codes | 9631fa103fc499663361fa7eeccd7cedb9bb08e4 | 92723efdeccfc193f9ee5d0ab77203c254f34bc2 | refs/heads/master | 2021-09-21T18:07:22.985184 | 2018-08-30T05:53:26 | 2018-08-30T05:53:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,125 | py | # -*- coding: utf-8 -*-
import os, sys
from pymongo import MongoClient
import pymongo
import time
import gevent
from gevent.event import Event
from gevent import monkey; monkey.patch_all()
reload(sys)
sys.setdefaultencoding("utf-8")
sys.path.append(os.path.join(os.path.split(os.path.realpath(__file__))[0], '../../util... | [
"hush_guo@163.com"
] | hush_guo@163.com |
0d39a0a246d72d162c9cd1e2203c2e8a6e26f448 | cfeb96d00a07cf3a5743a44fcef546aceeae3d3a | /309-BestTimetoBuyandSellStockwithCooldown.py | bc02e67e339e2e08644f56958e4aba5d681b2afe | [] | no_license | minseoch/algorithm | d5218b6187129e68aa355ce6cc89a3496e0f654c | 4c0cfe857f5d78a44c1a3bfb2571d72da4911d97 | refs/heads/master | 2023-03-04T02:10:02.344708 | 2021-01-30T04:44:28 | 2021-01-30T04:44:28 | 296,403,602 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,338 | py | # 309. Best Time to Buy and Sell Stock with Cooldown
# buy-sell-cooldown
# You must sell the stock before you buy again
# After you sell your stock, you cannot buy stock on next day
class Solution:
# time O(n^2), space O(n)
def maxProfit(self, prices):
length = len(prices)
maxP = [0] * (length+2)... | [
"minseo@Minseos-iMac.local"
] | minseo@Minseos-iMac.local |
9be27768994baa40fb29747a6e6ef408b6c00d8c | b69eefcef9398cff6b00f4531736d6f391743481 | /project/settings.py | 0a9d67dad4fbcd510882739617577bbbf7afdec7 | [] | no_license | cjdd3b/j4462-project-template | c47981500c11573acdd5bf240f25aca95184d5de | 35720f9c5ea2d5dc147811af80c113f058c03496 | refs/heads/master | 2016-09-05T17:42:44.186628 | 2013-04-06T18:26:25 | 2013-04-06T18:26:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,384 | py | import os
import django
# CHASE NOTE: These are a few settings that I put into EVERY SINGLE DJANGO PROJECT that I build. You don't
# need to know how they work; the only thing you need to know is that they will make your life INFINITELY
# EASIER. In fact, I would recommend copying them into your new projects when you ... | [
"chase.davis@gmail.com"
] | chase.davis@gmail.com |
75a5a25eea6bd1dcd30b17c4004f07a9d932559a | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2218/60751/271705.py | b7a6a56ab100877eae272baec1913325326980fa | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | num=input().split(",")
num_=[]
for i in num:
num_.append(int(i))
num_.sort()
print(max(num_[0]*num_[1]*num_[-1],num_[-1]*num_[-2]*num_[-3])) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
6e73aba4d4c121fa20b2d8c1cb4e084034e71658 | 047f45abbdb6e38e36c2c9c920d1e9a7a5702040 | /src/simulations/id_mapper_client.py | 8fda3b72f8359de4989b74db633f47081cacd9d0 | [
"Apache-2.0"
] | permissive | DD-DeCaF/simulations | 4076da1bfd887869ca8c950f4352d632bbfc4fc3 | dab77166f301c0a12e6fed973147fb4add8a62c4 | refs/heads/devel | 2023-01-23T11:32:11.031122 | 2020-05-29T16:46:08 | 2020-05-29T16:46:08 | 73,704,410 | 0 | 2 | Apache-2.0 | 2020-12-08T14:29:46 | 2016-11-14T12:53:53 | Python | UTF-8 | Python | false | false | 1,723 | py | # Copyright 2018 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requir... | [
"ali@kvikshaug.no"
] | ali@kvikshaug.no |
90487f0a3d2431a0d2349c1cf70844a83efb30db | 683a90831bb591526c6786e5f8c4a2b34852cf99 | /HackerRank/Python/Strings/2_String_split_and_join.py | 6cfd65612058b1056b5f246af8f8a8e6cf35edc7 | [] | no_license | dbetm/cp-history | 32a3ee0b19236a759ce0a6b9ba1b72ceb56b194d | 0ceeba631525c4776c21d547e5ab101f10c4fe70 | refs/heads/main | 2023-04-29T19:36:31.180763 | 2023-04-15T18:03:19 | 2023-04-15T18:03:19 | 164,786,056 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | # !/usr/bin/env python3
# https://www.hackerrank.com/challenges/python-string-split-and-join/problem
# tags: cadenas
def split_and_join(str):
lista = str.split(" ")
str = "-".join(lista)
return str
if __name__ == '__main__':
line = input()
result = split_and_join(line)
print(result)
| [
"davbetm@gmail.com"
] | davbetm@gmail.com |
4840c3f91c339b220ffb6aad5c14d810d3ee6ff7 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/galex_j22163-2157/sdB_galex_j22163-2157_coadd.py | e9b5611ae5b1a826b06a0b20d0720c3ed879a03f | [] | 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 | 455 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[334.098125,-21.957308], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_galex_j22163-2157/sdB_galex_j22163-2157_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTC... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
a79f048e280ae3dc1c915f26311e81ccf38b9449 | d2dda11e125068512c5c0db0f24b80bc53c94ce3 | /LeetCode/Ex100/Ex110.py | 8d9d965bb2811d6d4ec769cdb289e6704ef5dcb4 | [] | no_license | JasonVann/CrackingCodingInterview | f90163bcd37e08f6a41525f9f95663d5f42dd8e6 | 8f9327a1879949f61b462cc6c82e00e7c27b8b07 | refs/heads/master | 2021-09-02T09:28:34.553704 | 2018-01-01T12:05:12 | 2018-01-01T12:05:12 | 110,519,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,844 | py |
class Ex110(object):
def isBalanced(self, root):
"""
:type root: TreeNode
:rtype: bool
"""
if root == None:
return True
(level, ans) = self.helper(root, 1)
return ans
def helper(self, root, level):
if root == None:
... | [
"jasonvanet@gmail.com"
] | jasonvanet@gmail.com |
e235cd6eadb51407845cd19a59fb52175c2ed1f0 | 070dc1e2c5643ef9ae80b24f56cf7b6624f65818 | /video_prediction/datasets/__init__.py | e65f64ab71a1ec5a63652990d7761430f7083e2e | [
"MIT"
] | permissive | anestisdotpy/video_prediction | 9091661e9d56460e6d1dab9e1e774a8ff81241bd | e9aecb8171123c1fe673a1f16864e3554c386cc5 | refs/heads/master | 2020-06-23T02:47:24.487425 | 2019-07-23T18:02:32 | 2019-07-23T18:02:32 | 198,482,843 | 0 | 0 | MIT | 2019-07-23T17:59:23 | 2019-07-23T17:59:22 | null | UTF-8 | Python | false | false | 1,099 | py | from .base_dataset import BaseVideoDataset
from .base_dataset import VideoDataset, SequenceExampleVideoDataset, VarLenFeatureVideoDataset
from .google_robot_dataset import GoogleRobotVideoDataset
from .sv2p_dataset import SV2PVideoDataset
from .softmotion_dataset import SoftmotionVideoDataset
from .kth_dataset import K... | [
"alexleegk@gmail.com"
] | alexleegk@gmail.com |
78221bbf47e616235915cfb1dc10c45637dc777a | bd741fe3909ae9260232b724cbb395823cf68834 | /python/setup.py | ba010859a7003260e868f6d6f749200202ce1755 | [
"MIT"
] | permissive | simondlevy/NengoCPP | a1b235dd37889c0cf8a2a2b3e6f693a27d379174 | ae09d4e96d866dd4a3748867cf8eb0df5d0acc8f | refs/heads/master | 2020-03-21T19:38:06.204688 | 2019-06-15T18:17:00 | 2019-06-15T18:17:00 | 138,961,016 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | #!/usr/bin/env python
'''
Python distutils setup for for NengoCPP example
Copyright 2018 Simon D. Levy
MIT License
'''
from distutils.core import setup
setup (name = 'nengo_pidcontrol',
version = '0.1',
install_requires = ['PIL'],
description = '',
py_modules = ['nengo_pidcontrol',],
author='Sim... | [
"simon.d.levy@gmail.com"
] | simon.d.levy@gmail.com |
51f2f9f4db7a0a374df9c157a737b8e90be9f0fe | 1f68b6f9f55afaa7cb32df262f4fe0864472da05 | /人工智能/人工智能入门/数据可视化/die_visual.py | 6c8f873b98271fc5d514ee8841c2c8b03fcd0baa | [] | no_license | faker-hong/testOne | 7c4496362cb5495c25c640076102fe0704f8552f | 768edc4a5526c8972fec66c6a71a38c0b24a1451 | refs/heads/master | 2022-12-04T14:47:53.614685 | 2020-10-30T03:17:50 | 2020-10-30T03:17:50 | 196,514,862 | 1 | 0 | null | 2022-11-22T02:43:32 | 2019-07-12T05:35:09 | Python | UTF-8 | Python | false | false | 498 | py | from 数据可视化.die import Die
import pygal
die = Die()
result = []
frequenices = []
for i in range(100):
re = die.roll()
result.append(re)
for value in range(1,die.num_size+1):
frequency = result.count(value)
frequenices.append(frequency)
print(frequenices)
#对结果进行可视化
hist = pygal.Bar()
hist.title='97'
... | [
"42666723+hongcheng97@users.noreply.github.com"
] | 42666723+hongcheng97@users.noreply.github.com |
91d6b6ddd88603208daece87feef4b07ccad2846 | 1408ac8b2ed54ec7a7a8e3660bbb7389fbade037 | /Auditions/AuditionLevel/AuditionLevel.py | baf76f63f292391175f556c99955d745aa9117b9 | [] | no_license | Decennium/CodeCombat | 72a2df7288c5d5c3cb88e08425cc0e6507f7a1d5 | 068b937ae7cfc58565f2c5e1f50281c50808ccf1 | refs/heads/master | 2021-08-23T19:37:53.160014 | 2017-12-06T07:52:19 | 2017-12-06T07:52:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,618 | py | # http://codecombat.com/play/level/audition-level
summonTypes = ['paladin']
def summonTroops():
type = summonTypes[len(hero.built) % len(summonTypes)]
if hero.gold > hero.costOf(type):
hero.summon(type)
def commandTroops():
for index, friend in enumerate(hero.findFriends()):
if friend.t... | [
"vadim-job-hg@yandex.ru"
] | vadim-job-hg@yandex.ru |
eb9beae6dd40e83e2260ddf0a7862e298b36fe3a | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/storagesync/v20170605preview/get_sync_group.py | f3f917cbf35db452cf5c6afd92530a503ff78d3f | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MisinformedDNA/pulumi-azure-native | 9cbd75306e9c8f92abc25be3f73c113cb93865e9 | de974fd984f7e98649951dbe80b4fc0603d03356 | refs/heads/master | 2023-03-24T22:02:03.842935 | 2021-03-08T21:16:19 | 2021-03-08T21:16:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,972 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | [
"noreply@github.com"
] | MisinformedDNA.noreply@github.com |
a28abb90239b0ec78dbdbbcb02137ed32a1ca25a | 6371acdb640e62e4e6addac2ba1aa70002a8c1b1 | /Algorithms/pySINDy/env/lib/python3.6/site-packages/ipyparallel/tests/test_mongodb.py | 81b2b171b88ba68c65515ad28880228e24bdef97 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | M-Vause/SEED | 263307152ebac1e4f49cd81dcd5207ecbdf51139 | cda94a02a5ef47a1e9a885d330eef2821301ebed | refs/heads/master | 2022-12-13T20:11:58.893994 | 2020-04-27T16:10:09 | 2020-04-27T16:10:09 | 252,790,026 | 3 | 3 | MIT | 2022-12-08T01:52:05 | 2020-04-03T16:55:10 | Jupyter Notebook | UTF-8 | Python | false | false | 1,395 | py | """Tests for mongodb backend"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
from unittest import TestCase
import pytest
from . import test_db
c = None
@pytest.fixture(scope='module')
def mongo_conn(request):
global c
try:
from pymo... | [
"58262117+M-Vause@users.noreply.github.com"
] | 58262117+M-Vause@users.noreply.github.com |
a4609ee7d40e60103c1c6d4a1f9cb1b4d861a532 | 45ba55b4fbdaf1657fde92beaeba4f173265afcd | /strawberry/fastapi/context.py | 6a23a0e648a9cb7d607eb89ef9083ac1c2b8e39a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | strawberry-graphql/strawberry | af96afd4edd1788c59e150597a12501fbc7bf444 | 6d86d1c08c1244e00535840d9d87925431bc6a1c | refs/heads/main | 2023-08-30T03:34:12.929874 | 2023-08-24T12:01:09 | 2023-08-24T12:01:09 | 162,690,887 | 3,408 | 529 | MIT | 2023-09-14T21:49:44 | 2018-12-21T08:56:55 | Python | UTF-8 | Python | false | false | 662 | py | from typing import Any, Dict, Optional, Union
from starlette.background import BackgroundTasks
from starlette.requests import Request
from starlette.responses import Response
from starlette.websockets import WebSocket
CustomContext = Union["BaseContext", Dict[str, Any]]
MergedContext = Union[
"BaseContext", Dict[... | [
"noreply@github.com"
] | strawberry-graphql.noreply@github.com |
d40d835030a9e00608bc1155ed3b3db4ca2779e6 | 033da72a51c76e5510a06be93229a547a538cf28 | /Data Engineer with Python Track/22. Transactions and Error Handling in SQL Server/Chapter/03. Transactions in SQL Server/10-Doomed transactions.py | 29523ae21c339f0d22cbec5dee2878d9afa29992 | [] | no_license | ikhwan1366/Datacamp | d5dcd40c1bfeb04248977014260936b1fb1d3065 | 7738614eaebec446842d89177ae2bc30ab0f2551 | refs/heads/master | 2023-03-06T13:41:06.522721 | 2021-02-17T22:41:54 | 2021-02-17T22:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | '''
Doomed transactions
You want to insert the data of two new customers into the customer table. You prepare a script controlling that if an error occurs, the transaction rollbacks and you get the message of the error. You want to control it using XACT_ABORT in combination with XACT_STATE.
Instructions
100 XP
- Us... | [
"surel.chandrapratama@gmail.com"
] | surel.chandrapratama@gmail.com |
cb33f242a73fc2923fcc835d8c1946a430e07cbc | 2136dd727f15133b2ee000dadcfa44b7e29d3ff4 | /Day5/dengluTest.py | 0572c98a88c15ab45b23d6226e2407d6d0ab4da9 | [] | no_license | zhaolanxiang113/Weekend112 | b6f56627a17d279db19ed6b409333d8c14c6bb67 | 74f3b54b246ff43a773c8b832fd9ab3af38fd509 | refs/heads/master | 2021-08-23T04:13:52.933570 | 2017-12-03T07:11:49 | 2017-12-03T07:11:49 | 112,907,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | import unittest
from selenium import webdriver
import time
class DengLuTest(unittest.TestCase):
# 3个双引号表示文档字符串,也是一种注释,会显示的文档中;
"""登录模块测试用例"""
def setUp(self):
# 打开浏览器
self.driver = webdriver.Chrome()
self.driver.implicitly_wait(30)
# 浏览器升级后,要注销最大化;要想使用必须满足浏览器的版本和driver的版本... | [
"51Testing"
] | 51Testing |
e5be76fbbcdcd5660d468cf6ecba45afdcd662ab | 750d8ade6abc2b3bd6a24e660a4992114db6ac0c | /lib/music/gui/window.py | de2e80e9ea32e5895ffd45bdfb2ec12e9216241b | [] | no_license | dskrypa/music_manager | 8a00a4bd7b32a87dab2441614c94346fa87c4f13 | ad7265fbd203962a4bf9cf6444c8e10d561a307c | refs/heads/main | 2023-08-09T06:26:46.592118 | 2023-08-08T11:38:08 | 2023-08-08T11:38:08 | 234,730,172 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,065 | py | """
Extended Window class from PySimpleGUI
:author: Doug Skrypa
"""
import logging
import signal
from typing import Callable
from weakref import WeakSet
from PySimpleGUI import Window as _Window
from .utils import FinishInitMixin
__all__ = ['Window']
log = logging.getLogger(__name__)
class Window(_Window):
_... | [
"dskrypa@gmail.com"
] | dskrypa@gmail.com |
ab8fca3ba9b9481bf76c0f4f3e210cfeb9dd2c62 | e42a61b7be7ec3412e5cea0ffe9f6e9f34d4bf8d | /a10sdk/core/slb/slb_health_stat_oper.py | d25b96bf06dca0d98f8468c55a6dbd2e3769db38 | [
"Apache-2.0"
] | permissive | amwelch/a10sdk-python | 4179565afdc76cdec3601c2715a79479b3225aef | 3e6d88c65bd1a2bf63917d14be58d782e06814e6 | refs/heads/master | 2021-01-20T23:17:07.270210 | 2015-08-13T17:53:23 | 2015-08-13T17:53:23 | 40,673,499 | 0 | 0 | null | 2015-08-13T17:51:35 | 2015-08-13T17:51:34 | null | UTF-8 | Python | false | false | 3,562 | py | from a10sdk.common.A10BaseClass import A10BaseClass
class HealthCheckList(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param status: {"type": "string", "format": "string"}
:param retries: {"type": "number", "format": "number"}
:param down_state: {"type": "num... | [
"doug@parksidesoftware.com"
] | doug@parksidesoftware.com |
36121fdf1958177b680c4adf4f0ba290b78f8c7d | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_135/1102.py | f45a308ef04109b1a46b0769d4274aa0069c4829 | [] | 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 | 813 | py | import numpy as np
import sys
#dat=open("small.in").readlines()
dat=open("A-small-attempt1.in").readlines()
ntests=int(dat[0])
i=1
for j in xrange(ntests):
ans0=int(dat[i].strip('\n'))
i=i+1
grid0=np.array([[int(y) for y in x.strip('\n').split(' ')] for x in dat[i:i+4]])
i=i+4
ans1=int(dat[i].strip('\n'))
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
b0cf7d3b3f1d9800be47e1905e36043ddd16474c | febcab8c3bbcccfcaa18d2168353a7897a35fe80 | /bliski_publikator/institutions/migrations/0006_institution_monitorings.py | 909ae2d96f0d4b90900aa9f003ddf6033efe5b69 | [
"MIT",
"BSD-3-Clause"
] | permissive | watchdogpolska/bliski_publikator | 256d6e4e24bb7ea9821c409b491dd24e70755082 | f67ec8edf16f803ceef1a1d1f5a2b4699117895c | refs/heads/master | 2020-12-25T17:00:27.555894 | 2018-08-13T20:02:51 | 2018-08-13T20:02:51 | 55,450,877 | 1 | 3 | MIT | 2018-08-13T20:02:52 | 2016-04-04T22:46:57 | Python | UTF-8 | Python | false | false | 632 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-09 00:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('monitorings', '0008_auto_20160509_0031'),
('institutions', '0005_remove_institution_m... | [
"naczelnik@jawnosc.tk"
] | naczelnik@jawnosc.tk |
0b9567943df58092230d0f1d716d86717c9d7c22 | aef9d6b8bb21957fa8b2235872bca51f64e7b5ff | /django101/todoapp/migrations/0001_initial.py | 0b50bc857d2c64737fe726df40e616c51bf93192 | [] | no_license | dreadlordow/Softuni-Python-Web | 3cf9cc234960bb47f1c3c2a91a1a80d0fc499fd6 | 784faccbe15023536917d610384222d839a63bae | refs/heads/master | 2023-08-28T19:39:57.149514 | 2021-02-23T16:28:55 | 2021-02-23T16:28:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 589 | py | # Generated by Django 3.1.5 on 2021-01-16 22:49
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Todo',
fields=[
('id', models.AutoField(aut... | [
"georgipavlov1913@gmail.com"
] | georgipavlov1913@gmail.com |
617d539ddc913989973f9e820c92c115d270af23 | a9e15e6bdaa45c9fdd667f5f58a537a44d5bd67c | /diy/4.py | 53349c084629084a5da41dc72bd7751b99e6f184 | [] | no_license | tawateer/leetcode | 782f4f8b4a0730ec990d3c5d0e3d80cc4792f0b3 | 0ec784dc1da2577b823977fd858f4d55a059f327 | refs/heads/master | 2020-04-22T03:31:02.668858 | 2019-10-25T09:20:31 | 2019-10-25T09:20:31 | 170,089,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | #!/bin/env python
# -*- coding:utf-8 -*-
"""
在 1 到 n 的数字中,有且只有唯一的一个数字 m 重复出现了,其它的数字都只出现一次。请把这个数字找出来、
"""
class Solution(object):
def findDuplicate(self, nums):
target = 0
for i in nums:
target ^= i
for i in range(1, len(nums)):
target ^= i
return target
... | [
"liningning@wandoujia.com"
] | liningning@wandoujia.com |
05449101e333cfaae259ede36d115e888e4a2ab9 | f20e3f75644ce8eb718c22ac9800e41aa4da90dc | /round C/wall.py | e3c88e8292dadbaeef7263246467efc199a96305 | [] | no_license | rocket3989/KickStart2020 | 7de504d88c00c86e1d394a797f01d2682826e4bf | 513c4e6305b31e16350715840e35903b3fcdd89a | refs/heads/master | 2021-04-13T02:38:44.703426 | 2020-09-28T21:02:25 | 2020-09-28T21:02:25 | 249,129,624 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,375 | py | from collections import defaultdict
for tc in range(int(input())):
R, C = [int(x) for x in input().split()]
wall = []
for i in range(R):
wall.append(input().strip())
above = defaultdict(set)
below = defaultdict(set)
for r in range(R):
for c in ran... | [
"rocket3989@gmail.com"
] | rocket3989@gmail.com |
91c9505ee1c1e349d16a2b7cac17bfa2367e0f21 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /mediastore-data_write_1/object_delete.py | dd3266bb35468f0cb8fd5427b86b4d182020811a | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,258 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_one_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/mediastore-data/delete-object.html
if __name__ =... | [
"hcseo77@gmail.com"
] | hcseo77@gmail.com |
2832aa7a7a0496dee9f4feb0edf79292b112e86f | 69a43560780342b466360687099eb593de9fec93 | /test.py | 830e69dedc40bbdfdb7df194d4a0d9b276daa0ba | [] | no_license | JamCrumpet/email_generator | e35f7f99654a189f0a6aff832ca6207df13b6a4e | bdb96cd4b02069bce5e1d6d2e70e0233ec7cd71c | refs/heads/master | 2023-01-10T02:06:44.579407 | 2020-11-10T13:38:55 | 2020-11-10T13:38:55 | 287,095,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,849 | py | #filename = "female_first_names.txt"
#with open(filename) as file_object:
# lines = file_object.readlines()
#for line in lines:
# print(line.split())
#with open(filename,"r") as file_object:
# """ Removes numbers and percentage symbol from text file """
# contents = file_object.read()
# prin... | [
"noreply@github.com"
] | JamCrumpet.noreply@github.com |
c14e4ab6c989ae7577fcc2e88f867fe373ad43d9 | 0528a8b2cbdcb3f64ce8183aa04fe8a515f5801a | /libcms/settings.py | 5afb31eeba5e5724f544de83f18866ed7edc06ea | [] | no_license | wd5/talk.arbicon | 52c17578eaeaaeab0ae620cf101b2b07eb63b9d9 | 12199997447c051612c84dcb2febcde2386fcbb6 | refs/heads/master | 2021-01-17T23:37:22.793853 | 2012-06-04T06:54:56 | 2012-06-04T06:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,786 | py | # -*- coding: utf-8 -*-
import os
import sys
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) + '/'
sys.path.insert(0, os.path.join(PROJECT_PATH, "apps"))
sys.path.insert(0, os.path.join(PROJECT_PATH, "vendors"))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
# Local time z... | [
"dostovalov@gmail.com"
] | dostovalov@gmail.com |
d3d91f91295649651652951a0785ed15a2a47eb0 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /kiX7WjSFeTmBYcEgK_1.py | 44b53df8479d2eca5cb4445ea4294227621ff84c | [] | 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 | 955 | py | """
Create a function that takes an integer list and return the biggest between
**positive** sum, **negative** sum, or **0s** count. The major is understood
as the greatest absolute.
`l = [1,2,3,4,0,0,-3,-2]`, the function has to return `10`, because:
* Positive sum = 1+2+3+4 = 10
* Negative sum = (-3)+(-2) = ... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
1e6a6bbec7aebbcf5b92eda2fb644ada06f33d6e | 9ee3ef54384da3e08ad367dfc2a350d487caf0ee | /home/migrations/0003_auto_20210101_1212.py | 27a829564276bb52f40673aa392b6a1d46f6915d | [] | no_license | crowdbotics-apps/test-app-for-segmen-17778 | c9cc0d1d5baffeb456e96a76c6ffdcfe642efeb8 | 9b012d3e3c018871b1a86fc4935bace98b962c79 | refs/heads/master | 2023-02-08T13:06:52.480483 | 2021-01-04T13:32:52 | 2021-01-04T13:32:52 | 325,950,256 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | # Generated by Django 2.2.17 on 2021-01-01 12:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("home", "0002_load_initial_data"),
]
operations = [
migrations.AddField(
model_name="homepage",
name="model_field_wi... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
3309039c811223dff99454e678e10f02a554f17c | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/159/64269/submittedfiles/testes.py | 2ada4d068b2b66630f6bf6f34567c3d2085f78ca | [] | 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 | 1,875 | py | # -*- coding: utf-8 -*-
import numpy as np
'''
'''
#Essa função tem como parametros os graus, minutos e segundos de um ângulo sexasimal e retorna o ângulo em decimais
def angulo(g,m,s):
angulom=m/60
angulos=s/3600
soma=g+angulom+angulos
return soma
'''
Essa função transforma ângulos decimais, c... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
2258e8bf2faf8c3ae5d63dac8669d6dd32476e7a | 9c19350ad4ab5e41d9bc6c627d623f0edd8325c5 | /aleph/tests/test_collections_api.py | f734c01585f2ae4014ad72f125f7748b1f3b18d9 | [
"MIT"
] | permissive | gavinrozzi/aleph | f515a70fa87d1f19fe7288a5ac0b398a71dabfd5 | a8e3d10ec34b0d0a05b4daf3fdd2d09b96928b35 | refs/heads/master | 2020-03-21T00:56:14.108536 | 2018-08-17T13:10:12 | 2018-08-17T13:10:12 | 137,916,214 | 0 | 0 | MIT | 2018-08-17T13:10:13 | 2018-06-19T16:15:29 | Python | UTF-8 | Python | false | false | 4,174 | py | import json
from aleph.core import db
from aleph.model import Entity
from aleph.tests.util import TestCase
class CollectionsApiTestCase(TestCase):
def setUp(self):
super(CollectionsApiTestCase, self).setUp()
self.rolex = self.create_user(foreign_id='user_3')
self.col = self.create_collec... | [
"friedrich@pudo.org"
] | friedrich@pudo.org |
af5920639862893c22731a5bd2fc1174a0685376 | 41b77a1a17244a727aa6acd95e91e8c674986049 | /leagueOfDrivers_BE/wx_league/migrations/0025_auto_20180812_0856.py | 11875c3038b5b09e6392b1b9a149f0bbd957fca7 | [] | no_license | DataSecretbase/Renjiu | 24424ca1742a3987a395bc5da54afa1e7f34fc84 | aa90d58d92d0c1936b0ee23e4f9c970135b480d5 | refs/heads/master | 2022-12-08T05:28:09.192623 | 2019-03-10T09:44:19 | 2019-03-10T09:44:19 | 140,274,553 | 1 | 2 | null | 2022-12-08T02:21:56 | 2018-07-09T11:15:07 | Python | UTF-8 | Python | false | false | 464 | py | # Generated by Django 2.1 on 2018-08-12 08:56
from django.db import migrations, models
import wx_league.models
class Migration(migrations.Migration):
dependencies = [
('wx_league', '0024_auto_20180812_0845'),
]
operations = [
migrations.AlterField(
model_name='icon',
... | [
"2144799613@qq.com"
] | 2144799613@qq.com |
39b5f1e225edc865f4828bc8ca4734edd479d6ce | 92f21431bb65074757b76ec41b2f5fa4b445c566 | /estomagordo-python3/day_6a.py | 3f718401f3d9615e5aaea6aabe160a5921626ca3 | [
"Apache-2.0"
] | permissive | kodsnack/advent_of_code_2019 | f45c6235ef7ddf8ee177be3069eddfb18b64d05c | b5478e4ce4a7cb223bbb61a8f7322f6e0f68684e | refs/heads/master | 2023-03-08T18:02:11.962777 | 2023-03-01T11:20:14 | 2023-03-01T11:20:14 | 223,724,445 | 9 | 53 | Apache-2.0 | 2023-03-01T11:20:15 | 2019-11-24T10:08:42 | Python | UTF-8 | Python | false | false | 624 | py | import helpers
import re
from heapq import heappop, heappush
from collections import Counter, defaultdict
def solve(d):
graph = {}
for line in d:
a, b = line.split(')')
graph[b] = a
if a not in graph:
graph[a] = 'STOP'
count = 0
for node in graph.keys():
... | [
"christofer.ohlsson@gmail.com"
] | christofer.ohlsson@gmail.com |
59a171100a3c7d5531c4504f41806319dd918ba9 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2370/60605/242607.py | ce8e14d4dde4ff225770cb30a7777d60cedc5d54 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | n = int(input())
t = n
res = ""
while t != 0:
remain = t % -2
t //= -2
if remain < 0:
t += 1
remain += 2
res = res + str(remain)
print(res) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
1c415503eb40a3d71e84667fef1513d4ecb304cb | 1ddd9929238af090fd15acb08c3a9a034039bf7c | /resolucao_python/unidade_1/script_3.py | e3a0349b9f4fa9f316310e6c25eff4d29c562754 | [] | no_license | frclasso/estatistica_geral_puc_minas_2020 | 7e2e12958411416c8f912e7d349b908d18dbe2a9 | 9d98d1ec8e645e882885833709b610065b2d4fc6 | refs/heads/main | 2023-02-23T23:06:44.785060 | 2021-01-31T21:36:25 | 2021-01-31T21:36:25 | 325,156,858 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,677 | py | from typing import List
import statistics
import math
class CaculaQuartoQuartil:
"""
PROBLEMA 2
Um pesquisador está interessado em avaliar o tempos (em segundos) que os
consumidores demoram entre o início e a finalização de uma compra em um
determinado site na internet. Para isso, obse... | [
"frcalsso@yahoo.com.br"
] | frcalsso@yahoo.com.br |
c326d3f5a52588f010147b3d3cb5aa5fd79be81e | 0a33cc0ebb67c51cc38750f0f04c3e6c088e3b1a | /tests/components/rfxtrx/test_device_trigger.py | 8e5ee27504ba419c811be9e585c59811da12a6e7 | [
"Apache-2.0"
] | permissive | robert-alfaro/home-assistant | e9bb08ad22a167ed226fb3de8f5b36acfc393548 | 4a53121b58b77a318f08c64ad2c5372a16b800e0 | refs/heads/dev | 2023-02-28T06:46:23.217246 | 2022-04-26T17:30:08 | 2022-04-26T17:30:08 | 115,894,662 | 4 | 0 | Apache-2.0 | 2023-02-22T06:21:08 | 2018-01-01T02:00:35 | Python | UTF-8 | Python | false | false | 5,694 | py | """The tests for RFXCOM RFXtrx device triggers."""
from __future__ import annotations
from typing import Any, NamedTuple
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.components.rfxtrx import DOMAI... | [
"noreply@github.com"
] | robert-alfaro.noreply@github.com |
4cb41dfca9cf17c318af5b90764e56ae92b007c4 | 7bf449f96e1c72cf097dd5264c5efa4337fe1ad7 | /final_proj/VisualAnalyses.py | c76803b3fed0340d336c668b1fd9b0ec7d009f45 | [] | no_license | rgc292/final_project | 9229573a258554655c464306a8d8be4ddade5aa2 | c0ec7690bd1520020e35864eeaec501fd45f3d32 | refs/heads/master | 2021-01-18T02:32:39.062081 | 2015-12-17T03:10:50 | 2015-12-17T03:10:50 | 48,068,674 | 0 | 1 | null | 2015-12-15T20:59:08 | 2015-12-15T20:59:08 | null | UTF-8 | Python | false | false | 1,057 | py | '''
Created on Dec 12, 2015
@author: Kristen kk3175 & Rafael rgc292
'''
import line_graph as lg
import bar_graph as bg
from Pie_Chart import Pie_Chart
'''
Module to perform visual analyses of a specific NYC housing complaint.
Takes a complaint dataset as an argument.
Makes pie charts, line graphs, and bar graphs... | [
"Rafa@192.168.1.139"
] | Rafa@192.168.1.139 |
2944d77e65016a65342224fb147b9da82d155353 | 8cc30a27835e205a3476783106ca1605a6a85c48 | /amy/trainings/views.py | 60e04fb4bf1ebf7c0f1ee24522888df26eb7dc5e | [
"MIT"
] | permissive | gaybro8777/amy | d968edc78bbd3f63f3353450334721628dbbc0f4 | 3cf99aed58a0f0acf83d2645a30d8408208ccea9 | refs/heads/develop | 2023-03-07T22:08:28.692700 | 2021-02-23T18:06:06 | 2021-02-23T18:06:06 | 341,930,505 | 0 | 0 | MIT | 2021-02-24T17:22:08 | 2021-02-24T14:40:43 | null | UTF-8 | Python | false | false | 7,189 | py | from django.contrib import messages
from django.db.models import (
Case,
When,
IntegerField,
Count,
F,
Sum,
Prefetch,
)
from django.shortcuts import render, redirect
from django.urls import reverse_lazy
from trainings.filters import (
TraineeFilter,
)
from trainings.forms import (
T... | [
"piotr@banaszkiewicz.org"
] | piotr@banaszkiewicz.org |
724a23a13c33701d678c2ee7d967eef75ab6289a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03354/s490945583.py | f03b65974dfe8d09656e62cab53ea47171b1c89a | [] | 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 | 630 | py | import sys
input = sys.stdin.readline
n, m = [ int(v) for v in input().split() ]
num = [ int(v)-1 for v in input().split() ]
parent_list = [ i for i in range(n) ]
def root(x):
while parent_list[x] != x:
parent_list[x] = parent_list[parent_list[x]]
x = parent_list[x]
return x
for i in ran... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
46d0eabafb34b253ecf80a7b0f1390f6b39739a0 | 9545652800884f0e54fe6595d8634c29ea4827a2 | /中级算法/leetCode_80_常数时间插入,删除和获取随机元素.py | 52f7adb9f1fa3ec80b550e936ff7cfa8d7b23901 | [] | no_license | challeger/leetCode | 662d9f600a40fd8970568679656f6911a6fdfb05 | d75c35b6f8ab33c158de7fa977ab0b16dac4fc25 | refs/heads/master | 2023-01-13T07:34:42.464959 | 2020-11-13T02:40:31 | 2020-11-13T02:40:31 | 286,426,790 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,819 | py | """
day: 2020-08-22
url: https://leetcode-cn.com/leetbook/read/top-interview-questions-medium/xw5rt1/
题目名: 常数时间插入,删除和获取随机元素
题目描述: 设计一个支持在平均时间复杂度O(1)下,执行以下操作的数据结构
1.insert(val):当元素val不存在时,向集合中插入此项
2.remove(val):当元素val存在时,从集合中删除此项
3.getRandom:随机返回现有集合中的一项,每个元素应该有相同的概率被返回
示例:
// 初始化一个空的集合。
RandomizedSet random... | [
"799613500@qq.com"
] | 799613500@qq.com |
e1fc1deef26dac9c3fe7954d0144a110fed9b04b | 2e02cdfbd1db42158e2f81f09863cf39241f45f2 | /1-Follow up in Code Interview/Optional/32. Minimum Window Substring.py | d20ddda4e59145b003187b66fe03f6fbccc81a2a | [] | no_license | LingHsiLiu/Algorithm2 | e65927720dc046738816815cfb94caa49c060a81 | 680208e58c93d12e974e49d12e682ea5dcfab922 | refs/heads/master | 2020-04-15T01:08:20.177967 | 2019-10-15T01:27:06 | 2019-10-15T01:27:06 | 164,264,805 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,245 | py | # 32. Minimum Window Substring
# Given a string source and a string target, find the minimum window in source which will contain all the characters in target.
# Example
# For source = "ADOBECODEBANC", target = "ABC", the minimum window is "BANC"
# Challenge
# Can you do it in time complexity O(n) ?
# Clarification
#... | [
"noreply@github.com"
] | LingHsiLiu.noreply@github.com |
c4b4bcb7cef9bd41fb9e9d20acc31e9a8e294d9d | d9d1b72da9ff37d6c29c9c0063c2dc0f5b5a107e | /django_facebook/views.py | 28a18d17e49e10da4af01d68c3df6c9c09aa45ca | [
"BSD-3-Clause"
] | permissive | fogcitymarathoner/djfb | 83c02583544e740e7d368ecb37750628f71a31f4 | fd436b579a94585a2c085f2e630bd7050e178394 | refs/heads/master | 2016-08-06T00:23:42.933057 | 2013-04-04T18:27:22 | 2013-04-04T18:27:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,320 | py | from django.conf import settings
from django.contrib import messages
from django.http import Http404, HttpResponse
from django.shortcuts import redirect, render_to_response
from django.template.context import RequestContext
from django.utils.translation import ugettext as _
from django.views.decorators.csrf impor... | [
"marc@fogtest.com"
] | marc@fogtest.com |
8a09cc29573b890e671f24fa77c061797bc1c907 | 7198ba93f84d088fe744fa022620d42f0f69f19a | /Chapter_5_code/build/ros_robotics/catkin_generated/generate_cached_setup.py | fe80f10654efb86931e10e3fa1d44c10129ffd3b | [
"MIT"
] | permissive | crepuscularlight/ROSbyExample | 114ae726f48cfef1b8e6443593c1204654453096 | fa7b1a60cacca9b1034e318a2ac16ce4c8530d7c | refs/heads/main | 2023-04-04T16:26:36.933566 | 2021-04-23T11:16:50 | 2021-04-23T11:16:50 | 359,818,748 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,513 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.path.insert(0, ... | [
"18003316366@163.com"
] | 18003316366@163.com |
d34c109a84de5826b080a028d54820ca16d96185 | 60b6645ef4544ccda1146cd596b618e42b8715d8 | /product/migrations/0002_auto_20171118_1436.py | 6b186dacbf3f08b42dd146f7343988f363b5f9b7 | [] | no_license | mamun1980/innstal | 6534c879d9deab09f8b638b484db940f118d5d7d | 5dd8051cf955e9ec72fbfbcd1fdcb681ad6e95d7 | refs/heads/master | 2021-05-16T00:59:19.606698 | 2017-11-26T18:49:16 | 2017-11-26T18:49:16 | 106,926,549 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,293 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-18 14:36
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('produc... | [
"mamun1980@gmail.com"
] | mamun1980@gmail.com |
8202face95f1682cd8af34eaa2404537a2b43714 | 5a3547772b61f7d1b3a81f76dd1397eb92c68e7b | /slbo/envs/mujoco/ant_env.py | 3ae2cf2cfcd1fac068ba3239dece9a9f98e5dbef | [
"MIT"
] | permissive | suen049/AdMRL | 483440f0ded14e471d879b300da9afbab68fbe66 | 50a22d4d480e99125cc91cc65dfcc0df4a883ac6 | refs/heads/master | 2023-03-12T23:15:05.154003 | 2021-03-06T15:31:21 | 2021-03-06T15:31:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,013 | py | import numpy as np
from rllab.envs.mujoco import ant_env
from rllab.envs.base import Step
from slbo.envs import BaseModelBasedEnv
class AntEnv(ant_env.AntEnv, BaseModelBasedEnv):
def get_current_obs(self):
return np.concatenate([
self.model.data.qpos.flat, # 15
self.model.data.qve... | [
"linzichuan12@163.com"
] | linzichuan12@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.