blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c6b54f026d0192e33cc07008b2f0144c230049c8 | 0f79fd61dc47fcafe22f83151c4cf5f2f013a992 | /BOJ/1753.py | 9ad0359bef96a50500ff44c3a43a2cb8f213596e | [] | no_license | sangm1n/problem-solving | 670e119f28b0f0e293dbc98fc8a1aea74ea465ab | bc03f8ea9a6a4af5d58f8c45c41e9f6923f55c62 | refs/heads/master | 2023-04-22T17:56:21.967766 | 2021-05-05T12:34:01 | 2021-05-05T12:34:01 | 282,863,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 881 | py | """
author : Lee Sang Min
github : https://github.com/sangm1n
e-mail : [email protected]
title : 최단경로
description : Shortest Path
"""
import heapq
def dijkstra(start, distance):
q = []
heapq.heappush(q, (0, start))
distance[start] = 0
while q:
weight, v = heapq.heappop(q)
if dis... | [
"[email protected]"
] | |
8f49d60cc15b59556cdcb8cf63d51c39fdccb49e | bb680585552532aeaad4c297f68c6d87c29b70b3 | /checks/cs50/2017/x/greedy/checks.py | 0ad789000789772622adc3837c1603266050c84d | [] | no_license | mstrperson/check50 | 3eca1d2f67ca422d50313771953e903fd1d3636f | e615b8685c5aeb4c4015c86cd62cae9dc1c9bab5 | refs/heads/develop | 2021-01-01T06:14:33.906452 | 2017-07-18T20:07:02 | 2017-07-18T20:07:02 | 97,390,234 | 0 | 0 | null | 2017-07-18T18:54:13 | 2017-07-16T14:51:44 | Python | UTF-8 | Python | false | false | 2,133 | py | import os
import re
import sys
sys.path.append(os.getcwd())
from check50 import TestCase, Error, check
class Greedy(TestCase):
@check()
def exists(self):
"""greedy.c exists."""
super(Greedy, self).exists("greedy.c")
@check("exists")
def compiles(self):
"""greedy.c com... | [
"[email protected]"
] | |
56555304f5a4596878649f0fb0942c6ca5ceb0d2 | d14e79ff45ac22139df111c07fd130c2b37a1ad3 | /slide.py | 41a2425b464aae7f4b25d60152fdcd42e5a85a8d | [] | no_license | msarch/slide | 90127c19ed1c3fc940bec521e29fec04cf531ec4 | ec8d34124e43e1a5cde4290de5560e90a3d3f669 | refs/heads/master | 2021-01-19T18:41:13.309224 | 2017-04-28T19:41:23 | 2017-04-28T19:41:23 | 88,375,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,862 | py | #!/usr/bin/python
# -*- coding: iso-8859-1 -*-
# simple pyglet animation
# http://www.github.com/msarch/slide
import math
import pyglet
from pyglet.gl import *
DEG2RAD = 2* math.pi/360
OMEGA = 360.0 * 0.5 # angular velocity (rev/s) : 1/2 rev/s
ORIGIN = [1280/2,800/2,0] # x,y of screen center, rotation = 0
alpha = 0... | [
"[email protected]"
] | |
72b25c0a76850bdcae1bfe7848dc4a64f1b3ddc7 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_96/762.py | 2083c366cc527bd043cb724883b8d032aaa22ed4 | [] | 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,937 | py | import math
def dfs(N,S,P,t):
# print t
q=[]
q.append((S,-1,0))
maxV=-1
while(len(q)!=0):
#print q
c=q.pop()
#print c
if c[1]==N-1:
if c[0]==0:
maxV=max(maxV,c[2])
continue
shifts=[-2,-... | [
"[email protected]"
] | |
1a7ef9178fd407f25a697c82abad53c9092aff20 | e64c3c051f6b70aa0bab5be3508448578b1e0b15 | /core/orienteer/models/attitude/__init__.py | f338c8ab793aec114ca2cc88b491c2a28c974f30 | [] | no_license | davenquinn/Orienteer | c85c6cd16145ef545279c38bdb466856c02abd9d | 4f77575c12cf7a04ce70e3045630079ab8ebc5e0 | refs/heads/master | 2022-07-10T20:39:36.414259 | 2022-06-15T18:56:38 | 2022-06-15T18:56:38 | 172,312,115 | 0 | 0 | null | 2022-06-15T18:56:39 | 2019-02-24T08:09:26 | CoffeeScript | UTF-8 | Python | false | false | 8,078 | py | from __future__ import division
import numpy as N
from shapely.geometry import mapping
from sqlalchemy import func, select, CheckConstraint
from sqlalchemy.ext.associationproxy import association_proxy
import logging as log
from geoalchemy2.types import Geometry
from geoalchemy2.shape import from_shape, to_shape
fro... | [
"[email protected]"
] | |
cb05c2490be60fcbc72afce15389303ae36f68d2 | 5f0f0865b7e4e2aa1867a88c138df56936c0b23b | /blocks/tests/test_pylearn2.py | 6317698fe0dd1326830e4961c5d482d72d3399e1 | [
"MIT"
] | permissive | jych/blocks | 2c709dcf042f4259981adcb54d9e3a48dac0c87f | 995cb7b67545b272877ecf9e90285cc71c9e6091 | refs/heads/master | 2021-01-09T06:51:34.967301 | 2014-11-27T04:12:40 | 2014-11-27T04:12:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,329 | py | import logging
import numpy
import pylearn2
from pylearn2.space import VectorSpace
from pylearn2.testing.datasets import random_dense_design_matrix
from pylearn2.train import Train
from pylearn2.training_algorithms.sgd import SGD
from blocks.bricks import Sigmoid, MLP
from blocks.cost import SquaredError
from blocks.... | [
"[email protected]"
] | |
7c4bb7211655df9f643a3c3968ccecb8f9c5c2bd | 700b0528e949d7eacb6846ee7579e912b854fd51 | /TrustPot/settings.py | f56c0223ba3afd1780dabd7e621d0a5a53a18360 | [] | no_license | nucleoosystem/TrustPot | 340f33a46757fa6dbd98eae6be248f14ea8ca099 | 5e72bffdcd0f4232e98638387c794e7aaf684c9c | refs/heads/master | 2020-06-18T17:47:40.154449 | 2015-02-18T03:27:43 | 2015-02-18T03:27:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,268 | py | """
Django settings for TrustPot project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
# Buil... | [
"[email protected]"
] | |
b561709b47b0de856671dd1a8fa6d77dd686e849 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5690574640250880_0/Python/EnTerr/MinesweeperMaster.py | 889a6773a64d627ce18e10efa7cc9d0accbd413b | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 3,313 | py | #
# Google Code Jam 2014
# Roaund 0: C. Minesweeper Master
# submission by EnTerr
#
'''
Input
The first line of the input gives the number of test cases, T. T lines follow.
Each line contains three space-separated integers: R, C, and M (Rows, Columns, Mines).
Output
For each test case, output a line cont... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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):
... | [
"[[email protected]]"
] | |
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... | [
"[email protected]"
] | |
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__"... | [
"[email protected]"
] | |
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()
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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 | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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__)... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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, ...
... | [
"[email protected]"
] | |
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]={}
... | [
"[email protected]"
] | |
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 *=... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | ||
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... | [
"[email protected]"
] | |
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 =... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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:
... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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)
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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')
| [
"[email protected]"
] | |
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'
| [
"[email protected]"
] | |
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']
| [
"[email protected]"
] | |
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:... | [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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)
| [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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, ... | [
"[email protected]"
] | |
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
| [
"[email protected]"
] | |
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 ... | [
"[email protected]"
] | |
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):
... | [
"[email protected]"
] | |
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("最大的数字是"... | [
"[email protected]"
] | |
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: [email protected]
*
"""
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)) | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
**************************************************************************... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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), ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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)
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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))
| [
"[email protected]"
] | ||
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, ... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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 |
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:], ... | [
"[email protected]"
] | |
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(... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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])
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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(... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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"
)
| [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
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
... | [
"[email protected]"
] | |
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... | [
"[email protected]"
] | |
922ff5d630c9b04ec7b8d6b206e71f56a91e60c2 | f4dedea53630c9cbdc6297ae4a7e2a8195fd7691 | /10 Advanced Techniques/19 Signal Processing.py | c172f714e1656b011d12b7c13426a9755447f1f3 | [] | no_license | nikkisora/cses_problemset | d089db048444e07e002f131b4323adc9df95b05b | 03160f33e36cdc6d538403357b36bcb015b4dba7 | refs/heads/master | 2023-07-03T10:34:23.487709 | 2021-08-05T21:13:49 | 2021-08-05T21:13:49 | 379,251,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,018 | py | '''
CSES - Signal Processing
Time limit: 1.00 s
Memory limit: 512 MB
You are given two integer sequences: a signal and a mask. Your task is to process the signal by moving the mask through the signal from left to right. At each mask position calculate the sum of products of aligned signal and mask values ... | [
"[email protected]"
] | |
fa987bfdd73ebad2cf8c88d6d524f5747f1813f0 | 0827979a9e3bfca5900726f1cef428f8a8c819ba | /NRPyPN/PN_Hamiltonian_SS.py | c7b73e919953363b5e77f4d954b77a8449fb0f81 | [
"BSD-2-Clause"
] | permissive | zachetienne/nrpytutorial | 12763c9c0e0be0007b8cae5688225a33c8fb4442 | 1230b4d602e0657d42de0c7ea193c34058e4aca9 | refs/heads/master | 2023-09-01T06:31:22.549594 | 2023-08-14T19:47:16 | 2023-08-14T19:47:16 | 135,812,438 | 88 | 46 | BSD-2-Clause | 2023-09-02T00:25:36 | 2018-06-02T11:34:10 | Jupyter Notebook | UTF-8 | Python | false | false | 4,781 | py | # As documented in the NRPyPN notebook
# PN-Hamiltonian-Spin-Spin.ipynb, this Python script
# generates spin-spin coupling pieces of the
# post-Newtonian (PN) Hamiltonian, up to and
# including 3PN order.
# Core functions:
# f_H_SS_2PN(m1,m2, S1U,S2U, nU, q):
# Compute the complete H_SS_2PN term and store to
# ... | [
"[email protected]"
] | |
c5ec7aeea7ebd380c20fdedc5a2edfd5b703ce91 | 8a1bbbe4d3d487fcb5f86c9d5f108ea2b4de1894 | /df/r_incore.py | 818b962533399e9d73ea9a297d17207225f2dd09 | [
"BSD-2-Clause"
] | permissive | molguin-qc/pyscf | a7abaa7b61143c58fae065d2cf035952e782a1f0 | 0ca910a816e116542c83913b52e7a4a1cad83454 | refs/heads/master | 2020-04-06T06:21:13.065884 | 2015-11-24T22:49:49 | 2015-11-24T22:49:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,758 | py | #!/usr/bin/env python
#
# Author: Qiming Sun <[email protected]>
#
import time
import ctypes
import _ctypes
import numpy
import scipy.linalg
import pyscf.lib
from pyscf.lib import logger
import pyscf.gto
from pyscf.df import incore
from pyscf.scf import _vhf
libri = pyscf.lib.load_library('libri')
def _fpointer(na... | [
"[email protected]"
] | |
0022ad2cde11b4459237ac8330bc909f4317b4fd | 9cf97aa5fafe0ba5e06d72a19b50a7b326857dcf | /create_model_input.py | 7e02025b5139eebef743c40f5db58fca2dfd87f8 | [] | no_license | Shawn-nau/Time-series-prediction | a027b22f250e3dcd859f1d92a41a4e979a1a0526 | 044d34846d04a19898c3c8b874c7e982d545ab40 | refs/heads/master | 2020-09-11T13:18:34.457153 | 2019-03-30T15:00:57 | 2019-03-30T15:00:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,183 | py | import logging
import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
class Input_builder(object):
def __init__(self):
pass
def __call__(self, model,x,y=None,train_window=20,train_window_2=None):
if model=='weibull':
return self.create_weibull_input(... | [
"[email protected]"
] | |
ff10be4b7205ee829e3efe5d87de1af27b52f859 | 02bbac5a5e12b44919945ae7e95eb8d4c5bde28d | /hyperion/metrics/dcf.py | d6dd9c58b03ec60f96d509f00b84566fa255949f | [
"Apache-2.0"
] | permissive | whkanggg/hyperion | 5f594cb97512080cf0523abdc6407a8bc6db4562 | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | refs/heads/master | 2020-08-09T14:18:04.689788 | 2019-07-25T18:39:01 | 2019-07-25T18:39:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,869 | py | """
Copyright 2018 Johns Hopkins University (Author: Jesus Villalba)
Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from six.moves import xrange
import numpy as np
from .roc import compute_roc... | [
"[email protected]"
] | |
df1b94b8ff8b9f70e3b53c78cbdbd988c19b38a9 | e210c28eeed9d38eb78c14b3a6388eca1e0e85d8 | /tests/unit_test/app_common/statistics/stats_def_test.py | b96578b1c7ca54b12726685ee84f4b9e06a3b7e9 | [
"Apache-2.0"
] | permissive | NVIDIA/NVFlare | 5a2d2e4c85a3fd0948e25f1ba510449727529a15 | 1433290c203bd23f34c29e11795ce592bc067888 | refs/heads/main | 2023-08-03T09:21:32.779763 | 2023-07-05T21:17:16 | 2023-07-05T21:17:16 | 388,876,833 | 442 | 140 | Apache-2.0 | 2023-09-14T19:12:35 | 2021-07-23T17:26:12 | Python | UTF-8 | Python | false | false | 2,173 | py | # Copyright (c) 2022, 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... | [
"[email protected]"
] | |
0acf2de8988b83f552ee0e68ad6596e21dbee688 | e17b0ad0ebeb361e5565eb3d12e717f296a7b878 | /campanha/serializers.py | 59d2a9c5d8533925b7660699f482c3e15c887c8b | [] | no_license | easy-rpg/SheetAPI | 94ea732083c3a7a82577e59e3a882a878772d6eb | 5542197f8388eed761a15a79c6ccca4fd481ccba | refs/heads/master | 2022-12-11T17:01:16.130002 | 2018-07-05T00:26:48 | 2018-07-05T00:26:48 | 131,898,341 | 1 | 0 | null | 2022-11-22T02:30:09 | 2018-05-02T19:44:34 | Python | UTF-8 | Python | false | false | 603 | py | from rest_framework.serializers import ModelSerializer, CharField, StringRelatedField
from .models import Campanha, Arco
class ArcoSerializer(ModelSerializer):
campanha_nome = CharField(source='campanha.nome', read_only=True)
personagens = StringRelatedField(many=True, read_only=True)
class Meta:
... | [
"[email protected]"
] | |
8822e51cbaa2e4c42d764c8168d1caab8609a540 | efc6c38070f4587346c88ae2444a8b47bb51a635 | /backend/nameless_wave_19563/wsgi.py | 08b98350d05b1e315aaad1417e4a82387add737d | [] | no_license | andremcb/nameless-wave-19563 | ef259d2819855bb7b65f2c1c777a0d7fbf33df49 | cdfe66614bea363b8dbd25ab3232183971759041 | refs/heads/master | 2023-03-12T04:39:05.580066 | 2021-03-03T22:01:29 | 2021-03-03T22:01:29 | 344,275,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | """
WSGI config for nameless_wave_19563 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('... | [
"[email protected]"
] | |
87bb7f7ef350864d08ee12e01c5a02668a812e6e | 2fc11a0aaf47cbaa64fb1d3aa304c51424a96324 | /test/basic_test.py | 1a8c1072e21942884e38dbec0556b33a7a1ac19c | [] | no_license | isabella232/dex-cli | 2cd73758980d0661c083cdf8aebcb8d73f07c297 | 652101177afdc76ab2f378e9a9cc5cc1b7a6aaa8 | refs/heads/master | 2022-12-30T18:42:50.279225 | 2020-10-21T08:45:53 | 2020-10-21T08:45:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | # Example of test: Just for Integrating travis PR
# TODO: Add real tests https://github.com/gnosis/dex-cli/issues/25
def inc(x):
return x + 1
def test_answer():
assert inc(4) == 5
| [
"[email protected]"
] | |
76f406522001c4ab4dc3b879a3abdad7333ea711 | 8651c2c84e4b70ef6977d9364043605c354e1489 | /Ch8/02_pets.py | c92ecceef9a49b651aaee9681a2e0440e0395b43 | [] | no_license | sliverz6/Python_Crash_Course | c222cf1ff9dbe6518ee36a3db7f376c2e3b2a317 | 44cea09ab066e82feba97fee1e74e61fc7e1e565 | refs/heads/main | 2023-02-25T02:57:53.585677 | 2021-01-30T14:27:49 | 2021-01-30T14:27:49 | 333,345,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | def describe_pet(pet_name, animal_type="dog"):
"""애완동물에 관한 정보를 출력합니다."""
print("\nI have a " + animal_type + ".")
print("My " + animal_type + "'s name is " + pet_name.title() + ".")
describe_pet("harry") # 위치 매개변수
describe_pet(pet_name="harry", animal_type="hamster") # 키워드 매개변수
| [
"[email protected]"
] | |
331eaa11de4c8d4744427b517f6adbfc7b3e5a25 | 4a36b5979b0753b32cff3956fd97fb8ed8b11e84 | /0.24/_downloads/ecd77f376b369abaa61bcf309ffb8563/interpolate_bad_channels.py | 1c7c1f1d7a168c1c71f51760d3aba752b53d2d47 | [] | permissive | mne-tools/mne-tools.github.io | 8aac7ae10bf2faeeb875b9a351a5530dc0e53154 | 495e878adc1ef3374e3db88604504d7542b01194 | refs/heads/main | 2023-09-03T07:06:00.660557 | 2023-09-03T04:10:18 | 2023-09-03T04:10:18 | 35,639,371 | 12 | 16 | BSD-3-Clause | 2023-05-05T19:04:32 | 2015-05-14T22:04:23 | HTML | UTF-8 | Python | false | false | 1,452 | py | """
.. _ex-interpolate-bad-channels:
=============================================
Interpolate bad channels for MEG/EEG channels
=============================================
This example shows how to interpolate bad MEG/EEG channels
- Using spherical splines from :footcite:`PerrinEtAl1989` for EEG data.
- Using fie... | [
"[email protected]"
] | |
f310678a9fa600d8ab56e1100b469f3b7d2b850c | 6b233b45ac4ae18711a7f8a7730eebcf7e4e80ed | /dlms_control.py | 4db110d59c15672ed39fe3e81697db22ab8c0a10 | [] | no_license | petervanya/PTFEsim | 251b7501a48ab05245c778be0f39b9bacd821348 | 509ef87df647f5c1231efbbc0d0a84add1da28d6 | refs/heads/master | 2021-01-21T04:51:05.644202 | 2016-07-20T16:32:34 | 2016-07-20T16:32:34 | 46,088,758 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,278 | py | #!/usr/bin/env python
"""Usage:
dlms_control.py [--L <L> --dt <dt> --steps <n> --thermo <th> --halo <h>]
Generate DL_MESO control file.
Options:
--L <L> Box length [default: 40.0]
--dt <dt> Timestep [default: 0.05]
--steps <n> Number of steps [default: 10000]
--therm... | [
"[email protected]"
] | |
bdbc62414e39c5378751c220020b0e1074e5603e | 560136cbc70809a66d7fd653fadcc5f6ac2f7b8d | /buy_info.py | cb3e350fcee2935aba754ef4481f5686867ed763 | [] | no_license | Python51888/Tickets12306 | 4b3c7381bbf163de4b148e6c718977f633323197 | 25db032a835f7617410e080143668a11663573a8 | refs/heads/master | 2020-06-15T04:21:33.352932 | 2018-09-25T07:50:50 | 2018-09-25T07:50:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,672 | py | import tkinter as tk
import re
test = 0
def confirm_snp(t_file):
time = t_file[0]
checi = t_file[1]
start_station = t_file[2]
start_time = t_file[3]
start_time = start_time[:2] + ':' + start_time[2:]
stop_station = t_file[4]
stop_time = t_file[5]
stop_time = stop_time[:2] + ':' + stop... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.