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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
411d1b5d5d006f9c41b1c82bed003b39f7fba6ac | 27acd9eeb0d2b9b6326cc0477e7dbb84341e265c | /test/vraag4/src/isbn/222.py | fd40dde79d0542bab2d8bd49e8cc487684633488 | [] | no_license | VerstraeteBert/algos-ds | e0fe35bc3c5b7d8276c07250f56d3719ecc617de | d9215f11cdfa1a12a3b19ade3b95fa73848a636c | refs/heads/master | 2021-07-15T13:46:58.790446 | 2021-02-28T23:28:36 | 2021-02-28T23:28:36 | 240,883,220 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,127 | py | def isISBN_13(code):
if len(code) != 13:
return False
if code[:3] != "978" and code[:3] != "979":
return False
even = code[::2]
oneven = code[1::2]
even_som = 0
oneven_som = 0
for i in range(6):
cijfer = int(even[i])
even_som += cijfer
cijfer = int(one... | [
"bertverstraete22@gmail.com"
] | bertverstraete22@gmail.com |
68166f1c54bc0727d4ea84555b656e8b4fc72753 | a5200ba8b1d2b248c7c7bef5704c7e375efc1c2a | /exp_configs.py | c09ecd223c6f468e105e0d7348bd4b1cfa3bf410 | [] | no_license | hongyunnchen/sps | e0c958dadca2a60b0e8d797d8e786f88669cf5c7 | 4ddb3567f9a1893685ea161e2b1d7ba3cb3a1fe3 | refs/heads/master | 2023-02-26T06:36:41.462069 | 2021-02-09T12:22:09 | 2021-02-09T12:22:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,448 | py | from haven import haven_utils as hu
import itertools
# datasets
kernel_datasets = ["mushrooms",
# "w8a", "ijcnn",
# "rcv1"
]
# define runs
run_list = [0]
# define optimizers
c_list = [0.2]
sps_list = []
for c, adapt_flag in itertools.product(c_list, ['smoo... | [
"issam.laradji@gmail.com"
] | issam.laradji@gmail.com |
5fbdd4faeaa02752c91f94d6860761a2dfb07bac | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/datashare/v20181101preview/get_adls_gen2_file_system_data_set.py | 6a6d525b551e637a119b660529a00a01bd625ef0 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bpkgoud/pulumi-azure-native | 0817502630062efbc35134410c4a784b61a4736d | a3215fe1b87fba69294f248017b1591767c2b96c | refs/heads/master | 2023-08-29T22:39:49.984212 | 2021-11-15T12:43:41 | 2021-11-15T12:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,350 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
1f9ca65ce07629f7f3f5c41490cfa08c638c7723 | 6ac3e509c9d848497a7cb0f79008ec1f395f3aad | /Phone-Numbers/freecarrierlookup/freecarrierlookup/__main__.py | e28a3cacc22b778073bda4d6b71388e5f2893fbf | [] | no_license | WeilerWebServices/Scrapers | a87ca6c0fd719639be831623b2b55183932d8fba | 206ea9adf48e9b882a2d62df691185609483f9d0 | refs/heads/master | 2022-11-30T10:46:09.731660 | 2020-08-04T16:07:19 | 2020-08-04T16:07:19 | 273,375,685 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,091 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import time
import csv
from sys import stderr, stdout
try:
import phonenumbers
except ImportError:
phonenumbers = None
from . import FreeCarrierLookup
########################################
# Parse arguments
p = argparse.ArgumentParser(descr... | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
50ffb4956388901f75c430e335b4c03a8493463b | d748710c6c5fa0f61b5bd6c2ec849d9250428811 | /demo1/client_python/test/test_format.py | a03e8a252d7c7c1a5ae10dea8b78b8c22f086cd7 | [] | no_license | stefan2904/aries-experiments | 9f4dab2d0711b76557e3d6ae8e5a27e532102685 | 46f31ee62cf951da2696e5ca4e6dc1d3d753743d | refs/heads/main | 2023-03-23T00:06:06.362992 | 2021-03-18T12:56:58 | 2021-03-18T12:56:58 | 329,986,417 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | # coding: utf-8
"""
(Aries Agent REST Server) of VC4SM University.
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future_... | [
"dev@2904.cc"
] | dev@2904.cc |
4befa60f75f65fc7d117fd7196c46db4398c2c4c | f99cca94f74c69bc518e298c14140534e18eabd3 | /OrcApi/start_report.py | efcbc2ca473ffe5c686fdeb3c906e7f559f6ecab | [] | no_license | pubselenium/OrcTestToolsKit | d6d838d9937d2c4d86941e317cb3ff096b58e52d | f3ccbbceaed4f4996f6907a2f4880c2fd3f82bbb | refs/heads/master | 2021-04-29T05:15:53.240714 | 2016-12-30T09:42:53 | 2016-12-30T09:42:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 832 | py | # coding=utf-8
import sys
from flask import make_response
from OrcLib import init_log
from OrcLib import get_config
from OrcApi import app
from OrcApi import orc_api
from OrcApi.Run.ReportApi import ReportDetAPI
configer = get_config("server")
@app.after_request
def after_request(response):
response.headers['A... | [
"orange21cn@126.com"
] | orange21cn@126.com |
53cde0b836010d45228fa1c3b0df4ed331fc4563 | 0bde5f7f09aa537ed1f4828d4e5ebee66475918f | /h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_split_frame.py | 7b6184fc5c776b24ad32cc3e4da703f2af126c3c | [
"Apache-2.0"
] | permissive | Winfredemalx54/h2o-3 | d69f1c07e1f5d2540cb0ce5e6073415fa0780d32 | dfb163c82ff3bfa6f88cdf02465a9bb4c8189cb7 | refs/heads/master | 2022-12-14T08:59:04.109986 | 2020-09-23T08:36:59 | 2020-09-23T08:36:59 | 297,947,978 | 2 | 0 | Apache-2.0 | 2020-09-23T11:28:54 | 2020-09-23T11:28:54 | null | UTF-8 | Python | false | false | 1,086 | py | from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
import numpy as np
from h2o.utils.typechecks import assert_is_type
from h2o.frame import H2OFrame
def h2o_H2OFrame_split_frame():
"""
Python API test: h2o.frame.H2OFrame.split_frame(ratios=... | [
"noreply@github.com"
] | Winfredemalx54.noreply@github.com |
5953b3b9c01500579a6f297e7f5b22fd87d779c5 | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/playground/ebayer/c2/kernel/pae/drivers/module-pae-openafs/actions.py | 5dcbf53a4428541a79d686435aaf1aa6a77d6da8 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 796 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2010 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
f... | [
"yusuf.aydemir@istanbul.com"
] | yusuf.aydemir@istanbul.com |
6e00615762e8df542d13ee65b1357bdf9cf232dc | a11984110d22e8231896c7e8bf2c6c2a96e46502 | /Daily Challenges/2020/June/Coin Change 2.py | 11def6bdf3936bba8f8e65cab5a71696240db825 | [] | no_license | Waqar-107/LeetCode | fbd323c89a5ea010b3322b0b35dd087a7744abc4 | 5f7dc48918c0367b20e733830e9807eb40840f77 | refs/heads/master | 2023-08-03T12:27:58.593051 | 2023-07-24T01:33:24 | 2023-07-24T01:33:24 | 220,239,559 | 8 | 7 | null | 2022-05-01T18:50:03 | 2019-11-07T13:08:48 | Python | UTF-8 | Python | false | false | 837 | py | class Solution:
def change(self, amount: int, coins: List[int]) -> int:
n = len(coins)
dp = [[0 for _ in range(n)] for _ in range(amount + 1)]
if amount == 0:
return 1
if n == 0:
return 0
for j in range(n):
dp[0][j] = 1
... | [
"noreply@github.com"
] | Waqar-107.noreply@github.com |
0a6b8b51c8c6d0be55dbbec18662c723561424b8 | 44064ed79f173ddca96174913910c1610992b7cb | /Second_Processing_app/temboo/Library/SendGrid/WebAPI/Profile/__init__.py | 6d92d7a013674c733657f66763ff162be16e38d5 | [] | no_license | dattasaurabh82/Final_thesis | 440fb5e29ebc28dd64fe59ecd87f01494ed6d4e5 | 8edaea62f5987db026adfffb6b52b59b119f6375 | refs/heads/master | 2021-01-20T22:25:48.999100 | 2014-10-14T18:58:00 | 2014-10-14T18:58:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | from UpdateContactProfileEmailAddress import *
from UpdateUsername import *
from ViewAccountProfile import *
from ResetPassword import *
from UpdateAccountProfile import *
| [
"dattasaurabh82@gmail.com"
] | dattasaurabh82@gmail.com |
4ddb79704d7f95d929525eb9514d2329a0e2ae5f | 9ce4292954000fd66bcdbd0797a280c306308d08 | /quizzes/00.organize.me/Cracking the Coding Interview/10-5.py | b766c70b7b543f695e10a7a7269d68734ca8f968 | [
"MIT"
] | permissive | JiniousChoi/encyclopedia-in-code | 0c786f2405bfc1d33291715d9574cae625ae45be | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | refs/heads/master | 2021-06-27T07:50:10.789732 | 2020-05-29T12:50:46 | 2020-05-29T12:50:46 | 137,426,553 | 2 | 0 | MIT | 2020-10-13T08:56:12 | 2018-06-15T01:29:31 | Python | UTF-8 | Python | false | false | 1,342 | py | '''
10.5 - 빈 문자열이 섞여 있는 정렬 상태의 배열이 주어졌을 때, 특정한 문자열 의 위치를 찾는 메서드를 작성하라.
'''
def search_arr_with_empty_string(arr, target):
assert arr
left = init_left(arr)
right = init_right(arr)
mid = get_mid(arr, left, right)
while mid>=0:
if arr[mid]==target:
return mid
if arr[mid]>... | [
"jinchoiseoul@gmail.com"
] | jinchoiseoul@gmail.com |
dcbab961672293df7685c2b68b386d61314c7e39 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_144/ch149_2020_04_13_20_40_50_766295.py | 878ea953ff527f041b48cc86231d9d5b082aeda2 | [] | 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 | 1,029 | py | salario_bruto = int(input(("Salario: "))
numero_dependentes = int(input("Dependentes: "))
contri_INSS = 0
if salario_bruto <= 1045:
contri_INSS = salario_bruto * 0.075
elif salario_bruto >= 1045.01 and salario_bruto <=2089.60:
contri_INSS = salario_bruto * 0.09
elif salario_bruto >= 2089.01 and salar... | [
"you@example.com"
] | you@example.com |
c1825c451ebce3e5a90f216fa0ea0683c035ad0d | 34f6d9a4c4becc057d1b01a0ed3e50f20a071b03 | /main/migrations/0001_initial.py | 55e4c7b7da9e0f6d8dea069a8d80d7bc81e61042 | [] | no_license | hitscanner/WUW | e6d59bb8eae3834cf115e50834a2a4af51c29b29 | 31a482afe3e4789c979696a70f5ded17488b7810 | refs/heads/master | 2022-12-10T06:01:01.862354 | 2019-08-11T11:31:01 | 2019-08-11T11:31:01 | 196,556,732 | 0 | 0 | null | 2022-07-06T20:13:05 | 2019-07-12T10:06:49 | JavaScript | UTF-8 | Python | false | false | 771 | py | # Generated by Django 2.2 on 2019-07-16 08:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Search_result',
fields=[
('id', models.AutoFi... | [
"dmswl_0311@naver.com"
] | dmswl_0311@naver.com |
cab7d49da20714d35bcfe777d586c4c4b8e8bcb1 | 3c000380cbb7e8deb6abf9c6f3e29e8e89784830 | /venv/Lib/site-packages/cobra/modelimpl/eqpt/spcmnblk.py | 4a85bd179a0f4e21e2c358232362a472c0383c4d | [] | no_license | bkhoward/aciDOM | 91b0406f00da7aac413a81c8db2129b4bfc5497b | f2674456ecb19cf7299ef0c5a0887560b8b315d0 | refs/heads/master | 2023-03-27T23:37:02.836904 | 2021-03-26T22:07:54 | 2021-03-26T22:07:54 | 351,855,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,084 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | [
"bkhoward@live.com"
] | bkhoward@live.com |
877d1c526b3f20bd3188f83451ed138f7a56e486 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_sniggering.py | 17cd2b9a2bb4518486b4ed491fb93307ec1d284d | [
"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 | 230 | py |
#calss header
class _SNIGGERING():
def __init__(self,):
self.name = "SNIGGERING"
self.definitions = snigger
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['snigger']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
ac7098eb210e84d502ecbef2178e0288d257fa61 | 010215c1421f5275a846e7154189b22cdd3c89bc | /MS/Two Pointer/backspace_compare.py | b930b074d11fe2ed02fd6c809b5f4f8223bf58ac | [] | no_license | bsextion/CodingPractice_Py | ab54d5715298645a8fd7ab6945bf3b22d4e6a874 | da2847a04705394c32a6fe1b5f6c6b64c24647a3 | refs/heads/master | 2023-08-16T17:14:47.643989 | 2021-09-28T19:23:40 | 2021-09-28T19:23:40 | 383,658,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | def backspace_compare(str1:str, str2):
#two pointers,
ptr_one = 0
ptr_two = 0
while ptr_one < len(str1):
if str1[ptr_one] is '#' and ptr_one > 0:
temp = list(str1)
temp[ptr_one-1] = ''
temp[ptr_one] = ''
str1 = ''.join(temp)
ptr_one += 1
... | [
"bsextion@gmail.com"
] | bsextion@gmail.com |
b6677daaa5433a1a5bff104dbd781005f9caa6ad | bdba52c756cc09f192b720ea318510c265665dcd | /swagger_client/models/get_characters_character_id_planets_planet_id_head.py | d6daf4f3b6cdc6f78e96cc5957b82e43bb1a5d74 | [
"MIT"
] | permissive | rseichter/bootini-star | 6b38195890f383615cc2b422c365ac28c5b87292 | a80258f01a05e4df38748b8cb47dfadabd42c20d | refs/heads/master | 2020-03-14T03:17:11.385048 | 2018-06-28T17:23:23 | 2018-06-28T17:23:23 | 131,416,504 | 0 | 0 | MIT | 2018-05-01T14:26:04 | 2018-04-28T14:28:46 | Python | UTF-8 | Python | false | false | 5,555 | py | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetCharactersCharacterIdPlanetsPlanetIdHead(object):
... | [
"github@seichter.de"
] | github@seichter.de |
c4f36d4b7fa6d6a4966f1a22288517df1842a6e4 | 480e33f95eec2e471c563d4c0661784c92396368 | /Configuration/Generator/python/QCD_Pt-20toInf_MuEnrichedPt15_TuneCUETP8M1_13TeV_pythia8_cff.py | 7ca22905e2e7cd1528d55e528353b0c20e2ccb2d | [
"Apache-2.0"
] | permissive | cms-nanoAOD/cmssw | 4d836e5b76ae5075c232de5e062d286e2026e8bd | 4eccb8a758b605875003124dd55ea58552b86af1 | refs/heads/master-cmsswmaster | 2021-01-23T21:19:52.295420 | 2020-08-27T08:01:20 | 2020-08-27T08:01:20 | 102,867,729 | 7 | 14 | Apache-2.0 | 2022-05-23T07:58:09 | 2017-09-08T14:03:57 | C++ | UTF-8 | Python | false | false | 2,277 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
maxEventsToPrint = cms.untracked.int32(1),
pythiaPylistVerbosity = cms.untracked.int32(1),
fil... | [
"kpedro88@gmail.com"
] | kpedro88@gmail.com |
ba2213f9f76fd58af80066c34ca0933cca61dfbe | 8b2b497069ed3db150e15863559dc0e9a44dc8c1 | /pure_protobuf/io/url.py | 3e2004fb24b0f96f02a7ce5efe77d39b2a72b5a2 | [
"MIT"
] | permissive | eigenein/protobuf | 2aec2c544cf9f6571b161b1e62ec3675a5b141eb | cf14bc702302c9334c7c9cc839b0b24334a725ef | refs/heads/master | 2023-08-31T21:23:29.258800 | 2023-08-27T12:00:26 | 2023-08-28T12:36:25 | 1,890,285 | 216 | 20 | MIT | 2023-09-13T12:58:54 | 2011-06-13T18:26:55 | Python | UTF-8 | Python | false | false | 619 | py | """Reading and writing parsed URLs."""
from typing import IO, Iterator
from urllib.parse import ParseResult, urlparse, urlunparse
from pure_protobuf.interfaces.read import Read
from pure_protobuf.interfaces.write import Write
from pure_protobuf.io.bytes_ import read_string, write_string
class ReadUrl(Read[ParseResu... | [
"eigenein@gmail.com"
] | eigenein@gmail.com |
aee56c11569ff5461d903c1776810a2242a2f6ce | 12c15c7ae150acaf8032f444db24440da2234b1a | /ComputerVision/Projects/cv20_proj1/lap.py | f91c55cde634d08ca8ca04d68cc2380417508879 | [] | no_license | Jimut123/rkmveri-labs | 315ecd4607af72dd0851489e427a3ab09a8009ff | be19a453ea32460c454e3443798e3d8954fb084b | refs/heads/master | 2023-02-02T17:11:23.641187 | 2020-12-13T18:35:20 | 2020-12-13T18:35:20 | 201,784,550 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,476 | py | import numpy as np
import cv2
cutoff_frequency = 4
filter = cv2.getGaussianKernel(ksize=cutoff_frequency*4+1,
sigma=cutoff_frequency)
filter = np.dot(filter, filter.T)
def del2(M):
dx = 1
dy = 1
rows, cols = M.shape
dx = dx * np.ones ((1, cols - 1))
dy = dy * np.ones ... | [
"jimutbahanpal@yahoo.com"
] | jimutbahanpal@yahoo.com |
c89b9794cbf2b7f1b847fd4e611f0c42b5aa35fa | 4771ca5cd2c7be8e6d0a50f1e0b1f85a17ec5efd | /todos/forms.py | 51e119676bbd8af1823a81a48e4933eac9090377 | [] | no_license | luanfonceca/todomvc-django-over-the-wire | 03aa2e57c04d465c56cf06e1c95b417c502bcbad | ae1b6e989c0c9edd7d4f8de2d9553bf57e4e1e38 | refs/heads/main | 2023-03-03T19:23:35.849691 | 2021-02-07T13:23:17 | 2021-02-07T13:23:17 | 334,795,276 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py |
from django import forms
from todos.models import ToDo
class ToDoForm(forms.ModelForm):
class Meta:
model = ToDo
fields = ('title',)
class CompleteToDoForm(forms.ModelForm):
class Meta:
model = ToDo
fields = ('is_completed',)
| [
"luanfonceca@gmail.com"
] | luanfonceca@gmail.com |
2212a2b636017e168a6d9d41201b0c3c70163ac9 | 057d662a83ed85897e9906d72ea90fe5903dccc5 | /Comprehension.py | 68427686ee2e27abe1a3290558f7865fd4fd49bb | [] | no_license | Karishma00/AnsiblePractice | 19a4980b1f6cca7b251f2cbea3acf9803db6e016 | 932558d48869560a42ba5ba3fb72688696e1868a | refs/heads/master | 2020-08-05T00:05:31.679220 | 2019-10-04T13:07:29 | 2019-10-04T13:07:29 | 212,324,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | #
list=[x**2 for x in range(0,10)]
print(list)
#another ex
celcius=[0,10,30,90]
fahrenheiet=[((0/5)*temp +32) for temp in celcius]
print(fahrenheiet) | [
"karishma11198@gmail.com"
] | karishma11198@gmail.com |
1d806f235836b0b15c4c2615bbf176dff8458479 | 82be2ebd50fef5b359cfbcacd21f38da4c383ffc | /tests/test_writer.py | a340f79117bfab8297d6e6b0fb63a8be472e2988 | [
"BSD-3-Clause"
] | permissive | isabella232/helium-commander | 5eae81b89cccf2dae56a4163815d867777387288 | 58d1fe4064c51beccbff7a0d93bf037fffdac370 | refs/heads/master | 2021-06-15T15:16:00.139651 | 2017-02-28T23:22:36 | 2017-02-28T23:22:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,170 | py | from helium_commander import Sensor, DataPoint
from itertools import islice
import pytest
def validate_format(output, client, sensors, capsys):
first_sensor = sensors[0]
# With sort
Sensor.display(client, sensors, format=output, sort='name')
out, err = capsys.readouterr()
assert first_sensor.shor... | [
"noreply@github.com"
] | isabella232.noreply@github.com |
102a94ec2318f2e1673fd0e494380451db909578 | 0e7aed5eef2e1d132a7e75dd8f439ae76c87639c | /python/652_find_duplicated_subtrees.py | ee4a673bdc3ecbf54bdd00a403e289703d72c886 | [
"MIT"
] | permissive | liaison/LeetCode | 2a93df3b3ca46b34f922acdbc612a3bba2d34307 | bf03743a3676ca9a8c107f92cf3858b6887d0308 | refs/heads/master | 2022-09-05T15:04:19.661298 | 2022-08-19T19:29:19 | 2022-08-19T19:29:19 | 52,914,957 | 17 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,429 | 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
class Solution:
def findDuplicateSubtrees(self, root: TreeNode) -> List[TreeNode]:
# set of all node strings
... | [
"lisong.guo@me.com"
] | lisong.guo@me.com |
15fd9952fee0476a4522d0e9c5220985962185cf | 88abc8645e499a61e96e2979ae6092e98bfd09e7 | /streamz/utils.py | 4e1538da7c4506a9bf7fed145c07d2eb9fdde2bc | [
"BSD-3-Clause"
] | permissive | vishalbelsare/streamz | 5e2d6e112b6a2a90e396c4e3bc11cb1167d879e3 | b73a8c4c5be35ff1dae220daaefbfd2bfa58e0a1 | refs/heads/master | 2022-12-24T17:28:40.600327 | 2022-11-22T16:40:35 | 2022-11-22T16:40:35 | 207,001,623 | 0 | 0 | BSD-3-Clause | 2022-12-10T04:20:03 | 2019-09-07T17:20:32 | Python | UTF-8 | Python | false | false | 1,184 | py | _method_cache = {}
class methodcaller(object):
"""
Return a callable object that calls the given method on its operand.
Unlike the builtin `operator.methodcaller`, instances of this class are
serializable
"""
__slots__ = ('method',)
func = property(lambda self: self.method) # For `funcn... | [
"noreply@github.com"
] | vishalbelsare.noreply@github.com |
3a084bb437dc7e9fbb08e486b1cc9993909d21bb | 71d535545c4f3b2fc626cd04cfcee22805b67353 | /copacity_app/migrations/0007_auto_20210613_1019.py | c0f52b9073d682a55e6c58ee766848aa894fabd7 | [] | no_license | mcnalj/copacity_django | 01a018d32ee9cb9ba392e5dcd160d636ba0b5b74 | 48432cff7585af342599c06cac497947e4b68195 | refs/heads/master | 2023-07-04T14:27:50.736252 | 2021-08-10T16:53:59 | 2021-08-10T16:53:59 | 383,779,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,768 | py | # Generated by Django 3.1.7 on 2021-06-13 10:19
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),
('copacity_app', '0006_che... | [
"example@example.com"
] | example@example.com |
ef954e4bc9bcc4a0ca428034f6427da6e1577c8f | 07da31b260bf2949ffd9463ad4f777ca93b75d43 | /sleekforum/src/sleekapps/threads/views/post/post.py | 6f81800803801b5318b4dba53439f620da360d57 | [] | no_license | adepeter/sleek-docker | 134fd7de12ade8c521ceb8e1b2b2611fa2224dde | dcf010c3da53093600101d970c6888c82360209f | refs/heads/master | 2022-12-15T14:53:01.499098 | 2020-09-14T00:42:31 | 2020-09-14T00:42:31 | 282,499,689 | 0 | 0 | null | 2020-07-31T14:31:22 | 2020-07-25T18:12:19 | JavaScript | UTF-8 | Python | false | false | 1,459 | py | from django.contrib import messages
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.utils.translation import gettext_lazy as _
from ...forms.post.post import PostEditForm, PostForm
from ...viewmixins.post import BasePostMixin
TEMPLATE_URL = 'threads/post'
class EditPost(BasePost... | [
"adepeter26@gmail.com"
] | adepeter26@gmail.com |
418ff5b81b82739dbb020083e568e2276627c16e | fdaba69f8d3ae3e645cb548a31111814b67f88bc | /credit/xgboost_Chunk_join.py | 3d222a1d0c5720a80dc1aa63bfc2f49b7910ada3 | [] | no_license | curryli/pandasFlow | 6c381a06843f353f3449666cc9aee3e3fc2c3620 | 891963e1d9acd8cdd23732180a3fd4b4633bc335 | refs/heads/master | 2020-12-07T15:24:36.500075 | 2018-07-01T09:01:09 | 2018-07-01T09:01:09 | 95,520,789 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 4,752 | py | # -*- coding: utf-8 -*-
import pandas as pd
from sklearn.cross_validation import train_test_split
from sklearn.metrics import recall_score, precision_score
from sklearn.metrics import precision_recall_fscore_support
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix
from s... | [
"xurui.lee@msn.com"
] | xurui.lee@msn.com |
4b3187694d3f43ef8b7ee834c64e18fad6e4b5d3 | 2290eed5c494202beea0da1b9257a38b7a4403d2 | /script/[662]二叉树最大宽度.py | 382e8af49c05465745fefb5b155a1be322b7d57b | [] | no_license | DSXiangLi/Leetcode_python | 4b1c9848ea774955fb252b9bd796ba8d46ad728e | a2ef0ba5e86405dbf68dbc1ffeb086c7d864db1d | refs/heads/main | 2022-09-01T04:34:04.260402 | 2022-08-20T01:12:27 | 2022-08-20T01:12:27 | 445,347,891 | 1 | 0 | null | 2022-07-23T06:32:14 | 2022-01-07T00:15:20 | Python | UTF-8 | Python | false | false | 2,352 | py | # 给定一个二叉树,编写一个函数来获取这个树的最大宽度。树的宽度是所有层中的最大宽度。这个二叉树与满二叉树(full binary tree)结构相同,但一些节
# 点为空。
#
# 每一层的宽度被定义为两个端点(该层最左和最右的非空节点,两端点间的null节点也计入长度)之间的长度。
#
# 示例 1:
#
#
# 输入:
#
# 1
# / \
# 3 2
# / \ \
# 5 3 9
#
# 输出: 4
# 解释: 最大值出现在树的第 3 层,宽度为 4 (5,3,null,9)。... | [
"liningrui@xiaohongshu.com"
] | liningrui@xiaohongshu.com |
68a8b7bca0c433c9063cdb4726ee5fc8ce83c752 | 48aacf0425c5ab071972034c3fbd388feb036578 | /node-7/site-packages/ceph_deploy/connection.py | 381f6afa4c9bd0454eb2cda6a9881067950e2c18 | [] | no_license | wputra/MOS-centos | 2b8ec0116bb3a28632c54d6052d322a42391439f | 0a4f24dd4183d4d44e8c7beb27adce12e42f0201 | refs/heads/master | 2021-01-10T19:22:22.920342 | 2014-09-12T03:33:54 | 2014-09-12T03:33:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 654 | py | from ceph_deploy.lib.remoto import Connection
from sudo_pushy import needs_sudo # TODO move this to utils once pushy is out
def get_connection(hostname, logger, threads=5):
"""
A very simple helper, meant to return a connection
that will know about the need to use sudo.
"""
try:
return Co... | [
"wasis.putra@gmail.com"
] | wasis.putra@gmail.com |
f54066fc82d29ccbcbb0f6fbc82e0b625fe67fb5 | ad0857eaba945c75e705594a53c40dbdd40467fe | /leetCode/maximal_rectangle.py | 98b030c3831e8cf2db830fb6e04f0209fe45fc5d | [
"MIT"
] | permissive | yskang/AlgorithmPractice | c9964d463fbd0d61edce5ba8b45767785b0b5e17 | 3efa96710e97c8740d6fef69e4afe7a23bfca05f | refs/heads/master | 2023-05-25T13:51:11.165687 | 2023-05-19T07:42:56 | 2023-05-19T07:42:56 | 67,045,852 | 0 | 0 | null | 2021-06-20T02:42:27 | 2016-08-31T14:40:10 | Python | UTF-8 | Python | false | false | 927 | py | class Solution(object):
def maximal_rectangle(self, matrix):
if not matrix or not matrix[0]:
return 0
width = len(matrix[0])
heights = [0] * (width+1)
ans = 0
for row in matrix:
for i in range(width):
heights[i] = heights[i] + 1 if ro... | [
"yongsung.kang@gmail.com"
] | yongsung.kang@gmail.com |
ac7a8bc1157a39c61201db61f88be40f9b180771 | 7cf52b987da6595ebc5f763b384b03e608ccb25f | /tests/index/test_mongodb_index.py | 87a66da4180d9cc8e832f22eb992d389b7dee1c3 | [] | no_license | shaypal5/dinglebop | 93fdfda48ec4d91c0a9485173a106d1edbcd1b29 | a10473b4abecfd70a00cd9086aa8919a404959c9 | refs/heads/master | 2021-08-20T10:17:46.640046 | 2017-11-14T18:01:43 | 2017-11-14T18:01:43 | 109,569,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,710 | py | """Testing the implementation of MongoDB-based dingle indexes."""
import pytest
from dinglebop.index.mongodb import MongoDBIndex
from dinglebop.shared import get_dinglebop_cfg
SAMPLE_IDEN1 = 'school_data_2016'
SAMPLE_IDEN2 = 'school_data_2017'
SAMPLE_DOC1 = {'identifier': SAMPLE_IDEN1, 'version': 'v1.0',
... | [
"shaypal5@gmail.com"
] | shaypal5@gmail.com |
634e12c0e89842b519a5bae4fcff0bcc9f6bc466 | 6e19835f99efea46d7b7966144efa8e2302d5e4c | /tensorflow/python/autograph/utils/misc_test.py | c813e0f5c96386a0d0fbd078bd5b663c688b0327 | [
"Apache-2.0"
] | permissive | Cincan/tensorflow | 415fba147ef4676901f424a839d751aa7d1c50f0 | 94c9acddd9f3fd73a5e4b5bc1fd7c9284a68ea75 | refs/heads/master | 2020-04-08T14:07:14.355697 | 2018-11-28T00:59:40 | 2018-11-28T00:59:40 | 159,422,705 | 1 | 0 | Apache-2.0 | 2018-11-28T01:08:35 | 2018-11-28T01:08:35 | null | UTF-8 | Python | false | false | 1,719 | py | # Copyright 2017 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 |
d3bb18f8490dbe42f2945f71dc53ab3f6ba81073 | 012aadc12dc2a4560eabc04527414c3883e87e3d | /myvenv/bin/autopep8 | b7dcecda5a6c5b3d815b73491659a8d14741a669 | [] | no_license | kosiannpann/my-first-blog | a0c17286256e0d16a90b40b6b2f9beddebe9b03e | e41f4966da20785cabb9402e02a4119fb981fee1 | refs/heads/master | 2023-06-09T04:19:02.276691 | 2021-07-04T02:52:22 | 2021-07-04T02:52:22 | 376,177,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 237 | #!/Users/ootadaiki/djangogirls/myvenv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from autopep8 import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"you@example.com"
] | you@example.com | |
a1169142ea4526aa901d36823d53da96429542b2 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02898/s602471427.py | 314d28278090b7657613ada6c2c07aa32f78faee | [] | 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 | 528 | py | from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF = float("inf")
INF = 10**18
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
df7b698115c3ffbcc37de296d1f45a03dd270d4e | 78144baee82268a550400bbdb8c68de524adc68f | /Production/python/Autumn18/RPV_2t6j_mStop-1300_mN1-100_TuneCP2_13TeV-madgraphMLM-pythia8_cff.py | 76c72b7101248b1ce6344a581378b039f338ce9b | [] | no_license | tklijnsma/TreeMaker | e6989c03189b849aff2007bad22e2bfc6922a244 | 248f2c04cc690ef2e2202b452d6f52837c4c08e5 | refs/heads/Run2_2017 | 2023-05-26T23:03:42.512963 | 2020-05-12T18:44:15 | 2020-05-12T18:44:15 | 263,960,056 | 1 | 2 | null | 2020-09-25T00:27:35 | 2020-05-14T15:57:20 | null | UTF-8 | Python | false | false | 1,467 | py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIIAutumn18Mi... | [
"Chris_Madrid@Baylor.edu"
] | Chris_Madrid@Baylor.edu |
0bf8b725ddbfa47071048214793a8fd56f8a68d9 | 90c6262664d013d47e9a3a9194aa7a366d1cabc4 | /tests/storage/cases/test_KT1GvgQwPwo8ZdYojFrQyjs1QtjRKjn52cbV.py | 2ae9510b0d691b63af6e04ec0a6f9d672271926b | [
"MIT"
] | permissive | tqtezos/pytezos | 3942fdab7aa7851e9ea81350fa360180229ec082 | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | refs/heads/master | 2021-07-10T12:24:24.069256 | 2020-04-04T12:46:24 | 2020-04-04T12:46:24 | 227,664,211 | 1 | 0 | MIT | 2020-12-30T16:44:56 | 2019-12-12T17:47:53 | Python | UTF-8 | Python | false | false | 1,130 | py | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1GvgQwPwo8ZdYojFrQyjs1QtjRKjn52cbV(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
cls.... | [
"mz@baking-bad.org"
] | mz@baking-bad.org |
8f05bd2092972f6b401e756e15c2117a31a5a4ba | ad69b52951c2f80d152b9ce2225b9a588f110deb | /fan_element_struct.py | 66a7720d1a15cb86b7b4a0c70052200350ac8318 | [] | no_license | hailangzz/fan_health_program | 47c70fe884ec8e28b20be63f99d5c3004bb2a261 | 137d8a1a2271a44c68fe5a5b2b4e367023c0efad | refs/heads/master | 2020-03-19T16:03:13.442179 | 2018-06-09T07:47:34 | 2018-06-09T07:47:34 | 136,698,139 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,210 | py | #coding=utf-8
import numpy as np
import copy
def fan_element_struct():
#机组状态码暂时不确定,因此后续动态添加···,做单台机组状态码频率分布···,'stames_alive_list'是不同机组状态的存活列表···
stames_code={'stamescode_number':0,'stamescode_time':0,'reduce_power':0,'stames_alive_list':[]}
#机组故障及其次数统计
error={'uiHubErr':{'HubErr_code':{},'starttime':[... | [
"344267342@qq.com"
] | 344267342@qq.com |
b7f51ac07e35b2adf6dab304ed1b86b064e9a447 | 29cc0a662b62078e553c461f05ef999c76c0f51f | /Lab_01/connection.py | 7f6f22939e3081ad8120f3d5f4badfa55ace0957 | [] | no_license | fefeagus/Redes_Sistemas_Distribuidos_2015 | bd2978f439389d8f50cbe55a9681cede2530de26 | eee77359891d6c52083c2bd116c2ae65cf36af14 | refs/heads/master | 2023-04-14T13:46:13.935385 | 2017-09-12T03:37:50 | 2017-09-12T03:37:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,300 | py | # encoding: utf-8
# Copyright 2014 Carlos Bederián
# $Id: connection.py 455 2011-05-01 00:32:09Z carlos $
import os
import socket
from constants import *
import server
class Connection(object):
"""
Conexión punto a punto entre el servidor y un cliente.
Se encarga de satisfacer los pedidos del cliente has... | [
"ferreyramario7@gmail.com"
] | ferreyramario7@gmail.com |
20413f0c344df7cbdad1bb7338a11aa39fc9861d | 48460db1a6fdc6c09845c86cf5fa257f1a32f08a | /leetcode/medium/0949_Largest_Time_for_Given_Digits.py | 0a85a9dd6fad4107f8c6a0e5a7d7bc8004502a85 | [] | no_license | MichalBrzozowski91/algorithms | 9d0b085621ed94b1aff5473663fbdc686463cd8d | ae57535b574a800c6300eae7d55b21f2432c3baa | refs/heads/master | 2022-12-20T08:00:59.385002 | 2020-09-30T16:32:33 | 2020-09-30T16:32:33 | 290,835,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,053 | py | class Solution:
def largestTimeFromDigits(self, A: List[int]) -> str:
B = A.copy()
for firstDigitLimit in [2,1]:
A = B.copy()
result = ''
temp = [a for a in A if a in range(firstDigitLimit + 1)]
if not temp:
return ''
... | [
"noreply@github.com"
] | MichalBrzozowski91.noreply@github.com |
172e43d93c0b543dc370d654dd22753e9dd1cdfd | f7574ee7a679261e758ba461cb5a5a364fdb0ed1 | /MergeSortedArray.py | 25c884f75350c4b5cb98ff52b73b35e165289aaa | [] | no_license | janewjy/Leetcode | 807050548c0f45704f2f0f821a7fef40ffbda0ed | b4dccd3d1c59aa1e92f10ed5c4f7a3e1d08897d8 | refs/heads/master | 2021-01-10T19:20:22.858158 | 2016-02-26T16:03:19 | 2016-02-26T16:03:19 | 40,615,255 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,549 | py | class Solution(object):
def merge(self, nums1, m, nums2, n):
"""
:type nums1: List[int]
:type m: int
:type nums2: List[int]
:type n: int
:rtype: void Do not return anything, modify nums1 in-place instead.
"""
i = 0
j = 0
for j ... | [
"janewjy87@gmail.com"
] | janewjy87@gmail.com |
74c5c8c7b320b2dfc6dc3ab53abcf9739fd64eaa | 343bdaddfc66c6316e2cee490e9cedf150e3a5b7 | /0001_0100/0076/0076.py | 851fe3c3ab0a773579c4237f01aaebb9804a5a57 | [] | no_license | dm-alexi/acmp | af7f6b4484b78f5922f3b464406a0ba5dea0d738 | 3fa0016d132adfeab7937b3e8c9687a34642c93a | refs/heads/master | 2021-07-09T15:14:25.857086 | 2020-10-20T19:08:54 | 2020-10-20T19:08:54 | 201,908,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | def timeint(s):
return int(s[:2]) * 60 + int(s[3:])
with open("input.txt", "r") as f, open("output.txt", "w") as q:
m = 0
inlist, outlist = [], []
n = int(f.readline())
for i in range(n):
a, b = (timeint(x) for x in f.readline().split())
inlist.append(a)
outlist.append(b)
... | [
"dm2.alexi@gmail.com"
] | dm2.alexi@gmail.com |
24a2b2bd01037bb5984627af29d73e874afe85da | 94ea21700381f12b72649a59d2c90ae32c7e04f0 | /addons/hc_medication_administration/models/hc_res_medication_administration.py | 43a24cc10010e8dd270762918187fcb536cf5171 | [] | no_license | messakali/odoo-fhir | c07e2d058763580de2929d4c84ebd4717ac15c43 | 1f5c28a3fdd788370696a5f75ab68a2acfe16d25 | refs/heads/master | 2021-01-10T22:35:55.158494 | 2016-09-28T17:21:56 | 2016-09-28T17:21:56 | 69,700,012 | 0 | 1 | null | 2016-09-30T20:30:57 | 2016-09-30T20:30:56 | null | UTF-8 | Python | false | false | 450 | py | # -*- coding: utf-8 -*-
from openerp import models, fields, api
# class hc_medication_administration(models.Model):
# _name = 'hc_medication_administration.hc_medication_administration'
# name = fields.Char()
# value = fields.Integer()
# value2 = fields.Float(compute="_value_pc", store=True)
# de... | [
"lsison@moxylus.com"
] | lsison@moxylus.com |
f3a1b7d5b8f3c6718af758c89fae01723081f4ca | ca0757ab59d6420efae766dae80a539a3b692fbd | /apps/ippcdrupal/auth_backends.py | ba28716f1c21d575cec5c18d2e1d8708a507320f | [] | no_license | hypertexthero/itwishlist | bc1cfe7f3542a395ab439ee5aa71c1991baaadff | 148a085238ae86ee07255f94d3a48a92190ce5c5 | refs/heads/master | 2020-06-05T01:00:41.981168 | 2013-08-30T15:06:52 | 2013-08-30T15:06:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,052 | py | # =todo: authenticate against drupal users db
# Looks like we'll need to upgrade to Django 1.4...
from django.conf import settings
from django.contrib.auth import login
from django.contrib.auth.models import User, check_password
from itwishlist.apps.ippcdrupal.models import DrupalUsers
# from itwishlist.apps.ippcdrupa... | [
"simon@hypertexthero.com"
] | simon@hypertexthero.com |
b2e0397ffe57b93e5e6ae261bde6a10fee12cd3a | b213c8b10b831d5fdacfb65c145450f6af846a4f | /blog/blog.py | ce23082f7c014309cc37d87c9b6217fc56981450 | [] | no_license | tuomas56/random-python-stuff | 1df260532abeb0a3da02560ed23ad1ee1995f5b2 | 12737127a31f1a3b84456021e8a5ac81545324da | refs/heads/master | 2020-12-31T04:42:12.123345 | 2015-11-25T21:54:28 | 2015-11-25T21:54:28 | 46,889,061 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,649 | py | from bottle import server_names, ServerAdapter, run, request, Bottle, redirect,response, abort
import markdown
import re
import os
import pickle
import uuid
import scrypt
import base64
from datetime import datetime, timedelta
from cherrypy import wsgiserver
from cherrypy.wsgiserver.ssl_builtin import BuiltinSSLAdapter
... | [
"pigworts2@gmail.com"
] | pigworts2@gmail.com |
b191a119c6debbe2643f12b03216b61002e09590 | 8f4c59e69cce2f6e932f55b3c65aae376b206a2c | /笨办法学python/ex47/skeleton/tests/ex47_tests.py | 00d322ae6ea3a7f953674e7ad506bc4a1713fde2 | [] | no_license | zmjm4/python | ef7206292f1c3a3a5763b25527024999de5e8e79 | 44cf74c0f16891c351ce214762218ccf2d7353a0 | refs/heads/master | 2020-05-27T17:23:48.776167 | 2018-05-24T07:14:16 | 2018-05-24T07:14:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | # -*- coding: utf-8 -*-
from nose.tools import *
from ex47.game import Room
def test_room():
gold=Room("GoldRoom",
"""This room has gold in it you can grab. There's a
door to the north.""")
assert_equal(gold.name,"GoldRoom")
assert_equal(gold.paths,{})
def test_room_paths():
center = Room("Center", "Tes... | [
"715073608@qq.com"
] | 715073608@qq.com |
58c46c9a110a1eb99789632d26ae3ae38b04e23d | 9463d85666453fd8e57a0ce9e515e4765ae2b60a | /cwetsy/cwetsy/parser/browse_parser.py | a049cb5b8bc4542890ee7856ce7379b97e183bed | [
"MIT"
] | permissive | trujunzhang/djzhang-targets | dc6c3086553a5450fb239cc1cef5330a51a02e1f | c2e327acde9d51f0455e7243f17d93d74b579501 | refs/heads/master | 2021-01-09T20:52:31.258826 | 2016-07-16T13:18:53 | 2016-07-16T13:18:53 | 60,747,429 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | from cwetsy.parser.base_parser import BaseParser
class BrowseParser(BaseParser):
def __init__(self):
super(BrowseParser, self).__init__()
def parse(self, url, hxs):
return None
| [
"trujunzhang@gmail.com"
] | trujunzhang@gmail.com |
68e4256f5b371f2525935ebc77355c859a1a2757 | 2993adb383fed317e6a83f2b8c2cacd640d19fb3 | /bookmarks/account/authentication.py | 2a9db5db7359fcc4a5a5ddcca0b1e3170ebbf911 | [] | no_license | Dyavathrocky/socialapp | 0e811a957a224b30aa32e8a24e3253c1b49a25df | 1dc071b69f9258c4f540211e25635ac277a6f6e4 | refs/heads/master | 2022-12-02T03:42:32.778466 | 2020-08-21T13:19:25 | 2020-08-21T13:19:25 | 286,060,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | from django.contrib.auth.models import User
class EmailAuthBackend(object):
"""
Authenticate using an e-mail address.
"""
def authenticate(self, request, username=None, password=None):
try:
user = User.objects.get(email=username)
if user.check_password(password):
... | [
"davathrak@gmail.com"
] | davathrak@gmail.com |
9478688498c1c1a485af4ce8894c0f2948b2b74b | 6223dc2e5de7921696cb34fb62142fd4a4efe361 | /.metadata/.plugins/org.eclipse.core.resources/.history/25/0083d7fa3b6a00141afa8a8ed49a3dc2 | 7b564846565a3335ffc0ed085fe8f0d38b42e923 | [] | no_license | Mushirahmed/python_workspace | 5ef477b2688e8c25b1372f546752501ee53d93e5 | 46e2ed783b17450aba29e4e2df7b656522b2b03b | refs/heads/master | 2021-03-12T19:24:50.598982 | 2015-05-25T10:23:54 | 2015-05-25T10:23:54 | 24,671,376 | 0 | 1 | null | 2015-02-06T09:27:40 | 2014-10-01T08:40:33 | Python | UTF-8 | Python | false | false | 5,466 | #!/usr/bin/env python
#
# Copyright 2014 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This software is dis... | [
"imushir@gmail.com"
] | imushir@gmail.com | |
d3e241d4b04a38c79e01d0b0348b62f60c6c72fa | b44ba1ca68154a37936ae3822ca016b5d9a99a2a | /Redis/redis_pipe.py | bfde6e48477131440764d56064521f1f1f917c54 | [] | no_license | liuxingrichu/advanced-network-program | 6e17d30980e21b3397ac5ed5e404a282983a6869 | 3f84c4600a35af12a68a4c512afbe60ddf6347b1 | refs/heads/master | 2021-01-23T02:05:45.933255 | 2017-08-06T09:15:54 | 2017-08-06T09:15:54 | 85,964,385 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import redis
import time
'''
使用pipeline实现一次请求,执行多条命令
'''
# db的选择范围为0-15
pool = redis.ConnectionPool(host='localhost', port=6379, db=12)
r = redis.Redis(connection_pool=pool)
# pipe = r.pipeline(transaction=False)
pipe = r.pipeline(transaction=True)
pipe.set('name',... | [
"liuxingrichu@163.com"
] | liuxingrichu@163.com |
4c3c98dc139b2f8f584f48a9f1db91fb63471c18 | 5eea120356afc15cc3edb71f8864d6771ad865c6 | /futures/var_model/__init__.py | e9af4c55745c0234467df114b12290c6b8f19f73 | [
"MIT"
] | permissive | ShubraChowdhury/Investment_Finance | 469d5e5a200616eee830be18cb4a86d54319a30b | 3da761d755278d3d2de8c201b56d4ff9cb23def4 | refs/heads/master | 2022-12-12T11:52:33.585329 | 2021-09-23T18:13:15 | 2021-09-23T18:13:15 | 153,317,318 | 2 | 0 | null | 2022-12-08T00:45:34 | 2018-10-16T16:22:56 | Jupyter Notebook | UTF-8 | Python | false | false | 312 | py | """
The __init__.py files are required to make Python treat the directories as
containing packages; this is done to prevent directories with a common name,
such as string, from unintentionally hiding valid modules that occur later
(deeper) on the module search path.
@author: ucaiado
Created on 09/05/2016
"""
| [
"noreply@github.com"
] | ShubraChowdhury.noreply@github.com |
91f6f93546e8240aff32445f1e68c11ccfe19d83 | 4d2238210813c1581bf44f64d8a63196f75d2df4 | /tem.py | ece18216c221c476bc14897a6b8a415a8a9197d1 | [] | no_license | wwtang/code02 | b1600d34907404c81fa523cfdaa74db0021b8bb3 | 9f03dda7b339d8c310c8a735fc4f6d795b153801 | refs/heads/master | 2020-12-24T14:10:33.738734 | 2012-12-14T04:24:47 | 2012-12-14T04:24:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | color = raw_input('please select the color: ')
if color == "white" or color == "black":
print "the color was black or white"
elif color > "k" :
print "the color start with letter after the 'K' in alphabet"
| [
"andytang1994@gmail.com"
] | andytang1994@gmail.com |
a4ce7faf8a9617e3a7dcffa89948c091bf32dc3f | 1e11d6f9245c55e21edfb24f4340d52e3f7f327f | /dillo/migrations/0078_organizations.py | ecdc1eed4f69e90c13232e53b67ef2f646fc6389 | [] | no_license | armadillica/dillo | 996e8462f4f76349ecc49ecb08cdd6c8c66e072b | 960aed85f8438109bed9883321891305e1db8b10 | refs/heads/main | 2023-08-04T06:45:34.570071 | 2023-06-04T00:07:57 | 2023-06-04T00:07:57 | 30,461,275 | 79 | 18 | null | 2023-08-02T00:22:40 | 2015-02-07T16:17:43 | Python | UTF-8 | Python | false | false | 4,925 | py | # Generated by Django 3.2.13 on 2022-11-19 22:29
import dillo.models.mixins
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
def forwards_func(apps, schema_editor):
"""Set default cateogries."""
OrganizationCategory = ap... | [
"francesco.siddi@gmail.com"
] | francesco.siddi@gmail.com |
95482e1fc560e2c251c59b36d951f928ba1157ba | 06292f96cba132ca57777672a447cfff7c5abee6 | /week5/tut/submit/1.py | b099a6a693b68bb37a739181ac6b9f40fa36844d | [] | no_license | kietteik/ppl | 1746440b12affe71e67d6f958922b32b1fdaab5c | 2ee60582e81595b8d8b5d0f8212d20151cfe9264 | refs/heads/master | 2023-03-01T00:24:36.969189 | 2021-01-31T05:15:13 | 2021-01-31T05:15:13 | 305,802,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | def double(lst):
'''1. a'''
return [i * 2 for i in lst]
def double(lst):
'''1. b'''
if not lst: return []
return [lst[0] * 2] + double(lst[1:])
def double(lst):
'''1. c'''
return list(map(lambda x: x * 2, lst)) | [
"kietteikdoi@gmail.com"
] | kietteikdoi@gmail.com |
c469f6d0359884d8d16ed851a6af1e7f39b15f42 | 6f04b7f8fd55fffb54ce4c78049812655b8c176b | /chap03_GroupApply/lecture/step02_groupby_plot_선생님.py | a33aaf98830f6e875d4ec23df91b81e5c56e0c20 | [] | no_license | Elly-bang/Python-ll | 71092507b719e1532675f8bab489be3f7366c1de | 2658de214cc4a9dd68ad35d82202b59b3129e5af | refs/heads/master | 2022-11-09T18:11:55.449732 | 2020-06-30T06:57:11 | 2020-06-30T06:57:11 | 276,021,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,962 | py | # -*- coding: utf-8 -*-
"""
집단변수 기준 자료 분석
- subset 생성
- group 객체 생성
- 시각화
"""
import pandas as pd
# 1. dataset load
wine = pd.read_csv('C:/ITWILL/4_Python-II/data/winequality-both.csv')
wine.info() # type, quality
# 칼럼명 변경 : 공백 -> '_' 교체
wine.columns = wine.columns.str.replace(' ', '_')
win... | [
"noreply@github.com"
] | Elly-bang.noreply@github.com |
03ae5a477c8f067d8cb700f67401521690fd068d | eda9187adfd53c03f55207ad05d09d2d118baa4f | /algo/pca/pca_old.py | 264da244de8c2b727e5ca60a969c58a436681e39 | [] | no_license | HuiZhaozh/python_tutorials | 168761c9d21ad127a604512d7c6c6b38b4faa3c7 | bde4245741081656875bcba2e4e4fcb6b711a3d9 | refs/heads/master | 2023-07-07T20:36:20.137647 | 2020-04-24T07:18:25 | 2020-04-24T07:18:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,519 | py | # -*- coding:utf-8 -*-
# /usr/bin/python
'''
@Author: Yan Errol @Email:2681506@gmail.com
@Date: 2019-06-09 23:59
@Describe:
@Evn:
'''
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
import numpy as np
# A value we picked to always display the same results
# Feel free to change this to any... | [
"2681506@gmail.com"
] | 2681506@gmail.com |
c3029c19a6c3b697bb29649019096a2ef9384915 | 521efcd158f4c69a686ed1c63dd8e4b0b68cc011 | /airflow/operators/datetime.py | 47021c1730952719ea17c0bf05c4778c8d57ae5f | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | coutureai/RaWorkflowOrchestrator | 33fd8e253bfea2f9a82bb122ca79e8cf9dffb003 | cd3ea2579dff7bbab0d6235fcdeba2bb9edfc01f | refs/heads/main | 2022-10-01T06:24:18.560652 | 2021-12-29T04:52:56 | 2021-12-29T04:52:56 | 184,547,783 | 5 | 12 | Apache-2.0 | 2022-11-04T00:02:55 | 2019-05-02T08:38:38 | Python | UTF-8 | Python | false | false | 4,632 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"noreply@github.com"
] | coutureai.noreply@github.com |
734b6a332d6f0af9cd41c64282aff3d00bb8662f | 461bffdd97ba507b29f1fbf6f9af1800f0e241f6 | /pytext/metric_reporters/classification_metric_reporter.py | 1e3ced78d285a9bff886349e7b06f32ac39129b1 | [
"BSD-3-Clause"
] | permissive | Erica-Liu/pytext | d347e1327254bbe746c491fd8002bcc2e29d82a9 | 0a77e34e555750311ede54514c3c85b133b258f3 | refs/heads/master | 2020-06-16T02:49:21.589774 | 2019-07-05T18:25:52 | 2019-07-05T18:33:55 | 195,459,270 | 0 | 0 | NOASSERTION | 2019-07-05T19:38:34 | 2019-07-05T19:38:34 | null | UTF-8 | Python | false | false | 6,254 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from enum import Enum
from typing import List, Optional
from pytext.common.constants import Stage
from pytext.data import CommonMetadata
from pytext.metrics import (
LabelListPrediction,
LabelPrediction,
compute_... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
8f6c010d69c13e262cdd609efe3ac4b6009f38d3 | 6dae31f10260e39feae9d268e3ebe6d23146575a | /spm/bin_deep_surveys/run_stellarpop_miles_deep2_kroupa | fc11bb5287636c2c426dae12945d749d5984c5b1 | [
"CC0-1.0"
] | permissive | JohanComparat/pySU | e55eba92f0660e733468bce618595a03dc25a3d2 | 4169e11414be661dc0c01c774e64fb8ce6242825 | refs/heads/master | 2021-12-25T11:06:04.315554 | 2021-10-11T12:03:22 | 2021-10-11T12:03:22 | 44,340,565 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,277 | #! /usr/bin/env python
import sys
from os.path import join
import os
import time
import numpy as np
import glob
import astropy.cosmology as co
cosmo = co.Planck13
import astropy.io.fits as fits
# for one galaxy spectrum
import GalaxySpectrumFIREFLY as gs
import StellarPopulationModel as spm
catalog=fits.open(join(os... | [
"johan.comparat@gmail.com"
] | johan.comparat@gmail.com | |
ff6f46df45a62d02b5d3eb10ff5fa6488d3aca62 | ea01ed735850bf61101b869b1df618d3c09c2aa3 | /python基础/network_programming/ftp_task/ftp/conf/settings.py | fe1097cb50a4b2bf3c4804ce40907ffed75bb71a | [] | no_license | liuzhipeng17/python-common | 867c49ac08719fabda371765d1f9e42f6dd289b9 | fb44da203d4e3a8304d9fe6205e60c71d3a620d8 | refs/heads/master | 2021-09-27T10:39:45.178135 | 2018-11-08T01:49:33 | 2018-11-08T01:49:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | # -*- coding: utf-8 -*-
import os.path
_project_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
USER_DB_PATH = os.path.join(_project_path, 'db', 'userdb.ini')
ENCODING = 'utf-8'
MAX_BUFFER_SIZE = 1024
USER_BASE_PATH = os.path.join(_project_path, 'dir', 'home')
BASE_DIR = os.path.join(_project_... | [
"liucpliu@sina.cn"
] | liucpliu@sina.cn |
e1550eadd9cc69970c6b6044d39bd284e1baef25 | 474525154a4e1d48ef5242d1f44164d05399b145 | /spinoffs/oryx/oryx/experimental/nn/function.py | b9d20e453f86199f85885faeeef667bb5300a2ac | [
"Apache-2.0"
] | permissive | svshivapuja/probability | 9855737790f74a39169688fbfec9671deef804d9 | af7ccb22d972329633530c3b754ed1f49472f6a7 | refs/heads/main | 2023-07-17T04:14:53.703622 | 2021-08-30T17:47:06 | 2021-08-30T17:47:06 | 400,983,015 | 1 | 0 | Apache-2.0 | 2021-08-29T07:51:29 | 2021-08-29T07:51:29 | null | UTF-8 | Python | false | false | 1,863 | py | # Copyright 2020 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
b55ecc78784e9edeb59f797fac7f6750b1ccd7e5 | 79c0358277a5f6ae231d89ee4476cb1facd00e50 | /extra/desktop/gnome/addons/gnome-color-manager/actions.py | c37eddcb3525032b734864d2c7b456d5bc8496bb | [] | no_license | mrust1/PisiLinux | a139dbc9f8d3d61ebec38d08f36dfa6eafff7107 | a2014b6912df50ad22da5b2f3d21bf01cbd8e192 | refs/heads/master | 2020-12-11T03:42:50.309869 | 2014-10-05T14:05:17 | 2014-10-05T14:05:17 | 24,826,519 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def setup():
... | [
"namso-01@hotmail.it"
] | namso-01@hotmail.it |
656b9a478e48b1c9114cb46915cfa1113d2c3a9e | 651a296c8f45b5799781fd78a6b5329effe702a0 | /polpak/bell_values.py | 22a15e0802b2391a06bf53d6f330732079415995 | [] | no_license | pdhhiep/Computation_using_Python | 095d14370fe1a01a192d7e44fcc81a52655f652b | 407ed29fddc267950e9860b8bbd1e038f0387c97 | refs/heads/master | 2021-05-29T12:35:12.630232 | 2015-06-27T01:05:17 | 2015-06-27T01:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,625 | py | #!/usr/bin/env python
#
def bell_values ( n_data ):
#*****************************************************************************80
#
## BELL_VALUES returns some values of the Bell numbers.
#
# Discussion:
#
# The Bell number B(N) is the number of restricted growth functions on N.
#
# Note that the Stirling nu... | [
"siplukabir@gmail.com"
] | siplukabir@gmail.com |
e636e89dc9a0a67ae30601cbdb6cdcf9947fef12 | e4f2aba6cb66ac33c5fc439374e8ef39d0bb0e4a | /Week-2-format-string/Exercise-4.py | 7d00cc9ba3f0f3a488faa705797ac2907d073325 | [] | no_license | AChen24562/Python-QCC | 573f5b545239aa24b8047c74539ca6b3e997faa0 | 1da01b76e209eb9b0d08f0f205d635bc2a149dfd | refs/heads/master | 2023-02-06T23:18:41.850377 | 2020-12-28T12:59:29 | 2020-12-28T12:59:29 | 289,614,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | width = 17
height = 12.0
delimiter = "."
print(width//2, type(width//2))
print(width/2.0, type(width/2.0))
print(height/3, type(height/3))
# delimiter * 5 = '.....', str
print(delimiter * 5, type(delimiter * 5))
| [
"54772925+AChen24562@users.noreply.github.com"
] | 54772925+AChen24562@users.noreply.github.com |
307a62915d6949a0d0da070e0c930329d1b02074 | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/compute/v20180601/get_log_analytic_export_request_rate_by_interval.py | 3eff60bb02dd42eaf3cbb6765a0555d41fb0c38f | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 3,956 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
"noreply@github.com"
] | morrell.noreply@github.com |
ae3b13b10359ae08b10f0782054445f49475fc90 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/maxProduct_20200731212441.py | c7bb8018626c41179870e4caa9d8418f760ec486 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | import sys
# time complexity is o(n3 ) and space is o(1)
def maxThree(arr):
if len(arr) < 3:
return -1
maxProduct = -(sys.maxsize -1)
print(maxProduct)
n = len(arr)
for i in range(0,n-2):
for j in range(i+1,n-1):
for k in range(j+1,n):
print('i',arr[i],... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
1699d7d134745de10adce3f9435f31332bfe41fd | 635cb7fb75048f9de7b95b48d1f59de68f9b3368 | /R09/używanie_metaklas_do_kontrolowania_tworzenia_obiektów/example1.py | e76bc265bf850d4e8c8757ec5aaa9bafea6fbc7d | [] | no_license | anpadoma/python_receptury3 | 9e889ac503e48eb62160050eecfdc4a64072c184 | c761f2c36707785a8a70bdaccebd7533c76dee21 | refs/heads/master | 2021-01-22T14:38:34.718999 | 2014-01-31T22:09:44 | 2014-01-31T22:09:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | # example1.py
#
# Bezpośrednie tworzenie obiektów jest niedozwolone
class NoInstances(type):
def __call__(self, *args, **kwargs):
raise TypeError("Nie można bezpośrednio tworzyć obiektu")
class Spam(metaclass=NoInstances):
@staticmethod
def grok(x):
print('Spam.grok')
if __name__ == '__ma... | [
"mtar@data.pl"
] | mtar@data.pl |
c6634f95a8581d8241a4d53c143fe96dbad59ea9 | 8516f0f456b91c0da6c016b64d68ff2c2cdaf68d | /src/array/intersect.py | 1dff47db905e488c248ad540666fbb1ba5276a6f | [] | no_license | huowolf/leetcode | b5bb67206fab6417055b0534c7627bc281a29eef | f34909f09c22d2164bbe21fc7da0361fcbd63fd6 | refs/heads/master | 2020-03-26T20:20:13.386017 | 2018-11-20T13:04:03 | 2018-11-20T13:04:03 | 145,317,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,160 | py | #https://leetcode-cn.com/explore/interview/card/top-interview-questions-easy/1/array/26/
#两个数组的交集 II
#给定两个数组,编写一个函数来计算它们的交集
#===============================================================================
# 输入: nums1 = [1,2,2,1], nums2 = [2,2]
# 输出: [2,2]
#===============================================================... | [
"274956285@qq.com"
] | 274956285@qq.com |
0968ca412075e81decf4567daec9d3887be7f97a | 0a2356bde96ebc9b6a82bd91a833bbe04ffb3b82 | /myInstagram/migrations/0006_auto_20201019_1230.py | 304e84e3452ec7887377156161bd1620a31e667a | [
"MIT"
] | permissive | dancan-sandys/Instagram-clone | 3c1ec335f0806ab714e8946fba94e87b17329c78 | 08cfe2a40f6e701beb6b5fc97a090b61d5e242f3 | refs/heads/master | 2023-01-01T09:20:52.186988 | 2020-10-20T11:19:39 | 2020-10-20T11:19:39 | 304,602,156 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-19 09:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('myInstagram', '0005_remove_photo_profile'),
]
operations = [
migrations.Al... | [
"dancan.oruko96@gmail.com"
] | dancan.oruko96@gmail.com |
de6ce81cbeb176a956e3e8f4d930d20d3ee38341 | 1b9bd441c500e79042c48570035071dc20bfaf44 | /sources/Yalkut Shimoni/set_alt_structs_nach.py | d8f9d28ee8faf0f6b3ed0e326dc0f06ecfc49d49 | [] | no_license | Sefaria/Sefaria-Data | ad2d1d38442fd68943535ebf79e2603be1d15b2b | 25bf5a05bf52a344aae18075fba7d1d50eb0713a | refs/heads/master | 2023-09-05T00:08:17.502329 | 2023-08-29T08:53:40 | 2023-08-29T08:53:40 | 5,502,765 | 51 | 52 | null | 2023-08-29T11:42:31 | 2012-08-22T00:18:38 | null | UTF-8 | Python | false | false | 4,419 | py | # -*- coding: utf-8 -*-
import urllib
import urllib2
from urllib2 import URLError, HTTPError
import json
import pdb
import os
import sys
from bs4 import BeautifulSoup
import re
p = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, p)
os.environ['DJANGO_SETTINGS_MODULE'] = "sefaria.settings... | [
"skaplan@brandeis.edu"
] | skaplan@brandeis.edu |
5167d45c33d996d136141fa7758a62e1f72334c7 | 8a2f5982c90c205cfee8f8fdce264a930c1b3749 | /acoustics/standards/iso_1996_1_2003.py | 266bc5cfdd490432fa7c696a757a75053959407c | [
"BSD-3-Clause",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | AlanLeJie/python-acoustics | 05dde3ba6b7cf07265f5186f3742bb22f01fa1bb | af72e7f88003f0bba06934ea38c98e8993c4a6c6 | refs/heads/master | 2023-08-28T18:41:08.924307 | 2020-08-18T21:37:14 | 2021-10-26T12:24:40 | 444,331,803 | 1 | 0 | BSD-3-Clause | 2022-01-04T07:52:28 | 2022-01-04T07:52:28 | null | UTF-8 | Python | false | false | 1,313 | py | """
ISO 1996-1:2003
===============
ISO 1996-1:2003 defines the basic quantities to be used for the description of
noise in community environments and describes basic assessment procedures. It
also specifies methods to assess environmental noise and gives guidance on
predicting the potential annoyance response of a co... | [
"fridh@fridh.nl"
] | fridh@fridh.nl |
c2506960988c3521a7ee66ffa6b3e0b8285d7800 | 741ee09b8b73187fab06ecc1f07f46a6ba77e85c | /AutonomousSourceCode/data/raw/sort/02e9654d-b2b6-4400-b461-b0237b1385b4__selection_sort.py | 32b8579c493ef2d06cb99bcee9dee400f3b1157d | [] | no_license | erickmiller/AutomatousSourceCode | fbe8c8fbf215430a87a8e80d0479eb9c8807accb | 44ee2fb9ac970acf7389e5da35b930d076f2c530 | refs/heads/master | 2021-05-24T01:12:53.154621 | 2020-11-20T23:50:11 | 2020-11-20T23:50:11 | 60,889,742 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 822 | py | from ds import arrays
import sys
from profile import profile
@profile
def sort(a):
selection_sort(a,0,len(a))
def selection_sort(a,start,length):
for i in xrange(start+1,start+length):
key = a[i]
j = i
while(j>start and a[j-1]>key):
a[j] = a[j-1]
j -= 1
... | [
"erickmiller@gmail.com"
] | erickmiller@gmail.com |
74e26e09eea6b1c02032bef6283506cea981f66f | 5b11be48f06b6779fe073deb90dde14659543367 | /coloredlogs/tests.py | f160d525e80fffe8de65f5b542bdc121101ea1e4 | [
"MIT"
] | permissive | davliu/python-coloredlogs | 03a612a6d6dd72255d7cee98386bf74f7ed5a204 | 549decbfde404b475cb772e86bdb5091f9f1baff | refs/heads/master | 2020-05-20T18:31:58.680478 | 2015-06-02T19:03:23 | 2015-06-02T19:03:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,045 | py | # Automated tests for the `coloredlogs' package.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: May 27, 2015
# URL: http://coloredlogs.readthedocs.org
# Standard library modules.
import logging
import random
import re
import string
import unittest
# External dependencies.
from humanfriendly.terminal ... | [
"peter@peterodding.com"
] | peter@peterodding.com |
49a15a9cea2349452b2a8d4b6d3320a51ee31a06 | cd4f28ff0efa74889c4db8e91fb2caaebe37d592 | /data.py | 4fe388fae73f36ff04095a522803be9981dd224a | [] | no_license | quirell/CSOBO | fd59f4fac0f9f38c32afb7277d6a4c1ecc59a8ea | 73a98374cbf21920cecc9b19f77aee1624339769 | refs/heads/master | 2021-01-13T02:06:14.489103 | 2015-05-24T00:39:16 | 2015-05-24T00:39:16 | 33,379,478 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,948 | py | __author__ = 'quirell'
import os
import re
class TestCase:
"""
fullname - nazwa przypadku testowego
testname - nazwa grupy do ktorej przypadek testowy nalezy, wiecej tu: http://anjos.mgi.polymtl.ca/qaplib/inst.html
value - najlepsza (minimalna) wartosc rozwiazania
solution - permutacja dla ktorej... | [
"="
] | = |
746cf426cb0daad0ecbfe251adf903b1597644cb | 01b8229a1adbc8149e4226c81e31e56e0598b87b | /python/emp.py | 8904efc26c20d0c856d6e55dda26f62c425d2f7a | [] | no_license | Amel294/amel | 660f4cbd16f58d89a624bc90beeb791d239c6959 | e54fd091a4bff436fe94a9901ca9b7c189b6824d | refs/heads/master | 2023-05-10T16:56:54.039667 | 2023-05-08T16:57:18 | 2023-05-08T16:57:18 | 160,795,270 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | class employee:
def add(self):
self.name=raw_input('\nenter employee name:\t')
self.nuber=input('\nemployee number:\t')
self.salary=input('\nenter salary:\t')
def show(self):
print('\nname=',self.name,'\n')
print('e number=',self.nuber,'\n')
print('salary=',self.salary,'\n')
x=employee()
x.ad... | [
"amel294@gmail.com"
] | amel294@gmail.com |
bebb96c64a6feaa14c97cbda198522f712b111c1 | d525935af3c80584fb2175623591a1fc86349db5 | /Problems/Process integer input/task.py | 929699ff539661399dfca3f35156baba73cba1c6 | [] | no_license | TonyNewbie/CoffeeMachine | 63822ffdec8570166ebf44c0ffe51bfa14d33810 | 319c41189ede6a2e6e33bd15ae675101c3377b62 | refs/heads/master | 2022-04-22T13:23:47.904126 | 2020-04-26T07:25:44 | 2020-04-26T07:25:44 | 258,960,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | number = int(input())
while number < 101:
if number < 10:
number = int(input())
continue
print(number)
number = int(input())
| [
"prostomaster90@gmail.com"
] | prostomaster90@gmail.com |
8bd8d6553e25d404d1919bb14a246ace10a097c8 | a1a57977131ea917a3f3094dae4a3d18846103c0 | /tests_auto/2d/quad4/axialdisp_gendb.py | d81640af303b4b9322f9a47bbcf8322f0d52db21 | [
"MIT"
] | permissive | rwalkerlewis/pylith | cef02d5543e99a3e778a1c530967e6b5f1d5dcba | 8d0170324d3fcdc5e6c4281759c680faa5dd8d38 | refs/heads/master | 2023-08-24T18:27:30.877550 | 2020-08-05T16:37:28 | 2020-08-05T16:37:28 | 154,047,591 | 0 | 0 | MIT | 2018-10-21T20:05:59 | 2018-10-21T20:05:59 | null | UTF-8 | Python | false | false | 2,319 | py | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
1e175f5fbd461cacef895e6d82085207e7b62938 | 02ea99ea65d4768781b59ac97082fa7e1763711c | /neural_structured_learning/estimator/adversarial_regularization.py | a63a7ad858f2c30b8260beef2ba03ee89b88acf5 | [
"Apache-2.0"
] | permissive | Nzteb/neural-structured-learning | cad8a94b7b7d0d77eb0d0dca584398d749ff4ca6 | 0d50227f01556b1cebbd841496f5d1c9c4ef4a61 | refs/heads/master | 2022-11-15T22:10:32.112476 | 2020-07-09T00:13:09 | 2020-07-09T00:13:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,326 | py | # Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
"tensorflow.copybara@gmail.com"
] | tensorflow.copybara@gmail.com |
6f0e144c9f2150d6ed2b247269a15962705f55d8 | f98c9dea0e212be5c7bc3161499e5633383bd4d7 | /zmq/zmq_client.py | a27214a3bfe54b37c5d0b7c49f3ab8e11e63d9e0 | [
"MIT"
] | permissive | ysoftman/test_code | dddb5bee3420977bfa335320a09d66e5984403f5 | 0bf6307073081eeb1d654a1eb5efde44a0bdfe1e | refs/heads/master | 2023-08-17T05:45:49.716829 | 2023-08-16T05:00:09 | 2023-08-16T05:00:09 | 108,200,568 | 4 | 0 | MIT | 2023-03-15T04:23:10 | 2017-10-25T00:49:26 | C++ | UTF-8 | Python | false | false | 713 | py | #-*- coding: utf-8 -*-
# 20160422 ysoftman
# pyzmq (python3.x) client
import zmq
import sys
def send_req(ip, port):
context = zmq.Context()
socket = context.socket(zmq.REQ)
# socket.setsockopt(zmq.REQ, b'')
socket.connect("tcp://%s:%s" % (ip, port))
# python 3 에서 기본 인코딩이 유니코드
# send 함스는 유니코드를... | [
"ysoftman@gmail.com"
] | ysoftman@gmail.com |
7f0537ded18f3ab59f3f0455f9f3074597b23440 | 377e3a552fb807febc18ce036af77edbce93ca19 | /binary trees/inorder_traversal_DFS.py | 47831f96111d76a9cebf1a030c565db26ac4a083 | [] | no_license | souravs17031999/100dayscodingchallenge | 940eb9b6d6037be4fc0dd5605f9f808614085bd9 | d05966f3e6875a5ec5a8870b9d2627be570d18d9 | refs/heads/master | 2022-10-29T11:05:46.762554 | 2022-09-28T13:04:32 | 2022-09-28T13:04:32 | 215,993,823 | 44 | 12 | null | 2022-08-18T14:58:50 | 2019-10-18T09:55:03 | Python | UTF-8 | Python | false | false | 2,714 | py | # Program for inorder traversal for a binary tree
# --------------------------------
# As we know inorder traversal means, Left-Node-Right
# We can take example for follwoing tree and visualize stack call :
# 1
# / \
# 2 3
# / \
# 4 5
#
# RECURSIVE APPROACH
# -------------... | [
"souravs_1999@rediffmail.com"
] | souravs_1999@rediffmail.com |
da5ef56bfccc88c74e51c8cf0376e38e3a3ca319 | 7626a8371c7a847f93bdae5e1d6e03ee9667c3ba | /print/users/migrations/0001_initial.py | 08083d447c75319b2a232ce671351aac48b5e516 | [] | no_license | zzyzx4/sp | 52c815fd115b4605942baa73687838f64cd41864 | 90c7a90b3de27af674422e2c8892bad5ba7891e8 | refs/heads/master | 2020-05-23T21:20:28.166932 | 2019-07-19T11:56:49 | 2019-07-19T11:56:49 | 186,950,380 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | # Generated by Django 2.2.2 on 2019-06-24 15:40
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),
]
ope... | [
"you@example.com"
] | you@example.com |
946f6acb38c734fdff7ed61463b00a60f7de3399 | f0316e656767cf505b32c83eef4df13bb9f6b60c | /Kattis/qaly.py | 86b1b75314997d2f525dc10e31ebf5f2bd66f855 | [] | no_license | AkshdeepSharma/Classroom | 70ec46b35fab5fc4a9d2eac430659d7dafba93da | 4e55799466c101c736de6c7e07d716ff147deb83 | refs/heads/master | 2022-06-13T18:14:03.236503 | 2022-05-17T20:16:28 | 2022-05-17T20:16:28 | 94,828,359 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | N = int(input())
qaly = 0
for i in range(N):
nums = input().split(" ")
qaly += float(nums[0]) * float(nums[1])
print(round(qaly, 3))
| [
"akshdeep.sharma1@gmail.com"
] | akshdeep.sharma1@gmail.com |
a332e92186cd5002d1095263b0a5abaae4af5d37 | 3c27b86f0165ab24e6b04d505e8471e032594f0b | /pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGL/raw/GLES1/OES/texture_cube_map.py | 1f616ca628a9790612c0acccc4ae8f17355fac0e | [
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"LGPL-2.1-or-later",
"GPL-3.0-only",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"MIT"
] | permissive | alexus37/AugmentedRealityChess | 8b9ccdfffc8aee93a86a44b8ef53c034ec6a10d1 | 7f600ad153270feff12aa7aa86d7ed0a49ebc71c | refs/heads/master | 2020-12-24T13:29:21.967833 | 2020-02-27T09:38:50 | 2020-02-27T09:38:50 | 31,264,034 | 1 | 1 | MIT | 2020-02-27T09:38:52 | 2015-02-24T14:36:34 | Python | UTF-8 | Python | false | false | 2,394 | py | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GLES1 import _types as _cs
# End users want this...
from OpenGL.raw.GLES1._types import *
from OpenGL.raw.GLES1 import _errors
from OpenGL.constant import Constant as _C
import... | [
"alexlelidis@gmx.de"
] | alexlelidis@gmx.de |
fc32d33d92acf211a927ee9591a9c2e2c794716f | faa83048d2bb62c27f030942f3f038f87637c293 | /indico/core/oauth/protector.py | 29693821d8a79e3bc2dcaeb25d629331dcedddbf | [
"MIT"
] | permissive | janschill/indico | f79536db43afaf631449fef5119069af2938e76d | 068a947446eb624308d6264e34a4061807e6ff12 | refs/heads/master | 2023-06-08T07:32:33.007683 | 2021-06-18T12:42:03 | 2021-06-18T12:42:03 | 339,700,154 | 0 | 0 | MIT | 2021-06-18T12:42:04 | 2021-02-17T11:22:48 | Python | UTF-8 | Python | false | false | 3,105 | py | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import flask
from authlib.integrations.flask_oauth2 import ResourceProtector
from authlib.oauth2.rfc6750.v... | [
"adrian.moennich@cern.ch"
] | adrian.moennich@cern.ch |
78b44ed568709f7982622043bd51601faeed8ab8 | 4791bde7bb7275fc25480fdf0cd81d1a9450a50c | /accounts/views.py | 2cd377f5f3cbd97f9432c0c428c386f474093f90 | [] | no_license | VinneyJ/RU-I-tech-app | 9692f0681dd704ce52c621b3d080d1a90fbe501b | dd15335f26a35d8e32477e7dd384f3a80351d25d | refs/heads/master | 2020-05-02T21:04:17.773867 | 2019-03-28T13:25:18 | 2019-03-28T13:25:18 | 178,209,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,070 | py | from django.shortcuts import render, redirect
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, logout
from accounts.form import UserRegisterForm, UserUpdateForm, ProfileUpdateForm
from .models import Profile
# C... | [
"vincentjayden49@gmail.com"
] | vincentjayden49@gmail.com |
86c0cb10d29d06dcf7aa7a311986ac1f5d219e7e | 2420eab92b5d1ec2225d2eeb128a41e3c7b1ce38 | /11/JackTonenizer.py | b7a45cc64a958be663d46d4e26cc25dc8127e138 | [] | no_license | hokiepete/building-a-modern-computer-from-first-principles | f98549a5d32ff23d4eab3b089324e61dac22841a | bba0d437b10ba5b5f6861067b3a0ba4ac14ef447 | refs/heads/master | 2023-08-17T21:38:44.589836 | 2021-10-24T01:41:56 | 2021-10-24T01:41:56 | 385,073,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,155 | py | # Main program that sets up and invokes the other modules
import os
KEYWORDS = set([
'class','constructor','function','method','field','static','var','int','char','boolean',
'void','true','false','null','this','let','do','if','else','while','return'
])
SYMBOL = set([
'{','}','(',')','[',']','.',',',';','+'... | [
"pnolan1986@gmail.com"
] | pnolan1986@gmail.com |
6a8158e71b678a31bafc2805c7a170059a1636e0 | 8528604d3231d86feada09465170220b892c1c35 | /landlab/grid/warnings.py | f1b23dd50399188b1024ed1c35288a9fb622b4ba | [
"MIT"
] | permissive | ChristinaB/landlab | 9780acbd5753741cd91c40dbc5d683b66f2481a6 | 82fd45d059dbe58728b074b024e46a1a10ce1e5c | refs/heads/master | 2021-04-26T22:45:44.007416 | 2020-12-02T22:57:27 | 2020-12-02T22:57:27 | 124,138,852 | 0 | 1 | MIT | 2020-12-02T22:57:28 | 2018-03-06T21:08:56 | Python | UTF-8 | Python | false | false | 988 | py | import os
from ..core.messages import deprecation_message
class DeprecatedSignature(DeprecationWarning):
msg = "You are using a deprecated calling signature."
def __init__(self, name, old=None, new=None):
self._name = name
self._old = old
self._new = new
if old:
... | [
"mcflugen@gmail.com"
] | mcflugen@gmail.com |
99a5ca707f3d8c2a1b8bca69fffae0e09c4debbb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03007/s124226483.py | 6a9358f63822c404d9005c20865e9e13e95ae0d6 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | def c_successive_subtraction(N, A):
A.sort()
maximum = A.pop()
minimum = A.pop(0)
# Aの要素のうち、最大のものと最小のものを分けて置いておく。
# それら以外の要素 a_k について、
# a_k が非負なら、最小のものから a_k を引くことで負の方向に大きくできる。
# a_k が負なら、最大のものから a_k を引くことで正の方向に大きくできる。
# 最後に 最大のもの - 最小のもの とすると、最後に残る整数を最大にできる。
operation = []
for... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
2c9a70b0cecef465d4b201e73b956ba6ebe213bf | d1969a22afb7adda791caa4edf464dad02b684c0 | /apps/edu/urls.py | b7d0eac3b362ac6a5aee738851c571d6a27a6507 | [
"MIT"
] | permissive | local-host-club/cms | 11d4ea1105dabc6d0a60b935484b5f9eb2ec1da9 | 136fb075f11011ea77672b3468f69262a43eb500 | refs/heads/master | 2020-07-02T17:09:36.135855 | 2016-11-28T13:31:11 | 2016-11-28T13:31:11 | 74,293,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,036 | py | """cms URL Configuration
"""
from django.conf.urls import url
from apps.edu import views
urlpatterns = [
url(r'^curriculo/$', views.CompetenciaAreaList.as_view(), name='curriculo'),
url(r'^competencia_area/add$', views.CompetenciaAreaCreateView.as_view(), name='competencia_area_add'),
url(r'^competencia_ar... | [
"jinchuika@gmail.com"
] | jinchuika@gmail.com |
6c2852e49e135f9302519afe6ba267c820f0331f | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=2.0_rd=0.5_rw=0.04_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=53/sched.py | 4782c407067e60157e4904c483d2dc99938f2852 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | -X FMLP -Q 0 -L 2 70 300
-X FMLP -Q 0 -L 2 60 200
-X FMLP -Q 1 -L 2 58 175
-X FMLP -Q 2 -L 2 55 175
-X FMLP -Q 3 -L 1 33 200
30 400
30 400
26 100
20 125
15 175
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
f9799d5d427629227541426eb2f76d39b9c7be55 | 06e2dd0aa78241edbe647a8b5ef075a90ee4a8b6 | /97/holidays.py | 719a5166b67dda66aa92ab9dfadacfa9422f242d | [] | no_license | StefanKaeser/pybites | a6a78b51039ab4792deb285dc799c6abf7bea6d5 | 9f839af4ef400786b7c28701c2241f310bb4422c | refs/heads/master | 2020-08-23T11:28:03.172666 | 2020-06-15T15:37:14 | 2020-06-15T15:37:14 | 216,606,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,051 | py | from collections import defaultdict
import os
from urllib.request import urlretrieve
from bs4 import BeautifulSoup
# prep data
# tmp = os.getenv("TMP", "/tmp")
tmp = os.path.curdir
page = "us_holidays.html"
holidays_page = os.path.join(tmp, page)
urlretrieve(f"https://bites-data.s3.us-east-2.amazonaws.com/{page}", h... | [
"stefan.kaeser7@gmail.com"
] | stefan.kaeser7@gmail.com |
0381c9188731c7b9a643d7d35757c09a22da7724 | f2ebfb99b0e6a07afba7e583f820737511a1a98e | /code/models/listener.py | 53325f3801b8e3ba46209f53072932ee06991b75 | [
"MIT"
] | permissive | jayelm/emergent-generalization | 211c065d4829322792396ad6605dc51024e913cd | 35b1d97a940826008cde13498aa75c233a7f454a | refs/heads/master | 2023-08-27T00:25:32.988514 | 2021-09-29T04:47:22 | 2021-09-29T04:47:22 | 373,944,198 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,517 | py | """
Listener models
"""
import torch
import torch.nn as nn
from . import rnn
class CopyListener(nn.Module):
def __init__(self, feat_model, message_size=100, dropout=0.2):
super().__init__()
self.feat_model = feat_model
self.feat_size = feat_model.final_feat_dim
self.dropout = nn... | [
"6245103+jayelm@users.noreply.github.com"
] | 6245103+jayelm@users.noreply.github.com |
de99f451e82714b1c4644394330ee7044c740365 | 62cbf8dcd921feb309d79ad66767405ea27623ba | /python/boj/2667_boj_danji.py | 34b79935b3fb77392d1a17aad2eb8c53ba322477 | [] | no_license | woodg1207/APS | 1d20f8b7c6d7a7f41e9920ec41ad0c435a881519 | e49a6fb01e1a51213963cd58f13a1364833482f8 | refs/heads/master | 2023-06-13T21:41:28.114299 | 2021-06-21T04:17:19 | 2021-06-21T04:17:19 | 288,982,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | import sys; sys.stdin=open('s2667.txt','r')
from collections import deque
N = int(input())
arr = [list(map(int, input())) for _ in range(N)]
dr = [1,0,-1,0]
dc = [0,1,0,-1]
danji_list = []
for i in range(N):
for j in range(N):
if arr[i][j]:
arr[i][j] = 0
c = 1
q = ... | [
"woodg1207@gmail.com"
] | woodg1207@gmail.com |
77ceff54bf05ef0ec310abe67194e4c272925c48 | a7b66311c2ce113789933ec3162f1128b2862f13 | /app/closeLoop/ForcastDiffFactor.py | 08170df61a83a596a2f558df9d51de995411210f | [
"MIT"
] | permissive | ChanJeunlam/geolearn | 214b2c42359ea1164b39117fad2d7470adeb6d35 | 791caa54eb70920823ea7d46714dc8a3e7fa7445 | refs/heads/master | 2023-07-16T04:13:15.526364 | 2021-08-16T05:24:18 | 2021-08-16T05:24:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,847 | py | from hydroDL import pathSMAP, master, utils
from hydroDL.master import default
from hydroDL.post import plot, stat
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
import pandas as pd
doLst = list()
# doLst.append('train')
doLst.append('test')
doLst.append('post')
saveDir = os.path.join(pathSM... | [
"geofkwai@gmail.com"
] | geofkwai@gmail.com |
0a606a1b05d67e2bbd7b110945393561282c0ba4 | 430db754af2a7481358df2dcd7f74919c4ecddcf | /prob_tools/tools.py | 6acebfcfbb108e282202e948521f5579880f9c75 | [
"MIT"
] | permissive | arruda/exercicios_probabilidade | 567eb318ff137bcce155142d3a951cf6b1c40515 | dca3503a0b4d982e63795b775bf30b9b95440bcd | refs/heads/master | 2021-01-19T19:35:24.552403 | 2014-10-22T18:31:42 | 2014-10-22T18:31:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import math
def combinacao(n, p):
"""
Combinação de N, P à P
"""
n_fat = math.factorial(n)
p_fat = math.factorial(p)
n_menos_p_fat = math.factorial(n-p)
return n_fat / (p_fat * n_menos_p_fat)
def bernuille():... | [
"felipe.arruda.pontes@gmail.com"
] | felipe.arruda.pontes@gmail.com |
6060cea90a85849c7a6e237732ba3d0a8e87983d | ec0e1779383bec96de803ba893de5096c563158f | /tensorflow/python/estimator/inputs/pandas_io.py | a1e418f487c5b7da6907fa945fba0165334432cf | [] | no_license | DengZhuangSouthRd/simple_tensorflow | 45d8fc7c2ef9da947f11f876aff7c1e169dc457c | 83d742219c4a04c61822935487626890bc735301 | refs/heads/master | 2021-01-18T19:05:36.414639 | 2017-04-01T15:06:16 | 2017-04-01T15:06:16 | 86,887,616 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,137 | py | # Copyright 2017 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... | [
"liuguiyangnwpu@163.com"
] | liuguiyangnwpu@163.com |
b2c8ee7450114fe41b23728d52ab158c5be37155 | 37c38ef8ead53739b3128147da9a24c44cfccccb | /froide/helper/search.py | 096eeb8474bc34da53009caf07af0861a887d59b | [
"MIT"
] | permissive | zlodej/pekel | ff102dc1c05180dfcff6a30bd944252d128e0fb5 | b1114618ef032503ab49476e738e90952c4da71a | refs/heads/master | 2021-05-06T15:38:28.301853 | 2017-12-02T11:33:19 | 2017-12-02T11:33:19 | 102,724,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,627 | py | from haystack.fields import NgramField
from haystack.exceptions import MissingDependency
class SuggestField(NgramField):
pass
try:
from haystack.backends.elasticsearch_backend import (
ElasticsearchSearchEngine, ElasticsearchSearchBackend, FIELD_MAPPINGS
)
except (ImportError, MissingDependency... | [
"mail@stefanwehrmeyer.com"
] | mail@stefanwehrmeyer.com |
a23d5a870a4d32a4c8c889089b00f6e56ee3dd50 | 73c2ec3edf0f6eaea4ce1f73e910f02592119a42 | /mmdet/models/utils/fpn_utils.py | ab7558ff1ecd6d699cd8724dd5260b276affb28f | [
"Apache-2.0"
] | permissive | violet998/video_class_agnostic_segmentation | ab9b496415857678979a70890cb68e92fa014061 | c4614fe675e8a5352012f603c15bc24fb43d690c | refs/heads/main | 2023-04-20T15:31:37.699645 | 2021-04-22T16:41:26 | 2021-04-22T16:41:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | import torch
import torch.nn.functional as F
def merge_fpn(x, average=True):
max_size = x[0].shape
merged_fpn = []
for i, _ in enumerate(x):
merged_fpn.append(F.interpolate(x[i], max_size[-2:]))
if average:
return torch.stack(merged_fpn).mean(dim=0)
else:
concat = torch.stac... | [
"mennatul@ualberta.ca"
] | mennatul@ualberta.ca |
7099ddfcc80ff50780eeb6bea1817b88a9fa94f2 | 70d929497cbd70bb40ed939f3aa0ce56c3f7d816 | /pandas/core/groupby/ops.pyi | 58a34d0c2081a8e25b9bb1f4bab161d88906e3f0 | [
"MIT"
] | permissive | matangover/python-type-stubs | abd4bc46f9841d0a2c44e1597055019d21f9ee70 | 15285c6b88dc684d9de9bfdaf8b72d4eb7c3e257 | refs/heads/main | 2023-07-13T04:19:03.481222 | 2021-08-05T20:26:18 | 2021-08-05T20:26:18 | 399,435,272 | 0 | 0 | MIT | 2021-08-24T11:11:57 | 2021-08-24T11:11:56 | null | UTF-8 | Python | false | false | 2,824 | pyi | import numpy as np
from pandas._typing import FrameOrSeries as FrameOrSeries
from pandas.core.groupby import grouper as grouper
from pandas.core.indexes.api import Index as Index
from pandas.core.series import Series as Series
from typing import List, Optional, Sequence, Tuple
class BaseGrouper:
axis = ...
sor... | [
"gram@geekraver.com"
] | gram@geekraver.com |
f3ce2b0bddb87af3a6913e654894d0f19c5a9fe7 | 436166fda7a671805b8fa6fc06e68bf7d42f9be6 | /test/boost.py | f977bb0860e75e9f0cee74eff9cad1e18a818acf | [] | no_license | VitalyVorobyev/libLinAl | 1e4872feb0e5deb70d9c3acc2e31e676e27818c2 | b815efeee109922ffd28d97b9253f636403aa999 | refs/heads/master | 2021-01-22T08:39:29.897025 | 2020-08-28T04:06:52 | 2020-08-28T04:06:52 | 81,914,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,131 | py | """ Boost """
import numpy as np
import matplotlib.pyplot as plt
from liblinal import vect, lvect
def boost_test():
""" Boost unit test """
boost_list = np.linspace(0.0001, 0.9, 500)
txprime = np.array([lvect(1., 0, 0, 0).boost(vect(bx, 0, 0)).as_list[:2]
for bx in boost_list])
... | [
"vit.vorobiev@gmail.com"
] | vit.vorobiev@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.