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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6abe0bee3a06fab69de5f3271544996e2c44bdba | 1c1f8e6e66dad142d35c88710d52b25d6e0640c6 | /tests/inventory/test_macos_apps_views.py | 765458fba224a26a3e12594b44e0465091fe4957 | [
"Apache-2.0"
] | permissive | ChefAustin/zentral | 4a5190434f9010f71385bff4c2b6f02120b651ed | 1749eeb2a0c727d3bff7a3b893158c6fe36e9d9c | refs/heads/main | 2023-01-23T00:52:12.417530 | 2020-12-03T07:41:36 | 2020-12-03T07:41:36 | 318,111,990 | 1 | 0 | Apache-2.0 | 2020-12-03T07:33:27 | 2020-12-03T07:33:27 | null | UTF-8 | Python | false | false | 6,759 | py | from datetime import datetime
from django.urls import reverse
from django.utils.http import urlencode
from django.test import TestCase, override_settings
from zentral.contrib.inventory.models import MachineSnapshotCommit
from accounts.models import User
@override_settings(STATICFILES_STORAGE='django.contrib.staticfil... | [
"eric.falconnier@112hz.com"
] | eric.falconnier@112hz.com |
a3c79f13e09b4df0d392ba14bcce693c8a8e0004 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/scaleform/daapi/view/lobby/header/BattleTypeSelectPopover.py | 17cc2c813eae3014346e7d39c69d740d4c574aec | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 4,906 | py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/header/BattleTypeSelectPopover.py
from adisp import process
from frameworks.wulf import WindowLayer
from gui.Scaleform.daapi.settings.views import VIEW_ALIAS
from gui.Scaleform.daapi.view.lobby.header ... | [
"StranikS_Scan@mail.ru"
] | StranikS_Scan@mail.ru |
8924fe0c6f40a20395b0789d49f31baaa30cc805 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /5S97Me79PDAefLEXv_17.py | c79aeef96fef03d2d9fb182f6d28a6120e6e6907 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py |
def lambda_to_def(code):
eq_index = code.index("=")
sem_index = code.index(":")
lambda_index = code.index("lambda")
try:
secound_sem = code.index(":",sem_index+1)
except ValueError:
secound_sem = None
if secound_sem != None:
if code[secound_sem+1] != "'": sem_index = se... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
5f49a46cba72f2d75b3f06ab89300e953baf3963 | b75a259624cd91c75d584b9f9548a2b7e179a81f | /models/LSTM_Classifier.py | 83a458cfc4d9ca4942586f6f0e1d74485a9dbd0a | [] | no_license | lucaskingjade/Classification | 911f73b8ec037d9f560065aa71116650c128d721 | 506c036c141df5eee69a5f84672f9635e0ad242b | refs/heads/master | 2021-01-20T06:43:26.815927 | 2017-06-02T07:58:54 | 2017-06-02T07:58:54 | 89,916,858 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,574 | py | #This is a simple implementation of LSTM
from keras.layers import Input,Embedding,RepeatVector,Reshape,LSTM,merge,Dense
from keras.models import Model
from keras.optimizers import SGD,RMSprop
def lstm_model(max_len=200,dof=70,embd_dim=2,
hidden_dim_list=[100,20],activation_list=['tanh','tanh'],
... | [
"wangqi531@hotmail.com"
] | wangqi531@hotmail.com |
eaf7a34c14cd4e1b28388a48ae0963692d9f010e | afebbb07b2b4eada17a5853c1ce63b4075d280df | /marketsim/gen/_out/orderbook/_VolumeLevels.py | b906b3b76b1fa1729242c7a4bbcd934491c3730f | [] | no_license | peter1000/marketsimulator | 8c0a55fc6408b880311d3ad49defc55e9af57824 | 1b677200a9d5323f2970c83f076c2b83d39d4fe6 | refs/heads/master | 2021-01-18T01:39:04.869755 | 2015-03-29T17:47:24 | 2015-03-29T17:47:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,579 | py | # generated with class generator.python.intrinsic_observable$Import
from marketsim import registry
from marketsim.gen._out._observable._observableivolumelevels import ObservableIVolumeLevels
from marketsim.gen._out._ivolumelevels import IVolumeLevels
from marketsim.gen._intrinsic.orderbook.volume_levels import VolumeLe... | [
"anton.kolotaev@gmail.com"
] | anton.kolotaev@gmail.com |
3e99befc5438312e713a1e78d14e1bc4f6d79697 | f9c98f9c127fa1cd9fba17abe17199fb5440b36b | /md_rahaman/python/full_stack_django/dojo_secret/apps/dojo_secret_app/migrations/0001_initial.py | 8a6981c5b5c67aeb2eb76efcddae0dfeca2b27b1 | [] | no_license | RibRibble/python_april_2017 | 162e543f97afc77d44fcc858106e4730d3f7f760 | 3cc4240d371a8bad8da2ea085e3675272cca2de3 | refs/heads/master | 2021-01-19T01:12:34.667828 | 2017-04-27T22:11:53 | 2017-04-27T22:11:53 | 87,233,010 | 1 | 0 | null | 2017-04-04T20:41:44 | 2017-04-04T20:41:44 | null | UTF-8 | Python | false | false | 1,758 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-04-20 21:41
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | [
"soikatesc@gmail.com"
] | soikatesc@gmail.com |
b6b21288b2195932f2a24c5efb924383b55353da | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /2iQhC3t4SDZ6LGMWw_20.py | 495d30cd14904c8d1eb8876a74a2a751502893ec | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 764 | py | """
Given a list of 2D points `[x, y]`, create a function that returns `True` if
those points can be on the _bounds_ of a rectangle, `False` otherwise.

### Examples
on_rectangle_bounds([[0, 1], [1, 0], [1, 1], [0, 0]]) ➞ True
on_rectangle_bo... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
4397382269e0dec61503218124ea7997ba367489 | 0bcab6ea00eeb88516c218604d96c9cfc9ea5642 | /cs212-docp/07-18.py | 1a3dfb413c3c95e0814933cab7a4d0d8af72b932 | [] | no_license | alexchonglian/udacity | c11ffbbdbf19aa4247ec917ec51d3baab1411fa4 | cc3d990542fd1d14574ca42b64ebdd2d31f99d93 | refs/heads/master | 2022-08-28T17:17:10.428118 | 2020-09-10T02:12:40 | 2020-09-10T02:12:40 | 187,312,321 | 0 | 0 | null | 2022-07-29T23:11:54 | 2019-05-18T04:04:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,253 | py | # --------------
# User Instructions
#
# Fill out the function match(pattern, text), so that
# remainders is properly assigned.
def match(pattern, text):
"Match pattern against start of text; return longest match found or None."
remainders = pattern(text)
if remainders:
shortest = min(remainders,... | [
"alexchonglian@gmail.com"
] | alexchonglian@gmail.com |
f6449926a5b1dd8b1dc863a3cf3df671d50dc093 | f47863b3a595cbe7ec1c02040e7214481e4f078a | /plugins/scan/discuz/449.py | 79f9d31a89d3baa6200731d2dbeb750ee717ca15 | [] | no_license | gobiggo/0bscan | fe020b8f6f325292bda2b1fec25e3c49a431f373 | 281cf7c5c2181907e6863adde27bd3977b4a3474 | refs/heads/master | 2020-04-10T20:33:55.008835 | 2018-11-17T10:05:41 | 2018-11-17T10:05:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#__author__ = 'darkkid'
# Name:Discuz! X3 tools
def assign(service, arg):
if service == "discuz":
return True, arg
def audit(arg):
payload = 'source/plugin/tools/tools.php'
verify_url = arg + payload
code, head, res, errcode, _ = curl.curl(verify... | [
"zer0i3@aliyun.com"
] | zer0i3@aliyun.com |
3ec05c59ff77a33bf89d81b92c7d0dac1f34f4f0 | 22da4a564696d905bed0e4f21a1cb724fcadbbcf | /frappe/commands/scheduler.py | af994a5fc4d40ed500e53f051b472ea519e0b85c | [
"MIT"
] | permissive | ektai/erp2Dodock | b96512b112183a71d79c12513216b3fc6dd9293f | 5ad64b01cba9b07437f9a27751101258679379e8 | refs/heads/master | 2023-01-02T14:00:12.701247 | 2020-10-28T07:18:45 | 2020-10-28T07:18:45 | 305,179,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,466 | py | from __future__ import unicode_literals, absolute_import, print_function
import click
import sys
import frappe
from frappe.utils import cint
from frappe.commands import pass_context, get_site
def _is_scheduler_enabled():
enable_scheduler = False
try:
frappe.connect()
enable_scheduler = cint(frappe.db.get_single_... | [
"63931935+ektai@users.noreply.github.com"
] | 63931935+ektai@users.noreply.github.com |
b21593202db3ec2c9fca713de182051eab520cf7 | 01822d2ae38a95edcd188a51c377bb07b0a0c57d | /Notes/Sprint1/MaxMinInt.py | 05aac91498379a492ba180a67bfa4816f3851804 | [
"MIT"
] | permissive | mark-morelos/CS_Notes | bc298137971295023e5e3caf964fe7d3f8cf1af9 | 339c47ae5d7e678b7ac98d6d78857d016c611e38 | refs/heads/main | 2023-03-10T11:56:52.691282 | 2021-03-02T15:09:31 | 2021-03-02T15:09:31 | 338,211,631 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | """
Challenge #10:
Given a string of space separated integers, write a function that returns the
maximum and minimum integers.
Example:
- max_and_min("1 2 3 4 5") -> "5 1"
- max_and_min("1 2 -3 4 5") -> "5 -3"
- max_and_min("1 9 3 4 -5") -> "9 -5"
Notes:
- All inputs are valid integers.
- There will always be at lea... | [
"makoimorelos@gmail.com"
] | makoimorelos@gmail.com |
e48e2e127a3980f24a9bca937240644815c580b0 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /cXfcK7iXpuZ67taSh_6.py | 4967e77250cf5ea5287e57b8266ffdaa52afb031 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 722 | py | """
This is a **reverse coding challenge**. Normally you're given explicit
directions with how to create a function. Here, you must generate your own
function to satisfy the relationship between the inputs and outputs.
Your task is to create a function that, when fed the inputs below, produce the
sample outputs sho... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
db7e523a58f687eac59bf3abe458af25e9ee7bb6 | 06f0ae3ecaaf47b1c23e231838afa524d8446f5e | /contest/migrations/0005_auto_20160321_2239.py | 116551554284e7daca17853af53c60b75e9ed8e3 | [] | no_license | nakamotohideyoshi/draftboard-web | c20a2a978add93268617b4547654b89eda11abfd | 4796fa9d88b56f80def011e2b043ce595bfce8c4 | refs/heads/master | 2022-12-15T06:18:24.926893 | 2017-09-17T12:40:03 | 2017-09-17T12:40:03 | 224,877,650 | 0 | 0 | null | 2022-12-08T00:02:57 | 2019-11-29T15:20:17 | Python | UTF-8 | Python | false | false | 3,517 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('prize', '0006_auto_20160209_2241'),
('draftgroup', '0018_draftgroup_fantasy_points_finalized'),
('sports', '0001_squashed_000... | [
"cbanister@coderden.com"
] | cbanister@coderden.com |
48d33bfa29646585b6db9ca254362c02f141d4cc | e02405f3db787275545f87a23bf7eb3510ddd2f4 | /test_main.py | 4e68d61ebcec6bfcbe8da0934a8fedd93d0a5e41 | [] | no_license | kevlab/flasktaskr_project | a51ca6d62b080fb1fdbe0fb34ad5d7cff36ba329 | 3a3ba1dfbe2571deb7958970d52437abb03b03e7 | refs/heads/master | 2021-01-17T17:07:33.064404 | 2015-06-07T14:38:25 | 2015-06-07T14:38:25 | 33,480,265 | 0 | 0 | null | 2015-04-06T13:25:34 | 2015-04-06T12:10:55 | Python | UTF-8 | Python | false | false | 1,633 | py | import os
import unittest
from project import app, db
from config import basedir
from project.models import User, Task
TEST_DB = 'test.db'
class Alltests(unittest.TestCase):
def setUp(self):
app.config['TESTING'] = True
app.config['WTF_CSRF_ENABLED'] = False
app.config['DEBUG'] = False
... | [
"greenleaf1348@gmail.com"
] | greenleaf1348@gmail.com |
ed9bd818265cb5b56fa0412338d0e74acfdcfc60 | fd390bfa1f471d09cafb72ad85e5143214abf32d | /shakecast/app/orm/migrations.py | 467a024c4ef7ab9b73b5df4072e90f4cf3b5c714 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain-disclaimer"
] | permissive | usgs/shakecast | 0ac6ac955aaff3029b133c4ce9264adc90004d86 | e287d697d93467e5e25c99d27b70754a0a5e6e39 | refs/heads/master | 2023-05-13T09:22:13.001195 | 2022-03-08T03:26:18 | 2022-03-08T03:26:18 | 52,902,913 | 9 | 24 | NOASSERTION | 2023-05-01T22:45:23 | 2016-03-01T19:15:42 | Python | UTF-8 | Python | false | false | 5,320 | py | from sqlalchemy import Column, Integer, String, Float, PrimaryKeyConstraint
############### DB Migrations ################
def migrate_1to2(engine):
'''
Add updated and updated_by columns to keep track of which users
are updating inventory
'''
updated = Column('updated', Integer)
updated_by = C... | [
"dslosky@usgs.gov"
] | dslosky@usgs.gov |
5a3513f9f209d1ef28d755df10e6aa2cfc4607aa | 6f2d5600b65b062151bab88c592796b878de7465 | /InterfaceTest/common/do_mysql.py | 5eac443a50281fb43beeeb98044f8353bb135ad0 | [] | no_license | zhouyanmeng/python_api_test | 1e6549321c20ee9a71beffac2533c917b5ecc157 | 7303352c9b5baacba5296b088f89ba4c702fb485 | refs/heads/master | 2022-12-17T14:34:26.351566 | 2019-03-01T13:02:06 | 2019-03-01T13:02:06 | 185,185,856 | 0 | 0 | null | 2022-12-08T01:45:15 | 2019-05-06T11:45:55 | Python | UTF-8 | Python | false | false | 1,038 | py | import pymysql
class DoMysql:
#完成与sql数据库的交互
def __init__(self):###实例化对象的时候就建立连接
#def connect(self):
host="test.lemonban.com"
user="test"
password="test"
port=3306
self.mysql=pymysql.connect(host=host,user=user,password=password,port=3306)
#self.cursor = self... | [
"2440269710@qq.com"
] | 2440269710@qq.com |
6deb89e092b5b74f23029184b835d8e808de678a | 3b81dfbacf97918d36fb5accbcef0b610378e1a8 | /data-struct/probelm/02-second-try.py | 3a304359cfc1762c450a8f2640ca20afd38eef61 | [] | no_license | XiaoFei-97/the-way-to-python | 11706f0845f56246ba8ea0df8ff34e622bbdad2d | 3667a24f4f4238998e9c6ed42cdc49c68881a529 | refs/heads/master | 2020-03-21T06:46:36.939073 | 2018-06-23T03:51:11 | 2018-06-23T03:51:11 | 138,241,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | #如果a+b+c=1000,且a^2+b^2=c^2(a,b,c为自然数),求出abc所以可能的组合
#运行时间1秒
#
#a = 0
#b = 0
#c = 0
#
import time
#
#start_time = time.time()
#for a in range(1000):
# for b in range(1000):
# for c in range(1000):
# if a+b+c == 1000 and a**2 +b**2 == c**2:
# print("a=%d,b=%d,c=%d"%(a,b,c))
#end_time = ... | [
"jack_970124@163.com"
] | jack_970124@163.com |
f41ff08bfd79dc9007fd2de6edc00cb85adf391a | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/clipseg/__init__.py | 0e2e250e507a811c0f1cbbf45dabf236e1721e4a | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 2,179 | py | # Copyright 2022 The HuggingFace Team. 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 applicabl... | [
"noreply@github.com"
] | huggingface.noreply@github.com |
83003f3e74b140fc689183f6eeb5e495015a3296 | 4e67c2edd71493a98a3f13e5b2073c1d05b1b656 | /Semestre 02/ProjetoIntegrador2/Aula 09.24.2020/aluno_get_set.py | 1569fbeb2a3d0bad8480b29df252044a40f1b2c6 | [] | no_license | felipellima83/UniCEUB | 05991d7a02b13cd4e236f3be3a34726af2dc1504 | dbc44866545b5247d1b5f76ec6e9b7778e54093e | refs/heads/master | 2023-07-08T19:04:19.830473 | 2021-08-12T12:33:49 | 2021-08-12T12:33:49 | 249,958,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,714 | py | ''' UniCEUB - Ciência da Computação - Prof. Barbosa
Atalho de teclado: ctlr <d>, duplica linha. ctrl <y>, apaga linha. ctrl </>, comenta linha
Sintaxe: POO em Python com gets e sets
class NomeClasse (object):
def __init__ (self, p_1, p_2, ...): # Método construtor
self.nome_atributo1 = p_... | [
"felipellima83@gmail.com"
] | felipellima83@gmail.com |
6889f8b569293a0d5a19b7bd90753cd841b53e2d | 5b323fd78bb143667aedd64bc5ce17bc90f82370 | /量化投资书/量化投资以Python为工具/ch14/02.py | cc38019e0cd7e0daf38ee2a7614cb501b91e8e74 | [] | no_license | xiaotfeng/Some-thing-interesting-for-me | 3cbd3c70d0631b5687d5a55cac33bbfc7e4044c0 | 4fdb63376fa421f2aa17e3246a44454f62ca342e | refs/heads/master | 2023-02-04T22:04:03.210810 | 2020-12-29T05:36:37 | 2020-12-29T05:36:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | import numpy as np
import scipy.stats
import pandas as pd
np.random.binomial(100, 0.5, 20)
np.random.binomial(10, 0.3, 3)
scipy.stats.binom.pmf(20, 100, 0.5)
scipy.stats.binom.pmf(50, 100, 0.5)
dd = scipy.stats.binom.pmf(np.arange(0, 21, 1), 100, 0.5)
dd.sum()
scipy.stats.binom.cdf(20, 100, 0.5)
HSRet300 = pd.read_csv... | [
"395871987@qq.com"
] | 395871987@qq.com |
c43d097db7860899069dbeea9d5aab443e90d32d | 4a48593a04284ef997f377abee8db61d6332c322 | /python/scipy/convolution.py | a36f5bc1c66a64d0984fd54a799186fe02f633df | [
"MIT"
] | permissive | jeremiedecock/snippets | 8feaed5a8d873d67932ef798e16cb6d2c47609f0 | b90a444041c42d176d096fed14852d20d19adaa7 | refs/heads/master | 2023-08-31T04:28:09.302968 | 2023-08-21T07:22:38 | 2023-08-21T07:22:38 | 36,926,494 | 26 | 9 | MIT | 2023-06-06T02:17:44 | 2015-06-05T10:19:09 | Python | UTF-8 | Python | false | false | 286 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import scipy.signal
import numpy as np
import matplotlib.pyplot as plt
# The imput signal x
x = np.zeros(100)
x[30:60] = 1.
# ...
y = np.ones(30)
xc = scipy.signal.convolve(x, y)
plt.plot(x)
plt.plot(xc / 30.)
plt.show()
| [
"jd.jdhp@gmail.com"
] | jd.jdhp@gmail.com |
e34519fbbd240b89574559ceabb90d807dc27c96 | 67309cbca4ead3623c86647ac7bfaa067b029fdc | /SWEA/Tree/5176_이진탐색.py | f1a4a1749e5c902773c5aafb4225cbc310b9161b | [] | no_license | Jeukoh/OJ | b6df132927ec15ab816fee8681952240b5a69e13 | 182b54554896d9860d5e5d09f8eccc07d99aa8e8 | refs/heads/master | 2023-08-30T19:18:10.812225 | 2021-10-15T09:57:14 | 2021-10-15T09:57:14 | 402,799,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | import math
def inserttree(idx):
global cnt
if idx <= V:
inserttree(2*idx)
tree[idx] = cnt
cnt += 1
inserttree(2*idx+1)
for tc in range(1,int(input())+1):
V = int(input().rstrip())
tree = [[] for _ in range(V+1)]
cnt = 1
inserttree(1)
print(f'#{tc}', tree... | [
"jeukoh@gmail.com"
] | jeukoh@gmail.com |
d81c9a6c45e667fc3c2e7e5eeb80d0aeb2926124 | ff6248be9573caec94bea0fa2b1e4b6bf0aa682b | /log-20190927/132.230.102.123-10.21.11.31/1569571753.py | b4d079745312f44675d25424b0cf91732161be53 | [] | no_license | LennartElbe/codeEvo | 0e41b1a7705204e934ef71a5a28c047366c10f71 | e89b329bc9edd37d5d9986f07ca8a63d50686882 | refs/heads/master | 2020-12-21T17:28:25.150352 | 2020-03-26T10:22:35 | 2020-03-26T10:22:35 | 236,498,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,074 | py | import functools
import typing
import string
import random
import pytest
## Lösung Teil 1.
def mysum(zs: list) -> int:
return sum(xs)
## Lösung Teil 2. (Tests)
def test_2():
assert mysum([1, 2, 3]) == 6
######################################################################
## hidden tests
pytest.main (["... | [
"lenni.elbe@gmail.com"
] | lenni.elbe@gmail.com |
d87f5492302e50c6f0e7424b27dbb5ec6a5e1d99 | e972d1a5eaf1e82425d0f2ef43147b1a9e817198 | /Examples/Howto/UseFonts/HelloCircleSquare.py | 3157371a905aae8164269e23f04c9e5026cebb41 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | 13-Graphics/PageBot | 86b2ba5f051b2ffaa16ee26da4747b790481ec46 | 8d815cf3fa20eb891d0e5c11253376dbe77b71e6 | refs/heads/master | 2021-09-06T21:36:58.986635 | 2018-02-11T22:21:12 | 2018-02-11T22:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | #!/usr/bin/env python
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens & Font Bureau
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting usage of DrawBot, www.drawbot.com
# ... | [
"fsanches@metamaquina.com.br"
] | fsanches@metamaquina.com.br |
27a23d8d90b5c1ff97590888e4cb48d90f8da8d7 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/hamming/b238090e4c274187a6c3f8eafb85f032.py | 151f1fa976cb89eac830a5420ad3574fe92a6af1 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 130 | py | def distance(strand1, strand2):
dist = 0
for i in range(len(strand1)):
if strand1[i] != strand2[i]:
dist += 1
return dist
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
dcf702d039bf020112bc112189290a6a56115097 | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/insights/v20160301/get_alert_rule.py | e2bb242205dcdb83a87e1935f3e3f51f683543d5 | [
"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 | 5,814 | 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... | [
"public@paulstack.co.uk"
] | public@paulstack.co.uk |
6d3b4f5751fa19cc815f562e1a5788314b5b42fa | 940d7b93fb27e8eead9b6e52bc5c7444666744dd | /python/src/Lib/test/test_sunaudiodev.py | 2c5e7d4a6e0e0efd99a539e114dcbb37ed1addd3 | [
"Apache-2.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Python-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-python-cwi"
] | permissive | pilotx45/sl4a | d446531d310cc17d93f24aab7271a0813e8f628d | 150e3e46b5103a9b9a391034ef3fbc5bd5160d0f | refs/heads/master | 2022-03-24T19:48:30.340479 | 2022-03-08T16:23:58 | 2022-03-08T16:23:58 | 277,016,574 | 1 | 0 | Apache-2.0 | 2022-03-08T16:23:59 | 2020-07-04T01:25:36 | null | UTF-8 | Python | false | false | 678 | py | from test.test_support import findfile, TestFailed, TestSkipped, import_module
sunaudiodev = import_module('sunaudiodev', deprecated=True)
import os
try:
audiodev = os.environ["AUDIODEV"]
except KeyError:
audiodev = "/dev/audio"
if not os.path.exists(audiodev):
raise TestSkipped("no audio device found!")
... | [
"damonkohler@gmail.com"
] | damonkohler@gmail.com |
39b54d8b58c400cac04a9cbea46ae5e0a1b4b85f | 204693758329743d0637c53dbf76a9221620fb4e | /src/products/migrations/0001_initial.py | e4d40ef262bb622d02e388a92278ed77f4a07619 | [] | no_license | dipayandutta/djangoimproveo | 122741224795e58f970439e40112871f331258c2 | 20a19bb61eaa88e6134437f582b0f987a71cd899 | refs/heads/master | 2022-11-11T09:53:21.889847 | 2020-06-29T14:59:49 | 2020-06-29T14:59:49 | 273,153,946 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | # Generated by Django 3.0 on 2020-06-18 16:05
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(au... | [
"inbox.dipayan@gmail.com"
] | inbox.dipayan@gmail.com |
a2725503da8b2935c112ff3ac71d8d6368b1be50 | fb9371054b6ce236c6b202cc51c6bc98a3483060 | /python_20190615/Python网络爬虫与信息提取/BaiduStocks/BaiduStocks/spiders/stocks.py | 02363f2ae2e17bf1cd272dc9bcb77a3e83c09fcb | [] | no_license | skymoonfp/python_learning | 621d5e72c5b356fd507e4a00c463ea8d565588fb | 1e8340303809d8c7c3af3201084b158c1784f22e | refs/heads/master | 2020-06-04T10:07:27.009212 | 2019-06-19T13:52:44 | 2019-06-19T13:52:44 | 191,978,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,796 | py | # -*- coding: utf-8 -*-
import random
import re
import scrapy
class StocksSpider(scrapy.Spider):
name = 'stocks'
allowed_domains = ['baidu.com']
start_urls = ['http://quote.eastmoney.com/stock_list.html']
user_agent_list = [
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like ... | [
"954918@qq.com"
] | 954918@qq.com |
602cd68614e126e6881b023d30d8fa3219b9db34 | 5963c12367490ffc01c9905c028d1d5480078dec | /tests/components/tado/test_config_flow.py | 77656f1c81fd066ab3f22f5e1d614987fc455bd0 | [
"Apache-2.0"
] | permissive | BenWoodford/home-assistant | eb03f73165d11935e8d6a9756272014267d7d66a | 2fee32fce03bc49e86cf2e7b741a15621a97cce5 | refs/heads/dev | 2023-03-05T06:13:30.354545 | 2021-07-18T09:51:53 | 2021-07-18T09:51:53 | 117,122,037 | 11 | 6 | Apache-2.0 | 2023-02-22T06:16:51 | 2018-01-11T16:10:19 | Python | UTF-8 | Python | false | false | 4,912 | py | """Test the Tado config flow."""
from unittest.mock import MagicMock, patch
import requests
from homeassistant import config_entries, setup
from homeassistant.components.tado.const import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from tests.common import MockConfigEntry
def _get_mock_tado... | [
"noreply@github.com"
] | BenWoodford.noreply@github.com |
7ecd0ab348fff8b275e8175146fd946a9f3c5919 | 3e5150447a2c90c26354500f1df9660ef35c990b | /std_modules/plistlib/.readPlist() | 91b219cacac94b718cb81c036acd8ba166b04078 | [] | no_license | kilirobbs/python-fiddle | 8d6417ebff9d6530e713b6724f8416da86c24c65 | 9c2f320bd2391433288cd4971c2993f1dd5ff464 | refs/heads/master | 2016-09-11T03:56:39.808358 | 2013-03-19T19:26:19 | 2013-03-19T19:26:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | #!/usr/bin/env python
from os.path import expanduser
from plistlib import readPlist
plist="~/Library/LaunchAgents/org.lighttpd.plist"
path=expanduser(plist)
pl = readPlist(path)
print pl.__class__,pl
print pl.keys()
print pl.Label
print "Label" in pl
print "KeepAlive" in pl
if "Program" in pl:
print pl.Program
if "... | [
"cancerhermit@gmail.com"
] | cancerhermit@gmail.com | |
1c816c5f80b1281d92ecec69626cd50125706f1c | cc13092b652113221a877db2bf907c050dc30aaa | /kws_streaming/models/tc_resnet.py | 03c0408ad9a532fc355b5e35dd569b70ed1d7f5e | [
"Apache-2.0"
] | permissive | Th-Fo/google-research | 1e62ee50f76c2931fdb6db1de736a85e94251e25 | 9d7bd968843c27216d01c92ff832b1cd58cafa85 | refs/heads/master | 2020-12-27T17:30:43.916109 | 2020-05-25T17:06:20 | 2020-05-25T17:06:20 | 237,989,659 | 1 | 3 | Apache-2.0 | 2020-05-25T17:06:22 | 2020-02-03T14:52:08 | null | UTF-8 | Python | false | false | 6,116 | py | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
03e25ec68fa24203aeca5c8b73e78b1da4d5005b | d4517268b8724ef208e9d07e59628208cb0832e9 | /BalancedSmileys/py2/bs.py | ae9c513dbea5334261132bb501da379f9a70fc60 | [] | no_license | StevenDunn/CodeEval | 5a8a47d3a90d9bed350228f6647e41f1298f46c2 | b81bb31a600826d4b3b242a9a35aa1d28c2eb484 | refs/heads/master | 2021-01-15T15:33:53.155975 | 2018-04-01T13:54:16 | 2018-04-01T13:54:16 | 11,549,566 | 6 | 4 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | # balanced smileys soln in py2 for code eval by steven a dunn
import sys
def is_balanced(line):
if line == "":
return "YES"
line = line.replace(":)", "}").replace(":(", "{")
min_val = 0
max_val = 0
for i in range(0, len(line)):
c = line[i]
if c == '(':
min_val... | [
"stevendunn@gmail.com"
] | stevendunn@gmail.com |
d2fb1ee1dc5bf60a4b7ed477b3f0d3dd9283e44f | 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=66/params.py | d68d8385fdd6a0806cc34b1f280849c3602ecd11 | [] | 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.527214',
'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': 66,
'utils': 'uni-medium-3'}
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
be8e93fb9885fd8b2e99c287d74219d031f769ab | 95d144459ff7cbfc009c20ec16f3c06ddda867cc | /archimedes/archimedesquestion/urls.py | 676fcfc9f625eacd64a157dd402ef044404dc22f | [] | no_license | cvelas11/mmobious | b9c75fde17b038ac6bab8c2d698d588e27f8d8d6 | 605a9425dda1ccb9978c998eff679d5ddc7c0db8 | refs/heads/master | 2021-07-09T06:01:59.712677 | 2021-04-05T15:26:30 | 2021-04-05T15:26:30 | 236,180,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | """archimedes URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | [
"(none)"
] | (none) |
cf3fcd0da0ce278ca386e594acdeb7ccd3d457e6 | d24a6e0be809ae3af8bc8daa6dacfc1789d38a84 | /ABC/ABC151-200/ABC196/B.py | 76ae65459e878d6624bf37e1e3c5fb61dc875458 | [] | no_license | k-harada/AtCoder | 5d8004ce41c5fc6ad6ef90480ef847eaddeea179 | 02b0a6c92a05c6858b87cb22623ce877c1039f8f | refs/heads/master | 2023-08-21T18:55:53.644331 | 2023-08-05T14:21:25 | 2023-08-05T14:21:25 | 184,904,794 | 9 | 0 | null | 2023-05-22T16:29:18 | 2019-05-04T14:24:18 | Python | UTF-8 | Python | false | false | 390 | py | def solve(xs):
if "." in xs:
return int(xs[:xs.index(".")])
else:
return int(xs)
def main():
xs = input()
res = solve(xs)
print(res)
def test():
assert solve("5.90") == 5
assert solve("0") == 0
assert solve("84939825309432908832902189.9092309409809091329") == 84939825... | [
"cashfeg@gmail.com"
] | cashfeg@gmail.com |
88387b3005840626d21e96362ebb5b34eee260d1 | 5ef5abb189907b010e544e3c42ce1a38ed8e298f | /mysite/baseItems/models.py | aa8e62fe30b17d1bf2c62081b129658066edc4bb | [] | no_license | LKingJ23/Gymkana-formacion-Django | 5a5daf27abdd100ee8f9e0e61af5eb010899928a | 63d49b7ed81e8a3d0c5ed9c9765801680fb51ef7 | refs/heads/master | 2021-04-15T19:03:33.830028 | 2018-04-09T16:29:59 | 2018-04-09T16:29:59 | 126,459,951 | 0 | 0 | null | 2018-04-09T16:30:00 | 2018-03-23T09:05:57 | Python | UTF-8 | Python | false | false | 1,023 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.db.models.signals import post_delete
from django.dispatch import receiver
import os
class BaseItems(models.Model):
title = models.CharField(max_length=200, blank=False, null=False)
subtitle = models.CharFi... | [
"lkingj23@gmail.com"
] | lkingj23@gmail.com |
e61ef3bc74137cb2c14a765724f0967c90ad8dfc | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/apimanagement/v20210801/get_policy.py | f723b56f81345494660930c00c7d052abe191863 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bpkgoud/pulumi-azure-native | 0817502630062efbc35134410c4a784b61a4736d | a3215fe1b87fba69294f248017b1591767c2b96c | refs/heads/master | 2023-08-29T22:39:49.984212 | 2021-11-15T12:43:41 | 2021-11-15T12:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,750 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
152ea5d19b0c59f0c85e729ac604a8d44fb1fa72 | 105ef2d5f8bba13c15deb8c4a2a9af307b4e547a | /Programmers/level2_python/42860.py | ba611eaf3ea88a982dd35ae7396d3d3a6cd9df6f | [] | no_license | caniro/algo-note | 1ec4c0e08adcb542d3356daf7b6e943af722394f | d237a5b58a67ca453dc7a1a335f99428af2c5df5 | refs/heads/master | 2023-08-29T22:39:35.189711 | 2021-11-04T11:18:07 | 2021-11-04T11:18:07 | 260,473,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | # 조이스틱 : https://programmers.co.kr/learn/courses/30/lessons/42860
def solution(name):
def go_next_idx():
nonlocal answer, current_idx
diff_min = 100
next_idx = 0
for i in range(length):
if name[i] == current_string[i]:
continue
diff = min(abs(... | [
"caniro@naver.com"
] | caniro@naver.com |
9ef188c317fcaecca1e9dba557f4b68ad439a924 | ccc04ec2fe54772797682642aa17665fff848575 | /supplier_rfq/migrations.py | 0d6c919e6d1fdc1257d774773dbf55fb6eacf74a | [
"MIT"
] | permissive | admin627863/supplier_rfq | dcf33b8db0af1a8ef7dd470c338631a8a4d4c230 | 81434ea527c724e95ed2724d212fd9f548afb81a | refs/heads/main | 2023-08-10T11:37:11.793389 | 2021-09-24T05:32:25 | 2021-09-24T05:32:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,755 | py | import frappe
from frappe.modules.import_file import import_file_by_path
from frappe.utils import get_bench_path
import os
from os.path import join
def after_migrate(**args):
supplier_rfq_create_custom_fields(**args)
make_property_setter()
def make_property_setter():
supplier_rfq_app_folder_path='/apps/supplier_rf... | [
"mr.ashish.shah@gmail.com"
] | mr.ashish.shah@gmail.com |
f1c8081f521eee2c2e999506d85961e520a8ba5b | d50685a3f3d612349b1f6627ed8b807f0eec3095 | /demo/framework/ControlNode/aa.py | 94eb965303f8c805e95a0d88a91a316126e60660 | [] | no_license | Erich6917/python_littlespider | b312c5d018bce17d1c45769e59243c9490e46c63 | 062206f0858e797945ce50fb019a1dad200cccb4 | refs/heads/master | 2023-02-12T23:22:27.352262 | 2021-01-05T06:21:20 | 2021-01-05T06:21:20 | 113,631,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | # -*- coding: utf-8 -*-
# @Time : 2018/2/2
# @Author : LIYUAN134
# @File : aa.py
# @Commment:
#
urls = []
urls = None
if urls:
print 'loops'
else:
print 'empty'
| [
"1065120559@qq.com"
] | 1065120559@qq.com |
f90ff3052a6142fae24866037d0d30b94299f3da | 41147a2cdc221c2a8db84852ef7f29175b3409b3 | /caso/messenger/ssm.py | 36b1e4af9b37a37e62b77128d5d83278a5275f21 | [
"Apache-2.0"
] | permissive | aidaph/caso | ee1437d189c20044fe45fedeb4326a6f5fccd775 | e40e883c2eb729f040ef63085c94b48b0c7661e3 | refs/heads/master | 2023-08-01T13:52:34.556841 | 2023-06-07T08:11:52 | 2023-06-07T09:52:08 | 140,431,401 | 0 | 0 | Apache-2.0 | 2018-07-10T12:50:11 | 2018-07-10T12:50:09 | null | UTF-8 | Python | false | false | 6,487 | py | # -*- coding: utf-8 -*-
# Copyright 2014 Spanish National Research Council (CSIC)
#
# 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
#
# Unle... | [
"aloga@ifca.unican.es"
] | aloga@ifca.unican.es |
7ff358f10e084e30bb2c22cfd323b7f85f03fce4 | 390d19c3159133d8c688396cb11b4ed3f8178d09 | /Programmers/Score_Kit/01_3_위장.py | 0591e5aaa95ab645a8f56734b027b4f3db4deddb | [] | no_license | JJayeee/CodingPractice | adba64cbd1d030b13a877f0b2e5ccc1269cb2e11 | 60f8dce48c04850b9b265a9a31f49eb6d9fc13c8 | refs/heads/master | 2021-08-16T17:14:01.161390 | 2021-07-16T00:42:18 | 2021-07-16T00:42:18 | 226,757,079 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py |
def solution(clothes):
answer = 1
closet = {}
for cloth in clothes:
closet[cloth[1]] = closet.get(cloth[1], 0) + 1
for k, v in closet.items():
answer *= v + 1
return answer - 1
clothes = [['yellow_hat', 'headgear'], ['blue_sunglasses', 'eyewear'], ['green_turban', 'headgear']]
p... | [
"jay.hyundong@gmail.com"
] | jay.hyundong@gmail.com |
d23def31f939fd7f0eb5ff5d4fde51ddad4a27cb | 6fb37fee016346120d4c14c4343516532304055a | /src/genie/libs/parser/iosxe/tests/test_show_crypto.py | f1e2ff61c5c3ad22aae41719fa89eb3f6e49188a | [
"Apache-2.0"
] | permissive | devbollinger/genieparser | 011526ebbd747c6dcd767535ce4bd33167e15536 | ad5ce7ba8f5153d1aeb9cffcfc4dde0871f3401c | refs/heads/master | 2020-12-20T11:36:00.750128 | 2020-01-24T18:45:40 | 2020-01-24T18:45:40 | 236,061,155 | 0 | 0 | Apache-2.0 | 2020-01-24T18:38:43 | 2020-01-24T18:38:42 | null | UTF-8 | Python | false | false | 6,649 | py |
# Python
import unittest
from unittest.mock import Mock
# ATS
from ats.topology import Device
# Genie
from genie.metaparser.util.exceptions import SchemaEmptyParserError
from genie.libs.parser.iosxe.show_crypto import ShowCryptoPkiCertificates
# ====================================================
# ... | [
"jeaubin@cisco.com"
] | jeaubin@cisco.com |
a634a215e16936e0746a4d323b85a847e4296c61 | f7d343efc7b48818cac4cf9b98423b77345a0067 | /deployment_validation/csv_to_yaml_convertor/csv_to_yaml_convertor.py | ccc797444b3541460f1b9eb12eabc0c558df00f4 | [] | no_license | vijaymaddukuri/python_repo | 70e0e24d0554c9fac50c5bdd85da3e15c6f64e65 | 93dd6d14ae4b0856aa7c6f059904cc1f13800e5f | refs/heads/master | 2023-06-06T02:55:10.393125 | 2021-06-25T16:41:52 | 2021-06-25T16:41:52 | 151,547,280 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,684 | py | from os.path import dirname, abspath, join
from robot.api import logger
from shutil import copyfile
import csv
import re
import sys
import yaml
current_dir = dirname(dirname(abspath(__file__)))
class CsvToYamlConvertor:
"""
Take the CSV input and covert it into yaml format.
"""
def __init__(self, s... | [
"Vijay.Maddukuri@virtustream.com"
] | Vijay.Maddukuri@virtustream.com |
1d877ae0dcc1e80b1288dcf6fc5c06f53a8b53c2 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03326/s143256207.py | 2b339363954b6a8306957c1299b9177c0449d16f | [] | 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 | 377 | py | n, m = [int(i) for i in input().split()]
xyz = [[int(i) for i in input().split()] for _ in range(n)]
ans = 0
a = [0]*3
for a[0] in range(-1, 2, 2):
for a[1] in range(-1, 2, 2):
for a[2] in range(-1, 2, 2):
d = list(map(lambda x: sum([i * j for i, j in zip(a, x)]), xyz))
d.sort(rever... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
41e6e4d4a28bedaf4a97e2cec0c2c861189a34ea | 57d8323ca9bdd0965d487fe2e453a3cfb8dfa86f | /src/train_parabola.py | 1bbe280db5eed7ac6840269310212c152769c849 | [
"Unlicense"
] | permissive | mountain/suan-demo | 20ac79ddaf8b749c21badda37d07a3aeccdf7ba7 | 5136ae050156a2538aea4f718735995d3a289457 | refs/heads/master | 2023-04-07T10:19:49.148272 | 2021-04-09T05:24:20 | 2021-04-09T05:24:20 | 288,619,647 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,677 | py | import os
import arrow
import logging
import argparse
import numpy as np
import torch
import torch as th
import torch.nn as nn
from pathlib import Path
from leibniz.unet.base import UNet
from leibniz.unet.complex_hyperbolic import CmplxHyperBottleneck
from leibniz.unet.hyperbolic import HyperBottleneck
from leibniz.u... | [
"mingli.yuan@gmail.com"
] | mingli.yuan@gmail.com |
ad5f1a7e30e5cb32c1168b8a2e1ced91d1f31fa2 | afa9fcd0f2443515ba89e96ed4eb9416e9d11847 | /python/Gaffer/OpMatcher.py | bc89c2c9e05284e5cf226f31a38735f92aa6aa92 | [
"BSD-3-Clause",
"IJG"
] | permissive | dneg/gaffer | 6eb12b3ab3cde00afdf170c456969a38f5968237 | e87cb50f55a048cd7f6d5dcdfe6f95e38db2c5b6 | refs/heads/master | 2021-01-16T18:13:33.456876 | 2013-09-24T17:23:58 | 2013-09-24T17:23:58 | 13,094,917 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,396 | py | ##########################################################################
#
# Copyright (c) 2012, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Red... | [
"thehaddonyoof@gmail.com"
] | thehaddonyoof@gmail.com |
6d82aec23779880869c6b12dcd1a18d3c756863f | 4f111dfacab0acc93900e7746538f85e0b3d8d78 | /day10/07普通装饰器.py | f04378d67d7cac40b5ae5f3509f4fccb5581cfef | [] | no_license | ljxproject/basecode | 5541f25cfe90d5fad26eac0b6e72802aa1fad1f4 | 485e4b41593839bfc61e67261247fb88dc80cc1d | refs/heads/master | 2020-03-26T16:16:26.422617 | 2018-08-17T08:05:11 | 2018-08-17T08:05:11 | 145,091,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 563 | py |
def check():
print("模拟的扩展功能")
def outter(func):
def inner(name):
check()
func(name)
return inner
# 在函数的上方加上@符号,@符号加上一个装饰器名,表示将该名字对应的装饰器应用在该函数上
# 本质: 相当于执行了 func1 = outter(func1) 跟函数名同名的一个装饰后的函数名 = 装饰器名(函数名)
@outter
def func1(name):
print("基础功能1")
print("名字是:%s"%(name))
... | [
"403496369@qq.com"
] | 403496369@qq.com |
f8d32401ff16e6d846bfc328c7542055956a6336 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/network/azure-mgmt-network/generated_samples/virtual_network_create_subnet_with_address_prefixes.py | b010b5096c523a684115794891bc8db241fd15c0 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 1,904 | 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 ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
466265e6d44645df2b813ff931b7d2359c095200 | 641347d14ddf44263a5e9c93ecf28263640b179e | /string_based_problems/longest_common_prefix/solution.py | 419c06399dcb511e59196881dcefd2ac8537ec2b | [] | no_license | Ranjit007ai/InterviewBit-String | 5ee97a13f8ab04d458ac148da800d18cfe5b8579 | c8f89caa6f57adf91920a066707ddffe814eea9e | refs/heads/main | 2023-03-29T00:18:08.914419 | 2021-03-27T14:31:49 | 2021-03-27T14:31:49 | 352,092,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,452 | py | # Given a array of strings ,we need to find the longest common prefix in them.
# this function take the input array as a parameter and return the longest common prefix .
def longest_common_prefix(input_array):
min_length = 999999999999999 # min_length to store the length of the string with minimum size among... | [
"noreply@github.com"
] | Ranjit007ai.noreply@github.com |
ce0fcf78cceaca4c2e0ca7774665e851f2ca73e1 | df7b40e95718ac0f6071a0ba571b42efc81cf6de | /tests/test_models/test_heads/test_nl_head.py | 6f4bede5e7f377b68aecf731d23634a8a5a04e69 | [
"Apache-2.0"
] | permissive | shinianzhihou/ChangeDetection | 87fa2c498248e6124aeefb8f0ee8154bda36deee | 354e71234bef38b6e142b6ba02f23db958582844 | refs/heads/master | 2023-01-23T20:42:31.017006 | 2023-01-09T11:37:24 | 2023-01-09T11:37:24 | 218,001,748 | 162 | 29 | Apache-2.0 | 2022-11-03T04:11:00 | 2019-10-28T08:41:54 | Python | UTF-8 | Python | false | false | 446 | py | import torch
from mmseg.models.decode_heads import NLHead
from .utils import to_cuda
def test_nl_head():
head = NLHead(in_channels=32, channels=16, num_classes=19)
assert len(head.convs) == 2
assert hasattr(head, 'nl_block')
inputs = [torch.randn(1, 32, 45, 45)]
if torch.cuda.is_available():
... | [
"1178396201@qq.com"
] | 1178396201@qq.com |
21d3d280c5d2176baa2730b07b6b4d3790cfc623 | 80bb9bb3c9c811a64e7916f5a76ac75acfde1548 | /Material para n2/N2 ESTUDO/Listas/somaLista.py | 419ed0413cb52dee63f283aa647178c87600cdd4 | [] | no_license | RafaelSanzio0/FACULDADE-PYTHON.2 | 83e75b7bbe42e78a1eeb03b8b80afda00d95bacf | ea4f306f1e7c068a24f03eab7231e41bb466d2a1 | refs/heads/master | 2020-03-27T06:55:58.326782 | 2018-11-24T04:28:47 | 2018-11-24T04:28:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | '''Escreva uma função não recursiva que receba como parâmetro uma lista de inteiros e
retorne como resposta a soma de todos os elementos da lista'''
lista = [10,20,30]
def soma_elementos(lista):
soma = 0
for elemento in lista:
soma += int(elemento)
print("A soma dos elementos é", soma)
soma = so... | [
"rafaelsanzio16@gmail.com"
] | rafaelsanzio16@gmail.com |
dc5f56487684026050bb1ee73a2dba2e41624b0a | e1c9db908a9cefe46e293c7dcb1b6008e2e46951 | /synthetic.py | bdf3bfbead77b26faf256228be5bed41acac58e2 | [
"MIT"
] | permissive | luckyyangrun/gfnn | dbcfeca1910f6333474c6756b076dcac8601a2f3 | 36667861caacba921469d43917d002896e832c3f | refs/heads/master | 2023-03-16T20:10:15.025568 | 2020-08-06T10:32:52 | 2020-08-06T10:32:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,535 | py | import time
import argparse
import numpy as np
import torch
import torch.nn.functional as F
import torch.optim as optim
from utils import sgc_precompute, set_seed, stack_feat, load_donuts
from models import get_model
from metrics import accuracy
import pickle as pkl
from args import get_syn_args
from time import perf_c... | [
"hoangnt.titech@gmail.com"
] | hoangnt.titech@gmail.com |
f20790bffb57e8b31c4439e153e75454285669f6 | 9f78c2bfadd1e87d779a786e7cd0952b6fbc96f1 | /jobs/tasks/pay/index.py | 4ad10e9160a8d058533bfc8a0dc68c69ef51f8a4 | [] | no_license | Erick-LONG/order | 08393ed9b315cf2c6af5e2b9bfd6917605fe8d94 | 4b853403c9c949b3ecbe2766ec77750557cf11fc | refs/heads/master | 2022-11-11T09:32:53.570524 | 2020-06-30T09:20:18 | 2020-06-30T09:20:18 | 262,786,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | import datetime
from common.models.pay.PayOrder import PayOrder
from application import app,db
from common.libs.pay.PayService import PayService
'''
python manager.py runjob -m pay/index
'''
class JobTask():
def __init__(self):
pass
def run(self):
now = datetime.datetime.now()
date_be... | [
"834424581@qq.com"
] | 834424581@qq.com |
cb8f947de7142b0c8636844086b34bb65bf2e752 | f0a4ba1f1f941092e68e4b1ef9cff0d3852199ef | /프로그래머스/레벨1/K번째수.py | 1b25a50c2ba4db15fe16d9ea88c5b10318662d36 | [] | no_license | lsb530/Algorithm-Python | d41ddd3ca7675f6a69d322a4646d75801f0022b2 | a48c6df50567c9943b5d7218f874a5c0a85fcc6d | refs/heads/master | 2023-06-18T04:36:09.221769 | 2021-06-28T16:49:35 | 2021-06-28T16:49:35 | 367,775,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,750 | py | """배열 array의 i번째 숫자부터 j번째 숫자까지 자르고 정렬했을 때, k번째에 있는 수를 구하려 합니다.
예를 들어 array가 [1, 5, 2, 6, 3, 7, 4], i = 2, j = 5, k = 3이라면
array의 2번째부터 5번째까지 자르면 [5, 2, 6, 3]입니다.
1에서 나온 배열을 정렬하면 [2, 3, 5, 6]입니다.
2에서 나온 배열의 3번째 숫자는 5입니다.
배열 array, [i, j, k]를 원소로 가진 2차원 배열 commands가 매개변수로 주어질 때, commands의 모든
원소에 대해 앞서 설명한 연산을 적용했을 때 나온 결... | [
"lsb530@naver.com"
] | lsb530@naver.com |
818880e7d059aa3fec801d8a9246894b9e8abd74 | 58f81a20e6a22d17af626d423c6e1a5b160f784c | /services/core-api/app/api/securities/namespace.py | 8793e106eea95aca7cc765859cc08cff227fb56b | [
"Apache-2.0"
] | permissive | cryptobuks1/mds | 5e115c641dfa2d1a91097d49de9eeba1890f2b34 | 6e3f7006aeb5a93f061717e90846b2b0d620d616 | refs/heads/master | 2022-04-23T21:11:37.124243 | 2020-04-14T17:55:39 | 2020-04-14T17:55:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,261 | py | from flask_restplus import Namespace
from app.api.securities.resources.bond import BondListResource, BondResource
from app.api.securities.resources.bond_status import BondStatusResource
from app.api.securities.resources.bond_type import BondTypeResource
from app.api.securities.resources.bond_document import BondDocume... | [
"bcgov-csnr-cd@gov.bc.ca"
] | bcgov-csnr-cd@gov.bc.ca |
b071005e1bfea85be1a41e5bb422cd485b68feca | fd48fba90bb227017ac2da9786d59f9b9130aaf0 | /digsby/src/gui/native/mac/macfonts.py | 4366c8b020a76f6279dfea111cce5545dc170c0d | [
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | niterain/digsby | bb05b959c66b957237be68cd8576e3a7c0f7c693 | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | refs/heads/master | 2021-01-18T10:07:10.244382 | 2013-11-03T02:48:25 | 2013-11-03T02:48:25 | 5,991,568 | 1 | 0 | null | 2013-11-03T02:48:26 | 2012-09-28T02:24:50 | Python | UTF-8 | Python | false | false | 871 | py | '''
some Mac code from the internet
// Path to resource files in Mac bundle
wxString m_resourceDir;
// container of locally activated font
ATSFontContainerRef m_fontContainer;
FSSpec spec;
wxMacFilename2FSSpec(m_resourceDir + _T("Bank Gothic Light.ttf"),
&spec);
OSStatus status = ATSFontActivateFromFileSpecification(... | [
"mdougherty@tagged.com"
] | mdougherty@tagged.com |
a69a510fba4f2708d9033225e05685db3b0c696d | 3f6c16ea158a8fb4318b8f069156f1c8d5cff576 | /.PyCharm2019.1/system/python_stubs/-417879439/_imp.py | 9b5c6a7460b88191080182531faaf5de3ec605ae | [] | no_license | sarthak-patidar/dotfiles | 08494170d2c0fedc0bbe719cc7c60263ce6fd095 | b62cd46f3491fd3f50c704f0255730af682d1f80 | refs/heads/master | 2020-06-28T23:42:17.236273 | 2019-10-01T13:56:27 | 2019-10-01T13:56:27 | 200,369,900 | 0 | 0 | null | 2019-08-03T12:56:33 | 2019-08-03T11:53:29 | Shell | UTF-8 | Python | false | false | 5,612 | py | # encoding: utf-8
# module _imp
# from (built-in)
# by generator 1.147
""" (Extremely) low-level import machinery bits as used by importlib and imp. """
# no imports
# functions
def acquire_lock(*args, **kwargs): # real signature unknown
"""
Acquires the interpreter's import lock for the current thread.
... | [
"sarthakpatidar15@gmail.com"
] | sarthakpatidar15@gmail.com |
a92353589502f2b857fbde712c4b2740871f7138 | e68c3cbb9d6291fcdd51adae8a55616dcfafe55c | /spf/mr/lambda_/visitor/get_all_predicates.py | 43cd13146bb18cb49f553127deab68a8e4eee648 | [] | no_license | Oneplus/pyspf | 26126f5094065960d5f034fea2be4709aa1a4c50 | 175f90b4f837aa60fd660cba850d10a82dd578a1 | refs/heads/master | 2016-08-12T15:18:25.606712 | 2015-11-22T02:49:07 | 2015-11-22T02:49:07 | 45,725,414 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,329 | py | #!/usr/bin/env python
from spf.mr.language.type_.complex_type import ComplexType
from spf.mr.lambda_.logic_language_services import LogicLanguageServices
from spf.mr.lambda_.visitor.api import LogicalExpressionVisitorI
class GetAllPredicates(LogicalExpressionVisitorI):
def __init__(self):
self.predicates... | [
"oneplus.lau@gmail.com"
] | oneplus.lau@gmail.com |
6698430d0534a3155967eb8132b19896306de410 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/bob/1db4d26d8e394cf98ebb2776a7ba6fe5.py | c62d39d883d3124df740dd392844ba4d555c4865 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 427 | py | class Bob:
def hey(self, msg):
if self.is_silence(msg): return "Fine. Be that way!"
elif self.is_shout(msg): return "Woah, chill out!"
elif self.is_question(msg): return "Sure."
else: return "Whatever."
def is_silence(self, msg): return msg is None or msg.strip() == ''... | [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
b24b55082c3a32467c6afbcd5ff6a5a3d8a35825 | abad82a1f487c5ff2fb6a84059a665aa178275cb | /Codewars/8kyu/sum-arrays/Python/test.py | faa9af95abd70d991ed0505af0f19b5b5af928ae | [
"MIT"
] | permissive | RevansChen/online-judge | 8ae55f136739a54f9c9640a967ec931425379507 | ad1b07fee7bd3c49418becccda904e17505f3018 | refs/heads/master | 2021-01-19T23:02:58.273081 | 2019-07-05T09:42:40 | 2019-07-05T09:42:40 | 88,911,035 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | # Python - 3.6.0
test.describe('Testing sum_array')
test.assert_equals(sum_array([]), 0)
test.assert_equals(sum_array([1, 2, 3]), 6)
test.assert_equals(sum_array([1.1, 2.2, 3.3]), 6.6)
test.assert_equals(sum_array([4, 5, 6]), 15)
test.assert_equals(sum_array(range(101)), 5050)
| [
"d79523@hotmail.com"
] | d79523@hotmail.com |
1f0a5fb8f0d658bce1db0b8ddd311f764e35e0b3 | d6eca1b4b056beb41ac494db7399e1f146099c97 | /chapter7/tickets.py | ffd2252421041380e52db53708e975b7c02002bf | [] | no_license | liangsongyou/python-crash-course-code | 15090b48d77de1115bfaaaa6e5638a9bb9b3c7cc | f369e18030f2aafe358dd0fab1e479ca7bf4ceb8 | refs/heads/master | 2021-05-08T06:42:29.147923 | 2017-08-11T06:41:30 | 2017-08-11T06:41:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py |
while True:
age = input('Enter your age: ')
age = int(age)
if age <= 3:
print('Your ticked is free.')
elif age > 3 and age <= 12:
print('Your ticket costs $10.')
elif age > 12 and age < 100:
print('Your ticket costs $15.')
else:
break | [
"ramzanm461@gmail.com"
] | ramzanm461@gmail.com |
92256c004ae0664949bd41cfb353f346ebcd4d51 | 8dc84558f0058d90dfc4955e905dab1b22d12c08 | /third_party/blink/tools/blinkpy/tool/commands/analyze_baselines_unittest.py | e4f87d47ea4bb316fe05d5395299a3a5e1ec8af5 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | meniossin/src | 42a95cc6c4a9c71d43d62bc4311224ca1fd61e03 | 44f73f7e76119e5ab415d4593ac66485e65d700a | refs/heads/master | 2022-12-16T20:17:03.747113 | 2020-09-03T10:43:12 | 2020-09-03T10:43:12 | 263,710,168 | 1 | 0 | BSD-3-Clause | 2020-05-13T18:20:09 | 2020-05-13T18:20:08 | null | UTF-8 | Python | false | false | 1,865 | py | # Copyright 2016 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.
import optparse
from blinkpy.common.checkout.baseline_optimizer import BaselineOptimizer
from blinkpy.tool.commands.analyze_baselines import AnalyzeBaseline... | [
"arnaud@geometry.ee"
] | arnaud@geometry.ee |
608b5e977d1b0a6a8f79dfba90f9ab04016f5ca6 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /lightsail_write_3/disk_attach.py | b938c3125f8d75bda179ba8d7dde6dc7059c53e4 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,459 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_three_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/attach-disk.html
if __name__ == '__m... | [
"hcseo77@gmail.com"
] | hcseo77@gmail.com |
5dadcf6769ca9cfb7e4763f9392c7c09c08719c0 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_betrayals.py | 05743bfbaf3cff77441e9c0efd52c66000980796 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 230 | py |
#calss header
class _BETRAYALS():
def __init__(self,):
self.name = "BETRAYALS"
self.definitions = betrayal
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['betrayal']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
c3c01681e8c4b575ef58c93015e09cc5d33ba439 | c618bbf2719431999b1007461df0865bab60c883 | /docs/examples/use_cases/tensorflow/efficientdet/pipeline/dali/ops_util.py | 95646d590d6ac4f04b21f56c818feb8efd9f31f9 | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | Python | false | false | 5,776 | py | # Copyright 2021 Kacper Kluk, Paweł Anikiel, Jagoda Kamińska. 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
#
# Unles... | [
"noreply@github.com"
] | NVIDIA.noreply@github.com |
88cab9cb1c0d4c437de927380f3ad17b376e84de | 9e8d98c48035d4ee61fa930c324c822a61e5ae55 | /_examples/chebyshevinputs.py | fd844e75495d4edbc26e2c045064fd1e94220c7e | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | GRSEB9S/mystic | 59ac0c284a19f7b685a98420cd49d21bb10ff0cd | 748e0030c8d7d8b005f2eafa17a4581c2b3ddb47 | refs/heads/master | 2021-08-14T07:11:04.439139 | 2017-11-14T23:49:22 | 2017-11-14T23:49:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,165 | py | #!/usr/bin/env python
#
# Author: Alta Fang (altafang @caltech and alta @princeton)
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2016 California Institute of Technology.
# Copyright (c) 2016-2017 The Uncertainty Quantification Foundation.
# License: 3-clause BSD. The full license t... | [
"mmckerns@968178ea-60bd-409e-af13-df8a517b6005"
] | mmckerns@968178ea-60bd-409e-af13-df8a517b6005 |
05778ada3455877fbc552bfc4121758fc5656931 | 31fb7c74b94e46a325e6b05501c6972a401cf423 | /PYTHON/BASIC_PYTHON/수업내용/02/02-004.py | 817847885b9201127341bbd8b38a25796a623130 | [] | no_license | superf2t/TIL | f2dacc30d6b89f3717c0190ac449730ef341f6a4 | cadaaf952c44474bed9b8af71e70754f3dbf86fa | refs/heads/master | 2022-04-10T13:55:24.019310 | 2019-12-12T11:15:31 | 2019-12-12T11:15:31 | 268,215,746 | 1 | 0 | null | 2020-05-31T05:32:46 | 2020-05-31T05:32:46 | null | UTF-8 | Python | false | false | 132 | py | #02-004.py
print('yyyy', 'mm', 'dd')
print('2022', '02', '20', sep='-', end='')
print(' -- BIG EVENT DAY --')
| [
"noreply@github.com"
] | superf2t.noreply@github.com |
8802f191cac1c6ef42a71b05affacdd0c7c9eebf | cc231776124e9b596e4d9557ec09f9275d15eb20 | /example/DjangoApp/wsgi.py | 3b1bae77e146866ec61b9f61a19834583fb350b3 | [
"MIT"
] | permissive | grengojbo/docker-django | 2c742bc9f46939b6614b2f49a0981b848c250851 | 8e1f4b3ce622bc1fd3a9127f4f3519ace7aeee5b | refs/heads/master | 2016-09-15T18:20:41.607328 | 2014-09-12T12:51:37 | 2014-09-12T12:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,604 | py | """
WSGI config for fiber project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` se... | [
"oleg.dolya@gmail.com"
] | oleg.dolya@gmail.com |
9451e8ae129916ff18db2c412765cd8c447a2097 | f3c891e43aa828ad0653e6c6bf918f46b78ad7b4 | /setup.py | 5e6d4a4c8d2416841ef9bb3af7755c0fd3db1d10 | [] | no_license | ojustino/pywwt-web | 6a655c1b30c43c2c44ab425a4b815345831e1642 | db70c20da496c52f400cdae0f301d7b5940f530a | refs/heads/master | 2021-06-16T16:08:50.804918 | 2017-11-27T16:40:18 | 2017-11-27T16:40:18 | 112,221,435 | 0 | 0 | null | 2017-11-27T16:38:31 | 2017-11-27T16:38:30 | null | UTF-8 | Python | false | false | 5,854 | py | from __future__ import print_function
from setuptools import setup, find_packages, Command
from setuptools.command.sdist import sdist
from setuptools.command.build_py import build_py
from setuptools.command.egg_info import egg_info
from subprocess import check_call
import os
import sys
import platform
here = os.path.d... | [
"thomas.robitaille@gmail.com"
] | thomas.robitaille@gmail.com |
3d3bc331ab73351b87c588a6cf3ba8fd4c1b2615 | 036a41c913b3a4e7ae265e22a672dd89302d3200 | /0701-0800/0753/0753_Python_1.py | d567ce2e39bf38d32a69b1d68ed59a8f1b2f5b4c | [] | no_license | ChangxingJiang/LeetCode | e76f96ebda68d7ade53575354479cfc33ad4f627 | a2209206cdd7229dd33e416f611e71a984a8dd9e | refs/heads/master | 2023-04-13T15:23:35.174390 | 2021-04-24T05:54:14 | 2021-04-24T05:54:14 | 272,088,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | class Solution:
def crackSafe(self, n: int, k: int) -> str:
visited = set()
def dfs(s1):
visited.add(s1)
for v in range(k):
s2 = s1[1:] + str(v)
if s2 not in visited:
dfs(s2)
stack.append(s1[0])
# 处理其他进... | [
"1278729001@qq.com"
] | 1278729001@qq.com |
6d5cafe13cb9ef0722a1efcabebe9b56f3fa71b8 | bfda3af75d94767a5cb265bd68c17cfbf94e3ee1 | /rabbithole/zombit_infection/solution.py | 89fa08b0dd806b896d3f205eee6feea9361d0b2f | [] | no_license | orenlivne/euler | d0e5b956a46eacfe423fbd6c52918beb91eea140 | 2afdd8bccdc5789c233e955b1ca626cea618eb9b | refs/heads/master | 2020-12-29T02:24:36.479708 | 2016-12-15T21:27:33 | 2016-12-15T21:27:33 | 20,263,482 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,420 | py | #-------------------------------------------------------------------------------
# Rabbit hole - zombit_infection problem
#-------------------------------------------------------------------------------
INFECTED = -1
MAX_STRENGTH = 10000
class Population(object):
__DUMMY = MAX_STRENGTH + 1
def __init__(self, pop... | [
"oren.livne@gmail.com"
] | oren.livne@gmail.com |
280b56265c17385bb306b00dd2eac116091880da | 632099ac0d895943cbbeb9048a2cdfcd21102411 | /LV2_LX2_LC2_LD2/FaderfoxScript.py | ab0b79d02ffebba36ac72ee6d9b6a6dc837d6ef1 | [] | no_license | Toniigor/AbletonLive9_RemoteScripts | 7f4bbf759a79629584413f6d1797005e8cd7f2ff | fed1e5ee61ea12ea6360107a65a6e666364353ff | refs/heads/master | 2021-01-16T21:19:25.330221 | 2014-06-06T12:33:03 | 2014-06-06T12:33:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,154 | py | #Embedded file name: /Users/versonator/Jenkins/live/Projects/AppLive/Resources/MIDI Remote Scripts/LV2_LX2_LC2_LD2/FaderfoxScript.py
import Live
from consts import *
import sys
from FaderfoxHelper import FaderfoxHelper
from ParamMap import ParamMap
from Devices import *
class FaderfoxScript:
__filter_funcs__ = ['u... | [
"julien@julienbayle.net"
] | julien@julienbayle.net |
60e5e0f2797c0695cd4072eff7577dd65a303961 | a0dda8be5892a390836e19bf04ea1d098e92cf58 | /视频+刷题/python3/匿名函数的应用.py | 540378ee420e3f304633dae548a39b13d84afdac | [] | no_license | wmm98/homework1 | d9eb67c7491affd8c7e77458ceadaf0357ea5e6b | cd1f7f78e8dbd03ad72c7a0fdc4a8dc8404f5fe2 | refs/heads/master | 2020-04-14T19:22:21.733111 | 2019-01-08T14:09:58 | 2019-01-08T14:09:58 | 164,055,018 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | '''用匿名函数实现多个功能'''
'''
def sum(a, b, function):
result = function(a, b)
print(result)
sum(22, 11, lambda x, y: x + y)
sum(22, 11, lambda x, y: x - y)
'''
def num(a, b, func):
result = func(a, b)
print(result)
func_new = input("请输入一个新的匿名函数")
func_new = eval(func_new) # 转换
num(11, 12, func_new)
| [
"792545884@qq.com"
] | 792545884@qq.com |
b9f8c48b18733c4773a4d947d22798aadc2d97fe | e9aa61aa74eb69f946a66b6ac5a90f12ec744295 | /tests/integration/test_resolve_command.py | d4b4d243f266411ac5114bfc3f14e42ef0a36bfa | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | abueide/lbry | 2c2bc35255f82fade22561d673b299c0df35dfea | 7f5deaf6c80422a30b3714d4bf12e028756ed9fe | refs/heads/master | 2021-01-21T12:58:41.093354 | 2019-04-12T12:58:00 | 2019-04-16T18:18:23 | 181,083,296 | 0 | 0 | MIT | 2019-04-12T21:04:56 | 2019-04-12T21:04:56 | null | UTF-8 | Python | false | false | 3,855 | py | import json
from lbrynet.testcase import CommandTestCase
class ResolveCommand(CommandTestCase):
async def test_resolve(self):
tx = await self.channel_create('@abc', '0.01')
channel_id = tx['outputs'][0]['claim_id']
# resolving a channel @abc
response = await self.resolve('lbry://... | [
"lex@damoti.com"
] | lex@damoti.com |
6463120100067e88f76a9d5be84a539e55539baa | 5682dc024dd37ea0753d57819bab8a4891d6bb31 | /my_tiff_package/my_tiff_package/__init__.py | 34da447454fa182f4e7bc7d7df34feb2f0f2bde8 | [] | no_license | danielballan/reader-intake-adapter | 20424026ecc23f7aa9ab6ae2035988e60b0ca244 | f06ae1c9aef4e8277e81b5903a54d1a124590457 | refs/heads/master | 2022-04-07T05:50:38.877360 | 2020-03-05T15:12:10 | 2020-03-05T15:12:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,752 | py | import dask.array
import tifffile
class TIFFReader:
"""
Accepts file, filepath, or filepath glob.
"""
container = 'dask.array.core.Array'
def __init__(self, file):
if isinstance(file, str):
# file is a filepath or filepath glob
import os
if os.path.isfi... | [
"dallan@bnl.gov"
] | dallan@bnl.gov |
282f9f494bed1bf028d83c8f4c05f917f6111523 | 29da2ca6def1270be13a3096685a8e5d82828dff | /CIM14/CPSM/Equipment/Wires/SeriesCompensator.py | 3d24c9da21e451acecdfd4f1a62596944c6ded43 | [
"MIT"
] | permissive | rimbendhaou/PyCIM | 75eb3bcd3729b2410c03f3d5c66d6f1e05e21df3 | d578bb0bf1af344342bd23344385ed9c06c2d0ee | refs/heads/master | 2022-04-28T01:16:12.673867 | 2020-04-16T02:19:09 | 2020-04-16T02:19:09 | 256,085,381 | 0 | 0 | MIT | 2020-04-16T02:15:20 | 2020-04-16T02:08:14 | null | UTF-8 | Python | false | false | 2,022 | py | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | [
"rwl@thinker.cable.virginmedia.net"
] | rwl@thinker.cable.virginmedia.net |
19517ca7ef64c2333ba5aa5f106fb3d0b5e76ce3 | 0b9622c6d67ddcb252a7a4dd9b38d493dfc9a25f | /HackerRank/30daysChallenge/Day21.py | c3c18c68d2565763a4359b71e362ce6b8b0e1447 | [] | no_license | d80b2t/python | eff2b19a69b55d73c4734fb9bc115be1d2193e2d | 73603b90996221e0bcd239f9b9f0458b99c6dc44 | refs/heads/master | 2020-05-21T20:43:54.501991 | 2017-12-24T12:55:59 | 2017-12-24T12:55:59 | 61,330,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | """
Nota Bene: Day 21 was about Generics.
This was acutally not a Python solveable challenge (only C++, C#, Java 7, Java 8 and Swift) were offered, so no code was written here or progress made.
"""
| [
"npross@lbl.gov"
] | npross@lbl.gov |
b13111418e3b0d4dfe2eaa935cff789e858685ea | a983c40db193d9294ea93628c57f514e0e6e9c2a | /src/shop/api.py | 14c053a442e1c9fa5524098b2ef6d551d6b1c4fe | [
"MIT"
] | permissive | ElinSwedin/foobar-api | 80f4d1dd5e0dabefb80eab77bd92e4e8a277c9b9 | 7ab204894c7579dd3f9dec3d2cee1166eb046199 | refs/heads/develop | 2021-01-19T12:26:27.085054 | 2017-02-17T09:42:11 | 2017-02-17T11:05:38 | 82,311,799 | 2 | 0 | null | 2017-02-17T15:43:49 | 2017-02-17T15:43:49 | null | UTF-8 | Python | false | false | 7,973 | py | import logging
from django.db import transaction
from django.contrib.contenttypes.models import ContentType
from . import models, enums, suppliers, exceptions
log = logging.getLogger(__name__)
@transaction.atomic
def create_product(code, name):
"""Create an product"""
product_obj = models.Product(
co... | [
"me@kjagiello.com"
] | me@kjagiello.com |
1c656ad16666594fb3d4c6f4f1e6bba48319f683 | be0e0488a46b57bf6aff46c687d2a3080053e52d | /python/programmers/level1/문자열다루기기본.py | a210099dc2f10aaf38e4017dbeb93a0c2c6db444 | [] | no_license | syo0e/Algorithm | b3f8a0df0029e4d6c9cbf19dcfcb312ba25ea939 | 1ae754d5bb37d02f28cf1d50463a494896d5026f | refs/heads/master | 2023-06-09T11:31:54.266900 | 2021-06-30T17:04:38 | 2021-06-30T17:04:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | def isnumber(s):
for i in range(len(s)):
if s[i] < '0' or s[i] > '9':
return False
return True
def solution(s):
if (len(s) == 4 or len(s) == 6) and isnumber(s):
return True
return False
| [
"kyun2dot@gmail.com"
] | kyun2dot@gmail.com |
ecb1f30725bfd84a818036a942659d29d1dfdfa4 | c7009093f1e4d5db31d7fb5d876b46f5f9ac5268 | /week2/game_hobit/game.py | 5f8e1cf9d01888c4697f3705b59e8f2cd391fb2d | [] | no_license | mileto94/HackBulgaria | 4ea52ff306c202b9207f66e218ca79082832246a | 414b37dd102a3de5e976d4d97b1b2d95bb253892 | refs/heads/master | 2016-09-06T17:31:04.618614 | 2014-06-24T18:40:27 | 2014-06-24T18:40:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,197 | py | import random
from random import randint
class Entity():
"""docstring for Entity"""
def __init__(self,name, health):
self.name = name
self.health = health
def get_name(self):
return self.name
def get_health(self):
return self.health
def is_alive(self):
if... | [
"mileto94@abv.bg"
] | mileto94@abv.bg |
2ed56086a41fca06fb78b34b10bedbfee178a202 | 621ca3f68b088699c42a16051df1d64b6a5ac505 | /virtual/bin/pip3 | da45e50dbe672a6aca5e1632cfb1450927ff6f5d | [
"MIT"
] | permissive | nziokaivy/hood | 2af3bdbf1c258e504da2a4550b524319cab907bb | f82dde0f132330589aacfeefde0229d0bb909b9c | refs/heads/master | 2020-04-30T20:42:45.567319 | 2019-04-08T07:55:05 | 2019-04-08T07:55:05 | 177,075,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | #!/home/ivy/Documents/Moringa-school-projects/core-projects/python/hood/virtual/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"nziokaivy@gmail.com"
] | nziokaivy@gmail.com | |
c47fd8fda3a6c52e6bd550bbca685152fa026643 | 515a97129ce1b2b8eecca4b2087fde8985b82d5b | /Code-Scraps/old_modules/SpiceBot/Main/forfuckssake.py | 18ffb3c5664225b11ec0c4fd4d80c90d641ea910 | [] | no_license | SpiceBot/scraps | 3ad6e81ac75e2b6a684fea64eb7e75477b0f4f63 | 90125e1397b57ac87cae5f3e506363aa04ddffdc | refs/heads/master | 2020-05-02T21:51:01.297114 | 2019-03-28T15:38:28 | 2019-03-28T15:38:28 | 178,232,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,162 | py | #!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals, absolute_import, print_function, division
import sopel.module
import sys
import os
moduledir = os.path.dirname(__file__)
shareddir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
sys.path.append(shareddir)
from BotShared import ... | [
"sam@deathbybandaid.net"
] | sam@deathbybandaid.net |
2ffe78d090dc035ee3e3c38344a9e74b0442c2ec | 97758972dcbc3ad0e1e6057cdf1e0265c9e26c46 | /circularly_linked_list/tests/test_insert_cyclic_list.py | ac498d7e144659df1c5b77a38f88fb40f13cdf5f | [
"MIT"
] | permissive | ahcode0919/python-ds-algorithms | a4eea3358258e0ec3802aa9bf4470aa81b399d2a | 966565753eba5414903300379db6abac1b80a3d0 | refs/heads/main | 2022-12-23T11:56:21.142540 | 2022-12-19T16:22:24 | 2022-12-19T16:22:24 | 140,489,999 | 0 | 3 | MIT | 2022-12-19T16:22:25 | 2018-07-10T21:40:32 | Python | UTF-8 | Python | false | false | 627 | py | from circularly_linked_list.insert_cyclic_list import insert
from data_structures.singly_linked_list_node import SinglyLinkedListNode
from test_helpers.test_helpers import get_cyclic_list_values
def test_insert():
head = None
assert get_cyclic_list_values(insert(head, 1)) == [1]
head = SinglyLinkedListNo... | [
"noreply@github.com"
] | ahcode0919.noreply@github.com |
745cdf579469254d8a84fa40c6cc5cde7de681e1 | e5755d76e50e902246884310a7781059bd7ff222 | /mongoDB/6.Insert.py | 7dc6eba4175fdbcb45942c935ac3da1f5130d1ee | [] | no_license | Sens3ii/PP2-2020 | 4f1f9c0588476ca415b0ae2efc0f171e826dd3f8 | 3675aa4860f727ecb26360d8624e396663dfc5b2 | refs/heads/master | 2023-05-29T15:02:17.803095 | 2021-06-14T17:05:52 | 2021-06-14T17:05:52 | 236,768,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,185 | py | import pymongo
myclient = pymongo.MongoClient("mongodb+srv://students:321321@firstcluster-bxilw.gcp.mongodb.net/test?retryWrites=true&w=majority")
mydb = myclient["mydatabase"]
mycol = mydb["students"]
mylist = [
{ "_id": 1, "name": "John", "address": "Highway 37"},
{ "_id": 2, "name": "Peter", "address":... | [
"noreply@github.com"
] | Sens3ii.noreply@github.com |
fc16106826b25ab2c3851b6b86707066454ecae6 | 4fc87c7c55d431943eba76caaa76cc889e99bd3f | /npf/core/workflow/models/workflow_mytask.py | 52b87a074885ee3a7de16a31c5cd5377c973edeb | [] | no_license | Bonasolvo/npf-dev-roles | c774359b79642ae9ca2c82daeb0591677bd8e88c | dbde9493f2d23fd238dd3a6d8771bbbc5a650724 | refs/heads/master | 2016-09-01T05:35:50.246086 | 2015-12-15T07:02:40 | 2015-12-15T07:02:40 | 48,026,149 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | from npf.core.workflow.models import WorkflowTaskInstance
class WorkflowMyTaskInstance(WorkflowTaskInstance):
"""
Прокси-модель: Экземпляр задачи. Используется для фильтрации всех задач по текущему пользователю и
вывода списка "Мои задачи".
"""
class Meta:
verbose_name = 'Задача'
... | [
"tymashh@Mac-Tymashh.local"
] | tymashh@Mac-Tymashh.local |
b35986bb150d6f28720c88f4ce694446174ca46c | 09e5cfe06e437989a2ccf2aeecb9c73eb998a36c | /modules/cctbx_project/cctbx/development/electron_density_sampling.py | bc7f0cf4ae8f29f9ce2b13518f1c8d09d8f3953c | [
"BSD-3-Clause-LBNL",
"BSD-3-Clause"
] | permissive | jorgediazjr/dials-dev20191018 | b81b19653624cee39207b7cefb8dfcb2e99b79eb | 77d66c719b5746f37af51ad593e2941ed6fbba17 | refs/heads/master | 2020-08-21T02:48:54.719532 | 2020-01-25T01:41:37 | 2020-01-25T01:41:37 | 216,089,955 | 0 | 1 | BSD-3-Clause | 2020-01-25T01:41:39 | 2019-10-18T19:03:17 | Python | UTF-8 | Python | false | false | 1,856 | py | from __future__ import absolute_import, division, print_function
from cctbx import xray
from cctbx import miller
from cctbx.command_line.structure_factor_timings import read_structure
import sys
def timings(structure, wing_cutoff=1.e-3):
print("wing_cutoff for following fft calculations: %3.1e"%wing_cutoff)
for ca... | [
"jorge7soccer@gmail.com"
] | jorge7soccer@gmail.com |
1903fd395e39e1a5fe47d28f6a0c5d63f5ac1553 | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/errors/types/ad_group_ad_error.py | 350f6684cdb369f03e6e2283d6c52be5fe489255 | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 1,533 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
04e4e7fb2beff305b6436fb10b8bcb32563735f2 | d305e9667f18127e4a1d4d65e5370cf60df30102 | /tests/st/ops/ascend/test_aicpu_ops/test_fused_sparse_ftrl.py | f48235fbcabe2fb6abd5074475895f2115054473 | [
"Apache-2.0",
"MIT",
"Libpng",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.1-only",
"AGPL-3.0-only",
"MPL-2.0-no-copyleft-exception",
"IJG",
"Zlib",
"MPL-1.1",
"BSD-3-Clause",
"BSD-3-Clause-Open-MPI",
"MPL-1.0",
"GPL-2.0-only",
"MPL-2.0",
"BSL-1.0",
"LicenseRef-scancode-unknow... | permissive | imyzx2017/mindspore_pcl | d8e5bd1f80458538d07ef0a8fc447b552bd87420 | f548c9dae106879d1a83377dd06b10d96427fd2d | refs/heads/master | 2023-01-13T22:28:42.064535 | 2020-11-18T11:15:41 | 2020-11-18T11:15:41 | 313,906,414 | 6 | 1 | Apache-2.0 | 2020-11-18T11:25:08 | 2020-11-18T10:57:26 | null | UTF-8 | Python | false | false | 1,924 | py | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | [
"513344092@qq.com"
] | 513344092@qq.com |
4976b2b73dfeae906d91da69abf0aeede0d747a4 | b1ba5707a5cbe918d33bc2082b3eb4ff1378c060 | /SDPython/tests/test_sd_Katana/AccessProperties.py | 3b442e9ec2a1a19b233491f26519bb652e48bb65 | [] | no_license | qq781217732/SubstanceDev | 2eb1d9ed48d477cf70c7bfdac2103bb884e9204c | b9ffab0a1b8f3c01783259074940b2712a8142b8 | refs/heads/master | 2023-03-26T00:43:35.047305 | 2021-03-01T04:12:28 | 2021-03-01T04:12:28 | 342,539,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,539 | py | import sd
# Import the required classes.
from sd.api.sdproperty import SDPropertyCategory
from sd.api.sdvalueserializer import SDValueSerializer
# Get and print information regarding the selected nodes.
def printSelectedNodesInfo(nodes):
for node in nodes:
definition = node.getDefinition()
nodeId =... | [
"gaoyuyang@senseinn.com"
] | gaoyuyang@senseinn.com |
cca40c38589af36a682c1ef7ba42167804c19b98 | 7867e319f00994767fe748a107d927cf6f3181b8 | /src/pipx/interpreter.py | 6ec093c8237356a8ce3a267b9c1c35594b1509e9 | [
"MIT"
] | permissive | pypa/pipx | c34b687f7b88fe4e7f30971c05c466f6a0f45931 | 248fa37e7a0ea4a70a30a4352c0eb065137d3e15 | refs/heads/main | 2023-08-31T04:27:29.607704 | 2023-08-29T13:39:07 | 2023-08-29T13:39:07 | 151,871,286 | 3,264 | 190 | MIT | 2023-09-05T06:23:55 | 2018-10-06T18:47:46 | Python | UTF-8 | Python | false | false | 2,564 | py | import os
import shutil
import subprocess
import sys
from typing import Optional
from pipx.constants import WINDOWS
from pipx.util import PipxError
def has_venv() -> bool:
try:
import venv # noqa
return True
except ImportError:
return False
# The following code was copied from htt... | [
"noreply@github.com"
] | pypa.noreply@github.com |
2a8e16d986f346e286ee2aae5a8909a6121c790e | d2c229f74a3ca61d6a22f64de51215d9e30c5c11 | /qiskit/circuit/library/data_preparation/__init__.py | fbd033996c9e0bdefd7806a92bb64a821df9335c | [
"Apache-2.0"
] | permissive | 1ucian0/qiskit-terra | 90e8be8a7b392fbb4b3aa9784c641a818a180e4c | 0b51250e219ca303654fc28a318c21366584ccd3 | refs/heads/main | 2023-08-31T07:50:33.568824 | 2023-08-22T01:52:53 | 2023-08-22T01:52:53 | 140,555,676 | 6 | 1 | Apache-2.0 | 2023-09-14T13:21:54 | 2018-07-11T09:52:28 | Python | UTF-8 | Python | false | false | 2,205 | py | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | [
"noreply@github.com"
] | 1ucian0.noreply@github.com |
97690e0df7979136e3cb322a4672832e4770244b | ae646229187ab11607e4889e1cf0e380b26fae5c | /test_joyce_code/limestone/expPatientSize.py | 837f60f645e7ee64eb8ff96888828e8171e295f7 | [] | no_license | aschein/tensor_analysis | cb60caf56713cfb7191c46d3cc20c32ea591d382 | 155754be7fa8cfb97432997cb66aa37b1a7b582b | refs/heads/master | 2021-01-17T07:44:00.657311 | 2014-09-11T20:45:14 | 2014-09-11T20:45:14 | 34,183,143 | 1 | 2 | null | 2018-08-25T20:15:18 | 2015-04-18T21:19:08 | Python | UTF-8 | Python | false | false | 1,898 | py | """
Experiment to evaluate the effect of the size on computation time
"""
import time
import numpy as np
from sklearn.decomposition import RandomizedPCA
import nimfa
import argparse
import CP_APR
import sptensor
import sptenmat
# Load the original data
filename = 'data/hf-tensor-level1-data.dat'
X = sptensor.loadTens... | [
"robchen401@gmail.com"
] | robchen401@gmail.com |
201d58374ddb1f5d1ca8815b7e02ca9867fdb3a1 | 95d7291ce528ab40506d111f46c4f243b4b88514 | /backend/home/migrations/0002_load_initial_data.py | 2b9ff4b97b79ec4a4c6c2e7d002e81fe6d862ff6 | [] | no_license | crowdbotics-apps/dared-3-22630 | 8d2974d89edccddffdb39b1ad120e55fcc3092e5 | b6f8edff1e762bddf9f996ff53b72225eab1375c | refs/heads/master | 2023-01-09T18:51:28.888786 | 2020-11-14T20:53:35 | 2020-11-14T20:53:35 | 312,900,088 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,282 | py | from django.db import migrations
def create_customtext(apps, schema_editor):
CustomText = apps.get_model("home", "CustomText")
customtext_title = "Dared 3"
CustomText.objects.create(title=customtext_title)
def create_homepage(apps, schema_editor):
HomePage = apps.get_model("home", "HomePage")
h... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
9928c7ec02949ebb1ffaf41dc2a1309e05a1b420 | 07fe650b914e6577b42f3214bfdec3834e6e5eee | /gdslib/coupler_ring.py | 83c169ba15dbd3d12ef28cec15e0a6c0b91d02fa | [
"MIT"
] | permissive | sequoiap/gdslib | e2379baac55bb5715183c6e68b69dc6213d009db | 3e6d081a2196e13e89fef45cae5c7de41b96a7fc | refs/heads/master | 2022-08-01T07:54:53.880323 | 2020-05-18T18:26:42 | 2020-05-18T18:26:42 | 265,635,055 | 0 | 0 | MIT | 2020-05-20T17:12:59 | 2020-05-20T17:12:59 | null | UTF-8 | Python | false | false | 629 | py | import pp
from gdslib.load import load
def coupler_ring(c=pp.c.coupler_ring, **kwargs):
""" coupler for half a ring
.. code::
N0 N1
| |
\ /
\ /
---=========---
W0 length_x E0
"""
m = load... | [
"j"
] | j |
6cc4227ceafde33b34a254323ad23ffc0142a679 | 7f02a1297660601d40d5781cb7adbc2f4520029f | /macode/vae/train/atari_all.py | b0cedeff19ad6f234acaadddeec618235324a222 | [] | no_license | llach/ma-code | 2c4fb20ae1df9d457ec6736d3725104f37203824 | b8e6c279f966e6b9fadfa67731d8adb970106413 | refs/heads/master | 2020-04-16T18:34:36.242778 | 2019-07-21T13:43:03 | 2019-07-21T13:43:03 | 165,826,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | import tensorflow as tf
from forkan.models import VAE
from forkan.datasets import load_atari_normalized
learning_rate = 1e-4
beta = 5.5
latents = 20
for name in ['pong', 'breakout', 'boxing', 'gopher', 'upndown']:
data = load_atari_normalized(name)
v = VAE(data.shape[1:], name=name, lr=learning_rate, beta=be... | [
"llach@techfak.uni-bielefeld.de"
] | llach@techfak.uni-bielefeld.de |
6955829c9dcbcfbf6e414fa698bc84b446ebf450 | 8a82a83655f118208692e55d7804d9fa480ad4b6 | /book/packt/Mastering.Python.Scientific.Computing/Chapter 8/B02092_08_14.py | 16ebc5170e994c476513f720fd77f6f03af65761 | [] | no_license | xenron/sandbox-da-python | 0814159da9a91923e4b66c5e40057e381f765e96 | ab8f1c0d57fdc6006355f613012b84165068c315 | refs/heads/master | 2020-04-12T05:41:33.182110 | 2016-12-14T22:57:33 | 2016-12-14T22:57:33 | 60,324,979 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | #!/usr/bin/env python
import sys
for line in sys.stdin:
try:
line = line.strip()
# split the line into words
words = line.split()
# increase counters
if words[0] == "WARC-Target-URI:" :
uri = words[1].split("/")
print '%s\t%s' % (uri[0]+"//"+uri[2], 1)
except Exception:
""
#hadoop jar /usr/local/... | [
"xenron@outlook.com"
] | xenron@outlook.com |
3767bcf0f0bfe6b74fb52776c215a52ebbceecfe | 7506c49859870af9e62c3e919857ffcdf2e9a19e | /book2/Seq2SeqLearning/statistic_word5.py | 66fde97061d026ee8ff261cf27241b565937ef27 | [] | no_license | Git2191866109/BookStudy | d363717285a5e9767e582f6efd1258680fa26f80 | f172244218871372ca94286c3db64cf334627ef3 | refs/heads/master | 2022-11-08T00:15:00.963332 | 2020-06-28T10:28:33 | 2020-06-28T10:28:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,744 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# coding=utf-8
"""
@author: Li Tian
@contact: 694317828@qq.com
@software: pycharm
@file: statistic_word5.py
@time: 2019/4/29 10:39
@desc: 用tf.while_loop来实现解码过程
"""
import tensorflow as tf
import codecs
# 读取checkpoint的路径。9000表示是训练程序在第9000步保存的checkpoint
C... | [
"694317828@qq.com"
] | 694317828@qq.com |
8fed339d0d009e1232013c23f8458a9a76188cf0 | 031b24455b953907a0f98778931ee8a03c3c4b6c | /pacman103/core/spinnman/spinnman_utilities.py | 7a49d1ec7d9bba135a19329c236b5ed8deeb1056 | [] | no_license | BRML/HBP-spinnaker-cerebellum | 7e5f69c05d0e51f79442635df58815768f20e6bc | 7fc3eb5c486df66720d227e0e422cbab65c08885 | refs/heads/master | 2020-12-25T23:47:09.416213 | 2015-06-26T09:45:31 | 2015-06-26T09:45:31 | 38,686,607 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,649 | py | __author__ = 'stokesa6'
import os
class SpinnmanUtilities(object):
def __init__(self, dao=None, input_file=None):
self.runtime = None
self.total_processors = None
self.app_loads = list()
self.mem_writes_from_file = list()
self.mem_writes = list()
if dao is not None:... | [
"dr.christoph.richter@gmail.com"
] | dr.christoph.richter@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.