blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9a7a2c3803ce6af368aac1f9f8ce9c0dd7025a5f | 5963c12367490ffc01c9905c028d1d5480078dec | /homeassistant/components/humidifier/__init__.py | 7839eeec79951f55a0c08faa437c75005c95341d | [
"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 | 5,426 | py | """Provides functionality to interact with humidifier devices."""
from __future__ import annotations
from datetime import timedelta
import logging
from typing import Any, final
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_MODE,
SERVICE_T... | [
"noreply@github.com"
] | BenWoodford.noreply@github.com |
bac5006c1896c930dc702ca5287a40e776a077d6 | 9b32771b7d1513ee37bc62dd347675abcfc1bfc9 | /example_snippets/multimenus_snippets/Snippets/NumPy/Pretty printing/Formatting functions for specific dtypes/Set formatter for all `str` types.py | 844b073d94324d32bc5af82ddfa37163e159d77a | [
"BSD-3-Clause"
] | permissive | listar0810/jupyterlab-snippets-multimenus | 44087ef1aeb030a3074862a337508b57d50072c6 | 477f51cfdbad7409eab45abe53cf774cd70f380c | refs/heads/master | 2022-12-12T18:19:25.221083 | 2020-09-08T01:11:01 | 2020-09-08T01:11:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | def format_str_kind(x):
return 'str({0})'.format(x)
with printoptions(formatter={'str_kind': format_str_kind}):
print(np.array(['abc', 'xyz'])) | [
"kptan86@gmail.com"
] | kptan86@gmail.com |
68c5caac0d89275030bb60769c597a673e78b7ed | 1a50e73e91cf8144b0ef87374bc1cc521c0af2e9 | /tests/aiotest/test_coroutine.py | 0ab30549977466dd125a9f4686e5d2ef8935725f | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | smurfix/trio-asyncio | 30475975a08910cd68afca57c242b8a29b77f8f8 | 69d1ffafafd648cd9024480e3d7f0daadd53731c | refs/heads/master | 2022-02-26T04:13:56.024774 | 2019-02-25T13:38:59 | 2019-02-25T13:38:59 | 106,212,041 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,334 | py | from tests import aiotest
import trio_asyncio
import pytest
from .. import utils as test_utils
async def hello_world(asyncio, result, delay, loop):
result.append("Hello")
# retrieve the event loop from the policy
await asyncio.sleep(delay, loop=loop)
result.append('World')
return "."
class TestC... | [
"matthias@urlichs.de"
] | matthias@urlichs.de |
8931a598c6a99903242b814ee5825fe7c4a2c044 | 6dc32d60adeb2298746ace77898132f1b875eb12 | /Peromyscus_2019/unsorted/local_scripts/annotation/augustus/run2_full/find_and_replace_pairs.py | 2d96f27150b202ef204b4cbbbfe8309165191b04 | [] | no_license | jgbaldwinbrown/jgbutils | 97d7d61394f37db285cbee6fb4d397e604ff2ccd | 6675fae0324221abe7b3976f4e6a6a059a496438 | refs/heads/master | 2021-06-05T06:22:37.494988 | 2021-04-21T00:03:18 | 2021-04-21T00:03:18 | 59,526,463 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | import sys
pairfile = sys.argv[1]
infile = sys.argv[2]
pdata = open(pairfile,"r").readlines()
data = open(infile,"r").readlines()
for p in pdata:
p1 = p.split()[0]
p2 = p.split()[1]
newdata = []
for i in data:
newdata.append(i.replace(p1,p2))
data = newdata
del newdata
for i in data:... | [
"jgbaldwinbrown@gmail.com"
] | jgbaldwinbrown@gmail.com |
1d14f7ef98c7fd5a535c79ee3eec93c5ca752eb5 | af8f0d50bb11279c9ff0b81fae97f754df98c350 | /src/book/migrations/0011_bookrent_days_period_initial.py | 31bc58aee469f275c0eb4748e27a6b9f958fd7a3 | [
"Apache-2.0"
] | permissive | DmytroKaminskiy/ltt | 592ed061efe3cae169a4e01f21d2e112e58714a1 | d08df4d102e678651cd42928e2343733c3308d71 | refs/heads/master | 2022-12-18T09:56:36.077545 | 2020-09-20T15:57:35 | 2020-09-20T15:57:35 | 292,520,616 | 0 | 0 | Apache-2.0 | 2020-09-20T15:49:58 | 2020-09-03T09:09:26 | HTML | UTF-8 | Python | false | false | 409 | py | # Generated by Django 2.2.14 on 2020-09-14 15:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('book', '0010_auto_20200906_1429'),
]
operations = [
migrations.AddField(
model_name='bookrent',
name='days_period_i... | [
"dmytro.kaminskyi92@gmail.com"
] | dmytro.kaminskyi92@gmail.com |
c966f25dd1a1a377c9dc8a45d0fc28809a710f43 | caef0308b388eee0159e4a7184c22293e69690e8 | /cookbooks/chapter_1/1_18.py | ef3736ff5669d87428f5156317d6b6fdf532b59d | [] | no_license | AlwaysOnline233/cookbook | 440ca4325842482157484ca2df9d0f1932b0b29e | edebb0f98d88566977cc2514631818d8371b78dd | refs/heads/master | 2022-12-14T20:03:26.527927 | 2020-09-06T16:57:36 | 2020-09-06T16:57:36 | 262,815,273 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,866 | py | # 映射名称到序列元素(通过名称访问元素) collections.namedtuple()
from collections import namedtuple
Subscriber = namedtuple('Subscriber', ['addr', 'joined'])
sub = Subscriber('jonesy@example.com', '2012-10-19')
print(sub)
print(sub.addr)
print(sub.joined)
print('——————————————————————')
print('namedtuple的实例支持所有的普通元组操作')
print(len(s... | [
"941906145@qq.com"
] | 941906145@qq.com |
2e5debed9523e5744c3aa55c8f32d6cc19a43886 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-2/7f96abc75e1493dc02db78564f4c5c2c7c369831-<to_kwargs>-fix.py | 864cd124bb73cfec05b4c63dca4628ac6cca0cd1 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py |
def to_kwargs(self, with_initializer=False):
kwargs = {
'name': self.name,
'optimize_attr': {
'learning_rate': self.learning_rate,
},
'regularizer': self.regularizer,
'trainable': self.trainable,
'clip_attr': self.clip,
}
if with_initializer:
... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
b8c40cdd10d2e611122903356271eeb1bb11b5af | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_81/335.py | 27b296a4e5a4c244360f37412735330c4985c3e4 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,858 | py | #-------------------------------------------------------------------------------
# Name: ??????1
# Purpose:
#
# Author: myegor
#
# Created: 21.05.2011
# Copyright: (c) myegor 2011
# Licence: <your licence>
#-------------------------------------------------------------------------------
#... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
4cc3223fc3b550e593d5349191f6fa6293eadc09 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2415/60788/273625.py | 40dece231176bd6765d3e08244d734959cc21b8b | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,488 | py | class Node:
def __init__(self, number, value):
self.value = value
self.number = number
class Binary_tree:
def __init__(self, root=None, left=None, right=None):
self.root = root
self.left = left
self.right = right
def cal_value(self):
if self.root is None:
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
ed8679de6054811ecf5d56f2bfde0d959dd0d8bf | 2dc17d12ff6ea9794177c81aa4f385e4e09a4aa5 | /archive/799ChampagneTower.py | f77f7487a4c44daf98534e953409dface34ba6ce | [] | no_license | doraemon1293/Leetcode | 924b19f840085a80a9e8c0092d340b69aba7a764 | 48ba21799f63225c104f649c3871444a29ab978a | refs/heads/master | 2022-10-01T16:20:07.588092 | 2022-09-08T02:44:56 | 2022-09-08T02:44:56 | 122,086,222 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | # coding=utf-8
class Solution(object):
def champagneTower(self, poured, query_row, query_glass):
"""
:type poured: int
:type query_row: int
:type query_glass: int
:rtype: float
"""
if poured==0:
return 0
row=[poured]
for i in range(... | [
"yanhuang1293@gmail.com"
] | yanhuang1293@gmail.com |
e1c3e096886749b683d5914cee3a06fb81fd35bc | 6f0e74cdc81f78ffc5dbc1b2db1cef8cbec950c4 | /aws_interface/cloud/auth/policy/register_kakao.py | c77349cda92c3f66ea59a5a21fbda45079c24934 | [
"Apache-2.0"
] | permissive | hubaimaster/aws-interface | 125b3a362582b004a16ccd5743d7bdff69777db5 | 5823a4b45ffb3f7b59567057855ef7b5c4c4308d | refs/heads/master | 2023-01-19T15:43:38.352149 | 2023-01-12T01:38:00 | 2023-01-12T01:38:00 | 149,847,881 | 57 | 10 | Apache-2.0 | 2023-01-12T01:39:49 | 2018-09-22T05:17:43 | JavaScript | UTF-8 | Python | false | false | 309 | py | def can_register(extra, password_meta):
"""
:param extra: {str: any?}, additional fields that the user will fill out when registering such as gender and birth.
:param password_meta: None, Not available on Kakao register.
:return: bool, Determines if user can register.
"""
return True
| [
"hubaimaster@gmail.com"
] | hubaimaster@gmail.com |
bf6844693de5516d4fb72652dbeafac79d2111f7 | 5fcaf79a16d5506c0e0372960af24843425b8eeb | /learn/show.py | d55a95d15f27c438506c33893e6d66d0a568a20d | [] | no_license | LaRiffle/collateral-learning | 23bfb195c1cf777909118ccb0adf96674ad00ac5 | dd84ca320fe198f40a1f21f1486216f760cc89d4 | refs/heads/master | 2023-02-24T03:55:39.622918 | 2022-12-19T07:52:00 | 2022-12-19T07:52:00 | 169,438,971 | 76 | 10 | null | 2023-02-07T17:40:34 | 2019-02-06T16:39:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,431 | py | from string import ascii_lowercase
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sn
def show_results(results, title, ymin=None, ymax=None):
plt.figure(figsize=(10, 4))
vmin, vmax = 10e10, -10e10
for label, result in results.items():
plt.plot(range(1, le... | [
"theo.leffyr@gmail.com"
] | theo.leffyr@gmail.com |
03f77e0340831761ece926c4e553fb1068b643ee | 8f9b10acd4b7b8c94ee65c21e6bdb06555d8f669 | /anti/models.py | d5352c66619673f5099a259d3337e29e5ac174bc | [] | no_license | leezichanga/unmask-corruption | d848d814118ab785482b57a2c5fcebd5067c2183 | 231cdb517a2c5a0c2a8bd2a0d9cbec9349106a56 | refs/heads/master | 2020-03-18T23:26:41.418951 | 2018-06-04T12:59:28 | 2018-06-04T12:59:28 | 135,403,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,105 | py | from django.db import models
from django.contrib.auth.models import User
import datetime as dt
# Create your models here.
class category(models.Model):
name = models.CharField(max_length=30)
def __str__(self):
return self.name
def save_category(self):
self.save()
def delete_category(... | [
"elizabbethichanga@yahoo.com"
] | elizabbethichanga@yahoo.com |
a5e53c16745135d425ba98173cc7f0ecf35d849a | 9518425032e26354680c57b037eff12fb887198a | /setup.py | 4f4e44689d7e28e88ebe3976614ce22c066495e3 | [
"MIT"
] | permissive | askmetoo/wq | beab6c6f707234611eeab31014cb962fb6b9a6da | bb13e62127951486463d11058798c78664212e0e | refs/heads/master | 2022-04-04T18:32:25.585038 | 2020-02-21T00:58:11 | 2020-02-21T00:58:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,132 | py | import os
from setuptools import setup
LONG_DESCRIPTION = """
A modular framework for citizen science field data collection via offline-capable mobile web apps.
"""
def readme():
try:
readme = open('README.md')
except IOError:
return LONG_DESCRIPTION
else:
return readme.read()
s... | [
"andrew@wq.io"
] | andrew@wq.io |
7cc604a2458a9dabe8bb9bd3285646dd15c5ea36 | 4e16c9314c0ef1ecb86a7e42fb2d52ca1b0548c9 | /embedded-software/mcu-common/src/driver/wscript | 8525c4a84a47dc129176dfcc92921c39a81a8597 | [
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | alexmingyan/foxbms_1.5.5 | 6dc82d307e955229ade8f2c20426305d1c905d95 | 45113f205e943b6368c9e91ad6a9a99a1466875a | refs/heads/master | 2020-07-28T14:55:24.361692 | 2019-07-24T06:02:28 | 2019-07-24T06:02:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,020 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @copyright © 2010 - 2019, Fraunhofer-Gesellschaft zur Foerderung der
# angewandten Forschung e.V. All rights reserved.
#
# BSD 3-Clause License
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the fol... | [
"info@foxbms.org"
] | info@foxbms.org | |
799c343559e789b9df9e3ec900516e7ba380f0f8 | 3f969c2c4ebdf3a9226ae624a84292ba63210147 | /machinePolicy/onlineVI.py | 7c9d59dbf4c9d5c2f74bd868abdae019abf4380c | [] | no_license | chengshaozhe/commitmentObstacles | 390cb7f4c3b7ea79fdb17c1b20ff656bdba6c009 | f77f9de11c7798984cc07f5cf34c81f0ffba410d | refs/heads/master | 2021-06-25T13:52:08.880415 | 2021-06-22T06:31:07 | 2021-06-22T06:31:07 | 233,626,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,131 | py | import numpy as np
import collections as co
import functools as ft
import itertools as it
import operator as op
import matplotlib.pyplot as plt
import os
import pickle
import sys
import time
sys.setrecursionlimit(2**30)
import pandas as pd
import seaborn as sns
# from viz import *
# from reward import *
class GridWo... | [
"shaozhecheng@outlook.com"
] | shaozhecheng@outlook.com |
ce837d0279c21c1aadb844f3914402efdbc28a7d | abd8ca6f8eafe16d12dfa805213f36c663f8be13 | /examples/rme_api.py | 6aaeba56a4cc0642d500b186cc952435c8dbd3f7 | [
"MIT"
] | permissive | abdullahselek/HerePy | 5caf3f3f76413be6a4fc8790144ec390ae371f00 | a4100cbc5c2ee4adeeb8a9353b2be227043fd75b | refs/heads/master | 2023-03-06T19:30:32.463272 | 2023-03-03T20:33:43 | 2023-03-03T20:33:43 | 108,025,351 | 86 | 38 | MIT | 2023-03-03T19:11:15 | 2017-10-23T18:52:08 | Python | UTF-8 | Python | false | false | 368 | py | #!/usr/bin/env python
import io
from herepy import RmeApi
rme_api = RmeApi(api_key="api_key")
# retrieves misc information about the route given in gpx file
with io.open("testdata/routes/sample.gpx", encoding="utf-8") as gpx_file:
gpx_content = gpx_file.read()
response = rme_api.match_route(gpx_content, ["ADAS_... | [
"abdullahselek@gmail.com"
] | abdullahselek@gmail.com |
a12af3b71cfd47e2295d90892ada2f25ab43cf00 | 12a012ace19a14fc2c4ce2daec7a9df94cd5d925 | /약수의 합.py | 640424fe1c76ab029854fbd2c2ea409a785936b7 | [] | no_license | newfull5/Programmers | a0a25fd72c0a8a7932122cb72e65b28ecd29ff71 | b880a8043427f6aa7dc72caa3e46b1f6584a8962 | refs/heads/master | 2022-12-28T13:46:52.215347 | 2022-12-12T13:50:53 | 2022-12-12T13:50:53 | 211,209,943 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | def solution(n):
answer = 0
for num in range(1,n+1):
if n % num == 0:
answer += num
return answer
| [
"noreply@github.com"
] | newfull5.noreply@github.com |
28318e30df7adaaad09839dcc6112562f78cc73c | 1f66df2de800c6e46924a51d39d2be6aed481949 | /gRPCDemo/macOS/protos/helloworld_pb2.py | f64eac1f2b30acfa4b4516114c08fa31ce08385a | [] | no_license | minhanghuang/FKCpp | 6969c17cd6bdd75933ea2be738dbf86aa3b04a41 | 53d2aa713fcafd275b3e8ccf98b8900a5be197e5 | refs/heads/master | 2023-03-25T02:42:19.003732 | 2021-03-24T06:55:50 | 2021-03-24T06:55:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 4,440 | py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: helloworld.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | [
"mhesat@outlook.com"
] | mhesat@outlook.com |
b7ac34ab698807206f8808ecc2ac932ceb4f576c | 1e0219f7be8cb6b0f3e6f7e4bd5bccea39f8dfb9 | /furion/utils.py | ed02cc06538fb1240178470e0dc5ad76af298df9 | [] | no_license | 724686158/ASUKA | d599ee58b8fb178d4a635f5bbd329ab406c45cc3 | 47b606632eb5b8ca17c41100741b68063712fdcf | refs/heads/master | 2020-03-08T20:01:00.152033 | 2018-12-13T10:27:11 | 2018-12-13T10:27:11 | 127,136,748 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 884 | py | import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = 32
self.key = hashlib.sha256(key.encode()).digest()
def encrypt(self, raw):
raw = self._pad(raw)
iv = Random.new().read(AES.block_s... | [
"solitarius.holic@gmail.com"
] | solitarius.holic@gmail.com |
2c7555bbf1f1deec3c36391db4ce8cd0d92c9d9d | 39c80306080defbde999f1af05ae5993f22d7fd7 | /nobler_monkeys/tests/q_prop_ge.py | ef40c6c36a6de095bd7f4634a6c24752a22d1803 | [] | no_license | uob-cfd/spe | 47931d724792fbe812de49ac489a7e88cca52e1d | f7c76b766bffec71b80febd0dbc79e12aec3a11c | refs/heads/master | 2023-02-04T20:45:44.411481 | 2020-12-27T19:03:52 | 2020-12-27T19:03:52 | 321,508,088 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 841 | py | test = {
'name': 'Question prop_ge',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> # You need to set the value for 'prop_ge'
>>> 'prop_ge' in vars()
True
""",
'hidden': False,
'locked': False
},
{
... | [
"matthew.brett@gmail.com"
] | matthew.brett@gmail.com |
0d1937caa05fa3abae892dfd8137c6aed2ccbdf3 | f1d6913541714d960e6ca66dad2f068d1b5d5c8c | /brandi/s1p1.py | 290b6bd82ebc85e0140e4ebfe10983de70efb566 | [] | no_license | jms7446/hackerrank | 20c6d3be07ce65c38698bbf068d6fd98ba6b565a | 700ebd442ee224b8b369d0c4b0e986ba8edbff90 | refs/heads/master | 2021-07-19T10:58:14.690433 | 2020-10-18T11:22:22 | 2020-10-18T11:22:22 | 221,907,547 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | import sys
def classify(max_rate, bit_rate):
rate = bit_rate / max_rate * 100
if rate >= 90:
return 0
elif rate >= 80:
return 1
elif rate >= 75:
return 2
elif rate >= 68:
return 3
elif rate >= 60:
return 4
else:
return 5
def calc_max_bit_ra... | [
"jms7446@gmail.com"
] | jms7446@gmail.com |
841df284c35ca40365dad1dcbe9c22cb14df6465 | 0da69ccdecd401ae611ab718808971d1f608d64b | /app/auth/decorators.py | a07baabfc7693d2b567440053911c57efa5c5ed0 | [
"MIT"
] | permissive | paulsavala/student-monitoring-frontend | cf3abadad24d3f3573ebb0beafdfa24b7238afed | 1b8ca6e8d6f4c7490412a95e1d421bf31647955f | refs/heads/master | 2022-11-26T12:57:26.457973 | 2020-08-06T15:57:01 | 2020-08-06T15:57:01 | 276,772,357 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | from functools import wraps
from flask import request, redirect, url_for
from flask_login import current_user
def registration_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if not current_user.is_registered:
return redirect(url_for('auth.login', next=request.url))
... | [
"paulsavala@gmail.com"
] | paulsavala@gmail.com |
c675242cf672aac2fbe3db2b6abdcdd7ea3d57ab | c026e2414c8a7e2b3beda68832364cfdb4cedb9c | /bravo/tests/test_factory.py | f180083c84ea5cb5bb39c2be92e38780f52ee942 | [
"MIT"
] | permissive | iamjagman/bravo | 2aac89ec1c6db2f274e4b248910910bec74af28a | 20d1c554fd027f37be459acc7fdae079db548296 | refs/heads/master | 2021-01-17T23:43:33.338790 | 2011-02-12T08:43:46 | 2011-02-12T08:43:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,170 | py | import shutil
import tempfile
import unittest
import bravo.config
import bravo.factories.beta
class TestBravoFactory(unittest.TestCase):
def setUp(self):
# Same setup as World, because Factory is very automagical.
self.d = tempfile.mkdtemp()
self.name = "unittest"
bravo.config.co... | [
"MostAwesomeDude@gmail.com"
] | MostAwesomeDude@gmail.com |
56c66e8cd793a4baf3f4b5c629f809d015a2fc54 | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r8/Gen/DecFiles/options/12145014.py | 3bd794ba4bca590db5bdb2c3ab65169e65eb3a61 | [] | 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,999 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r8/Gen/DecFiles/options/12145014.py generated: Fri, 27 Mar 2015 15:48:12
#
# Event Type: 12145014
#
# ASCII decay Descriptor: [B+ -> K+ (psi(2S) -> (J/psi(1S) -> mu+ mu- ) (f_0(980) -> pi+ pi-))]cc
#
from Configurables import Generation
Generation().EventType = 12145014
Generati... | [
"slavomirastefkova@b2pcx39016.desy.de"
] | slavomirastefkova@b2pcx39016.desy.de |
9dcba905a11236ce3ebe29c1f9c83bc2560a8157 | 4c4d91cb139a3eb5788ef2750f3622ded892ec19 | /aids/sorting_and_searching/max_subarray.py | bf51c4cce0ffea79ea38538abff4b0feb8928b80 | [
"MIT"
] | permissive | ueg1990/aids | 66a02f8abcd64ea101d7bc4feb3b0ffaff99b886 | bb543c6f53983d59edbc6a522ca10d64efd9c42e | refs/heads/master | 2020-04-10T16:07:26.116797 | 2015-01-26T01:49:28 | 2015-01-26T01:49:28 | 25,844,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,349 | py | '''
In this module we find the subarray which has the largest sum
'''
def max_subarray(arr):
'''
Return the value of largest sum in an array along with the start index
and finish index of the subarray
'''
if not len(arr):
raise Exception('Array is empty')
running_sum = max_sum = arr[0... | [
"uehtesham90@gmail.com"
] | uehtesham90@gmail.com |
766a4885b65dd452fcfcf1ab31de25dd939905d9 | b5479a025524c1387d3ba14f4fba7173f1d2df31 | /P9/day_13_integration/iwebshop_selenium/testcase/baidusearch.py | ba4711d63b98f3b5ae24c033064e244e3ba1f60c | [] | no_license | liousAlready/NewDream_learning | 063f5e225d62eec8285e69bb5ba3bff850096ca3 | 7b790f675419224bfdbe1542eddc5a638982e68a | refs/heads/master | 2023-06-30T08:28:34.949464 | 2021-08-01T00:42:17 | 2021-08-01T00:42:17 | 391,489,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | #!/usr/bin/env python
# encoding: utf-8
'''
@contact: 1650503480@qq.com
@file: baidusearch.py
@time: 2021/5/23 09:37
'''
# 1.引入unittest
import unittest
from selenium import webdriver
import time
import P9.day_13_integration.iwebshop_selenium.comm
version = '1.3'
class TestBaidu(P9.day_13_integration.iwebshop_seleni... | [
"m15574933885@163.com"
] | m15574933885@163.com |
e5c32fb26ddbac48df5e526ccaf45b551fa5330c | ba80ca143ba35fd481730786a27ebdb1f88ce835 | /algorithm/LC/334.py | 870b6d51b1cd90eeeb63ece34dd51ff2c72f7d56 | [] | no_license | uiandwe/TIL | c541020b65adc53578aeb1c3ba4c6770b3b2e8b3 | 186544469374dd0279099c6c6aa7555ee23e42fe | refs/heads/master | 2022-02-15T08:33:07.270573 | 2022-01-01T15:22:54 | 2022-01-01T15:22:54 | 63,420,931 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 50,048 | py | # -*- coding: utf-8 -*-
class Solution:
def increasingTriplet(self, nums):
for j in range(1, len(nums)):
i = j-1
k = j+1
while -1 < i and nums[i] >= nums[j]:
i -= 1
if i > -1:
while k < len(nums) and nums[j] >= nums[k]:
... | [
"noreply@github.com"
] | uiandwe.noreply@github.com |
1c0ed0ba0d9571e4d0d0cd6ea9cc1c674906dd14 | 4ed038a638725ac77731b0b97ddd61aa37dd8d89 | /cairis/controllers/ResponseController.py | 47ab5abfe16344952b2d9ca03caaa5bebe42d042 | [
"Apache-2.0"
] | permissive | RachelLar/cairis_update | 0b784101c4aff81ff0390328eb615e335301daa2 | 0b1d6d17ce49bc74887d1684e28c53c1b06e2fa2 | refs/heads/master | 2021-01-19T06:25:47.644993 | 2016-07-11T20:48:11 | 2016-07-11T20:48:11 | 63,103,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,096 | py | import httplib
from flask import session, request, make_response
from flask.ext.restful import Resource
from flask.ext.restful_swagger import swagger
from cairis.daemon.CairisHTTPError import MalformedJSONHTTPError, ARMHTTPError, ObjectNotFoundHTTPError
from cairis.data.ResponseDAO import ResponseDAO
from cairis.tool... | [
"shamal.faily@googlemail.com"
] | shamal.faily@googlemail.com |
88794ba0bcff10a9db5caab5a27296b2f6bc2623 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_26257.py | d9aabcbd873191b203b98e7489a2f13b6e6b747f | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 102 | py | # How to set a value in a categorical column of a Pandas DataFrame with boolean indexing?
Categorical
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
7fe1cb2b892e8fa5bb5eb978b81a0e7994b7b923 | 21a92e72448715510d509ab0ec07af37f388013a | /book/searchAlgo/virus2.py | dd281d7f3093a9c1e3ccedb952f32385321abcfe | [] | no_license | chlee1252/dailyLeetCode | 9758ad5a74997672129c91fb78ecc00092e1cf2a | 71b9e3d82d4fbb58e8c86f60f3741db6691bf2f3 | refs/heads/master | 2023-01-22T02:40:55.779267 | 2020-12-03T15:01:07 | 2020-12-03T15:01:07 | 265,159,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,306 | py | from collections import deque
n = int(input().split()[0])
graph = [list(map(int, input().split())) for _ in range(n)]
data = [(graph[i][j], 0, i, j) for j in range(n) for i in range(n) if graph[i][j] != 0]
s, x, y = map(int, input().split())
moves = [(1,0), (-1,0), (0,1), (0,-1)]
data.sort()
q = deque(data)
while q:... | [
"chlee1252@gmail.com"
] | chlee1252@gmail.com |
4d259c592db23d6b694777fab57c9a3a044bbf31 | b7f07b73bc96e1ae3332e9f6f95d012294aa38e2 | /VISSA/settings.py | ecc6c66dfea5e5d6fbda8929136b40dc0f2f902e | [] | no_license | janardhanvissa/Django_temp_static | 839af3bab631fbecb63eff544ca765cfce1ff467 | 242ba23098183f785e8d7fa54c9f4fe0c02d5804 | refs/heads/master | 2022-07-06T00:21:48.821177 | 2020-05-21T18:25:54 | 2020-05-21T18:25:54 | 265,921,766 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,110 | py | """
Django settings for VISSA project.
Generated by 'django-admin startproject' using Django 3.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# B... | [
"janardhan1819@gmail.com"
] | janardhan1819@gmail.com |
ebd7f9aa3bfc4e776f57de3b8848bf737ae6e909 | 80b27a236810507cc302c57669e3d1c39c2ff5d4 | /week_2/mysite/bin/django-admin.py | 2bbd398c0f2a5d12da44c6c6764a450532a481f5 | [] | no_license | sbashkeyeva/BF-Django | d94a1b7638a1e787cde3b8ac4b244484366634ce | 8e81b001c75001b316fd3cdd799a993fb8450e39 | refs/heads/master | 2020-03-27T21:26:33.949504 | 2018-09-09T18:05:03 | 2018-09-09T18:05:03 | 147,144,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | #!/Users/symbatbashkeyeva/Desktop/mysite/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"sbashkeyeva@gmail.com"
] | sbashkeyeva@gmail.com |
bb8bfb9f07def113727da8f948451be9fb0324b7 | 0676f6e4d3510a0305d29aa0b1fe740d538d3b63 | /Python/BitmapTable/BitmapManager.py | 7906797410b315662fccf936dc01e2d51307ec88 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | pgolay/PG_Scripts | f70ffe7e5ca07acd6f4caedc9a9aec566542da7c | 796704a7daa6ac222a40bb02afdb599f74a6b0d4 | refs/heads/master | 2021-01-19T16:53:41.525879 | 2017-02-07T18:26:10 | 2017-02-07T18:26:10 | 2,730,362 | 9 | 1 | null | 2016-12-30T17:58:08 | 2011-11-08T00:04:33 | Python | UTF-8 | Python | false | false | 4,022 | py | import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc
import os
import System.Windows.Forms as wf
def test():
def GetSomeObjects():
gobs = Rhino.Input.Custom.GetObject()
gobs.SetCommandPrompt ("Select objects with bitnap textures")
gobs.GeometryFi... | [
"noreply@github.com"
] | pgolay.noreply@github.com |
45397d0944a9fcda436df6e55bcf4f13a2aca52a | 36e4a3581877736a501a74bfdfc10bbbd4386b8a | /lean/config.py | 641c928160acba367bda17df693fcc58d3a0dc13 | [
"Apache-2.0"
] | permissive | valmac/lean-cli | 1620300e7bf9428df269bae26b47a4615525144a | 88a191afadf7bfe766665fa67c552390cb2e3951 | refs/heads/main | 2023-03-08T10:40:15.541980 | 2021-02-11T00:52:47 | 2021-02-11T00:52:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | from pathlib import Path
class Config:
"""The Config class contains configuration which is used to configure classes in the container.
Due to the way the filesystem is mocked in unit tests, values should not be Path instances.
"""
# The file in which general CLI configuration is stored
general_co... | [
"jaspervmerle@gmail.com"
] | jaspervmerle@gmail.com |
1ebfe7eaf915087c500d0c05f3d37b031a3877fe | c84e2722d8dd32f3ac4338de08835c8fa3136cec | /setup.py | fdec996be3a400a35fd7b584b73fb5f811514288 | [] | no_license | esimionato/openerp_bootstrap | d61fc878ff1138ebfdaf88b825e6121f69b421a8 | fbb5f9fc12a1a45db70e1825e399cc2e641506a9 | refs/heads/master | 2021-01-16T13:42:45.508647 | 2012-04-03T15:31:44 | 2012-04-03T15:31:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,176 | py | from setuptools import setup, find_packages
import sys, os
version = '1.0a7'
def get_long_desc():
toread = ['README.rst','HISTORY.txt']
return '\n\n'.join([open(x).read() for x in toread])
setup(name='openerp_bootstrap',
version=version,
description="Easy bootstrap for your OpenERP modules",
... | [
"simahawk@gmail.com"
] | simahawk@gmail.com |
2e31093f6173964f3726a0ddf0207c67c6a27784 | e3c8d2997a425bfd22e33cb074229b563ad7c0eb | /tests/PlanetPopulation/test_EarthTwinHabZone1.py | 2dd5f669b171b2daa43d68faaf29ccb37f4ff4b5 | [
"BSD-3-Clause"
] | permissive | semaphoreP/EXOSIMS | 3a5f9722a0fdfdf3d233bef398488fb920f6fba9 | 9b2c25ff0bf1e6378af08a95b04c9e51ef4f1340 | refs/heads/master | 2020-04-04T11:55:05.258189 | 2019-05-27T18:19:23 | 2019-05-27T18:19:23 | 155,907,999 | 0 | 0 | BSD-3-Clause | 2018-11-03T23:49:47 | 2018-11-02T18:41:34 | Python | UTF-8 | Python | false | false | 1,452 | py | r"""Test code for EarthTwinHabZone1 module within EXOSIMS PlanetPopulation.
Cate Liu, IPAC, 2016"""
import unittest
import EXOSIMS
from EXOSIMS import MissionSim
from EXOSIMS.Prototypes.PlanetPopulation import PlanetPopulation
from EXOSIMS.PlanetPopulation.EarthTwinHabZone1 import EarthTwinHabZone1
import os
import n... | [
"dsavransky@gmail.com"
] | dsavransky@gmail.com |
120ea8e12c9d7e82683f0e6785cf2ee5ea5825f0 | bb6ebff7a7f6140903d37905c350954ff6599091 | /chrome/browser/metrics/variations/generate_resources_map_unittest.py | 8cbb0ebee68c2d1964796f7b559fab5463685b3e | [
"BSD-3-Clause"
] | permissive | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f | ccadf4e63dd34be157281f53fe213d09a8c66d2c | refs/heads/master | 2022-12-23T18:07:04.568931 | 2016-04-11T16:03:36 | 2016-04-11T16:03:36 | 53,677,925 | 0 | 1 | BSD-3-Clause | 2022-12-09T23:46:46 | 2016-03-11T15:49:07 | C++ | UTF-8 | Python | false | false | 3,094 | py | #!/usr/bin/python
# Copyright 2014 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.
"""Unittests for generate_resources_map.py"""
import unittest
import generate_resources_map
class GenerateResourcesMapUnittest(unittest... | [
"mrobbeloth@pdiarm.com"
] | mrobbeloth@pdiarm.com |
1e40bad48045d7348f53b85f7fd994b985a972ac | 6a084a2df2869ce3ad565610cbf92eccf00a233e | /modules/linux_lvm.py | 460a1270d11ccd188edf7addb9a35d1bbb4654d3 | [] | no_license | ltxin/saltstack | 95b5356715cc918afec378e2926d9f9a1c7a85d5 | 30a493ef5e46bd7629c8ba400e559dab023c1431 | refs/heads/master | 2021-01-16T17:52:56.939714 | 2017-08-11T10:13:41 | 2017-08-11T10:13:41 | 100,019,324 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 13,756 | py | # -*- coding: utf-8 -*-
'''
Support for Linux LVM2
'''
from __future__ import absolute_import
# Import python libs
import os.path
# Import salt libs
import salt.utils
import salt.ext.six as six
from salt.exceptions import CommandExecutionError
# Define the module's virtual name
__virtualname__ = 'lvm'
def __virtua... | [
"it_ltxin@163.com"
] | it_ltxin@163.com |
d69056ae4fb0520eac38d0e3c91f6ec429a5f56d | a200032e5305bb8644c9f37228aeecf55210182c | /7_While Loops/challenge_28_code.py | ccdd7be1f1f3f14da2c21bfe5047fff797e3f088 | [
"MIT"
] | permissive | demoanddemo/The-Art-of-Doing-Code-40-Challenging-Python-Programs-Today | bc702a58326dd67ad76a6d276361b664e5750cd8 | a9f44d20ae212b5cbc190ac49ca7acc638ff4228 | refs/heads/main | 2023-01-29T16:31:01.204819 | 2020-12-16T12:14:39 | 2020-12-16T12:14:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,598 | py | #While Loops Challenge 28: Prime Number App
import time
print("Welcome to the Prime Number App")
running = True
#Run the program as long as the user wants
while running:
#Get user input
print("\nEnter 1 to determine if a specific number is prime.")
print("Enter 2 to determine all prime numbers within a ... | [
"dwayned@packtpub.com"
] | dwayned@packtpub.com |
7e5f5b2270ef31b1f82f32fba4777b152c534dc7 | 65329299fca8dcf2e204132624d9b0f8f8f39af7 | /napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart/config/__init__.py | 71ae2d3ad7b7dd5387e1f89d0aea3ec286ae5b7f | [
"Apache-2.0"
] | permissive | darylturner/napalm-yang | bf30420e22d8926efdc0705165ed0441545cdacf | b14946b884ad2019b896ee151285900c89653f44 | refs/heads/master | 2021-05-14T12:17:37.424659 | 2017-11-17T07:32:49 | 2017-11-17T07:32:49 | 116,404,171 | 0 | 0 | null | 2018-01-05T16:21:37 | 2018-01-05T16:21:36 | null | UTF-8 | Python | false | false | 9,436 | py |
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitar... | [
"dbarrosop@dravetech.com"
] | dbarrosop@dravetech.com |
5f1edd4fabfb2d5d3d1368489954f0e59957a1ff | 812b46ceb1989be3021146932cc52a5b577a1789 | /aslprep/pybids/layout/tests/test_path_building.py | e137c5d7ae3becf9f9fcf5f871434130673c939b | [
"BSD-3-Clause"
] | permissive | a3sha2/aslprep | 4c418b348907060be1fdbc906a27fc229e1d69d2 | b92ff4a6526351df91f37de3bf56d90d13d89286 | refs/heads/master | 2023-03-11T18:39:11.272591 | 2021-03-06T19:00:49 | 2021-03-06T19:00:49 | 177,011,959 | 2 | 1 | BSD-3-Clause | 2020-04-15T05:35:13 | 2019-03-21T19:34:47 | HTML | UTF-8 | Python | false | false | 1,471 | py | import pytest
from bids.layout import BIDSLayout
from os.path import join, abspath, sep
from bids.tests import get_test_data_path
@pytest.fixture(scope='module')
def layout():
data_dir = join(get_test_data_path(), '7t_trt')
return BIDSLayout(data_dir)
def test_bold_construction(layout):
ents = dict(subj... | [
"azeez.adebimpe@outlook.com"
] | azeez.adebimpe@outlook.com |
9a3c163cf8d6eed88df69cfc505235f9b8e25dfb | 4c15b85193927e55e7d197f5adc66aff30c2c825 | /website_app/migrations/0007_alter_website_website_business.py | e3c3f3f07440a3f2ed85063d881c27d4ab30e42d | [] | no_license | zaidmnsr/zaidmansuri | c8d3823c3acb11fa974e3a5ee7f8bac2cc0542eb | 2bf9a0aeff78c1785d8a6894bd5fb0eb915310b1 | refs/heads/master | 2023-08-15T09:28:16.915130 | 2023-08-13T11:07:04 | 2023-08-13T11:07:04 | 313,597,546 | 0 | 0 | null | 2023-08-13T11:05:58 | 2020-11-17T11:25:45 | Python | UTF-8 | Python | false | false | 531 | py | # Generated by Django 4.2 on 2023-07-20 05:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('website_app', '0006_website_website_business'),
]
operations = [
migrations.AlterField(
model_nam... | [
"zaidmnsr@gmail.com"
] | zaidmnsr@gmail.com |
bfcc5024634e341bbfa761da9034eadfb9e6b24f | 1959350ca45f43806e925907c298cfae2f3f355f | /test/programytest/parser/template/node_tests/test_srai.py | 7158c3a2f1ae45b5ee7191bffcbd2a4b36a09e7e | [
"MIT"
] | permissive | tomliau33/program-y | 8df17ff4078a0aa292b775ef869930d71843682a | 30a3715c8501b4c2f1b4de698b679cb4bac168b1 | refs/heads/master | 2021-09-06T01:56:08.053131 | 2018-01-31T15:10:10 | 2018-01-31T15:10:10 | 114,656,850 | 0 | 0 | null | 2018-02-01T13:27:30 | 2017-12-18T15:27:54 | Python | UTF-8 | Python | false | false | 1,746 | py | import xml.etree.ElementTree as ET
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.srai import TemplateSRAINode
from programy.parser.template.nodes.word import TemplateWordNode
from programytest.parser.template.base import TemplateTestsBaseClass
class MockTemplateSRAI... | [
"keith@keithsterling.com"
] | keith@keithsterling.com |
295ea6db4098721e8131893e5db595423b7f10da | 53edf6b0f4262ee76bb4e3b943394cfeafe54865 | /simulation_codes/_archived/new_hybrid_2D/plot_and_save.py | ce66045dfc64568007d2f38b64ee67bf28d22ed0 | [] | no_license | Yoshi2112/hybrid | f86265a2d35cb0a402ba6ab5f718717d8eeb740c | 85f3051be9368bced41af7d73b4ede9c3e15ff16 | refs/heads/master | 2023-07-07T21:47:59.791167 | 2023-06-27T23:09:23 | 2023-06-27T23:09:23 | 82,878,960 | 0 | 1 | null | 2020-04-16T18:03:59 | 2017-02-23T03:14:49 | Python | UTF-8 | Python | false | false | 9,750 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 22 10:44:46 2017
@author: iarey
"""
import numpy as np
import matplotlib.pyplot as plt
import pickle
import matplotlib.gridspec as gs
import os
from matplotlib import rcParams
from mpl_toolkits.mplot3d import Axes3D
import const
from const import generate_data, generate... | [
"joshua.s.williams@uon.edu.au"
] | joshua.s.williams@uon.edu.au |
b07e60abfbcb85315271f99e9b088635862f3a7e | 6c816f19d7f4a3d89abbb00eeaf43dd818ecc34f | /apps/project/migrations/0046_alter_review_20210201_1458.py | a6a0222ef2d4f5972b14098639344ddb88e3a177 | [] | no_license | reo-dev/bolt | 29ee6aa7cfc96bd50fa7a7dae07fbaafc2125e54 | d1a7859dd1ebe2f5b0e6e295047b620f5afdb92e | refs/heads/master | 2023-07-13T04:05:57.856278 | 2021-08-27T09:07:03 | 2021-08-27T09:07:03 | 382,195,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,225 | py | # Generated by Django 3.0.8 on 2021-02-01 05:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('account', '0046_remove_user_showpassword'),
('project', '0045_remove_comment_parent'),
]
operations = [
... | [
"75593016+reo-dev@users.noreply.github.com"
] | 75593016+reo-dev@users.noreply.github.com |
8d3aa949d3be73fdb0464a68391241843cefbfcb | 29bb2cc18ff029d226a4939b624594114665b789 | /UchetToDo/Main/Uchet/bin/django-admin.py | ac5b920dc1860f5fe79640568beee4c6396b51d0 | [] | no_license | azatnt/TZ-Uchet | 8998f533ec784b48e00cc681d6333052fc6d5e94 | 7539c3cf77afc792fa835aeeb468050b15ccc329 | refs/heads/main | 2023-03-14T04:11:20.407606 | 2021-03-04T20:35:22 | 2021-03-04T20:35:22 | 344,600,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | #!/Users/sulpak/Desktop/UchetToDo/Main/Uchet/bin/python3
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
raise ImportError(
'django-admin.py was de... | [
"58590243+pr1nce07@users.noreply.github.com"
] | 58590243+pr1nce07@users.noreply.github.com |
a591d9e49733195e515cc380c617925401fa744e | 4fee81e2fa833911ea2f65ee975cf7cc1724b6a2 | /venv/Lib/site-packages/pyrogram/raw/functions/stats/get_message_stats.py | 7d3b520d36ac7ad2e551875453dd3a0ed6702d7e | [] | no_license | devID767/Farm_Duel_Bot | 453628d2bcaba27dab01338d9368e6727781901e | aaab3c16ec6626f5196f24f741bfeecc63492116 | refs/heads/master | 2023-08-14T22:06:06.705300 | 2021-10-08T13:50:15 | 2021-10-08T13:50:15 | 360,924,958 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,712 | py | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | [
"dsarnavskiy77@gmail.com"
] | dsarnavskiy77@gmail.com |
80e2f0d969884afbeb74daa43255ab8b21bb1f14 | 93713f46f16f1e29b725f263da164fed24ebf8a8 | /Library/lib/python3.7/site-packages/prompt_toolkit/eventloop/asyncio_win32.py | 337882b6888494349309a7fc9fb0566250f611cb | [
"BSD-3-Clause"
] | permissive | holzschu/Carnets | b83d15136d25db640cea023abb5c280b26a9620e | 1ad7ec05fb1e3676ac879585296c513c3ee50ef9 | refs/heads/master | 2023-02-20T12:05:14.980685 | 2023-02-13T15:59:23 | 2023-02-13T15:59:23 | 167,671,526 | 541 | 36 | BSD-3-Clause | 2022-11-29T03:08:22 | 2019-01-26T09:26:46 | Python | UTF-8 | Python | false | false | 3,784 | py | """
Win32 asyncio event loop.
Windows notes:
- Somehow it doesn't seem to work with the 'ProactorEventLoop'.
"""
from __future__ import unicode_literals
from .base import EventLoop
from .context import wrap_in_current_context
from .future import Future
from .utils import ThreadWithFuture
from .win32 import wait_for_h... | [
"nicolas.holzschuch@inria.fr"
] | nicolas.holzschuch@inria.fr |
c18dfcefb86c6861bc4249c4baee2fcadc00931b | 597d8b96c8796385b365f79d7a134f828e414d46 | /pythonTest/cn/sodbvi/pandas/numpyDemo.py | 8d3229e2e237b220682ade1b6b445190cee4e31e | [] | no_license | glorysongglory/pythonTest | a938c0184c8a492edeba9237bab1c00d69b0e5af | ed571d4c240fccfb4396e2890ad922726daa10a0 | refs/heads/master | 2021-01-21T11:39:35.657552 | 2019-08-14T02:49:26 | 2019-08-14T02:49:26 | 52,493,444 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,113 | py | import numpy as np
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
A = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9])
print(a)
print(A)
print(type(a))
print(type(A))
'''
其中 arange([start],stop,[step]) 声明了该数组元素起始与终止的值,
而 step 定义了给定区间内采样的步幅大小。在以上代码中,我们生成一个从零开始到 10 结束(不包含 10),
并且每次加 2 的数组。注意数组元素取值服从左闭右开原则,即取 0 而不取 10,停止数值并不能取到。
'''
a = np.aran... | [
"317878410@qq.com"
] | 317878410@qq.com |
8f5d7d7ae57560f260787ef7f00a6239a4fc1cbc | 9b671087373b09fa811d3c0505e91a0326c7d5e5 | /nose_docker/version.py | 23b03887372d98ddd49f3fbd4e6118c872671599 | [
"MIT"
] | permissive | heynemann/nose-docker | 4cd5b2f0cabfbd7b0569278f87fab8ec0776e710 | 079d6b3de590b250b3fa95316c28705a76c2bdb8 | refs/heads/master | 2016-09-05T23:20:01.119711 | 2014-08-31T03:57:10 | 2014-08-31T03:57:10 | 23,373,576 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of nose-docker.
# https://github.com/heynemann/nose-docker
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2014 Bernardo Heynemann heynemann@gmail.com
__version__ = "0.1.0"
| [
"heynemann@gmail.com"
] | heynemann@gmail.com |
0576dc7a8e05bf3996a3cfd219ba859c4980358e | c463e77c3d76e6b4810e202541d3f3f7f91bcf60 | /build/baxter_simulator/baxter_sim_io/catkin_generated/pkg.installspace.context.pc.py | 08d9465199c27e9a077103858958b90dc1919149 | [] | no_license | MGRNascimento/Tese | 18087ee59dfee96ee000c9f16c646d1750174285 | bf78d417849a74d9c5a520d40dcbebeadf084706 | refs/heads/master | 2020-06-23T13:57:01.699657 | 2019-10-23T21:47:19 | 2019-10-23T21:47:19 | 198,638,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/miguel/catkin_ws/install/include".split(';') if "/home/miguel/catkin_ws/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "baxter_core_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREF... | [
"relvas.cvg@gmail.com"
] | relvas.cvg@gmail.com |
2ed0de006cf75a8406c89e35b76b6146e0a537c4 | 08f56e7fdf3b9447810a2f76f0afeb0ebe00bdc1 | /bulletins/urls.py | bc630f448476f91e03e3a4e1dcb0740839cd1168 | [
"Apache-2.0"
] | permissive | Kgermando/catsr | fb87f387ae0a346e3fa254d62021ec3b1601f19c | 52da79130a4bb7c15b59e3690c8df8d23573d728 | refs/heads/main | 2023-06-28T19:42:26.448172 | 2021-07-23T08:00:15 | 2021-07-23T08:00:15 | 317,449,941 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py |
from django.urls import path
from bulletins.views import bulletin_view, bulletin_detail
app_name = 'bulletin'
urlpatterns = [
path('', bulletin_view, name='bulletin'),
path('bulletin/<slug:slug>/', bulletin_detail, name='bulletin_detail'),
path('bulletin/<int:id>/', bulletin_detail, name='bulletin_detail... | [
"katakugermain@gmail.com"
] | katakugermain@gmail.com |
f0915da8a30b5fdfc5d2932cdd976b1a933a2f71 | 348a4619ef5baf642959f421dceecb3408a0b612 | /QuickxpertPython-master/30032019/practice/prc1.py | e061daeea696b739b4f3172b0f4115bef3ba68c3 | [] | no_license | imushir/qxp_python_class_july_2019 | 6b9366d40ebe80abc1a59bb62389d1b26c70bb01 | 0ccaa9b850b0c8a862b843329ef5fa12ef1bee16 | refs/heads/master | 2020-06-19T17:44:10.598060 | 2019-09-14T10:24:50 | 2019-09-14T10:24:50 | 196,807,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 885 | py | if __name__ == "__main__":
user_cred = {"first_name": "CH", "last_name": "MO", "age": "23", "DOB": "09_06_1995"}
user_choice = ""
while user_choice not in ["q", "Q"]:
print("Choice list are [first_name, last_name, age, DOB]")
user_choice = input("Enter required choice about user from above l... | [
"i_mushir@yahoo.com"
] | i_mushir@yahoo.com |
6d9698a8e5d76ee207b9f016d158c8f60490855a | e59fe240f0359aa32c59b5e9f581db0bfdb315b8 | /galaxy-dist/lib/galaxy/datatypes/dataproviders/line.py | 4d2e127b0d25809f6e0cdf2b8be7d2815fe3118b | [
"CC-BY-2.5",
"AFL-2.1",
"AFL-3.0",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | subway/Galaxy-Distribution | dc269a0258471597d483687a0f1dd9e10bd47448 | d16d6f9b6a8b7f41a218c06539863c8ce4d5a73c | refs/heads/master | 2021-06-30T06:26:55.237251 | 2015-07-04T23:55:51 | 2015-07-04T23:55:51 | 15,899,275 | 1 | 2 | null | 2020-10-07T06:17:26 | 2014-01-14T10:47:28 | Groff | UTF-8 | Python | false | false | 9,820 | py | """
Dataproviders that iterate over lines from their sources.
"""
import collections
import os
import re
import base
_TODO = """
line offsets (skip to some place in a file) needs to work more efficiently than simply iterating till we're there
capture tell() when provider is done
def stop( self ): self.en... | [
"sabba_88@hotmail.com"
] | sabba_88@hotmail.com |
f8e5b320e8198923ad84a62d89d775938415cf9e | 78144baee82268a550400bbdb8c68de524adc68f | /Production/python/Summer16v3/RPV_2t6j_mStop-1350_mN1-100_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_cff.py | 94e229e052edb7c2b1f501d37222ad355e1e7f1b | [] | no_license | tklijnsma/TreeMaker | e6989c03189b849aff2007bad22e2bfc6922a244 | 248f2c04cc690ef2e2202b452d6f52837c4c08e5 | refs/heads/Run2_2017 | 2023-05-26T23:03:42.512963 | 2020-05-12T18:44:15 | 2020-05-12T18:44:15 | 263,960,056 | 1 | 2 | null | 2020-09-25T00:27:35 | 2020-05-14T15:57:20 | null | UTF-8 | Python | false | false | 3,217 | py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIISummer16Mi... | [
"Chris_Madrid@Baylor.edu"
] | Chris_Madrid@Baylor.edu |
b229e11ea5be1cdc073602fcb75a6ced1a797324 | 9599be777ada06882df37b6ebe3c0e78c6ccadb2 | /pyramid_soy/__init__.py | cafe94c3fdb28fd3e90486537528300e92077f99 | [] | no_license | winkidney/pyramid_soy | 571b59192fff2ce501cf0f8933e186bdd66a8103 | 544b50ea3d9077294c860632abf4ed0e82f57f17 | refs/heads/master | 2020-05-17T20:00:30.150273 | 2014-12-03T07:04:42 | 2014-12-03T07:04:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,109 | py | # -*- coding:utf-8 -*-
import os
from soy.tofu import SoyTofu
__author__ = 'winkidney'
class SoyRender(object):
_cache = {}
_paths = ['.']
class TemplateNotFound(ValueError):
pass
@classmethod
def render(cls, template_name, name_space, **data):
"""
:param template_name:... | [
"winkidney@gmail.com"
] | winkidney@gmail.com |
1bc1fcd3459a9faa7e501e0da16fc16795e8d0fe | 241c51904c2501a85e71da62d4a9a79f8656dbb4 | /transformers/models/ctrl/configuration_ctrl.py | ea6bedb7067a26303408926ecb33c5a8c490ffe3 | [
"Apache-2.0"
] | permissive | zhouhaoyi/TripletAttention | c3d7a37b00d80286e802324859156841f33841d0 | 84bb8d7a7a45dfd37c82849c9ae6ed8a41bb0718 | refs/heads/main | 2023-08-25T22:35:59.828152 | 2021-10-27T04:27:13 | 2021-10-27T04:27:13 | 374,306,104 | 15 | 3 | Apache-2.0 | 2021-09-19T08:33:38 | 2021-06-06T08:22:35 | null | UTF-8 | Python | false | false | 5,824 | py | # coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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
#
# htt... | [
"1095715895@qq.com"
] | 1095715895@qq.com |
0b0f5f71a926cc4a1eadf188a9c9447cda0a17e5 | 2d2c10ffa7aa5ee35393371e7f8c13b4fab94446 | /projects/ai/sentiment2/ensemble/ensemble-cv.py | 25ba05335b7d9f0a28355b8d0b5327ad9d7e3305 | [] | no_license | faker2081/pikachu2 | bec83750a5ff3c7b5a26662000517df0f608c1c1 | 4f06d47c7bf79eb4e5a22648e088b3296dad3b2d | refs/heads/main | 2023-09-02T00:28:41.723277 | 2021-11-17T11:15:44 | 2021-11-17T11:15:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27,205 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
# \file ensemble.py
# \author chenghuige
# \date 2018-09-15 19:0num_classes:21.026718
# \Description ensemble by OOF score blend per attribute
# ==========... | [
"chenghuige@gmail.com"
] | chenghuige@gmail.com |
09a172f30ea228b54646b7683161b284f8f44197 | 6780ffed2e9e1680ade3fd7b9765c6c778e5498a | /mc_DT-1100-111111_CMSSW_9_2_1_13TeV_39M_01_report.py | 8865bb9e092af990dd9958700e0b9df206fce18b | [] | no_license | rymuelle/MA_chamber_stats_study- | e776f390de97fcffedc52b8586824cd404d8a251 | ca831c95c4111c56422e7accf85e0eae02f3056f | refs/heads/master | 2021-01-21T15:14:25.807625 | 2017-08-01T19:51:32 | 2017-08-01T19:51:32 | 95,379,340 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629,715 | py | nan = None; NAN = None
nan = 0
reports = []
class ValErr:
def __init__(self, value, error, antisym):
self.value, self.error, self.antisym = value, error, antisym
def __repr__(self):
if self.antisym == 0.:
return "%g +- %g" % (self.value, self.error)
else:
return... | [
"rmueller@physics.tamu.edu"
] | rmueller@physics.tamu.edu |
97ae43a08d031fa6937524771fea8677e171c00d | da130508b04587493424d6c95ab05a55dd70170f | /supervised_learning/0x08-deep_cnns/7-densenet121.py | d3f09ef1a2dc69e035d577cef1db680e36964e14 | [] | no_license | AndrewKalil/holbertonschool-machine_learning | ea38c0d1ef6ce2206da5f3903fcc22730404af9c | bb980395b146c9f4e0d4e9766c4a36f67de70d2e | refs/heads/master | 2023-07-09T04:09:24.271069 | 2021-08-11T02:29:54 | 2021-08-11T02:29:54 | 317,371,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,425 | py | #!/usr/bin/env python3
""" Deep Convolutional Neural Networks """
import tensorflow.keras as K
dense_block = __import__('5-dense_block').dense_block
transition_layer = __import__('6-transition_layer').transition_layer
def densenet121(growth_rate=32, compression=1.0):
""" builds the DenseNet-121 architecture as de... | [
"1541@holbertonschool.com"
] | 1541@holbertonschool.com |
97d349b6a6103b67ab1f57a77e07395628383630 | 1d96db84225301d972f07cad95c2a13f4fbafa84 | /python/my_PyFeyn/dark_matter/gen_diagrams.py | 276c33933fcbd57632a7e3b0b49d426178d67306 | [] | no_license | mattbellis/matts-work-environment | 9eb9b25040dd8fb4a444819b01a80c2d5342b150 | 41988f3c310f497223445f16e2537e8d1a3f71bc | refs/heads/master | 2023-08-23T09:02:37.193619 | 2023-08-09T05:36:32 | 2023-08-09T05:36:32 | 32,194,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | from dm_interactions import *
tag = "_blk_bkg"
# Dark Matter
'''
for i in range(0,4):
dm_diagrams("dm_interactions"+tag, i)
'''
for i in range(0,2):
dm_decays("dm_decays"+tag, i)
| [
"matthew.bellis@gmail.com"
] | matthew.bellis@gmail.com |
b0282cc2b1532454829215c9cc0aa502200758af | f8cf0f8d3ca1784b59fff380b99c4fa4da225389 | /test/scan.py | d10e2fa10870808fafd82da726180dafd5d34d3c | [] | no_license | loveguan/mysite | 6f3c10c9bd1780a6a3c789c03ef66a10b186da92 | 7217b0e111626af0e6afddd0bc405705cf9641ca | refs/heads/master | 2021-01-01T20:49:45.367058 | 2018-02-05T14:19:42 | 2018-02-05T14:19:42 | 98,939,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 790 | py | """
@version: ??
@author: Guanjie Zhou
@license: Apache Licence
@file: dis_port_threading.py
@time: 17-5-27 上午8:21
"""
import socket
import threading
import time
import smtplib
from email.mime.text import MIMEText
from email.header import Header
sender = '15063176713@139.com'
receiver = ['15063176713@139.com' ]
sub... | [
"zhouguanjie@qq.com"
] | zhouguanjie@qq.com |
eb49a63e2b18d99602d1e71567ac07864d54233c | b7125b27e564d2cc80a2ce8d0a6f934aa22c8445 | /.history/sudoku_20201029190059.py | 0e6ffad04a248d94b78a1962b634a40ffa800284 | [] | no_license | JensVL96/Puzzle-solver-for-fun | 4c15dcd570c3705b7ac555efb56b52913e81083c | 6d8a4378a480372213a596a336a4deca727a00fc | refs/heads/master | 2021-07-15T05:19:42.185495 | 2020-11-08T13:59:49 | 2020-11-08T13:59:49 | 224,855,888 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,738 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import pygame as pg
from random import sample
from config import *
from string import *
import numpy as np
class create_board():
def __init__(self):
self.base = 3 # Will generate any size of random sudoku board in O(n^2) time
self.side... | [
"jle040@uit.no"
] | jle040@uit.no |
f12724f30bfa0f3199e511d8b05ffc04ac51dccd | f5f7a1ae04a999f3f193cca647397b29806edf73 | /0000_book/math_rodorigues.py | 1ff937cb1fb85daa008091759102bb064594c7a4 | [
"MIT"
] | permissive | kazuki0824/wrs | bf88d1568f591c61870332436bfcd079d78b87d7 | 03c9e59779a30e2f6dedf2732ad8a46e6ac3c9f0 | refs/heads/main | 2023-07-24T05:20:02.054592 | 2021-05-31T14:38:18 | 2021-05-31T14:38:18 | 368,829,423 | 1 | 0 | MIT | 2021-05-19T10:25:48 | 2021-05-19T10:25:47 | null | UTF-8 | Python | false | false | 3,624 | py | import visualization.panda.world as wd
import modeling.geometric_model as gm
import basis.robot_math as rm
import math
import numpy as np
rotmat = rm.rotmat_from_euler(math.pi / 3, -math.pi / 6, math.pi / 3)
ax, angle = rm.axangle_between_rotmat(np.eye(3), rotmat)
rotmat2 = rm.rotmat_from_axangle(ax, math.pi/6)
# cros... | [
"wanweiwei07@gmail.com"
] | wanweiwei07@gmail.com |
7970183140f00d66e67f434bbbbf5bfc516bb952 | 51d7ac14805eaaa9fe9082231d9bd1953d54763a | /Common/make_results.py | 48c2ade481407473f2999cef8c34f6ef9bec240e | [] | no_license | cccccsf/Masterarbeit | d00c62802a04d771c0a5571aca1cbbfb2eaa9b70 | b9bb8a850af5e8e3bad74808b5ada0ee76701965 | refs/heads/master | 2020-04-17T04:40:41.242420 | 2019-11-20T12:52:53 | 2019-11-20T12:52:53 | 166,240,833 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,097 | py | #!/usr/bin/python3
import os
import csv
import json
def creat_json_file(path, filename='results.json'):
json_file = os.path.join(path, filename)
if not os.path.exists(json_file):
info = {}
with open(json_file, 'w') as f:
json.dump(info, f, indent=4)
else:
pass
def rec... | [
"cccccsf@hotmail.com"
] | cccccsf@hotmail.com |
7f8fc08e59e24d12623a05fdcd90937fe07a0532 | 6bb9d7c80457cddc1f90ddf901d6eb9ad9ede0c3 | /day23/task.py | caab0e9f4c5c429c1495e7e367aaa3e044d0e8a0 | [] | no_license | NameTakenAgain/AoC2020 | 0c13a552bc29df62abfbda34b9790b1dbabf99e3 | 510ea6794412abf7076a1bfd80866b9f22f1b7e1 | refs/heads/main | 2023-02-07T21:56:58.610669 | 2021-01-01T12:52:52 | 2021-01-01T12:52:52 | 325,966,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | from re import sub
sub1 = [0,9,1,2,3,4,5,6,7,8] + [0]*38 + [0,9,1,2,3,4,5,6,7,8]
add1 = [0,2,3,4,5,6,7,8,9,1] + [0]*38 + [0,2,3,4,5,6,7,8,9,1]
def move(cups, current):
cc = cups + cups
pickup = cc[current:current + 3]
newcups = sub("[%s]" % pickup, "", cups)
dest = sub1[ord(cc[current - 1])]
while... | [
"you@example.com"
] | you@example.com |
b72ecd721343e4f3e919e94f2fefc2d61da2e51e | 6622c0cd289ec73078d5cf1cb88d9246160087ef | /src/day08/Bubble_sort.py | a1193d4869f3d8b0089612e656cefcb820dcbd63 | [] | no_license | chifeng111/python_demo | 366540e8b284b4d3f2ac2377a9187a4be45192b5 | af3404935aa7148b7eb41e63b5bb782d5995e01b | refs/heads/master | 2021-01-02T08:53:53.033682 | 2017-10-14T12:34:22 | 2017-10-14T12:34:22 | 98,880,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | # -*- coding:utf-8 -*-
def BubbleSort(l):
for i in range(len(l), 1,-1):
for j in range(1, i):
if l[j] < l[j-1]:
l[j], l[j-1] = l[j-1], l[j]
if __name__ == "__main__":
print("请输入需要排序的数字,用空格相连:")
l = input().split(" ")
l = [int(i) for i in l]
Bubbl... | [
"liaozhenhua1129@gmail.com"
] | liaozhenhua1129@gmail.com |
86f544bfd8e40deb5221cb4007bcd6c21947da1b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02572/s657949812.py | 7f05aa2ab036a54544ef735172c086c4c70a9451 | [] | 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 | 164 | py | N = int(input())
A = list(map(int, input().split()))
ans = 0
u = 0
mod = 10**9+7
for i in range(N) :
ans += A[i] * u % mod
u += A[i] % mod
print(ans % mod) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
407ffaf5427eb4f5f2548cf87c709bd86b3d0184 | b44d20c67f9acd5842a1b33245829df2c56477e9 | /lesson03/manager.py | 71effac8dc922da03726697f5cdc213c4a1e805c | [] | no_license | yxdragon/python_study | c6f344b2ab0776e97a4527a21b7b78a39dabf7e0 | 0fdea17598c8d1338919aa66e61a6a0f507bdc83 | refs/heads/master | 2021-09-03T20:12:36.808985 | 2018-01-11T17:09:13 | 2018-01-11T17:09:13 | 113,181,903 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | import washer06
from washer06 import wash_dry
#from washer06 import wash_dry as wash
from washer06 import *
#washer06.wash_dry('衣服')
#wash_dry('衣服')
#wash('衣服')
wash = 5
print(wash)
| [
"imagepy@sina.com"
] | imagepy@sina.com |
1c78e8615139684708ba052e1befa0b26d50e51f | e68e9a9b7aebe3f1a550e6645ff4ab65b285c24e | /FireAway/FireCheck/migrations/0001_initial.py | 8e67591b560d7a5cb3e62030b1c62251a2006710 | [] | no_license | shubham2637/FireAway | d35b1c56a2eb5b7c6ce7be62777f518232c9d1a9 | 7fcd2e68c204760f5c9f95c45d2971c137ed9dbe | refs/heads/master | 2022-10-05T21:18:30.929840 | 2019-04-13T06:54:53 | 2019-04-13T06:54:53 | 180,965,841 | 1 | 0 | null | 2022-09-23T22:21:53 | 2019-04-12T08:33:58 | JavaScript | UTF-8 | Python | false | false | 3,222 | py | # Generated by Django 2.1.7 on 2019-04-12 19:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='building',
... | [
"shubham37@outlook.com"
] | shubham37@outlook.com |
d3d8c87155b1ece8d7928ad4b112b31e0d9e9a96 | b2cefb7a2a83aa93ee1b15a780b5ddf6c498215b | /scripts/speech_recognition/convert_to_tarred_audio_dataset.py | d9eaad57b86f753d358b7156f4a035601b067159 | [
"Apache-2.0"
] | permissive | VahidooX/NeMo | bfde8c9b48c818342a9c6290fb9dee62fafeca38 | 866cc3f66fab3a796a6b74ef7a9e362c2282a976 | refs/heads/main | 2023-07-23T19:13:39.948228 | 2022-04-29T21:51:54 | 2022-04-29T21:51:54 | 227,733,473 | 1 | 2 | Apache-2.0 | 2022-09-15T15:30:13 | 2019-12-13T01:55:21 | Jupyter Notebook | UTF-8 | Python | false | false | 27,981 | py | # Copyright (c) 2020, NVIDIA CORPORATION. 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... | [
"noreply@github.com"
] | VahidooX.noreply@github.com |
79076bae6a57de2a59594729530a011a5d8c7302 | c7a1c1ae40e9d95dfb92251dcfbf3c5010e6ba81 | /mote-examples/cpu.py | 9f33f57bd87b22dbf6513bde0b6285ede065fd15 | [] | no_license | pranavlathigara/Raspberry-Pi-DIY-Projects | efd18e2e5b9b8369bb1a5f5418782480cf9bc729 | 0c14c316898d4d06015912ac4a8cb7b71a3980c0 | refs/heads/master | 2021-04-06T09:14:28.088223 | 2018-02-19T00:15:22 | 2018-02-19T00:15:22 | 124,649,553 | 1 | 2 | null | 2018-03-10T11:30:59 | 2018-03-10T11:30:59 | null | UTF-8 | Python | false | false | 856 | py | # Adapted from blinkt example
import math
import time
try:
import psutil
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install psutil")
from mote import Mote
mote = Mote()
mote.configure_channel(1, 16, False)
mote.configure_channel(2, 16, False)
mote.con... | [
"tdamdouni@users.noreply.github.com"
] | tdamdouni@users.noreply.github.com |
1e1f65d9cd6970c8f4793fa1bf2972b9c2d9520f | 6cc2d3b96819074f703fc0538dbe54c6bf63f29e | /project_scripts/NMF_PCL_prep.py | 30760e94a15885a511e056669710735c53757a46 | [] | no_license | lhogstrom/jailbird | 197685ed1760cf782bf68b2b8bd1cc343f317c11 | c768c40a8caee2367190fab436810d926daee59d | refs/heads/master | 2016-09-02T03:52:50.877322 | 2014-07-29T17:45:26 | 2014-07-29T17:45:26 | 9,912,211 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,166 | py | '''
-make an expression matrix of the top intra-connecting PCL groups
-use this for Pablo's NMF analysis
Larson Hogstrom, 11/2013
'''
import test_modules.pcla_svm_classifier as psc
import numpy as np
import pylab as pl
from sklearn import svm, datasets
from matplotlib import cm
import matplotlib.pyplot as plt
import c... | [
"hogstrom@broadinstitute.org"
] | hogstrom@broadinstitute.org |
533970ac54d2061146487230cc5eba71865cb505 | ceab178d446c4ab55951c3d65d99815e9fdee43a | /plotting/moving_lsp/map_change_video.py | 455f37067fa36a012ece5d0f679216140e98bcc1 | [] | no_license | DeneBowdalo/AtmosChem_Tools | 01ecedb0df5c5d6e01966a0c3d8055826f5ac447 | 220c2f697a4f4c1e5443c336ede923b2004fe9f5 | refs/heads/master | 2021-01-10T18:05:30.800218 | 2017-02-06T16:08:14 | 2017-02-06T16:08:14 | 43,529,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,170 | py | #import matplotlib
#matplotlib.use('Agg')
import numpy as np
import glob
import string
import os
import sys
import matplotlib.pyplot as plt
from scipy.fftpack import fft,fftfreq, rfft
from mpl_toolkits.basemap import Basemap, shiftgrid
from matplotlib.patches import Polygon
from matplotlib.colors import LogNorm
from cm... | [
"db876@earth0.york.ac.uk"
] | db876@earth0.york.ac.uk |
a8c188860321d5f6f08193ab64bd5f554f6aa15e | c6b15c628a185d9f71c91543aac3a90495152c09 | /Schulung/py01_einführung/f107_list_dict.py | 4cec408492a81841eb8d512822280e00e98022c7 | [] | no_license | reichlj/PythonBsp | 3e47d3b22b75cf1f67d3e47b83b125a1ddbc518d | 51c25370495d3a8847f46a9de1bc8e0d811ae5a7 | refs/heads/master | 2021-06-12T22:32:15.365906 | 2021-05-08T20:44:01 | 2021-05-08T20:44:01 | 173,499,716 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | k = ['a', 'b', 'c', 'd']
v = [232, 343, 543, 23]
print(type(zip(k,v)))
print(list(zip(k,v)))
print(dict(zip(k,v)))
| [
"jakobreichl@gmail.com"
] | jakobreichl@gmail.com |
b281846886cb3dfab470e07f279e54db17e29443 | a9e3f3ad54ade49c19973707d2beb49f64490efd | /Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/verify_student/migrations/0009_remove_id_verification_aggregate.py | 4f89401b0f818acbb005b86725c79341a5cf0b39 | [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | luque/better-ways-of-thinking-about-software | 8c3dda94e119f0f96edbfe5ba60ca6ec3f5f625d | 5809eaca7079a15ee56b0b7fcfea425337046c97 | refs/heads/master | 2021-11-24T15:10:09.785252 | 2021-11-22T12:14:34 | 2021-11-22T12:14:34 | 163,850,454 | 3 | 1 | MIT | 2021-11-22T12:12:31 | 2019-01-02T14:21:30 | JavaScript | UTF-8 | Python | false | false | 580 | py | # Generated by Django 1.11.12 on 2018-04-27 16:27
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('verify_student', '0008_populate_idverificationaggregate'),
]
operations = [
migrations.RemoveField(
model_name='idverificationaggrega... | [
"rafael.luque@osoco.es"
] | rafael.luque@osoco.es |
6be01d2419a30d9e5343415eb892c226e50fb8d7 | 7fde4884897619ba5ad02d2d89e5efd31085dfb3 | /tests/dex/dex_test.py | d7bc152b15ade3d290a34c4570d6872d1bca1483 | [
"Apache-2.0"
] | permissive | tsarpaul/LIEF | d184de6f5bcb7ee966a8cff3bf4d9141b356e794 | de934b0f64e0304e78ef4d9d77ec5c16616c49c2 | refs/heads/master | 2022-11-19T03:45:52.534171 | 2020-07-17T21:54:36 | 2020-07-17T21:54:36 | 276,966,892 | 1 | 0 | Apache-2.0 | 2020-07-03T18:47:14 | 2020-07-03T18:47:13 | null | UTF-8 | Python | false | false | 4,589 | py | #!/usr/bin/env python
import unittest
import lief
import logging
import pprint
import json
import os
from lief import Logger
Logger.set_level(lief.LOGGING_LEVEL.FATAL)
#Logger.set_level(lief.LOGGING_LEVEL.DEBUG)
from unittest import TestCase
from utils import get_sample
CURRENT_DIR = os.path.abspath(os.path.dirname(... | [
"romainthomasc@gmail.com"
] | romainthomasc@gmail.com |
ccff38b14547382ff03aa54aab55c41fe6669f37 | 7f7efb509c9647bd66546499ae1049e11fe78277 | /Thirdproject/Thirdproject/urls.py | ba0e9adf3467be6c56b1664d4468cb0a2ec8bb46 | [] | no_license | janardhanvissa/Django_prac | fb5a967eba311b0703ebd0128acaf47cb93ae543 | 00d8ce4141eef8bfa12553b5c8e180d45224d906 | refs/heads/master | 2022-09-08T14:26:02.317817 | 2020-05-21T18:30:27 | 2020-05-21T18:30:27 | 265,869,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | """Thirdproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/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-... | [
"janardhan1819@gmail.com"
] | janardhan1819@gmail.com |
4c6c49c9ac1f25f8de048094d4cb21205ee52b32 | 7e157b3bffb170ff87e29880611be9b040d61a27 | /purano/annotator/processors/elmo.py | f8c85bf55e6e3e0561de75498a51a34898bb6933 | [
"Apache-2.0"
] | permissive | IlyaGusev/purano | 8906d5e35e8a4f0f31144d874721d4e9e5f76359 | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | refs/heads/master | 2022-06-21T09:57:45.624005 | 2021-07-27T18:41:37 | 2021-07-27T18:41:37 | 212,185,927 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,771 | py | from typing import List
import numpy as np
import torch
import pyonmttok
from purano.annotator.processors import Processor
from purano.models import Document
from purano.proto.info_pb2 import Info as InfoPb
@Processor.register("elmo")
class ElmoProcessor(Processor):
def __init__(self, options_file: str, weight_... | [
"phoenixilya@gmail.com"
] | phoenixilya@gmail.com |
e655845cb167884f93f61665b8c96d28da3a4b15 | 55332445398a628deb727512a8c16e987679d114 | /solvcon/io/gmsh.py | e7fdf84a603bdc84ea6dac20b2e470ef3d0eed1e | [
"BSD-3-Clause"
] | permissive | tai271828/solvcon | 35854bea00812b9902565c33ef23f8c0cb978b45 | bd9d3915dfd8b1c639e4fc8f733ecb93cedb80f3 | refs/heads/master | 2022-12-05T06:56:01.129745 | 2022-02-07T15:42:51 | 2022-02-07T15:42:51 | 49,277,804 | 0 | 1 | null | 2016-01-08T14:53:49 | 2016-01-08T14:53:49 | null | UTF-8 | Python | false | false | 24,245 | py | # -*- coding: UTF-8 -*-
#
# Copyright (c) 2011, Yung-Yu Chen <yyc@solvcon.net>
#
# 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 copyrigh... | [
"yyc@solvcon.net"
] | yyc@solvcon.net |
8b1cd467029d92a1ffe19ca686fea4e488c042ca | bad62c2b0dfad33197db55b44efeec0bab405634 | /sdk/ml/azure-ai-ml/azure/ai/ml/_internal/entities/runsettings/itp_configuration.py | c7262f22c481dcabbfcdc07ada55823c766e4353 | [
"LicenseRef-scancode-python-cwi",
"LGPL-2.1-or-later",
"PSF-2.0",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"Python-2.0",
"MPL-2.0",
"LicenseRef-scancode-other-copyleft",
"HPND",
"ODbL-1.0",
"GPL-3.0-only",
"Z... | permissive | test-repo-billy/azure-sdk-for-python | 20c5a2486456e02456de17515704cb064ff19833 | cece86a8548cb5f575e5419864d631673be0a244 | refs/heads/master | 2022-10-25T02:28:39.022559 | 2022-10-18T06:05:46 | 2022-10-18T06:05:46 | 182,325,031 | 0 | 0 | MIT | 2019-07-25T22:28:52 | 2019-04-19T20:59:15 | Python | UTF-8 | Python | false | false | 5,203 | py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from typing import List
from azure.ai.ml.entities._job.job_resource_configuration import BaseProperty
class ITPResourceConfiguration(Base... | [
"noreply@github.com"
] | test-repo-billy.noreply@github.com |
d4026f8aa9ca5fc8f0ab0660bdf598c55cf927ea | 19f698ab74cba74ae52c780f5986d273fb319308 | /Baekjoon/2차원배열과연산.py | 315790347c886910ae76ccf3aa8268b4ce504aec | [] | no_license | naye0ng/Algorithm | 15023f1070eb7cc5faca9cf7154af2ecffab92c2 | 1e8848e3e2574b01dc239212ea084b0a4837bc03 | refs/heads/master | 2021-06-25T14:18:46.117411 | 2020-10-16T10:47:37 | 2020-10-16T10:47:37 | 149,326,399 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,715 | py | """
이차원배열과연산
https://www.acmicpc.net/problem/17140
"""
def isNotWall(x,y) :
global row, col
if x < 0 or x >= row :
return False
if y < 0 or y >= col :
return False
return True
# 행단위 연산
def sortedByRow(col) :
global A
new_A = [ [] for _ in range(len(A))]
for x in range(len(A)... | [
"nayeong_e@naver.com"
] | nayeong_e@naver.com |
765f46485c2ab3d0693ffc67e897e4e003b21885 | c3432a248c8a7a43425c0fe1691557c0936ab380 | /21_05/FirstWeek/kakao3.py | 85603f6b0f6ecf22359f21503b02f5a5440cc5d4 | [] | no_license | Parkyunhwan/BaekJoon | 13cb3af1f45212d7c418ecc4b927f42615b14a74 | 9a882c568f991c9fed3df45277f091626fcc2c94 | refs/heads/master | 2022-12-24T21:47:47.052967 | 2022-12-20T16:16:59 | 2022-12-20T16:16:59 | 232,264,447 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 875 | py | def solution(n, k, cmd):
answer = ['O'] * n
del_stack = []
arr = [i for i in range(n)]
curr = k
for curr_cmd in cmd:
curr_cmd = curr_cmd.split()
cmd_length = len(curr_cmd)
if curr_cmd[0] == 'D':
curr += int(curr_cmd[1])
elif curr_cmd[0] == 'U':
... | [
"pyh8618@gmail.com"
] | pyh8618@gmail.com |
f11d55b86700de530410dc61a5862b5eea236fb3 | 49491fc0a4998479b2fdb34c6375b349c705c743 | /source/conf.py | b0cc763f20a3be044c26782267aded4b1d83421f | [] | no_license | SunnerLi/Torchvision_sunner_book | 58cc19d7672b5c7cb51bafda8ca7b09866addd0b | 4058ee7ff8e03b47b3e0406819bdd901327321e4 | refs/heads/master | 2020-03-28T19:11:01.062540 | 2019-02-13T13:50:04 | 2019-02-13T13:50:04 | 148,952,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,260 | py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | [
"a6214123@gmail.com"
] | a6214123@gmail.com |
f86e389034899f7cf4e9618b8c4cc35bc84c396b | 10d98fecb882d4c84595364f715f4e8b8309a66f | /uq_benchmark_2019/cifar/run_predict.py | c5e11fe1ffb25de64ccfbb29ce98ab6260a07267 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | afcarl/google-research | 51c7b70d176c0d70a5ee31ea1d87590f3d6c6f42 | 320a49f768cea27200044c0d12f394aa6c795feb | refs/heads/master | 2021-12-02T18:36:03.760434 | 2021-09-30T20:59:01 | 2021-09-30T21:07:02 | 156,725,548 | 1 | 0 | Apache-2.0 | 2018-11-08T15:13:53 | 2018-11-08T15:13:52 | null | UTF-8 | Python | false | false | 3,100 | py | # coding=utf-8
# Copyright 2021 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 |
bdc624ec5635b3593d4d4c2d073aad1203788af2 | b19f1a0ed3b26f0b5cbc2a0b7db2141edc955901 | /auto_test/Case_rbm/case1/index.py | 106ace4226a0d0221635014d2b573d0d5c6b3a05 | [] | no_license | wangqian0818/auto_test_platform | 5a1f04cbf6007e6ff3dbb74e838981de53491526 | 64e32099ac2d79fb70d3727b085465aac0e49d3f | refs/heads/master | 2023-04-26T23:39:04.232001 | 2021-05-22T12:23:02 | 2021-05-22T12:23:02 | 368,116,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 989 | py | #coding:utf-8
#设置初始环境
#抓包:接口名称,过滤规则,抓包数量,报文命名(以用例名称.pcap命名)
pre_env={
"capture":["enp3s00","tcp",1,"test_a1.pcap"]
}
#配置下发
#列表里面的顺序依次为:查询命令,预期结果
case_step={
"step1":["tupleacl --get","1 192.168.11.250 0 192.168.20.250 8889 6 1 0 1 0 0 0 0 0 0 0 0... | [
"wangqianjob0818@163.com"
] | wangqianjob0818@163.com |
b24622cfc2ad20a00b5a712ac41ab79fb5416d27 | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/datashare/v20191101/blob_data_set_mapping.py | e92c0869700ef77818a2e4e10aaa1df3552cd000 | [
"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 | 19,611 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
3870a6da074a1706d537d5c35bcb03537598b920 | 2923b9f58e6a143a3e070169612165585c301def | /high_f/la_habra_small_8m_gpu_dm_abc50/v_max.py | 1e84584505afd72a21578402ecae38e5e8b6bccd | [] | no_license | hzfmer/summit_work_021421 | 16536dd716519bc9244da60007b9061ef5403429 | 6981b359fefb2af22e0bea6c47511de16cad22bd | refs/heads/master | 2023-03-11T15:34:36.418971 | 2021-02-05T23:22:10 | 2021-02-05T23:22:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,422 | py | #!/usr/bin/env python
'''
Maximum of vp in mesh, assuming the last several layers
'''
import numpy as np
from sys import argv, exit
if len(argv) != 2:
print(f"Usage:{argv[0]} + velocity mesh")
exit
if "large" in argv[1]:
nx = 9000
ny = 6750
elif "small" in argv[1]:
nx = 1400
ny = 1400
nz = 5... | [
"hzfmer94@gmail.com"
] | hzfmer94@gmail.com |
400aac4296a50da88e95a6b9abe6f1c5ed7dbd22 | d0450de46c5d1109cce43674aeafadd40d9b25bd | /case/SDA/test_04.py | 610030c8c6189de6165a9cd1ddc019820d7a8c42 | [] | no_license | xiaoxiangLiu/test | e45e3726835fd3a8a0856ea11f48f8787983a0c8 | 29f04fc05d4c1d8c950d726861b1884892cfbf58 | refs/heads/master | 2022-12-10T11:04:50.152254 | 2019-04-26T02:02:55 | 2019-04-26T02:02:55 | 183,725,747 | 0 | 0 | null | 2022-12-08T03:02:14 | 2019-04-27T03:56:26 | Python | UTF-8 | Python | false | false | 1,214 | py | __author__ = '123'
# coding=utf-8
import unittest
from common._mytest import MytestOnePlayer
from common.tools import init_environment_213
from common.names import names
from common.logger import logger
from common.jsonparser import JMESPathExtractor
from common.params import *
base, mysql_type, redis_type, sda_id = i... | [
"38720034@qq.com"
] | 38720034@qq.com |
f7bd4fe0713abb4210f5ef2ea6df37b0f5ae896c | 07e6fc323f657d1fbfc24f861a278ab57338b80a | /python/pySimE/space/exp/pykep/analyze_Asteroids2.py | 951f06f48f054eb4cacbe1d46acaabf530e6148b | [
"MIT"
] | permissive | ProkopHapala/SimpleSimulationEngine | 99cf2532501698ee8a03b2e40d1e4bedd9a12609 | 47543f24f106419697e82771289172d7773c7810 | refs/heads/master | 2022-09-05T01:02:42.820199 | 2022-08-28T10:22:41 | 2022-08-28T10:22:41 | 40,007,027 | 35 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,935 | py |
from PyKEP import *
from pylab import *
maxlines=1000000
iline = 0
#infile = open('/home/prokop/Desktop/MPCORB.DAT')
infile = open('D:\\know\\Technika\\SpaceTech\\Asteroids\\Datafiles\\MPCORB.DAT')
for i in range(41):
line = infile.readline()
#print "---",i,"---",line
def toScale( x, xmin, xmax, nsteps ):
if... | [
"ProkopHapala@gmail.com"
] | ProkopHapala@gmail.com |
1ed3a01f60e722a7bbf8143c76a7993e32713e2b | 9e81487dde334631fcc8b95e034c38acccd7ee2c | /profileapp/decorators.py | ec14cffc943d60296d43945810f7a8327593e7fd | [] | no_license | noeul1114/gis_5ban_1 | 4c52c9b2ee7a599e00b6a62a49cf97be5fabc6cb | de0f6aa13daefb98155fd8b545e7eef45e3139dc | refs/heads/master | 2023-08-15T16:00:06.784238 | 2021-10-07T01:40:53 | 2021-10-07T01:40:53 | 381,255,039 | 17 | 1 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | from django.http import HttpResponseForbidden
from profileapp.models import Profile
def profile_ownership_required(func):
def decorated(request, *args, **kwargs):
target_profile = Profile.objects.get(pk=kwargs['pk'])
if target_profile.user == request.user:
return func(request, *args, ... | [
"parkhyongsok@naver.com"
] | parkhyongsok@naver.com |
d91487ec1fbe26b680ba2f6ba015b21a6256f2bc | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03659/s184846679.py | cbe52c9d67ba3003c54d7d39a851ff7a197c4484 | [] | 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 | 917 | py | import math
from math import gcd,pi,sqrt
INF = float("inf")
import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
ce15198cc483f2afe70a934dfbd022d6b61a1285 | f17405a63adc5a74ffc06105bcca34851ea1036c | /0x08-python-more_classes/2-rectangle.py | b9794ed1094cf3010a06caa0a90fc509ff1b627f | [] | no_license | DiegoAlar/holbertonschool-higher_level_programming | 2b258067b2ec75ac88a8416b68e1d9ae388d70d5 | cffb44f8c2bca4335197f442748e4a1239808283 | refs/heads/master | 2020-09-29T04:20:04.422779 | 2020-05-15T00:40:26 | 2020-05-15T00:40:26 | 226,941,088 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,902 | py | #!/usr/bin/python3
""" This module contains class Rectangle
"""
class Rectangle:
"""
Class that defines a rectangle
"""
def __init__(self, width=0, height=0):
""" Init method to initialized private variables
Args:
width (int): width of the rectangle
hei... | [
"diegoaav@hotmail.com"
] | diegoaav@hotmail.com |
14af9a88ba94d291e93b5f19b5c02df39d76ad3f | 6c2909c6009eab2b486b717614d85cc524e2a829 | /code/day08/异常处理/exceptionF.py | 7c1602a1c45895074ca062591f056e28c8f51e1d | [] | no_license | huotong1212/mylearnpy | 7b936d71f9f98f35fcb23ec0dadedaf09d7da705 | 90f20daf4dd4265480b768795cdfc60e6ece866b | refs/heads/master | 2020-05-22T03:51:57.136413 | 2019-06-27T10:48:04 | 2019-06-27T10:48:04 | 186,219,994 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py |
def deal():
try:
print('try...')
r = 10 / int('2')
print('result:', r)
except ValueError as e:
print('ValueError:', e)
except ZeroDivisionError as e:
print('ZeroDivisionError:', e)
else:
print('no error!')
finally:
print('finally...')
prin... | [
"824011142@qq.com"
] | 824011142@qq.com |
48b0ce5a3378ae37ddfb94d126803ecbfa09eaec | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-2/2b5ad94a960f3558c4d38212efd32b2ae4e11615-<gather_disk_facts>-bug.py | d3b05b9028c103cb52d05e16137bb0d56628bd9d | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,341 | py |
def gather_disk_facts(self, vm_obj):
"\n Gather facts about VM's disks\n Args:\n vm_obj: Managed object of virtual machine\n\n Returns: A list of dict containing disks information\n\n "
controller_facts = dict()
disks_facts = dict()
if (vm_obj is None):
r... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
5c228a04ee3e7f934d639ada0a2ba04c3df4539c | 95d3c2e57e8b2e9691c385cf8c7bfc280adaf572 | /garnahata_site/cms_pages/migrations/0005_auto_20150702_0301.py | eb98c14e1689157198575fe7bbb55a474bd8753d | [
"MIT"
] | permissive | dchaplinsky/garnahata.in.ua | 850c52d4c8e697c19b6e3ba264ca25b48a769ccb | 02cd9772cdc4a99a24525b60ba1040b7343d76f6 | refs/heads/master | 2022-07-11T23:05:08.414036 | 2019-05-28T15:16:43 | 2019-05-28T15:16:43 | 35,701,644 | 9 | 4 | MIT | 2022-07-01T11:51:01 | 2015-05-15T23:25:35 | JavaScript | UTF-8 | Python | false | false | 1,961 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import cms_pages.models
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0010_change_page_owner_to_null_on_delete')... | [
"dchaplinsky@conversionscience.co.uk"
] | dchaplinsky@conversionscience.co.uk |
3e0a610d97f26e7c1f173f18c0ee676e0dc3df57 | 3449e5511dc8da19fc841af767dbe8d216e26ffb | /mmServer/shared/migrations/0022_auto.py | a237fd960843593038838e0e3f05bca6c3975061 | [] | no_license | erikwestra/mm-server | 8ba2af0ee7acd372949589b6f8d429099a38ea58 | bead1ad439541211e33fdc60264a869f18a99ae9 | refs/heads/master | 2021-01-10T21:14:23.636707 | 2015-05-27T21:22:54 | 2015-05-27T21:22:54 | 28,573,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,043 | py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Message.action'
db.add_column(u'shared_message', 'action'... | [
"ewestra@gmail.com"
] | ewestra@gmail.com |
2f3aeb4c5ead01ae759c87cfe52859b2cdd8a168 | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/Reconstruction/egamma/egammaValidation/share/egamma_art_checker_joboptions.py | 147b1bb99bc042dfd7d9004904d445b2e192f5ed | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,138 | py | #
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration.
#
from AthenaCommon.AppMgr import theApp
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaCommon.AlgSequence import AlgSequence
from GaudiSvc.GaudiSvcConf imp... | [
"rushioda@lxplus754.cern.ch"
] | rushioda@lxplus754.cern.ch |
291e56b2b33a60d70af47beb25c317d92d088dd4 | 23130cd12e38dbce8db8102810edaad70b240ae2 | /lintcode/573.py | cbf546603d2d68e80ec3fb170fde200533f183a8 | [
"MIT"
] | permissive | kangli-bionic/algorithm | ee6687c82101088db20f10fb958b4e45e97d3d31 | c3c38723b9c5f1cc745550d89e228f92fd4abfb2 | refs/heads/master | 2023-01-05T09:29:33.204253 | 2020-10-25T17:29:38 | 2020-10-25T17:29:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,918 | py | """
573. Build Post Office II
You cannot pass through wall and house, but can pass through empty.
You only build post office on an empty.
time limit exceeded
"""
import sys
class Category:
HOUSE = 1
WALL = 2
EMPTY = 0
class Solution:
"""
@param grid: a 2D grid
@return: An integer
"""
d... | [
"hipaulshi@gmail.com"
] | hipaulshi@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.