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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4c85c67d781eb179e4dafca7cb96d60c8873cc0e | 0b35072547001ebefa3fde2eea0eae30423e2190 | /editregions/contrib/textfiles/admin.py | 1bc746c9c1addc07aa4ae926a814393591df4afb | [
"BSD-2-Clause-Views",
"BSD-2-Clause"
] | permissive | kezabelle/django-editregions | ceba5561a4768ccda9ccd279f3a6a35e11dbdfea | 961ddeffb37d30d40fb4e3e9224bc3f956b7a5b5 | refs/heads/master | 2020-06-06T19:40:36.682702 | 2015-01-21T14:33:52 | 2015-01-21T14:33:52 | 14,645,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,474 | py | # -*- coding: utf-8 -*-
from functools import update_wrapper
from django.contrib import admin
from django.contrib.admin import ModelAdmin
from django.core.exceptions import ValidationError, PermissionDenied
from django.http import HttpResponse
from django.template.defaultfilters import striptags
from django.template.lo... | [
"[email protected]"
] | |
2ffcff7acb286a0ae13295300bd567c7f8e0cc56 | b8467af3373374f54aef8e4a060eb9550028f298 | /functionsprogram/myprograms.py | dcf9e8fa570248d0908469b331daa249eba8591c | [] | no_license | luminartraining/luminarPythonNovember | 6790acf957bba6ec47ab5c872f8f22b1c22d63f7 | 33f4627f89c281fca45f58d00a4e3f1f221144fc | refs/heads/master | 2023-01-28T20:23:03.863310 | 2020-12-07T02:46:03 | 2020-12-07T02:46:03 | 315,807,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | #import modules
#module ? package?
#we have to import mathooperatoons.py module
import functionsprogram.matoperations as fun
res=fun.add(100,200)
print(res)
sub=fun.sub(200,100)
print(res)
#create account in github
#git | [
"[email protected]"
] | |
ab03d8f6384fcbd71e3cd2408f91f5910e8878b7 | 521c1beeb2776161ae6d550be35cd0c180887129 | /customkeywords/tailProtocol.py | a1c19882a20fb2a2a23c6e113b2e1687b55fbdc7 | [] | no_license | elvis2workspace/CustomLibrary | 601b552792ac2c33beeb709474f857c82793ac7e | 6449eea8aa99ca1172f54b669d97703d36132ce3 | refs/heads/master | 2021-01-23T21:33:05.617871 | 2017-09-26T01:57:48 | 2017-09-26T01:57:48 | 58,983,388 | 0 | 1 | null | 2016-12-06T09:56:14 | 2016-05-17T02:22:14 | Python | UTF-8 | Python | false | false | 3,144 | py | # -*- coding: utf-8 -*-
"""
Created on 2015年5月8日
@author: zhang.xiuhai
"""
import os
import hashlib
from twisted.internet.protocol import ServerFactory, ProcessProtocol
from twisted.protocols.basic import LineReceiver
from twisted.python import log
from twisted.internet import reactor, threads
class TailProtocol(... | [
"[email protected]"
] | |
3c70d5350e30d99e67991d3efcbe1f1fce136e79 | 786027545626c24486753351d6e19093b261cd7d | /ghidra9.2.1_pyi/ghidra/app/util/demangler/gnu/__init__.pyi | 32ce2a5c514debd6436731a597a14186a1d74212 | [
"MIT"
] | permissive | kohnakagawa/ghidra_scripts | 51cede1874ef2b1fed901b802316449b4bf25661 | 5afed1234a7266c0624ec445133280993077c376 | refs/heads/main | 2023-03-25T08:25:16.842142 | 2021-03-18T13:31:40 | 2021-03-18T13:31:40 | 338,577,905 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 386 | pyi | from .DemanglerParseException import DemanglerParseException as DemanglerParseException
from .GnuDemangler import GnuDemangler as GnuDemangler
from .GnuDemanglerNativeProcess import GnuDemanglerNativeProcess as GnuDemanglerNativeProcess
from .GnuDemanglerOptions import GnuDemanglerOptions as GnuDemanglerOptions
from .G... | [
"[email protected]"
] | |
8ff270a59500d90bbb8a3db156cc23e09b9628ce | 0124528676ee3bbaec60df5d6950b408e6da37c8 | /Projects/QTPy/adafruit-circuitpython-bundle-7.x-mpy-20220601/examples/lsm303_accel_fast.py | 87d21c1b86f615c46bf8bd76cc4373c70703b763 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | land-boards/lb-boards | 8127658dc537dcfde0bb59a5018ab75c3f0087f6 | eeb98cc2003dac1924845d949f6f5bd387376568 | refs/heads/master | 2023-06-07T15:44:46.110742 | 2023-06-02T22:53:24 | 2023-06-02T22:53:24 | 4,847,305 | 10 | 12 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
""" Read data from the accelerometer and print it out, ASAP! """
import board
import adafruit_lsm303_accel
i2c = board.I2C() # uses board.SCL and board.SDA
sensor = adafruit_lsm303_accel.LSM303_Accel(i2c)
while True:
... | [
"[email protected]"
] | |
ef94ec0911459dc49f3392233ca8f7e4ed07ddc1 | 1dacbf90eeb384455ab84a8cf63d16e2c9680a90 | /lib/python2.7/site-packages/openopt/kernel/oologfcn.py | e9819b86d856962730889b3c6c11f8a6131dfd5e | [
"Python-2.0",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown"
] | permissive | wangyum/Anaconda | ac7229b21815dd92b0bd1c8b7ec4e85c013b8994 | 2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6 | refs/heads/master | 2022-10-21T15:14:23.464126 | 2022-10-05T12:10:31 | 2022-10-05T12:10:31 | 76,526,728 | 11 | 10 | Apache-2.0 | 2022-10-05T12:10:32 | 2016-12-15T05:26:12 | Python | UTF-8 | Python | false | false | 1,040 | py | class OpenOptException(BaseException):
def __init__(self, msg):
self.msg = msg
def __str__(self):
return self.msg
#pass
#def ooassert(cond, msg):
# assert cond, msg
def oowarn(msg):
s = oowarn.s + msg
print(s)
return s
oowarn.s = 'OpenOpt Warning: '
errSet = set()
def ... | [
"[email protected]"
] | |
d1a6d4762ab2b6475a8e17c25b4e44c0fe9b6611 | 6bc0a7bbbe769192ff7a7c403d2c5086be1d186c | /main.py | 570d04262295be9d63758e1cf20432c9c0e60610 | [
"MIT"
] | permissive | veryhannibal/pytorch-distributed-cifar | 5c4c2aff27b16f4c6350e7e789f2edc9c50f8111 | cc3528bb80c1bb498fbf717a30d6083ef1931fad | refs/heads/master | 2022-03-12T21:26:06.125558 | 2019-11-21T11:58:02 | 2019-11-21T11:58:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,497 | py | '''Train CIFAR10 with PyTorch.'''
from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
import torchvision.transforms as transforms
import os
import time
import argparse
from models... | [
"[email protected]"
] | |
9f9628dbb17329bb8f0ea4ceb9b08d65ac60ec44 | a3c8b67b91fac686aa98fd20179f8807be3ad4c0 | /rsbroker/core/upstream.py | 1ace31aa954eabd78a040a0b49ac38183023f813 | [
"Apache-2.0"
] | permissive | land-pack/RsBroker | d0c6c8fa13cec0c057d24b9f02b20e256b199737 | d556fda09582e0540cac0eabc163a984e8fc1c44 | refs/heads/master | 2021-01-12T07:16:39.853668 | 2016-12-22T07:28:05 | 2016-12-22T07:28:05 | 76,930,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,322 | py | import time
import logging
import ujson
from tornado import gen
from tornado import httpclient
from tornado import httputil
from tornado import ioloop
from tornado import websocket
try:
from util.tools import Log
except ImportError:
logger = logging.getLogger(__name__)
else:
logger = Log().getLog()
APPLIC... | [
"[email protected]"
] | |
675b214d92c6d69d2cb94daf2533333331d29cb5 | edf6a50044827f5f24b7fab4806dc25d8887c316 | /news/migrations/0001_initial.py | aa5a3112ead155a681e1a9bdbfb815eb1a9690cf | [] | no_license | zhcxk1998/AlgYun | 4958fdf31bb9009cb6541c39f715410f569b84ff | c54b95af8a87a12848401c7088bb7748793e6b63 | refs/heads/master | 2020-03-09T04:30:35.322800 | 2018-04-08T01:33:29 | 2018-04-08T01:33:29 | 128,589,517 | 1 | 1 | null | 2018-04-08T02:40:27 | 2018-04-08T02:40:27 | null | UTF-8 | Python | false | false | 2,345 | py | # Generated by Django 2.0.3 on 2018-04-03 16:36
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),
... | [
"[email protected]"
] | |
9a04690951ef33d0a11036986d4b9e7e88d5b906 | b039d4f7da5085a4e7d7491acb7bc04f7b896f24 | /tests/network/test_fees.py | 683cd8023b40e02b3ed8189ea6bf2916bdcc9128 | [
"MIT"
] | permissive | d4le/bit | c052cfadd79c52add99b6b576d2498119168c478 | 1153162f55c2ed1b007b237d4215d80ab7db429b | refs/heads/master | 2021-01-22T20:43:57.543622 | 2017-03-16T05:15:18 | 2017-03-16T05:15:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,608 | py | from time import sleep, time
import bit
from bit.network.fees import get_fee, get_fee_cached, set_fee_cache_time
def test_set_fee_cache_time():
original = bit.network.fees.DEFAULT_CACHE_TIME
set_fee_cache_time(30)
updated = bit.network.fees.DEFAULT_CACHE_TIME
assert original != updated
assert up... | [
"[email protected]"
] | |
6d9d4d609a09d4ffcab3ad82b4ed5491f6b80906 | 26cf7d2d6c3d6d83b17e304aa94d5e8b3fac323a | /autoencoder.py | a2b7ddcca50d4ad7bc09af0e2d31abe70e518764 | [] | no_license | zbn123/Autoencoder | 4ad8f48e33d9b228dceae6d919c3a5320318fc7e | 13ebeb8f15edecbdd6e362e7769b69053c1f31e0 | refs/heads/master | 2021-07-19T08:46:28.559592 | 2017-10-26T20:08:34 | 2017-10-26T20:08:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,667 | py | import tensorflow.contrib.slim as slim
import matplotlib.pyplot as plt
import cPickle as pickle
import tensorflow as tf
import numpy as np
import requests
import random
import time
import gzip
import os
batch_size = 5000
'''
Leaky RELU
'''
def lrelu(x, leak=0.2, name="lrelu"):
return tf.maximum(x, leak*x)
def... | [
"[email protected]"
] | |
114fc87817862cd893476714a9ddd0fcef1b5e71 | f4726db4ec192dee3709c6d474b1fb9a743e9d2f | /rllib/algorithms/mpc/abstract_solver.py | 6e9395f231c134c5549b377604bf32b20c842991 | [
"MIT"
] | permissive | SamueleMeta/optimal_is | fc32dbec2eaa1ceb24a70a0c6c7d982bd7cb2c69 | 7d8e0041825acfa003874cd1ad2aec0581f6a9e1 | refs/heads/master | 2023-03-05T23:25:22.651481 | 2021-02-13T21:30:30 | 2021-02-13T21:30:30 | 323,657,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,597 | py | """MPC Algorithms."""
import time
from abc import ABCMeta, abstractmethod
import numpy as np
import torch
import torch.nn as nn
from rllib.dataset.utilities import stack_list_of_tuples
from rllib.util.multiprocessing import run_parallel_returns
from rllib.util.neural_networks.utilities import repeat_along_dimension
f... | [
"[email protected]"
] | |
c9ddc6020f6335f0c218bb5bf57f71ec81f55e3c | 62179a165ec620ba967dbc20016e890978fbff50 | /tests/torch/pruning/test_onnx_export.py | 841d1b4a7fc6f0b959dc57c9259844df873540c2 | [
"Apache-2.0"
] | permissive | openvinotoolkit/nncf | 91fcf153a96f85da166aacb7a70ca4941e4ba4a4 | c027c8b43c4865d46b8de01d8350dd338ec5a874 | refs/heads/develop | 2023-08-24T11:25:05.704499 | 2023-08-23T14:44:05 | 2023-08-23T14:44:05 | 263,687,600 | 558 | 157 | Apache-2.0 | 2023-09-14T17:06:41 | 2020-05-13T16:41:05 | Python | UTF-8 | Python | false | false | 6,169 | py | # Copyright (c) 2023 Intel Corporation
# 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 to in writ... | [
"[email protected]"
] | |
dc7b599f8daa973d59789d42ded36ded640ad411 | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r10p1/Gen/DecFiles/options/16165060.py | 6c65b7ec1a29a4f35185a3b5334145f51a786eb9 | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,597 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r10p1/Gen/DecFiles/options/16165060.py generated: Wed, 25 Jan 2017 15:25:15
#
# Event Type: 16165060
#
# ASCII decay Descriptor: [ Xi_bc+ -> (D+ -> K- pi+ pi+) p+ K- ]cc
#
from Configurables import Generation
Generation().EventType = 16165060
Generation().SampleGenerationTool = ... | [
"[email protected]"
] | |
763f3843193e373ffd0a2229f3233e4ebeb3d73f | 3d14a2263e7547f9d3b463a35e4b25e3abb67306 | /ccal/get_vcf_info_ann.py | 4e76f65f9a5dda963ac65d084997f3fcb9b8b31f | [
"MIT"
] | permissive | alex-wenzel/ccal | ec91d214cd169913909de67a8592b9ce4a82af3f | 74dfc604d93e6ce9e12f34a828b601618df51faa | refs/heads/master | 2020-04-17T02:45:50.976156 | 2019-04-22T01:14:24 | 2019-04-22T01:14:24 | 166,151,841 | 0 | 0 | MIT | 2019-01-17T03:10:39 | 2019-01-17T03:10:38 | null | UTF-8 | Python | false | false | 352 | py | from .get_vcf_info import get_vcf_info
from .VCF_ANN_FIELDS import VCF_ANN_FIELDS
def get_vcf_info_ann(info, field, n_ann=None):
ann = get_vcf_info(info, "ANN")
if ann:
field_index = VCF_ANN_FIELDS.index(field)
return [ann_.split(sep="|")[field_index] for ann_ in ann.split(sep=",")[:n_ann]... | [
"[email protected]"
] | |
7675618bd38f2113e3e7c2c01134a738a88bf0fd | 11b9e95ce3d73e62ac07893a36690cb3a0d9041b | /NeuralNetwork/随机森林(非神经网络)/RandomForest2.py | 9bc8c512e9be0109525f67ca4ab60c14b7a1ff62 | [] | no_license | zhangjinzhi/SimpleTools | 3fdd2005cb8cf52e8e75d8ec283090a628cebc59 | be9e766d2e22124ce41bec254664b12fdfacaa4b | refs/heads/master | 2020-12-30T11:51:27.116851 | 2018-01-30T09:47:01 | 2018-01-30T09:47:01 | 91,527,509 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | # coding=utf-8
from sklearn.datasets import load_iris
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
import numpy as np
iris = load_iris()
df = pd.DataFrame(iris.data, columns=iris.feature_names)
df['is_train'] = np.random.uniform(0, 1, len(df)) <= .75
df['species'] = pd.Categorical.f... | [
"[email protected]"
] | |
f03019f06080a632cd818000dfeb75a5995b4219 | fd877cb919622d6a4efa305fb9eaec8a31e8dd37 | /scripts/ua/rule13.py | 45196c0db7db6b6593bc008e7f51e87aa635ae06 | [
"MIT"
] | permissive | NCiobo/iem | 37df9bc466ffcbe4f6b1f9c29c6b5266559f200c | 75da5e681b073c6047f5a2fb76721eaa0964c2ed | refs/heads/master | 2021-01-23T09:39:33.090955 | 2017-09-05T16:34:12 | 2017-09-05T16:34:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,671 | py | '''
Compute the difference between the 12 UTC 850 hPa temp and afternoon high
'''
from pyiem.datatypes import temperature
import psycopg2
import datetime
ASOS = psycopg2.connect(database='asos', host='iemdb', user='nobody')
acursor = ASOS.cursor()
POSTGIS = psycopg2.connect(database='postgis', host='iemdb', user='nob... | [
"[email protected]"
] | |
6d23619ee3008348e0c51778e10152aa5b555140 | 099172fda019272760aebaa7795def519907e152 | /com.ibm.streamsx.topology/opt/python/packages/streamsx/topology/schema.py | 480e8799768afddfd82f92c6a4705a006a30baf0 | [
"Apache-2.0"
] | permissive | rrea/streamsx.topology | 58ffd48745e83cd6d054d50405e9f7bbbe73876d | d8828ccf3e32cb8a7629f9e325fc14f565cf913e | refs/heads/master | 2020-12-11T07:16:53.701724 | 2016-08-12T19:36:42 | 2016-08-12T19:36:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,601 | py | import enum
class StreamSchema(object) :
"""SPL stream schema."""
def __init__(self, schema):
self.__schema=schema.strip()
def schema(self):
return self.__schema;
def spl_json(self):
_splj = {}
_splj["type"] = 'spltype'
_splj["value"] = self.schema()
r... | [
"[email protected]"
] | |
c3dbd2c439c3758ad3b7f4b9ce1618b504c41c15 | b92eee41d665314bc42043d1ff46c608af5ffdfd | /sesion_2/prueba.2.py | aeeadbfa75b82afe081d82967acbd794d76c7081 | [] | no_license | badillosoft/python-economics | 40efe8326558a8fb93f84fdbd2137428844ee5f3 | 82af43c7a47297ce186dc0e23e30620d46e6693a | refs/heads/master | 2021-01-11T18:55:15.762752 | 2017-05-09T01:15:59 | 2017-05-09T01:15:59 | 79,656,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | # Importación unitaria (por elemento)
from geg import suma, suma2
# from geg import *
print suma([1, 3, 5, 7, 9])
print suma([1, 76, 201, 76])
print suma([5])
| [
"[email protected]"
] | |
07522c3ec7506ead2e1af745eda523dcd66be75d | 7d027557cee0ad5ae783480fe79c1b3d11c4eccb | /backend/delivery_order/migrations/0001_initial.py | 0f19ff998f55d6c8023cdddbe7fe661b124db324 | [] | no_license | crowdbotics-apps/lol-21119 | b284e53d4b7ebfa9e4c068807aff813f53871c1e | 78965517edf60545b646e90e77a63aeb7c4515af | refs/heads/master | 2022-12-24T13:05:52.179667 | 2020-10-05T17:54:53 | 2020-10-05T17:54:53 | 301,492,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,307 | py | # Generated by Django 2.2.16 on 2020-10-05 17:48
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
("menu", "0001_initial"),
("delivery_user_profile", "0001_initial"),
]
operations = [
... | [
"[email protected]"
] | |
d199b63471d48fe41ba0034f9a18d32ec3530fc2 | 0dfdeec83f0b4acd804b9a52212426e9045edfd2 | /v13/addons/cristo_concern/models/dashboard.py | a62adf086f3cf39937c6a7ab9fea53b4303af462 | [] | no_license | cokotracy/Cristo | 2c89d6789a901ec2f1e2f0eca7563d1cebee40cb | aea45d82d9b822c0ffe6275cfcce3eeb5283a152 | refs/heads/main | 2023-08-30T05:01:02.913064 | 2021-07-06T10:09:29 | 2021-07-06T10:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,787 | py | # -*- coding: utf-8 -*-
from odoo import models, fields, api, _
class Member(models.Model):
_inherit = 'res.member'
@api.model
def get_user_member_details(self):
res = super(Member, self).get_user_member_details()
# Navigation
con_action_id = self.env.ref("cristo_concern... | [
"[email protected]"
] | |
43e00d123f74fceb0d9123050968b8d5a1ecd98c | a86293a2033c06410aa8ed19bcbce8ca55ea3c55 | /src/client_libraries/python/microsoft/dynamics/customerinsights/api/models/workflow_refresh_schedule_py3.py | 686a18f736ebacb397d4da542efc3475aa595443 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | ramotheonly/Dynamics365-CustomerInsights-Client-Libraries | a3ca28aa78d2b5509e65d9895ff4a0d42d05f611 | e00632f7972717b03e0fb1a9e2667e8f9444a0fe | refs/heads/main | 2023-08-02T08:09:04.063030 | 2021-09-28T22:42:15 | 2021-09-28T22:42:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,286 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | [
"[email protected]"
] | |
4b20687780fb0fdf9ee2aa84da2e4f050fe6925d | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/cirq_new/cirq_program/startCirq_pragma17.py | 3146b2f412bfb79c7789014ace702fe920a73cb6 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,262 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=8
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... | [
"[email protected]"
] | |
155563938f93e28b814ded6a968be8956f270d22 | 1287bbb696e240dd0b92d56d4fdf4246370f3e14 | /numpy-demo.py | fd2619fdc2e82feac4224f8733d84b6b6ec43540 | [] | no_license | omerfarukcelenk/PythonCalismalari | ed0c204084860fddcb892e6edad84fdbc1ed38ec | 28da12d7d042ec306f064fb1cc3a1a026cb57b74 | refs/heads/main | 2023-04-13T18:23:15.270020 | 2021-04-26T21:06:21 | 2021-04-26T21:06:21 | 361,893,918 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,151 | py | import numpy as np
# 1- (10,15,30,45,60) değerlerine sahip numpy dizisi oluşturunuz.
result = np.array([10,15,30,45,60])
# 2- (5-15) arasındaki sayılarla numpy dizisi oluşturunuz.
result = np.arange(5,15)
# 3- (50-100) arasında 5'er 5'er artarak numpy dizisi oluşturunuz.
result = np.arange(50,100,5)
# 4- 10 eleman... | [
"[email protected]"
] | |
5f1384b0ccaccf589e497ee288792f747e49c667 | e2860eb874db045fb8d0279566a935af907e5bdf | /keras01/keras24_cancer_binary.py | 224913ac725bca03a09cec370f03a7af20a3ef3f | [] | no_license | MinseokCHAE/Bitcamp2_new | dda7990907cb136c2e709a345eec634dfdb6ac02 | 849adb5a330b621f1c681f0b5e92005d1281a44d | refs/heads/main | 2023-08-31T03:28:18.068561 | 2021-10-05T00:48:52 | 2021-10-05T00:48:52 | 390,228,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,010 | py | import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn.metrics import r2_score
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Dense, Inp... | [
"[email protected]"
] | |
962812ea95c14c421b5d385ad22db70190075490 | 3284c2a6e99c27c9a72de68f60284b7865a7fb0c | /Principles_of_Computing/poc_fifteen_testsuite.py | d67f71a5ed434da0c1ac0fb0994003f591b64614 | [] | no_license | bbusenius/Projects | e6c972a4356d1ece978b402004cd0bdf23279c98 | 57240764f64dd66ce69336450509e8556dbc597e | refs/heads/master | 2022-09-17T17:18:08.884037 | 2022-08-27T21:39:55 | 2022-08-27T21:39:55 | 20,620,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,706 | py | import random
from Fifteen import Puzzle
def test_lower_row_invariant(puzzle, start):
""" test lower row invariants """
assert start[0] > 1, "not an interior tile"
assert puzzle.lower_row_invariant(*start)
if start[1] == 0:
puzzle.solve_col0_tile(start[0])
else:
puzzle.solve_... | [
"[email protected]"
] | |
c98db546b314ceed3b99d5a290116ca53e79c0be | 5e45f1d1d9f58aa1456777b0d75334d6efd43840 | /challenges/contests/code_forces/round310/b.py | ddeeef394ad7437d7d538332cc5b25d2b0c84464 | [] | no_license | missingdays/nerdy.school | 604953dc9b3c38a0f71793f066ce2707aa980dae | 051673e0ebc54bc2f7e96a6477697d1d528dc45c | refs/heads/master | 2021-01-17T08:10:19.558851 | 2016-06-06T15:29:01 | 2016-06-06T15:29:01 | 59,897,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 missingdays <missingdays@missingdays>
#
# Distributed under terms of the MIT license.
"""
"""
def rotate(a, n):
clock = True
for i in range(n):
if clock:
if a[i] == n-1:
a[i] = 0
... | [
"[email protected]"
] | |
2d226f5e77c40290e347888ab04c3fd10c6a2a14 | d92330be8ea281bdfefff5d17039b1a6d44057dc | /src/stiamro/startup.py | 478af5d7aa11eaad8202de82c16120520a35f02a | [] | no_license | avoinea/stiamro | 2af6f2329abafb59b7e6b54abacb95c8f6b3d697 | 5ee6ec3b754a776cb87a9fa452e21cb2afbf38f9 | refs/heads/master | 2021-01-18T14:38:49.669592 | 2011-03-11T10:39:44 | 2011-03-11T10:39:44 | 1,397,488 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | import os
import sys
import code
import zdaemon.zdctl
import zope.app.wsgi
import zope.app.debug
def application_factory(global_conf, conf='zope.conf'):
zope_conf = os.path.join(global_conf['here'], conf)
return zope.app.wsgi.getWSGIApplication(zope_conf)
def interactive_debug_prompt(zope_conf='zope.conf'):
... | [
"alin@serenity.(none)"
] | alin@serenity.(none) |
0823d037b25810b90b0805adedcdad019270008c | 301b039050c00a9efa4f3a5635e8b633f8adf988 | /caffe2/experiments/python/SparseTransformer.py | c09bb09574798a2db7772eb526185e515e98feb4 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | sunpan822/caffe2 | 9704b6fe556d272fbedfd6edfdb796f6a8f02970 | a3c56d892eb85054b4e7cbd1cf0a0d07422ae796 | refs/heads/master | 2020-04-12T14:31:45.919799 | 2019-04-19T04:10:40 | 2019-04-19T04:10:40 | 162,555,100 | 1 | 0 | Apache-2.0 | 2018-12-20T09:14:48 | 2018-12-20T09:14:47 | null | UTF-8 | Python | false | false | 6,362 | py | ## @package SparseTransformer
# Module caffe2.experiments.python.SparseTransformer
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import workspace
import scipy.sparse
class NetDefNode():
def _... | [
"[email protected]"
] | |
10d6c38f461f0064766acde067ce1501198f039b | b92b0e9ba2338ab311312dcbbeefcbb7c912fc2e | /build/shogun_lib/applications/edrt/tutorial_examples/isomap.py | 968afc975fb56b891080841483da3d0476df5337 | [] | no_license | behollis/muViewBranch | 384f8f97f67723b2a4019294854969d6fc1f53e8 | 1d80914f57e47b3ad565c4696861f7b3213675e0 | refs/heads/master | 2021-01-10T13:22:28.580069 | 2015-10-27T21:43:20 | 2015-10-27T21:43:20 | 45,059,082 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,100 | py | import modshogun as sg
import data
import numpy as np
# load data
feature_matrix = data.swissroll()
# create features instance
features = sg.RealFeatures(feature_matrix)
# create Isomap converter instance
converter = sg.Isomap()
# set target dimensionality
converter.set_target_dim(2)
# compute embedding with Isomap... | [
"prosen@305cdda6-5ce1-45b3-a98d-dfc68c8b3305"
] | prosen@305cdda6-5ce1-45b3-a98d-dfc68c8b3305 |
7e22946ff315b5f228a8591af59455b54238cba7 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03151/s822034196.py | 4313c1c0f2ac588afa27facef6408828aef26183 | [] | 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 | 431 | py | n = int(input())
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))
if sum(a_list) < sum(b_list):
print(-1)
exit()
a_sub_b = [a_list[i] - b_list[i] for i in range(n)]
insufficients = [x for x in a_sub_b if x < 0]
cnt = len(insufficients)
sum_insuf = sum(insufficients)
for x in ... | [
"[email protected]"
] | |
788ba397c4eae832f0db90c5895d6a977650d8ce | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_8/crnkee002/question2.py | cb2b9f4a82509a3b49d881ae545369931ced4326 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 694 | py | """A8Q2 - Character Pairs
5/3/2012
CRNKEE002"""
def main():
message = input('Enter a message:\n')
print('Number of pairs:', double_chars(0, message))
def double_chars(pos, word):
if len(word) == 1 or len(word) == 0:
return 0
elif (word[pos] == word[pos+1]) and (pos+1 == len(word)-1)... | [
"[email protected]"
] | |
d0cac88d4a8c7145000a7513167b23dddeb83fc1 | f2f88a578165a764d2ebb4a022d19e2ea4cc9946 | /pyvisdk/do/host_vmci_access_manager_access_spec.py | 3be9649b6bb56dbd6ab8a434dee41655e7e84b7b | [
"MIT"
] | permissive | pombredanne/pyvisdk | 1ecc68a1bf264095f72f274c776e5868fb302673 | de24eb4426eb76233dc2e57640d3274ffd304eb3 | refs/heads/master | 2021-01-21T16:18:39.233611 | 2014-07-28T19:50:38 | 2014-07-28T19:50:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,363 | py |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def HostVmciAccessManagerAccessSpec(vim, *args, **kwargs):
'''The AccessSpec data object ... | [
"[email protected]"
] | |
1b172b649cf62bea7e4b718c542cb3c43cb28435 | d38a37c6997f2282b2138fc0a74a82996940dade | /loginapp/views.py | 62e1e750131eabd25d674f07cffda8e604f17a49 | [] | no_license | ethicalrushi/SignUp | 9a295c0dcf20ea7eb47fe4af968b0c3d0caf6532 | 6deac079539bb9281f32f19e027d47436d59ce3d | refs/heads/master | 2020-03-08T13:25:28.023977 | 2018-04-05T15:13:08 | 2018-04-05T15:13:08 | 128,157,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,319 | py | from django.shortcuts import render
from .forms import UserForm
from .models import User
from django.contrib.auth.hashers import make_password, check_password
from django.http import HttpResponse
from rest_framework.response import Response
from rest_framework import status, viewsets
from .serializers import UserSe... | [
"[email protected]"
] | |
ba51dcc9f9c7d92cde27dcd455523ff50ad8d58e | 8930d812d545e4a67be14b928212878befa1a535 | /primes/euler0124.py | 393a0d38105dda9afc7ccd0dea331099a4a39243 | [] | no_license | jwodder/euler | bd59935e9f359e8760b4140243c907a6c44247b8 | 7549bb38dba746a04dcaa021f0c7dc06342d078b | refs/heads/master | 2020-12-22T20:20:29.311514 | 2016-08-06T01:28:33 | 2016-08-06T01:28:33 | 21,482,466 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,028 | py | #!/usr/bin/python
r"""Ordered radicals
The radical of $n$, $rad(n)$, is the product of the distinct prime factors
of $n$. For example, $504 = 2^3\times 3^2\times 7$, so $rad(504) = 2\times
3\times 7 = 42$.
If we calculate $rad(n)$ for $1\leq n\leq 10$, then sort them on $rad(n)$,
and sorting on $... | [
"[email protected]"
] | |
9dfda40d614bb48a5fe3ab1fc73a182b42c25ced | 6846a0469efc79b89edc8f856944d5a8005d7244 | /id_0060.py | 01b7c31aa52da90e0370908d86d70201e6913a1f | [] | no_license | CGenie/project_euler | 42cb966e13645339490046eb44a729660ae0c092 | cc90edd061b0f4d9e076d5a684b842c202a6812a | refs/heads/master | 2020-06-05T00:41:49.266961 | 2014-01-13T19:11:31 | 2014-01-13T19:11:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,663 | py | #!/usr/bin/python2
# #####################################################################
# id_0060.py
#
# Przemyslaw Kaminski <[email protected]>
# Time-stamp: <>
######################################################################
import pickle
from itertools import combinations
from id_0003 import is_prime
if __n... | [
"[email protected]"
] | |
86d8efefc0aaa304a58e7c9b58202117545fbf48 | 03ac34ae59b3d85b1876a9ca61e08c0b7020537c | /myproject/pages/tests.py | 49bde0bf4c1a592e8d6c4a196c1ff01db6c1fbf1 | [] | no_license | pramodkumarpanda/http-django.repo | 1e94890a50ef59166cbe1919791cdac6ca73b21c | 9551a5991f9dda76674a442598eb14c2cf2312cb | refs/heads/master | 2020-07-02T10:32:58.668280 | 2019-10-21T15:28:37 | 2019-10-21T15:28:37 | 201,500,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,203 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
# Create your tests here.
from django.http import HttpRequest
#from django.test import SimpleTestCase
from django.urls import reverse
from django.test import TestCase,SimpleTestCase
from . import views
from .models impor... | [
"user@localhost"
] | user@localhost |
1cca13ce33cc9925a5981731585f0970d3da571e | e3f3b986b256911e43496fe91c463f79dda9b334 | /customauth/migrations/0006_remove_user_is_moderator.py | 3692f715b5ea627df4ca42712fb605ba20be132a | [] | no_license | itkpi/itkpimail | e2ca56849c1ca18dec0b9c7d661b3563ed1f2ffe | 6622208ca36d322e61821935804b2367f956d0b6 | refs/heads/master | 2021-01-01T19:07:29.107033 | 2015-11-08T18:57:45 | 2015-11-08T18:57:45 | 34,176,219 | 3 | 1 | null | 2018-12-09T05:00:27 | 2015-04-18T17:52:20 | JavaScript | UTF-8 | Python | false | false | 358 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('customauth', '0005_user_is_moderator'),
]
operations = [
migrations.RemoveField(
model_name='user',
... | [
"[email protected]"
] | |
35178571ff5eaafb96690f4636cddb7b8642190d | a4e4c3faa29043fc80f62a8442e2f8333cd23933 | /U_Net/primitives.py | cee4c15d4e046dc3f71f456fa4a622db17cc0c77 | [] | no_license | FangYang970206/Intrinsic_Image | 652ab87c2d95b400cf80c6a49d1863a40d1cba07 | 3b8ec261b7b3aeaa1c611473f53fb4e23b82893b | refs/heads/master | 2023-01-21T05:18:40.748488 | 2020-11-24T02:22:00 | 2020-11-24T02:22:00 | 228,824,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,432 | py | import sys, torch, torch.nn as nn, torch.nn.functional as F
from torch.autograd import Variable
def conv(in_channels, out_channels, kernel_size, stride, padding):
convolution = nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride, padding=padding)
batch_norm = nn.BatchNorm2d(out_channel... | [
"[email protected]"
] | |
bf3e130b1bab3b6fcb044e25147092962b48fd91 | 1af49694004c6fbc31deada5618dae37255ce978 | /tools/metrics/histograms/merge_xml.py | d522fae6d1f2e541fa077ec5b9d3ced366c2ce53 | [
"LGPL-2.0-or-later",
"Zlib",
"BSD-3-Clause",
"MIT",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference",
"MPL-1.1",
"GPL-2.0-only",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown",
"APSL-2.0"
] | permissive | sadrulhc/chromium | 59682b173a00269ed036eee5ebfa317ba3a770cc | a4b950c23db47a0fdd63549cccf9ac8acd8e2c41 | refs/heads/master | 2023-02-02T07:59:20.295144 | 2020-12-01T21:32:32 | 2020-12-01T21:32:32 | 317,678,056 | 3 | 0 | BSD-3-Clause | 2020-12-01T21:56:26 | 2020-12-01T21:56:25 | null | UTF-8 | Python | false | false | 7,451 | py | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A script to merge multiple source xml files into a single histograms.xml."""
import argparse
import os
import sys
import xml.dom.mi... | [
"[email protected]"
] | |
51c20a8be35d9a81e63f1be880d978d0d13c9257 | 017033cc7094fd20334607e4c3e6e90bc5006687 | /django/api/index/migrations/0032_auto_20210607_1433.py | 92261d96b3f94ca8d42235adf992eaaf50474f0b | [] | no_license | HellMenDos/DjangoDockerPostgresSocket.io | cadc8cbc5ec1cd84b1e2455361f9a04ac557c73c | 88e4ff65cfc80df7932cffe23eee0ae221ec3519 | refs/heads/master | 2023-05-31T06:31:35.206756 | 2021-06-21T19:14:55 | 2021-06-21T19:14:55 | 367,129,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 441 | py | # Generated by Django 3.1.4 on 2021-06-07 14:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('index', '0031_auto_20210607_1431'),
]
operations = [
migrations.AlterField(
model_name='userdata',
name='avatar',
... | [
"[email protected]"
] | |
b91955ad63dfda9a71f830d93717f0db2366bf70 | 7ec91f8b8342b1ab62d315424f43588a13dda307 | /solu/221. Maximal Square.py | f17368e629bb9254ed8a5f5a492dfce8f0b97edc | [] | no_license | coolmich/py-leetcode | bbd001a1cb41b13cd0515d1b764ec327dfaaa03c | 3129438b032d3aeb87c6ac5c4733df0ebc1272ba | refs/heads/master | 2020-05-21T08:44:46.564419 | 2016-09-15T15:45:08 | 2016-09-15T15:45:08 | 60,917,444 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | class Solution(object):
def maximalSquare(self, matrix):
"""
:type matrix: List[List[str]]
:rtype: int
"""
if not len(matrix): return 0
mat, maxi = [[0 for i in range(len(matrix[0]))] for j in range(len(matrix))], 0
for c in range(len(matrix[0])):
... | [
"[email protected]"
] | |
fc36f5d3bbf141bd5b97e9bfa970fa8c1f641c82 | 31fc068f935aa723a089eda3c8a639e1d9c4cee9 | /jason.py | 27b41fdd76c9d5384f1f606053da85231f1a696c | [] | no_license | jaythaceo/Jaythaceo | 31098a016c4b3453996ef89252f2d9a1f05e9c10 | f4cea385318b0ff1708e3d35e96f4eb53925d8d0 | refs/heads/master | 2023-05-30T15:16:27.589337 | 2023-04-28T16:23:31 | 2023-04-28T16:23:31 | 157,614,343 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | # Lets make a bot that does some cool shit
from flask import Flask, render_template, request, jsonify
import aiml
import os
app = Flask(__name__)
@app.route("/")
def hello():
return render_template('chat.html')
@app.route("/ask", methods=['POST'])
def ask():
message = request.form['messageText'].encode('utf-8... | [
"[email protected]"
] | |
88c1de86d4d9ba1db69c49098476c61e05196810 | 540b4199dd80228f1d84c9b687e974cfa2c289a2 | /【Python+Dash快速web应用开发】系列文章/16 多页面应用/app2.py | 4298790c10256c39aeb6b4f979952cf587c417be | [] | no_license | CNFeffery/DataScienceStudyNotes | 1186e26c88874b89b65f841af5f78dc49429e479 | d45b42b49be04ba4add9cdd18b4787fb3c334b1f | refs/heads/master | 2023-08-17T07:18:43.730916 | 2023-07-25T14:05:17 | 2023-07-25T14:05:17 | 206,516,448 | 1,141 | 485 | null | null | null | null | UTF-8 | Python | false | false | 1,543 | py | import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output
app = dash.Dash(__name__)
app.layout = dbc.Container(
[
dcc.Location(id='url', refresh=False),
dbc.Row(
[
... | [
"[email protected]"
] | |
1c555d3c397b93d8929f1f3d32c733ad9362307a | 28bf7793cde66074ac6cbe2c76df92bd4803dab9 | /answers/Utkarsh Srivastava/Day 6/Question 1.py | 51078cd3ed9f7841f0a3dc1a97b49dc757ef6903 | [
"MIT"
] | permissive | Codechef-SRM-NCR-Chapter/30-DaysOfCode-March-2021 | 2dee33e057ba22092795a6ecc6686a9d31607c9d | 66c7d85025481074c93cfda7853b145c88a30da4 | refs/heads/main | 2023-05-29T10:33:31.795738 | 2021-06-10T14:57:30 | 2021-06-10T14:57:30 | 348,153,476 | 22 | 135 | MIT | 2021-06-10T14:57:31 | 2021-03-15T23:37:26 | Java | UTF-8 | Python | false | false | 371 | py | candies = input("Enter Candies ").split()
max = 0
result = [0]*len(candies)
extra = int(input("Enter extra candies "))
for i in range(len(candies)):
candies[i] = int(candies[i])
if int(candies[i])>max:
max = candies[i]
for i in range(len(candies)):
if(candies[i]+extra>=max):
result[i] = True... | [
"[email protected]"
] | |
3cc37cf0d6c169ef8ca16a2422467566dd03733e | 24e843a90a3b3a37cc4d76a207f41d1fc628c2e7 | /python3/test141~225.py | 8fb44d48461a29e5a31ea55c2269ee6e23ee6e0f | [] | no_license | erikliu0801/leetcode | c595ea786716f7df86bd352c1e8d691f1870ec70 | 1de7bfe192324f9de28afa06b9539331c87d1346 | refs/heads/master | 2023-08-07T14:47:19.074076 | 2021-09-05T09:46:35 | 2021-09-05T09:46:35 | 224,321,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,035 | py | #141
def hasCycle(head):
linked_list = []
while head != None:
if head in linked_list:
return True
linked_list.append(head)
head = head.next
return False
#168
def convertToTitle(n):
if n <= 0:
return
else:
digits = ['Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','... | [
"[email protected]"
] | |
e356b5be593efe2b242480222729f42b266cea26 | 99799383b4e618061fe9261aa70cfe420e02a5aa | /person/migrations/0008_person_datetime_updated.py | b93c4440a6d2a8a9406b93a49b315141c371f377 | [
"MIT"
] | permissive | openkamer/openkamer | f311a97d5c9e182eabd6602f42475e8e049912b0 | bb99963c00ad90299deccd44d977c27aee7eb16c | refs/heads/master | 2023-07-20T10:45:11.402427 | 2023-07-18T17:41:56 | 2023-07-18T17:41:56 | 57,322,204 | 62 | 7 | MIT | 2023-07-17T18:15:43 | 2016-04-28T17:43:23 | Python | UTF-8 | Python | false | false | 397 | py | # Generated by Django 2.2.8 on 2019-12-05 19:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('person', '0007_auto_20191205_1833'),
]
operations = [
migrations.AddField(
model_name='person',
name='datetime_updat... | [
"[email protected]"
] | |
4ff6bf0f114dfc486ac2a7d447a98809d1b04a35 | d63b1b36634b68070f6f3c017c0250a7ea646e6f | /SMC/GEM5/gem5/src/mem/ruby/structures/RubyPrefetcher.py | 18bb3dc69472cf6d08ff90277396485033e73a76 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"MIT"
] | permissive | jiwon-choe/Brown-SMCSim | ccf506d34d85fb3d085bf50ed47de8b4eeaee474 | ff3d9334c1d5c8d6a00421848c0d51e50e6b67f8 | refs/heads/master | 2021-06-30T00:15:57.128209 | 2020-11-24T03:11:41 | 2020-11-24T03:11:41 | 192,596,189 | 15 | 8 | MIT | 2019-06-20T15:43:00 | 2019-06-18T18:53:40 | C++ | UTF-8 | Python | false | false | 2,437 | py | # Copyright (c) 2012 Mark D. Hill and David A. Wood
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditio... | [
"[email protected]"
] | |
6063712ab5545c979e943f37231f60c58696e514 | 1cc5d45273d008e97497dad9ec004505cc68c765 | /cheatsheet/ops_doc-master/Service/cfaq/personalNoteBook/pythonLearn-decorator.py | 79936304b8d47aa4fb0180ebc31d541b08fcf72f | [] | no_license | wangfuli217/ld_note | 6efb802989c3ea8acf031a10ccf8a8a27c679142 | ad65bc3b711ec00844da7493fc55e5445d58639f | refs/heads/main | 2023-08-26T19:26:45.861748 | 2023-03-25T08:13:19 | 2023-03-25T08:13:19 | 375,861,686 | 5 | 6 | null | null | null | null | UTF-8 | Python | false | false | 859 | py |
from functools import wraps
def memorization(func: object) -> object:
cache = {}
@wraps(func)
def wrapper(*args):
v = cache.get(args, None)
if v == None:
cache[args] = func(*args)
return cache[args]
return wrapper
@memorization
def fibonacci(n: int) -> i... | [
"[email protected]"
] | |
ec8332242621c2a458f725a777fa1c7e23397c1c | 998e1a1346f59c8e9b7669e7ebf716f9ac8cd117 | /EVSCapp/EVSCApi/urls.py | a7f4daee03f8376cd0fe5a37f9a9cb4180942c30 | [] | no_license | meku54444026/EVSCProject | 3415cf3b0abb682866fcca9bbebb32f37cb744c4 | 1bef5b405391409f27ea5948203c5e28fa1a28ff | refs/heads/master | 2023-07-02T04:45:15.314439 | 2021-08-10T14:52:48 | 2021-08-10T14:52:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,339 | py | from django.db import router
from django.urls import path
from django.urls.conf import include
from EVSCapp.EVSCApi.views import (RecordDetailAPIView,
LisVehicle,
VehicleDetailAPIView,
ReportRUDAPIView,
... | [
"[email protected]"
] | |
1b01557b777216b35b876eb5b76e8c11dcae98f7 | 51a37b7108f2f69a1377d98f714711af3c32d0df | /src/leetcode/P376.py | 67230c5dd08e1fd4c1ad079f193aeec2d1ebc6e8 | [] | no_license | stupidchen/leetcode | 1dd2683ba4b1c0382e9263547d6c623e4979a806 | 72d172ea25777980a49439042dbc39448fcad73d | refs/heads/master | 2022-03-14T21:15:47.263954 | 2022-02-27T15:33:15 | 2022-02-27T15:33:15 | 55,680,865 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | class Solution:
def wiggleMaxLength(self, nums):
n = len(nums)
if n < 2:
return n
inc = None
t = 1
for i in range(1, n):
if inc is None:
if nums[i] == nums[i - 1]:
continue
else:
... | [
"[email protected]"
] | |
11dcbec116bedb68d9ed2b8d582d4fa3c22d4ed6 | e87403a46c10b0528ae3d51e9d316c6c92409e2c | /models/attention/encoders/bgru_encoder.py | 1f4cbcc86a02f9905836b1f34c787648784c843e | [
"MIT"
] | permissive | xwang0415/tensorflow_end2end_speech_recognition | 662c9b899863f5595f903c4ce3b87e675e1d51a1 | 9d4661e9296b01d1116e82de823f398407207e1f | refs/heads/master | 2021-01-21T20:53:51.563852 | 2017-06-19T06:52:37 | 2017-06-19T06:52:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,718 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Bidirectional GRU Encoder class."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from .encoder_base import EncoderOutput, EncoderBase
class BGRUEncoder(EncoderBase):
"""Bidi... | [
"[email protected]"
] | |
24387105dd66efbecce28fdcd23e85ae0ba6337e | d429c131df32789e11a98e9e965e652176fcee97 | /443A - Anton and Letters.py | 608e7a2cee9913d55638b75cd9c1c8131e89672c | [] | no_license | shan-mathi/Codeforces | a11841a1ef1a1ef78e3d506d58d9fdf4439421bd | 6f8166b79bea0eb1f575dbfc74c252ba71472c7e | refs/heads/main | 2023-06-15T08:25:41.130432 | 2021-06-24T10:36:06 | 2021-06-24T10:36:06 | 341,176,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | #108786380 Mar/01/2021 14:42UTC+5.5 Shan_XD 443A - Anton and Letters PyPy 3 Accepted 108 ms 0 KB
list = str(input())
if list=='{}':
print(0)
else:
list = (list[1:-1].split(','))
list = [i.strip() for i in list]
print(len(set(list)))
| [
"[email protected]"
] | |
1c79daaf5498a22d80f0c0867463ce97502692e9 | 3da991a057cd81de802c40da2edd640878685258 | /caffe2/python/operator_test/ctc_beam_search_decoder_op_test.py | 21ca68fe007addb4333d4e8913cecfb64e83a685 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | sjx0451/pytorch | 9f5b1c0c7c874f9da72c0190dc131944ba828ab7 | 3544f60f7602081398ee62bc5d652a87f4743dab | refs/heads/master | 2022-12-01T22:30:29.888370 | 2020-08-13T23:45:58 | 2020-08-13T23:48:31 | 287,421,291 | 2 | 0 | NOASSERTION | 2020-08-14T02:06:11 | 2020-08-14T02:06:11 | null | UTF-8 | Python | false | false | 5,391 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import core
from caffe2.python.test_util import caffe2_flaky
from collections import defaultdict, Counter
from hypothesis import given, settings
import... | [
"[email protected]"
] | |
42894b20a30101258c0c73f702b75506575bf3c4 | e08801ffc8aa0e59ef88662ba529056a89d924ef | /examples/elk/lsda/elk_pp.py | 13592bebd6ed836096d15314b3a173ff5bfc559f | [] | no_license | chrinide/DFTtoolbox | a8c848849693426b82f4c329523cc8d82f4d39ac | dfe003507011ec14ef520df36d0da55f52dd0028 | refs/heads/master | 2021-04-15T14:28:40.593612 | 2017-12-13T23:00:11 | 2017-12-13T23:00:11 | 126,837,451 | 1 | 0 | null | 2018-03-26T14:00:25 | 2018-03-26T14:00:24 | null | UTF-8 | Python | false | false | 710 | py | from DFTtoolbox.elk import postproc
import os
# Parameters =======================================
run_task=[1,2,3,4,5,6]
wkdir=os.path.dirname(os.path.realpath(__file__))
klabel=['$\Gamma$','X','W','K','$\Gamma$','L','U','W','L','K']
Ebound=[-5,5]
state_grp=[['1:1/1/a/a'],['2:2/2/a/a']]
# Main =======================... | [
"[email protected]"
] | |
6d32704f852655a0cfb1ee6f5c83b7814aa83fcb | d748a68c9d9100cb2ad275ebf0fd161532dd8200 | /cubicus/device.py | 04e4204bac84a483be21a740aef3331e7875f0eb | [] | no_license | drpancake/cubicus-daemon | aff192aa6e5b2ed97a5a34d5e1f3528d99bb4e71 | feaa8009a1bfe25ef47ca198e1bc3783ad5b58fd | refs/heads/master | 2021-01-02T09:27:10.321494 | 2012-05-01T21:31:09 | 2012-05-01T21:31:09 | 3,901,291 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,322 | py |
import os
import random
from cubicus.sock import SocketThread
from cubicus.models import Event
PAIRINGS_FILE = 'pairings.dat'
def display_pin(pin):
""" Kludge - PIL for now """
from PIL import Image, ImageDraw
im = Image.new('RGBA', (300, 100))
draw = ImageDraw.Draw(im)
draw.text((5, 5), pin)
... | [
"[email protected]"
] | |
65afdd06bb2760a7cd754a6439f901e8c2c18c55 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-sblp-obt/sblp_ut=3.5_rd=0.5_rw=0.06_rn=4_u=0.075-0.325_p=harmonic-2/sched=RUN_trial=50/sched.py | 906f21dc0c17a1a4da4f66497f1581033d82294a | [] | 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 | 369 | py | -S 0 -X RUN -Q 0 -L 7 138 400
-S 0 -X RUN -Q 0 -L 7 119 400
-S 1 -X RUN -Q 1 -L 4 90 400
-S 1 -X RUN -Q 1 -L 4 72 250
-S 2 -X RUN -Q 2 -L 3 64 250
-S 2 -X RUN -Q 2 -L 3 62 250
-S 3 -X RUN -Q 3 -L 2 40 125
-S 3 -X RUN -Q 3 -L 2 35 150
-S 4 33 150
-S 4 31 150
-S 4 26 100
-S 5 24 150
-S... | [
"[email protected]"
] | |
1efe310b28c4e6a1bf1bfe0b321d4aecdd908515 | c0aff8a6ea16a6921bdbb907e6769d229dcdb6cb | /src/push_server/ios/push_worker/apnslib/notify_mgr.py | e55b66465e5275213ab7b49bdf5df1d116cc4eb8 | [] | no_license | chwangbjtu/pushService | fe1d3f92ea9f1292603be41894f8496fb7c13fba | 28a58bcba1522275d07bb20d41e8df5642955367 | refs/heads/master | 2021-01-11T18:17:30.263415 | 2016-09-27T10:43:08 | 2016-09-27T10:43:08 | 69,335,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,074 | py | #-*- coding: utf-8 -*-
from __init__ import *
from connection import *
from tornado import log
import traceback
import etc
from statistics import Statistics
from tokens import TokenMgr
class APNSNotificationWrapper(object):
sandbox = True
payloads = None
connection = None
identifier = 1
error_at = ... | [
"[email protected]"
] | |
98ee322836ec34a3a4310506f52b914c4f8634ea | 56bf1dbfa5d23257522fb03906e13c597a829ed3 | /lib/wamp_components/analytics_component.py | 09b1634f64ccea3c071b0d8e16dfe5a84f9696bd | [
"MIT"
] | permissive | fendaq/SerpentAI | 0417777bbc0fccb50df456d0ced1bce839aa3211 | e9c147f33a790a9cd3e4ee631ddbf6bbf91c3921 | refs/heads/master | 2021-07-23T02:04:15.977726 | 2017-08-26T23:31:59 | 2017-08-26T23:31:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | import asyncio
from autobahn.asyncio.wamp import ApplicationSession, ApplicationRunner
from autobahn.wamp.types import RegisterOptions, SubscribeOptions
from autobahn.wamp import auth
from lib.config import config
import aioredis
import json
class AnalyticsComponent:
@classmethod
def run(cls):
prin... | [
"[email protected]"
] | |
468e2fa105770bc6613f4c974b423ea70ccf8192 | 26b03741c4651eb2f076e51cd34d71f2fb826fcf | /dev/web/Rocky/src/accounts/migrations/0007_wallettransactions.py | ba8f123aea7966fa763c98b89bb2264471459679 | [] | no_license | sreeram315/Rocky---Hardware-project-ATmega-Django-mySQL | 072fc8e9913f22dc0e47a73d29ace6ff1795ed0f | 1ef82b1914bdfc57866e7420e12bf4318cf3f030 | refs/heads/main | 2023-06-04T16:01:51.176564 | 2021-06-21T22:18:01 | 2021-06-21T22:18:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | # Generated by Django 2.2.7 on 2020-04-03 05:40
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('accounts', '0006_userpro... | [
"[email protected]"
] | |
054b06d9579be1ed0da49ab1d44ab99a4bdf7eaf | 27b86f422246a78704e0e84983b2630533a47db6 | /docs/source/tutorials/src/hatch/solid_hatch_true_color.py | 71612e3499d520bbc0a4d87c8b1813705602c924 | [
"MIT"
] | permissive | mozman/ezdxf | 7512decd600896960660f0f580cab815bf0d7a51 | ba6ab0264dcb6833173042a37b1b5ae878d75113 | refs/heads/master | 2023-09-01T11:55:13.462105 | 2023-08-15T11:50:05 | 2023-08-15T12:00:04 | 79,697,117 | 750 | 194 | MIT | 2023-09-14T09:40:41 | 2017-01-22T05:55:55 | Python | UTF-8 | Python | false | false | 598 | py | import ezdxf
# hatch with true color requires DXF R2004 or later
doc = ezdxf.new("R2004")
msp = doc.modelspace()
# important: major axis >= minor axis (ratio <= 1.)
msp.add_ellipse((0, 0), major_axis=(0, 10), ratio=0.5)
hatch = msp.add_hatch() # use default ACI fill color
hatch.rgb = (211, 40, 215)
# every boundar... | [
"[email protected]"
] | |
daeecd30d81c8cbdc6492acdc2b0ed1ec95cae6e | c42142003122bc8172b00ccee0e733417d06fde0 | /webstore/cart/models.py | 187e1966774582896c01e0a3d38b75a74f863be0 | [] | no_license | sloniewski/django_webstore | 53fbe52b7284220a106b7d96abcc06308e1d1b23 | 76b46396b6915e21d65e1ad0fbc8786d6f15b122 | refs/heads/master | 2021-10-10T16:32:09.942377 | 2019-01-13T22:37:44 | 2019-01-13T22:37:44 | 115,758,610 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,923 | py | from decimal import Decimal, getcontext
from django.db import models
from django.db.models import Sum
from django.contrib.auth import get_user_model
from django.utils.functional import cached_property
from webstore.product.models import Product
User = get_user_model()
class CartManager(models.Manager):
def ge... | [
"[email protected]"
] | |
a66986685895e6214469af6309e06d1c7e0e0654 | 3a891a79be468621aae43defd9a5516f9763f36e | /desktop/core/ext-py/Django-1.11/tests/urlpatterns_reverse/test_localeregexprovider.py | 401e9a1ad03f556c6b498ceba120ce6877d00bb2 | [
"BSD-3-Clause",
"Python-2.0",
"Apache-2.0"
] | permissive | oyorooms/hue | b53eb87f805063a90f957fd2e1733f21406269aa | 4082346ef8d5e6a8365b05752be41186840dc868 | refs/heads/master | 2020-04-15T20:31:56.931218 | 2019-01-09T19:02:21 | 2019-01-09T19:05:36 | 164,998,117 | 4 | 2 | Apache-2.0 | 2019-01-10T05:47:36 | 2019-01-10T05:47:36 | null | UTF-8 | Python | false | false | 2,478 | py | from __future__ import unicode_literals
import os
from django.core.exceptions import ImproperlyConfigured
from django.test import SimpleTestCase, mock, override_settings
from django.urls import LocaleRegexProvider
from django.urls.resolvers import LocaleRegexDescriptor
from django.utils import translation
from django... | [
"[email protected]"
] | |
4750561ea9d7788e3f16bfbe1c96adc5a4de2664 | 4d892dc51e2dda0fcce246ac608fc4e0ce98c52b | /FirstStepsInPython/Basics/Lab2 Conditional Statements/06.AreaOfFigures.py | 1f9ae6a548d4270bf0e1a3d28da1d38717d4e372 | [
"MIT"
] | permissive | inovei6un/SoftUni-Studies-1 | 510088ce65e2907c2755a15e427fd156909157f0 | 3837c2ea0cd782d3f79353e61945c08a53cd4a95 | refs/heads/main | 2023-08-14T16:44:15.823962 | 2021-10-03T17:30:48 | 2021-10-03T17:30:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | from math import pi
figure = input()
a = str("square")
b = str("rectangle")
c = str("circle")
d = str("triangle")
if figure == a:
side = float(input())
print(side * side)
elif figure == b:
side_a = float(input())
side_b = float(input())
print(side_a * side_b)
elif figure == c:
rad = float... | [
"[email protected]"
] | |
71464c227b83bec13b1cda37a74689e9e64c894d | 7b5c1352e1a4fb8352161cc135bfd1225a633828 | /2017-cvr-tencent-final/src/ffm_gbdt/evaluate.py | eff22cd6da75a597c9be09fbed629e6051ba6cfe | [] | no_license | zgcgreat/2017-cvr-tencent | b7f54ae8df55fbb30f2430f695a148844982aa3a | fe79d0756bbf862d45e63e35b7c28da8396bcbda | refs/heads/master | 2021-04-03T08:32:33.651705 | 2018-07-17T08:36:53 | 2018-07-17T08:36:53 | 124,724,199 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,248 | py | # _*_ coding: utf-8 _*_
import sys
from csv import DictReader
from sklearn.metrics import accuracy_score
from sklearn.metrics import f1_score
from sklearn.metrics import log_loss
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.metrics import roc_auc_score
data_path ... | [
"[email protected]"
] | |
ac538fcd79a7e716accd2aa0b73d989b81b002af | 12123592a54c4f292ed6a8df4bcc0df33e082206 | /py3/pgms/sec4/Circle.py | fa62fb9969f45e1a99a84b59831899e078e263fc | [] | no_license | alvinooo/advpython | b44b7322915f832c8dce72fe63ae6ac7c99ef3d4 | df95e06fd7ba11b0d2329f4b113863a9c866fbae | refs/heads/master | 2021-01-23T01:17:22.487514 | 2017-05-30T17:51:47 | 2017-05-30T17:51:47 | 92,860,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | # Circle.py - Circle module
import math
class Circle(object):
def __init__(self, radius=1):
self.__radius = radius
def getRadius(self): return self.__radius
def circum(self): return 2 * math.pi * self.__radius
def area(self): return math.pi * self.__radius ** 2
def __str__(self):
... | [
"[email protected]"
] | |
c5ea92fa5595fba5d666432acdda222cf54fe4cb | 5fe72bb13baf3649058ebe11aa86ad4fc56c69ed | /hard-gists/1f66e4d58074d64c8268/snippet.py | a669f0ac17f9e738398c8f61266bb602ed43eb70 | [
"Apache-2.0"
] | permissive | dockerizeme/dockerizeme | 8825fed45ff0ce8fb1dbe34959237e8048900a29 | 408f3fa3d36542d8fc1236ba1cac804de6f14b0c | refs/heads/master | 2022-12-10T09:30:51.029846 | 2020-09-02T13:34:49 | 2020-09-02T13:34:49 | 144,501,661 | 24 | 20 | Apache-2.0 | 2022-11-21T12:34:29 | 2018-08-12T21:21:04 | Python | UTF-8 | Python | false | false | 1,223 | py | import argparse
import urllib.request
import os
import img2pdf
from os import walk
from os.path import join
from bs4 import BeautifulSoup
work_dir = os.path.dirname(__file__)
def download_images(url):
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html)
title = 'pdf_images' # soup.title... | [
"[email protected]"
] | |
4120f2826dcf9ed8b34f5ccdbaa5e04098ba005c | 1677eaad65da601a3ac34bd6648c973ffd23c5a9 | /test/test_recipients_api.py | 3649e01a51dd5da0c43ad32857deb08372c0acba | [] | no_license | jeffkynaston/sdk-spike-python | dc557cc1557387f8a126cd8e546201d141de535e | f9c65f578abb801ffe5389b2680f9c6ed1fcebd3 | refs/heads/main | 2023-07-10T00:58:13.864373 | 2021-08-05T21:38:07 | 2021-08-05T21:38:07 | 393,175,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,403 | py | """
Plastiq Public API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import unittest
import openapi_client
from openapi_client.api.r... | [
"[email protected]"
] | |
bdfab790143c4ba126b8efec958c5486207c0a99 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf.0/gsn-edf_ut=3.5_rd=0.5_rw=0.06_rn=4_u=0.075-0.325_p=harmonic-2/sched=RUN_trial=93/params.py | 278fd438e6fdf9246abe78754f18f7426f4fa985 | [] | 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 | 254 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.543786',
'max_util': '3.5',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.06',
'scheduler': 'GSN-EDF',
'trial': 93,
'utils': 'uni-medium-3'}
| [
"[email protected]"
] | |
2f71ff7ba4d2e8f7e6ddba2ab05056646a76a884 | e669b3fe7da2698da4ce02e98325ce154d2aa546 | /swaps/utils/api_signature_v2.py | 63401bc3ab76d3f913b31820716826a8895d2d7b | [
"Apache-2.0"
] | permissive | marcellinamichie291/cash_carry_leveraged_futures_arbitrageur | 0834a911fdd6c9f1462f6f2f59926f715fc51461 | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | refs/heads/main | 2023-03-16T18:35:28.730554 | 2020-12-04T07:46:13 | 2020-12-04T07:46:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,850 | py | import base64
import hashlib
import hmac
import datetime
from urllib import parse
import urllib.parse
from swaps.exception.huobi_api_exception import HuobiApiException
def create_signature_v2(api_key, secret_key, method, url, builder):
if api_key is None or secret_key is None or api_key == "" or secret_key == "":... | [
"[email protected]"
] | |
0014e1e799b36fa9daf5f3be780340dca0a2ac61 | 974d04d2ea27b1bba1c01015a98112d2afb78fe5 | /test/legacy_test/test_sparse_isnan_op.py | b807e6ba624452c55d74e668f661008d194d7a44 | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle | b3d2583119082c8e4b74331dacc4d39ed4d7cff0 | 22a11a60e0e3d10a3cf610077a3d9942a6f964cb | refs/heads/develop | 2023-08-17T21:27:30.568889 | 2023-08-17T12:38:22 | 2023-08-17T12:38:22 | 65,711,522 | 20,414 | 5,891 | Apache-2.0 | 2023-09-14T19:20:51 | 2016-08-15T06:59:08 | C++ | UTF-8 | Python | false | false | 3,150 | py | # Copyright (c) 2023 PaddlePaddle 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 appli... | [
"[email protected]"
] | |
8cb3839fefedd518307f93a56d09d5034b97b681 | 472661f4a0094ce070ed9702da1d2e3e55f7cbe7 | /data/io/convert_data_to_tfrecord_voc2012.py | e8bf49e6fc5c81a9acab30099d5e87774e780eee | [
"MIT"
] | permissive | hasan-mh-aziz/RetinaNet_Tensorflow | 917612d4d58308b8c8444a650e4c43eef291c722 | d5d1103243816506f96d36f41f1fb0b56eeefcc1 | refs/heads/master | 2020-07-31T01:45:20.002881 | 2019-05-26T11:00:56 | 2019-05-26T11:00:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,125 | py | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import sys
sys.path.append('../../')
import xml.etree.cElementTree as ET
import numpy as np
import tensorflow as tf
import glob
import cv2
from tqdm import tqdm
from libs.label_name_dict.label_dict import *
from help_utils.tools i... | [
"[email protected]"
] | |
1f07aa448ad1e6d68b20ec4e9f8479fc2df38a6e | ea04557e60fa600a19a2a47da78b0407cf7b3e17 | /cms/cms/doctype/module_menu/test_module_menu.py | 98c73da43b1ce3e1454a24e9870fea7408ac2018 | [
"MIT"
] | permissive | Nirchains/f-cms | ea5b5d09e492a0c3d6691b90454b01720894fc03 | 8cefaad087994ca3dad0b1c5fadb250904cdd2cb | refs/heads/master | 2021-07-19T06:26:10.804498 | 2020-02-10T12:02:00 | 2020-02-10T12:02:00 | 167,004,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Pedro Antonio Fernández Gómez and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestModulemenu(unittest.TestCase):
pass
| [
"[email protected]"
] | |
1722fd154551780247f251986b64cf22acbcd063 | 15c9450e30742cfaad5d5ce88e86ff29749af975 | /training/isotropic/train_auto_2stage.py | 6f02f81ae96c2a869392b0a50364775ef77882e9 | [
"BSD-2-Clause"
] | permissive | constantinpape/CNNectome | 4e4ed3987c7934c3f378f0758c5c545b4ea1ed54 | 102758cabd4bf9c149b9867709b0a8bea9222438 | refs/heads/master | 2021-04-15T13:10:17.213845 | 2018-03-09T20:47:21 | 2018-03-09T20:47:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,230 | py | from __future__ import print_function
from gunpowder import *
from gunpowder.tensorflow import *
from training.gunpowder_wrappers import prepare_h5source
import malis
import os
import math
import json
import tensorflow as tf
def train_until(max_iteration, data_sources):
if tf.train.latest_checkpoint('.'):
... | [
"[email protected]"
] | |
4df487dabf6fc57d7a08692f301529248de7184c | bdff6688cee79226723fbcf9980c3757a55651b7 | /algorithms/implementation/library_fine.py | c8265f6a9940b9b3618fc90b84b5b0ccf7ae488c | [] | no_license | kruthar/hackerrank | 1f151203c8f26c033585f30d2cf69a2b22dcaf71 | ef81b2aa41a678ad6b0692f933f438a62b1d6b64 | refs/heads/master | 2016-08-10T07:15:19.165058 | 2016-02-26T17:48:58 | 2016-02-26T17:48:58 | 49,286,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 569 | py | import sys
import datetime
actual = map(int, sys.stdin.next().strip().split(" "))
expected = map(int, sys.stdin.next().strip().split(" "))
actual_date = datetime.date(actual[2], actual[1], actual[0])
expected_date = datetime.date(expected[2], expected[1], expected[0])
diff = actual_date.toordinal() - expected_date.t... | [
"[email protected]"
] | |
98f5338c30e8cc19a51612f76bb8ba0ad89b8674 | fb54704d4a6f9475f42b85d8c470e3425b37dcae | /medium/ex402.py | 70e030c095d74e75664d2cab7759e72aad5eef4e | [] | no_license | ziyuan-shen/leetcode_algorithm_python_solution | b2784071a94b04e687fd536b57e8d5a9ec1a4c05 | 920b65db80031fad45d495431eda8d3fb4ef06e5 | refs/heads/master | 2021-06-27T05:19:47.774044 | 2021-02-04T09:47:30 | 2021-02-04T09:47:30 | 210,991,299 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 568 | py | from collections import deque
class Solution:
def removeKdigits(self, num: str, k: int) -> str:
if len(num) == k:
return "0"
q = deque([0])
for i in range(1, k + 1):
while q and num[i] < num[q[-1]]:
q.pop()
q.append(i)
ans = str(num... | [
"[email protected]"
] | |
d0b2fdbcbc1ba73c2421753c096f41008cea2e13 | 61050d0d7f0c0a60474e4e85d30be4e5ea7c6b04 | /vnf/dom/scattering_kernels/IsotropicElasticKernel.py | 7416c4fba85409320daab5dcb70dafe5be561ba0 | [] | no_license | danse-inelastic/vnf | 8173f06f32b4a2fa2b71fddfe0fecf9c19e05e9a | be989448577f14f424aca4ce852c7198304ca57b | refs/heads/master | 2021-01-22T01:06:00.294100 | 2015-05-02T23:25:45 | 2015-05-02T23:25:45 | 34,947,878 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,183 | py | # -*- Python -*-
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | [
"[email protected]"
] | |
2a8d5dcb4c882246f14bbb1b9d05dfd6ac54fd4a | 1cc8ecb740cb5550016bdaf18dab8b2651945ebc | /src/common/helpers/getrequest.py | 9dfcbab4279e3a15c4ccf47d36fd363b48656c94 | [] | no_license | ShipraShalini/BidEngine | 2e1b18c9a93e5be25422e3f521d17763d718c7a7 | a6f28b8de7b0e3d8442f7a5a6ebc06b0b9c19cda | refs/heads/master | 2021-01-10T15:43:20.510985 | 2017-12-12T13:40:43 | 2017-12-12T13:40:43 | 48,623,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | import json
def read_request(request):
user = request.user.get_username()
if request.method == "POST" or request.method == "DELETE" :
data = json.loads(request.body)
item_name = data['item']
try:
amount = data['amount']
except KeyError:
return user, item... | [
"[email protected]"
] | |
7516b196903db3fd1f64e5811a200d7669055a8a | 5f46ffd83e844df8e4aa4d8bd495f2653a924cad | /sessions/week_2/debug_example.py | bea50406ad8b5f1c174190dd63fdca72733e3732 | [] | no_license | mvwettum/basictrack-2020-2021-2b | 33605b48a982f91ac84e19f64218b7b16b164175 | 3967efdb9b67aa07f4168f7358503a94eb1c4444 | refs/heads/master | 2023-04-03T14:50:25.915630 | 2021-04-22T15:54:30 | 2021-04-22T15:54:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | current_time_str = input("What is the current time (in hours 0-23)?")
wait_time_str = input("How many hours do you want to wait")
current_time_int = int(current_time_str)
wait_time_int = int(wait_time_str)
final_time_int = current_time_int + wait_time_int
final_answer = final_time_int % 24
print("The time after wai... | [
"[email protected]"
] | |
d3bc6232292463809ee1b24a4047b595b648e6c6 | 8ef5a09d76a11c56963f18e6a08474a1a8bafe3c | /leet_code/127. Word Ladder.py | e10d37091ad01c1102b61a505f8948cdbf7af7bf | [] | no_license | roiei/algo | 32c4677649c7666db148f6183fbfbf66c8b1969f | ae8bb8bf4ae4026ccaf1dce323b4098547dd35ec | refs/heads/master | 2022-04-01T19:21:27.768675 | 2022-02-19T06:15:29 | 2022-02-19T06:15:29 | 169,021,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,347 | py | import time
from util.util_list import *
from util.util_tree import *
import copy
import collections
from typing import List
class Solution:
def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int:
g = collections.defaultdict(list)
visited = set()
... | [
"[email protected]"
] | |
a8268005cae24a2d3f0293db9ac13fef78c391e0 | 1880e6a98d9c7957414392cad17cec7455ec84f6 | /player71.py | 62eb5f846a08ed9604bdd6eec8848c22d9236e2e | [] | no_license | THABUULAGANATHAN/guviprojects | 613759b96875005175db308f2dfcdecc355d7894 | 9eca3e84d227984c5e7a3a988d55674ec31dcd05 | refs/heads/master | 2022-01-16T17:09:05.390055 | 2019-07-19T12:54:57 | 2019-07-19T12:54:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | n=int(input())
li=[int(i) for i in input().split()]
for i in range(n-1):
if(li[i]<li[i+1]):
print(li[i+1],end=" ")
else:
print(li[i],end=" ")
| [
"[email protected]"
] | |
5d60548f1170918b905f952667c82e95e24761a3 | d0df4037ac7cc1d229058ec46400bdb2c83599fb | /search_in_rotated_sorted_array_ii.py | c3f0fed03cfe683c8848c23429e7f8c015ec5b75 | [] | no_license | TechPuppies/leetcode-python | 470505b4217b54ee9e5a7f559079bf684dd4b5d1 | d3b5ef8ac49ec72213ad7d189f10a2818d7f0a89 | refs/heads/master | 2016-09-15T17:29:05.933313 | 2015-01-06T21:26:46 | 2015-01-06T21:26:46 | 25,418,174 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | # coding=utf-8
# AC Rate: 30.7%
# SOURCE URL: https://oj.leetcode.com/problems/search-in-rotated-sorted-array-ii/
#
# Follow up for "Search in Rotated Sorted Array":
# What if duplicates are allowed?
# Would this affect the run-time complexity? How and why?
# Write a function to determine if a given target is in the a... | [
"[email protected]"
] | |
e41b8aaa05fc038f29ca34d6623ee20b20eee4d9 | 8a8b0267c4db8847a898ac73ccb6e78e1744e24c | /Python_Net_Programming/pnp-ex01/sync/client.py | 828ad8fcea34b0480616031726d433815df0a484 | [] | no_license | entirelymagic/Link_Academy | 41ba890df6793924d186ea94dc8d13b0636c6679 | 844c39ff1281fae8406cd1a0dc06afd357f0bef3 | refs/heads/master | 2023-06-07T03:17:00.527924 | 2021-07-03T09:59:25 | 2021-07-03T09:59:25 | 314,755,255 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | import socket
sClient = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sClient.connect(("localhost",8005))
print("Server said: ", sClient.recv(256).decode("utf-8"))
msg = input("msg: ")
sClient.send(bytes(msg,"utf-8"))
print("Server said: ", sClient.recv(256).decode("utf-8"))
sClient.close() | [
"[email protected]"
] | |
9005c88fe2b68a760c0615bfdf885573b6c96618 | f24d16c0e064d1f77a09cc02217a6dfe9ee39d56 | /pipeline/data_process.py | 90837db91d24a7a228b1eb0243ba1a5a70990875 | [] | no_license | hbradlow/modelbuilder | 92ec5fd92527f6989d43212dd6ffd27abcb4738c | e537fb37f7331bf50e0ea849bc097b996dbfdbdd | refs/heads/master | 2020-05-20T00:17:37.352732 | 2012-11-13T23:44:11 | 2012-11-13T23:44:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,339 | py | import numpy as np
import scipy
import math
from matplotlib.patches import FancyArrowPatch
from mpl_toolkits.mplot3d import proj3d
class Arrow3D(FancyArrowPatch):
"""
An arrow object for a matplotlib 3d plot.
Code from http://stackoverflow.com/questions/11140163/python-matplotlib-plotting-... | [
"[email protected]"
] | |
9ed43354fe92a243dd52ae9e8338df41be2e2346 | 58df224689ab08c99359b1a6077d2fba3728dc61 | /lamda-ocr/merge-files/borb/toolkit/diff/pdf_diff.py | 86117069066e1f49a4c64f9246aec7c34fa2a4c9 | [] | no_license | LIT-Midas/LITHackathon | 2b286728c156d79d3f426f6d19b160a2a04690db | 7b990483dd48b91cf3ec3452b78ab67770da71af | refs/heads/main | 2023-08-13T05:22:59.373965 | 2021-08-16T01:09:49 | 2021-08-16T01:09:49 | 395,024,729 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,022 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This class was meant to perform a dictionary/array level comparison of PDF documents.
It makes it a lot easier to debug problems.
"""
import typing
from borb.io.filter.stream_decode_util import decode_stream
from borb.io.read.types import Decimal, Dictionary, ... | [
"[email protected]"
] | |
cf6f57b4c05d78d82369ca1c29ef07844bdec546 | 2d98f950a9bc701b360e3fd807bb07b85edabee9 | /9/认识爬虫-课件-v1/Py爬虫课件/15/example-project/example/pipelines.py | 4db113535b1e543050b79319adff4a9e45c4bba5 | [] | no_license | Ran-oops/python_notes2 | eaf3e98ee460d0d63d2bf8881cacd10916baa902 | 3a1bf86a803c716f4ef4aeec53a69ebb3662cf49 | refs/heads/master | 2020-11-30T15:40:53.850721 | 2019-12-28T05:22:49 | 2019-12-28T05:22:49 | 230,429,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/topics/item-pipeline.html
from datetime import datetime
class ExamplePipeline(object):
def process_item(self, item, spider):
item["crawled"] = datetime.utcnow() # 获取utc时间
... | [
"[email protected]"
] | |
81fb2fce5bc257958679a04b84d127ffaecb919c | c9afaf387faf7c478e860f4ab5f087b254b5b87f | /main.py | b864b06dab49d5e7afad121326acdff0184725b9 | [] | no_license | INNFINITEMINDS/FitzHugh-Nagumo-Neuron-Model | e3a5c7b7187fe77e575f96c955cb4253d00bf4fb | b1afb1745e3773c1ff7913a12ed98679094f0c2c | refs/heads/master | 2022-12-19T17:41:06.466021 | 2020-10-20T10:51:01 | 2020-10-20T10:51:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,582 | py | import numpy as np
from src.model import FNNeuron
import os
from tqdm import tqdm
import matplotlib.pyplot as plt
from scipy.fft import fft
from scipy import signal
def exp1():
exp_plot_dir = 'images/exp1'
dt = 0.001
niter = int(10e4)
b = 0.25
I_ext = 0.1
fn = FNNeuron(
dt,
nit... | [
"[email protected]"
] | |
06a47fd3f3d748fea890d46dfe910447204d0544 | 0db19410e9751790af8ce4a0a9332293e379c02f | /mmpose/models/heads/heatmap_heads/__init__.py | b482216b36f61ceb66aae8974ae178a8455d5022 | [
"Apache-2.0"
] | permissive | open-mmlab/mmpose | 2c9986521d35eee35d822fb255e8e68486026d94 | 537bd8e543ab463fb55120d5caaa1ae22d6aaf06 | refs/heads/main | 2023-08-30T19:44:21.349410 | 2023-07-04T13:18:22 | 2023-07-04T13:18:22 | 278,003,645 | 4,037 | 1,171 | Apache-2.0 | 2023-09-14T09:44:55 | 2020-07-08T06:02:55 | Python | UTF-8 | Python | false | false | 373 | py | # Copyright (c) OpenMMLab. All rights reserved.
from .ae_head import AssociativeEmbeddingHead
from .cid_head import CIDHead
from .cpm_head import CPMHead
from .heatmap_head import HeatmapHead
from .mspn_head import MSPNHead
from .vipnas_head import ViPNASHead
__all__ = [
'HeatmapHead', 'CPMHead', 'MSPNHead', 'ViPN... | [
"[email protected]"
] | |
ded383f66dbaa90059ccca1ab9639a978ad264f9 | 78db5bc74181173f2d00bea409997a64b4682adf | /venv/lib/python3.9/site-packages/pip/_vendor/chardet/euctwprober.py | 7dbc136e80b7e704891fc4fdde70bb8b6d72ba56 | [
"MIT"
] | permissive | CiscoDevNet/meraki-code | dfe680f077ebd053a3b663f1434f648f5a91b541 | d031aab82e3fa5ce7cf57b257fef8c9a4c63d71e | refs/heads/master | 2023-05-28T18:43:28.848983 | 2022-04-11T19:45:19 | 2022-04-11T19:45:19 | 188,288,487 | 67 | 60 | MIT | 2023-05-23T00:51:58 | 2019-05-23T18:43:15 | Python | UTF-8 | Python | false | false | 1,793 | py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
... | [
"[email protected]"
] | |
36024e8c09241fb2a5405711eeb21edb7a07e067 | 60eb98538025c61cf94a91f6c96f9ee81dcd3fdf | /monai/handlers/confusion_matrix.py | 368aacc6cbe04f1ed17742b90b4cd21c7b41fda1 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | gagandaroach/MONAI | 167e7746995d4b6136731881e22ad4df333b16a9 | 79b83d9fac41efae9b90ed2f9ad078d6d664bf64 | refs/heads/master | 2023-06-02T19:54:47.737846 | 2021-06-24T18:34:02 | 2021-06-24T18:34:02 | 270,741,899 | 0 | 0 | Apache-2.0 | 2020-06-08T16:29:32 | 2020-06-08T16:29:31 | null | UTF-8 | Python | false | false | 3,205 | py | # Copyright 2020 - 2021 MONAI Consortium
# 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 to in wri... | [
"[email protected]"
] | |
1de3d74ecc579a3482423f8897072d74c418249d | e8ae11e5017507da59e2e92d423b6a1994490de4 | /env/lib/python2.7/site-packages/azure/mgmt/network/models/virtual_network.py | d04dbdddf6025303d691acc85256825d49980cec | [] | no_license | teopeurt/ansible-ubuntu-server | 613d00cea28bc6531acf4a39aeeb9cd0baa2a391 | b5b6127d2ee9723c5088443efe2ffb8ae30cfea7 | refs/heads/master | 2021-06-28T12:49:50.935753 | 2017-07-31T17:34:33 | 2017-07-31T17:34:33 | 98,912,808 | 0 | 1 | null | 2020-07-24T00:05:31 | 2017-07-31T17:32:56 | Makefile | UTF-8 | Python | false | false | 3,797 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft and contributors. 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 co... | [
"[email protected]"
] | |
1124f2ed2301c3d86e4644f9b6d42729ac140055 | 19a5937501ff40d53b69617d6b05484c2861c54b | /apps/urls.py | 212155a4226cd217323270aab6a2cd9abf0d642c | [] | no_license | pombredanne/abyss | 44319541f614669861157955b5d4059fcf3f8aad | 8de3f2438ad74ad4d2703ce0bb7ccf7672423820 | refs/heads/master | 2020-12-29T19:03:52.168087 | 2013-09-16T13:48:28 | 2013-09-16T13:48:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 944 | py | from django.conf.urls import patterns, url
from apps import views
urlpatterns = patterns(
'',
url(r'^$', views.ListApp.as_view(), name='list-app'),
url(r'^create/$', views.CreateApp.as_view(), name='create-app'),
url(r'^run/$', views.Run.as_view(), name='run'),
url(r'^(?P<app_name>[\w-]+)/$',
... | [
"[email protected]"
] | |
d6461e3ed1fa74dfbabee2a0c0d5db2f1b055f26 | c9287937c4d7900d311640a2b16c08c42eedfe58 | /tensorflow/python/distribute/mirrored_function_strategy.py | bbe52984d1eff41f9c4d304dfe927d7e70cfaddd | [
"Apache-2.0"
] | permissive | Purplme/tensorflow | e868e9bf59cc8eb680f1c35bf0b8615ec2b68c62 | d2d6c3f07a0b874e64a024c767deb7c9fb39b704 | refs/heads/master | 2022-11-23T23:38:00.243591 | 2020-07-16T06:20:19 | 2020-07-16T06:25:23 | 280,074,885 | 2 | 0 | Apache-2.0 | 2020-07-16T06:39:14 | 2020-07-16T06:39:13 | null | UTF-8 | Python | false | false | 7,594 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"[email protected]"
] | |
d29f0e7212d54245a016a4c1738e9a56780420ae | f82c474bd7d5f60d976b14432a9f20d5e561ca4c | /low_level/tensors/E01_eval_tensors.py | 4c5de2fabfddd42b36d5709c324d61965ec7b948 | [] | no_license | GlassyWing/tf-learn | 1065551e27adf8a3f2b05e540e52d820e6b931d6 | 6733ac86cda430ecce13c8694c8bdfb79e8b70ad | refs/heads/master | 2020-03-27T05:52:51.466385 | 2018-09-03T12:58:54 | 2018-09-03T12:58:54 | 146,059,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | import tensorflow as tf
constant = tf.constant([1, 2, 3])
tensor = constant * constant
sess = tf.Session()
with sess.as_default():
print(tensor.eval())
| [
"[email protected]"
] | |
6734850359cb4971c5ffeac81b4d804ea15b9c6a | b8faf65ea23a2d8b119b9522a0aa182e9f51d8b1 | /vmraid/website/page_renderers/not_permitted_page.py | 7acaf0baaf57f3b618f32d9267e2b99aa555c797 | [
"MIT"
] | permissive | vmraid/vmraid | a52868c57b1999a8d648441eb9cd05815204345d | 3c2e2a952003ba7ea2cf13673b9e79e127f4166e | refs/heads/main | 2022-07-29T18:59:28.585133 | 2022-04-22T08:02:52 | 2022-04-22T08:02:52 | 372,473,120 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | py | import vmraid
from vmraid import _
from vmraid.utils import cstr
from vmraid.website.page_renderers.template_page import TemplatePage
class NotPermittedPage(TemplatePage):
def __init__(self, path=None, http_status_code=None, exception=""):
vmraid.local.message = cstr(exception)
super().__init__(path=path, http_s... | [
"[email protected]"
] | |
f1efb7f4fea5ef7e9421f004aabccd95b303d845 | b345171a3968240caf135b8b9f2780324319cb22 | /__init__.py | 98b9499ad471ceefd2c1cd32ad977467eaff0937 | [] | no_license | pytsite/plugin-auth_google | ecd8bb9b8a2d59ed1fe1eb3515d2079b4359f03b | f22c90ac560d25c839db9b94cee6339e8681f299 | refs/heads/master | 2020-06-18T21:43:35.932709 | 2019-07-12T09:41:45 | 2019-07-12T09:41:45 | 74,938,727 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 422 | py | """PytSite Google Authentication Driver Plugin
"""
__author__ = 'Oleksandr Shepetko'
__email__ = '[email protected]'
__license__ = 'MIT'
# Public API
from . import _error as error
from ._api import get_client_id, get_authorization_url, get_client_secret, get_user_credentials, create_oauth2_flow
def plugin_load_wsgi():
... | [
"[email protected]"
] | |
211e94253365bf19b8a5e01da1a514175bac390e | 4df948c31bde1b49c110820ecf8a38f949a78f62 | /vta/python/vta/pkg_config.py | 30b4808f5e2d8976d70677e197960aa94182db4d | [
"Apache-2.0"
] | permissive | jroesch/tvm | 40b4b8707177e3354c264ce31092721930ced376 | c2b36154778503a509a70a3b5309b201969eccab | refs/heads/master | 2021-12-19T03:38:13.732405 | 2018-10-22T16:31:59 | 2018-10-22T16:31:59 | 135,759,537 | 4 | 7 | Apache-2.0 | 2021-06-17T07:22:42 | 2018-06-01T20:15:33 | C++ | UTF-8 | Python | false | false | 2,677 | py | """VTA Package configuration module
This module is dependency free and can be used to configure package.
"""
from __future__ import absolute_import as _abs
import json
import glob
class PkgConfig(object):
"""Simple package config tool for VTA.
This is used to provide runtime specific configurations.
Pa... | [
"[email protected]"
] | |
f4c54df91cedb4ab534312995cd85ac41bb8b565 | d4bcb9cc3b6aa9f690be59f630778d512882d34d | /ht/conv_jacket.pyi | 237e03450cf918d66fad5744e2f420949830a545 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CalebBell/ht | ba31cd9a7a2b3cb83599770c81b343ea5c60fc23 | d9385d98311debcc47def7f5fc093f2e0152d059 | refs/heads/master | 2023-08-03T10:45:09.062053 | 2023-07-25T05:36:50 | 2023-07-25T05:36:50 | 48,963,057 | 154 | 38 | MIT | 2023-04-20T01:39:50 | 2016-01-03T22:33:12 | Python | UTF-8 | Python | false | false | 810 | pyi | # DO NOT EDIT - AUTOMATICALLY GENERATED BY tests/make_test_stubs.py!
from typing import List
from typing import Optional
def Lehrer(
m: float,
Dtank: float,
Djacket: float,
H: float,
Dinlet: float,
rho: float,
Cp: float,
k: float,
mu: float,
muw: Optional[float] = ...,
isob... | [
"[email protected]"
] | |
7744da668bfa14a29636e0a5e6d816ccf32ea932 | ffc479dadf059388dad3a66c5f4662b113dc6285 | /basics/psdemospliut.py | aae2237e7becdf9c66bfabf64d9db3040c555452 | [] | no_license | ravijaya/oct15-2020 | fd87ee4f6aa7f0a63c77c8c470405eff479289b3 | 4fe4d4f2aac1f40349cec831c175652834b17b5d | refs/heads/main | 2022-12-29T09:45:08.837682 | 2020-10-15T12:31:09 | 2020-10-15T12:31:09 | 304,318,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | s = 'root:x:0:0:root:/root:/bin/bash'
items = s.split(':')
print(items)
print()
print(s.split(':')[0]) # indexing
print()
print(s.split(':')[1:]) # slicing
print()
# iterator
for item in s.split(':')[1:]: # iteration
print(item) | [
"[email protected]"
] | |
94c538986256e0c9b56cfb18d0def97857f7224a | 3006ba184fd85d9bfe64a2040683618d7aa24e54 | /paylogic/settings_base.py | fb3a17cdd1544a5df7dd2096072c1f69f5589c59 | [
"Apache-2.0"
] | permissive | esjee/codereview | 909ca5ecff6b5436b023c5e4e6872366db1a0c3f | a8fc0e0b51be18db387b8b915aeda3f63e37c04f | refs/heads/master | 2021-01-24T03:49:09.315286 | 2014-07-14T11:50:52 | 2014-07-14T11:50:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,616 | py | """Django settings for django_gae2django project."""
# NOTE: Keep the settings.py in examples directories in sync with this one!
# from settings import *
import re
import os
import statsd
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Admin'... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.