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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7cd7280a8fe0e76ea694356b8e664387c4b0dd8 | 187a6558f3c7cb6234164677a2bda2e73c26eaaf | /jdcloud_sdk/services/edcps/apis/DescribeInstanceRaidRequest.py | ffe9791f476342b0cfcad38c975a790eaf25c446 | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-python | 4d2db584acc2620b7a866af82d21658cdd7cc227 | 3d1c50ed9117304d3b77a21babe899f939ae91cd | refs/heads/master | 2023-09-04T02:51:08.335168 | 2023-08-30T12:00:25 | 2023-08-30T12:00:25 | 126,276,169 | 18 | 36 | Apache-2.0 | 2023-09-07T06:54:49 | 2018-03-22T03:47:02 | Python | UTF-8 | Python | false | false | 1,552 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
"[email protected]"
] | |
b64a06b58deef6f2abcc090b1cd40042604dfc0f | e315715504e54e2c4af04abec0e179d233a003de | /example.py | 67dd869c62199db4639d2f4c85dd184b6b038086 | [
"MIT"
] | permissive | CaliDog/tachikoma | d80ce280c33a6bf39644fb7eb6bc3af0186b4db6 | 3955ff97c14ba9747c42324cb6a2955419c6e71e | refs/heads/master | 2021-09-22T09:49:54.030468 | 2018-09-07T16:38:03 | 2018-09-07T16:38:03 | 108,040,909 | 21 | 3 | null | 2018-09-07T16:10:15 | 2017-10-23T21:20:50 | Python | UTF-8 | Python | false | false | 511 | py | import tachikoma
from tachikoma import analyzers
from tachikoma import generators
from tachikoma import emitters
pipeline = tachikoma.Pipeline(
generators={
"slack": generators.SlackGenerator(),
"aws.iam": generators.AWSACMGenerator(),
"aws.acm": generators.AWSIAMGenerator(),
},
an... | [
"[email protected]"
] | |
e6b701c4e85ace8f8f42cbd77905813b1d824f87 | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/insights/v20191017preview/get_private_link_scoped_resource.py | 0294eb716232b389cedb14f651bdf588d455d348 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 3,981 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | [
"[email protected]"
] | |
832eeb22d69bb86c317491a4cdcc67e51034ff48 | f40e5c91a18fc5c7e0b4d96fe964a493f924e958 | /supervised_learning/0x00-binary_classification/15-neural_network.py | 8741dca8460da62b04755c3d6e890d729cf38caa | [] | no_license | jgadelugo/holbertonschool-machine_learning | ab46f71477998371ca5e3623455d61fe334ab221 | e20b284d5f1841952104d7d9a0274cff80eb304d | refs/heads/master | 2023-02-01T03:52:43.723569 | 2020-12-10T19:28:57 | 2020-12-10T19:28:57 | 256,043,170 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,674 | py | #!/usr/bin/env python3
"""
Class defines a single neuron performing binary classification
"""
import numpy as np
import matplotlib.pyplot as plt
class NeuralNetwork:
""" class neuron"""
def __init__(self, nx, nodes):
""" initialize """
# nx is the number of input features
if not isins... | [
"[email protected]"
] | |
fc39807e7990bb84b9dd55a1058e1b467a921a81 | 8b22963b0ac1581249552ed9f61e6730b0d1898f | /src/encoded/commands/dev_servers.py | e2a122a2d970812b135f6b3e7e7db1bfc68835d9 | [
"MIT"
] | permissive | brianleesc/encoded | a070e07f59c59a19220908fc7f8f71db015a1c73 | 0d2961f04cf542f78e6f29c9a08da1b2913782c5 | refs/heads/master | 2021-01-17T12:11:10.578814 | 2015-02-06T21:38:13 | 2015-02-06T21:38:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,334 | py | """\
Examples
For the development.ini you must supply the paster app name:
%(prog)s development.ini --app-name app --init --clear
"""
from pyramid.paster import get_app
import atexit
import logging
import os.path
import select
import shutil
import sys
EPILOG = __doc__
logger = logging.getLogger(__name__)
def... | [
"[email protected]"
] | |
eab02dfd11097c80f771656034ab7171b20fe987 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/196/usersdata/264/76878/submittedfiles/atividade.py | 3740bbe7d78d83dbfaf5e714b13d553895fe31d1 | [] | 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 | 244 | py | # -*- coding: utf-8 -*-
import math
n= int(input('Digite o valor de n: '))
a=0
s=0
i=1
numerador=1
if (n<0):
n= n*(-1)
else:
n=n
while (i<=n):
s= (numerador)/(n+a)+s
i=i+1
a=a-1
numerador= numerador + 1
print ('%.5f' %s) | [
"[email protected]"
] | |
aaaa1b695c26d13e55cfc7fffabe7e8d8b5ce84f | 50f04c633f36e9d64c40c4f1b434ed0c24e447c7 | /tkinter-examples/left_tab.py | 76d9d1583711f1ae8196f13e7fddc2e109f2d34b | [] | no_license | sarahchou/python-practice | 883ba7dedd60b2cc18d5d73ef7d3cbb74f09dede | 2a3d10144b74460d8ec513e3c7d49bdb48107596 | refs/heads/master | 2022-11-11T10:06:12.944579 | 2018-06-11T22:14:06 | 2018-06-11T22:14:06 | 136,985,077 | 0 | 1 | null | 2022-10-20T08:48:36 | 2018-06-11T21:54:46 | Python | UTF-8 | Python | false | false | 1,620 | py | import tkinter as tk
from tkinter import ttk
class TFEnvSelectionScreen(tk.Frame):
"""
This is where we give the user the chance to select their Terraform environment.
Uses a drop down menu for environment selection.
"""
def __init__(self, parent, controller):
root = tk.Tk()
style... | [
"[email protected]"
] | |
1591790717be37542d2bbec2c3978a7a11fec374 | 732c0303ecfe8e915548846144e2a257d0ba0bd0 | /prob139.py | dea51619317d90ea968cedd82d869736ac4078c6 | [] | no_license | mercurium/proj_euler | e2c041d833b80369f0e7b7aa493a9ff5c1e22d91 | a8326af80cac040fa515350cf9972dca6f116f82 | refs/heads/master | 2020-04-06T05:24:31.185785 | 2017-05-06T23:50:56 | 2017-05-06T23:50:56 | 9,540,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 952 | py | import time
START = time.time()
SIZE = 10**8
pythagTriplet = set()
count = 0
for m in xrange(1,SIZE):
if 2*m*(m+1) > SIZE:
break
diff = 2 if m%2 == 0 else 1
nLim = SIZE/(2*m) - m
for n in xrange(1,min(m,nLim+1),diff):
d,f = m*m,n*n
a,b,c = d-f,2*m*n,d+f
if a+b+c >=... | [
"[email protected]"
] | |
ca64a4a361b84710defb666ee771b4f6d6ebac6a | d488f052805a87b5c4b124ca93494bc9b78620f7 | /google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/accesscontextmanager/v1alpha/resources.py | a27052377017c6cf020e34d96072355a779e411c | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] | permissive | PacktPublishing/DevOps-Fundamentals | 5ce1fc938db66b420691aa8106ecfb3f9ceb1ace | 60597e831e08325c7e51e8557591917f7c417275 | refs/heads/master | 2023-02-02T04:48:15.346907 | 2023-01-30T08:33:35 | 2023-01-30T08:33:35 | 131,293,311 | 13 | 19 | null | null | null | null | UTF-8 | Python | false | false | 1,840 | py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"[email protected]"
] | |
781b936bd6b7a6d6bca1a2cd172a259c68c9c05d | 368b89707805e8ac6d5baf26a11b280369995ca5 | /src/server/db/__init__.py | a67a6f3951ae05d2b8532be1e5c10e3a9612a4c5 | [] | no_license | cheng93/fof | 2940d739c1399c88db06b5c99e8075e918fbf060 | 0115a6d3f6775c5c1c8a30cfd7f6f7f9006e75fe | refs/heads/develop | 2020-03-19T06:55:20.274365 | 2018-07-25T22:14:11 | 2018-07-25T22:14:11 | 136,067,138 | 0 | 0 | null | 2018-07-25T22:14:12 | 2018-06-04T18:33:35 | Python | UTF-8 | Python | false | false | 489 | py | from db.conference import conference
from db.division import division
from db.draft import draft
from db.game import game
from db.player import player
from db.player_history import player_history
from db.position import position
from db.team import team
from db.staff import staff
from db.staff_group import staff_group
... | [
"[email protected]"
] | |
c749d8f7dbf564892ee366d7c3c6f7047ba94386 | 03dad0fb0d76b61524ab172e342e3e4ec22614d7 | /blender/arm/assets.py | cad343ada758334d3d277a06a79765bf10c75dff | [
"GPL-2.0-only",
"Zlib"
] | permissive | ceostevenjrogers/armory | 1739f1ddec20d7c720baaa7fd4952d14872c375a | c50a086d244dc2acac102ba91cb33e4b47bf40be | refs/heads/master | 2020-04-09T11:17:06.347466 | 2018-12-02T15:45:43 | 2018-12-02T15:45:43 | 160,304,146 | 1 | 0 | Zlib | 2018-12-04T05:33:45 | 2018-12-04T05:33:44 | null | UTF-8 | Python | false | false | 5,194 | py | import shutil
import os
import stat
import bpy
import arm.utils
assets = []
reserved_names = ['return.']
khafile_defs = []
khafile_defs_last = []
embedded_data = []
shaders = []
shaders_last = []
shaders_external = []
shader_datas = []
shader_passes = []
shader_passes_assets = {}
shader_cons = {}
def reset():
glo... | [
"[email protected]"
] | |
b7461bb69fa37381ee883fe28d2995c0f9a596d9 | f3bd271bf00325881fb5b2533b9ef7f7448a75ec | /xcp2k/classes/_check_spline4.py | 594c19bac098d7a9a6471e37e50d007ad70eca84 | [] | no_license | obaica/xcp2k | 7f99fc9d494859e16b9b0ea8e217b0493f4b2f59 | 6e15c2c95658f545102595dc1783f5e03a9e6916 | refs/heads/master | 2020-07-15T17:27:43.378835 | 2019-02-11T16:32:24 | 2019-02-11T16:32:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | from xcp2k.inputsection import InputSection
from _each309 import _each309
class _check_spline4(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Section_parameters = None
self.Add_last = None
self.Common_iteration_levels = None
self.Filename = None
... | [
"[email protected]"
] | |
149c01d58071fd26c34db132b17aa214201a0652 | 3bcb4cba2caa77acf7e418455c29074d06553f7e | /scripts/files-touched-check.py | dc8077d357f74af375dae10523da758a621226c1 | [] | no_license | eleccoin/gitian.sigs | 7c02be84ee2dbf05334b1863c05e0f860ee5f0d8 | 056e34324642b28659d7b47832115bd3358b17fa | refs/heads/master | 2021-07-15T23:36:46.830658 | 2021-02-11T11:18:58 | 2021-02-11T11:18:58 | 237,335,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,456 | py | #!/usr/bin/env python3
# Copyright (c) 2018 The Eleccoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import os
import sys
import subprocess
travis_commit_range = os.getenv('TRAVIS_COMMIT_RANGE')
if not travis_... | [
"[email protected]"
] | |
5ea95e780de03641bc3fa55a4a4d96545eb0e332 | a1f6290c078b3d9bd004c777972ce4d5bc8af749 | /IVote/.history/app_20211026134219.py | 716bafce93fc77cff60084c9051fa852e2da6c98 | [] | no_license | CS699-IITB-Autumn-2021/project-alpha_team | 2803b99b49dcfe6f1acdcdf768791d58e0441d05 | d3a7105d6d0d702d4b31a80a331b3772a03f2428 | refs/heads/master | 2023-08-19T17:32:01.401161 | 2021-10-27T19:14:08 | 2021-10-27T19:14:08 | 413,135,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,419 | py | from posixpath import lexists
import sqlite3
import os.path
from flask import Flask, render_template, request,redirect,session
from flask.helpers import url_for
from datetime import date
from datetime import datetime
from pathlib import Path
from werkzeug.utils import redirect
from generateResult import generateResults... | [
"[email protected]"
] | |
626020df48e5f7b97d39391e1c4073a4c6431329 | f3b233e5053e28fa95c549017bd75a30456eb50c | /p38a_input/L2S/2S-2L_wat_20Abox/set_1ns_equi.py | 312c2ffe7eec84ca46369451358d2b944b6fa62c | [] | no_license | AnguseZhang/Input_TI | ddf2ed40ff1c0aa24eea3275b83d4d405b50b820 | 50ada0833890be9e261c967d00948f998313cb60 | refs/heads/master | 2021-05-25T15:02:38.858785 | 2020-02-18T16:57:04 | 2020-02-18T16:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 915 | py | import os
dir = '/mnt/scratch/songlin3/run/p38a/L2S/wat_20Abox/ti_one-step/2S_2L/'
filesdir = dir + 'files/'
temp_equiin = filesdir + 'temp_equi.in'
temp_pbs = filesdir + 'temp_1ns_equi.pbs'
lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078]
for j in ... | [
"[email protected]"
] | |
a1c9ce48603c67ab62bd83e7a1b5276abec33b83 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03026/s122350460.py | 02e08d83c023e291595149871e806ce417d61dfc | [] | 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 | 557 | py | #D問題
import heapq
N = int(input())
AB = [[] for i in range(N)]
for i in range(N-1):
a,b = map(int,input().split())
a-=1
b-=1
AB[a].append(b)
AB[b].append(a)
C = list(map(int,input().split()))
C.sort(reverse=True)
var = [0 for i in range(N)]
var[0] = C[0]
Q = []
heapq.heappush(Q,0)
ind = 1
for... | [
"[email protected]"
] | |
910c11f006b429ae64433b34f69b78eb30c952c9 | cb0bde8ab641d5e411e91477728ade090836b729 | /sdk/python/pulumi_azure_nextgen/datashare/v20200901/list_share_subscription_source_share_synchronization_settings.py | fc3e394afb17f91b49ec35a8c117a7a0f398233d | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | rchamorro/pulumi-azure-nextgen | 7debd444063f0f9810ac0ee5fe11e7e8913b4886 | 09987cba1c466657730a23f5083aa62ec3dc8247 | refs/heads/master | 2023-03-03T09:32:59.634185 | 2021-02-10T16:13:24 | 2021-02-10T16:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,670 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
"[email protected]"
] | |
c4bf1aaa0079951e7f08ba9f8ba36f87a8665688 | 7b1a5db0a067766a9805fe04105f6c7f9ff131f3 | /pysal/lib/cg/ops/_accessors.py | fee7fd6a8618795c68306552da8fcaf9a7104661 | [] | permissive | ocefpaf/pysal | 2d25b9f3a8bd87a7be3f96b825995a185624e1d0 | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | refs/heads/master | 2020-06-26T17:13:06.016203 | 2019-07-31T19:54:35 | 2019-07-31T19:54:35 | 199,696,188 | 0 | 0 | BSD-3-Clause | 2019-07-30T17:17:19 | 2019-07-30T17:17:18 | null | UTF-8 | Python | false | false | 1,368 | py | import functools as _f
__all__ = [ 'area', 'bbox', 'bounding_box', 'centroid', 'holes', 'len',
'parts', 'perimeter', 'segments', 'vertices']
def get_attr(df, geom_col='geometry', inplace=False, attr=None):
outval = df[geom_col].apply(lambda x: x.__getattribute__(attr))
if inplace:
outcol ... | [
"[email protected]"
] | |
1f2497cd5546b8b5809730d42af84ca132224a9b | daa5a7e8deaa5b2b1db76a907077a8c1bb3313b2 | /problem14/p14.py | f9e25df205ff783be0670d4bc40b485f8cc2bca3 | [] | no_license | janFrancoo/Project-Euler | 175933ca643ccca42cf1b7a27cc49694fe22da5c | 24f7d913939883786aaf68f485b31eda99f657b3 | refs/heads/master | 2020-06-19T19:11:35.681184 | 2019-11-23T06:54:21 | 2019-11-23T06:54:21 | 196,838,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | def chain_length(number, limit, chain):
length = 1
copyNum = number
while number != 1:
if number < limit:
if chain[number] > 0:
length += chain[number]
break
if number % 2 == 0:
number = number // 2
else:
number = (n... | [
"[email protected]"
] | |
77c7244b91eb34417f48b52335e55d62f077c237 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03210/s465817633.py | de6f12b053fb956866a6a4cb9c9b6a6c7f24de52 | [] | 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 | 326 | py | import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *
sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()
def main():
print('YES' if int(input()) in [3, 5, 7] else 'NO')
m... | [
"[email protected]"
] | |
5ef6fb29abe779f4c919e528eceadcae6e5b6d6c | f0fefeafdc4836fa76c5ccd493a40470839a61de | /core/virtualNetworkFunction.py | 193ceb2a03572f715a42de65de2f5257881fcb2a | [] | no_license | wuyangzhang/vnf | bb94b43bc29e78f8e218b4c0da7b32f12682c1e9 | 26e524f4efa5f161dac071169448cb7bef810cdd | refs/heads/master | 2022-11-10T02:25:53.743598 | 2020-06-19T19:41:44 | 2020-06-19T19:41:44 | 271,430,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,971 | py | import random
import uuid
class VirtualNetworkFunction:
def __init__(self, name, cpu, mem, thr):
self.id = uuid.uuid4()
self.name = name
self.CPU = cpu # count
self.memory = mem # GB
self.throughput = thr # Mbps
self.attached_server = None
def __str__(self):
... | [
"[email protected]"
] | |
1f4c242409eb31a5e3cf9e347891200845218a79 | c33496682b760deac61fedecba3e82ce4e41dfde | /scripts/e284.py | 12aa868641e9ef20219b57ffb0df9a540a6225c2 | [
"MIT"
] | permissive | ferasalsaab/neuralnilm_prototype | c5e9cde02d475ac499b15fea62143e76adff07d0 | 2119292e7d5c8a137797ad3c9abf9f37e7f749af | refs/heads/master | 2020-04-16T14:38:03.615279 | 2018-01-29T15:30:43 | 2018-01-29T15:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,751 | py | from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import (Net, RealApplianceSource,
BLSTMLayer, DimshuffleLayer,
Bidirectio... | [
"[email protected]"
] | |
5517778c89fa3a66841d7073b230af2f660c2348 | c652797f5303bb7102967fc6603e5704025afb36 | /gamelayer/boilerplates/scene/extension.py | 3fec054ba472343048494727bd1b360db95fb06e | [
"MIT"
] | permissive | Windspar/Gamelayer | fc1ce499cccb6530a4dcd446f9d86fd44026e564 | 65e1cf11548bc02bc49348eb265c209172c14844 | refs/heads/master | 2022-06-13T08:06:37.828771 | 2020-05-07T17:17:59 | 2020-05-07T17:17:59 | 258,047,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py |
class Extension:
def __init__(self):
self._logic = []
self._extension = []
def add(self, callback):
self._extension.append(callback)
def add_logic(self, callback):
self._logic.append(callback)
def process(self, manager):
for extension in self._extension:
... | [
"[email protected]"
] | |
12f9e2c63739664ce40db1a2bc6707196ddec657 | 2119953dd04916fa2adf3f42a487f3f9754d1f66 | /modules/google-earth-engine/docker/src/sepal/image_operation.py | 67fc4e0360c44bc318732e200a493abe58beb22a | [
"MIT"
] | permissive | sarahwertz/sepal | 91d12e3317cd07ad4c99469d5b6211d74013b330 | efbbc33ac99db332fc13f9dfd4c777a8d2c1b41e | refs/heads/master | 2020-06-11T07:42:08.835556 | 2019-05-27T14:21:28 | 2019-05-27T14:21:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,949 | py | import ee
import math
class ImageOperation(object):
def __init__(self, image):
super(ImageOperation, self).__init__()
self.image = image
self.input_band_names = image.bandNames()
def select(self, name):
return self.image.select(name)
def set(self, name, toAdd, args={}):
... | [
"[email protected]"
] | |
5af9e7c4d040127cae9671591ab150e165fef3b5 | 354d28102374bf51bc6e74dd8d952dc036925356 | /user_guide/src/examples/pivot/lazy.py | 8ce4ef07d645efa05a0f472e162dd43319fe4fae | [] | no_license | simonw/polars-book | 8c30c3707716ea1134a5a92e938055bcffd84b36 | 841f86dcc0f7c338de5eb1b34efbc405922c74ef | refs/heads/master | 2023-08-30T10:05:35.360224 | 2021-11-14T07:06:36 | 2021-11-14T07:06:36 | 428,919,663 | 0 | 0 | null | 2021-11-17T05:27:07 | 2021-11-17T05:27:06 | null | UTF-8 | Python | false | false | 144 | py | from .dataset import df
q = df.lazy().map(lambda df: df.groupby("foo").pivot(pivot_column="bar", values_column="N").first())
out = q.collect()
| [
"[email protected]"
] | |
84465ec3badfad506dd593f543fb4098424ac9eb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_organists.py | be4d1d8e2ad43f99e39a4fc06c52700fa9cc7b7c | [
"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 | 252 | py |
from xai.brain.wordbase.nouns._organist import _ORGANIST
#calss header
class _ORGANISTS(_ORGANIST, ):
def __init__(self,):
_ORGANIST.__init__(self)
self.name = "ORGANISTS"
self.specie = 'nouns'
self.basic = "organist"
self.jsondata = {}
| [
"[email protected]"
] | |
61948e3b28ade065e37d16bf8131afe690b1ce63 | 5e381364c2ab31ff3618369085afffba6caa8edb | /recipes/fakeit/all/conanfile.py | 1cd82fc64805d459038f563de4e2470341513252 | [
"MIT"
] | permissive | CAMOBAP/conan-center-index | 16aea68a6d22da22831ba985773125e8eda08f00 | 67d57532bdad549fef3fa6cb8fcdfa86bc55e4f1 | refs/heads/master | 2023-07-30T08:58:57.285571 | 2021-10-02T14:57:54 | 2021-10-02T14:57:54 | 323,262,699 | 1 | 0 | MIT | 2021-05-29T13:37:04 | 2020-12-21T07:30:02 | Python | UTF-8 | Python | false | false | 2,011 | py | from conans import ConanFile, tools
from conans.errors import ConanInvalidConfiguration
import os
class FakeItConan(ConanFile):
name = "fakeit"
license = "MIT"
homepage = "https://github.com/eranpeer/FakeIt"
url = "https://github.com/conan-io/conan-center-index"
description = "C++ mocking made eas... | [
"[email protected]"
] | |
5ab4128daad6fc7ec81e3f308d5ded319af70f7c | 18219d0fc95936ded56fe44f9a65ecb27f015232 | /35 Laboratory Converter units.py | ed1ee2497ae870063545fbc0a031cc8248d0e0f6 | [] | no_license | JDavid121/Script-Curso-Cisco-Python | 20a61b91b09376dcaef54f8ae5f86fe252de5c33 | 6d68c17ff3c3826e9fc609d110ce9d0e6ebf718b | refs/heads/master | 2021-05-18T04:54:59.948970 | 2020-03-29T20:19:53 | 2020-03-29T20:19:53 | 251,120,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,003 | py | """
Programa que convierte millas de kilometros y viceversa
"""
"""
1 milla = 1.61 km
"""
#Programa que transforma millas a kilometros
#******************************************************************
print("Programa que transforma millas a kilometros")
mile = input("Ingresar la distancia en millas\n\t")
mi... | [
"[email protected]"
] | |
ba12f92e88b5290922b85f50d0b6bf924df5dbe7 | cd9f819b968def4f9b57448bdd926dc5ffa06671 | /B_輕鬆學python3_孫宏明_碁峰_2017/29-1/Graph/main.py | e65b7e9e5b5aa31d70a8bcc2c37da8a8c20e3540 | [] | no_license | AaronCHH/jb_pyoop | 06c67f3c17e722cf18147be4ae0fac81726e4cbc | 356baf0963cf216db5db7e11fb67234ff9b31b68 | refs/heads/main | 2023-04-02T05:55:27.477763 | 2021-04-07T01:48:04 | 2021-04-07T01:48:13 | 344,676,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | import shape as sh
# 建立Circle、Rectangle和Triangle類別的物件
c = sh.Circle(10)
r = sh.Rectangle(5, 2)
t = sh.Triangle(8, 3)
# 把物件加入Tuple資料組
shapes = c, r, t
# 用For迴圈顯示每一個物件的內容和面積
for s in shapes:
s.show_shape_info()
print('面積:' + str(s.get_area()))
| [
"[email protected]"
] | |
e3fbb8c9d7fd01422301e9908dc1df4fb26ab066 | f714db4463dd37fc33382364dc4b1963a9053e49 | /tests/sentry_plugins/pivotal/test_pivotal_plugin.py | cf8294f3310c500617cfeb7ce3dbf7f8b51b6967 | [
"BUSL-1.1",
"Apache-2.0"
] | permissive | macher91/sentry | 92171c2ad23564bf52627fcd711855685b138cbd | dd94d574403c95eaea6d4ccf93526577f3d9261b | refs/heads/master | 2021-07-07T08:23:53.339912 | 2020-07-21T08:03:55 | 2020-07-21T08:03:55 | 140,079,930 | 0 | 0 | BSD-3-Clause | 2020-05-13T11:28:35 | 2018-07-07T11:50:48 | Python | UTF-8 | Python | false | false | 2,171 | py | from __future__ import absolute_import
from exam import fixture
from django.core.urlresolvers import reverse
from sentry.testutils import PluginTestCase
from sentry.utils import json
from sentry_plugins.pivotal.plugin import PivotalPlugin
class PivotalPluginTest(PluginTestCase):
@fixture
def plugin(self):
... | [
"[email protected]"
] | |
c818fa2fbe0a931e015d9c72ca30b11428d45ae9 | 0983a837b8ca96c215a3bad0dfda0aba9b79b89f | /single_header/preprocess.py | 5170d044c37f03d160ccb053d2efc9947a1cb873 | [] | no_license | omardrwch/rlcpp | 53a950d3f3b4e75010c1acf7d047b3fe48c99720 | 5b12133c3f85cd2a7158915914beace31fdcd13e | refs/heads/master | 2020-08-13T15:38:28.366012 | 2020-03-07T20:40:09 | 2020-03-07T20:40:09 | 214,994,055 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,355 | py | import os
import shutil
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
project_path = os.path.dirname(dir_path)
dir_to_copy = os.path.join(project_path, 'rlcpp')
dir_destination = os.path.join(dir_path, 'all_files')
if not os.path.exists(dir_destination):
os.makedirs(dir_destination)
# Copy al... | [
"[email protected]"
] | |
b11f3da5b0ec58c42441646efad1247fda2d1a9e | 147715fa98fe40b919784ef703dcddb8e8ab37c4 | /indy_common/config_helper.py | 9250ac18b12a1047999603e56dc61347844a6a7a | [
"Apache-2.0"
] | permissive | RaghuVamz/indy-node | ae069bfe2766248937fb2662ec65736c305a5cd9 | 977249b9100de62290ed45e74f1df1c2a1c7afd9 | refs/heads/master | 2021-08-23T20:08:57.192581 | 2017-12-05T23:41:54 | 2017-12-05T23:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,321 | py | import os
from plenum.common.config_helper import PConfigHelper
class ConfigHelper(PConfigHelper):
@property
def log_dir(self):
return self.chroot_if_needed(
os.path.join(self.config.LOG_DIR, self.config.NETWORK_NAME))
@property
def genesis_dir(self):
return self.chroot_... | [
"[email protected]"
] | |
20eb845f27d8f3d0b45c4495eab5e80b15e6fcc1 | f0987e17aea6668158cd334c1fbacfe6286d3c77 | /NITA/tests/unit/security/appsecure/test_apbr_commands.py | 23646f813ef71033f238a57643ad7cc20473dad9 | [] | no_license | fengyun4623/file | 00bf21f952ea3f95ffc9fe18448b244b26b7fadb | 3966c63d48557b0b94303896eed7a767593a4832 | refs/heads/master | 2023-04-02T05:01:25.066052 | 2020-07-29T16:15:31 | 2020-07-29T16:15:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,672 | py | from mock import patch
import unittest2 as unittest
from mock import MagicMock
from jnpr.toby.security.appsecure import apbr_commands
from jnpr.toby.hldcl.juniper.security.srx import Srx
class Response:
def __init__(self, x=""):
self.resp = x
def response(self):
return self.resp... | [
"[email protected]"
] | |
e1d5705fadca5206369d9fc28471dee0f1be801f | ba60d3ccf11157abaf6c7bcf3a81aace27c6af88 | /spoj/wtk.py | c87681f874913fd405f05378c83c0744d2e5991b | [] | no_license | eightnoteight/compro | 9a09628593cdd3201f4d3bcf271f1ca6a4e5efca | 1e5d32ee83e9d8f27623dee7262decad3d107bd5 | refs/heads/master | 2021-01-21T04:19:02.746824 | 2016-08-01T20:51:16 | 2016-08-01T20:51:16 | 44,669,361 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import print_function
from sys import stdin
try:
range = xrange
input = raw_input
except:
pass
def wtk(n):
ans = 1
for x in range(2, n + 1):
ans = ((ans + (n + 1 - x) - 1) % x) + 1
return ans
inp = stdin.readlines()
for _... | [
"[email protected]"
] | |
5600718a422aecd517e3e3db0aa2ade322992a29 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/1657.py | b6882f38110c00e2f3f7f2637ba12cf028460824 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | import math
def ispalindrome(n): # ok, didn't really need this, but since i wrote it i might as well use it
digits = [int(x) for x in str(n)]
length = len(digits)
# if even number of digits, we want to compare the first half to the second half
# if odd, we don't want to compare the middle to itself, so the... | [
"[email protected]"
] | |
06cdb1171a3fca287acf3cd73cf81f7a7ac189a4 | 63bc95150f6af526199454602e5689bfadc882ba | /12/ex12-4.py | b134b84938d34ba5eb34a0dc964e2c228b3343a3 | [] | no_license | veenary/python-src | fd61d22a58d452ccb251402fecb0b7babd5372a7 | d61374bc32b8ebe3b2be366a6de259680821a4e1 | refs/heads/master | 2023-03-17T10:07:27.704611 | 2021-03-10T01:31:56 | 2021-03-10T01:31:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | import matplotlib.pyplot as plt
from matplotlib import rc
rc('font', family='Malgun Gothic')
xdata = ['안지영', '홍지수', '황예린']
ydata1 = [90, 85, 88]
ydata2 = [83, 88, 91]
plt.plot(xdata, ydata1, label='국어')
plt.plot(xdata, ydata2, label='영어')
plt.legend(loc='upper center')
plt.title('세명 학생의 국어, 영어 성적')
pl... | [
"[email protected]"
] | |
d6c67ffa4c48863a4c30baeec6a7167f27d0edd3 | 84868118de838472bca33c9f0455674e7e563d1b | /WLCG_GSoC_Task_Server/views.py | 5f7a847621fab880c815c0a05099b392a92a3702 | [
"Apache-2.0"
] | permissive | maany/MOOC-CA-Server | afa7b065fd5a059a94abec687236122ec6afd376 | 917109c7e5f37f3e7ee63ec0c5d1be3409b27f93 | refs/heads/master | 2022-12-12T12:03:52.430010 | 2019-03-12T13:46:06 | 2019-03-12T13:46:06 | 156,133,195 | 0 | 0 | Apache-2.0 | 2022-12-08T01:01:48 | 2018-11-04T22:56:11 | HTML | UTF-8 | Python | false | false | 392 | py | from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import render
from evaluator.models import Task, Applicant
@login_required
def profile(request):
tasks = Task.objects.filter(applicant=request.user.applicant)
context = {
'tasks': tasks,... | [
"[email protected]"
] | |
6279b7c4ae80c6d7996d9e4072efb25f43a2d80b | 536538af28cfe40e10ff1ce469cd0f81e8b3a8fe | /majority_element_II.py | 02813649ad35d4fef5a7d02c179be39c5526676a | [] | no_license | ShunKaiZhang/LeetCode | 7e10bb4927ba8581a3a7dec39171eb821c258c34 | ede2a2e19f27ef4adf6e57d6692216b8990cf62b | refs/heads/master | 2021-09-01T07:41:03.255469 | 2017-12-25T19:22:18 | 2017-12-25T19:22:18 | 104,136,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | # python3
# Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
# The algorithm should run in linear time and in O(1) space.
# My solution
class Solution(object):
def majorityElement(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
... | [
"[email protected]"
] | |
a091cf762f8da9cecbb9794772a0d394ad9338f9 | 16fe74651e6692ea3d8d0302b40ac42f3d58e0ca | /Divide_Two_Integers.py | 331dae5f9352e2e8f00995e3f8aaf0d11552e651 | [
"MIT"
] | permissive | Ahmed--Mohsen/leetcode | 7574f71b10dfb9582f62e856bbc2559d3b21b2a1 | ad8967a5d85ac54f53b3fcce04df1b4bdec5fd9e | refs/heads/master | 2021-01-18T14:34:06.987665 | 2015-12-23T21:17:27 | 2015-12-23T21:17:27 | 33,744,104 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | """
Divide two integers without using multiplication, division and mod operator.
If it is overflow, return MAX_INT.
"""
class Solution:
# @return an integer
def divide(self, dividend, divisor):
p = abs(dividend)
q = abs(divisor)
ans = 0
while p >= q:
counter = 0
while p >= (q << counter): # det... | [
"[email protected]"
] | |
55040119c5bec7c52ab31cb072da66f9e8f23c54 | 1719920a92f7194766624474b98d59ef8d6eddaf | /models/search_result.py | 1e44051445d3173c464a9e9db35eddc2d60c9dd2 | [
"MIT"
] | permissive | MIchaelMainer/msgraph-v10-models-python | cfa5e3a65ba675383975a99779763211ed9fa0a9 | adad66363ebe151be2332f3ef74a664584385748 | refs/heads/master | 2020-03-19T12:51:06.370673 | 2018-06-08T00:16:12 | 2018-06-08T00:16:12 | 136,544,573 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | # -*- coding: utf-8 -*-
'''
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
'''
from __future__ import unicode_literals
from ..one_drive_object_bas... | [
"[email protected]"
] | |
1098ae39b7e485b89db97e585ff61d78edb48860 | 1a66df726d2ecc20d6b5ff9d35dac4ea7ba5cb66 | /upseto/recursivegit.py | 2382959e2c66d5083c1f207a1d9b02424a21ec09 | [
"Apache-2.0"
] | permissive | shlomimatichin/upseto | 83c601d7a6d625d00fad3134fe9192dcfec73950 | 0fedc8b7d628b971d07b92b61c7a29431ad55d22 | refs/heads/master | 2021-01-15T11:06:41.285140 | 2015-03-05T13:22:38 | 2015-03-05T13:22:38 | 28,646,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 601 | py | from upseto import gitwrapper
from upseto import traverse
import sys
class RecursiveGit:
def __init__(self, baseDir=".."):
self._traverse = traverse.Traverse(baseDir)
def run(self, mani, commandLine):
git = gitwrapper.GitWrapper(".")
sys.stdout.write('#upseto %s\n' % git.directory())
... | [
"[email protected]"
] | |
442148600eefdf14a8d8ae73741d95f019dc6024 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/permutations_20200723154912.py | faaf21e3ad0dd8cb060bd06a3f837bc62ea900d1 | [] | 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 | 256 | py | def perm(arr):
# sort the array
if len(arr) == 0:
return 0
else:
arr.sort()
for i in range(len(arr)-1):
if arr[i] +1 != arr[i+1]:
return 0
return 1
print(perm([4,1,3,2])) | [
"[email protected]"
] | |
fe0f7faff241dde12ec27f6c4fd6b1011ef5bf46 | 2bebb669112e2955de612e7d0532fe545b609733 | /goatools/semsim/termwise/wang.py | 0228ed10453e6dc1055ce126d7f3dbcb4c539a3a | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | rexdwyer/goatools | 008885ad534b73a1137fa59c9eb50e21b147f2ab | ef14f99844a2a42d36aa1ab2e40161b8bc7be78e | refs/heads/main | 2022-12-31T06:08:31.203278 | 2020-10-15T01:14:59 | 2020-10-15T01:14:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,539 | py | """Wang's termwise semantic similarity for GO terms"""
__copyright__ = "Copyright (C) 2020-present, DV Klopfenstein. All rights reserved."
__author__ = "DV Klopfenstein"
from goatools.gosubdag.gosubdag import GoSubDag
from goatools.semsim.termwise.dag_a import DagA
class SsWang:
"""Wang's termwise semantic simi... | [
"[email protected]"
] | |
88b31bcd1e68bb87db4eed1c8f9d1dc272541ee1 | 12e78946542250f64792bc6c1d8c8ff1ffecdaf7 | /Python/OOP/bikes.py | 3354bab3e9923ca80f29aa3f2dbd96f61c135e2b | [] | no_license | mkrabacher/CodingDojoAssignments | 0fde5adf7223a9eac07a4867499a243e230a300e | 4afef4aaf4f129fb56376e57d8be437d1f124521 | refs/heads/master | 2021-05-14T13:38:03.570533 | 2018-02-23T00:09:24 | 2018-02-23T00:09:24 | 113,722,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | class bike(object):
def __init__(self, price, max_speed):
bike.price = price
bike.max_speed = max_speed
bike.miles = 0
def display_info(self):
print 'This bike costs {}, has a max speed of {}, and have been ridden {} miles total'.format(self.price, self.max_speed, self.miles)
... | [
"[email protected]"
] | |
45f245fa90ff36c4bd8ccba8af71faf3d28d06aa | 1025bc2aa5aaa40970ad1a51d8d0b1202a1ea11e | /StatTools/test/test_morph.py | 098bd9e136b860bf73ff5b65867dbd350b8bd07f | [] | no_license | uwcms/FinalStateAnalysis | f2be318546728621676a4b90ed2678b2560c94e6 | bcb164a8e27d459a9ac438780f6c8730d3e856bf | refs/heads/miniAOD_9_4_0 | 2022-11-09T01:28:52.199025 | 2019-03-15T19:25:10 | 2019-03-15T19:25:10 | 5,201,989 | 5 | 32 | null | 2020-11-19T17:02:32 | 2012-07-27T07:51:18 | Python | UTF-8 | Python | false | false | 646 | py | '''
Stupid tests of the th1fmorph tool
'''
from FinalStateAnalysis.StatTools.morph import morph
from rootpy.io import open, DoesNotExist
file = open('$fsa/VHiggs/test/plotting/wh_shapes.root')
hist1 = file.get('mmt_mumu_final_140_MuTauMass/VH140')
hist2 = file.get('mmt_mumu_final_120_MuTauMass/VH120')
hist130true ... | [
"[email protected]"
] | |
363cff7ddb7a55c545d517ea771c5a424f188146 | 7e9b45a66b3637cf571eb1e16c07dd888963d8ba | /ITcast/ITcast/spiders/itcast.py | a87e81bec5c50033e10d8550fb5f3e8c1c968117 | [] | no_license | tusonggao/scrapy-scripts | 60d4c7449819c6a2861c208c34f0fb8078ed94d4 | 2dd97c0a55e02c51a43c7a335c91ac64d8bbaf1b | refs/heads/master | 2020-04-08T18:01:21.351922 | 2018-12-02T01:57:03 | 2018-12-02T01:57:03 | 159,590,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 237 | py | # -*- coding: utf-8 -*-
import scrapy
class ItcastSpider(scrapy.Spider):
name = 'itcast'
allowed_domains = ['http://www.itcast.cn']
start_urls = ['http://http://www.itcast.cn/']
def parse(self, response):
pass
| [
"[email protected]"
] | |
6a2fa3268aaa3900c0d2c08b01d2ad48f9be95f7 | e5333b2e54f1adf2e5bc88a9a242234c5f15851a | /misoclib/com/liteeth/core/mac/core/crc.py | f08302b164d4733c2a5cc4d933ae70d2372c05e0 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hoangt/misoc | 1aaf850c18bab5b18db1fcc788feb96afbbc464e | 6c13879fb605a1ee2bd5a3b35669e093f9a4267b | refs/heads/master | 2021-01-21T02:55:59.398987 | 2015-07-13T15:00:03 | 2015-07-13T15:25:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,639 | py | from misoclib.com.liteeth.common import *
class LiteEthMACCRCEngine(Module):
"""Cyclic Redundancy Check Engine
Compute next CRC value from last CRC value and data input using
an optimized asynchronous LFSR.
Parameters
----------
data_width : int
Width of the data bus.
width : int... | [
"[email protected]"
] | |
7529c1864d46cd2e1e57b64e66c2b36754ac89dc | 1713334f9b68255f9adab70175c21f399d0460f3 | /python/090_Subsets_II.py | 520727cc72e1a7221eaa68275d4716961b9b0695 | [
"MIT"
] | permissive | coy0725/leetcode | 0a798b7adafe80f726e51c06c34835c4aa51b563 | 743a0bfa22402ec39858dc9c4c7dc531f825b953 | refs/heads/master | 2020-05-21T18:25:09.683714 | 2019-05-11T13:00:40 | 2019-05-11T13:00:40 | 186,132,894 | 2 | 0 | MIT | 2019-05-11T12:55:22 | 2019-05-11T12:55:21 | null | UTF-8 | Python | false | false | 1,369 | py | class Solution(object):
# def subsetsWithDup(self, nums):
# """
# :type nums: List[int]
# :rtype: List[List[int]]
# """
# nums.sort()
# res = []
# for i in range(1 << len(nums)):
# res.append(self.get_subsets(nums, i))
# # remove duplicate
... | [
"[email protected]"
] | |
ea825aa8dfb7fdbdf0f38041fed13b0c901d9a7f | 281c9bea63bf7d1188b40ae2cf3f2aa53f97a297 | /sections/views.py | 26113411fba416b064af202d600ebcb71728b3a6 | [] | no_license | pydatageek/fazla | 3ec13c5e8f4a621eb82e1d82e003e0e0e68f3657 | 0890de73f23e3f72b41095130d703a793745765e | refs/heads/master | 2023-02-14T01:11:17.477576 | 2021-01-05T10:15:58 | 2021-01-05T10:15:58 | 294,544,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,776 | py | from django.contrib.messages.views import SuccessMessageMixin
from django.shortcuts import render
from django.urls import resolve, reverse_lazy
from django.utils.translation import gettext_lazy as _
from django.views.defaults import server_error
from django.views.generic import (
DetailView, ListView, TemplateView)... | [
"[email protected]"
] | |
241e3a94e942b64cd327a21199bf89a2fa868b9f | c522b0332ee42d01f1ee5bdd3cdd3d72eb9af24b | /venv/lib/python3.8/site-packages/lusid/models/transaction_set_configuration_data.py | 451ff60c8d6a19320df52968e69d9e43274314de | [] | no_license | Jeffkent01coder/trackphone | e5aad6f99efb0f0c11f260d1f2a0b232d5453dfe | 3570375938c7e947eb272d2cec1589202351141c | refs/heads/master | 2023-05-10T22:27:40.255686 | 2021-06-02T10:23:17 | 2021-06-02T10:23:17 | 373,125,235 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,941 | py | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.2820
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class TransactionSetConfigurationData(object):
"""N... | [
"[email protected]"
] | |
665c35990e477086523bce03d9fee6d46495ae84 | e6f16fbba8fba750099252c3490f00079cb19101 | /算法/350_两个数组的交集Ⅱ.py | ad88f718a1d9fe87106cf709d3b5ade3707c38aa | [] | no_license | hookeyplayer/exercise.io | 0a36fbec9df6c24b60ff6f97de27d3d5ae7769d4 | 605c81cb44443efd974db9fa0a088ddcd5a96f0f | refs/heads/master | 2023-06-20T17:03:20.310816 | 2021-07-31T12:50:21 | 2021-07-31T12:50:21 | 277,175,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | # 结果尊重实际的个数,含重复
from typing import List
class Solution:
def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]:
nums2.sort()
nums1.sort()
ans = []
pos1, pos2 = 0, 0
while pos1 < len(nums1) and pos2 < len(nums2):
if nums1[pos1] == nums2[pos2]:
ans.append(nums1[po... | [
"[email protected]"
] | |
fa3d62dc6ea23306d2e45604b8b2469de665a70d | 4ede96380f20c65e014f7e5748789c81a4700115 | /enums/enum_example_pb2.py | 89ed4506ac879d427eb539c122205ebaab314ea2 | [] | no_license | DavidWalshe93/Python_Protobuf | 1724689fc4d24c51d2bf40cb5ac2655355ed9aae | 1af5ecf7ac9fd479b7e283d9cb5ef1c5dd54a94a | refs/heads/master | 2022-04-20T08:04:38.660161 | 2020-04-18T00:26:51 | 2020-04-18T00:26:51 | 256,630,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 4,370 | py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: enum_example.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | [
"[email protected]"
] | |
b13c1da60cd7c88594500929261c5c9b25d14f78 | ffdd64174bee59665833535c9ae618abd6ddcc7a | /graphs_to_tensors.py | 1be5bca997a64a463d7dbcb57d8ec8dceb298fed | [] | no_license | pengyuan2020/ProPPR-python | dee9e8e2713169af8538ac2cbc0a1f29c93f0d9a | 2977e9e0801d94048d114df8349d13b52091a7a8 | refs/heads/master | 2022-04-10T06:29:45.588641 | 2017-12-21T00:50:53 | 2017-12-21T00:50:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,856 | py | import numpy as np
import networkx as nx
import sparse
import nltk
import cPickle as pickle
import os
from setting import *
from joblib import Parallel, delayed
def get_proof_graph(ppr_grounded_line, feature_vector_size):
graph = nx.DiGraph()
array = ppr_grounded_line.strip().split(' ')
query_example = a... | [
"[email protected]"
] | |
f0231d6bbd4a58f6b16cf5bba65790be6216608a | 0d0b8236ff06027037d2a8a724d13a1866a9999c | /0x11-python-network_1/5-hbtn_header.py | 34b55fdc04a4eacfad8cc0eaf47eda1070829434 | [] | no_license | Danucas/holbertonschool-higher_level_programming | 3f8e81a610bf80890280b764362b56ad8803e2df | b963d41af8bccf764dff67f80ea16f1184c0a96d | refs/heads/master | 2022-07-31T05:53:57.046789 | 2020-05-21T21:29:54 | 2020-05-21T21:29:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | #!/usr/bin/python3
"""
Python script to fetch an https request
"""
import requests
import sys
def main():
response = requests.get(sys.argv[1])
try:
print(response.headers['X-Request-Id'])
except:
pass
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
9e7d0dfdbc7930489b9ea969fab38d8a0d270139 | 46942a623716ef361d892274f3f47d499fe91a97 | /service/wikipedia_scrape_service/service.py | e4bb2d38d1c8ec127bcfd478b23537916a54b77b | [] | no_license | ramosjanoah/gegeelisa | 86ebac3bfd1f03f45b087f4b78e9a1a9da857924 | 4e782b247bdc024153bf9ff271368957ab95727a | refs/heads/master | 2020-11-27T10:50:35.631254 | 2019-12-21T12:39:12 | 2019-12-21T12:39:12 | 229,410,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py | from urllib.request import urlopen
from functools import lru_cache
import repository
from repository import redis
from repository import beautiful_soup
from model import WikipediaPage, WikipediaPageComponent, PageStateEnum
from .scrape_unfounded_page import ScrapeUnfoundedPage
from .scrape_founded_page import Scrape... | [
"[email protected]"
] | |
6c0d12ea106d70215d25e9ad8be29acdaaef13c0 | 0d1576eea1733c04e227fda48b2fc1d13f5f37cb | /PyFBA/gapfill/limit_reactions.py | d460fbcfb12cc965ec07c19c71590b8997bd6773 | [
"MIT"
] | permissive | linsalrob/PyFBA | d207b976a7cc3a6dc682647b4a72396bde83a892 | 3723e95e6f96481c4fc470a004dc88da3617f3c3 | refs/heads/master | 2023-03-09T10:16:11.812589 | 2023-02-25T21:54:19 | 2023-02-25T21:54:19 | 46,241,465 | 27 | 15 | MIT | 2021-05-22T22:56:22 | 2015-11-15T23:51:34 | Python | UTF-8 | Python | false | false | 1,267 | py |
def limit_reactions_by_compound(reactions, reactions2run, suggestions, max_rcts=50):
"""
Limit the reactions in suggestions based on the compounds present in
the reactions in reactions2run and the number of reactions that each
compound is associated with.
We need to have < max_rcts reactions per ... | [
"[email protected]"
] | |
ad29e7018315f14b50adfa5ff59da8fa74676902 | c67f2d0677f8870bc1d970891bbe31345ea55ce2 | /zippy/benchmarks/src/benchmarks/simplejson-bench.py | a634f84c31fc67358e8e6a81d8aaa1487d1b1e20 | [
"BSD-3-Clause"
] | permissive | securesystemslab/zippy | a5a1ecf5c688504d8d16128ce901406ffd6f32c2 | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | refs/heads/master | 2022-07-05T23:45:36.330407 | 2018-07-10T22:17:32 | 2018-07-10T22:17:32 | 67,824,983 | 324 | 27 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | import sys, time, os
# setup path
simplejson_path = os.path.join(os.path.dirname(__file__), 'simplejson')
sys.path.append(simplejson_path)
from simplejson.encoder import JSONEncoder
encoder = JSONEncoder()
def produceData():
lst = [i for i in range(3000)]
return lst
DATA = produceData()
def encodeList(n):... | [
"[email protected]"
] | |
37353ff9bc0e9011bda19ecf7bd8839ecc8cfae9 | 6a990a3d549ca3d1c607b60b13b10f14c0e15787 | /game/tuitongzi/command/client/reconnection_cmd.py | 8b4f70d45f713635ef02826a32818bd913f407f4 | [] | no_license | qianyc1020/server | 217a766f7df5a0acfb983d3fc48317a932fe092e | 3c897e5d6ee453d0a2f3b371b5eda5af954b8d1a | refs/heads/master | 2020-06-10T08:55:31.996449 | 2019-06-24T06:26:43 | 2019-06-24T06:26:43 | 193,626,075 | 1 | 0 | null | 2019-06-25T03:12:39 | 2019-06-25T03:12:37 | null | UTF-8 | Python | false | false | 3,693 | py | # coding=utf-8
import traceback
import core.globalvar as gl
from game.tuitongzi.mode.game_status import GameStatus
from protocol.base.base_pb2 import REENTER_GAME, SELF_INFO, SELF_PLAYED
from protocol.base.game_base_pb2 import RecReEnterGame, RecUpdateGameUsers
from protocol.game.bairen_pb2 import BaiRenScore
def ex... | [
"[email protected]"
] | |
39430d9671b2910b0caaeea21a9fb271311ea5f1 | 753de2f926ba91986742a12904736443190766b6 | /personas/asgi.py | bc8be5ecff5241e6528591f0dccae80119bba61c | [] | no_license | nachovidondo/Documentacion_Personas | 236170274071c87bf9915614fac35798d916f1d0 | ab43e94e72cb5c31286dd7b32092498ff1496e0f | refs/heads/master | 2023-03-21T05:25:46.264032 | 2021-03-20T22:57:00 | 2021-03-20T22:57:00 | 349,852,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | """
ASGI config for personas project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | [
"[email protected]"
] | |
5803be5af3a275fe6d0c28041530f9decf49b8fe | 377d86194fd6d23c8ef3df3e6f7d90092dd8f9b4 | /workout_tracker/tests/unit/muscles/test_urls.py | 45a1cf524438ed183d455dd3dba59ca62ea62734 | [
"MIT"
] | permissive | e-dang/Workout-Tracker | f20f44b012e895244bad413a46103415ffae5732 | 00a27597ea628cff62b320d616f56b2df4f344a0 | refs/heads/master | 2022-12-28T07:49:34.179307 | 2020-10-12T20:48:28 | 2020-10-12T20:48:28 | 293,937,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | from rest_framework.reverse import reverse
from tests.utils import add_api_prefix
def test_muscles_list_url():
assert reverse('muscle-list') == add_api_prefix('muscles/')
def test_muscles_detail_url():
pk = 1
assert reverse('muscle-detail', kwargs={'pk': pk}) == add_api_prefix(f'muscles/{pk}/')
| [
"[email protected]"
] | |
d1d93378ea4d333133881b4caa5a37b7c65de232 | 79ad169779336d346b58e9bd9652ce64e9e4856a | /dynamic_rest/fields/choice.py | 605be5cfe3669fa1f93ddad262ffad9a97a4dc00 | [
"MIT"
] | permissive | asaak-co/dynamic-rest | 0546444034926ff3b8b8e96834fbb6a1576aeaf6 | 09f510063a35898a871ca86b5a130595a046c7aa | refs/heads/master | 2023-08-09T02:42:28.577865 | 2023-07-28T14:00:38 | 2023-07-28T14:00:38 | 132,636,828 | 0 | 1 | MIT | 2018-08-09T18:05:29 | 2018-05-08T16:34:39 | Python | UTF-8 | Python | false | false | 434 | py | from .base import DynamicField
from rest_framework.serializers import ChoiceField
from dynamic_rest.meta import Meta
class DynamicChoiceField(
DynamicField,
ChoiceField,
):
def admin_render_value(self, value):
model = self.parent_model
source = self.source or self.field_name
choice... | [
"[email protected]"
] | |
248901b372b2f892552f9ecbc8f14fe246636431 | da0a7446122a44887fa2c4f391e9630ae033daa2 | /python/ray/serve/tests/test_deployment_graph_autoscaling.py | b390d9c5f360612ba766020637ad10aec2e5ea01 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | whiledoing/ray | d8d9ba09b7545e8fd00cca5cfad451278e61fffd | 9272bcbbcae1630c5bb2db08a8279f0401ce6f92 | refs/heads/master | 2023-03-06T16:23:18.006757 | 2022-07-22T02:06:47 | 2022-07-22T02:06:47 | 252,420,044 | 0 | 0 | Apache-2.0 | 2023-03-04T08:57:20 | 2020-04-02T10:07:23 | Python | UTF-8 | Python | false | false | 6,753 | py | import sys
import pytest
from python.ray.serve import constants as serve_constants
import ray
from ray import serve
from ray.serve.drivers import DAGDriver
from ray.dag.input_node import InputNode
from ray.serve.deployment_state import ReplicaState
from ray._private.test_utils import SignalActor, wait_for_condition
... | [
"[email protected]"
] | |
e0f32a920e709012ccfe001490c91293713eac63 | 67b4c76ba0a94c023e085706cc3e0760f700eecd | /prod_settings.py | 22087417dac1072182d4d1a36ff665e4adf163d4 | [] | no_license | rlr/sitesprint09 | 928ef7129f0b120a2a1d02226b154a28d462e0bd | 3f74631c6feb9dcab50dc263dba145755cefab6f | refs/heads/master | 2021-01-10T21:30:30.745816 | 2010-01-30T02:35:45 | 2010-01-30T02:35:45 | 388,924 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,686 | py | # -*- coding: utf-8 -*-
LOCAL_DEV = False
DEBUG = False
TEMPLATE_DEBUG = DEBUG
#sorl-thumbnail
THUMBNAIL_DEBUG = False
#django-contact-form
DEFAULT_FROM_EMAIL = '[email protected]'
MANAGERS = (
('Ricky Rosario','[email protected]'),
)
DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_ps... | [
"[email protected]"
] | |
6b6f2a16f52435fd0b9bf3df97aef77d9bb2f821 | 22e9d7c194cf22513d68b61b97c49405a47e8708 | /Hashing/count_No_Teams.py | 2d1043accf6dbc6c8c2b8b3d941b2330ed460298 | [] | no_license | SandeepPadhi/Algorithmic_Database | 44c26f9300a99539781c5beb5587997b3ecadfe1 | ab8040a7dad94c84ec88f40e44b8520edcbe2443 | refs/heads/main | 2023-06-22T02:04:29.362315 | 2021-07-19T17:48:40 | 2021-07-19T17:48:40 | 338,329,340 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,555 | py | """
Date:24/02/2021
1395. Count Number of Teams - Leetcode - Medium
The following program is using Hashing
"""
class Solution:
def numTeams(self, rating: List[int]) -> int:
highindex={}
lowindex={}
for i in range(len(rating)):
highindex[i]=[]
lowindex[i]=[]
... | [
"[email protected]"
] | |
4c08c95b73a2a6f9d94cb46833129c2508a1bf92 | c633bf9cbfa588ecd26d6daebb5434b08542bcb3 | /warehouse_by_active_user/models/warehouse.py | 1ffa053b1cf9a9fa92043664614a9bdc53ac7e66 | [] | no_license | rosalesdc/am_testing | 57c6afa0f6e028569c682d8bfff7d0e80d08c12d | b78be0ef4eb6a6ab916e4840d900a73cca427a0e | refs/heads/master | 2020-09-08T08:48:00.213951 | 2019-11-11T22:51:34 | 2019-11-11T22:51:34 | 221,083,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | # -*- encoding: utf-8 -*-
#
# Module written to Odoo, Open Source Management Solution
#
# Copyright (c) 2017 Telematel - http://www.telematel.com/
# All Rights Reserved.
#
# Developer(s): Luis Ernesto Garcia Medina
# ([email protected])
#
########################################################... | [
"[email protected]"
] | |
37f3382aaf1b32e126dda9c8ba924399ca4eae1e | 783d136927a55eb83734bfd4eee4f4de06ababe2 | /DeepFM/DeepFM1.py | 04b1f6b1cb52f55d52af811bd940d31a38c169a1 | [] | no_license | robertaaa/code_study | 51bf9f87cf32c6c131c2711a0626fbd0e6ceec57 | 3fb264ed9fb36abe156c6663316b2e80169c26ac | refs/heads/master | 2023-09-05T21:58:20.055755 | 2021-11-08T05:07:49 | 2021-11-08T05:07:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,144 | py | import pandas as pd
from sklearn.metrics import log_loss, roc_auc_score
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder, MinMaxScaler
from deepctr.models import DeepFM
from deepctr.utils import SingleFeat
if __name__ == "__main__":
data = pd.read_csv('./criteo_s... | [
"[email protected]"
] | |
c8a8925d67f8d6367f31e9f8874fb6c12a1cef90 | eb731db339fd09757cc816823aa875bcaf15abeb | /jobs/migrations/0024_auto_20150116_2026.py | 31697f0f928f47b0adcf929e74d0db4c10f09ed4 | [] | no_license | sokogfb/1source | a34c17b90e23744686d904d8ed195182ecdd5e1f | a866e16e52aa34800f0da60e615f47952e084735 | refs/heads/master | 2020-12-01T08:50:43.138251 | 2016-10-23T01:33:47 | 2016-10-23T01:33:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('jobs', '0023_application_hired_date'),
]
operations = [
migrations.AddField(
model_name='application',
... | [
"[email protected]"
] | |
ab3dd0815e9f713d51735f87335bdf9ccefb193a | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_1484496_0/Python/Abraham/3.py | 3eb056330663b609738fc113d40d686cfd9d04a0 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,762 | py | import sys
infile=open(sys.argv[1])
#contents=infile.read()
#print contents
line=infile.readline()
numofcases=int(line)
print numofcases,"cases"
count=0
outfile=open("out.txt","w")
for i in range(numofcases):
count+=1
outfile.write("Case #"+str(count)+":\n")
line=infile.readline()
print line
number... | [
"[email protected]"
] | |
e56fe243ff26e0c4ed95e36aed0397d5793f59fd | c64f2412f7a7ebc3f6bce2a2dcbb99f6b88a2268 | /users/arxiv/users/legacy/__init__.py | 09538c9dd112574852d0fa5619c20aa21da9e6c8 | [
"MIT"
] | permissive | Quang7hong81/arxiv-auth | 565614667f6900d0d9644d010b832acfee3ba983 | ca2b0091682248d84154cf0a0d70c28e2e4e9f91 | refs/heads/master | 2023-08-11T06:58:09.849172 | 2021-05-04T20:53:44 | 2021-05-04T20:53:44 | 415,073,254 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 582 | py | """
Integrations with the legacy arXiv database for users and sessions.
This package provides integrations with legacy user and sessions data in the
classic DB. These components were pulled out as a separate package because
they are required by both the accounts service and the authn/z middlware,
and maintaining them ... | [
"[email protected]"
] | |
80b5a121e4ba0b0b9fa3de601259a3ed358a8f19 | 531c47c15b97cbcb263ec86821d7f258c81c0aaf | /sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/aio/operations_async/_available_delegations_operations_async.py | 9bd5ba9d9b004892ecb52fedad1a086d3101ab89 | [
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later",
"MIT"
] | permissive | YijunXieMS/azure-sdk-for-python | be364d3b88204fd3c7d223df23756386ff7a3361 | f779de8e53dbec033f98f976284e6d9491fd60b3 | refs/heads/master | 2021-07-15T18:06:28.748507 | 2020-09-04T15:48:52 | 2020-09-04T15:48:52 | 205,457,088 | 1 | 2 | MIT | 2020-06-16T16:38:15 | 2019-08-30T21:08:55 | Python | UTF-8 | Python | false | false | 5,085 | 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 may ... | [
"[email protected]"
] | |
a6b8938429590ad4f25219b94088b7a9e3c816ca | 4d21da5a3d07f4d05b997e80119cd79692ac0d25 | /Leetcode/301-400/326. Power of Three.py | 6dd5aa5bcea9575eb62407cbaf95c65965ef696e | [] | no_license | ErinC123/Algorithm | 92b2789ec3b36c49f9e65f2e7a702bb4b732e8ba | 4544fee91e811a6625000921c32ad054df550f1e | refs/heads/master | 2021-06-17T14:03:33.955233 | 2017-06-18T21:20:55 | 2017-06-18T21:20:55 | 75,894,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | # Question: 326. Power of Three
# Difficulty: Easy
# Tags: Math
'''
Given an integer, write a function to determine if it is a power of three.
Follow up:
Could you do it without using any loop / recursion?
'''
class Solution(object):
def isPowerOfThree(self, n):
"""
:type n: int
:r... | [
"[email protected]"
] | |
850b0fdbbdcd7b8c51b89ad013305f361b5402cd | b8e9dd6fd8f8b691cba5a3af2388467bcf6c90bb | /samples/openapi3/client/3_0_3_unit_test/python-experimental/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi | 8fd7d1c438a0e379c0e8540738e4ed3eb5e2bfdb | [
"Apache-2.0"
] | permissive | FallenRiteMonk/openapi-generator | f8b98940219eecf14dc76dced4b0fbd394522aa3 | b6576d11733ecad6fa4a0a616e1a06d502a771b7 | refs/heads/master | 2023-03-16T05:23:36.501909 | 2022-09-02T01:46:56 | 2022-09-02T01:46:56 | 164,609,299 | 0 | 0 | Apache-2.0 | 2019-01-08T09:08:56 | 2019-01-08T09:08:56 | null | UTF-8 | Python | false | false | 4,583 | pyi | # coding: utf-8
"""
Generated by: https://openapi-generator.tech
"""
from dataclasses import dataclass
import urllib3
from urllib3._collections import HTTPHeaderDict
from unit_test_api import api_client, exceptions
from datetime import date, datetime # noqa: F401
import decimal # noqa: F401
import functools ... | [
"[email protected]"
] | |
a2271435a5491a60527f6283ff52ff6e8a33fd46 | b4bc1807fb084a83c02b2e39de690a570be64ebd | /events_site_example/apps/common_app/tests/helpers.py | f72cc39f95eac0b551c88db21280cf7ecbef4c68 | [] | no_license | pahaz/events-site-example | 81d7a088a36d0073b6c743d9bf417403ea945746 | f0d0ae18b137dd39afc6b09d01048bc4403dff92 | refs/heads/master | 2023-08-26T20:00:04.157919 | 2012-11-21T06:58:09 | 2012-11-21T06:58:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,554 | py | # -*- coding: utf-8 -*-
from django.test import TestCase
class TestConditionBase(TestCase):
# model = ModelClass
# queryset_method_name = 'queryset_filter_method_name'
# instance_property_name = 'model_instance_property_name'
def setUp(self):
self.instance = self.create_instance()
# lea... | [
"[email protected]"
] | |
8fbd777be6a4409caac091f3dd090dc2debebeef | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/303/usersdata/297/67077/submittedfiles/testes.py | c7507d5c71e3b61038c611e9a7d783a2490240fe | [] | 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 | 214 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
idade= int(input("sua idade(i): "))
altura= float(input("sua altura(f): "))
print(idade)
print('sua idade inteira eh %d e a altura eh %.2f'%(idade,altura))
| [
"[email protected]"
] | |
78f46b6b21fb1b994bdb1e8203bf4bf6920782c9 | 1f7d287ef90041e20468513a26a39e1f3d221289 | /Level-4/s01/guvi-L4-s02-py02.py | 8b0e9652fdfd4d786ce1b1f5461d7d32068eb13d | [] | no_license | ksthacker/python | d787d69f954c0e9b59b0cc96a8b8fc5c0594d8a0 | 3a3775e1b9349e313f8c96ea11eade54a7e9bf54 | refs/heads/master | 2021-04-27T16:32:40.923316 | 2019-08-21T04:50:22 | 2019-08-21T04:50:22 | 122,303,461 | 0 | 17 | null | 2019-10-03T14:59:51 | 2018-02-21T07:09:32 | Python | UTF-8 | Python | false | false | 221 | py | import sys, string, math
n,k = input().split()
n,k = int(n), int(k)
L = [ int(x) for x in input().split()]
for i in range(0,k) :
a,b = input().split()
a,b = int(a), int(b)
print(sum(L[a-1:b]))
| [
"[email protected]"
] | |
9a92894a5d92bfd4c100d639f10ae5a43bca57c9 | c66810fadc39a6ff020b8a04ec70903a5570b378 | /behavioral_patterns/state_pattern/state_exp1.py | e386e71ec9bb372658d21c61b142c70b9400b8dd | [] | no_license | MaxOvcharov/python_desing_patterns | 364c56c392bef3a882fd13fbd00a9c5d1241ccfd | eacc3f1483e40778178523d82adfb6c443dbf1ae | refs/heads/master | 2021-05-14T00:45:47.094302 | 2020-02-26T20:00:11 | 2020-02-26T20:00:11 | 116,548,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,252 | py | #!/usr/bin/env python3
"""
EXAMPLE - https://sourcemaking.com/design_patterns/state.
Allow an object to alter its behavior when its internal state changes.
The object will appear to change its class.
"""
import abc
class Context:
"""
Define the interface of interest to clients.
Maintain an instance of a ... | [
"[email protected]"
] | |
cc2c7d03ef3262a407a8d964d244a638cf7c6819 | ce71f783e00a82de64a0a80fe039beedc3ae4bab | /xing_ji/asgi.py | 6e85d1fe695c562046b21770cd85ee83bce7e9ac | [] | no_license | bayhax/xing_ji | d4105c55d87d8f885afe96fcff7aa905a91ca9bb | 239df41e130f84ee9c76b93fe56567ddbcc960b5 | refs/heads/master | 2023-02-07T20:30:35.923898 | 2020-12-30T07:19:28 | 2020-12-30T07:19:28 | 324,749,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | """
ASGI config for xing_ji project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | [
"[email protected]"
] | |
60f84921356470e29c35b00e56e242c0de1d90e8 | 1a6dd921861b56a0fb856856c6b318a24daf98d8 | /13 раздел/Задача N.py | 5b8663536888baef73200e665cd9ace5cdc83e17 | [
"WTFPL"
] | permissive | AlexeyZavar/informatics_solutions | cfd64529b1acd617d51315ba85b53c4d4f883471 | 66df4374b971b44a0165ad0c34b307a0b9f5fa15 | refs/heads/master | 2022-04-14T02:52:01.258939 | 2020-04-18T22:01:09 | 2020-04-18T22:01:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | # Дана строка, возможно, содержащая пробелы. Определите количество слов в этой строке. Слово — это несколько подряд идущих букв латинского алфавита (как заглавных, так и строчных).
#
import re as regular_ex
def removeTrash(s):
l1 = s.count('-')
for i in range(l1):
del s[s.index('-')]
return s
... | [
"[email protected]"
] | |
6aca5bca8820467d965afb4f15a33b9baf041b4d | 12fc0aa145792bc0175cb369758111321706ea15 | /test/arthash/journals/integration_test.py | 26decd44e641d04c4815eb5779a809acd9e37d2f | [
"LicenseRef-scancode-free-unknown",
"Artistic-2.0"
] | permissive | arthash/arthash | 3d39f412e1fafcaccf31c62c658d542a03a4b0d0 | 8d59700308cedf3b62118ed021064b677408edeb | refs/heads/master | 2021-01-15T08:47:17.073225 | 2018-07-24T14:07:56 | 2018-07-24T14:24:50 | 59,588,339 | 2 | 1 | Artistic-2.0 | 2018-06-24T16:59:44 | 2016-05-24T16:06:17 | Python | UTF-8 | Python | false | false | 4,310 | py | import datetime, json, os, random, shutil, sys, tempfile, unittest, zipfile
from unittest.mock import patch
from pyfakefs.fake_filesystem_unittest import TestCase
from arthash.journals import keeper, organization
from arthash.util import hasher
# TODO: I'm disabling this test because it really only tests
# the most b... | [
"[email protected]"
] | |
8d75649c23883d73101fb513de73c707150077c3 | ce196aba0adde47ea2767eae1d7983a1ef548bb8 | /Leg_102手舞足不蹈.py | 3faf9fd6df3bed1e64479965756f94af4c16b2b6 | [] | no_license | xiang-daode/Python3_codes | 5d2639ffd5d65065b98d029e79b8f3608a37cf0b | 06c64f85ce2c299aef7f9311e9473e0203a05b09 | refs/heads/main | 2023-08-30T14:59:55.123128 | 2021-11-03T05:12:24 | 2021-11-03T05:12:24 | 333,632,892 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | # Write your code here :-)
from turtle import *
from math import *
from time import *
#============
def rot(x,y,a,b,L1,L2):
pu();goto(x,y+100); pd();
lt(a);fd(L1);lt(b);fd(L2);lt(b*0.7);fd(L2/4);pu();
#============
def main():
for k in range(10):
for g in range(-30,30,1):
a=g;b=1.5*g
... | [
"[email protected]"
] | |
282729cc3d2bd08d97a5cf989ddb3de3ca1287c4 | 73346545e69194dc1cfd887314afe600076ff263 | /polling_stations/apps/addressbase/migrations/0004_onsad_ctry_flag.py | 83cfbf605be785239acb02402bf4599556ecd4fe | [] | permissive | chris48s/UK-Polling-Stations | c7a91f80c1ea423156ac75d88dfca31ca57473ff | 4742b527dae94f0276d35c80460837be743b7d17 | refs/heads/master | 2021-08-27T18:26:07.155592 | 2017-11-29T15:57:23 | 2017-11-29T15:57:23 | 50,743,117 | 1 | 0 | BSD-3-Clause | 2017-11-29T16:03:45 | 2016-01-30T20:20:50 | Python | UTF-8 | Python | false | false | 417 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('addressbase', '0003_auto_20170406_0954'),
]
operations = [
migrations.AddField(
model_name='onsad',
... | [
"[email protected]"
] | |
7229c4e10aaba2855bd989d9e61b8c8526911dee | a04aff1baf3dac3ad96fd78e90b0de357140db84 | /scientific_expedition/yaml_more_tips.py | 2e0b1f3dd0eb44ecee45739b74e097b9bd27ce38 | [
"MIT"
] | permissive | NigrumAquila/py_checkio | f4f66fe8e87ba88d4e9258a55521902541ca33ba | df437c2c3ad325d84714665000e3299a70e91f32 | refs/heads/master | 2022-07-30T04:33:42.107806 | 2020-05-10T09:57:58 | 2020-05-10T09:57:58 | 262,756,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 832 | py | import re
def yaml(a):
yaml_dict = {}
for el in a.split('\n'):
if el != '':
key, value = el.split(':')
value = value.lstrip(' ')
if (value == '') or (value == None) or (value == 'null'):
yaml_dict[key] = None
elif (value.lower() in ['true'... | [
"[email protected]"
] | |
c774212f3b6e029c47eb1f0663b0ee7c4e45dbcd | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/96/usersdata/184/55977/submittedfiles/estatistica.py | 36c2b98bc0c1c7e60882c5efda63b29526938142 | [] | 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 | 715 | py | # -*- coding: utf-8 -*-
n=int(input('digite n:'))
lista1=[]
lista2=[]
def media(lista):
soma1=0
for i in range(0,len(lista),1):
soma1=soma1+lista[i]
resultado=soma1/len(lista)
return (resultado)
def desviopadrao(lista):
soma2=0
for i in range(o,len(lista),1):
soma2=soma2+(lista[i... | [
"[email protected]"
] | |
378c64df5fde3bb6b7506292d59d95fb8a8be1f2 | 325fde42058b2b82f8a4020048ff910cfdf737d7 | /src/kusto/azext_kusto/vendored_sdks/kusto/operations/__init__.py | 5750cdc82c59179c4778eb4c699f175f4439341b | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | ebencarek/azure-cli-extensions | 46b0d18fe536fe5884b00d7ffa30f54c7d6887d1 | 42491b284e38f8853712a5af01836f83b04a1aa8 | refs/heads/master | 2023-04-12T00:28:44.828652 | 2021-03-30T22:34:13 | 2021-03-30T22:34:13 | 261,621,934 | 2 | 5 | MIT | 2020-10-09T18:21:52 | 2020-05-06T01:25:58 | Python | UTF-8 | Python | false | false | 1,235 | 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 may ... | [
"[email protected]"
] | |
1996a1e9a7e0d18dab21229e6a431be83d1a7acc | 11852c0c085ad1f635f45aa085ece3987ae45620 | /chejian/pspnet_train.py | 0d5c14c97670c49a1cc4028912ff89aa9a13f7e1 | [
"BSD-3-Clause"
] | permissive | heixialeeLeon/segment_piwise | 3dc14be9605a652676a559ec7ab6764d23c67735 | 4eaeeb4aa36298c1140c9fb8a6adef7a3bcfb03f | refs/heads/master | 2020-04-19T10:31:05.538819 | 2019-01-29T11:26:42 | 2019-01-29T11:26:42 | 168,142,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,472 | py | import numpy as np
import torch
from PIL import Image
from argparse import ArgumentParser
from torch.optim import SGD, Adam
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torchvision.transforms import Compose, CenterCrop, Normalize, Resize
from torchvision.transforms import ToTensor,... | [
"[email protected]"
] | |
4f0245a842357c5dbe5e4147f485d8ff3038a40c | 8f0b0ec0a0a2db00e2134b62a1515f0777d69060 | /scripts/study_case/ID_5/matchzoo/datasets/snli/load_data.py | 06b9ec8754f14f19267ed9c9ad25faa384f88c44 | [
"Apache-2.0"
] | permissive | Liang813/GRIST | 2add5b4620c3d4207e7661eba20a79cfcb0022b5 | 544e843c5430abdd58138cdf1c79dcf240168a5f | refs/heads/main | 2023-06-09T19:07:03.995094 | 2021-06-30T05:12:19 | 2021-06-30T05:12:19 | 429,016,034 | 0 | 0 | Apache-2.0 | 2021-11-17T11:19:48 | 2021-11-17T11:19:47 | null | UTF-8 | Python | false | false | 3,224 | py | """SNLI data loader."""
import typing
from pathlib import Path
import pandas as pd
import scripts.study_case.ID_5.matchzoo as matchzoo
from scripts.study_case.ID_5.matchzoo.engine.base_task import BaseTask
_url = "https://nlp.stanford.edu/projects/snli/snli_1.0.zip"
def load_data(
stage: str = 'train',
ta... | [
"[email protected]"
] | |
04dcf815696115c267f19ffa51ed91d4902092d3 | 73143826c727eb012bff8c732ab5776c051f6c9b | /pytext/data/test/data_test.py | 128b7b8b815f9a089da1385a6d747c501e7b84d2 | [
"BSD-3-Clause"
] | permissive | wehaveone/pytext | f649fb81bb7bcf76c88ee81af5d204820011b1be | 41c0f46abf81c2d84ee02f6e9b91438e18adf47f | refs/heads/master | 2020-04-26T01:42:31.263801 | 2019-03-01T00:58:17 | 2019-03-01T01:03:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,965 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import unittest
from pytext.common.constants import Stage
from pytext.data import Batcher, Data, types
from pytext.data.sources.data_source import SafeFileWrapper
from pytext.data.sources.tsv import TSVDataSource
from pytext... | [
"[email protected]"
] | |
ad22536d51ac320742b2792288061eebc2f26c36 | 8f8498bb6f56b19d45a1989c8113a077348c0a02 | /SWEA/Level 4/장훈이의 높은 선반.py | 73f3564f795b4cc2858a65eb719e2a3098834f2d | [] | no_license | gjtjdtn201/practice | a09b437c892b0b601e156c09cb1f053b52fab11b | ea45582b2773616b2b8f350b927559210009d89f | refs/heads/master | 2021-01-01T13:29:46.640740 | 2020-11-28T00:55:37 | 2020-11-28T00:55:37 | 239,299,485 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | import sys
sys.stdin = open('장훈이의 높은 선반.txt', 'r')
def powerset(n, k, sum):
global ans
if sum >= B:
if ans > (sum - B):
ans = sum - B
return
if n == k:
return
else:
A[k] = 1
powerset(n, k + 1, sum + worker[k])
A[k] = 0
powerset(n, k + ... | [
"[email protected]"
] | |
9fd4f0ca59f4e0e97cf89be5690b1697e00b2d62 | f44e571fdac5e927235b434151dcc03f597a5e3d | /pyq/25_container/fast_data_set/py1.py | 0947f61fe0395ea1c028583f9d48c2eda7c11926 | [] | no_license | uni51/python_tutorial | 72f74e319cf4bc2662117ec0ad7b58e8a7d0e84b | 0a78111e3760ff4ff9957d67ced3bb0a83baaf9f | refs/heads/master | 2020-04-20T11:10:39.417725 | 2019-03-04T00:35:14 | 2019-03-04T00:35:14 | 168,808,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 910 | py | # 集合のメソッド(追加等)
items = {'art'}
print("items:", items) # items: {'art'}
# 1要素を削除
result = items.pop() # popでは、位置を指定して削除ができません
print("items.pop():", result) # items.pop(): art
print("items:", items) # items: set()
# リストを追加 複数の要素の追加は、extendではなくupdateです。
items.update(['egg', 'fog'])
print("items.update(['egg', 'fog'])"... | [
"[email protected]"
] | |
559ebd08ef157a69a6fc774088be4501fea9ab47 | b604219d67f011d44fdf79d0c88d546b3a8bd250 | /알고리즘/기타/진수계산.py | 64f802bbcddfdfcd010017dcfa2dd64407a49694 | [] | no_license | HwangToeMat/Algorithm | 197648d35e46ea1230291901de1caf2afc720f64 | ee2bb829cb71499c39f68d7691a1e84899135da5 | refs/heads/master | 2023-01-19T08:24:07.155305 | 2020-11-20T16:15:11 | 2020-11-20T16:15:11 | 296,235,075 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | """
def convert(n, base):
T = "0123456789ABCDEF"
q, r = divmod(n, base)
if q == 0:
return T[r]
else:
return convert(q, base) + T[r]
"""
def convert(n, base):
q, r = divmod(n, base)
if q == 0:
return [r]
else:
return convert(q, base) + [r]
| [
"[email protected]"
] | |
c1a6980787fb3929b0979d41514f2c9fce2e6a15 | 687928e5bc8d5cf68d543005bb24c862460edcfc | /nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_vpnurl_binding.py | e30bcf60328d3b370cfee3e566097acf59f29ff5 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Python-2.0"
] | permissive | mbs91/nitro | c6c81665d6abd04de8b9f09554e5e8e541f4a2b8 | be74e1e177f5c205c16126bc9b023f2348788409 | refs/heads/master | 2021-05-29T19:24:04.520762 | 2015-06-26T02:03:09 | 2015-06-26T02:03:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,346 | py | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# 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 l... | [
"[email protected]"
] | |
338c0a147112cb40b6d8cbf00925df5f9410bf9a | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/187/usersdata/354/65060/submittedfiles/al1.py | e2dd22058cfdabcf534c9ab2decc4d0b9297c6ca | [] | 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 | 133 | py | # -*- coding: utf-8 -*-
#ENTRADA
c=float(input('Digite a temperatura em Celcius: '))
#PROCESSAMENTO
F= (9c + 160)/5
#SAIDA
print(F)
| [
"[email protected]"
] | |
25a145b4c8108a145d6d3399933dc550426d704e | a16feb303b7599afac19a89945fc2a9603ae2477 | /Simple_Python/standard/json/json_6.py | bd3667c3dd21fc36b25d45aa5824ede395a4ce01 | [] | no_license | yafeile/Simple_Study | d75874745ce388b3d0f9acfa9ebc5606a5745d78 | c3c554f14b378b487c632e11f22e5e3118be940c | refs/heads/master | 2021-01-10T22:08:34.636123 | 2015-06-10T11:58:59 | 2015-06-10T11:58:59 | 24,746,770 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | #! /usr/bin/env/python
# -*- coding:utf-8 -*-
import json
data = [{'a':'张三','b':(2,4),'c':3.0,('d',):'D tuple'}]
print 'First attempt'
try:
print json.dumps(data)
except (TypeError,ValueError), err:
print 'ERROR:',err
print
print 'Second attempt'
print json.dumps(data,skipkeys=True) | [
"[email protected]"
] | |
ca9ba61eb5cd74330a7ec90e9ff0add6ab1f6e29 | 913fb9ec1e709a5140676ba7b2371b1976afca72 | /alignSeqs/test.countContigEnd.py | 32ef21f447d6d5f9be0711c83cc931b70af24a2d | [] | no_license | cgreer/ResearchScripts | 171cfe9555ea06fdeb91084c12d07d1b45a2335c | 1107803bb1459d6b6e1dfb1a89679d2b6fd49062 | refs/heads/master | 2016-09-05T10:43:19.090247 | 2012-04-12T21:38:11 | 2012-04-12T21:38:11 | 1,673,080 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,747 | py | import bioLibCG
import matplotlib.pyplot as plt
def countEnd(fN):
count3 = {'A': [], 'T': [], 'G': [], 'C': []}
count5 = {'A': [], 'T': [], 'G': [], 'C': []}
countT = {'A': [], 'T': [], 'G': [], 'C': []}
f = open(fN, 'r')
for line in f:
ls = line.strip(... | [
"[email protected]"
] | |
50736ba59f9669e816e9c0bd9a64716c3f93b03b | 79a484e91a8df432a0ded93806a1e8237df7c253 | /umibukela/migrations/0032_auto_20180511_1315.py | 0a99479bc8955d38f0508147fb04a451e1f73f09 | [
"MIT"
] | permissive | OpenUpSA/umibukela | 7ba14397ad543154d3a32ebfd84e89aa07f7011e | 34c1a29a429b88c2f574e9120cfe93ba524633da | refs/heads/master | 2023-07-26T19:45:12.531887 | 2023-07-10T15:53:07 | 2023-07-10T15:53:07 | 47,106,932 | 0 | 0 | MIT | 2023-02-02T01:36:59 | 2015-11-30T09:03:27 | Python | UTF-8 | Python | false | false | 1,702 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from umibukela.models import SurveyType
def poster_template(survey_type):
template = 'print-materials/posters/'
if 'paypoint' in survey_type.name.lower():
template += 'paypoint_poster.html'
e... | [
"[email protected]"
] | |
a308a1c8547c55fc2212b03afdbcc101c0af9b33 | 87220ff6f99aef088d121f3f9d81e36a35b7d112 | /pulp_rpm/src/pulp_rpm/extension/admin/structure.py | 80052e7a4898d821d8533eeab15b871d57ad54cb | [] | no_license | ehelms/pulp_rpm | 2905294287899c591e82b12fe3a71d7b98adf1c3 | cd9c9ae1a625072df82c054f3f198728b8770a7a | refs/heads/master | 2021-01-18T11:49:14.196118 | 2012-11-12T21:16:18 | 2012-11-12T21:16:18 | 6,671,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,930 | py | # Copyright (c) 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the impl... | [
"[email protected]"
] | |
6ded8a1c64af93c3e14df5f2f04e0f4cce78f83b | 3b4c2fa85a358648614c60d295cc9d77eb7e4c81 | /Chapter 6.py/pr no 1.py | 67d746383c61994e02b3ea7fb1e4dd0ed770ba7d | [] | no_license | abbhowmik/PYTHON-Course | 465e2e6c42b41f6dd731562c57d5c53c6ca2e711 | 223071569ce9b98d6725e2a33fb271ac0add6f49 | refs/heads/main | 2023-06-05T11:28:36.632080 | 2021-06-29T18:14:47 | 2021-06-29T18:14:47 | 381,456,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | num1 = int(input('Enter number 1: '))
num2 = int(input('Enter number 2: '))
num3 = int(input('Enter number 3: '))
num4 = int(input('Enter number 4: '))
if num1>num4:
f1 = num1
else:
f1 = num4
if num2>num3:
f2 = num2
else:
f2 = num3
if f1>f2:
print(f'The greatest number is {f1}')
else:
... | [
"[email protected]"
] | |
9fad1b4a730f3b06087dfddb4f8961f2ce8a302c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p04029/s543214320.py | 9f67a34087f19acbf01862689423ec3c7abeb734 | [] | 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 | 683 | py | from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
# d = m - k[i] - k[j]
# ... | [
"[email protected]"
] | |
3991f67831bc1074ca35abcaf224771ba4a4e056 | fa79a9b5eaa8b7b3cef1941ad3700106c00e57b6 | /function/update/update_novel-info.py | 18e9956da3f52ac2b860e6fa0124e83592367a15 | [
"MIT"
] | permissive | txu2k8/novel-web-server | 2e3899cb77ca6ba5d4d4d65f767c4e0a6aa0df1a | 1b77d637a6229d916b724ca2735afc00c6175368 | refs/heads/main | 2023-01-13T13:30:36.249802 | 2020-11-26T08:35:41 | 2020-11-26T08:35:41 | 316,153,766 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,681 | py | '''
更新小说天涯网的所有小说基本信息,书名,类型,阅读数,作者等
'''
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
import datetime
import time
import p... | [
"[email protected]"
] | |
0fb6a382cc75c4ec7b64a0082fa4369bdb3697f2 | a8769709aeb7299fa3757f0e7bba5c617eb8cfe3 | /lesson-3/k8s/lib/python2.7/site-packages/kubernetes/client/models/v1beta1_http_ingress_rule_value.py | 50ef1b8838ade46c5a7092ec4b5f4fd5d04b3e71 | [
"Apache-2.0"
] | permissive | simox-83/workshop-k8s | 2ac5e8b282bb7c3337acc726a7d972717bf649cc | 04cb18e8b5925a3cfd84ca316952a6cb64960b31 | refs/heads/master | 2020-03-31T20:52:21.421995 | 2018-10-11T14:43:08 | 2018-10-11T14:43:08 | 152,558,678 | 0 | 0 | Apache-2.0 | 2018-10-11T08:37:20 | 2018-10-11T08:37:20 | null | UTF-8 | Python | false | false | 3,338 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.