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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
556c12041b5bfbc25611e4d336cb5c75bf26346e | 088f76ed195918dcf35fe77d5832a75987cd183c | /modulos/db/migrations/0001_initial.py | cd415d70496dec49cf4ae7c400d93f41e5e01696 | [] | no_license | diegofer/alliance | 0b25c8771425c32bb2fe0a9930c69ce23ebdacf3 | 2810f3faf06cc21253e5db485e5980ffa6eeb585 | refs/heads/master | 2021-01-25T03:20:14.340425 | 2013-10-10T06:57:20 | 2013-10-10T06:57:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,639 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Region'
db.create_table(u'db_region', (
(u'id', self.gf('django.db.models.fields... | [
"diegofernando83@gmail.com"
] | diegofernando83@gmail.com |
1bbdf5c26fea911af2c6b0458b250f758bbb9475 | cf0d8d989da051a81afc60d9f4986c50c1462fb7 | /python高级/09迭代器和生成器/t03_gen_func.py | 84dca9e3fa12480dccad8bebaf5e585e7a7999cd | [] | no_license | pankypan/PythonNotes | 6a8da81a0e79f8bdc757f8493985321ef7873b44 | 48660b00b3b65cca409e61d34c32a024702d5a6e | refs/heads/master | 2023-04-29T01:51:12.930856 | 2021-05-13T00:43:33 | 2021-05-13T00:43:33 | 274,271,807 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | # 生成器函数,函数里只要有yield关键字
def gen_func():
yield 1
yield 2
yield 3
def fib(index):
if index <= 2:
return 1
else:
return fib(index - 1) + fib(index - 2)
def fib2(index):
re_list = []
n, a, b = 0, 0, 1
while n < index:
re_list.append(b)
a, b = b, a + b
... | [
"1356523334@qq.com"
] | 1356523334@qq.com |
2ab74c1ba61579a3956135b2dfce975ebe9e3e83 | c659ce50198ddab51dc6e105523d74c09f25face | /graph-analyzer/app/io/__init__.py | 4a6ac2824c0098e08b35a9a02cf9050f06555a4c | [] | no_license | YanzheL/deeparcher | a9c4e150fecbe7413e75bf1c710c169e0b052a2e | 85ae0de666ce05c41205748aeef40099e0a5116c | refs/heads/dev | 2023-06-23T22:34:05.864953 | 2021-02-09T05:48:34 | 2021-02-09T05:48:34 | 248,565,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from .cugraph import to_cugraph
from .dot import from_dot
from .dump import merge_attributes, dump_attributes
from .pb import to_pb_object, from_pb_object, to_pb, from_pb
| [
"lee.yanzhe@yanzhe.org"
] | lee.yanzhe@yanzhe.org |
ff9efbbad2390741fe268885986710d2b4db69f2 | 90dfecb740ebb354c56a1542945384b9b03eacf0 | /supplier/api/serializers.py | 8142392929fa410c7ffa642c2f2e37ed9d2ce931 | [] | no_license | sujatakhadka111/cycleEcommerce | 2cb688b77da916280792ed005580c8c1163a65ff | 0da3771a9c247b2d24bcd30ec12bd47a7f8f21fd | refs/heads/master | 2023-05-05T21:35:59.744465 | 2021-05-26T02:46:40 | 2021-05-26T02:46:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 954 | py | from rest_framework import serializers
from supplier.models import Supplier, Category, Cycle, Gallery
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = '__all__'
class SupplierSerializer(serializers.ModelSerializer):
class Meta:
model = S... | [
"programmertushant@gmail.com"
] | programmertushant@gmail.com |
6f07744254b0ab7acf4036bfef15f375bf52dbf4 | 2f09e893c3a21f4a17c95b99446d1efbf0b109f7 | /huaytools/utils/__init__.py | 9579bb4861c4c663a68bc19f1bb4b42632973cbb | [
"MIT"
] | permissive | knight134/huaytools | b19f0078e724963415c63d60218ae3cc624f598a | cbecd6771c05f8241e756a7619047589397b16d3 | refs/heads/master | 2020-04-24T18:30:27.732740 | 2018-05-27T13:51:24 | 2018-05-27T13:51:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,949 | py | """"""
import os
import sys
import pickle
import logging
from six.moves import urllib
from .bunch import Bunch, bunchify, unbunchify
from .time import *
def maybe_mkdirs(path, is_file=False, exist_ok=True):
"""递归创建文件夹
Args:
path (str): 待创建的路径,递归创建
is_file (bool): 是否为文件路径
exist_ok (b... | [
"imhuay@163.com"
] | imhuay@163.com |
4e7589cb121d96ff365d9ff81907befbb70cd588 | 6be29c75fe23bf38ac2df4125242e767fb37d41c | /utils/update_dependencies.py | 61e6dd1e408145cd15a7b25ccb672cfe3f3ca2dc | [
"Apache-2.0"
] | permissive | Laxman-SM/plaso | 579c7954b2622368427740e2b5687bf2efe249e7 | bec7b974ec9c2967be58fc704afca936591e46d3 | refs/heads/master | 2021-01-22T05:32:59.383909 | 2017-05-26T04:15:29 | 2017-05-26T04:15:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,694 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Script to update the dependencies in various configuration files."""
import os
import sys
# Change PYTHONPATH to include dependencies.
sys.path.insert(0, u'.')
import utils.dependencies # pylint: disable=wrong-import-position
class DependencyFileWriter(object):
"""De... | [
"joachim.metz@gmail.com"
] | joachim.metz@gmail.com |
64d1bc524c1d29a597ca9ba46e50836150601d42 | fb0f6646b2a7972454453907fbdc656b7471f55f | /p179_reversed_for01.py | 2562de9f1fb0f0a924ae944b4944cb4778b638d9 | [] | no_license | woojin97318/python_basic | 6497d5c85369746edfe8ca79ad7f3f47c871ee66 | 97e9a322a08f1483bf35dc03507ac36af2bf1ddb | refs/heads/master | 2023-07-15T03:06:05.716623 | 2021-08-25T03:46:48 | 2021-08-25T03:46:48 | 399,681,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 114 | py | # 역반복문
for i in range(4, 0 -1, -1):
# 출력합니다.
print("현재 반복 변수: {}".format(i)) | [
"woojin97318@naver.com"
] | woojin97318@naver.com |
4d753dfde319985d5ae4884af6dac0cbd1ef5e73 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_4_neat/16_0_4_aminoacid_fractalArt.py | 4489c1d81b9dac58e47b59005b9f5a80872dbaee | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 474 | py |
def fractalArt(K, C, S, inp):
if S == K:
print 'Case #%d:' % (inp + 1),
for i in xrange(1, S + 1):
print i,
print
elif 2 * S <= K:
print 'Case #%d:' % (inp + 1), 'IMPOSSIBLE'
else:
print 'Case #%d:' % (inp + 1),
for i in xrange(2, 2 + S):
... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
f0673b96822fd829a04400d223f9b5677c8fe4b1 | ec3e57d2c4de3522585176300366d4a74a971b8b | /0x16-api_advanced/1-top_ten.py | 70185f62bb9482ea23c602d5779d7844238172b3 | [] | no_license | moncada92/holberton-system_engineering-devops | 562657ebaea2a26fa0c3f874b5e88e7267c73528 | f40d3eb6fecbcf031e42b43afb716ac63d3b86a3 | refs/heads/master | 2020-12-23T03:37:03.172160 | 2020-10-08T01:27:14 | 2020-10-08T01:27:14 | 237,020,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | #!/usr/bin/python3
'''top ten in reddit'''
import requests
def top_ten(subreddit):
'''get the top 10'''
url = 'https://www.reddit.com/r/{}/hot.json'.format(subreddit)
agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 \
(KHTML, like Gecko; Google Web Preview) \
Chrome/27... | [
"monk-da@hotmail.com"
] | monk-da@hotmail.com |
f971ede530c630222865d8708042fb42c083b737 | 32226e72c8cbaa734b2bdee081c2a2d4d0322702 | /experiments/murtaza/vae/sawyer_torque_vae_td3.py | ae5d625df3f2c46a97b1dc2a24db2631b6b239fa | [
"MIT"
] | permissive | Asap7772/rail-rl-franka-eval | 2b1cbad7adae958b3b53930a837df8a31ab885dc | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | refs/heads/master | 2022-11-15T07:08:33.416025 | 2020-07-12T22:05:32 | 2020-07-12T22:05:32 | 279,155,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,127 | py | from sawyer_control.sawyer_reaching import SawyerXYZReachingImgMultitaskEnv
from railrl.launchers.launcher_util import run_experiment
from railrl.launchers.arglauncher import run_variants
import railrl.misc.hyperparameter as hyp
from railrl.torch.vae.relabeled_vae_experiment import experiment
if __name__ == "__main__"... | [
"asap7772@berkeley.edu"
] | asap7772@berkeley.edu |
ec52c4722e197827169f4edb78d23a75beb1cda9 | c71e5115b895065d2abe4120799ffc28fa729086 | /procon-archive/atcoder.jp/abc170/abc170_a/Main.py | 16f4853ff2370c03e22ec9b47f568e64193acb68 | [] | no_license | ken0105/competitive-programming | eb82f92a7b7ad0db601ea341c1441de6c6165064 | f918f85a0ea6dfbe9cac3ef835f80503bb16a75d | refs/heads/master | 2023-06-05T09:55:25.264731 | 2021-06-29T14:38:20 | 2021-06-29T14:38:20 | 328,328,825 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | import math
if __name__ == "__main__":
n = list(map(int,input().split()))
for i in range(len(n)):
if n[i] == 0:
print(i + 1)
exit()
| [
"iwata.kenaaa@gmail.com"
] | iwata.kenaaa@gmail.com |
3ebe3d0d69e0fb55f8d199180ad06e9cf03bca59 | e9d2ab28bd23021aef1e478439e290d13dd5ff58 | /python/EXAMPLES/projects/GUI_SIMPLE/p6_gui_calculate_WORKED/index.py | 557d6ef504415e12830cc9d8f1ebaad3750d3131 | [] | no_license | zlodiak/lessons | cb2177203760200672cf4eec546330d9b1a87f7f | f9a08a51c142d37cd8c4b2d50ba5925898b1acf6 | refs/heads/master | 2020-12-24T08:30:30.018325 | 2016-09-17T09:27:19 | 2016-09-17T09:27:19 | 29,296,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,449 | py | from tkinter import *
root = Tk()
root.geometry("500x500")
label1 = Label(root, text = "Число 1", bg = "red", fg = "white")
label1.pack(side = LEFT, anchor=NW)
input1 = Entry(root, width = 20, bd = 3)
input1.pack(side = LEFT, anchor=NW)
label2 = Label(root, text = "Число 2", bg = "red", fg = "white")
la... | [
"you@example.com"
] | you@example.com |
6f89807c5c4b792b3ba95fad0c3b1187097b3c86 | 470b46ff2e28f5f7fc4ecd3629980fbfd13a6313 | /programmers/x만큼 간격이 있는 n개의 숫자.py | 2c2a67471edb7e22400647499464326623e3e484 | [] | no_license | jihoonyou/problem-solving | 18c3ff05ae6c37e0c41cc755ffc7377a93bd02a6 | b7e5500ac16ff1b4736954298d13e8a5e1ab8193 | refs/heads/master | 2021-06-12T11:37:49.894072 | 2021-04-22T17:08:27 | 2021-04-22T17:08:27 | 181,782,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | '''
x만큼 간격이 있는 n개의 숫자
https://programmers.co.kr/learn/courses/30/lessons/12954
'''
def solution(x, n):
answer = []
start = 0
while n != 0:
start += x
answer.append(start)
n -= 1
return answer | [
"pianoetvoix@gmail.com"
] | pianoetvoix@gmail.com |
88988fae9222f7680a67577b6a9d0720c5253a5b | 034974504fabd1ee4101bf11ec310173200891b9 | /src/python/strelka/scanners/scan_vb.py | 20eac318118590eba034ed168cd4aaa0f0fea7e9 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jshlbrd/strelka | 9826591eb53cc5e46887d925996c38fdbec81dbe | 98c89afcc42d8f025e60f201ee9826b6086b5828 | refs/heads/master | 2020-04-11T04:36:02.620498 | 2019-06-11T19:43:44 | 2019-06-11T19:43:44 | 161,518,186 | 2 | 0 | NOASSERTION | 2018-12-12T16:51:38 | 2018-12-12T16:51:37 | null | UTF-8 | Python | false | false | 2,492 | py | import pygments
from pygments import formatters
from pygments import lexers
from strelka import strelka
class ScanVb(strelka.Scanner):
"""Collects metadata from Visual Basic script files.
Attributes:
lexer: Pygments lexer ('vbnet') used to parse the file.
"""
def init(self):
self.lex... | [
"liburdi.joshua@gmail.com"
] | liburdi.joshua@gmail.com |
1c6011eaee23f8c7e8fadbca79b231bce0ba83f5 | 32c56293475f49c6dd1b0f1334756b5ad8763da9 | /google-cloud-sdk/lib/third_party/kubernetes/client/apis/batch_v1beta1_api.py | 2dbffc221638de25db7f2c5ef9e2cd6a03e6adfc | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] | permissive | bopopescu/socialliteapp | b9041f17f8724ee86f2ecc6e2e45b8ff6a44b494 | 85bb264e273568b5a0408f733b403c56373e2508 | refs/heads/master | 2022-11-20T03:01:47.654498 | 2020-02-01T20:29:43 | 2020-02-01T20:29:43 | 282,403,750 | 0 | 0 | MIT | 2020-07-25T08:31:59 | 2020-07-25T08:31:59 | null | UTF-8 | Python | false | false | 92,421 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
imp... | [
"jonathang132298@gmail.com"
] | jonathang132298@gmail.com |
0a78a39d5c03577d008f38ca0df3535425a19bfd | 8d9cc46c596cdcd7bc30fc89f8b2fe0c7ed40c05 | /restdoctor/rest_framework/custom_types.py | 40d53aef69133f4e9c5116991d8cf400e2ff65eb | [] | no_license | yakovistomin/restdoctor | ac9974f6acd36745f60e67425eeb44ee1527fb06 | 1f29dce6ff179b40dbc91a2a57de0ecdea7b6af7 | refs/heads/master | 2023-01-30T12:36:16.506062 | 2020-12-07T20:07:47 | 2020-12-07T20:07:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,176 | py | from __future__ import annotations
import typing as t
from django.db import models
from rest_framework.parsers import BaseParser
from rest_framework.renderers import BaseRenderer
from rest_framework.response import Response
from rest_framework.routers import DynamicRoute, Route
from rest_framework.viewsets import View... | [
"s.butkin@bestdoctor.ru"
] | s.butkin@bestdoctor.ru |
b9dd064c283b696b7938ee5f7e9e8ebd7db7bd8e | e2e08d7c97398a42e6554f913ee27340226994d9 | /pyautoTest-master(ICF-7.5.0)/test_case/scg/scg_Route/test_c140981.py | f1078bce49f9f722a1cb00cd9b8cc419b55d8930 | [] | no_license | lizhuoya1111/Automated_testing_practice | 88e7be512e831d279324ad710946232377fb4c01 | b3a532d33ddeb8d01fff315bcd59b451befdef23 | refs/heads/master | 2022-12-04T08:19:29.806445 | 2020-08-14T03:51:20 | 2020-08-14T03:51:20 | 287,426,498 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,331 | py | import pytest
import time
import sys
from page_obj.scg.scg_def import *
from page_obj.scg.scg_def_obj import *
from page_obj.scg.scg_def_log import *
from page_obj.common.rail import *
from page_obj.scg.scg_dev import *
from os.path import dirname, abspath
sys.path.insert(0, dirname(dirname(abspath(__file__)... | [
"15501866985@163.com"
] | 15501866985@163.com |
d23ba18c266995f3574214eb2e42a26c7b06b840 | 4bd555bc662b8182a2e7644976bfdb00ed5e1ebe | /PythonistaAppTemplate/PythonistaKit.framework/pylib/xml/sax/saxutils.py | 9352dc86e6e159560f26826dbe871ce36bdc6318 | [] | no_license | fhelmli/homeNOWG2 | a103df1ef97194dec9501dbda87ec1f7c111fb4a | e794fd87b296544542fd9dc7ac94c981c6312419 | refs/heads/master | 2020-04-04T13:40:20.417769 | 2019-01-30T21:41:04 | 2019-01-30T21:41:04 | 155,970,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,059 | py | #import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonista
#import pythonis... | [
"tberk@gmx.at"
] | tberk@gmx.at |
79f5b7f0154dc1d9f06027f04a34a9568c525ba0 | 0e083f405af00029c9ec31849f0f7f81c56844b5 | /mmdeploy/backend/openvino/wrapper.py | ab91f8331b3763712bf98412003dbc3566133b1b | [
"Apache-2.0"
] | permissive | open-mmlab/mmdeploy | 39b9e7b611caab2c76a6142fcb99f0bf1d92ad24 | 5479c8774f5b88d7ed9d399d4e305cb42cc2e73a | refs/heads/main | 2023-09-01T21:29:25.315371 | 2023-08-31T09:59:29 | 2023-08-31T09:59:29 | 441,467,833 | 2,164 | 605 | Apache-2.0 | 2023-09-14T10:39:04 | 2021-12-24T13:04:44 | Python | UTF-8 | Python | false | false | 5,353 | py | # Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
from typing import Dict, Optional, Sequence
import numpy as np
import torch
from mmdeploy.utils import Backend
from mmdeploy.utils.timer import TimeCounter
from ..base import BACKEND_WRAPPER, BaseWrapper
@BACKEND_WRAPPER.register_module(Backend.O... | [
"noreply@github.com"
] | open-mmlab.noreply@github.com |
de6f542882672b658532eb178c29616dbd103d99 | 658ab464e9c796f819ad85f569ad06ab6e66992e | /src/commonlib/pi_work.py | 50c01111fc13ad02ca1933edff005ecb983ade37 | [] | no_license | huowolf/python-demo | 03e5731ba632caada819dd70d0f9dc07c98308a1 | e3b80dcc0e0bc2437a0b2882e17563c8171460a2 | refs/heads/master | 2020-03-23T22:00:57.515258 | 2018-09-07T15:33:22 | 2018-09-07T15:33:22 | 142,147,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | # 计算圆周率可以根据公式:
# 利用Python提供的itertools模块,我们来计算这个序列的前N项和:
import itertools
def pi(N):
' 计算pi的值 '
# step 1: 创建一个奇数序列: 1, 3, 5, 7, 9, ...
odds = itertools.count(1, 2)
# step 2: 取该序列的前N项: 1, 3, 5, 7, 9, ..., 2*N-1.
oddN=itertools.islice(odds,N)
# step 3: 添加正负符号并用4除: 4/1, -4/3, 4/5, -4/7, 4/9, ...
... | [
"274956285@qq.com"
] | 274956285@qq.com |
98e594fa4430a75bb827ee7bfbc0b330e5f0e8a0 | 75f0580af1734b9edb9e06bfadfe48f45b057872 | /studyscores.py | d702f4db0b792522c145ceac388e750fd9d3fc5f | [] | no_license | penteract/adventofcode | 5bb317f8093f60c1d776d0983016a5288d059603 | 7b7344708ef1d58caa339a32a13f3390556b664c | refs/heads/master | 2023-01-29T16:08:13.541190 | 2023-01-16T20:21:02 | 2023-01-16T20:21:02 | 160,901,373 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,034 | py | #! /usr/bin/env python3
import json
dat = open("419070.json").read()
j = json.loads(dat)
byname = {j["members"][i]["name"]:j["members"][i] for i in j["members"]}
bypuzz = {}
G="get_star_ts"
HOUR=60*60
DAY = HOUR*24
for n in byname:
for l in byname[n]["completion_day_level"]:
if l not in bypuzz: bypuzz[l]={}
... | [
"tcathcartburn@gmail.com"
] | tcathcartburn@gmail.com |
f67ee34a5888807e43485f6883b0f5d664156cb6 | e67d4123c10d464c91e70210d58bd4900164645b | /83/D. Basketball Team/basketball_team.py | e6ea0d4199272efb2c911f4808f5545e4d86e15f | [] | no_license | pkaleta/Codeforces | 422188d4483fbf8dd99d6b0654c8e464fb143560 | fb011f616f8db366c6aba80ff2be01692611ef81 | refs/heads/master | 2021-01-19T06:42:30.162981 | 2011-11-26T01:29:30 | 2011-11-26T01:29:30 | 2,853,430 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | import sys
n, m, h = map(int, sys.stdin.readline().split())
s = map(int, sys.stdin.readline().split())
ss = sum(s)
def calc(n1, n2, k):
ret = 1.0
i = n1-k+1
j = n2-k+1
while i <= n1 or j <= n2:
if i > n1: ii = 1
else: ii = i
if j > n2: jj = 1
else: jj = j
ret *=... | [
"piotrek.kaleta@gmail.com"
] | piotrek.kaleta@gmail.com |
fbe7a63214573776495856cc9e932b74a59a55bb | 86cc998fd200a89e7caf5a4acfe81b81a2d5827c | /lib/cron/genDNS | c1f0374fccff9c10a5320cdb0894b994af182ee0 | [
"Apache-2.0"
] | permissive | arguello/contractor | 6fe28b3356548c097f28ffe54555963962351405 | dd78f5b770ee7b5c41cddfc0a61869908b96e385 | refs/heads/master | 2022-05-26T22:04:53.239954 | 2020-05-03T01:55:25 | 2020-05-03T01:55:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,265 | #!/usr/bin/env python3
import os
os.environ.setdefault( 'DJANGO_SETTINGS_MODULE', 'contractor.settings' )
import django
django.setup()
import sys
import json
import hashlib
import subprocess
from datetime import datetime
from contractor.Directory.models import Zone
from contractor.Directory.lib import genZone, genP... | [
"pnhowe@gmail.com"
] | pnhowe@gmail.com | |
91f837f9b380a07ff980b9f1a00bbf9755ecaafa | 0d0cf0165ca108e8d94056c2bae5ad07fe9f9377 | /28_Winning_a_Kaggle_Competition_in_Python/4_Modeling/gridSearch.py | 64f6581e3eec2ec544d66c65ea3a97365e39e676 | [] | no_license | MACHEIKH/Datacamp_Machine_Learning_For_Everyone | 550ec4038ebdb69993e16fe22d5136f00101b692 | 9fe8947f490da221430e6dccce6e2165a42470f3 | refs/heads/main | 2023-01-22T06:26:15.996504 | 2020-11-24T11:21:53 | 2020-11-24T11:21:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,242 | py | # Grid search
# Recall that we've created a baseline Gradient Boosting model in the previous lesson. Your goal now is to find the best max_depth hyperparameter value for this Gradient Boosting model. This hyperparameter limits the number of nodes in each individual tree. You will be using K-fold cross-validation to mea... | [
"noreply@github.com"
] | MACHEIKH.noreply@github.com |
eb8919a580c7e7e998422669d4fa651907a4c043 | 7950c4faf15ec1dc217391d839ddc21efd174ede | /explore/2021/april/Palindrome_Linked_List.py | 3a0dbc3dad627a0957f59068800b0605ba19ddd9 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 617 | py | '''
Time: O(N)
Space: O(N)
You are here!
Your runtime beats 21.99 % of python submissions.
You are here!
Your memory usage beats 13.77 % of python submissions.
'''
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next =... | [
"838255715@qq.com"
] | 838255715@qq.com |
30d181fcf1726a600a41f7afa9ca31f81a00e976 | a66460a46611483dfbdc94c7996893f427e60d97 | /ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/smartos/vmadm.py | 11598ef8ee5eeeceb289007193a21555a5e67330 | [
"MIT"
] | permissive | otus-devops-2019-02/yyashkin_infra | 06b57807dde26f94f501828c07503d6bf1d70816 | 0cd0c003884155ac922e3e301305ac202de7028c | refs/heads/master | 2020-04-29T02:42:22.056724 | 2019-05-15T16:24:35 | 2019-05-15T16:24:35 | 175,780,718 | 0 | 0 | MIT | 2019-05-15T16:24:36 | 2019-03-15T08:37:35 | HCL | UTF-8 | Python | false | false | 24,315 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Jasper Lievisse Adriaanse <j@jasper.la>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.... | [
"theyashkins@gmail.com"
] | theyashkins@gmail.com |
4ab98705595c75687b2a1d43a82da9ce0f973aed | 7a15271c7cddd199f43555469a67d26ce0f60836 | /uncertainty_baselines/models/segmenter_gp.py | 76a63b7daf4b436ae49c69c2f1b67b9b791125c4 | [
"Apache-2.0"
] | permissive | google/uncertainty-baselines | b2c339d918bf3949ee066f9eafa6b51232a2ac3d | f5f6f50f82bd441339c9d9efbef3f09e72c5fef6 | refs/heads/main | 2023-09-02T13:59:26.355288 | 2023-08-14T16:35:22 | 2023-08-14T16:36:11 | 280,026,201 | 1,235 | 198 | Apache-2.0 | 2023-09-11T22:21:48 | 2020-07-16T01:54:32 | Python | UTF-8 | Python | false | false | 6,167 | py | # coding=utf-8
# Copyright 2023 The Uncertainty Baselines 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 ap... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
79cc42438964db5b2d6053c997019c47cc2affe2 | 969d094bfb09662b369278dc2cde1dc160a286b6 | /For_Loops/03_odd_even_position.py | a146cc42f1f89bb7903ec3322e674bb3592cfd3e | [] | no_license | IvayloValkov/Python-the-beginning | e96756105b56d7c0ae2687a82ccace1ca97bc895 | 4d074c32f8251af5a96aece1ae447d09db038026 | refs/heads/main | 2023-02-16T13:05:59.726572 | 2021-01-17T08:32:45 | 2021-01-17T08:32:45 | 330,342,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,087 | py | import sys
n = int(input())
odd_sum = 0
odd_max = -sys.maxsize
odd_min = sys.maxsize
even_sum = 0
even_max = -sys.maxsize
even_min = sys.maxsize
for i in range(1, n + 1):
input_number = float(input())
if i % 2 == 0:
even_sum += input_number
if input_number > even_max:
... | [
"noreply@github.com"
] | IvayloValkov.noreply@github.com |
5e0e4793593f70670867c372bf60125379bc503e | 2d0bada349646b801a69c542407279cc7bc25013 | /src/vai_quantizer/vai_q_tensorflow2.x/tensorflow_model_optimization/python/core/clustering/keras/clustering_centroids_test.py | 693276b6d53bd5037cb74fcd2afdafc97370dd90 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-3-Clause-Open-MPI",
"LicenseRef-scancode-free-unknown",
"Libtool-exception",
"GCC-exception-3.1",
"LicenseRef-scancode-mit-old-style",
"OFL-1.1",
"JSON",
"LGPL-2.1-only",
"LGPL-2.0-or-later",
"ICU",
"LicenseRef-scancode-... | permissive | Xilinx/Vitis-AI | 31e664f7adff0958bb7d149883ab9c231efb3541 | f74ddc6ed086ba949b791626638717e21505dba2 | refs/heads/master | 2023-08-31T02:44:51.029166 | 2023-07-27T06:50:28 | 2023-07-27T06:50:28 | 215,649,623 | 1,283 | 683 | Apache-2.0 | 2023-08-17T09:24:55 | 2019-10-16T21:41:54 | Python | UTF-8 | Python | false | false | 6,383 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"hanxue.lee@xilinx.com"
] | hanxue.lee@xilinx.com |
0e1c35982cd1e8a0dac5bd43a934045a405885ac | 1058861a696e8b9882175b786fec131f396d69f2 | /task_app/migrations/0001_initial.py | 3816d3d7eb537e306c14c4b3d442babb4d18d4b5 | [] | no_license | wgoode3/djangular-example | f79622442532fa5dc5450f4c5ed8e39ce6f784c3 | 0a8924ea95a7a2faed6865b60f06ceb4a5aed5bb | refs/heads/master | 2020-03-28T04:38:59.091342 | 2018-12-19T21:08:27 | 2018-12-19T21:08:27 | 147,727,910 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | # Generated by Django 2.1.1 on 2018-09-06 18:49
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Task',
fields=[
('id', models.AutoField(aut... | [
"wgoode3@gmail.com"
] | wgoode3@gmail.com |
044533f19e009cf5a932c77574f9acb421be9c94 | ea1af1a564f96fb36974aa094192877598b0c6bf | /Chapter10/Exercises/ex10_2.py | 5a3786e78e11934cfb22408aad7d0cc3eefeda94 | [] | no_license | GSantos23/Crash_Course | 63eecd13a60141e520b5ca4351341c21c4782801 | 4a5fc0cb9ce987948a728d43c4f266d34ba49a87 | refs/heads/master | 2020-03-20T23:20:43.201255 | 2018-08-21T01:13:06 | 2018-08-21T01:13:06 | 137,841,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | # Exerrcise 10.2
'''
Learning C: You can use the replace() method to replace any word in a
string with a different word. Here's a quick example showing how to replace
'dog' with 'cat' in a sentence:
-----------------------------------------------------------------------
>>> message = "I realy like dogs."
>>> messsage.r... | [
"santosgerson64@gmail.com"
] | santosgerson64@gmail.com |
799f715fba061b3e4141658da26aa45c489d4fb7 | e396fb9580ff90f7896dba3416be3a7bef81f367 | /rdflib/namespace/RDFS.py | b32a830c87dbb4a7af617304e26edefa504411b5 | [
"CC0-1.0"
] | permissive | Philani7777777/definednamespace | c9e37ccc41762ff07e8b9e800a20b11a187ca355 | f1178ba9c36a94bbd422844f4ddc71de67521d7b | refs/heads/master | 2022-09-24T14:40:43.844447 | 2020-05-27T04:35:20 | 2020-05-27T04:35:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,742 | py | from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
class RDFS(DefinedNamespace):
"""
The RDF Schema vocabulary (RDFS)
Generated from: http://www.w3.org/2000/01/rdf-schema#
Date: 2020-05-26 14:20:05.794866
rdfs:seeAlso <http://www.w3.org/2000/01/rdf-schema... | [
"solbrig@jhu.edu"
] | solbrig@jhu.edu |
22985d6e6f69c5fcd7acd56d0f9670bd5e45d637 | 6a084a2df2869ce3ad565610cbf92eccf00a233e | /states/boto_iam.py | d31a6a9bcfca75038554f59e60804c39840fe66c | [] | 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 | 66,478 | py | # -*- coding: utf-8 -*-
'''
Manage IAM objects
==================
.. versionadded:: 2015.8.0
This module uses ``boto``, which can be installed via package, or pip.
This module accepts explicit IAM credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are t... | [
"it_ltxin@163.com"
] | it_ltxin@163.com |
bc1c50c9adb00b6d195e495eedb5e73b7c85c345 | a8ba2295b41b26716dc6dbf62392c7ea9ef5ea08 | /apps/calificacion/views.py | ae9ab7a486377042221e173d02a485c0f35e8e22 | [] | no_license | clcneogeek325/iicea | 7131fd335db94a4af8dbddf5d0126672fc3b312e | 328079ee6e642dc2ecda3b9fd4bf119d81260f3d | refs/heads/master | 2021-01-25T05:15:44.448413 | 2014-12-18T03:34:45 | 2014-12-18T03:34:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,080 | py | from django.shortcuts import render_to_response
from django.template import RequestContext
from .models import calificacion
from .forms import calificacionForm
from django.http import HttpResponse,HttpResponseRedirect
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.models import User
from... | [
"clcneogeek@gmail.com"
] | clcneogeek@gmail.com |
3a376fb7cbc7165ed0919498a1c070330e60c6ff | d587b67e83a8e598e2d84bbf23edbbc395429a1a | /baiscRevision/feb21Class.py | 611499997306a15bcc875480c9735107daf2f532 | [
"MIT"
] | permissive | koromax1/code_for_Kids | e7d87264918ca7dc5d6edf62b2c1fa672a380bcd | ee4407f503b76fe56419b89008a28d5bfabe3592 | refs/heads/main | 2023-04-08T00:24:40.113132 | 2021-03-31T18:01:36 | 2021-03-31T18:01:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,616 | py | #revision
"""
1. Basic Data Type
2. addition,
3. if else, nested if else
4. for loop, while loop, (loop + if else)
5. function
"""
var1 = 100 #integer
var2 = 100.501 #float
var3 = True #boolean
var4 = 'Python' #string
#how to check the type of these variables?
# print(type(var1))
# print(type(var3))
#how to pr... | [
"omarhasan115@gmail.com"
] | omarhasan115@gmail.com |
fbc2a37d26fc1291c81b5a80f7b93341e7c4f4a8 | 4c9c98b7a5b21848e53dfa8fb6ead1d9ea412d48 | /algorithms/bit_manipulation/python/lonely_integer.py | 3e6d8164fcf2633c7c2160a26b764ad7037fe12f | [] | no_license | thommms/hacker_rank | 1e701c4a932e4f4c196d38fd32c7155a68da079c | fe8b05e0e73425df5d4011b290add418d461eef9 | refs/heads/master | 2020-03-19T12:50:00.808869 | 2018-05-28T17:42:09 | 2018-05-28T17:42:09 | 136,543,275 | 1 | 0 | null | 2018-06-07T23:50:26 | 2018-06-07T23:50:26 | null | UTF-8 | Python | false | false | 258 | py | from functools import reduce
n, A = int(input()), [int(x) for x in input().strip().split(' ')]
# for x in A:
# # print(A.count(x))
# if A.count(x) % 2 != 0:
# print(" ".join(str(x)))
answer = reduce((lambda x, y: x ^ y), A)
print(answer)
| [
"runcy.oommen@gmail.com"
] | runcy.oommen@gmail.com |
96230b8a541d32409872d48c2fc7ee9d476559d3 | 5a8304c26aaa0e0c87ae4daafa3f1c5f56714e5d | /ProTwo/ProTwo/appTwo/migrations/0001_initial.py | 55b93a818b16730b2e068c6604b4d4dedda06aac | [] | no_license | jack456054/Django-test | c625460f3e3b2061eff6d13dd095e32bcf3e3220 | 501837dd80608a8c982214e41f6b746655aabca5 | refs/heads/master | 2023-04-28T01:21:28.688973 | 2019-10-02T06:58:31 | 2019-10-02T06:58:31 | 210,776,683 | 0 | 0 | null | 2023-04-21T20:38:20 | 2019-09-25T06:57:10 | Python | UTF-8 | Python | false | false | 630 | py | # Generated by Django 2.2.5 on 2019-09-27 03:55
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(aut... | [
"jack456054@hotmail.com"
] | jack456054@hotmail.com |
fc21204d2e8e095e9a3d71541379fab4054538ac | 894b290b4f4f47b5eb523c23efd7bd6110d91b2f | /44_xhs_note/xhs_note/xhs_note/scripts/xhs_transform.py | 9fbe1879beb2c7540b72e328915d81996f564fd9 | [] | no_license | wliustc/SpiderS | 6650c00616d11239de8c045828bafdc5a299b1ce | 441f309c50d28c1a3917bed19321cd5cbe7c2861 | refs/heads/master | 2020-03-27T06:15:39.495785 | 2018-06-14T07:55:44 | 2018-06-14T07:55:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,640 | py | # -*- coding: utf-8 -*-
import sys
import json
import re
reload(sys)
sys.setdefaultencoding('utf-8')
_mapping = {
'sellCount':re.compile(r'\\"sellCount\\":\\"(\d+)\\"'),
}
def get_regex_group1(key,_str, default=None):
p = _mapping[key]
m = p.search(_str)
if m:
return m.group(1)
return de... | [
"luoshao23@gmail.com"
] | luoshao23@gmail.com |
f79fe5e3d38708362ecb883e7298586ff89912a3 | 0dae97b2205ef5d8ce884ec2af4bf99ad2baec43 | /drf_admin/apps/monitor/views/error.py | 85e4282f3af0cc742498d883c97e4d8ba6ab05f3 | [
"MIT"
] | permissive | 15051882416/drf_admin | 2520affacd0345d042b499c3e9a56a112cc235d5 | 0b31fa5248afb6fc20e6ef425b2dcc4d39977d81 | refs/heads/master | 2022-12-31T04:57:27.017134 | 2020-10-24T01:09:58 | 2020-10-24T01:09:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | # -*- coding: utf-8 -*-
"""
@author : Wang Meng
@github : https://github.com/tianpangji
@software : PyCharm
@file : error.py
@create : 2020/10/3 16:18
"""
from rest_framework import status
from rest_framework.filters import SearchFilter
from rest_framework.generics import ListAPIView
from rest_framework.r... | [
"921781999@qq.com"
] | 921781999@qq.com |
8b6ef84075551101e3b0b9f5f29542a3f477fbe9 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03455/s301099697.py | d18a961cc423fd1f50780324308fcbf6869269e6 | [] | 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 | 139 | py | input = input().strip().split()
a = int(input[0])
b = int(input[1])
if a % 2 == 0 or b % 2 == 0:
print('Even')
else:
print('Odd')
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
59b74c155bf78c020afb0694200450f11e982f0e | 0e4d09b2a1b93aaa6d623d16905854d993a934ae | /Python/Django/belt_reviewer/apps/bookReviews/apps.py | f6a890ac833bc47e8802d8b4cb392f83db148f59 | [] | no_license | freefaller69/DojoAssignments | ee7f6308b02041be3244f795422e0e044d4a41b2 | f40426ac448026c1172048665f36024ad22f0d81 | refs/heads/master | 2021-01-17T10:23:39.419514 | 2017-07-25T00:50:41 | 2017-07-25T00:50:41 | 84,012,790 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class BookreviewsConfig(AppConfig):
name = 'bookReviews'
| [
"freefaller@gmail.com"
] | freefaller@gmail.com |
858a562d0dc95131c95bea67ee2ba1707e80d416 | 0c90211f4564d4541aade68cf93997bcf64827f1 | /tests/ipfwd/test_nhop_group.py | 05d4ffdd0e6c9ec1b94bbd40e96ad1f919f89340 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | stephenxs/sonic-mgmt | 74a3662212a5ee5b2583a93fc17b43cdd5a2c0a0 | 85dd08e4d86884ff0031c75b99de3c67b5e24698 | refs/heads/master | 2023-08-15T17:48:52.537559 | 2023-05-19T03:10:08 | 2023-05-19T03:10:08 | 188,744,518 | 0 | 0 | NOASSERTION | 2021-09-17T03:06:51 | 2019-05-27T00:15:18 | Python | UTF-8 | Python | false | false | 30,531 | py | import ipaddr
import logging
import os
import pytest
import random
import time
from collections import namedtuple
from collections import defaultdict
from ptf.mask import Mask
import ptf.packet as scapy
import ptf.testutils as testutils
from tests.common.helpers.assertions import pytest_assert
from tests.common.cisco... | [
"noreply@github.com"
] | stephenxs.noreply@github.com |
4f38cefdcab4a44e41529b84691a9e960842084c | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_falconers.py | 0fce1a8cca8e6471c93e68ec9dd97d82dc818c42 | [
"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 _FALCONERS():
def __init__(self,):
self.name = "FALCONERS"
self.definitions = falconer
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['falconer']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
bd9179a9b52e2b845931041c86375a59b7643ac9 | b15d2787a1eeb56dfa700480364337216d2b1eb9 | /accelbyte_py_sdk/api/ugc/operations/anonymization/delete_all_user_channel.py | e79b27369aad54884a209d7c6733f5955d9219bd | [
"MIT"
] | permissive | AccelByte/accelbyte-python-sdk | dedf3b8a592beef5fcf86b4245678ee3277f953d | 539c617c7e6938892fa49f95585b2a45c97a59e0 | refs/heads/main | 2023-08-24T14:38:04.370340 | 2023-08-22T01:08:03 | 2023-08-22T01:08:03 | 410,735,805 | 2 | 1 | MIT | 2022-08-02T03:54:11 | 2021-09-27T04:00:10 | Python | UTF-8 | Python | false | false | 6,830 | py | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: ags_py_codegen
# pylint: disable=duplicate-code
# pylint: disable=line-too-long
# pylint:... | [
"elmernocon@gmail.com"
] | elmernocon@gmail.com |
1f214def1e5f25602cc33de641d1c798d8190ae4 | 3ae36a5791c26bb7b41a6ed7d81d16cb45cfb8c9 | /python_sicp/homework4.py | a0a8a7a7f8df743e9a01f1bf94f594462968a121 | [] | no_license | crossin/Crossin-practices | 0ef23022e3f298862aa831a7cb9684dc4aa04653 | 1b0cbe8db9b947122c40dcfca4ae883cd99b6087 | refs/heads/master | 2021-01-01T16:42:52.298084 | 2017-07-11T01:17:38 | 2017-07-11T01:17:38 | 97,899,778 | 1 | 0 | null | 2017-07-21T02:58:33 | 2017-07-21T02:58:33 | null | UTF-8 | Python | false | false | 505 | py | #question1
def make_counter():
dct = {}
def counter(x):
dct[x] = dct.get(x,0) + 1
return dct[x]
return counter
c = make_counter()
c('a')
c('b')
# print(c('c'))
# question2
def make_fib():
fib_num = 0
next_num = 1
def fib():
nonlocal fib_num
... | [
"782744680@qq.com"
] | 782744680@qq.com |
f06b8923cf042a7a8f0b46519c24463e8c09ceab | 0eaf0d3f0e96a839f2ef37b92d4db5eddf4b5e02 | /abc132/b.py | 1ce7d09d63f948f5793250950b03d97d686964c4 | [] | no_license | silphire/atcoder | b7b02798a87048757745d99e8564397d1ca20169 | f214ef92f13bc5d6b290746d5a94e2faad20d8b0 | refs/heads/master | 2023-09-03T17:56:30.885166 | 2023-09-02T14:16:24 | 2023-09-02T14:16:24 | 245,110,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | n = int(input())
p = list(map(int, input().split()))
x = 0
for i in range(n - 2):
if p[i + 1] == sorted(p[i:i+3])[1]:
x += 1
print(x)
| [
"silphire@gmail.com"
] | silphire@gmail.com |
27f4ae0b2cabf4a2f7cb7b767fca5ee8f99b9cb5 | 699b5dbc51b5a8bc22d0e0e5b6ce7287c9948603 | /tests/conftest.py | 8b5746dfa8d6085a2f3e8e27c4af358027be8ae6 | [] | no_license | gvalkov/riemann-python-api | ccf3db14e620a274db0a748472c93b3ddcabb619 | 873222dfdd61670333dbcf6804755a250357ebc4 | refs/heads/master | 2021-01-16T21:16:43.177708 | 2016-07-21T23:07:13 | 2016-07-21T23:07:13 | 62,182,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | import pytest
@pytest.fixture
def dummy_socket():
return DummySocket()
class DummySocket:
def __init__(self):
self.data = [b'hello', b'world', b'']
def recv(self, bufsize):
return self.data.pop(0)
@pytest.fixture
def transport():
return None
| [
"georgi.t.valkov@gmail.com"
] | georgi.t.valkov@gmail.com |
5cecbd6920e73728d767dc6630ee6999dac4c5fa | d93159d0784fc489a5066d3ee592e6c9563b228b | /FWCore/Services/test/fpe_test_2_cfg.py | c8967e9decfd318751718a2b93c2a094c3482857 | [] | permissive | simonecid/cmssw | 86396e31d41a003a179690f8c322e82e250e33b2 | 2559fdc9545b2c7e337f5113b231025106dd22ab | refs/heads/CAallInOne_81X | 2021-08-15T23:25:02.901905 | 2016-09-13T08:10:20 | 2016-09-13T08:53:42 | 176,462,898 | 0 | 1 | Apache-2.0 | 2019-03-19T08:30:28 | 2019-03-19T08:30:24 | null | UTF-8 | Python | false | false | 2,141 | py | # Unit test configuration file for EnableFloatingPointExceptions service
import os # Since we have a general-purpose programming langauge, we'll use it!
import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
import FWCore.Framework.test.cmsExceptionsFatal_cff
process.options = FWCore.Framework.test.c... | [
"giulio.eulisse@gmail.com"
] | giulio.eulisse@gmail.com |
31d1db09e594ff0a03df0641f7486c2caaebbadf | 1ada3010856e39c93e2483c960aa8fc25e2b3332 | /TopInterviewQuestions/BinarySearchIterative.py | 2a47e4120cd7ba3dd11f23e4f40a9d9730fbea71 | [] | no_license | Taoge123/LeetCode | 4f9e26be05f39b37bdbb9c1e75db70afdfa1b456 | 4877e35a712f59bc7b8fffa3d8af2ffa56adb08c | refs/heads/master | 2022-02-24T20:09:21.149818 | 2020-07-31T03:18:05 | 2020-07-31T03:18:05 | 142,700,689 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | def binarySearch(arr, l, r, x):
while l <= r:
mid = l + (r - l) // 2
if arr[mid] == x:
return mid
elif arr[mid] < x:
l = mid + 1
else:
r = mid - 1
return -1
arr = [2, 3, 4, 10, 40]
x = 10
# Function call
result = binarySearch(arr, 0, ... | [
"taocheng984@gmail.com"
] | taocheng984@gmail.com |
03b2d22ccc0320ef2c505d0c9c9187a3a442d8fc | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_rosebud.py | 32f351d1d00dcba1d7d029720f46c5640a86bcc3 | [
"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 | 318 | py |
#calss header
class _ROSEBUD():
def __init__(self,):
self.name = "ROSEBUD"
self.definitions = [u'the beginning stage of a rose flower']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 = [], obj2 = []):
return self.jsondata
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
10f2e9083396c3b2628cf29d367edfe99535a561 | 5d44202250e0f872500a6688c280082d721fb590 | /manage.py | e9765693f7ffae740c06634b870c5c3712fded27 | [] | no_license | crowdbotics-apps/oscar-19844 | 0edec2195f5a5b7ad284e4dae339332075859fbf | 0d1a0c744432dba6fa8d06aa88a6c491aa9e0a7e | refs/heads/master | 2022-12-04T01:55:32.806069 | 2020-08-28T12:56:50 | 2020-08-28T12:56:50 | 291,046,919 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'oscar_19844.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Im... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
3475f2836d81a4eaf92185524a9ef8a17f6e6b76 | 72e5338e393ce7ced7b9737542b84dc4257659b0 | /migen/test/test_sort.py | 163be8c2f38036b24d895c8566ecc0f5bec0619f | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mogorman/migen | 2a2c86feb79f065a6365a6f615c93a9ef916b184 | 467272f1a77be616ccbed8a5b2e1a0756ce59b6b | refs/heads/master | 2021-01-17T21:37:46.782144 | 2015-03-10T05:30:28 | 2015-03-10T05:30:28 | 30,615,751 | 1 | 0 | null | 2015-02-10T21:34:19 | 2015-02-10T21:34:19 | null | UTF-8 | Python | false | false | 734 | py | import unittest
from random import randrange
from migen.fhdl.std import *
from migen.genlib.sort import *
from migen.test.support import SimCase, SimBench
class BitonicCase(SimCase, unittest.TestCase):
class TestBench(SimBench):
def __init__(self):
self.submodules.dut = BitonicSort(8, 4, ascending=True)
def ... | [
"sebastien@milkymist.org"
] | sebastien@milkymist.org |
d5cd3dd04ad13a4879984799c4d4c77396857512 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_072/ch2_2019_08_13_16_35_18_838289.py | 9c29c9f819b8a93140238031859ca4d27127d58b | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 106 | py | def calcula_velocidade_media(x,z):
y=x/z
return y
s=4
t=2
b=calcula_velocidade_media(s,t)
print(b) | [
"you@example.com"
] | you@example.com |
634c722b3755f68c71a2049285d7c29e6e4b3ca9 | 3633bab8066f576c8bf9e7908afe30bb070d0b70 | /Hack-ninth-week/1-Money-In-The-Bank/Client.py | f57203098ff116bb9ce1ebabcf4a1af2776aa555 | [] | no_license | 6desislava6/Hack-Bulgaria | 099c195e45a443cf4a3342eff6612ac2aa66565b | de4bf7baae35e21d6a7b27d4bde68247bb85b67a | refs/heads/master | 2021-01-20T11:57:29.027595 | 2015-06-02T17:36:59 | 2015-06-02T17:36:59 | 32,828,816 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | class Client():
def __init__(self, id, username, balance, message, email):
self.__username = username
self.__balance = balance
self.__id = id
self.__message = message
self.__email = email
def get_username(self):
return self.__username
def get_balance(self):
... | [
"desislavatsvetkova@mail.bg"
] | desislavatsvetkova@mail.bg |
86b9eb36ba14748eb10a6c8ae0c92d61abc315bf | c6d852e5842cf6f74123445d20ff03876377ae26 | /lemon/python22/lemon_06_190828_for_while_函数/优秀作业_0828/homework_6.py | f4d0cbc78178c71c569b3205de28dd577e11abb0 | [] | no_license | songyongzhuang/PythonCode_office | 0b3d35ca5d58bc305ae90fea8b1e8c7214619979 | cfadd3132c2c7c518c784589e0dab6510a662a6c | refs/heads/master | 2023-02-13T14:06:10.610935 | 2021-01-14T09:11:32 | 2021-01-14T09:11:32 | 327,183,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,451 | py | # _*_ coding: UTF-8 _*_
# @Time :2019-08-29 09:18
# @Author :清莲
# @FileName :homework_6.py
# @Software :PyCharm
# 题一:求出三个整数中的最大值
list = []
i = 0
print("输入三个整数,最后返回你最大的数字~")
while i != 3:
try:
num = int(input())
list.append(num)
i += 1
except:
print("请输入整型数字")
print("最大的数字是"... | [
"songyongzhuang9@163.com"
] | songyongzhuang9@163.com |
48b7314ccc78a5208c9f222e43dc1dfa9beb3baf | 0b69a011c9ffee099841c140be95ed93c704fb07 | /problemsets/Codeforces/Python/A1207.py | b1961a8fecbfbe5bbae1031de06c32ef6f6ef39a | [
"Apache-2.0"
] | permissive | juarezpaulino/coderemite | 4bd03f4f2780eb6013f07c396ba16aa7dbbceea8 | a4649d3f3a89d234457032d14a6646b3af339ac1 | refs/heads/main | 2023-01-31T11:35:19.779668 | 2020-12-18T01:33:46 | 2020-12-18T01:33:46 | 320,931,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | """
*
* Author: Juarez Paulino(coderemite)
* Email: juarez.paulino@gmail.com
*
"""
for _ in '0'*int(input()):
b,p,f=map(int,input().split())
h,c=map(int,input().split())
if h<c: h,c,p,f=c,h,f,p
b//=2; t=min(p,b); b-=t
print(h*t+c*min(b,f)) | [
"juarez.paulino@gmail.com"
] | juarez.paulino@gmail.com |
453ad9e3e455b7dd53970c8dae92d54c5ff91fc4 | 72488f37a830b7a2d29be0dc98815ef3fac1250b | /examples/tox21/tox21_DAG.py | acb32eabd5cf75c632c4c636c4d0625965cda61f | [
"MIT"
] | permissive | mhejrati/deepchem | d62ffebf3dfe680534ebcca528302ca31dbdf95b | 8a35de2ec17312a8630690387e730d18b5267a93 | refs/heads/master | 2021-01-18T20:22:43.834707 | 2017-04-01T22:42:42 | 2017-04-01T22:42:42 | 86,959,622 | 1 | 0 | null | 2017-04-02T03:15:45 | 2017-04-02T03:15:45 | null | UTF-8 | Python | false | false | 1,977 | py | """
Script that trains DAG models on Tox21 dataset.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import numpy as np
np.random.seed(123)
import tensorflow as tf
tf.set_random_seed(123)
import deepchem as dc
# Load Tox21 dataset
tox21_tasks, tox21_dat... | [
"zqwu@stanford.edu"
] | zqwu@stanford.edu |
771a079115d604f1bcfedc48fe6db067bc10275b | 048c6b84e679a3e81bf7b4980ad2b4a99781b9b7 | /tests/unit/qm/corfunctions/spectraldensities_test.py | e42af2cdcb2f8907d0c9d94e242a331c08acd2bd | [] | no_license | saayeh/quantarhei | 9b7a7c60e1325ef783bdbc9ac4b6f33a13301802 | b77a41272b7df0ccbcde2710bf04bf412c126a6f | refs/heads/master | 2020-12-07T06:29:27.954470 | 2017-09-01T21:09:45 | 2017-09-01T21:09:45 | 66,932,421 | 0 | 0 | null | 2016-08-30T10:52:11 | 2016-08-30T10:52:11 | null | UTF-8 | Python | false | false | 3,212 | py | # -*- coding: utf-8 -*-
import unittest
import numpy
import matplotlib.pyplot as plt
"""
*******************************************************************************
Tests of the quantarhei.qm.corfunctions.spectraldensities module
**************************************************************************... | [
"tmancal74@gmail.com"
] | tmancal74@gmail.com |
4866fa215547659f317b66100bf9c6726089084b | 9bb78acf73e7ab74e3f85078499a4520594f060f | /concat_wiki.py | 1d1a6567e67f227989255c85c72795ef42abfcda | [
"Apache-2.0"
] | permissive | VNGResearch/crawl_news | e65f8ae2c4f0d7cbe51c4e072f3e9200c4490ddd | 187dfc9fa228435669a81f20f8d4d8e7b9bdf2fd | refs/heads/master | 2021-01-13T13:32:01.952767 | 2016-12-05T08:55:57 | 2016-12-05T08:55:57 | 72,624,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,134 | py | '''The code is suing to format wiki text after used WikiExtractor for dump archieve.'''
import os, glob, pdb
dir_in = './data/wiki/text/'
dir_out = './data/wiki/'
with open(os.path.join(dir_out, 'wiki_concat.txt'), 'w') as fw:
for d in os.listdir(dir_in):
print('===================', d)
for filen... | [
"thanhlct@gmail.com"
] | thanhlct@gmail.com |
8753e00f80c068ee6d8255bab175a8bb7d47ecc7 | 8b11fb374dca3b0515dc804aae66921201653a19 | /checkio/logistic-golf.py | e5441b5be0e15166f92f0b463fbd4da08c9d9ac0 | [
"Giftware"
] | permissive | nptit/python-snippets | 670b8d672e2ad3a6de264f21187bb497a7b0779b | b1eab44b50765e1710529747fd07a5ce320dd860 | refs/heads/master | 2021-01-25T11:27:32.989352 | 2016-04-26T17:28:22 | 2016-04-26T17:28:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | # too slow!
from itertools import*
def golf(m):
n=len(m);x=range;d=[]
for r in x(2,n+1):
for p in permutations(x(n), r):
if p[0]==0 and p[-1]==n-1 and all([m[p[i-1]][p[i]]>0 for i in x(1,len(p))]):
d.append(sum([m[p[i-1]][p[i]] for i in x(1,len(p))]))
return min(d) if d else 0
print golf(((0, 80, 58, 0), ... | [
"qpxu007@gmail.com"
] | qpxu007@gmail.com |
d0de9b6633cc377588297dcd15b40aac7d775ed4 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /QgSMSMpfcEebAyCye_8.py | 06bd85d0df27fd7f46dc66b430fe2682ed749eff | [] | 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 | 906 | py | """
One cause for speeding is the desire to shorten the time spent traveling. In
long distance trips speeding does save an appreciable amount of time. However,
the same cannot be said about short distance trips.
Create a function that calculates the amount of time saved were you traveling
with an average speed that... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
6ff8cc12f595864bcc1aa10f23be4625856b1410 | a67571dc6f4e83e44a90e4802d2f54b22fb21fd2 | /tns_glass/expenses/urls.py | 03a7c1c571b56cd9db1aa78f3d491ba4469d59b8 | [] | no_license | TechnoServe/SMSBookkeeping | 1833690e3329967b6ae731aad2ddb6b93655d935 | cbc816368ba4980ca6ce87c2bda95b76295009f1 | refs/heads/master | 2020-08-03T19:12:13.023005 | 2019-11-05T12:08:45 | 2019-11-05T12:08:45 | 211,856,646 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 126 | py | from django.conf.urls import *
from .views import *
# set up our url patterns
urlpatterns = ExpenseCRUDL().as_urlpatterns()
| [
"56976732+hgtal@users.noreply.github.com"
] | 56976732+hgtal@users.noreply.github.com |
9b7935ea289223dec3fdf5cf5c323d2d1c109180 | 358519772669c73092f625f630722c38e1d33783 | /DatabaseTopology/Force/G96Angle.py | 387d9265f6154a9856b137dc70e643a014848156 | [] | no_license | minghao2016/mmtools | e7e61aca084498408ceae965dd6c9450ad89eafa | 3ade988afb51cd54ee5a4067d8deaad88afbb0fe | refs/heads/master | 2021-09-21T01:02:22.522187 | 2014-09-19T03:40:03 | 2014-09-19T03:40:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | from Topology.Decorators import *
from Topology.Force.AbstractAngle import *
class G96Angle(AbstractAngle):
@accepts_compatible_units(None, None, None, units.degrees, units.kilojoules_per_mole)
def __init__(self, atom1, atom2, atom3, theta, k):
"""
"""
AbstractAngle.__init__(self... | [
"choderaj@mskcc.org"
] | choderaj@mskcc.org |
e5d3734a72990e8998c1c1bc2a826d2fa314d7bc | eefb06b0d8c8c98c1e9cfc4c3852d5c453eb5429 | /data/input/Azure/azure-sdk-for-python/azure-mgmt-authorization/azure/mgmt/authorization/operations/role_assignments_operations.py | 414c73323fea26bfe65a1e3146bf7f80516e3bfa | [] | no_license | bopopescu/pythonanalyzer | db839453bde13bf9157b76e54735f11c2262593a | 8390a0139137574ab237b3ff5fe8ea61e8a0b76b | refs/heads/master | 2022-11-22T02:13:52.949119 | 2019-05-07T18:42:52 | 2019-05-07T18:42:52 | 282,079,884 | 0 | 0 | null | 2020-07-23T23:46:09 | 2020-07-23T23:46:08 | null | UTF-8 | Python | false | false | 30,973 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft and contributors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | [
"rares.begu@gmail.com"
] | rares.begu@gmail.com |
6d23fa78b362bc10224a8f1806723888bb43209e | d725745f5c6b4ad99399aa50f368db39f5046f81 | /angr_platforms/ebpf/arch_ebpf.py | ce69367fd4bf1d4c59ced9909b3599b4fed7282f | [
"BSD-2-Clause"
] | permissive | angr/angr-platforms | 6816d777ea4696af05290613a490e91b8daa79ea | 06db4e6a594af47aaeb0a5071f2cdb9a8c30f7f5 | refs/heads/master | 2023-03-05T10:15:20.783462 | 2023-02-20T18:38:12 | 2023-02-20T18:38:12 | 86,003,468 | 60 | 28 | BSD-2-Clause | 2023-08-31T19:50:46 | 2017-03-23T22:28:04 | Python | UTF-8 | Python | false | false | 1,582 | py | from archinfo import Arch, Register, RegisterOffset, register_arch
class ArchExtendedBPF(Arch):
"""Extended BPF arch."""
name = "eBPF"
bits = 64
vex_arch = None
qemu_name = "eBPF"
ida_processor = "eBPF"
max_inst_bytes = 8
instruction_alignment = 1
register_list = [
# re... | [
"noreply@github.com"
] | angr.noreply@github.com |
ff642b72630d63d5b705af2645e7dff9048fd4f1 | 2aba62d66c2c622bdc148cef451da76cae5fd76c | /exercise/learn_python_dm2039/ch16/ch16_29.py | 76ee38bf4b12556373fe7be46cb6fc70a6f66f03 | [] | no_license | NTUT-109AB8011/crawler | 6a76de2ab1848ebc8365e071e76c08ca7348be62 | a703ec741b48d3af615a757fed7607b1f8eb66a6 | refs/heads/master | 2023-03-26T22:39:59.527175 | 2021-03-30T03:29:22 | 2021-03-30T03:29:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | # ch16_29.py
import re
# 測試1搜尋開始到結尾皆是數字的字串
msg = '09282028222'
pattern = '^\d+$'
txt = re.findall(pattern,msg) # 傳回搜尋結果
print(txt)
# 測試2搜尋開始到結尾皆是數字的字串
msg = '0928tuyr990'
pattern = '^\d+$'
txt = re.findall(pattern,msg) # 傳回搜尋結果
print(txt)
| [
"terranandes@gmail.com"
] | terranandes@gmail.com |
0aae5c8f8123a150649e4799b4773a3c13888325 | b37e2bc89e3e3191194a6060e4bf7cef71482695 | /train_vae.py | 508b92a2dc58a2ee93c809857e5c895b577f7518 | [
"MIT"
] | permissive | biandh/DALLE-pytorch | b10bbc590c54b04fa60d2653d6934db86ee2633a | c2ccaa48b43fbb5c29b833c8cae082a797ffc8b5 | refs/heads/main | 2023-03-10T00:11:50.750174 | 2021-02-20T04:01:55 | 2021-02-20T04:01:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,489 | py | import math
from math import sqrt
import argparse
import torch
from torch.optim import Adam
from torch.optim.lr_scheduler import ExponentialLR
# vision imports
from torchvision import transforms as T
from torch.utils.data import DataLoader
from torchvision.datasets import ImageFolder
from torchvision.utils import ma... | [
"lucidrains@gmail.com"
] | lucidrains@gmail.com |
e211d58c9098c0d358cbab093986f7c079d0f6cf | c24fef69a42ac1da33c892eb85c955acc743354c | /multithreading_multiprocess/sell_ticket_with_deadlock.py | e37cca3733afac501890904587b122309c47a7c3 | [] | no_license | Arithmeticjia/leetcode-python | e3c1d5c5a2733c56637ee2fb51222c7465dc6425 | a24869d88cb41e53fb0abe482ba87dd1e54b2167 | refs/heads/master | 2021-08-15T21:55:11.511687 | 2021-01-03T03:50:54 | 2021-01-03T03:50:54 | 237,393,853 | 1 | 0 | null | null | null | null | GB18030 | Python | false | false | 641 | py | # coding:gbk
import threading
import time
total = 5 # 总共的票数
lock = threading.Lock() # 创建不可重入互斥锁
# rlock = threading.RLock() # 创建可重入互斥锁
def sale():
global total
lock.acquire()
lock.acquire()
time.sleep(1)
print('正在售出第%s张票\n' % total)
time.sleep(1)
total -= 1
lock.release()
l... | [
"1097197237@qq.com"
] | 1097197237@qq.com |
2c831da32af3407d2f3ad1ee95dcb867b48d2bb7 | 2a54e8d6ed124c64abb9e075cc5524bb859ba0fa | /.history/3-OO-Python/2-attributes-methods_20200415002528.py | 405b115b79f2213ab1fda091ba07277c5d9961aa | [] | no_license | CaptainStorm21/Python-Foundation | 01b5fbaf7a913506518cf22e0339dd948e65cea1 | a385adeda74f43dd7fb2d99d326b0be23db25024 | refs/heads/master | 2021-05-23T01:29:18.885239 | 2020-04-23T19:18:06 | 2020-04-23T19:18:06 | 253,171,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 580 | py | # OOP
class PlayerCharacter :
# class object attribute - it is static
membership = True
# constructor method / init method
def __init__(self, name, age):
self.name = name #attributes
self.age = age
def run (self):
print('running')
return 'Workout is don... | [
"tikana4@yahoo.com"
] | tikana4@yahoo.com |
1fdaa55271242cbe787943c39bc4a90874b5634e | 8b1cab0497815d6c927a9dd64cdca3a58b890286 | /fabfile-deploy-natively.py | 688fd1f0da0f3f63243f5e6eced3fc614bf2f71b | [] | no_license | dschien/ep_deploy | e29d951c7e03dff5c38f8db7df08e7e6f4a4013c | ad4f67cf50210e30e8eeb29eac77dc0c8174c101 | refs/heads/master | 2021-01-20T19:39:19.026050 | 2016-08-12T15:44:42 | 2016-08-12T15:44:42 | 60,100,623 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,397 | py | from fabric import colors
import os, time, boto
import ConfigParser
import boto.ec2
from fabric.contrib.files import exists
__author__ = 'schien'
from fabric.api import *
GIT_ORIGIN = "git@github.com"
# The git repo is the repo we should clone
GIT_REPO = "dschien/ep_site.git"
# env.hosts = ['52.18.118.168']
DB_EN... | [
"dschien@gmail.com"
] | dschien@gmail.com |
8cde96fc88144ab64f34b48cdae3f18a63571685 | 3b31c39ab8269aa2d7060051db6ecab97e49aa8d | /mysite2/medicine/views.py | bddab105eba892c31415956a7d26473169709ddd | [] | no_license | seiya0723/medicine_checker_04 | ce2890890955f4c7ab1eef4a71b657963945d6ea | cd6c11e25b61a056097fd02ad37a8f11e7db7e31 | refs/heads/master | 2023-06-11T16:53:08.007479 | 2021-07-03T04:44:24 | 2021-07-03T04:44:24 | 382,526,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,515 | py | from django.shortcuts import render,redirect
from django.views import View
#クエリビルダ(複雑な検索処理を行う事ができる)
from django.db.models import Q
#JavaScript用にJSONレスポンスを返す
from django.http.response import JsonResponse
#レンダリングした後、文字列型にして返す
from django.template.loader import render_to_string
from .models import Medicine
#正規表現を使う... | [
"seiya@asahina"
] | seiya@asahina |
e676704593b04666cd09b4f9bc98470a844ee2c9 | 401abd0e20319927ef2d6aba5940f1e5ee0b4ee5 | /cwd.py | 5449b38ff831a97bf3788730e8d4a44bba4d7eae | [] | no_license | OctopusHugz/checker_hack_day | a821dc789212fbd5c21de34e50f6817c25bdca8a | fcab122bfc784720d41440357b3a6cd79f4e0986 | refs/heads/master | 2023-06-26T01:41:00.744815 | 2021-07-27T17:39:58 | 2021-07-27T17:39:58 | 300,801,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | #!/usr/bin/env python3
from os import getcwd, path
from projects import (low_list, high_list, sedo_list,
interview_list, web_front_end_list, web_back_end_list,
web_react_list)
def pid_from_cwd():
"""Returns a project's ID based on the current working directory"""
cw... | [
"colsonscott53@gmail.com"
] | colsonscott53@gmail.com |
6aa5a163b90b39c0ac27f13bb82e2ae042d17542 | 36222fc73431a89d41a342aa176158b8868bc41a | /accounts/migrations/0051_auto_20170412_1628.py | 3be2038a4dd7ec662e47fd8ab1e7a964244568c5 | [] | no_license | dxviidmg/CITNOVA | 9e3f555e192d4e875fc4b990b70c52e3f6fc8bc0 | f18d6e74082d0ddf58eaba439d5e20f2d48af7b9 | refs/heads/master | 2021-01-18T23:34:41.179481 | 2017-05-20T13:59:11 | 2017-05-20T13:59:11 | 87,117,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-12 21:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0050_auto_20170412_1622'),
]
operations = [
migrations.AlterFie... | [
"dmg_92@hotmail.com"
] | dmg_92@hotmail.com |
c3685030a33aff5508370080b26a5986fe2b03b1 | 31d10cf8f83fd04281f0e108ba0c9ed193f9ed7b | /0x01-python-if_else_loops_functions/6-print_comb3.py~ | 8a959951e4859dd39d222a64ffa40480d74aa967 | [] | no_license | RodrigoSierraV/holbertonschool-higher_level_programming | 822d41587c6336d363dd41609960a7ca23700fc2 | 7c671b5c0c46e2def8ccab760d7ceca1ca07702f | refs/heads/master | 2020-05-18T03:37:20.032499 | 2019-10-23T02:25:34 | 2019-10-23T02:25:34 | 184,111,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | #!/usr/bin/python3
for i in range(0, 9 + 1):
for b in range(0, 9 + 1):
if b > i and (b + i) < 17:
print("{:d}{:d}, ".format(i, b), end="")
elif + i == 17:
print("{:d}{:d}".format(i, b))
| [
"735@holbertonschool.com"
] | 735@holbertonschool.com | |
1a48019324f811a2932ab415786dec956df484f8 | f36b733f9c24d4cabd0d3354e0344094fbf3c026 | /a10_saltstack/helpers/helper_modules/a10_cgnv6_lsn_port_overloading.py | 109481f957d3b7d3b6f10485242a324a36f8fd11 | [
"Apache-2.0"
] | permissive | a10networks/a10-saltstack | 08e13647e0187b09500ed3d9053ae06e7e808746 | 0d86043b1d09e75ea170e72fac5068254fc4037c | refs/heads/master | 2021-03-19T16:11:14.211706 | 2019-07-24T17:18:04 | 2019-07-24T17:18:04 | 123,501,933 | 2 | 3 | null | 2019-07-24T17:18:05 | 2018-03-01T22:55:53 | Python | UTF-8 | Python | false | false | 1,442 | py | # Copyright 2019 A10 Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
"thompson.grey.hunter@gmail.com"
] | thompson.grey.hunter@gmail.com |
7febc115f14bfed876325b00ff64fcedfa4ca80e | 56e626db1b367f30e6978f5a5d573618823e9b6c | /train/train_multi_class_classify.py | 90931424639fe42f6842c9bf8a755ce8c6cee098 | [
"MIT"
] | permissive | witnesslq/transwarp-nlp | d9bdf53b8ded3ac07196b4ba82346429caeb5be8 | fc324253e9eff7d9d365ebb85ba81680bbe86f5f | refs/heads/master | 2021-01-21T09:39:31.373777 | 2017-05-11T12:51:43 | 2017-05-11T12:51:43 | 91,663,587 | 6 | 2 | null | 2017-05-18T07:39:42 | 2017-05-18T07:39:42 | null | UTF-8 | Python | false | false | 4,626 | py | # -*- coding: utf-8 -*-
import cPickle
import numpy as np
import tensorflow as tf
import os, time
from transwarpnlp.multi_class_classify.cnn_config import CnnConfig
from transwarpnlp.multi_class_classify import model_cnn
config = CnnConfig()
pkg_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def... | [
"endymecy@sina.cn"
] | endymecy@sina.cn |
7a749099ae0b4ffeccdc71b50ebdfe954e3b2755 | 8dcc345a522904fd2ebb4ce2f18ce425dca15868 | /upgrade_ipp_image.py | b3a2773e1d20b656aeb5b76e10e3c4ddd531fdb9 | [] | no_license | drunkwater/MyPerl | 45787b7f6cf241a97a8e1d3092656fa92511182a | 5d9c57b6f4eedb373a4fd55635f008f5e475fa19 | refs/heads/master | 2020-03-17T12:43:43.246462 | 2018-06-12T03:52:01 | 2018-06-12T03:52:01 | 133,600,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,257 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
########################################################################################
# @filename : upgrade_ipp_image.py
# @author : Copyright (C) Church.Zhong
# @date : Fri Jun 8 14:48:56 HKT 2018
# @function : upgrade IP... | [
"Church.Zhong@audiocodes.com"
] | Church.Zhong@audiocodes.com |
4cdf34e45cb5d8eaa9a0dc255e0b2e23dca732a5 | 0bb49acb7bb13a09adafc2e43e339f4c956e17a6 | /OpenNodes/OpenProject/addComment.py | 20008f8c48e3a22a8264afab4a51366f970cea38 | [] | no_license | all-in-one-of/openassembler-7 | 94f6cdc866bceb844246de7920b7cbff9fcc69bf | 69704d1c4aa4b1b99f484c8c7884cf73d412fafe | refs/heads/master | 2021-01-04T18:08:10.264830 | 2010-07-02T10:50:16 | 2010-07-02T10:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,495 | py | ###OpenAssembler Node python file###
'''
define
{
name addComment
tags opdb
input dbPath Path "" ""
input string Comment "" ""
output int result "" ""
}
'''
import os, sys,time
from Setup import opdb_setup
from getCleanPath import getCleanPath
class addComment(opdb_setup,getCleanPath):
def addComment_main(se... | [
"laszlo.mates@732492aa-5b49-0410-a19c-07a6d82ec771"
] | laszlo.mates@732492aa-5b49-0410-a19c-07a6d82ec771 |
d6e25c415c45703003f5f0ffb9e717bad338c732 | d0a1b71a91c67a9bca2d6c41738effde7bf3d503 | /be_loop_projector.py | a3456e470ae695e53647acd24ca5bff809aebbe6 | [
"MIT"
] | permissive | ssomnath/be_processes | a1a5a0f886b30768bc7552eab9d0a73e04fccf3c | d6e028926f2d79d78030e51ab6b440ff27bd6351 | refs/heads/master | 2020-07-04T20:48:08.129114 | 2019-11-27T16:06:35 | 2019-11-27T16:06:35 | 202,412,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26,446 | py | import numpy as np
import joblib
from pyUSID.io.hdf_utils import copy_region_refs, write_simple_attrs, create_results_group, write_reduced_anc_dsets, \
create_empty_dataset, write_main_dataset, get_attr, get_unit_values, reshape_to_n_dims, get_sort_order
from pyUSID.io.usi_data import U... | [
"14300780+ssomnath@users.noreply.github.com"
] | 14300780+ssomnath@users.noreply.github.com |
4b5832a605f16bffdeb23750b8ef37198504d3b2 | c0c8aeb5aaf08925d8c9e1d660b02c89cbc7ad71 | /Algorithms/Medium/47. Permutations II/answer.py | 2df5db8def3857a1e5ac90f79f3ef6b455e5fc92 | [
"Apache-2.0"
] | permissive | kenwoov/PlayLeetCode | b2fdc43d799c37683a9efdc31c4df159cf553bf5 | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | refs/heads/master | 2022-12-17T05:54:22.775972 | 2020-09-26T14:08:43 | 2020-09-26T14:08:43 | 214,839,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | from typing import List
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
res = []
def dfs(n, r, path):
if not n and path not in r:
r.append(path)
else:
for i in range(len(n)):
dfs(n[:i]+n[i+1:], ... | [
"kenwoov@outlook.com"
] | kenwoov@outlook.com |
f2c2cb9e12e923d4a06e08ac3ca969bebfed1aa3 | 1b1b5908dce757e9aa638507baa788f0f0e16611 | /rango/migrations/0008_auto_20170101_2008.py | b86f6213843fb8e6e9fb55a28bd53b135c7abe3a | [] | no_license | mish24/Rango | 5223f1c43ce74e2f336d95a3f03621b05d5af049 | fea0b6364bc265cdc09c75f745dd317fd38c0422 | refs/heads/master | 2021-04-28T21:34:44.014904 | 2017-01-04T21:27:26 | 2017-01-04T21:27:26 | 77,769,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-01 20:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rango', '0007_auto_20170101_1804'),
]
operations = [
migrations.AlterField(... | [
"poonammishra24398@gmail.com"
] | poonammishra24398@gmail.com |
2769fde5a6fcf7fc0bb42f8ee954d96b8448f6c5 | df20743069e3c81128438ecc8a368b1853dc8137 | /overrides/scr/Spell1141 - Lawful Sword.py | bb31be7e81e6a900b07745035c61feb4e1f6a0d0 | [
"MIT"
] | permissive | dolio/ToEE_Mods | 3f020d82e590a63a04047912d8d76fa2212957d7 | 53aa8086b89b25d7afb3104c5d8896c8a38c89b0 | refs/heads/main | 2023-04-09T06:17:47.064224 | 2021-04-29T09:41:58 | 2021-04-29T09:41:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | from toee import *
def OnBeginSpellCast(spell):
print "Lawful Sword OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
def OnSpellEffect(spell):
print "Lawful Sword OnSpellEffect"
spell.duration = 1 * spell.ca... | [
"herbstgeist@googlemail.com"
] | herbstgeist@googlemail.com |
ed9cdc6d73f30f066bf941daa653cda3d55256f4 | d6a87864028abde8da69b0a1075e3d4c483ed73c | /Reverse Integer.py | d8954fcc8255c6824667ffee755a63529a7904a4 | [] | no_license | Windsooon/LeetCode | 7ef78c7e001c1e6924244869a7ba5491d33eb246 | 409d7db811d41dbcc7ce8cda82b77eff35585657 | refs/heads/master | 2021-01-10T15:26:16.986357 | 2020-01-01T14:57:58 | 2020-01-01T14:57:58 | 54,531,267 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | class Solution:
# edge case [-2**31, 2**31-1]
def reverse(self, x: int) -> int:
if str(x)[0] == '-':
return 0 if -int(str(x)[1:][::-1]) < -2**31 else -int(str(x)[1:][::-1])
return 0 if int(str(x)[::-1]) > 2**31-1 else int(str(x)[::-1])
| [
"wiwindson@outlook.com"
] | wiwindson@outlook.com |
7369171e172ec35558a34b912f87ae620a62b2bd | db0e49a94c2554ec8853133d09afca65d697eb62 | /ucp/benchmarks/backends/__init__.py | 82957ed11af80a3f672847d21d7830a6f8b122b7 | [
"BSD-3-Clause"
] | permissive | rapidsai/ucx-py | 415c631039c9c6ceb8d90b04e872d5a61a12eb0f | 9ba056f9f2b1af169c6312b178e9853b066928bd | refs/heads/branch-0.34 | 2023-09-02T21:33:25.839513 | 2023-08-28T13:40:30 | 2023-08-28T13:40:30 | 149,822,197 | 103 | 45 | BSD-3-Clause | 2023-09-08T18:41:12 | 2018-09-21T21:53:38 | Python | UTF-8 | Python | false | false | 93 | py | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# See file LICENSE for terms.
| [
"noreply@github.com"
] | rapidsai.noreply@github.com |
c05311f36d454f07ffe8a84a2f0c8d3ccbd05600 | 296132d2c5d95440b3ce5f4401078a6d0f736f5a | /homeassistant/components/tomorrowio/sensor.py | 260ce7390ebe7428c265fc69990adb5dab5d553b | [
"Apache-2.0"
] | permissive | mezz64/home-assistant | 5349a242fbfa182159e784deec580d2800173a3b | 997d4fbe5308b01d14ceabcfe089c2bc511473dd | refs/heads/dev | 2023-03-16T22:31:52.499528 | 2022-12-08T02:55:25 | 2022-12-08T02:55:25 | 68,411,158 | 2 | 1 | Apache-2.0 | 2023-03-10T06:56:54 | 2016-09-16T20:04:27 | Python | UTF-8 | Python | false | false | 14,070 | py | """Sensor component that handles additional Tomorrowio data for your location."""
from __future__ import annotations
from abc import abstractmethod
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any
from pytomorrowio.const import (
HealthConcernType,
PollenIndex,
... | [
"noreply@github.com"
] | mezz64.noreply@github.com |
6f9c7fb744dc3a96ad6bb2b4190e57f301d9d99f | 3ee0d5a2cc955c4fb5583f4b88463e783cad8e9e | /examples/ds3/t370401.py | 17d5a22cc327ae9d733236fe6ad1666e4e3c0613 | [] | no_license | vawser/ESDLang | 47b18f7f14b26ae24d8c39d20701ffb0e0017f3c | 9455d423f4fae534abba7b98339c61e7f1350f53 | refs/heads/master | 2021-04-18T13:30:42.990177 | 2019-09-17T04:33:46 | 2019-09-17T04:33:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,518 | py | # -*- coding: utf-8 -*-
def t370401_1():
"""State 0,1"""
assert GetCurrentStateElapsedTime() > 1
while True:
"""State 2"""
call = t370401_x10()
assert IsClientPlayer() == 1
"""State 3"""
call = t370401_x11()
assert not IsClientPlayer()
def t370401... | [
"matt@thefifthmatt.com"
] | matt@thefifthmatt.com |
6daf09de199c4720ba3b97533878c2c6117c7379 | 2be43de3e8b6ce2f46da2c9afb021a6ea2abb74a | /neighbour/settings.py | 0c3691a9f2cd1a344b46b36ff6d4cc39343afdea | [
"LicenseRef-scancode-other-permissive"
] | permissive | CollinsMuiruri/IS-PROJECT | 345877fe61d14e94c8ec4a0bf8f6a4d76698fd43 | 2e59bb95a6dc3483e699140bde6792f6e92e1356 | refs/heads/master | 2021-09-09T12:01:01.065687 | 2019-07-16T14:29:46 | 2019-07-16T14:29:46 | 197,208,301 | 0 | 0 | null | 2021-09-08T01:08:59 | 2019-07-16T14:19:51 | Python | UTF-8 | Python | false | false | 3,667 | py | """
Django settings for neighbour project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | [
"wanyekicollins@gmail.com"
] | wanyekicollins@gmail.com |
047e8abdf1b097fc3d9312e4b3df9a03efecc976 | 11ca230c3db96ac41fa90104d502fde51aae306c | /04.기하학적 변환/6.remapping.py | 562d2fb460ecc045ae972bc4af5e18ea09445cfa | [] | no_license | wonsgong/Computer-Vision | e849ead6cea5ab5c274ef78643961a6138a6e975 | 09ada035299032337498f36198d2b8d3c3de1f01 | refs/heads/main | 2023-05-30T15:37:19.548360 | 2021-06-09T10:27:08 | 2021-06-09T10:27:08 | 353,696,068 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | import sys
import numpy as np
import cv2
src = cv2.imread('image/tekapo.bmp')
if src is None:
print("Image load failed")
sys.exit()
h,w = src.shape[:2]
mapy, mapx = np.indices((h,w),dtype=np.float32)
mapy = mapy + 10 * np.sin(mapx / 32)
dst = cv2.remap(src,mapx,mapy,cv2.INTER_LINEAR)
cv2.imshow('src',src... | [
"42221106+wonsgong@users.noreply.github.com"
] | 42221106+wonsgong@users.noreply.github.com |
91f0986327d0af5377be5d57f2f62bb0a350c79c | 2d93403fac1645fdbf1727f0d17fbea6eeef470a | /decorators/class_decorator.py | f027fda59d0aee11df10298deccf8addf27338d7 | [
"MIT"
] | permissive | Minkov/python-oop-2020-02 | d13c8c8feaa9ad41c524fc82887a98745115ac57 | d2acb1504c1a135cded2ae6ff42acccb303d9ab1 | refs/heads/master | 2021-02-04T00:43:14.997404 | 2020-03-26T18:21:03 | 2020-03-26T18:21:03 | 243,588,830 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | class Logger:
def __init__(self, function):
self.function = function
def __call__(self, *args, **kwargs):
def wrapper(*args, **kwargs):
try:
result = func(*args, **kwargs)
return result
except Exception as ex:
# w... | [
"DonchoMinkov@gmail.com"
] | DonchoMinkov@gmail.com |
0366f2bbf07bea5d9926d82c21d9601671a10744 | 2d3cb7101cae992a58a1b91ee22be7285bc3154e | /pyart/core/setup.py | be4d0e3bc25ad59e259bea291dc0e2f41650a9f4 | [
"BSD-3-Clause"
] | permissive | scollis/pyart | 341aca11a1e1b43482028bb688ad901e61f9a494 | 1a74b33e33df024cbc203ab1936eb5e7df4e92e7 | refs/heads/main | 2022-02-19T11:57:09.279907 | 2022-01-20T17:31:02 | 2022-01-20T17:31:02 | 450,486,932 | 1 | 0 | NOASSERTION | 2022-01-21T12:41:51 | 2022-01-21T12:41:51 | null | UTF-8 | Python | false | false | 343 | py |
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('core', parent_package, top_path)
config.add_data_dir('tests')
return config
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(... | [
"jjhelmus@gmail.com"
] | jjhelmus@gmail.com |
b68a8a14342800adc9d59d021eb2f95735b0fe85 | c39f999cae8825afe2cdf1518d93ba31bd4c0e95 | /PYME/DSView/modules/coloc.py | 0cd204438b7107a81e42648c9b67dddfd168f0b5 | [] | no_license | WilliamRo/CLipPYME | 0b69860136a9b2533f2f29fc29408d7471cb934d | 6596167034c727ad7dad0a741dd59e0e48f6852a | refs/heads/master | 2023-05-11T09:50:58.605989 | 2023-05-09T02:17:47 | 2023-05-09T02:17:47 | 60,789,741 | 3 | 1 | null | 2016-06-17T08:52:44 | 2016-06-09T16:30:14 | Python | UTF-8 | Python | false | false | 10,125 | py | #!/usr/bin/python
##################
# coloc.py
#
# Copyright David Baddeley, 2011
# d.baddeley@auckland.ac.nz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,... | [
"willi4m@zju.edu.cn"
] | willi4m@zju.edu.cn |
ad509fa452ed2f6659bfbdd82033485f1dd7412f | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /yFEMocjdiRjPhoDqv_2.py | 85c35556b13ff3699cdce5d83ac3bd06301dcef3 | [] | 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 | 554 | py |
def prime_in_range(n1, n2):
Range = []
Start = n1
End = n2
while (Start <= End):
Range.append(Start)
Start += 1
Counter = 0
Length = len(Range)
while (Counter < Length):
Value = Range[Counter]
Factor = 1
Factors = []
while (Factor <= Value):
i... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
15167f5da718def7ad4042fcb6379b086f5a8513 | dcb9c42dde1436a474dbedbde9f30eaabc898ad3 | /scripts/marline-khavele.py | d7a8fa0c4e8f06ad48bbec6932ac708ccc817819 | [] | no_license | farouk-afolabi/HNG-Script | c96aba3264d1f6d2e12119131d4126e680f9bb81 | 5cd2796f7a3c3d72237232237b9c68b666bf5dee | refs/heads/master | 2022-09-27T19:15:30.303847 | 2020-06-03T21:06:46 | 2020-06-03T21:06:46 | 269,051,273 | 1 | 1 | null | 2020-06-03T18:59:39 | 2020-06-03T09:54:36 | JavaScript | UTF-8 | Python | false | false | 175 | py | # stage 2 task
name = "Marline Khavele"
id = "HNG-04957"
language = "python"
print(
f"Hello World, This is {name } with HNGi7 {id} using {language} for stage 2 task"
)
| [
"marlinekhavele6@gmail.com"
] | marlinekhavele6@gmail.com |
840a8257774b3b458a5efd8b803cc773510357c9 | c88a6e7d909746d8473bc2300c37920c4295bb78 | /src/transformers/models/opt/modeling_opt.py | 9339b98ea8a67e71400b687e5507c47017fab524 | [
"Apache-2.0"
] | permissive | kssteven418/BigLittleDecoder | d54ea8d474eaddec7f4d8b8f42f5ef57612d4ce5 | a31b7e3efe893ac4cba48f679138a9b9ccfb7c63 | refs/heads/main | 2023-05-22T14:25:23.773708 | 2023-02-26T22:36:39 | 2023-02-26T22:36:39 | 599,960,048 | 47 | 3 | Apache-2.0 | 2023-02-26T22:36:40 | 2023-02-10T09:07:37 | Python | UTF-8 | Python | false | false | 56,729 | py | # coding=utf-8
# Copyright 2022 The Fairseq Authors and The HuggingFace Inc. 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/... | [
"noreply@github.com"
] | kssteven418.noreply@github.com |
c91d47c4a234399c275744c668f60c5ac3ac7dcc | 4ea6a1eb0c55f4d974ec4a0d2d3bb3228c48b62a | /django/apps/photo/migrations/0025_unique_together_story_image.py | 6bab330e3add6d836278674da1be5b4fa5f81218 | [
"Apache-2.0"
] | permissive | universitas/universitas.no | 16993d2fb65f21eff4a0cfd72540278276b24531 | 911a2541c77eca522ba5a723f175786f4f9eb481 | refs/heads/master | 2023-04-28T14:51:56.849564 | 2021-09-21T18:49:36 | 2021-09-21T18:52:17 | 19,112,283 | 19 | 6 | Apache-2.0 | 2023-04-15T19:12:19 | 2014-04-24T14:50:36 | Python | UTF-8 | Python | false | false | 1,418 | py | from collections import Counter
from django.db import migrations
import sorl.thumbnail.fields
import apps.photo.models
from utils.merge_model_objects import merge_instances
def dedupe_storyimages(apps, schema_editor):
"""merge storyimages with same parent_story/imagefile."""
StoryImage = apps.get_model("sto... | [
"haakenlid@gmail.com"
] | haakenlid@gmail.com |
d5a32dd2120e713308cbab8ae1ce4c1061696c20 | 5f14603614bf9357b03c147af3423bb500f15ad8 | /fe2/assettag/send_mail.py | ec40e165f715420971f0ada09c8d5d00bb7cedba | [] | no_license | damnedsteven/emcn | 76aa5449db00a0cb1dd8487c1bf19b4d4ed52014 | 89cdeb9d200f699772a0473fe9fd9b030d78cbc7 | refs/heads/master | 2021-01-23T05:24:03.401715 | 2018-05-03T09:12:52 | 2018-05-03T09:12:52 | 86,296,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,618 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from email import encoders
from email.header import Header
from email.mime.text import MIMEText
from email.utils import parseaddr, formataddr
from email.mime.multipart import MIMEMultipart, MIMEBase
import smtplib
from datetime import datetime, timedelta
import MySQLdb
... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
57678fa594c866acbcce6e886f60a4c7d20dca47 | f4b07a7596b17ec8651223c402cb91cb56087b2d | /evennia/utils/evform.py | 9e4453efdd0cec0978e93c24cbd52c96d9395e9d | [
"BSD-3-Clause"
] | permissive | tajmone/evennia | 092e146802af6e4f5567cddd51ce55496e158262 | 22f220f58dc30571a55d88b8e33583c043ab6827 | refs/heads/master | 2021-01-21T01:02:28.507130 | 2015-03-21T06:53:38 | 2015-03-21T06:53:38 | 30,980,401 | 1 | 0 | null | 2015-03-19T01:48:09 | 2015-02-18T18:43:46 | Python | UTF-8 | Python | false | false | 17,452 | py | # coding=utf-8
"""
EvForm - a way to create advanced ASCII forms
This is intended for creating advanced ASCII game forms, such as a
large pretty character sheet or info document.
The system works on the basis of a readin template that is given in a
separate Python file imported into the handler. This file contains
so... | [
"griatch@gmail.com"
] | griatch@gmail.com |
a031c313195e9f2b8cf80dab81820b5fad9aebac | 851b8ac597146bf467b96dea48331332eba48833 | /custom_components/lightwave2/sensor.py | e7865f1dec4978ec26fca4528c2fb4c5804b8bf5 | [] | no_license | bigal82/bruces_homeassistant_config | 9d569052ed1efd58a4f7035eba19007ff6be56c5 | 3def555be1b8e72a0f7a4978974d96c54544053a | refs/heads/main | 2023-08-24T09:09:37.406093 | 2021-10-25T07:09:56 | 2021-10-25T07:09:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,166 | py | import logging
from .const import LIGHTWAVE_LINK2, LIGHTWAVE_ENTITIES, LIGHTWAVE_WEBHOOK, DOMAIN
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, STATE_CLASS_TOTAL_INCREASING, SensorEntity, SensorEntityDescription
from homeassistant.const import POWER_WATT, ENERGY_WATT_HOUR, DEVICE_CLASS_POWER, DEV... | [
"Bruce.hartley@clickspares.co.uk"
] | Bruce.hartley@clickspares.co.uk |
e864f690bfea3be073b042cf3904b65ff035cfcb | 6c066611b11a8de5e2c22c30cfcc578a4c49edce | /GLSL/Source/Crok_blobs_GL/Crok_blobs_GL.py | 204b07f1e6bfa638561e524a79bbf87b93df6fb1 | [] | no_license | NatronGitHub/natron-plugins | ad2d9227637b4b86b45f92856fa54d327872a0a6 | b0c499fb6391024f54be9f26ed41b5cf7475d574 | refs/heads/master | 2022-12-12T10:02:20.252222 | 2022-11-30T02:29:04 | 2022-11-30T02:29:04 | 130,576,224 | 332 | 67 | null | 2022-11-30T02:29:05 | 2018-04-22T14:39:29 | Python | UTF-8 | Python | false | false | 41,352 | py | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE
# This file was automatically generated by Natron PyPlug exporter version 10.
# Hand-written code should be added in a separate file named Crok_blobs_GLExt.py
# See http://natron.readthedocs.org/en/master/devel/groups.html#adding-hand-written-code-callbacks-etc
# Note th... | [
"fabiof17pro@gmail.com"
] | fabiof17pro@gmail.com |
37152c7ebeacda42c49779f5fbbe920279f08de2 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/chrysali.py | 0c30f886170a3046e3450a147617a926be67ee54 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 203 | py | ii = [('RogePAV2.py', 5), ('GodwWSL2.py', 1), ('RogePAV.py', 4), ('RennJIT.py', 60), ('LeakWTI3.py', 1), ('ChalTPW2.py', 1), ('GellWPT.py', 3), ('GilmCRS.py', 1), ('WestJIT2.py', 54), ('KirbWPW2.py', 3)] | [
"prabhjyotsingh95@gmail.com"
] | prabhjyotsingh95@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.