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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17739c606e36fb190c627f7507e332546d8a1ae7 | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-core-2.5.1/PyObjCTest/test_bridges.py | e803ab31cb684dd435a09d66a77d2d80598b1a77 | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 2,106 | py | from PyObjCTools.TestSupport import *
from PyObjCTest.testbndl import OC_TestClass2
import objc
import collections
import sys
if sys.version_info[0] == 2:
from UserList import UserList
from UserDict import IterableUserDict
else:
from collections import UserDict as IterableUserDict, UserList
NSMutableAr... | [
"opensource@apple.com"
] | opensource@apple.com |
90e7ecdd1b7ff7bb7d60e0fd4a70f7234fb44cf0 | f000fa4e6ef1de9591eeabff43ba57b7bf32561d | /tests/common/test_retryutils.py | 878419ecfa97affa641c0bd768d0921c7056692b | [] | no_license | VictorDenisov/ceph-lcm | 1aca07f2d17bfda8760d192ffd6d17645705b6e4 | 3cfd9ced6879fca1c39039e195d22d897ddcde80 | refs/heads/master | 2021-01-15T09:19:23.723613 | 2016-09-17T01:18:45 | 2016-09-17T01:18:45 | 68,424,913 | 0 | 0 | null | 2016-09-17T01:17:36 | 2016-09-17T01:17:36 | null | UTF-8 | Python | false | false | 3,106 | py | # -*- coding: utf-8 -*-
"""Tests for cephlcm.common.retryutils"""
import unittest.mock
import pymongo.errors
import pytest
from cephlcm.common import retryutils
@pytest.fixture
def func_always_fails():
func = unittest.mock.MagicMock()
func.__name__ = ""
func.side_effect = Exception
return func
... | [
"sarkhipov@mirantis.com"
] | sarkhipov@mirantis.com |
2a4ab14fe77c86874630bbd75a3bd0aa9c75fbb6 | 291fe7fb4cc5b682e560b0c5958e2220054451c6 | /Big48/클래스연습1.py | c1975edcbe42a3c2942626d1924915e230b33b94 | [] | no_license | MinksChung/BigdataCourse | 44dc5e7e578515e1dafbb7870911e09347a788f4 | 293803415da5d9f354059ea556818cc7610f36a5 | refs/heads/master | 2022-12-22T06:14:59.880933 | 2020-01-26T14:58:09 | 2020-01-26T14:58:09 | 202,575,724 | 0 | 0 | null | 2022-12-15T23:28:43 | 2019-08-15T16:29:35 | Python | UTF-8 | Python | false | false | 1,357 | py | # 파이썬은 '함수' 중심의 언어(모듈 중심). 모듈과 클래스는 별개
## 클래스 생성
class Dog: # 클래스명은 대문자로 사용. ( ) 없이 :만 사용
## 멤버 변수
# 변수선언
color = "" # 색
field = "" # 견종
## 생성자 함수(init) (생성자는 함수? (o), 객체를 생성할 때 자동으로 호출되는 함수를 생성자라고 한다)
def __init__(self): # 클래스안에 있는 생성자라는 표시로 변수명이 self 로 자동완성 됨
print("내가 마... | [
"minkschung@gmail.com"
] | minkschung@gmail.com |
5ef9ea6662f4ffcc844776800d65dfb1c07daa47 | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r9/Gen/DecFiles/options/13102432.py | ef19e6f2fb686eeee810105d86b362e257cc42be | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,832 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r9/Gen/DecFiles/options/13102432.py generated: Fri, 27 Mar 2015 16:09:59
#
# Event Type: 13102432
#
# ASCII decay Descriptor: {[[B_s0]nos -> pi+ pi- (pi0 -> gamma gamma)]cc, [[B_s0]os -> pi- pi+ (pi0 -> gamma gamma)]cc}
#
from Configurables import Generation
Generation().EventTy... | [
"slavomirastefkova@b2pcx39016.desy.de"
] | slavomirastefkova@b2pcx39016.desy.de |
9aaa01fae066eb8b73fc2e88e7d5553d38668bed | 7341a4f317639eed3c6868310c7421e8eb7016ce | /usados/users/admin.py | b8baf198dd2a857373c88643faac6d26fb6227d9 | [] | no_license | fabianfalon/drf-boilerplate | f637fb66f7dd260e4a3b9c9daf6217ad99a90765 | d24fd3a8de653f9731d41781e1e4e207881fbbb2 | refs/heads/master | 2020-05-19T06:05:12.629587 | 2019-11-12T18:44:15 | 2019-11-12T18:44:15 | 184,864,871 | 0 | 0 | null | 2019-10-22T06:26:39 | 2019-05-04T07:25:09 | Python | UTF-8 | Python | false | false | 614 | py | """User models admin."""
# Django
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
# Models
from .models import Profile, User
class CustomUserAdmin(UserAdmin):
"""User model admin."""
list_display = ('email', 'username', 'first_name', 'last_name', 'is_staff',)
@admin.regis... | [
"fabian.falon@gmail.com"
] | fabian.falon@gmail.com |
ca4ae6b51f677ae0b957d2c9e6b32f94cde2244b | 3d2e5d1092acccfb73c07d68b6beeffc44b3f776 | /planet/src/utils/plotting.py | cda9af3d36ef802034023f45d54fcd336fb5a5c4 | [] | no_license | MatthijsBiondina/WorldModels | f6cbcfe5349da7119329ef10831810d1b85c9d02 | ab468f1aa978e3aa4e05174db24922085d1e33b1 | refs/heads/master | 2022-12-22T11:54:46.040828 | 2020-09-23T11:41:48 | 2020-09-23T11:41:48 | 248,212,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,336 | py | import json
import os
from bokeh.plotting import output_file, figure, save
from bokeh.layouts import gridplot
import src.utils.config as cfg
def save_metrics(metrics: dict, save_loc: str):
with open(os.path.join(save_loc, 'metrics.json'), 'w+') as f:
json.dump(metrics, f, indent=2)
output_file(os.pa... | [
"biondina.matthijs@gmail.com"
] | biondina.matthijs@gmail.com |
c807672ac9a93e578d16c491d87364a6512dba76 | da3e36172daaf863ef73372f8c36cc2629ec1769 | /tuplas/eje03.py | bb54a038752b4310aef8c28e3c48b273a8959656 | [] | no_license | mentecatoDev/python | 08eef1cb5a6ca2f16b01ee98192ccf1a65b9380a | 80ddf541d3d1316ba8375db8f6ec170580e7831b | refs/heads/master | 2021-06-30T07:03:51.957376 | 2021-02-22T09:40:46 | 2021-02-22T09:40:46 | 222,322,503 | 3 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,134 | py | """
Ejercicio 3
===========
Escribir un programa que lea un archivo e imprima las letras en orden decreciente de
frecuencia de aparición. El programa debería convertir toda la entrada a minúsculas
y solo contar las letras a-z (excluir la "ñ"). No se debeen contar espacios, dígitos,
signos de puntuación o cualquier otro... | [
"favila@iesromerovargas.com"
] | favila@iesromerovargas.com |
3da0ac5df135ea5ca9acb2681b46952392d40bff | ef0f84bcba3ded3624697c5c2a36e5c99cc5e498 | /bumpversion/functions.py | b00f726a6650eb78bbecce9bb7197b7618e92fcd | [
"MIT"
] | permissive | lbryio/bumpversion | e502d7a78608f72f6d6817bad451232fc02d75c0 | 0c8f0e327ac97d896ca3fd2e254628e2afd0a4fe | refs/heads/master | 2021-01-11T11:57:20.662827 | 2018-10-31T15:49:54 | 2018-10-31T15:49:54 | 76,699,829 | 3 | 1 | MIT | 2018-10-31T15:49:56 | 2016-12-17T02:44:18 | Python | UTF-8 | Python | false | false | 2,873 | py | import re
import datetime
class NumericFunction(object):
"""
This is a class that provides a numeric function for version parts.
It simply starts with the provided first_value (0 by default) and
increases it following the sequence of integer numbers.
The optional value of this function is equal ... | [
"giordani.leonardo@gmail.com"
] | giordani.leonardo@gmail.com |
f20cea7c2a92454e78c5329560ee8cf9c53555e6 | 8acffb8c4ddca5bfef910e58d3faa0e4de83fce8 | /ml-flask/Lib/site-packages/sklearn/impute/_knn.py | e995c37a08e2e2b058641a63cec0e3dbf58a4303 | [
"MIT"
] | permissive | YaminiHP/SimilitudeApp | 8cbde52caec3c19d5fa73508fc005f38f79b8418 | 005c59894d8788c97be16ec420c0a43aaec99b80 | refs/heads/master | 2023-06-27T00:03:00.404080 | 2021-07-25T17:51:27 | 2021-07-25T17:51:27 | 389,390,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:890c089e7000acacdf6a7598f456bcc2d31f0331adb33d1b18c7cb84120d3758
size 11662
| [
"yamprakash130@gmail.com"
] | yamprakash130@gmail.com |
781e20ee60bcb21fe4e6068d568ba9a9e5393d25 | 8e311f8f94c9d218bd37f81c0badc906d78d6b33 | /env/Lib/site-packages/openpyxl/utils/escape.py | 52ef33e0a97ffe61274bfc2b8c8686fd8d78d159 | [
"MIT"
] | permissive | htwenhe/DJOA | d76307ff8752c1e2a89101de1f74094b94bf9b18 | 3c2d384a983e42dedfd72561353ecf9370a02115 | refs/heads/master | 2021-09-03T21:49:28.267986 | 2018-01-12T08:12:55 | 2018-01-12T08:12:55 | 108,937,324 | 0 | 1 | MIT | 2018-01-12T08:06:50 | 2017-10-31T02:59:26 | Python | UTF-8 | Python | false | false | 828 | py | from __future__ import absolute_import
# Copyright (c) 2010-2017 openpyxl
"""
OOXML has non-standard escaping for characters < \031
"""
import re
def escape(value):
r"""
Convert ASCII < 31 to OOXML: \n == _x + hex(ord(\n)) +_
"""
CHAR_REGEX = re.compile(r"[\001-\031]")
def _sub(match):
... | [
"htwenhe@hotmail.com"
] | htwenhe@hotmail.com |
e4832b743c96639a2e1820a18dea177fd0b25045 | 54da94dce244ab659c8036cafcdc1b326fbfe490 | /datoteke-s-predavanj/2015-16/10-nakljucna-stevila/matematiki/ocenipi.py | a001630b6569c0a30461ff211502ce246eb54d9d | [] | no_license | jakamrak/uvod-v-programiranje | 640b2738164e2026308d7e60f1478659df79cc40 | 3c05290f4f23b384ad9063880fffe208c08fc599 | refs/heads/master | 2022-07-17T16:50:18.563453 | 2020-05-18T13:54:13 | 2020-05-18T13:54:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,149 | py | import random
def oceni_pi(stevilo_poskusov):
v_krogu = 0
for _ in range(stevilo_poskusov):
x, y = random.random(), random.random()
if x ** 2 + y ** 2 <= 1:
v_krogu += 1
return 4 * v_krogu / stevilo_poskusov
def oceni_eno_kocko(stevilo_poskusov):
pogostosti = {}
for _ ... | [
"matija@pretnar.info"
] | matija@pretnar.info |
9ff1408db7be8a1136af5560f389a255626ebc8d | f1614f3531701a29a33d90c31ab9dd6211c60c6b | /menu_sun_integration/infrastructure/pernod/translators/pernod_product_translator.py | 310121443153e34684dfcbcfcb6ea8f758c223f6 | [] | no_license | pfpacheco/menu-sun-api | 8a1e11543b65db91d606b2f3098847e3cc5f2092 | 9bf2885f219b8f75d39e26fd61bebcaddcd2528b | refs/heads/master | 2022-12-29T13:59:11.644409 | 2020-10-16T03:41:54 | 2020-10-16T03:41:54 | 304,511,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | from menu_sun_api.domain.model.product.product import Product, ProductStatus
from menu_sun_api.domain.model.seller.seller import Seller
from menu_sun_integration.application.translators.interfaces.abstract_product_translator import \
AbstractProductTranslator
from menu_sun_integration.infrastructure.pernod.presenta... | [
"pfpacheco@gmail.com"
] | pfpacheco@gmail.com |
f94f884ae27d3ed75f4d10e846d2b7d48fa3ebc8 | 169f134442ce7f040e8a1878258c90ef9f0cbcc1 | /skivvy.py | 0ff0ad391b9f1781aa56ece1702caab15635ef0e | [] | no_license | Kazade/skivvy | 9d41b0acc934e6059d60b386cc54a0638b14f7cc | 41278fa66b559ee507862c729ad89028ccd5ae52 | refs/heads/master | 2016-09-11T04:41:31.998555 | 2014-12-05T16:36:10 | 2014-12-05T16:36:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,832 | py | import os
import sys
import argparse
import json
import re
import tempfile
import subprocess
ENV_REGEX = r"(.+)\[(.+)\]"
parser = argparse.ArgumentParser(description="underling task worker")
parser.add_argument("--config", type=unicode, default="underling.json")
parser.add_argument("--env", type=unicode, default="")
... | [
"kazade@gmail.com"
] | kazade@gmail.com |
6a761ba24b8b47cb5af1cfae4382ae695c5c1676 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_sultanates.py | 18564bf3d0e82aa07511fead77ff8b845972a870 | [
"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 | 234 | py |
#calss header
class _SULTANATES():
def __init__(self,):
self.name = "SULTANATES"
self.definitions = sultanate
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['sultanate']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
1ccac1f41ac29343126ed052cb5f0f3e98e6ec18 | 4909bdc40f9d606e336a077908ca16933989f66f | /tensorflow/python/distribute/multi_worker_continuous_run_test.py | 19790a0d69fb2eb2bdeee043f96d30c1f8e66767 | [
"Apache-2.0"
] | permissive | xhook/tensorflow | 9532fcf1b466f65f938aa95aba290d99d2004ad0 | 978d3b37393a4dd2411e2e6657dff1bbcac81a66 | refs/heads/master | 2020-09-06T21:00:35.848217 | 2019-11-08T18:03:54 | 2019-11-08T18:59:48 | 220,535,874 | 0 | 0 | Apache-2.0 | 2019-11-08T19:39:19 | 2019-11-08T19:39:18 | null | UTF-8 | Python | false | false | 3,472 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
59a16006343239f0fce22a8359cb005c9a563593 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03363/s899204324.py | 4e166a6e2b65758d9abb5e6794647c95abe254e6 | [] | 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 | 429 | py | import bisect
import math
n = int(input())
a = list(map(int,input().split()))
s = [0]*(n+1)
for i,e in enumerate(a):
s[i+1] = s[i] + e
def comb(n,m):
return math.factorial(n)//math.factorial(m)//math.factorial(n-m)
ans = 0
s = sorted(s)
l = 0
r = 0
#print(s)
while l < n+1:
while r < n+1 and s[l] == s[... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
dcb8a80e5b04d0964118e6cb6917ac60f0a9857e | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /place_and_point/week_and_next_day/work_or_high_way/take_good_year_with_next_hand/woman/get_small_way.py | 5a4a7c6086c5ee148aac418594f1d5b2fa66fbc4 | [] | 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 | 246 | py |
#! /usr/bin/env python
def place_and_few_case(str_arg):
go_next_thing_at_great_way(str_arg)
print('old_work')
def go_next_thing_at_great_way(str_arg):
print(str_arg)
if __name__ == '__main__':
place_and_few_case('seem_point')
| [
"jingkaitang@gmail.com"
] | jingkaitang@gmail.com |
3dccb0ced631f2774613aa58ddedc938d556cee2 | 083b758356821647b6a2db3f4ae32b355ebd28c4 | /Question_91_100/answers/answer_98.py | e98d41c8e6551a43cc8e51166b79b4fd2f798cbf | [
"MIT"
] | permissive | litiangu/Gasyori100knock | 0b2e2844748acecba383500f56a25afad5a22973 | 38305760a4db4c6f8addf176630197960e7fc6a9 | refs/heads/master | 2020-07-16T18:00:05.756714 | 2019-09-01T22:58:39 | 2019-09-01T22:58:39 | 205,837,921 | 1 | 0 | MIT | 2019-09-02T11:02:30 | 2019-09-02T11:02:30 | null | UTF-8 | Python | false | false | 5,894 | py | import cv2
import numpy as np
np.random.seed(0)
# read image
img = cv2.imread("imori_1.jpg")
H, W, C = img.shape
# Grayscale
gray = 0.2126 * img[..., 2] + 0.7152 * img[..., 1] + 0.0722 * img[..., 0]
gt = np.array((47, 41, 129, 103), dtype=np.float32)
cv2.rectangle(img, (gt[0], gt[1]), (gt[2], gt[3]), (0,255,255), ... | [
"naga.yoshi.yoshi@gmail.com"
] | naga.yoshi.yoshi@gmail.com |
0146a04104dc8ddd02af43bba75341ee40c82792 | e73e318c099c5c71b750269ee84f1bbe09fffac2 | /promis/admin.py | 9e1f17c2da686b0bb73e82d7a11c462b1f97fda6 | [] | no_license | ArietNyshanbaev/deputat | f304f2deb0807241d691a8838d2d11f3e7328c46 | 6a744969a2ee7a811f31b03994eced9d571c4be2 | refs/heads/master | 2021-03-23T23:47:39.893956 | 2016-09-12T16:46:15 | 2016-09-12T16:46:15 | 66,534,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 769 | py | # Импорт стандартных пакетов Django
from django.contrib import admin
# Импорт моделей из баззы данных
from .models import Promis, PromisRank, Result, Comments
class PromisAdmin(admin.ModelAdmin):
""" Класс Регистрации Админки для Клеинтов """
list_display = ('title', 'person', 'date', 'is_approved')
list_filter = ... | [
"ariet.nyshanbaev@iaau.edu.kg"
] | ariet.nyshanbaev@iaau.edu.kg |
6f74581e0d8602c2f47bea02cff088e3ce4eadb6 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_11059.py | 9815daed4b4f8901097b703a4e2b8c9c3ac7fe0a | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | # How to Handle JSON with escaped Unicode characters using python json module?
data = jsDat.get('data')
data = data.encode('ascii', 'ignore')
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
17968e3caa7ee7355836b9479e64c6bc5051f7d8 | 2bd8fbe6e2ee2511d00479440aa589249234c2d8 | /01-Supervised/17-neuralNetwork/day19/day19-1-neuralNetwork-2-MLPClassifier.py | 23e1e91ceac3ac54f709ffc568dc722516ce7512 | [] | no_license | LeenonGo/sklearn-learn | 71d21f9b26cfb5cc6d65a22883127db873a31091 | 460d6e75e82943c802f7c025a03c821d02b5d232 | refs/heads/master | 2023-07-13T18:42:17.510938 | 2021-08-18T11:34:06 | 2021-08-18T11:34:06 | 371,628,997 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,497 | py | # -*- coding: utf-8 -*-
# @Author : Lee
# @Time : 2021/7/23 9:20
# @Function: https://www.scikitlearn.com.cn/0.21.3/18/#1172
#
from sklearn.neural_network import MLPClassifier
X = [[0., 0.], [1., 1.]]
y = [0, 1]
clf = MLPClassifier(solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(5, 2), random_state=1)
clf.fit(X, y... | [
"yaa.lee@hotmail.com"
] | yaa.lee@hotmail.com |
e60c0abdc0b7ac4f9ffc02f61ca16a77fee99345 | 61ba1d073fdbb34ad2ae4e9d0ae1b88083faeb02 | /Sem I/Programarea Algoritmilor/laboratoare/lab2/problema6.py | 82197831572d9292a03a2e658d6479b36dae91a4 | [] | no_license | CosminHorjea/fmi | d899b639a085203963413918d2c508307cb9ba60 | 6b4911cdec64929710d984223385c1e8e36d5c7c | refs/heads/master | 2023-07-09T01:04:24.418286 | 2023-06-22T21:50:00 | 2023-06-22T21:50:00 | 213,064,779 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | '''
6. Jurnalul electronic al Anei conține, în fiecare zi, câte o frază cu informații despre cheltuielile pe
care ea le-a efectuat în ziua respectivă. Scrieți un program care să citească o frază de acest tip din
jurnalul Anei și apoi să afișeze suma totală cheltuită de ea în ziua respectivă. De exemplu, pentru fraza
“A... | [
"horjeacosmin@yahoo.com"
] | horjeacosmin@yahoo.com |
5ae0ec49d2a08f1c7a2d6df28e40d28902ff9950 | 1d450f4655ae63240e88b474b8a17c1e711e1a81 | /AttributesAndMethods/DocumentManagement/project/topic.py | 1244ef4688a709dd1f29d1fbdede9e2fc76badc3 | [] | no_license | RuzhaK/PythonOOP | f2cb396390349e2aac605c90fd7a18039653cf5e | 68cbf321b5947b376459d7397aed36554347d256 | refs/heads/master | 2023-05-30T06:17:42.618984 | 2021-06-17T08:04:46 | 2021-06-17T08:04:46 | 371,284,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | class Topic:
def __init__(self,id, topic,storage_folder):
self.id=id
self.topic=topic
self.storage_folder=storage_folder
def edit(self,new_topic: str, new_storage_folder: str):
self.topic=new_topic
self.storage_folder=new_storage_folder
def __repr__(self):
ret... | [
"rkaraatanasova@gmail.com"
] | rkaraatanasova@gmail.com |
9aaf56b91989e82c66fa113d95de30112ec46571 | bf2d60eaa66d20f4a463999aca15bc43a026db22 | /app/email.py | 6f81dd2a55cde5d2582978572a2654ce5caa7d47 | [] | no_license | kfinn6561/covid_map | 2c60fdea3787b73b5f754eed51c56d3e276473fb | 52d3f36375f0d610cc9b852b485f5397cb2ab642 | refs/heads/main | 2023-03-24T19:54:35.251710 | 2021-03-23T10:18:23 | 2021-03-23T10:18:23 | 350,666,986 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | '''
Created on 7 Jun 2020
@author: kieran
'''
from flask_mail import Message
from app import app,mail
from threading import Thread
def send_async_email(app,msg):
with app.app_context():
mail.send(msg)
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=s... | [
"kieran.finn@hotmail.com"
] | kieran.finn@hotmail.com |
2dbbce0ffe811caa9084b2700bb291b04f1da200 | b372bc13b4715e87f39f80c1c2465fc6d93f3609 | /register/tipmac.py | 56092803f1532810fb9f495adae1b494bb9538a3 | [
"WTFPL"
] | permissive | Retenodus/Maiznet | 4dff822f0ab3d8c08196d09f08ef169357e37c2f | f7fa2c4ee964cab1cc2e33feadeed826f18489b7 | refs/heads/master | 2021-01-24T00:02:49.168595 | 2012-06-25T23:13:02 | 2012-06-25T23:13:02 | 2,130,383 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,864 | py | ########################################################################
# vim: fileencoding=utf-8 ts=8 noexpandtab :
#
# ~~~~ Maiznet.fr ~~~~
#
# -> register/tipmac.py
#
#
# Copyright 2011 Grégoire Leroy <gregoire.leroy@retenodus.net>
# Copyright 2011 Rémy Sanchez <remy.sanchez@hyperthese.net>
#
# This file is distri... | [
"remy.sanchez@hyperthese.net"
] | remy.sanchez@hyperthese.net |
1d6a50cd2453611e0a4132a1cb10f5c1d4fbffc1 | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flasharray/FA_2_23/models/network_interface_eth.py | 3190b8ae65d39d8a5813962e70c371dac0b1d779 | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 6,348 | py | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.23
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | [
"noreply@github.com"
] | PureStorage-OpenConnect.noreply@github.com |
ab2bda27234228c0eddad94ca062b9b2d0cf30ea | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_242/ch16_2020_03_23_19_51_17_162358.py | 4c14a0bbe8dc96d55dae4bea543ccd289b62c78f | [] | 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 | 185 | py |
v = float(input('Qual o valor da conta?:'))
def valor_da_conta(v):
resultado = v * 1.1
return resultado
print('Valor da conta com 10%: R$ {0:.2f}'.format(valor_da_conta(v)))
| [
"you@example.com"
] | you@example.com |
1a5fe7c6d9e954247f9388fd4b723a23fe944586 | 5286255a93db21ea9defc1f8f6fc71990c3c2fa9 | /testing/scripts/.svn/text-base/xclean_unit_tests.py.svn-base | 5c8066c963806e62aba75180468dffb41a007d7e | [] | no_license | brynmathias/AnalysisV2 | 1367767dbf22eef6924700c4b0a00581ea8ed965 | ee17c019bb04243876a51c7ef7719cc58a52adea | refs/heads/master | 2021-01-01T19:20:27.277628 | 2012-04-17T13:34:26 | 2012-04-17T13:34:26 | 2,600,415 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 436 | #!/usr/bin/env python
import setupSUSY
import unittest
#import xclean.clonevector_tests
#import xclean.basic_tests
if __name__ == '__main__':
testcases=["xclean.clonevector_tests.TestCloneVector",
"xclean.basic_tests.TestBasic"]
suite = unittest.TestLoader().loadTestsFromNames(testcases)
pri... | [
"brynmathias@gmail.com"
] | brynmathias@gmail.com | |
65062af86c81873c11336b2bac695d78088412cc | f08f09b23dbf3ce3b967c46c5f109b792c5c8993 | /visual_dynamics/envs/env_spec.py | 4145f5c2af567b74f0d3173f709f5f31f27471e0 | [
"MIT"
] | permissive | saadmahboob/visual_dynamics | 5df6ea0f53144f0de8fdc991c9f00d78ac98c680 | 90227bb0d0aebb1989117b5c25ca311655ca7cc7 | refs/heads/master | 2021-06-17T05:50:22.661375 | 2017-05-12T02:53:47 | 2017-05-12T02:53:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | from visual_dynamics.spaces.base import Space
from visual_dynamics.utils.config import ConfigObject
class EnvSpec(ConfigObject):
def __init__(self, action_space, observation_space):
self._action_space = action_space
self._observation_space = observation_space
@property
def observation_spa... | [
"alexleegk@gmail.com"
] | alexleegk@gmail.com |
42fa0316fcea9a59c8394e31d472a79f370cde1f | d4fe2607c25e514df42831ddae3f9509057c2d46 | /USBApplication/tasks/serial_task.py | 17f72ecaadd8834d1c0fcb55d28f2c8e6acdfd52 | [] | no_license | bxm156/EECS398 | 8cdbb1057f8d7d2fd8764df4309dd4712799d766 | aa638d81fea008d467118691882cee73cefde147 | refs/heads/master | 2021-01-01T05:36:00.159758 | 2013-12-05T17:11:09 | 2013-12-05T17:11:09 | 12,497,895 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | from base_task import BaseTask
class SerialTask(BaseTask):
def set_parameters(self, param_dict):
self.parameters = param_dict
| [
"bxm156@case.edu"
] | bxm156@case.edu |
2b7259f9c38153470debef2a76db963f8b051486 | 660c72411c148507b0b04c517f154df7d0396281 | /wiki/middleware.py | 7ad75cf3cf8b65314f7ee3a31ae1213d0886b9e0 | [] | no_license | xuguangzong/WIKI | e38dc3d434470c3238ebdf552768e42a7becb292 | ac6b573ff6a658977fc97508ff90f004df3169a1 | refs/heads/main | 2023-06-26T15:29:55.675667 | 2021-07-23T08:39:50 | 2021-07-23T08:39:50 | 386,569,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,417 | py | import time
import logging
from wiki.documents import ELASTICSEARCH_ENABLED, ElaspedTimeDocumentManager
logger = logging.getLogger(__name__)
class OnlineMiddleware(object):
def __init__(self, get_response=None):
self.get_response = get_response
super().__init__()
def __call__(self, request):... | [
"2359301733@qq.com"
] | 2359301733@qq.com |
d7a1d6e57acc930c4bd99451bd5df4c5e3bc6cfe | fb8ee3a962f6d690badd02409206be0724e6a659 | /examples/bScript.py | a85a71e0fb6d3ca27b6c1f220cfa141ea50ff6fa | [] | no_license | chonlei/SanPy | 3efbfcfd46b5223c52724a57d1640a241cbde82b | fb9f399527adcdf01dad49011d7ecfd47ac77139 | refs/heads/master | 2023-07-11T03:46:37.249897 | 2021-08-11T01:54:44 | 2021-08-11T01:54:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,015 | py | import sys
sys.path.append("..") # Adds higher directory to python modules path.
import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
from sanpy import bAnalysis
# open an abf file into a bAnalysis object
myFile = '../data/19114001.abf'
ba = bAnalysis.bAnalysis(myFile)
# detect spikes
myThresh... | [
"robert.cudmore@gmail.com"
] | robert.cudmore@gmail.com |
b407fac8430611e58e38951ad808096c8da0eb7f | 3f394cd47a1aaf0ae2f8de5ab9854f52341e017a | /clay/helpers.py | df83597113a8b027b38f28f310309ccb1a9a6517 | [
"MIT"
] | permissive | devildeveloper/Clay | e3771d97d23ae3ba7d866d8921102d50e95a6562 | ca419ee4cfe191724ed68e3507515a5b258bb4bb | refs/heads/master | 2021-01-18T02:27:22.094481 | 2013-11-18T20:24:02 | 2013-11-18T20:24:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,628 | py | # -*- coding: utf-8 -*-
from datetime import datetime
import errno
from fnmatch import fnmatch
import io
import os
import shutil
import unicodedata
def to_unicode(txt, encoding='utf8'):
if not isinstance(txt, basestring):
txt = str(txt)
if isinstance(txt, unicode):
return txt
return unicod... | [
"juanpablo@lucumalabs.com"
] | juanpablo@lucumalabs.com |
849c3e365db5121e9b999f5684403461c40b7bfd | 2467b5d4a6d8d6ffeff547478a8dd7fa3d4d9234 | /chapter04/demo_4.4.py | efcf5f6dae4cb9cfb3a2035c834d797028778720 | [
"MIT"
] | permissive | NetworkRanger/tensorflow-ml-exercise | 6c92ec3cf87a6def0c1d7818e59c83585cc1aebe | d0c46c10bfc3ee06c211ebe2f25489f8407c369f | refs/heads/master | 2020-04-02T22:54:57.268384 | 2018-12-22T13:52:01 | 2018-12-22T13:52:01 | 154,848,809 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,629 | py | #!/usr/bin/python2.7
# -*- coding:utf-8 -*-
# Author: NetworkRanger
# Date: 2018/11/5 下午10:44
# 4.4 TensorFlow上核函数的使用
# 1. 导入必要编程库,创建一个计算图会话
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from sklearn import datasets
sess = tf.Session()
# 2. 生成模拟数。生成的数据是一两个同心圆数据,每个不同的环代表不同的类,确保只有类-1或者1。为... | [
"17346503142@163.com"
] | 17346503142@163.com |
6f9704f52133fd74a784d3d12df74871c7595eff | 70538979b952b8afc380bd19ac565b3967178b87 | /docker_odoo_env/commands/command.py | e95e7d0446d250b93fb8a576afb260b1bd0a060c | [
"MIT"
] | permissive | sebatista/docker_odoo_env | b693b9111e68f4162784ee77910c034b5dcb0b21 | 57963fb677257a71c2d9bfbf0400a78eaa62fd10 | refs/heads/master | 2020-04-25T06:59:31.635170 | 2019-02-25T01:42:22 | 2019-02-25T01:42:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | # -*- coding: utf-8 -*-
# For copyright and license notices, see __manifest__.py file in module root
from docker_odoo_env.messages import Msg
msg = Msg()
class Command(object):
def __init__(self, config):
self._config = config
def execute(self):
raise NotImplementedError
def show_doc(s... | [
"jorge.obiols@gmail.com"
] | jorge.obiols@gmail.com |
3b55ba6c605dd0fc783bf9b32b031d064c3a3e25 | 32bbbd6dbd100bbb9a2282f69ac3b7b34516347f | /Study/keras/keras40_mnist3_dnn.py | fb46b91e2a7ed5c39bd84d7fe794c8c87742301f | [] | no_license | kimjh1753/AIA_Academy_Study | 2162d4d4f1a6b8ca1870f86d540df45a8742f359 | 6022718ae7f9e5170a19c4786d096c8042894ead | refs/heads/master | 2023-05-07T12:29:12.920693 | 2021-06-05T01:09:33 | 2021-06-05T01:09:33 | 324,136,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,065 | py | # 주말과제
# dense 모델로 구성 input_shape=(28*28, )
# 인공지능계의 hello world라 불리는 mnist!!!
import numpy as np
import matplotlib.pyplot as plt
# 1. 데이터
from tensorflow.keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
print(x_train.shape, y_train.shape) # (60000, 28, 28) (60000,)
print(x_... | [
"kimjh1753@naver.com"
] | kimjh1753@naver.com |
ea5831164ca916edd5d87547c9867c3506951b19 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py | f10a7f2ec190f24f5ab3753b5e8bbd093bd710b0 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 465 | py | import _plotly_utils.basevalidators
class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name="ticksuffix",
parent_name="scattermapbox.marker.colorbar",
**kwargs
):
super(TicksuffixValidator, self).__init__(
plo... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
c5e6b35ebc6e4bdbfceaaeb25098ab18f8b9b869 | 667f153e47aec4ea345ea87591bc4f5d305b10bf | /Solutions/Ch5Ex113.py | c53cc96c6971b3a0a5a3f6418b386e6ee3f1b5fb | [] | no_license | Parshwa-P3/ThePythonWorkbook-Solutions | feb498783d05d0b4e5cbc6cd5961dd1e611f5f52 | 5694cb52e9e9eac2ab14b1a3dcb462cff8501393 | refs/heads/master | 2022-11-15T20:18:53.427665 | 2020-06-28T21:50:48 | 2020-06-28T21:50:48 | 275,670,813 | 1 | 0 | null | 2020-06-28T21:50:49 | 2020-06-28T21:26:01 | Python | UTF-8 | Python | false | false | 583 | py | # Ch5Ex113.py
# Author: Parshwa Patil
# ThePythonWorkbook Solutions
# Exercise No. 113
# Title: Formatting a List
from Ch5Ex107 import inputWordList
def formatWordList(words):
if len(words) == 1:
return str(words[0])
elif len(words) == 2:
return str(words[0]) + " and " + str(words[1])
elif len(wor... | [
"noreply@github.com"
] | Parshwa-P3.noreply@github.com |
40ac2a92a23c0cf29aaa67a5f202967f7527b8dc | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/4040/494004040.py | 8b2f5f83eb14d0b75d277c1ae37a8190e141fa8f | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 998 | py | from bots.botsconfig import *
from records004040 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'TP',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'REN', MIN: 1, MAX: 1},
{ID: 'DK', MIN: 1, MAX: 1},
... | [
"jason.capriotti@gmail.com"
] | jason.capriotti@gmail.com |
19dad8cafa255111037ec4d564a616e8fe94fe5d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2819/60580/293103.py | a5bcdd091887b7679ef45973eb5fbcfc0d5f124a | [] | 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 | 842 | py | import math
size = int(input())
tempList = input().split()
intList = []
for var in tempList:
intList.append(int(var))
d = {}
for var in intList:
if var in d.keys():
d[var] += 1
else:
d[var] = 1
l = sorted(d.keys())
realD = {}
for i in l:
realD[i] = d[i]
result = 0
resultD = {}
resultD[1... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
1d8c1e36a64b2846dae7a9d01729e5c129613ed3 | c84d807bd359ae58ed5e115a51fb85be5ac93262 | /11_binary_search/9_search_rotated_array_duplicates.py | e650cdc1c68f500010263519962cbcf78ade74c2 | [] | no_license | terrifyzhao/educative | bc35d1d10ea280ddc50b1a2708c0e22a7a5cd6d0 | 7a5c82abeb7853a9a1262e28b2fe58a20f547802 | refs/heads/master | 2020-11-28T04:25:30.425519 | 2020-03-05T10:23:09 | 2020-03-05T10:23:09 | 229,702,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,708 | py | def search_rotated_with_duplicates(arr, key):
start, end = 0, len(arr) - 1
while start <= end:
mid = start + (end - start) // 2
if arr[mid] == key:
return mid
# the only difference from the previous solution,
# if numbers at indexes start, mid, and end are same, we c... | [
"zjiuzhou@gmail.com"
] | zjiuzhou@gmail.com |
8a3938da7e8df9e31d0c8249ff2d5bd9dcdbeb84 | 80c8d4e84f2ea188a375ff920a4adbd9edaed3a1 | /third/opencv/gaussian_mix.py | f7aebe86c7fe07415fabff67ac7d4fa8ccebf641 | [
"MIT"
] | permissive | Birkid/penter | 3a4b67801d366db15ca887c31f545c8cda2b0766 | 0200f40c9d01a84c758ddcb6a9c84871d6f628c0 | refs/heads/master | 2023-08-22T14:05:43.106499 | 2021-10-20T07:10:10 | 2021-10-20T07:10:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,141 | py | #!/usr/bin/env python
# Python 2/3 compatibility
from __future__ import print_function
import sys
PY3 = sys.version_info[0] == 3
if PY3:
xrange = range
import numpy as np
import cv2 as cv
from numpy import random
def make_gaussians(cluster_n, img_size):
points = []
ref_distrs = []
for _i in range(c... | [
"350840291@qq.com"
] | 350840291@qq.com |
f7cc3625a1915ecc9b75645903de41058b2871d8 | 41c0d29efcb3ac0e22237bd3fadc5cdf550698cd | /homeassistant/helpers/check_config.py | 4052a94b9de9b74054a64a28de168d2b2c8172b9 | [
"Apache-2.0"
] | permissive | EthanW1215/home-assistant | 7c19ce668821f3063b3d46f9e9a0ef5a6e102689 | a48ac4d18fab253572780671f896b3a417322699 | refs/heads/master | 2020-09-05T09:02:59.513681 | 2019-11-05T18:57:08 | 2019-11-05T18:57:08 | 220,050,094 | 2 | 0 | Apache-2.0 | 2019-11-06T17:13:33 | 2019-11-06T17:13:32 | null | UTF-8 | Python | false | false | 6,303 | py | """Helper to check the configuration file."""
from collections import OrderedDict, namedtuple
from typing import List
import attr
import voluptuous as vol
from homeassistant import loader
from homeassistant.core import HomeAssistant
from homeassistant.config import (
CONF_CORE,
CORE_CONFIG_SCHEMA,
CONF_PA... | [
"balloob@gmail.com"
] | balloob@gmail.com |
d7272c54660fa14d98ac4d2516403bfb2e29ff54 | 1284718203be50b23dcd1f6159746cfa42a04163 | /python_visual_mpc/visual_mpc_core/agent/create_configs_agent.py | a2b76acca59fe3533af98db31afeec8a2b65ee17 | [] | no_license | febert/robustness_via_retrying | 8fe4106d7705228ff339f9643518a80c0a243d36 | 1def282dc22f24b72c51ff1ef9ea1a7a83291369 | refs/heads/master | 2020-03-31T19:33:39.664525 | 2018-11-07T21:52:56 | 2018-11-07T21:52:56 | 152,502,702 | 17 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,042 | py | """ This agent is responsible for creating experiment configurations for benchmarks """
from .general_agent import GeneralAgent
class CreateConfigAgent(GeneralAgent):
def __init__(self, hyperparams):
super().__init__(hyperparams)
def rollout(self, policy, i_trial, i_traj):
# Take the sample.... | [
"sdasari@berkeley.edu"
] | sdasari@berkeley.edu |
4c751b204ddfbb53faf33d7dc3ac55f1264ffed0 | 66276325d623c894c9e6344bb161f3c25974a838 | /LeetCode/1000.Minimum-Cost-To-Merge-Stones/Minimum-Cost-To-Merge-Stones.py | 28e75801dcc20fa763cdee38273e25d1f9a94f16 | [] | no_license | htingwang/HandsOnAlgoDS | 034b5199b394ca82fd4fb16614ddabb45f3325e2 | 5b14b6f42baf59b04cbcc8e115df4272029b64c8 | refs/heads/master | 2021-07-11T15:50:30.944794 | 2020-09-27T05:08:02 | 2020-09-27T05:08:02 | 192,391,446 | 12 | 2 | null | 2019-07-03T04:09:35 | 2019-06-17T17:36:01 | Jupyter Notebook | UTF-8 | Python | false | false | 874 | py | import heapq
class Solution(object):
def mergeStones(self, stones, K):
"""
:type stones: List[int]
:type K: int
:rtype: int
"""
n = len(stones)
if (n - 1) % (K - 1): return -1
pre_sum = [0] * (n + 1)
for i in range(1, n + 1):
... | [
"49448790+htingwang@users.noreply.github.com"
] | 49448790+htingwang@users.noreply.github.com |
0665059974ce35e023c58e61975a130e51d29396 | 6d24fb1c67771e7285dea61840f9766013589dd1 | /manage.py | d7031ecdad34e4d427ed940b884e8d8c8477c930 | [] | no_license | PandaBalu/gglobal | b045fb66f7daea8eeb8d6c62f5dc872ff0b1b246 | c063c44c30d023bf562c0b4b39d10161540e7a92 | refs/heads/master | 2020-12-10T03:14:00.710720 | 2017-06-26T12:22:05 | 2017-06-26T12:22:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,028 | py | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.local')
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | [
"narnikgamarnikus@gmail.com"
] | narnikgamarnikus@gmail.com |
3738ae3586b803368bac15fdb7da8a6778e9353d | 473645b727129e33ab12b42ecece255db73dfcfc | /PatObjectOwnRefProducer/patobjectownrefproducer_cfg.py | bcd95a65ab955d338995758f308c9b88bc41d278 | [] | no_license | jpata/AnalysisModules | b3c17ff60ec31b76798ff8a473397b5728e96ca7 | 02d9d3e28f937c683616c7be4efeddf8874f571c | refs/heads/master | 2021-01-21T07:39:34.632912 | 2014-07-02T07:47:48 | 2014-07-02T07:47:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,644 | py | import FWCore.ParameterSet.Config as cms
import os
inFile = os.environ["TESTING_FILE"]
process = cms.Process("OWNPARTICLES")
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger=cms.Service("MessageLogger",
destinations=cms.untracked.vstring('cout'),
debugModules=cms.untracked.v... | [
"joosep.pata@gmail.com"
] | joosep.pata@gmail.com |
dfe1d9dd9dfdd2d164927e535fef2fab31bc1835 | 5e8342e4f6e48688f4a0079310e8f0b5e5386044 | /POO/Factura/factura.py | 9f45e3faba5e32f086d57287d8428a3e6b3f8bb6 | [] | no_license | fernado1981/python_ | 27a154406b5fba7e18da418bc5f75c58f3ccc24f | 7d846cd332405464fa14707ea3f2286a918fc9de | refs/heads/master | 2023-02-15T19:30:02.257345 | 2021-01-21T10:35:46 | 2021-01-21T10:35:46 | 277,186,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 978 | py | from InteractuarFactura import InteractuarFactura
# Escribir un programa que gestione las facturas pendientes de cobro de una empresa.
# Las facturas se almacenarán en un diccionario donde la clave de cada factura será el número de factura
# y el valor el coste de la factura. El programa debe preguntar al usuario si ... | [
"fernando.manrique.villanueva@gmail.com"
] | fernando.manrique.villanueva@gmail.com |
0f5bee18ae85a0d5b0a6a43a1130f89838d0cf3c | 49d419d657d4fc29b486fb97c4409b904fe43012 | /pytorch/synaptic/gan.py | 0efae754f48b139ef3a96e9884a969c73b9f460a | [] | no_license | anantguptadbl/python | 660101e7284fb24bd269659bb8f461f7f13d47b6 | 4954efbe52ff3190201a8c0836d80015d13d4d15 | refs/heads/master | 2022-03-23T03:52:47.956875 | 2022-02-24T12:26:29 | 2022-02-24T12:26:29 | 114,909,673 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,581 | py | import os
import numpy as np
import torch
import torchvision
from torch import nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torchvision import transforms, datasets
# FIRST SHAPE GAN
learning_rate=0.001
n_classes=4
embedding_dim=10
latent_dim=10
# CONDITIONAL GAN
class Generato... | [
"noreply@github.com"
] | anantguptadbl.noreply@github.com |
1cc02218743180f0e7cfee9382aa8e4dfc3a14f4 | b1018e272ed284ab70ffe6055b90726e879004b3 | /MIDI Remote Scripts/Push2/observable_property_alias.py | 9425fff2c4cd6cac938da28aa0e083b11d2b675d | [] | no_license | aumhaa/livepy_diff | 8e593ffb30b1e7909225352f3a0084d4de2e51e6 | 266a7380c4d5a162c051c23f534f74cb7eace538 | refs/heads/master | 2020-04-12T03:17:56.545373 | 2017-04-24T02:02:07 | 2017-04-24T02:02:07 | 13,946,086 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,299 | py |
from __future__ import absolute_import, print_function
from ableton.v2.base import EventObject, Slot
class ObservablePropertyAlias(EventObject):
def __init__(self, alias_host, property_host = None, property_name = '', alias_name = None, getter = None, *a, **k):
super(ObservablePropertyAlias, self).__init... | [
"aumhaa@gmail.com"
] | aumhaa@gmail.com |
3dec57ae1f1dbea2ae89aaa75b6bee067092dd1f | 865bd0c84d06b53a39943dd6d71857e9cfc6d385 | /179-largest-number/largest-number.py | 4bc8f0d54937b5992d4b0409c3c534c6cb19937f | [] | no_license | ANDYsGUITAR/leetcode | 1fd107946f4df50cadb9bd7189b9f7b7128dc9f1 | cbca35396738f1fb750f58424b00b9f10232e574 | refs/heads/master | 2020-04-01T18:24:01.072127 | 2019-04-04T08:38:44 | 2019-04-04T08:38:44 | 153,473,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | # Given a list of non negative integers, arrange them such that they form the largest number.
#
# Example 1:
#
#
# Input: [10,2]
# Output: "210"
#
# Example 2:
#
#
# Input: [3,30,34,5,9]
# Output: "9534330"
#
#
# Note: The result may be very large, so you need to return a string instead of an integer.
#
class... | [
"andyandwei@163.com"
] | andyandwei@163.com |
48b99421ac4eec624238b6abb45995860b5a7022 | fb64776f71eb2a469395a39c3ff33635eb388357 | /apps/accounts/tests/factories/user.py | 96bbc988f36a6f82a99567ea1bca2505a79beae1 | [
"MIT"
] | permissive | jimialex/django-wise | ec79d21c428fd1eea953362890051d2120e19f9e | 3fdc01eabdff459b31e016f9f6d1cafc19c5a292 | refs/heads/master | 2023-04-30T20:59:51.625190 | 2021-05-10T06:55:40 | 2021-05-10T06:55:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | # -*- coding: utf-8 -*-
import factory
from faker import Factory
from faker.providers import misc, person, profile
from apps.accounts.models.user import User
fake = Factory.create()
fake.add_provider(person)
fake.add_provider(profile)
fake.add_provider(misc)
def fake_username():
return fake.simple_profile()['u... | [
"vicobits@gmail.com"
] | vicobits@gmail.com |
96d9a1b535980b5c4821400c772bd1885d87ca2c | a12c090eb57da4c8e1f543a1a9d497abad763ccd | /django-stubs/forms/utils.pyi | 0131077285c5d3dbc9de498e79682756eb713275 | [
"BSD-3-Clause"
] | permissive | debuggerpk/django-stubs | be12eb6b43354a18675de3f70c491e534d065b78 | bbdaebb244bd82544553f4547157e4f694f7ae99 | refs/heads/master | 2020-04-04T08:33:52.358704 | 2018-09-26T19:32:19 | 2018-09-26T19:32:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,779 | pyi | from collections import UserList
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
from django.core.exceptions import ValidationError
from django.utils.safestring import SafeText
def pretty_name(name: str) -> str: ...
def flatatt(attrs: Dict[str, Optional[str]])... | [
"maxim.kurnikov@gmail.com"
] | maxim.kurnikov@gmail.com |
82e4a2ec6b46eff9f8e2a406b016bbc33060b85f | 6ff318a9f67a3191b2a9f1d365b275c2d0e5794f | /python/小练习/socket.py | f649e706ec3dcebf2cd1769b94c7c70fb4f9a757 | [] | no_license | lvhanzhi/Python | c1846cb83660d60a55b0f1d2ed299bc0632af4ba | c89f882f601898b5caab25855ffa7d7a1794f9ab | refs/heads/master | 2020-03-25T23:34:00.919197 | 2018-09-13T12:19:51 | 2018-09-13T12:19:51 | 144,281,084 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,429 | py | # 1、买手机
import socket
phone = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # tcp称为流式协议,udp称为数据报协议SOCK_DGRAM
# print(phone)
# 2、插入/绑定手机卡
# phone.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
phone.bind(('127.0.0.1', 8080))
# 3、开机
phone.listen(5) # 半连接池,限制的是请求数
# 4、等待电话连接
print('start....')
while True... | [
"1541860665@qq.com"
] | 1541860665@qq.com |
fcfcac8d51858207750e6f6453a9f9c6478ac802 | b3ab2979dd8638b244abdb2dcf8da26d45d7b730 | /test/test_related_permission_model.py | 990172835c1b8a26c3210da6641997d46a7c88b8 | [] | no_license | CU-CommunityApps/ct-cloudcheckr-cmx-client | 4b3d9b82c5dfdaf24f8f443526868e971d8d1b15 | 18ac9fd4d6c4ae799c0d21745eaecd783da68c0c | refs/heads/main | 2023-03-03T19:53:57.685925 | 2021-02-09T13:05:07 | 2021-02-09T13:05:07 | 329,308,757 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | # coding: utf-8
"""
CloudCheckr API
CloudCheckr API # noqa: E501
OpenAPI spec version: v1
Contact: support@cloudcheckr.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import cloudcheckr_cmx_client
from cloudcheckr... | [
"pea1@cornell.edu"
] | pea1@cornell.edu |
8567a2b83ce96aee7862a2f85ae3ce4df8398a62 | 53192abcbb297198128952df6ceed17a32cb5f1f | /pyidml/models/tags.py | 1e1fcd76f396d48e9313ac2465021f33ae9f0098 | [] | no_license | guardian/pyidml | 2e4ba754c6487eb94193db3a74b32a7b58d79384 | 39afddfee9c432aa5ff12d526aad0eebd2ac66a3 | refs/heads/master | 2022-07-01T21:03:46.011695 | 2015-08-10T12:44:42 | 2015-08-10T12:44:42 | 987,182 | 5 | 8 | null | 2022-06-17T21:07:33 | 2010-10-14T14:51:16 | Python | UTF-8 | Python | false | false | 401 | py | from pyidml.fields import *
from pyidml.models import Element, Properties
class Tags(Element):
DOMVersion = StringField()
class XMLTagProperties(Properties):
TagColor = StringField() # TODO InDesignUIColorType_TypeDef
class XMLTag(Element):
Self = StringField(required=True)
Name = StringField(re... | [
"ben@firshman.co.uk"
] | ben@firshman.co.uk |
3f7f296b636c36d74be827a2e22cbcf0d2ca042d | 028d788c0fa48a8cb0cc6990a471e8cd46f6ec50 | /Python-OOP/Iterators-Generators/Exercise/09_permutations.py | 0398ec46a79574384144b0fc86190ae53603e0df | [] | no_license | Sheko1/SoftUni | d6b8e79ae545116f4c0e5705ad842f12d77a9c9d | a9fbeec13a30231b6a97c2b22bb35257ac1481c0 | refs/heads/main | 2023-07-13T15:39:48.826925 | 2021-08-21T12:51:02 | 2021-08-21T12:51:02 | 317,266,200 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | from itertools import permutations
def possible_permutations(data):
result = permutations(data)
for el in result:
yield [*el]
[print(n) for n in possible_permutations([1, 2, 3])]
| [
"martinkypar@gmail.com"
] | martinkypar@gmail.com |
51d49121dddb8c05767b1d8f43bd424a39fa97d0 | 552bc626603a1757cf7836401cff5f0332a91504 | /django/django-instagram-clone_kindfamily/instaclone-backend/accounts/admin.py | 05daffd421368208ed05399d35596a5e4d5b43c7 | [] | no_license | anifilm/webapp | 85f3d0aae34f46917b3c9fdf8087ec8da5303df1 | 7ef1a9a8c0dccc125a8c21b22db7db4b9d5c0cda | refs/heads/master | 2023-08-29T18:33:00.323248 | 2023-08-26T07:42:39 | 2023-08-26T07:42:39 | 186,593,754 | 1 | 0 | null | 2023-04-21T12:19:59 | 2019-05-14T09:49:56 | JavaScript | UTF-8 | Python | false | false | 559 | py | from django.contrib import admin
from .models import Profile, Follow
class FollowInline(admin.TabularInline):
model = Follow
fk_name = 'from_user'
@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
list_display = ['id', 'nickname', 'user']
list_display_links = ['nickname', 'user']
sea... | [
"anifilm02@gmail.com"
] | anifilm02@gmail.com |
4c2b2d67d7dc4ec40f448d6cdbeaca6b5577c01c | ef5f369a8fb3978dbb57cdab2c0f83880fa43c36 | /amatino/ledger_order.py | 048e9ff9e8eb4cb348903040d2c78b4fc6279022 | [
"MIT"
] | permissive | pypi-buildability-project/amatino-python | c8a93c849d9e97ea907d411511a0c732ee51b29e | 9178e0883b735f882729c19a7a68df68b49e057b | refs/heads/master | 2022-07-19T12:24:06.587840 | 2020-05-21T05:28:08 | 2020-05-21T05:28:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | """
Amatino API Python Bindings
Ledger Order Module
Author: hugh@amatino.io
"""
from enum import Enum
class LedgerOrder(Enum):
OLDEST_FIRST = True
YOUNGEST_FIRST = False
| [
"hugh.jeremy@gmail.com"
] | hugh.jeremy@gmail.com |
31192339ea0302d32f15714aa4d5d108ec2ff4b1 | 443416bab5d7c258936dae678feb27de6c537758 | /kratos/python_scripts/application_generator/classes/variableCreator.py | 27d35d56986e388d58e7fe4caacfbe7e247208c9 | [
"BSD-3-Clause"
] | permissive | pyfsi/Kratos | b941e12594ec487eafcd5377b869c6b6a44681f4 | 726aa15a04d92c958ba10c8941ce074716115ee8 | refs/heads/master | 2020-04-27T17:10:10.357084 | 2019-11-22T09:05:35 | 2019-11-22T09:05:35 | 174,507,074 | 2 | 0 | NOASSERTION | 2020-03-27T16:38:28 | 2019-03-08T09:22:47 | C++ | UTF-8 | Python | false | false | 2,293 | py | from __future__ import print_function, absolute_import, division
from utils.constants import ctab
class VariableCreator(object):
def __init__(self, name, vtype, is3D=False):
''' Creates a variable for an application
Input
-----
- name: string
name of t... | [
"roigcarlo@gmail.com"
] | roigcarlo@gmail.com |
a5c0765f4077d63debef0b2e1bd84bb5f445cc20 | 851e327e5e75392aa755f3d699b474846b886623 | /qa/rpc-tests/smartfees.py | f453a2a7c1f68b8c3ebceb91cfdbdb5c58314971 | [
"MIT"
] | permissive | advantage-development/v4 | 140535cfb56e789459078de030c7455ef3228e8f | 59245b326a2b1e488be77816dad9c32166465c73 | refs/heads/master | 2021-10-09T15:32:34.396521 | 2018-12-30T16:25:43 | 2018-12-30T16:25:43 | 163,597,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,309 | py | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcredit Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test fee estimation code
#
from test_framework import BitcreditTestFramework
from bitcreditrpc.authprox... | [
"you@example.com"
] | you@example.com |
618e2b66a661669d15aebbce7f698055d592a0ef | c049d678830eb37879589a866b39f8e72186a742 | /upcfcardsearch/c301.py | 0a57ec0a5d0c8b1861615d90c6339ee5cee31ad4 | [
"MIT"
] | permissive | ProfessorSean/Kasutamaiza | 682bec415397ba90e30ab1c31caa6b2e76f1df68 | 7a69a69258f67bbb88bebbac6da4e6e1434947e6 | refs/heads/main | 2023-07-28T06:54:44.797222 | 2021-09-08T22:22:44 | 2021-09-08T22:22:44 | 357,771,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,017 | py | import discord
from discord.ext import commands
from discord.utils import get
class c301(commands.Cog, name="c301"):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command(name='Mage\'s_Magic', aliases=['c301'])
async def example_embed(self, ctx):
embed = discord.Embed(tit... | [
"professorsean3@gmail.com"
] | professorsean3@gmail.com |
387008f8bd1d7b7e2da36f90cdf6c06072c8b63d | 76cef2e2909ffaa6f6b594a8fd1aaaa9b754a69b | /netmiko/scp_handler.py | 5e0fb7d0cc0c75aea57b5907f566f8ba35c55ec4 | [
"MIT"
] | permissive | jinesh-patel/netmiko | 978b7747ea2dea3a8b05208313ffc74846d9c2fc | f19b51f9de783a06102d74ef9780ca8547eb2f89 | refs/heads/master | 2021-01-18T05:16:16.285330 | 2015-09-04T01:16:34 | 2015-09-04T01:16:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,416 | py | '''
Create a SCP side-channel to transfer a file to remote network device.
SCP requires a separate SSH connection.
Currently only supports Cisco IOS.
'''
from __future__ import print_function
from __future__ import unicode_literals
import re
import os
import hashlib
import paramiko
import scp
class SCPConn(objec... | [
"ktbyers@twb-tech.com"
] | ktbyers@twb-tech.com |
f10d440a207cdc966fcc27e8e8a60b4fe07de07f | ee6ec35a80351480d566b5c65ae331a0f6f577ee | /models/tempdb_tdc.py | ec464c80db58a3e4cf9f2425672a584466aae249 | [] | no_license | aroodooteam/connecteur_aro_tempdb | d262103a816156e73a4c30fd86ad6175f449a8b3 | f29629a6b380487e6a38cb98344b446ecb49adf5 | refs/heads/master | 2020-03-12T14:05:21.855008 | 2018-04-23T08:28:01 | 2018-04-23T08:28:01 | 130,658,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | # -*- coding: utf-8 -*-
from openerp import models, fields
class TempdbTdc(models.Model):
_name = 'tempdb.tdc'
_description = 'Load tempdb_tdc in recup nom apporteur'
name = fields.Char(string='Name')
statut = fields.Char(string='Statut')
agence = fields.Char(string='Agence', size=4)
old = f... | [
"aroodoo@asus.aro"
] | aroodoo@asus.aro |
7a7d02691a84fce6559b63583b7262b88c04daa9 | ad59fb12042bfd3f5c43eca057d0f747f9e148cf | /Se2iP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/tsiplayer/addons/resources/hosters/dustreaming.py | 07a22d09c704cc118d14249ac2bf9d521d16dc1e | [] | no_license | lexlong2007/eePlugins | d62b787100a7069ad5713a47c5688008063b45ec | 167b262fe36901a2d3a2fae6d0f85e2307b3eff7 | refs/heads/master | 2022-03-09T05:37:37.567937 | 2022-02-27T01:44:25 | 2022-02-27T01:44:25 | 253,012,126 | 0 | 0 | null | 2020-04-04T14:03:29 | 2020-04-04T14:03:29 | null | UTF-8 | Python | false | false | 2,140 | py | #-*- coding: utf-8 -*-
#Vstream https://github.com/Kodi-vStream/venom-xbmc-addons
from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.lib.handler.requestHandler import cRequestHandler
from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.hosters.hoster import iHoster
from Plugins.Extensions.IPTVPl... | [
"zdzislaw22@windowslive.com"
] | zdzislaw22@windowslive.com |
25daeb07963fe92517947f4aa8197cc45303103d | 68e65df90da9169733025dfede0a8b30a5e3d7e3 | /Inheritance_and_More_on_OOPS/11_practice_test2.py | a5a4b0e8cd0c57a3f7980babe409762b8328ee98 | [] | no_license | shubam-garg/Python-Beginner | 290346cbb309a28d28d6ac04034cb084b71ccbc6 | 30742006c380a0a18aff574567a95c8b8c694754 | refs/heads/main | 2023-05-06T07:11:29.943475 | 2021-05-29T20:35:59 | 2021-05-29T20:35:59 | 354,527,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | ''' create a class pets from class animals and further create class dog from pets,
add a method bark to class dog '''
class animals:
animaltype="Mammal"
class pets(animals):
petcolor="Black"
class dog(pets):
@staticmethod
def bark():
print("dog")
d=dog()
d.bark() | [
"81907680+shubam-garg@users.noreply.github.com"
] | 81907680+shubam-garg@users.noreply.github.com |
ca6db4381b477d224e0c52a8e60201f6444ddf5d | 1d0a4750e216f301ec49a247bf7bf07cd61fa29f | /app/views/reports/integration/advantage_payroll/advantage_payroll_client_setup_csv.py | fcfcf75d4a02f73167a6dcc346bf96726af2ace1 | [] | no_license | smoothbenefits/BenefitMY_Python | 52745a11db2cc9ab394c8de7954974e6d5a05e13 | b7e8474a728bc22778fd24fe88d1918945a8cfc8 | refs/heads/master | 2021-03-27T15:57:34.798289 | 2018-04-29T19:04:04 | 2018-04-29T19:04:04 | 24,351,568 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | from rest_framework.response import Response
from django.http import HttpResponse
from django.http import Http404
from app.views.reports.report_export_view_base import ReportExportViewBase
from app.service.Report.integration.advantage_payroll.advantage_payroll_company_setup_csv_service \
import AdvantagePayrollCo... | [
"jeffzhang_misc@hotmail.com"
] | jeffzhang_misc@hotmail.com |
ab58404bbcdbd307415fd151a7e798392d35f0f6 | 25872e1ba4f86cbbf77d0130f341b21e5dd9e692 | /GameOfLife.py | 00600969a68b00f6a35c13b6dc1b798ddd428888 | [] | no_license | zongxinwu92/leetcode | dc3d209e14532b9b01cfce6d4cf6a4c2d7ced7de | e1aa45a1ee4edaf72447b771ada835ad73e7f508 | refs/heads/master | 2021-06-10T21:46:23.937268 | 2017-01-09T09:58:49 | 2017-01-09T09:58:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,468 | py | '''
Created on 1.12.2017
@author: Jesse
''''''
According to the Wikipedia s article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."
Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Eac... | [
"darrencheng0817@gmail.com"
] | darrencheng0817@gmail.com |
f97ae739b9877f4e5efd4375b1584c6b49da597b | 857d8f44ee11e7bf6972486e6be875aec9fff819 | /mythx_cli/formatter/util.py | 2d3396ae2ec6cc29ee9e594243ada061ecc91e95 | [
"MIT"
] | permissive | s0b0lev/mythx-cli | dfe45adfb41163098d08bf1849c48083241b22e5 | 27dc1c4ce1d87fbd02be4d32c5fbb4281da7c53c | refs/heads/master | 2022-04-10T21:18:20.506815 | 2020-03-27T10:32:23 | 2020-03-27T10:32:23 | 250,260,634 | 0 | 0 | MIT | 2020-03-26T13:05:12 | 2020-03-26T13:05:11 | null | UTF-8 | Python | false | false | 4,404 | py | """Utility functions for handling API requests and responses."""
from typing import List, Union
import click
from mythx_models.response import DetectedIssuesResponse, Severity
SEVERITY_ORDER = (
Severity.UNKNOWN,
Severity.NONE,
Severity.LOW,
Severity.MEDIUM,
Severity.HIGH,
)
def get_source_loca... | [
"dmuhs@protonmail.ch"
] | dmuhs@protonmail.ch |
ca42bf7575d962f0e1942732e0aa257c00973a2a | 8a66b19e38ea5042dfd454634ff434dfe9f297b0 | /data/output/4_original | 3ede26cf818b59cd261aab203d184b456b3769e3 | [] | no_license | KqSMea8/pythonanalyzer | 6a8adbf945d8d2febcf3e1084bb9d673f89210d7 | d4ac77ed1644081e028c791d9b64e9dfebad06e8 | refs/heads/master | 2020-05-19T21:08:10.645730 | 2019-05-06T14:45:57 | 2019-05-06T14:45:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 251 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "twobuntu.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"rares.begu@gmail.com"
] | rares.begu@gmail.com | |
a26ece7a4286b44a672d498df8c9eae03da97dad | 707d702cd2628938829bbab2275da9a52c88666b | /pamlJob.py | 5f9acbc996bfbede0b001a389d2a609346ef1466 | [] | no_license | MaciekZZZ/project-lazarus | 682a7f87ed2f2c857bd839abea0360505156ead6 | e5b34a4b98c7b064044b98a58a329bf954e65560 | refs/heads/master | 2021-01-01T18:42:04.760323 | 2015-03-15T13:51:56 | 2015-03-15T13:51:56 | 32,376,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,841 | py | ##############################################################################
#
# PamlJob class:
# a class containing the logic for writing codeml and baseml *.ctl files,
# and logic to parse and store the results from codeml and baseml.
#
#
# Author: Victor Hanson-Smith
# Contact: victorhs@cs.uoregon.edu
#
##########... | [
"victorhansonsmith@gmail.com"
] | victorhansonsmith@gmail.com |
8c4fd996268da9a039352a06d3bf2b53964c5823 | d2c4934325f5ddd567963e7bd2bdc0673f92bc40 | /tests/model_control/detailed/transf_Integration/model_control_one_enabled_Integration_MovingAverage_Seasonal_MonthOfYear_LSTM.py | de9aad1d33d18bc660e961d2021163f758b52956 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jmabry/pyaf | 797acdd585842474ff4ae1d9db5606877252d9b8 | afbc15a851a2445a7824bf255af612dc429265af | refs/heads/master | 2020-03-20T02:14:12.597970 | 2018-12-17T22:08:11 | 2018-12-17T22:08:11 | 137,104,552 | 0 | 0 | BSD-3-Clause | 2018-12-17T22:08:12 | 2018-06-12T17:15:43 | Python | UTF-8 | Python | false | false | 175 | py | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Integration'] , ['MovingAverage'] , ['Seasonal_MonthOfYear'] , ['LSTM'] ); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
ba2ffe1645eb7f733945e851d169d43d91d13d2c | 9d5c9d9373002ab4ed1b493136517e8b4ab160e5 | /saas/settings.py | 4814fc8298fcc4faf4f4d40742c94562e265bd4f | [
"MIT"
] | permissive | robert871126/bk-iam-saas | f8299bb632fc853ef0131d445f84c6084fc84aba | 33c8f4ffe8697081abcfc5771b98a88c0578059f | refs/heads/master | 2023-08-23T19:23:01.987394 | 2021-10-22T09:45:28 | 2021-10-22T09:45:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,674 | py | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | [
"zhu327@gmail.com"
] | zhu327@gmail.com |
97af4069785fc222565c74b0af560d0127c1eca7 | e04dbc32247accf073e3089ed4013427ad182c7c | /ATC001/A.py | 4916c3a117c874c47ef9b69f46996605e1b5dd07 | [] | no_license | twobooks/atcoder_training | 9deb237aed7d9de573c1134a858e96243fb73ca0 | aa81799ec87cc9c9d76de85c55e99ad5fa7676b5 | refs/heads/master | 2021-10-28T06:33:19.459975 | 2021-10-20T14:16:57 | 2021-10-20T14:16:57 | 233,233,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | # 深さ優先探索
import sys
sys.setrecursionlimit(1000000)
H,W = list(map(int,input().split()))
S = []
for i in range(H):
s = input()
S.append(s)
for i in range(H):
for j in range(W):
if S[i][j]=="s":
si,sj = i,j
if S[i][j]=="g":
gi,gj = i,j
visited = []
for i in range(H):... | [
"twobookscom@gmail.com"
] | twobookscom@gmail.com |
73cbc8e528416492b2e495cde3816dc5a35812c6 | e6793e7eb54d2105c373a8af7ebc653b7ad94575 | /multibody/shapes/BUILD.bazel | 7e9deed720cf5296b37fd0ca5a6f0877a3f346dd | [
"BSD-3-Clause"
] | permissive | nikaven/drake | 5c59e88f79b530ddf62496452959abeaf8fff1e3 | 34bab4ecaa34ac09ade6dcb11cf7bc0d13c5bd4e | refs/heads/master | 2020-03-31T01:37:25.441270 | 2018-10-05T19:42:22 | 2018-10-05T19:42:22 | 151,788,663 | 7 | 0 | null | 2018-10-05T23:37:07 | 2018-10-05T23:37:07 | null | UTF-8 | Python | false | false | 341 | bazel | # -*- python -*-
load(
"//attic:build_macros.bzl",
"add_attic_aliases",
)
load("//tools/lint:lint.bzl", "add_lint_tests")
load("//multibody/rigid_body_plant:warning.bzl", "WARNING") # For side effect.
package(default_visibility = ["//visibility:public"])
add_attic_aliases([
"shapes",
"test_models",
... | [
"jeremy.nimmer@tri.global"
] | jeremy.nimmer@tri.global |
04a1ac59ec41153c92aff505a32d2c7f77a81895 | 96c970ebacd9ade1493f4d01537005788b43a49b | /pychron/pyscripts/tasks/pyscript_plugin.py | 374747cc5a5e87b032cd0e4c3bc54be69e15aac7 | [
"Apache-2.0"
] | permissive | OSUPychron/pychron | d2da9051b68024200d0009de634da810ccef2a0d | fe0ba9daff9548fa8bebab26db66a1cefff7c1d6 | refs/heads/master | 2021-01-14T12:47:26.389887 | 2015-12-18T22:27:02 | 2015-12-18T22:27:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,851 | py | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | [
"jirhiker@gmail.com"
] | jirhiker@gmail.com |
93bb1b68101317784173698ba340d4098e7a5b85 | 1518483f16e735453a0e154a6619a4f5228874f6 | /tests/test_decisiontree.py | fa371888854879d3dbb15a254f417cc897f666b1 | [
"MIT"
] | permissive | jdvelasq/decisions-tree | 8e156c4828e5a1e00f583bbdb88d5a3b9c7f6e3d | 54f886e82784c4061200d843841ef600b0ac366b | refs/heads/master | 2023-06-04T03:47:45.741438 | 2021-06-28T13:46:40 | 2021-06-28T13:46:40 | 134,651,498 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | """Tests
"""
from decisions_tree.decision_tree import DecisionTree
def test_terminal_node_creation():
"""test"""
tree = DecisionTree()
tree.terminal_node()
assert tree.data[0].type == "TERMINAL"
assert tree.data[0].expr is None
assert tree.data[0].id == 0
| [
"jdvelasq@unal.edu.co"
] | jdvelasq@unal.edu.co |
066317e9308f2b0748697df1abf9aad98c762cc9 | e7fab7a59d8d1a3ee5528e5e7505e428764636cd | /rich/bar.py | 65a28dfc8d9b0b5300b60feea35c82b079b2dc12 | [
"MIT"
] | permissive | diek/rich | 081c2480d3191316d9d027d31b12a9668fa19666 | e5c300d5b0f4ada0a0f7588c660a5fd29fbaee64 | refs/heads/master | 2021-05-19T11:24:57.445723 | 2020-03-31T15:49:31 | 2020-03-31T15:49:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,719 | py | from typing import Union
from .console import Console, ConsoleOptions, RenderResult
from .measure import Measurement
from .segment import Segment
from .style import StyleType
class Bar:
"""Renders a (progress) bar.
Args:
total (float, optional): Number of steps in the bar. Defaults to 100.
... | [
"willmcgugan@gmail.com"
] | willmcgugan@gmail.com |
15906a69c4081328b1d41f3787ea24a51ec6661e | 2ff7e53d5e512cd762217ca54317982e07a2bb0c | /eve-8.51.857815/eve/client/script/ui/eveUIProcs.py | 9b8e14ca0f30664bf20829b79156c71b233b36df | [] | no_license | nanxijw/Clara-Pretty-One-Dick | 66d3d69426642b79e8fd4cc8e0bec23adeeca6d6 | 50de3488a2140343c364efc2615cf6e67f152be0 | refs/heads/master | 2021-01-19T09:25:07.555284 | 2015-02-17T21:49:33 | 2015-02-17T21:49:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,444 | py | #Embedded file name: eve/client/script/ui\eveUIProcs.py
import uthread
import eve.common.script.sys.eveCfg as util
import locks
import random
import svc
import carbonui.const as uiconst
import localization
class EveUIProcSvc(svc.uiProcSvc):
"""
Manages ActionProcs for UI systems (camera, audio, and UI).
... | [
"billchang.e@gmail.com"
] | billchang.e@gmail.com |
9b744106637d8aa581bb460af23d834cce11ef2d | 1a7487e3d8129c3e469b4faabf7daf0284a2cb15 | /vedastr/models/bodies/sequences/transformer/decoder.py | 5d7daa881078194722165ae99efbb4c5acd6c5e2 | [
"Apache-2.0"
] | permissive | kkalla/vedastr | 67715bfc05c4ab633fe20f82193e13c21a951a82 | d9e237fb8fbd79d36ed314bf9f902796ec210fb4 | refs/heads/master | 2023-01-03T09:01:18.960161 | 2020-11-02T09:01:35 | 2020-11-02T09:01:35 | 284,680,371 | 0 | 0 | Apache-2.0 | 2020-11-02T09:01:37 | 2020-08-03T11:20:00 | null | UTF-8 | Python | false | false | 1,143 | py | import logging
import torch.nn as nn
from .position_encoder import build_position_encoder
from .unit import build_decoder_layer
from ..registry import SEQUENCE_DECODERS
from vedastr.models.weight_init import init_weights
logger = logging.getLogger()
@SEQUENCE_DECODERS.register_module
class TransformerDecoder(nn.M... | [
"jun.sun@media-smart.cn"
] | jun.sun@media-smart.cn |
60c4aecd5a79cd0c5d197007fbce2340680664f7 | 28c79c447c75e2cd4522c93072d99797c71aae63 | /BMO/pyamazon.py | e63d235103fe3f405e3f2ffe52a0af6dcf70c3d7 | [] | no_license | tsuyukimakoto/bmo | bee8802455a376026879a02f0c12e0c988dbdc20 | 7593eb6ff9d7061d218e9082f122d11d04533c45 | refs/heads/master | 2020-03-23T01:38:25.669405 | 2010-09-23T05:46:12 | 2010-09-23T05:46:12 | 140,928,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,379 | py | # -*- coding: utf8 -*-
#
# pyamazon.py
# pyshelf
#
# Created by makoto tsuyuki on 07/11/04.
# Copyright (c) 2007 everes.net All rights reserved.
#
from datetime import datetime
import httplib, urllib
from xml.etree import ElementTree
class Item(object):
def __init__(self, asin='', sales_rank=0, image='',
... | [
"mtsuyuki@gmail.com"
] | mtsuyuki@gmail.com |
b03809df39fd0f8958db0be4187d666d5eb404a3 | f340b9f47aaf11d95911074efd16e2878b4608c5 | /200119/Word_Ladder_II.py | 2e7dde5aba0ce910314145023958a13983352978 | [] | no_license | Jsonghh/leetcode | 150020d1250a7e13e7387a545b4eb7df0de8f90b | 3a83c0b0bcc43f458f7fc54764f60e1104fcc12e | refs/heads/master | 2020-11-25T03:12:48.842151 | 2020-02-11T02:56:58 | 2020-02-11T02:56:58 | 228,475,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,596 | py | class Solution:
def findLadders(self, beginWord: str, endWord: str, wordList: List[str]) -> List[List[str]]:
if endWord not in wordList:
return []
d = {}
results = []
wordList = set(wordList)
wordList.add(beginWord)
self.bfs(beginWord, endWord, wordList, ... | [
"jiesonghe@outlook.com"
] | jiesonghe@outlook.com |
3828b38f141bfab5bd065764b8b7c70f84420fc1 | e818cf45e9c2f081bb64954f515540bdab25b9d1 | /polls/views.py | 1e01d3456a36915082fb8d3b3294ec716d39e2bd | [] | no_license | Timothy-py/Polls-API | bfccefbfe0da4ccbc4d8fd39ba4fe14e66b3227d | d354795e4bba43c99bab71020693568e625d677c | refs/heads/master | 2020-09-23T22:30:48.575799 | 2019-12-12T15:07:54 | 2019-12-12T15:07:54 | 225,603,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 727 | py | from django.shortcuts import render, get_object_or_404
from .models import Poll
from django.http import JsonResponse
# Create your views here.
def polls_list(request):
MAX_OBJECT = 20
polls = Poll.objects.all()[:MAX_OBJECT]
data = {
"results":
list(
polls.va... | [
"adeyeyetimothy33@gmail.com"
] | adeyeyetimothy33@gmail.com |
3af06f91d8ff98ed52d65a90a64b68decc2c5ee6 | 8e84a9e8ecd1c34655abb1c13953847d09a0cfa9 | /flaskify/users/utils.py | 28dfead42bc9769dda9dcdb2b41b8d19382b5b1b | [] | no_license | pzrsa/flaskify | 7e691003c52120024a118f1d4da423dcaf71bf65 | 2048f985ac146d705ccf0ebecc4aff7557941b90 | refs/heads/main | 2023-05-29T02:09:05.945742 | 2021-06-05T12:41:08 | 2021-06-05T12:41:08 | 342,721,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | import os
import secrets
from flask import current_app, url_for
from flask_mail import Message
from flaskify import mail
from PIL import Image
def save_picture(form_picture):
random_hex = secrets.token_hex(8)
_, f_ext = os.path.splitext(form_picture.filename)
picture_fn = random_hex + f_ext
picture_p... | [
"parsamesg@gmail.com"
] | parsamesg@gmail.com |
7f964d0809de5e49d94710f14427e6408190922d | 4795320bf7013c9aabd10b48656e541335647f7f | /cov_search/migrations/0002_auto_20150629_0427.py | f2a7040a8646d29ebbaf6df46ea4d5f9099cb3af | [] | no_license | dgrant/city_of_vancouver_programs_search | 7295de3aad1ab3885c9b30e086230a6fff740791 | 33dfca03ccd434b39f01981890b195b384c1a2e0 | refs/heads/master | 2023-07-09T09:59:03.417301 | 2016-08-20T06:25:52 | 2016-08-20T06:25:52 | 38,360,943 | 0 | 0 | null | 2023-09-05T20:01:58 | 2015-07-01T09:03:22 | Python | UTF-8 | Python | false | false | 405 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cov_search', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='season',
name='nam... | [
"davidgrant@gmail.com"
] | davidgrant@gmail.com |
e06dfef674f9aeccead93fa370a718e85f13e148 | c1bd12405d244c5924a4b069286cd9baf2c63895 | /azure-mgmt-monitor/azure/mgmt/monitor/models/sender_authorization_py3.py | fc908dab0e932162faf915093cfa43a7444cfaf5 | [
"MIT"
] | permissive | lmazuel/azure-sdk-for-python | 972708ad5902778004680b142874582a284a8a7c | b40e0e36cc00a82b7f8ca2fa599b1928240c98b5 | refs/heads/master | 2022-08-16T02:32:14.070707 | 2018-03-29T17:16:15 | 2018-03-29T17:16:15 | 21,287,134 | 1 | 3 | MIT | 2019-10-25T15:56:00 | 2014-06-27T19:40:56 | Python | UTF-8 | Python | false | false | 1,456 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
e09029b8bdce7a1f1555291c2e52c40ab50564d3 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/18/usersdata/63/6289/submittedfiles/maiormenor.py | c4ed26b8ed5ca3e8a1e42c244d6514c6f567a004 | [] | 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 | 787 | py | # -*- coding: utf-8 -*-
from __future__ import division
import math
a = input('Digite o número 1: ')
b = input('Digite o número 2: ')
c = input('Digite o número 3: ')
d = input('Digite o número 4: ')
e = input('Digite o número 5: ')
if a<b and a<c and a<d and a<e:
print('%d : %a')
if b<a and b<c and b<d and b<e:
... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
e6c0583c3b6f7c457ae78296d323d908036191f0 | d697fe447506ce4c179d1c77144f84b525304cec | /ch4_populations_cdf.py | 0352412cda206361b24ff49ccdf3b9eb2d8a9a51 | [] | no_license | leosartaj/thinkstats | a97004d1e906660877d1244844f22ab01b13d7d6 | 6345d88e113fa4b347bd45d519c0fb6813402cab | refs/heads/master | 2021-01-10T08:44:09.168668 | 2015-12-07T04:28:05 | 2015-12-07T04:28:05 | 47,359,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | import sys
import populations
import Cdf
import myplot
def main(filename):
pops = populations.ReadData(filename)
cdf = Cdf.MakeCdfFromList(pops)
myplot.Cdf(cdf, transform='pareto')
myplot.Show()
if __name__ == '__main__':
main(sys.argv[1])
| [
"singhsartaj94@gmail.com"
] | singhsartaj94@gmail.com |
6b824b3f9703c6ad5c7f14d9619e1ae1dba1d2c3 | 17bd8f50704f5d8026d298b0c940aab68af591a0 | /tests/test_common.py | 2e006a77d00e10bda67230d546cefc19bece66e9 | [] | no_license | Pebaz/mini-rh-project | bdaeef15e1872c7411f274f2949c49d4cb0fdb50 | d4b219ddb725cf53d08ed46abf3f973d06cc03ce | refs/heads/master | 2020-07-01T18:45:49.437877 | 2019-08-15T02:12:33 | 2019-08-15T02:12:33 | 201,260,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 350 | py | """
This needs to be imported on every test file so that the test files can import
modules from the `rh` package.
"""
import sys
sys.path.append('.')
from rh.data import *
top_10_genres_by_profit = get_top_10_genres_by_profit()
top_10_actors_by_profit = get_top_10_actors_by_profit()
top_10_directors_by_profit = get... | [
"pebazium@gmail.com"
] | pebazium@gmail.com |
96519c0d5f429ea1fea9725f22f98c7d3c367fc6 | 6b96bf434ec11fd2d8b7870861da25d6336b365a | /tests/test_project.py | 3a2911498487fbdf500c5d84c44b6947f97f25b9 | [
"MIT"
] | permissive | gzcf/polyaxon-schemas | 68b908badef6bb06a1ad31af337a435ac87ed230 | a381280cd7535f64158d52f0a9eff2afec997d90 | refs/heads/master | 2020-03-10T04:55:48.023279 | 2018-04-12T12:47:53 | 2018-04-12T12:47:53 | 129,204,842 | 0 | 0 | MIT | 2018-04-12T06:37:36 | 2018-04-12T06:37:36 | null | UTF-8 | Python | false | false | 5,335 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import uuid
from unittest import TestCase
from marshmallow import ValidationError
from tests.utils import assert_equal_dict
from polyaxon_schemas.experiment import ExperimentConfig
from polyaxon_schemas.project import Experimen... | [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
8c9dc482eca7116299722e5d57d347fbc4a3126c | cfd515074626477b689b5763d7e8cff42af04817 | /kagenomise/products/vocabulary/clothing_sizes.py | cdce81b68c21b87136cab1515c946cbf0052a496 | [] | no_license | kagesenshi/kagenomise.products | cbe29c424b94e8917203254824a3e878aa69f439 | 3eb9e3a74d472e0bd7daa03e1dae4e5aa34a7818 | refs/heads/master | 2021-01-15T10:47:49.199010 | 2013-05-19T10:58:42 | 2013-05-19T10:58:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | from five import grok
from zope.schema.interfaces import IContextSourceBinder
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
from zope.schema.interfaces import IVocabularyFactory
from zope.component import getUtility
from z3c.formwidget.query.interfaces import IQuerySource
class ClothingSizes(grok.Glo... | [
"izhar@inigo-tech.com"
] | izhar@inigo-tech.com |
c8334fd40f30e0a61067cbccc1a7767772698b3a | 9f6fda1683fd3993c62b7c04cbbe54d3f8b932f2 | /Demo/MysqlDemo/demo.py | e4fb2e7d0fc14756ace4fc3e8faed6dc79e57f53 | [] | no_license | dajun928/Demo | 89f457bd324f1903ac217223a6f712af18e10bef | 8318cee62b0508c76ab1106961c0247b5f511e94 | refs/heads/master | 2020-03-22T14:28:14.714335 | 2018-07-08T16:59:51 | 2018-07-08T16:59:51 | 140,182,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | # -*- coding:utf-8 -*-
import MySQLdb
conn = MySQLdb.connect(host='127.0.0.1', port=3306, user='root', passwd='1234', db='test')
cur = conn.cursor()
# import records
#
# db = records.Database('mysql://root:1234@127.0.0.1:3306/test')
# rows = db.query('select * from stu') # or db.query_file('sqls/active-users.sql... | [
"1663177102@qq.com"
] | 1663177102@qq.com |
99fab05bc0eea137e4094a3a35c913987d061372 | 74d6a9d33ff4374c3a7b22229819dbed34484f85 | /app/models.py | 2323749a4b96fbf227eeb2a1b05694d54f9d1670 | [
"MIT"
] | permissive | MichelAtieno/Personal-Blog | a7bcabb92542b6df4a671a529e7ea373a4197dd5 | 16657391b968e644b99fa0dde5d5a443881698da | refs/heads/master | 2020-03-28T15:38:29.031020 | 2018-09-17T11:45:02 | 2018-09-17T11:45:02 | 148,611,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,731 | py | from . import db, login_manager
from flask_login import UserMixin
from werkzeug.security import generate_password_hash,check_password_hash
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class User(UserMixin,db.Model):
__tablename__ = 'users'
id = db.Column(db.Intege... | [
"mishqamish@gmail.com"
] | mishqamish@gmail.com |
086eb1de9a914373c017cdbde0d741dfa01d752e | a44833dae38c9bc81f1dd731b0056e0dfa2df8a7 | /config/settings.py | 6687fef7736814cf0257554b8905d0a230591d28 | [
"MIT"
] | permissive | leroyg/build-a-saas-app-with-flask | ca662b4c77a82336d52efda7a379a7f1c035077e | 6e95c73ccbea621f68464bceb6ce913d26abfe60 | refs/heads/master | 2020-12-25T21:55:36.551160 | 2015-10-29T15:10:05 | 2015-10-29T15:10:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,299 | py | # -*- coding: utf-8 -*-
from os import path
from datetime import timedelta
from celery.schedules import crontab
# This value is used for the following properties,
# it really should be your module's name.
# Database name
# Cache redis prefix
APP_NAME = 'catwatch'
APP_ROOT = path.join(path.dirname(path.abspath(_... | [
"nick.janetakis@gmail.com"
] | nick.janetakis@gmail.com |
3fb6fa665a6e2c6aba0084149a226f9dde2c26d5 | 8466ebe93688e1dbf60fce7dec98caa8399877ae | /python/19-counting-sundays.py | 36ac9e6c3bb5d746f46c6e9658438b2b106cd394 | [] | no_license | alextanhongpin/project-euler | 1b524ea98234bd334fbd3b6a582c35713ab5e810 | 87311c95fdc7f3ef59344b5d8a0b0a0e70b439a1 | refs/heads/master | 2020-05-24T00:08:25.376061 | 2017-03-27T07:29:54 | 2017-03-27T07:29:54 | 84,804,081 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 988 | py | """
Problem 19 - Counting Sundays
"""
from datetime import date
# Monday is 0,
# Sunday is 6
def main():
start = date(1901, 1, 1)
end = date(2000, 12, 31)
number_of_months = (end.year - start.year + 1) * 12
is_sunday = 0
start_year = 1901
for month in range(number_of_months):
current_mon... | [
"alextan220990@gmail.com"
] | alextan220990@gmail.com |
a8845fabc963784e3b3ec489a682a47ebbde83de | b33beb8b5e9bc7fb81b324028d532863109098e2 | /DB/accounts/migrations/0022_auto_20210401_2142.py | ecb7dad14f351af96076e999e0a11c96651db445 | [] | no_license | forza111/DB | 78da533a000111a16e651182856b3c0e6c52e2b0 | 102abd68e4a0d9589d5d9f0db62c05e345b51626 | refs/heads/master | 2023-06-02T21:27:33.088981 | 2021-06-25T09:05:44 | 2021-06-25T09:05:44 | 351,230,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | # Generated by Django 3.1.7 on 2021-04-01 21:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('accounts', '0021_auto_20... | [
"nikitos.ionkin@yandex.ru"
] | nikitos.ionkin@yandex.ru |
3aa7120556b2df4ab2793f3995f23cc5247b7b05 | 4e30d990963870478ed248567e432795f519e1cc | /tests/models/validators/v3_1_1/jsd_a6c71a1e4d2597ea1b5533e9f1b438f.py | 45753551e1582a4d3a228701b695cdb15342e713 | [
"MIT"
] | permissive | CiscoISE/ciscoisesdk | 84074a57bf1042a735e3fc6eb7876555150d2b51 | f468c54998ec1ad85435ea28988922f0573bfee8 | refs/heads/main | 2023-09-04T23:56:32.232035 | 2023-08-25T17:31:49 | 2023-08-25T17:31:49 | 365,359,531 | 48 | 9 | MIT | 2023-08-25T17:31:51 | 2021-05-07T21:43:52 | Python | UTF-8 | Python | false | false | 2,318 | py | # -*- coding: utf-8 -*-
"""Identity Services Engine getActiveList data model.
Copyright (c) 2021 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, ... | [
"wastorga@altus.co.cr"
] | wastorga@altus.co.cr |
8ff423280f7dea2bb5dfcc49959df70bda9e3433 | 325dab6d1300cdc8c77e0c68a7b588e16acd8ef1 | /nagerep/urls.py | a0cf610f017dd110b86d3cd93002d88e1b81db0d | [] | no_license | fishilico/nagerep | e003c683929b10d4a8c7af7c5bfa2f39a2a19922 | 75dcecc4f117420ee195a56c86ff6856175ca48f | refs/heads/master | 2020-05-17T05:37:31.967689 | 2013-05-20T19:31:22 | 2013-05-20T19:31:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | from django.conf.urls import patterns, include, url
# Enable the admin
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
)
| [
"nicolas.iooss_git@polytechnique.org"
] | nicolas.iooss_git@polytechnique.org |
48d29be5493a6b11086a4272192a6d137a07b492 | 7b7bfbfebd627a3ccfdd52bb7164fa4f94cda7fc | /optic_store/patches/v0_8/correct_return_dn_ref_si.py | f5a992f71759f0a3e0ec9445c35129ae71e60df4 | [
"MIT"
] | permissive | f-9t9it/optic_store | d117b7ef7c4107ec15d8194fc57d66a18aff5945 | 4682ae99cdb2cbfb1ff99196398d7379b4b6c8f1 | refs/heads/master | 2022-07-01T10:29:54.783550 | 2022-06-21T14:34:40 | 2022-06-21T14:34:40 | 171,165,708 | 23 | 43 | NOASSERTION | 2022-06-21T14:21:16 | 2019-02-17T19:58:33 | Python | UTF-8 | Python | false | false | 1,221 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, 9T9IT and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
def execute():
dnis = frappe.db.sql(
"""
SELECT
dni.name AS name,
fdni.against_sales_inv... | [
"sun@libermatic.com"
] | sun@libermatic.com |
69b48fa7fb8ae92349f5d9fc86bc42deadecbc82 | 8ed19eff422d90d62bd735d420ed85d63d0d689b | /hw1_code/k.py | a71784de23250f52226441083a4eebcbbba02df7 | [] | no_license | fredshentu/cs189 | 4efd40c4126434b225e59da45a4f40a1f64d8496 | 03f3dfdf4cb0f7b98fc12fb32cd0d648bc144004 | refs/heads/master | 2021-01-10T22:54:06.812233 | 2016-10-09T02:45:27 | 2016-10-09T02:45:27 | 70,364,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | py | from mnist import MNIST
import sklearn.metrics as metrics
import numpy as np
NUM_CLASSES = 10
def load_dataset():
mndata = MNIST('./data/')
X_train, labels_train = map(np.array, mndata.load_training())
X_test, labels_test = map(np.array, mndata.load_testing())
X_train = X_train/255.0
X_test = X_te... | [
"fred960315@gmail.com"
] | fred960315@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.