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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d8cd8bc92697bfc2939abe105712ee2065fda300 | 85574bab97569bae7368dc4e2d2aa73c73743a9b | /MultirateDSP/Lectures/Examples/11_MultirateSigProcTransfasFB/Transform Matrix.py | 239810763f195419050739997bd2e31ea965b71f | [] | no_license | saradhimpardha/UdemyDSPFromGroundUpOnARMProcessors | 3c0fcd7272e892f222871dc412fc214851477aea | 576d4a38992533ed0733278d6b4b6444db58706b | refs/heads/main | 2023-05-04T15:45:30.184864 | 2021-05-28T14:40:46 | 2021-05-28T14:40:46 | 458,248,148 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,573 | py |
# coding: utf-8
# # Python example for Transform matrix:
# ## Take a DFT of size N =4 . Its transform matrix T can be obtained with
# In[1]:
import numpy as np
import warnings
warnings.filterwarnings('ignore')
T = np.fft.fft(np.eye(4))
T
# **Observe that we have complex values in the transform, and hence obtain ... | [
"franco.polo@ii-vi.com"
] | franco.polo@ii-vi.com |
77e3dc899fe559151fd510ac34830257a83d6ac5 | e6b4cc91077b1ab227a430ef2d6fdce1b4f30529 | /blog_tastypie/myapp/api.py | 41dbe547923a8dc3bd76ae6189dd555cfe437d09 | [] | no_license | werberth/tastypie-tutorial | 71bd5683f664b97edda448650ff3d78f17effb06 | 89eacd78a76787d4d5676ce1a3efe8a97ab27c17 | refs/heads/master | 2021-04-29T17:45:18.910239 | 2018-02-15T23:05:12 | 2018-02-16T17:53:39 | 121,677,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | from django.contrib.auth.models import User
from tastypie import fields
from tastypie.resources import ModelResource
from blog_tastypie.myapp.models import Entry
class UserResource(ModelResource):
class Meta:
queryset = User.objects.all()
resource_name = 'user'
excludes = [
'em... | [
"werberthvinicius@gmail.com"
] | werberthvinicius@gmail.com |
b4952a963d7ea011b62b131d19cfd7d814cac378 | 862631b5d9cf251c7067261a8ff5f3a40d382378 | /test_tkinter.py | 42dc0f24426f5fc8eac8e356b22422515dbe646a | [] | no_license | isakura313/codabra_neuro | ebd7ddd312cbbfd14f3e45413ac5f175c8c7f1e0 | 14cb6341898ef2a2d5f8608534de973dd264d89a | refs/heads/master | 2021-02-07T10:47:42.799156 | 2020-02-29T18:12:18 | 2020-02-29T18:12:18 | 244,016,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | from tkinter import *
root = Tk()
root.title("Codabra Neuro")
root.geometry("300x400")
def toSquare():
result = int(entry_data.get())
int_arr = []
for i in range(2,10):
res = result**i
int_arr.append(str(res))
s = ", "
final_res = s.join(int_arr) #ะพะฑัะตะดะธะฝะธะต
res_square = Label(... | [
"isakura313@gmail.com"
] | isakura313@gmail.com |
c33af6349fac4324a2cc782f576adb2d203ebb5e | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_116/1125.py | 9b069d88d81a582746184f915ca61375d37c3487 | [] | 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 | 6,162 | py | #!/usr/bin/python
import sys
if len(sys.argv) != 2:
print "Please run program: python file.py inputFilename"
sys.exit()
try:
f = open(sys.argv[1],'r')
count = int(f.readline())
except IOError:
print "Input File could not be opened"
sys.exit()
case = 1
while count > 0:
complete = True
cou... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
8112918af873a81f416c9e43e9ef631e9c7748c3 | d5c89ac3a62093f1b5e7ab892afed771bfbe88b0 | /university/c9/NJURescruitment.py | 15a55498c498a80a3dfc84a1f0065c2918ea56d7 | [
"Apache-2.0"
] | permissive | WallfacerRZD/UniversityRecruitment-sSurvey | 14b9197f5f67acd9570a66a69966f32b4262682c | 2b7952fc78d7698154ce0f231f4e4eff97a54b8f | refs/heads/master | 2021-08-27T22:27:39.856648 | 2017-12-10T15:22:30 | 2017-12-10T15:22:30 | 108,350,617 | 1 | 0 | null | 2017-10-26T02:19:44 | 2017-10-26T02:19:44 | null | UTF-8 | Python | false | false | 2,514 | py | # coding = utf-8
import requests
from bs4 import BeautifulSoup
from jedis import jedis
from util import util
table_name = "nju_company_info"
# ่ทๅๅไบฌๅคงๅญฆๆฐๆฎ
def get_nju_rescruit():
print("NJU Begin===================================================")
base_url = "http://job.nju.edu.cn:9081/login/nju/home.jsp?type... | [
"maicius@outlook.com"
] | maicius@outlook.com |
c1739b2ad22895d37350225e7b63c48eed95e0b0 | df21c9510edb6bbd325fb432d7f47b2cc0e7afb7 | /.history/Shoes/models_20200323120713.py | a75f953aa9f6b39ef9d3cf365a665663f146038e | [] | no_license | Imraj423/drf_shoestore | ff5eb00bfc890c49f2dd3fcd63bcd0479a4a674d | 41421a68cba0cabb7916bbddea49f640a2ce42d6 | refs/heads/master | 2021-04-23T23:52:40.520524 | 2020-03-25T21:17:21 | 2020-03-25T21:17:21 | 250,036,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,462 | py | from django.db import models
# Create your models here.
class Manufacturer(models.Model):
name = models.CharField(max_length=150)
website = models.URLField(max_length=200)
def __str__(self):
return self.name
class ShoeType(models.Model):
style = models.CharField(max_length=50)
def __s... | [
"dahqniss@gmail.com"
] | dahqniss@gmail.com |
eed162c7d9d433e50103d017d6431475cd6f8621 | d3f442a963ab75af3ed310201767b8c113886576 | /webnlg/utils_graph2text.py | 169f40e6e834e93d4b74eee0631f05ca9e9c45a0 | [
"Apache-2.0"
] | permissive | cqsss/plms-graph2text | 71afbb32c9d0042988e03ecae445ac95924e21a3 | 62c522c84aee00ae8aeaa465287b783eb853971e | refs/heads/master | 2023-09-03T01:15:34.204916 | 2021-11-18T10:28:38 | 2021-11-18T10:28:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,835 | py | import re
import os
def convert_text(text):
#return text
text = text.lower()
text = ' '.join(re.split('(\W)', text))
text = ' '.join(text.split())
return text
def eval_meteor_test_webnlg(folder_data, pred_file, dataset):
dir_path = os.path.dirname(os.path.realpath(__file__))
folder_data_b... | [
"ribeiro@aiphes.tu-darmstadt.de"
] | ribeiro@aiphes.tu-darmstadt.de |
4c9b85c9333e30316e2ddc81da95e00914409219 | 699a43917ce75b2026a450f67d85731a0f719e01 | /using_python/208_trie_tree.py | e353415550d33ab4dfcd2955ad9d96a0f51e3235 | [] | no_license | wusanshou2017/Leetcode | 96ab81ae38d6e04739c071acfc0a5f46a1c9620b | c4b85ca0e23700b84e4a8a3a426ab634dba0fa88 | refs/heads/master | 2021-11-16T01:18:27.886085 | 2021-10-14T09:54:47 | 2021-10-14T09:54:47 | 107,402,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | class TrieTree():
def __init__(self):
self.d ={}
def insert(self,word:str):
t = self.d
for c in word:
if c not in self.d:
t[c]={}
t=t[c]
t["end"] = True
def search(self,word:str):
t =self.d
for c in word:
... | [
"252652905@qq.com"
] | 252652905@qq.com |
fb4e6b6459e6d09ed5087263ac66e7b48cd82123 | 0dbbbb1dc8065ed0d27d6ef30fd585eafb481e52 | /port_xnn_time/load_and_pred.py | f02df8fcd69b350ac7a412f6fd9bb8eda87c822f | [] | no_license | ethan-jiang-1/ANN-HAPT | 149549e60544f5b7d2759b415940957133bf4e64 | d91175f2b58986146a118a006237137cf24fac3f | refs/heads/master | 2023-01-03T18:50:10.027300 | 2020-11-02T05:22:29 | 2020-11-02T05:22:29 | 304,639,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,134 | py | import numpy as np
import os, sys
currentdir = os.path.dirname(os.path.realpath(__file__))
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
cdr = os.path.dirname(__file__)
if len(cdr) != 0:
os.chdir(cdr)
from dataset_loader import load_dataset
rx_train, ry_train, rx_test, ry_test, labels, skip_r... | [
"ethanmac@mac.com"
] | ethanmac@mac.com |
27475e4dd82c4907aaa8047080839df7079d8c1c | 498e99bae2b0a107a4f1c8563a74470e8516f465 | /common/parse_settings.py | b06519ca6f1b8e057a56a2ea0a1be4735a283337 | [
"MIT"
] | permissive | xiaoxiaolulu/MagicTestPlatform | 91bcf9125c4c7f254bf8aaf425b7c72ca40b7a49 | dc9b4c55f0b3ace180c30b7f080eb5d88bb38fdb | refs/heads/master | 2022-05-29T00:05:48.030392 | 2020-01-20T09:16:44 | 2020-01-20T09:16:44 | 219,256,372 | 5 | 1 | MIT | 2022-05-25T02:24:22 | 2019-11-03T05:31:53 | Python | UTF-8 | Python | false | false | 773 | py | from tornado.util import import_object
from common.storage import storage
class Settings(object):
def __init__(self):
pass
def get_settings(self, name):
"""
:param name: ้
็ฝฎๅ
:return:้
็ฝฎ้กน
"""
global_settings = import_object('settings.base')
self._config... | [
"546464268@qq.com"
] | 546464268@qq.com |
26f41c89d89c34f30ded1f8a1a36420cc7a518b1 | 186216449b5834830ef979a3c9cdd89ac8e6b0e3 | /backend/vr_test_5031/urls.py | fc050338642bcfd7aeceffb784e23dd4f800d730 | [] | no_license | crowdbotics-apps/vr_test-5031 | df28f2e5b56e08662899201eaf2146d70dae3b1e | 06b0655fa3c64d0129cea0d81383b138c02345e0 | refs/heads/master | 2022-12-10T20:20:29.871847 | 2019-06-22T17:11:02 | 2019-06-22T17:11:02 | 193,259,529 | 0 | 0 | null | 2022-12-09T07:20:45 | 2019-06-22T17:10:46 | Python | UTF-8 | Python | false | false | 1,021 | py | """vr_test_5031 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
31e8a3bbd1b390162f599cee38aabc820177b162 | 0be5e52bd25f7bf78275fb7a6bc8de8597ad78b7 | /chapter03-functions/guessTheNumber.py | b22287de7a99fedc4137557e5a67d581b763fe43 | [
"MIT"
] | permissive | t04glovern/automatingPython | aaecf115212daf138ab1a42e8b1e806680531eb6 | c5f310e2c647c6513ab31917645669e10a7853c5 | refs/heads/master | 2021-01-18T22:26:35.452915 | 2016-07-19T05:08:42 | 2016-07-19T05:08:42 | 62,141,046 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | import random
lower = 1
upper = 20
secretNumber = random.randint(1,20)
print("I am thinking of a number between " + str(lower) + " and " + str(upper))
for guessesTaken in range(1, 7):
print("Take a guess")
guess = int(input())
if guess < secretNumber:
print("Your guess is too low")
elif gues... | [
"nathan@glovers.id.au"
] | nathan@glovers.id.au |
b9a692de8ede4d5a96df12f34121b3fc2ff3e44d | 66313e23c7a7c4202724efb500c25b009b6a207a | /tests/test_api_example.py | 7bf83f3fa6e3218c04560c387d3bb8aed48df419 | [
"MIT"
] | permissive | Tomasz-Kluczkowski/Weather-App | 5097a2613038321155ed2acb637ababb124b7344 | 560f6bb84f48618f38da50b94bb19ad73941c596 | refs/heads/master | 2022-12-23T09:58:05.459246 | 2018-01-08T22:30:50 | 2018-01-08T22:30:50 | 90,778,050 | 6 | 3 | MIT | 2022-11-22T01:52:27 | 2017-05-09T18:17:26 | Python | UTF-8 | Python | false | false | 507 | py | import pytest
from unittest import mock
from api_example import API
@pytest.fixture(scope="module")
def api_class():
api = API()
return api
@pytest.fixture()
def mock_response():
response = mock.Mock()
response.return_value.status_code = 2100
return response
def test_get_stuff(monkeypatch, api_c... | [
"tomaszk1@hotmail.co.uk"
] | tomaszk1@hotmail.co.uk |
93cfc322da21e171eac1ebf0353acf2ec9eca6d0 | 9bb83bf5f6c2b5d2da4dda711591ef9987490c66 | /3DdetectionPrototype/Yolo-Pytorch-nms-updated/pruning/l1norm.py | 89cac02f44b91d0e9cd7e121cd8ef6e4c5453184 | [] | no_license | nudlesoup/DeepLearning | cb5b7039a9de6098194b56143d1a72a564fed1c9 | 336e415b0353d6e18d106f894a97d8873a55e544 | refs/heads/master | 2021-06-25T00:50:40.339768 | 2020-12-23T02:38:58 | 2020-12-23T02:38:58 | 172,002,661 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,382 | py | from pruning.BasePruner import BasePruner
from pruning.Block import *
from models.backbone.baseblock import InvertedResidual, conv_bn, sepconv_bn,conv_bias
class l1normPruner(BasePruner):
def __init__(self, Trainer, newmodel, pruneratio=0.1):
super().__init__(Trainer, newmodel)
self.pruneratio = p... | [
"ameyad1995@gmail.com"
] | ameyad1995@gmail.com |
8cd0dc8a0badc0b48d9f1277a147dd28fdbfe85d | a59deecc5d91214601c38bd170605d9d080e06d2 | /27-iterators-and-generators/04-generator/app.py | 3d498d3f72f8667c2d8f8187457450c724001da9 | [] | no_license | reyeskevin9767/modern-python-bootcamp-2018 | a6a3abdb911716d19f6ab516835ed1a04919a13d | d0234f10c4b8aaa6a20555348aec7e3571e3d4e7 | refs/heads/master | 2022-12-03T18:48:50.035054 | 2020-08-09T03:00:55 | 2020-08-09T03:00:55 | 286,109,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py |
# * Generator
def count_up_to(max):
count = 1
while count <= max:
yield count
count += 1
counter = count_up_to(5)
print(next(counter))
print(next(counter))
print(next(counter))
print(next(counter))
| [
"reyeskevin9767@gmail.com"
] | reyeskevin9767@gmail.com |
751cb3df98c725246e7254643151d9e12a025791 | cad999eacee16dc0e001a57f50b5d8b0f4d4ebf6 | /p2*.py | 8354a4da33be2f8d899d2544041a0abd50d9cc97 | [] | no_license | divyanarra0/pythonprogram | 8694a41ba3b39eb44a94a693eac3f7f5f18b588b | 10d8f59a472ccd4548771bad29be84a1a44854d8 | refs/heads/master | 2020-03-27T10:32:21.664657 | 2019-05-14T07:31:00 | 2019-05-14T07:31:00 | 146,427,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | num = 2
#num = int(input("Enter a number: ")
factorial = 1
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):
factorial = factorial*i
print(factorial)
| [
"noreply@github.com"
] | divyanarra0.noreply@github.com |
e14b35975410ed918ee3102ed48d7daa49a1ed83 | 4be5c172c84e04c35677f5a327ab0ba592849676 | /python/interviewbit/arrays/first_missing_integer/first_missing_integer_efficient.py | 376fca45765107b58a416abf20705b168acf15e2 | [] | no_license | niranjan-nagaraju/Development | 3a16b547b030182867b7a44ac96a878c14058016 | d193ae12863971ac48a5ec9c0b35bfdf53b473b5 | refs/heads/master | 2023-04-06T20:42:57.882882 | 2023-03-31T18:38:40 | 2023-03-31T18:38:40 | 889,620 | 9 | 2 | null | 2019-05-27T17:00:29 | 2010-09-05T15:58:46 | Python | UTF-8 | Python | false | false | 3,050 | py | '''
https://www.interviewbit.com/problems/first-missing-integer/
First Missing Integer
Given an unsorted integer array, find the first missing positive integer.
Example:
Given [1,2,0] return 3,
[3,4,-1,1] return 2,
[-8, -7, -6] returns 1
Your algorithm should run in O(n) time and use constant space.
'''
'''
So... | [
"vinithepooh@gmail.com"
] | vinithepooh@gmail.com |
d66c704541687ca99b889a95adb06548fafbae94 | 36de14c6b188886df6a284ee9ce4a464a5ded433 | /Solutions/0825/0825.py | afacf0d9a45858a176d7e3671a8f9fce69478278 | [] | no_license | washing1127/LeetCode | 0dca0f3caa5fddd72b299e6e8f59b5f2bf76ddd8 | b910ddf32c7e727373449266c9e3167c21485167 | refs/heads/main | 2023-03-04T23:46:40.617866 | 2023-02-21T03:00:04 | 2023-02-21T03:00:04 | 319,191,720 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | # -*- coding:utf-8 -*-
# Author: washing
# DateTime: 2021/12/27 10:11
# File: 0825.py
# Desc: CV
class Solution:
def numFriendRequests(self, ages: List[int]) -> int:
n = len(ages)
ages.sort()
left = right = ans = 0
for age in ages:
if age < 15:
... | [
"1014585392@qq.com"
] | 1014585392@qq.com |
fe85ae6997230fb2e31fef2b1763950eb98af560 | 93e5b82332af9f0d3e203d086e30794fb90a2086 | /unrar/unrar.py | 8d645265f998ebee2702c42c88aaa8275463ed6b | [] | no_license | swell1009/ex | cfaae0b5fe917f12416170dce60f7dea8194f368 | 29b274fb51adbdc43af6ebecaec89c97bc58be6f | refs/heads/master | 2020-04-04T10:15:20.578932 | 2018-11-22T06:27:30 | 2018-11-22T06:27:30 | 155,848,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,017 | py | # ๅ็ผฉๆไปถ็ ด่งฃไปฃ็
# https://blog.csdn.net/qq_41262248/article/details/79316385
import os
import sys
# zipfileๆฏPythonๆ ๅๅบ
import zipfile
# ๅฐ่ฏๅฏผๅ
ฅๆฉๅฑๅบunrar
from unrar import rarfile
def decryptRarZipFile(filename):
# ๆ นๆฎๆไปถๆฉๅฑๅ๏ผไฝฟ็จไธๅ็ๅบ
if filename.endswith('.zip'):
fp = zipfile.ZipFile(filename)
elif filename.en... | [
"swell1009@qq.com"
] | swell1009@qq.com |
e570148bb74539c9bb9e4f7155c054907ec188c5 | 0e4860fecfdd34a3255003cc8c8df086c14083dd | /program/algorithm/ProgrammerXiaohuiPython/src/chapter6/part4/AStar.py | 5a9d918f35d886cf2e2d469ba38b5ab5095fdd6c | [] | no_license | anzhihe/learning | 503ab9a58f280227011da5eaa4b14b46c678e6f3 | 66f7f801e1395207778484e1543ea26309d4b354 | refs/heads/master | 2023-08-08T11:42:11.983677 | 2023-07-29T09:19:47 | 2023-07-29T09:19:47 | 188,768,643 | 1,443 | 617 | null | 2023-08-24T02:10:34 | 2019-05-27T04:04:10 | Python | UTF-8 | Python | false | false | 3,581 | py | def a_star_search(start, end):
# ๅพ
่ฎฟ้ฎ็ๆ ผๅญ
open_list = []
# ๅทฒ่ฎฟ้ฎ็ๆ ผๅญ
close_list = []
# ๆ่ตท็นๅ ๅ
ฅopen_list
open_list.append(start)
# ไธปๅพช็ฏ๏ผๆฏไธ่ฝฎๆฃๆฅไธไธชๅฝๅๆนๆ ผ่็น
while len(open_list) > 0:
# ๅจopen_listไธญๆฅๆพ Fๅผๆๅฐ็่็นไฝไธบๅฝๅๆนๆ ผ่็น
current_grid = find_min_gird(open_list)
# ๅฝๅๆนๆ ผ่็นไปopenListไธญ็งป้ค
... | [
"anzhihe1218@gmail.com"
] | anzhihe1218@gmail.com |
b520402a863f0a03e2b8838f352802afe71d727e | bf772ff5616774dfbcace27a9d80ad318409d046 | /codenode/twisted/plugins/python.py | 3bd798bd6ddd2a46beb468ceedd5c2fee7a86f8a | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jamescasbon/codenode | c51db69f61659ab0459af8eabcb7f2ef04b5df2d | f6402cc5a6405cd906e2c2751a970f3a644a9c30 | refs/heads/master | 2020-12-25T02:25:28.149849 | 2010-11-15T18:52:37 | 2010-11-15T18:52:37 | 248,694 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py |
import os
from codenode.backend.engine import EngineConfigurationBase
boot = """from codenode.engine.server import EngineRPCServer
from codenode.engine.interpreter import Interpreter
from codenode.engine import runtime
namespace = runtime.build_namespace
port = runtime.find_port()
server = EngineRPCServer(('localhos... | [
"deldotdr@gmail.com"
] | deldotdr@gmail.com |
61b1e90f7e2041c22e774b010a6fc728e53f501e | 3d4332662fca27b70c7d77998f535cd2325a6d16 | /quiz/model/__init__.py | c7f5dbe9f9a5fb1b6e153f982571b52cdeceb5cd | [
"MIT"
] | permissive | Huangkai1008/quiz | 1a3438c1e57b840f9373c558410009d6f0b8617e | 3da2f7486d24b6d18a064cf8cfb50cfc0fa4ee6f | refs/heads/master | 2022-12-14T18:42:16.707700 | 2020-03-06T13:31:50 | 2020-03-06T13:31:50 | 196,193,129 | 3 | 0 | MIT | 2022-12-08T10:55:28 | 2019-07-10T11:31:23 | Python | UTF-8 | Python | false | false | 143 | py | from .user import User
from .question import Question, Answer, AnswerVote, Comment, CommentVote
from .topic import Article, ArticleVote, Topic
| [
"18778335525@163.com"
] | 18778335525@163.com |
4f658f83bdcba0be5997f78534b1972dfcd2b3a9 | da4c71cef520269843aa3daf10d9cb5fcc0da644 | /seleniumbase/fixtures/constants.py | 1d15d0436001d1cc66ca49d9689cb87bd13548b1 | [
"MIT"
] | permissive | mehmetgul/SeleniumBase | ae3e9ba45a285f7ad253170ad6f29cdf61ed775b | 205aa70221e858b70a6692b190f8e44f54fcf723 | refs/heads/master | 2020-08-04T13:22:05.538453 | 2019-10-01T04:58:12 | 2019-10-01T04:58:12 | 212,150,478 | 0 | 1 | MIT | 2019-10-01T16:54:23 | 2019-10-01T16:54:23 | null | UTF-8 | Python | false | false | 5,647 | py | """
This class containts some frequently-used constants
"""
class Environment:
# Usage Example => "--env=qa" => Then access value in tests with "self.env"
QA = "qa"
STAGING = "staging"
DEVELOP = "develop"
PRODUCTION = "production"
MASTER = "master"
LOCAL = "local"
TEST = "test"
class... | [
"mdmintz@gmail.com"
] | mdmintz@gmail.com |
f98f0ae7ad8095b1778616da4f0e09383fa205d2 | 47d3e3149269277b164fecb176b5d0297d398b2e | /Python_coding_dojang/Unit 21/practice.py | 5ea92bf4f5e5a6252de63048d4b18b8cedea1aa7 | [] | no_license | heechul90/study-python-basic-1 | 325e8c81fe35cd0cd22934869413e475b6734652 | 82d778e5960c0bde102bdc4c52fc61f61ba27745 | refs/heads/master | 2022-10-31T07:03:54.213599 | 2022-10-24T10:54:40 | 2022-10-24T10:54:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | ### Unit 21. ํฐํ ๊ทธ๋ํฝ์ค๋ก ๊ทธ๋ฆผ ๊ทธ๋ฆฌ๊ธฐ
## 21.5 ์ฐ์ต๋ฌธ์ : ์ค๊ฐ๋ณ ๊ทธ๋ฆฌ๊ธฐ
## ๋ค์ ์์ค ์ฝ๋๋ฅผ ์์ฑํ์ฌ ์ค๊ฐ๋ณ์ด ๊ทธ๋ ค์ง๊ฒ ๋ง๋์ธ์.
## ๊ฐ ๋ณ์ ๊ธธ์ด๋ 100
## ๋ณ์ ๊ผญ์ง์ ์ 72๋๋ฅผ ๋ ๋ฒ ํ์ ํด์ 144๋ ํ์
## ๋ณ์ ๋ค์ ๊ผญ์ง์ ์ ๊ทธ๋ฆด ๋๋ 72๋ ํ์
import turtle as t
t.shape('turtle')
for i in range(5):
t.fd(100)
t.right(360 - 72)
t.fd(100)
t.right(72 * 2)
t.mainloop()
| [
"heechul4296@gmail.com"
] | heechul4296@gmail.com |
4267cfa167cf839e86c323aa0bff898ae2b2b7a4 | 58afefdde86346760bea40690b1675c6639c8b84 | /leetcode/shuffle-string/376399352.py | 10f38707e3fa99e2a8a25a199abcca25cad841c6 | [] | no_license | ausaki/data_structures_and_algorithms | aaa563f713cbab3c34a9465039d52b853f95548e | 4f5f5124534bd4423356a5f5572b8a39b7828d80 | refs/heads/master | 2021-06-21T10:44:44.549601 | 2021-04-06T11:30:21 | 2021-04-06T11:30:21 | 201,942,771 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 350 | py | # title: shuffle-string
# detail: https://leetcode.com/submissions/detail/376399352/
# datetime: Wed Aug 5 16:40:38 2020
# runtime: 108 ms
# memory: 13.9 MB
class Solution:
def restoreString(self, s: str, indices: List[int]) -> str:
l = [None] * len(s)
for c, i in zip(s, indices):
l[i]... | [
"ljm51689@gmail.com"
] | ljm51689@gmail.com |
1b8e6b868d02f908235620ff1799906d5fcf28ee | e904bd56e931e3b06f2542f8c77e579ceaf4270b | /src/src_import.py | 30caff366cef0782892e4a6cba76ddca807b0c68 | [] | no_license | QMSimProject/trapped_ion_sim | 5d3419cdce0373d4fb9067aded691e02c9795912 | 668821841530cc9055403b00e879edbbd28b297f | refs/heads/master | 2021-01-01T18:08:05.632322 | 2015-06-25T06:17:02 | 2015-06-25T06:17:02 | 22,006,635 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
#
# Author: Mario S. Kรถnz <mskoenz@gmx.net>
# Date: 01.05.2014 19:53:33 CEST
# File: src_import.py
# all central import that are needed in the all src-files are imported here
import qutip as q
import pylab as pl
import numpy as np
import copy
import cPickle as pickle... | [
"mskoenz@gmx.net"
] | mskoenz@gmx.net |
fbdd1c86e4afbd015b8a4f91b7720f00a881b949 | a5829ec0c213de2489b73d2a79cd17e62e27d40c | /docs/DSDC/miniprez/miniprez/continuous_integration.py | 31e76ef0dddf511d5e363ce2b9c0502413fbe8c1 | [
"MIT"
] | permissive | thoppe/Presentation_Topics | 13d4ea7a8dd66463f2e37023bf7e986542fd6ee0 | e9aba07e9ab087b44e6044c6082ba8e873a9b4fd | refs/heads/master | 2021-11-24T18:02:10.944169 | 2021-10-26T21:11:03 | 2021-10-26T21:11:03 | 160,071,657 | 0 | 1 | MIT | 2019-02-19T15:12:23 | 2018-12-02T17:23:32 | null | UTF-8 | Python | false | false | 1,366 | py | import asyncio
import os
from parser import miniprez_markdown, build_body
import logging
logger = logging.getLogger("miniprez")
async def file_watcher(target_file, sleep_time=0.5):
"""
Watchs a file. If modified, yield the filename.
Yield the filename once to start.
"""
# Yield the file first
... | [
"travis.hoppe@gmail.com"
] | travis.hoppe@gmail.com |
5c8c89e31867e31e5cba92b8c42fc023695a819c | f020d00342311f84376f8b39c09f5c0f7d6b9196 | /tratum/document_manager/migrations/0023_document_template_path.py | e860d31dcb878b5e7f79f134ed39bcf19652a7c2 | [] | no_license | dmontoya1/minutas | a7aa5e4a652af47b4a70e881d114e241d5bf49cc | e6447cd030e34c0fd3a980021f23624da2d2d5a3 | refs/heads/master | 2023-05-12T16:48:53.830140 | 2021-03-26T02:33:43 | 2021-03-26T02:33:43 | 371,433,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | # Generated by Django 2.0.6 on 2018-06-21 22:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('document_manager', '0022_auto_20180619_1635'),
]
operations = [
migrations.AddField(
model_name='document',
name='te... | [
"dcastano@apptitud.com.co"
] | dcastano@apptitud.com.co |
a3df573c4c19c7aceb0f95047d6a1a7da5d4da45 | 571d36f865b545c0a72134e586fbcddd6953a68b | /tools/pallette/pallette.py | 3ed90c377e2e34f1b599e066a115e29e1f7b1fdb | [] | no_license | andrew-turner/Ditto | a5a79faaf31cc44d08ac5f70fa2ac51e51d1b60f | 72841fc503c716ac3b524e42f2311cbd9d18a092 | refs/heads/master | 2020-12-24T14:19:01.164846 | 2015-05-20T08:42:26 | 2015-05-20T08:42:26 | 35,935,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,527 | py | import sys
import traceback
import functools
from tkinter import *
import tkinter.colorchooser
import tkinter.filedialog
import tkinter.messagebox
import Image
import ImageTk
def myfunc(event):
print("X")
class app():
def __init__(self, master):
self.master = master
print("C")
self.fn = tki... | [
"andrew.turner@merton.ox.ac.uk"
] | andrew.turner@merton.ox.ac.uk |
a215a3acc6128563bc49d271d002ea4ae0233711 | d50685a3f3d612349b1f6627ed8b807f0eec3095 | /start/fayuan/selenium/fayuan_download_firefox.py | 5dd44f918ecca4b522e3809e69c2a499937ea1d5 | [] | no_license | Erich6917/python_littlespider | b312c5d018bce17d1c45769e59243c9490e46c63 | 062206f0858e797945ce50fb019a1dad200cccb4 | refs/heads/master | 2023-02-12T23:22:27.352262 | 2021-01-05T06:21:20 | 2021-01-05T06:21:20 | 113,631,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,626 | py | # -*- coding: utf-8 -*-
# @Time : 2019/4/14
# @Author : ErichLee ErichLee@qq.com
# @File : fayuan_download.py
# @Comment :
#
import sys
import re
import sys
import requests
import json
import time
from selenium import webdriver
from bs4 import BeautifulSoup
from util.file_check_util import *
from... | [
"1065120559@qq.com"
] | 1065120559@qq.com |
8429a1879154030926ba2b938b313d4f4f44f0c2 | 45520037aa5b1a71764a856ce96cb99c008e437e | /Section 8 Introduction to PyMongo/src/4_counting_documents.py | 24d5f2b275eb37f33b5dc50dda70d0bfc2c373c6 | [] | no_license | syurskyi/Learn_How_Python_Works_with_NoSql_Database_MongoDB_PyMongo | 1a9fabf062b57f36e86a920584b74f350e463906 | 505d68b3eb16fc5e0d5dd35f64756df1369c11ba | refs/heads/master | 2020-09-01T08:09:42.629734 | 2019-11-06T04:31:29 | 2019-11-06T04:31:29 | 218,916,529 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | import pymongo
from pymongo import MongoClient
# connect to host and server
client = MongoClient('localhost', 27017)
# connect to database myFirstE
db = client.myFirstE
# connect to collection
stud1 = db.stud
results = stud1.find().count()
print(results)
| [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
ba821ab7ffc4db06873819b566c29b3eda27c646 | d67aac932b0c1a91bc064884260504e46c526839 | /page_objects/CatalogPage.py | 242d796358e13163213769082593fd114cf4c106 | [] | no_license | maslovaleksandr/opencart_tests | 8ad3abc57d2a3e5f26fa41a92fdd35825f43ebe8 | a11d3cba601b1282523022cad67c19ac660a1a9a | refs/heads/master | 2023-05-07T08:55:45.080737 | 2020-08-24T20:41:48 | 2020-08-24T20:41:48 | 284,944,354 | 0 | 1 | null | 2021-06-02T02:45:07 | 2020-08-04T10:12:14 | Python | UTF-8 | Python | false | false | 2,021 | py | from .DefaultPage import DefaultPage
from ..locators.Catalog import Catalog
from selenium.webdriver.support.ui import Select
from ..locators.Main import Main
class CatalogPage(DefaultPage):
def open_phones_catalog(self):
self._click(Main.main_menu.phones_and_pda)
return self
def sort_opened_... | [
"a.mslv@outlook.com"
] | a.mslv@outlook.com |
daab9dc5727a358eb8f51da3f48cb1743571831e | 077c91b9d5cb1a6a724da47067483c622ce64be6 | /trigger_priority_mismatch_small_mcs/replay_config.py | 104c6f06cb0af0fdbcea1e53bc81c5b86fb3cdae | [] | no_license | Spencerx/experiments | 0edd16398725f6fd9365ddbb1b773942e4878369 | aaa98b0f67b0d0c0c826b8a1565916bf97ae3179 | refs/heads/master | 2020-04-03T10:11:40.671606 | 2014-06-11T23:55:11 | 2014-06-11T23:55:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,299 | py |
from config.experiment_config_lib import ControllerConfig
from sts.topology import *
from sts.control_flow import Replayer
from sts.simulation_state import SimulationConfig
from sts.input_traces.input_logger import InputLogger
simulation_config = SimulationConfig(controller_configs=[ControllerConfig(start_cmd='./pox.... | [
"cs@cs.berkeley.edu"
] | cs@cs.berkeley.edu |
b4b375c2227967f88a29066916bb8465946bfb35 | 511f572c5c6d0e73e3f57495c065af4a3e8b3b76 | /4.19.1.py | e4f436847e7b7ae74a880ac8ec310b64be6ecf16 | [] | no_license | lancecopper/python_cookbook_exercises | 595b1c9dea0b5197ca951f85012821f5d6a25e1f | 58f76503f01941b65fa884049b2fa9589e98bc38 | refs/heads/master | 2021-01-01T04:39:49.823408 | 2016-05-08T14:34:41 | 2016-05-08T14:34:41 | 56,480,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,573 | py | from ply.lex import lex
from ply.yacc import yacc
#Token list
tokens = ['NUM', 'PLUS', 'MINUS', 'TIMES', 'DIVIDE', 'LPAREN', 'RPAREN']
#Ignored characters
t_ignore = ' \t\n'
#Token splecifications(as regexs)
t_PLUS = r'\+'
t_MINUS = r'-'
t_TIMES = r'\*'
t_DIVIDE = r'/'
t_LPAREN = r'\('
t_RPAREN = r'\)'
... | [
"she47637370@gamil.com"
] | she47637370@gamil.com |
bb451f850f72923c84366c71aa4b2e63ca0f862f | 1c53494183e0011cfa31a31dba366a41ce5e05a7 | /Section 3/git_compex_use_case/fabfile.py | 92c39c61b6639a9dd353920f4585673b96d95d53 | [
"MIT"
] | permissive | abdallahbouhannache/Enterprise-Automation-with-Python- | ff41031469357847de4a680f5579c205b4fba894 | 8b8de8b56adf7df781578ee110988d915a46cb59 | refs/heads/master | 2021-09-15T09:46:19.959568 | 2018-05-30T07:00:22 | 2018-05-30T07:00:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | true | false | 829 | py | from __future__ import with_statement
from fabric.api import *
from fabric.contrib.console import confirm
env.hosts = ['localhost']
def test():
with settings(warn_only=True):
result = local('./manage.py test my_app', capture=True)
if result.failed and not confirm("Tests failed. Continue anyway?"):
... | [
"35484449+cleonb-packt@users.noreply.github.com"
] | 35484449+cleonb-packt@users.noreply.github.com |
7355f43c3d17c1f39e35428d76ecdd9778bd2102 | d2e634676dc1d35f129b1a5c3f4c519c80e5be38 | /cross_lingual/pre_process/parse_args.py | 18be617d868f508cb9b8abdc5d02ab2adb7ff165 | [] | no_license | livelifeyiyi/DLworks | 4442b121abb17c0a8daf73c9e23c16527584a34a | 6a1d44069f33c9c5a04abe641eb0970b592459a9 | refs/heads/master | 2020-04-11T15:39:12.291709 | 2019-11-10T13:47:00 | 2019-11-10T13:47:00 | 161,898,477 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,385 | py | import os
from collections import OrderedDict
def parse_args(args):
# Parse parameters
params = OrderedDict()
params['train'] = args.train
params['bi_train'] = args.bi_train
params['dev'] = args.dev
params['test'] = args.test
params['model_dp'] = args.model_dp
params['tag_scheme'] = ar... | [
"xiaoya_0922@126.com"
] | xiaoya_0922@126.com |
813170ffbc1c200e9d01cd3b6c7fe63ff19c4ce6 | aaa4eb09ebb66b51f471ebceb39c2a8e7a22e50a | /Lista 09/exercรญcio 13.py | 5b758ff4ae3bf0877f20e01225830517e2e1e44d | [
"MIT"
] | permissive | Brenda-Werneck/Listas-CCF110 | c0a079df9c26ec8bfe194072847b86b294a19d4a | 271b0930e6cce1aaa279f81378205c5b2d3fa0b6 | refs/heads/main | 2023-09-03T09:59:05.351611 | 2021-10-17T00:49:03 | 2021-10-17T00:49:03 | 411,115,920 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | #Crie um algoritmo que leia uma matriz A[NxN] (N โค 10) e calcule a respectiva matriz transposta At.
N = int(input("Digite um valor: "))
if N <= 10:
A = [[0 for i in range(N)] for j in range(N)]
for i in range(N):
for j in range(N):
A[i][j] = int(input(f"Digite o valor para o รญndice ({i + 1}... | [
"89711195+Brenda-Werneck@users.noreply.github.com"
] | 89711195+Brenda-Werneck@users.noreply.github.com |
87d15f8ee0f387eb5b5b0513d59853680e217b9b | 282a4529e74349989b54201cba3be4bcff5349d5 | /todo/apps/activity/templatetags/activity_tags.py | 8140818a58ca7766d1bdc0fd264af741a3fc2dd8 | [
"WTFPL"
] | permissive | arthuralvim/todo | e34c2a92431574bacca76afda5de5dfa40391d51 | a159b17f45b002b0bff9bdd70f79b27173865689 | refs/heads/master | 2016-09-06T09:14:02.116711 | 2014-06-03T11:56:02 | 2014-06-03T11:56:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | from django import template
register = template.Library()
@register.filter
def attr(field, arg):
s = arg.split(':')
attr = s[0]
value = s[1]
return field.as_widget(attrs={attr: value})
@register.filter
def attrs(field, args):
el = args.split(';')
attrs = {}
for e in el:
s = e.sp... | [
"afmalvim@gmail.com"
] | afmalvim@gmail.com |
cbeacded22e0ac363e3028fad703bdf1b4a84750 | e76f6fdb1a2ea89d4f38ac1ed28e50a7625e21b7 | /qytdjg_learning/views/DB.py | 7ce9dfc397aefc79f1d8899ca6196b489352c7fd | [] | no_license | collinsctk/qytdjg_learning | 4d61a2a236f0bc4bf9be8d999352a8e3c1b87408 | 72a6d6153f6ca6bf9fccad76612450fdaf83d9fd | refs/heads/master | 2020-03-24T19:45:31.145059 | 2018-07-31T06:51:14 | 2018-07-31T06:51:14 | 142,943,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,556 | py | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
# ๆฌ่็ฑไบ้ขๅ ็ฐไปปๆๆๆไธป็ผๅ๏ผ็จไบไนพ้ข็พPython่ฏพ็จ๏ผ
# ๆไธปQQ:605658506
# ไบ้ขๅ ๅฎ็ฝwww.qytang.com
# ๆไธปๆๆฏ่ฟๅ่ฎบๆๅฑไฝ ็ๆๆฏๆฐ่พน็
# https://ke.qq.com/course/271956?tuin=24199d8a
from mt.models import Movie
from django.http import HttpResponse
def testORM(request):
result = Movie.objects.all()
name = ''
... | [
"collinsctk@qytang.com"
] | collinsctk@qytang.com |
d85945315cbd2eaeee8a064729d59b1d75757973 | f9c59022d1e5c60345f9bc369df5d6a86f6f64e4 | /src/synthetic/create_simple.py | e16fbf952c9af26033ffd13841cafe7957a5aca0 | [] | no_license | YingjingLu/Music_Onset | 3530c78ac1cf370b9cbb8487aeeea829b80eaa06 | 99af3c6a1f06bb86e3a09375ab2a8a628e6716da | refs/heads/master | 2020-05-26T18:12:40.387918 | 2019-06-06T03:52:55 | 2019-06-06T03:52:55 | 188,331,780 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,075 | py | from mido import Message, MetaMessage, MidiFile, MidiTrack
from utils import *
import numpy as np
from random import randint
import os
import math
from midi2audio import FluidSynth
import os
# store sound fonts in this dir ~/.fluidsynth/default_sound_font.sf2
sound_font = "gs.sf2"
fs = FluidSynth( sound_font, sample... | [
"yingjinglu2019us@gmail.com"
] | yingjinglu2019us@gmail.com |
02ac0c4c993e42497f95af752fe4e03c17a76bc3 | c97af07addfa42c282d6b5d6ae8c05d00f9d8c50 | /Lib/asyncio/windows_utils.py | de7b71d809255b9e76caca102cfbf095f86e277c | [
"Python-2.0",
"MIT"
] | permissive | khg0712/RustPython | 6c5a4842f557e617c36793f9e5a735130e2fc40e | a04c19ccb0f5e7e1774d5e6f267ffed3ee27aeae | refs/heads/master | 2020-11-24T05:02:01.820429 | 2019-12-06T22:30:58 | 2019-12-06T22:30:58 | 227,976,324 | 1 | 0 | MIT | 2019-12-14T06:20:46 | 2019-12-14T06:20:45 | null | UTF-8 | Python | false | false | 6,915 | py | """
Various Windows specific bits and pieces
"""
import sys
if sys.platform != 'win32': # pragma: no cover
raise ImportError('win32 only')
import _winapi
import itertools
# XXX RustPython TODO: msvcrt
# import msvcrt
import os
import socket
import subprocess
import tempfile
import warnings
__all__ = ['socketp... | [
"33094578+coolreader18@users.noreply.github.com"
] | 33094578+coolreader18@users.noreply.github.com |
38a90db6d164678ec8455e591bfe98bf3218361d | fe096ed06c34ae3adf958760886dd5f2fc64fa90 | /reverseInteger.py | 926bf94629cb20ed9c275d76abe51bbefa820f53 | [] | no_license | harshmalviya7/LeetCode_Coding_Questions | c9d8a93f4a5664dcf57098cd58f3f1d95667b0c0 | 47edb51e55e390861ed539972d8bf66b41b4cdd7 | refs/heads/master | 2023-08-23T01:09:40.110710 | 2021-10-21T12:53:36 | 2021-10-21T12:53:36 | 373,072,675 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | # 7. Reverse Integer
# https://leetcode.com/problems/reverse-integer/
class Solution:
def reverse(self, x: int) -> int:
def no(x): a=0
while(x>0):
a=a*10+x%10
x=x//10
return 0 if a> 0x7fffffff else a
if x<0:
return -1*no(abs(x)... | [
"harsh.malviya.9869@gmail.com"
] | harsh.malviya.9869@gmail.com |
c766d0590cce8bc6d1c6f198c01824d8154a8701 | 26dbbed416176ec2e929d54c689d5206357f6fb6 | /course/migrations/0003_post_author.py | 953378e3d0edbaa11fa3ea9da57ff7b7b4762560 | [] | no_license | coderrohanpahwa/dynamic_blog | 12084d8f3336525ef400d6891ec231a5260c90f7 | 081b32691c3edd9208c654a6c101f786ff514a3f | refs/heads/master | 2022-12-22T09:46:30.059928 | 2020-09-15T17:06:48 | 2020-09-15T17:06:48 | 295,687,840 | 0 | 1 | null | 2020-09-30T19:15:49 | 2020-09-15T10:07:25 | Python | UTF-8 | Python | false | false | 382 | py | # Generated by Django 3.1 on 2020-09-14 17:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('course', '0002_post'),
]
operations = [
migrations.AddField(
model_name='post',
name='author',
field=model... | [
"coderrohanpahwa@gmail.com"
] | coderrohanpahwa@gmail.com |
ffcae26716030284c8ceff004efda0e5f3cff23d | 20da592bc2e37f18e172aa1ad8219b773e30290c | /plotConfiguration/WH_SS/Full2017nanov6/cuts.py | acec7312774cbfe76f166f6eae0f02438edbb52d | [] | no_license | LambdaFramework/Analyzer-Nano | 000721114a7f568474406727c2dbf614f49dd81b | 39cfd650037ac4e852d5b5cba36f94782c5dcdd9 | refs/heads/master | 2022-11-27T12:41:31.007899 | 2020-08-03T09:00:43 | 2020-08-03T09:00:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,856 | py | # cuts
supercut = 'mll>12 \
&& Lepton_pt[0]>25 && Lepton_pt[1]>20 \
&& bVeto \
&& PuppiMET_pt > 30 \
'
cuts={}
cuts['OSee'] = 'nCleanJet>=2 && nLepton>=2 && isbVeto && ((Lepton_pdgId[0]*Lepton_pdgId[1]==11*-11)||(Lepton_pdgId[0]*Lepton_pdgId[1]==-11*11)) \
&& Electron_p... | [
"siew.yan.hoh@cern.ch"
] | siew.yan.hoh@cern.ch |
2b600a43cf5e371445358316b0fd5c47d22183da | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/189/29370/submittedfiles/testes.py | 61a1f9b2b067f7ce6955f2759012caf516befc2c | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | # -*- coding: utf-8 -*-
import math
f=float(input('digite f:'))
l=float(input('digite l:'))
q=float(input('digite q:'))
deltaH=float(input('digite deltaH:'))
v=float(input('digite v:'))
d=((8*f*l)*(q*q)/((math.pi*math.pi)*(9.81*deltaH)))**(1/5)
rey=(4*q)/(math.pi*d*v)
k=0.25/(math.log10(0.000002/3.7*d+5.74/reu**0.9))**... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
6787d8861d092534356152dbdb92a603032e13df | 9a69af2f759f336c039865c3070d6f089b5f99c5 | /src/users/urls.py | 2920b743c267f900eb4733933316205ab4235c29 | [] | no_license | henryfrstr/clarusway_quiz | ae108a7b19713dae0566d31dc35a6d0b221160d6 | 0788624bc9ec409a6381d2ad2210f0a92d91d5fb | refs/heads/master | 2023-02-16T04:51:01.574223 | 2021-01-16T18:04:27 | 2021-01-16T18:04:27 | 329,702,753 | 1 | 4 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | from django.urls import path
from .views import RegisterView
urlpatterns = [
path("register/", RegisterView.as_view(), name="register")
]
| [
"63148122+henryfrstr@users.noreply.github.com"
] | 63148122+henryfrstr@users.noreply.github.com |
bc8cd076fe7eadc1630d631831ac486840b85d24 | d1742451b25705fc128acc245524659628ab3e7d | /Hacker Rank/Circular Array Rotation.py | 3e38d7459203e8054ccb009e6296f48f481c5dee | [] | no_license | Shovon588/Programming | ebab793a3c97aedddfcad5ea06e7e22f5c54a86e | e4922c9138998358eed09a1be7598f9b060c685f | refs/heads/master | 2022-12-23T18:29:10.141117 | 2020-10-04T17:29:32 | 2020-10-04T17:29:32 | 256,915,133 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | n, k , q = map(int,input().split())
a = list(map(int,input().split()))
for i in range(q):
x = int(input())
x -= k
if x<0:
x += n
print(a[x])
| [
"mainulislam588@gmail.com"
] | mainulislam588@gmail.com |
a1452afad856f94cafa5affff3204f3068558ba1 | 5b6b2018ab45cc4710cc5146040bb917fbce985f | /78_longest-common-prefix/longest-common-prefix.py | 6572b867bf8bc37e729ca4c4843bc0ed87c6fc1e | [] | no_license | ultimate010/codes_and_notes | 6d7c7d42dcfd84354e6fcb5a2c65c6029353a328 | 30aaa34cb1c840f7cf4e0f1345240ac88b8cb45c | refs/heads/master | 2021-01-11T06:56:11.401869 | 2016-10-30T13:46:39 | 2016-10-30T13:46:39 | 72,351,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | # coding:utf-8
'''
@Copyright:LintCode
@Author: ultimate010
@Problem: http://www.lintcode.com/problem/longest-common-prefix
@Language: Python
@Datetime: 16-05-19 13:22
'''
class Solution:
# @param strs: A list of strings
# @return: The longest common prefix
def longestCommonPrefix(self, strs):
... | [
"ultimate010@gmail.com"
] | ultimate010@gmail.com |
a0ccbf9ce3fca0cb7257b67b8b9efa6a5a764607 | a275cec1fddb6e034b4e9df72f8039536c009990 | /codes/leetcode/jump-game.py | 4526b397d6eea0cef6435139c00d07e5f17ed4b2 | [] | no_license | taoste/dirtysalt | a3cbd16710c81de65f00aa919f4e67a1fc66d226 | bd68294fb7727d598ea1c8bf0a559247e07c1aea | refs/heads/master | 2021-08-24T10:44:47.607924 | 2017-12-09T08:47:12 | 2017-12-09T08:47:12 | 113,807,519 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | #!/usr/bin/env python
# coding:utf-8
# Copyright (C) dirlt
class Solution(object):
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
st = [1 << 31] * len(nums)
st[0] = 0
for i in xrange(0, len(nums)):
v = nums[i]
# ra... | [
"dirtysalt1987@gmail.com"
] | dirtysalt1987@gmail.com |
25333131e13d1ee7e948085d5402a8cf5caee001 | 8d29fd856250e746f19e086975e83d2dea2cf6a3 | /ResourceStatusSystem/Client/test/Test_ResourceStatusClient/Test_Unit_withDB.py | aec1f7ea0f55ffd3b55801e7ffdf86002f39bbea | [] | no_license | hanyl/DIRAC | 048c749154192e3940e17b24396afe0e667444b2 | 82eb56888fc039f94ba1033ea4b6d3ad503bf96e | refs/heads/master | 2021-01-16T00:23:00.344192 | 2013-01-19T00:01:05 | 2013-01-19T00:02:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | ################################################################################
# $HeadURL $
################################################################################
__RCSID__ = "$Id: $"
'''
Set the fixture needed to run this test.
'''
from DIRAC.ResourceStatusSystem.Client.test.Test_ResourceStatusClient i... | [
"mario.ubeda.garcia@cern.ch"
] | mario.ubeda.garcia@cern.ch |
f8959fe24507665771a88e6aecc9952fc4c48693 | 3aa63e91138b03cfed43b614dc11b90b1b12a395 | /tests/python/py4j_signals_test.py | 8696aa82f864214cbdd76dba6af8b02f0fa90a55 | [
"BSD-3-Clause"
] | permissive | karpierz/jtypes.py4j | d73ba4c062fa8415bd9e486156766fbecd0445c7 | 1bf48c022357c558da4d0df45fe4a0100df99a99 | refs/heads/master | 2021-05-09T08:07:48.050913 | 2018-11-13T15:55:42 | 2018-11-13T15:55:42 | 119,380,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,556 | py | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals, absolute_import
from collections import defaultdict
import unittest
from jt.py4j.java_gateway import (
server_connection_started, server_connection_stopped,
server_started, server_stopped, pre_server_shutdown, post_server_shutdown,
JavaGatew... | [
"akarpierz@gmail.com"
] | akarpierz@gmail.com |
6341b6eb5cb3884055973d5c3798b6f351e076eb | cd876d32aa66112892dc9550837ad843e3e03afd | /env_carzone/Lib/site-packages/django/contrib/postgres/apps.py | 55b9aa66774ce3be3618cf456cc52abf25d0aa3e | [
"BSD-3-Clause"
] | permissive | viplavdube/Car-Yard-App | 7665b7e6e54f3b0e4a4da563151f85d65c225cef | 65381a50f828e80f31d25d4f35e497f51c2d224d | refs/heads/master | 2023-04-19T03:49:18.991604 | 2021-04-27T17:51:10 | 2021-04-27T17:51:10 | 349,094,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,112 | py | from psycopg2.extras import (
DateRange,
DateTimeRange,
DateTimeTZRange,
NumericRange,
)
from django.apps import AppConfig
from django.db import connections
from django.db.backends.signals import connection_created
from django.db.migrations.writer import MigrationWriter
from django.db.models import Cha... | [
"viplav45@gmail.com"
] | viplav45@gmail.com |
76a0bbfd022c6f4c1d86600c0f0904057ee9bda2 | ce819ddd76427722d967e06190fc24ac98758009 | /rename_text.py | ae28d659413d875c5c7e82598cf7ca20e2735792 | [] | no_license | huilizhou/Deeplearning_Python_DEMO | cb4164d21899757a4061836571b389dad0e63094 | 0a2898122b47b3e0196966a2fc61468afa99f67b | refs/heads/master | 2021-08-16T10:28:51.992892 | 2020-04-04T08:26:07 | 2020-04-04T08:26:07 | 148,308,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | import os
# ่พๅ
ฅๆฐ็ๆไปถๅ
path = r"D:\11Graduate program\2019(5)huili_cloud_data_operate\test\1"
filelist = os.listdir(path)
count = 1
for file in filelist:
print(file)
for file in filelist:
Olddir = os.path.join(path, file)
if os.path.isdir(Olddir):
continue
filename = os.path.splitext(file)[0]
... | [
"2540278344@qq.com"
] | 2540278344@qq.com |
6c8d6ad8b9978edd217bc465cff7ad8587cc0f93 | 05ba1957e63510fd8f4f9a3430ec6875d9ecb1cd | /.history/fh/a_20200817000254.py | f0c59d004ec636878ebb5c8b26bca4ded5475ef2 | [] | no_license | cod-lab/try | 906b55dd76e77dbb052603f0a1c03ab433e2d4d1 | 3bc7e4ca482459a65b37dda12f24c0e3c71e88b6 | refs/heads/master | 2021-11-02T15:18:24.058888 | 2020-10-07T07:21:15 | 2020-10-07T07:21:15 | 245,672,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | import fileinput as fi
# for line in fi.FileInput("a.md",inplace=1):
# print(line)
# for i,line in enumerate(fi.FileInput("a.md",inplace=1)):
# # for line in fi.FileInput("a.md",inplace=1):
# # print(line, end='')
# if 37<i<43:
# # print(i+1, line, end='')
# # print("type of line:... | [
"arihant806@gmail.com"
] | arihant806@gmail.com |
f29b21a1e7edffc022ca91ee7d3c3b2e2dbef0ee | 7792b03540784a0d28073899dd4ad78689e9a9fb | /ProxyPool/schedules/check_available.py | 45aeed3af5049802012d255d7e782367cef804fb | [] | no_license | ayiis/coding | 3b1362f813a22a7246af3725162cfb53dea2f175 | c73e4622e1811cc3fd8729a92df6537bd73dc802 | refs/heads/master | 2021-06-02T14:55:38.451288 | 2021-04-26T08:39:16 | 2021-04-26T08:39:16 | 134,660,001 | 0 | 0 | null | 2020-06-05T04:03:58 | 2018-05-24T04:14:14 | CSS | UTF-8 | Python | false | false | 2,072 | py | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import tornado, tornado.gen, tornado.web
from tornado.options import define, options
import datetime
import config
import do_check
from common import my_logger
logging = my_logger.Logger("schedules.check_available.py", False, True, True)
setting = {
"running": Fa... | [
"ayiis@126.com"
] | ayiis@126.com |
0d17ac87bad6a6dd7c52846005bd600179e5ad9e | f160d992d0ea5fa4e36af0025b5637c8962f2a29 | /achihuo-mini/achihuo_mini/adapter.py | 0901a2ddd7aa3613733d0e09659843fc1a5050eb | [] | no_license | Zachypentakill/Afanti_tiku | 369dde43a32cecb136eb1207bf4223f6decd9843 | aebee5b3d8dce76f95620cb52fda5a0f19965945 | refs/heads/master | 2021-07-11T15:59:03.099600 | 2017-10-11T10:27:43 | 2017-10-11T10:27:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,245 | py | import os
import json
import signal
from functools import wraps
from .models import CacheInferface, QueueInferface
from .arg import parse_arguments
from .exceptions import NotCommand
from .utils import (
md5_string,
serialize_obj,
unserialize_obj
)
from .settings import (
LOCAL_CACHE_DIR,
PIDS,
... | [
"yanfeng.li@lejent.com"
] | yanfeng.li@lejent.com |
eba7e3aebbc608c07fc39591f5589a89cda60824 | 05709017c8f6f329c939b5984b02704c34b1119d | /hurst.py | 12ebcf4f4d0d413229129edee3837fb15b0aaf2f | [] | no_license | fndjjx/emd | 4fed1f09e1657bf7b31421365d88f6593ffe8b9c | d12b7cf3182d1e3bf43a706943f50298684cb72a | refs/heads/master | 2021-01-19T05:15:28.908832 | 2020-06-16T06:55:17 | 2020-06-16T06:55:17 | 61,512,684 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 768 | py |
from numpy.fft import fft
from numpy.random import randn
from numpy import zeros, floor, log10, log, mean, array, sqrt, vstack, cumsum, ones, log2, std
from numpy.linalg import svd, lstsq
import time
######################## Functions contributed by Xin Liu #################
def hurst(X):
N = len(X)
T = array([f... | [
"thunderocean@163.com"
] | thunderocean@163.com |
d2ca3476978606ac4c7790dfc6731e1e08443cb3 | 6c1527b2dc3f944b8907d0de5bda6cdfbaeb1f7f | /otree-core-master/otree/bots/__init__.pyi | 10d160cfdad49ca7bf4a07ebd7a9b551ac431221 | [
"MIT"
] | permissive | dcthomas4679/otree | f0a9204b12cd395e55fd9b77ac90584c2cd3c049 | 363a05d2f70f9225628e4857473dedcb449018dc | refs/heads/master | 2021-06-23T20:07:02.499724 | 2020-11-18T15:32:30 | 2020-11-18T15:32:30 | 37,225,765 | 1 | 1 | NOASSERTION | 2021-06-10T23:28:55 | 2015-06-10T22:22:33 | Python | UTF-8 | Python | false | false | 400 | pyi | from otree.models import Participant
from typing import Any, List
class Bot:
html = '' # type: str
case = None # type: Any
cases = [] # type: List
participant = None # type: Participant
session = None # type: Participant
def Submission(PageClass, post_data: dict={}, check_html=True): pa... | [
"dcthomas@gmail.com"
] | dcthomas@gmail.com |
2f9cf4817c20491d9cc8f559864e3b8932b249eb | e5329001263e67a4d3c13d57bb91f2502280e206 | /InvTL/lm_py/pypy/doc/tool/makecontributor.py | aad3b3c64f28255071d5bea67690c5e5ec5af08f | [] | no_license | yanhongliu/DARLAB | d9432db6e005a39e33501d7ffffe6e648b95b3fc | f739318c9620b44ef03d155f791c7ed4111d80fa | refs/heads/master | 2021-05-27T19:58:58.458846 | 2014-02-04T12:09:26 | 2014-02-04T12:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | """
generates a contributor list
"""
import py
try:
path = py.std.sys.argv[1]
except IndexError:
print "usage: %s ROOTPATH" %(py.std.sys.argv[0])
raise SystemExit, 1
d = {}
for logentry in py.path.svnwc(path).log():
a = logentry.author
if a in d:
d[a] += 1
else:
d[a] =... | [
"mickg10@gmail.com"
] | mickg10@gmail.com |
772fff4ae83dea2282200c1e01eea64b1f9523a4 | be4df0f5ef586ad6d1b54bad9eb82ccd4544d5ac | /rook/build/interfaces/notify.py | 2c07b830767195089069e9143c08e14c37117f08 | [] | no_license | FlorianLudwig/rook | 9ac1575fe84d90747cb1c96c17b50ebb895063ab | 1698cd03d6f0f73045d9cc153f8c214474a3775d | refs/heads/master | 2020-09-26T22:03:44.032131 | 2016-08-29T16:23:28 | 2016-08-29T16:23:28 | 66,860,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | import rbusys
class EMailInterface(rbusys.SinglePlug):
def send(self, toaddrs, subject, body):
"""send e-mail
toaddrs - List of receipients
subject - E-Mail subject
body - E-Mail text
"""
pass
| [
"f.ludwig@greyrook.com"
] | f.ludwig@greyrook.com |
30a6e9335281d9b6a98149191d44c4c9a3653317 | c8dcfaa31695fe8167b8f5e4e8fd2ce50576026c | /order_book_recorder/opportunity.py | 46e17ba130371112839c1fd888ddd8c064dedc4c | [] | no_license | smartiesss/arbitrage-opportunity-tracker | b362613c748b70eb40fc607b8f5bce5257c6b180 | 2703d0652298358447914e05b7647be85727ee7d | refs/heads/master | 2023-08-17T17:45:58.658479 | 2021-10-14T19:30:39 | 2021-10-14T19:30:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,680 | py | """Find trading opportunitiess in different depths."""
from dataclasses import dataclass
from typing import Dict, List
@dataclass
class Opportunity:
"""Describe a found arbitrage opportunity."""
market: str
buy_exchange: str
sell_exchange: str
#: Market depth for this opportunity
quantity: f... | [
"mikko@opensourcehacker.com"
] | mikko@opensourcehacker.com |
815ab5db55c70d2d819c9d5761b7e9b6761aa48f | 4c6fd81d318a008a70e7a8af3e6ec34f3ea1006b | /src/www/index.py | 184dd6d66cc5bc01f7fcfc0ef9bb032ab4871add | [
"MIT"
] | permissive | janhybs/automate | 46a777cef593eac330b07142b6c827b49a18a5f5 | ba8d7d812ca4211d69ece9442ff212a6c59629fc | refs/heads/master | 2020-03-28T20:46:55.180930 | 2019-04-11T11:16:29 | 2019-04-11T12:05:10 | 149,101,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,538 | py | #!/bin/python3
# author: Jan Hybs
import sys
from flask import redirect, url_for, send_file
from env import Env
from www import app, login_required
from loguru import logger
from utils.crypto import b64decode
max_file_view_limit = 1024*1024
@app.route('/')
@app.route('/index')
@login_required
def index():
retur... | [
"jan.hybs@tul.cz"
] | jan.hybs@tul.cz |
78b7c58db3ccbe2c99a05e756341db5ea0bc7605 | 5335dbd5e836ecb816fd69e5e4b623eea4366e0d | /max/apps/portfolio/migrations/0003_auto__chg_field_portfolioitem_pub_date.py | 7594b989144e25fca96cbbb6d4e8c21b7e3d94d0 | [] | no_license | rootart/elayarch.com | c8c162f16b06ebdb578dd6d967cfb43add9575d1 | d5287bc335a7c86a6e18be3943719ee5b3ffa014 | refs/heads/master | 2021-01-01T17:17:08.638798 | 2013-03-20T14:21:00 | 2013-03-20T14:21:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,434 | py | # encoding: 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):
# Changing field 'PortfolioItem.pub_date'
db.alter_column('portfolio_portfolioitem', 'pub_date', self.gf('... | [
"dijakroot@gmail.com"
] | dijakroot@gmail.com |
0c4091b7b05386040beb712b8027b0dcc48e17ba | bb85c41f3e6aad131d4725ad400cbd028d60d098 | /EraseMask/core/Model.py | 4b0e8f547072053a28ca37c7ddb59d7cc7832613 | [
"Apache-2.0"
] | permissive | CoinCheung/Mossaic-Handling | c946c0496896a694af5e647e1b2fa425774e52a8 | 231e8b168c36d5ca4be527b19d8aa4821cda2ed5 | refs/heads/master | 2021-01-24T22:52:56.467185 | 2018-06-18T08:20:46 | 2018-06-18T08:20:46 | 123,270,887 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,642 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import mxnet as mx
import mxnet.gluon as gluon
### models
## generator unet block
class UnetSkipBlock(gluon.nn.HybridBlock):
def __init__(self, inner_channels, outer_channels, innermost=False,
outermost=False, use_dropout=False, unit=None):
super(... | [
"867153576@qq.com"
] | 867153576@qq.com |
71496e68c06c89690d2027aa5e33a9b6bfb11e5a | 55c53e4ffbb7bd5ff6b2f43cbf7d37c1b969b4a4 | /talentbuddy/rains.py | eaca0a81f7bfa927ac67b56c56eb20875bfbc641 | [] | no_license | Xuefeng-Zhu/Code_Practice | a005e558c8627e83abc961ad12e2c6ae84c44e02 | 7d25aa7cc46a66ef176796f5dd23addd4734ebf2 | refs/heads/master | 2021-01-13T02:27:28.263472 | 2014-11-16T06:53:44 | 2014-11-16T06:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,260 | py | from collections import deque
def search(i, j, m, heights):
visited = [0] * len(heights)
count = 0
min = max(heights)
d = deque()
d.append((i,j))
while len(d):
x, y = d.popleft()
if x == 0 or y == 0 or x == m -1 or y == len(heights)/m - 1:
if heights[y * m + x] < hei... | [
"xzhu15@illinois.edu"
] | xzhu15@illinois.edu |
e93b91455a7985a732cad91ba8a1867878da50a4 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/7207c78e101a0620b8fe2891c74f94de181e15fc-<legacy_dense_support>-bug.py | 31700e1d3c92d9c07050e7386873e55e0e1f4113 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,209 | py | def legacy_dense_support(func):
'Function wrapper to convert the `Dense` constructor from Keras 1 to 2.\n\n # Arguments\n func: `__init__` method of `Dense`.\n\n # Returns\n A constructor conversion wrapper.\n '
@six.wraps(func)
def wrapper(*args, **kwargs):
if (len(args) > 2... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
758b577b9d36079667cb04f3eaf5089cdf36d64a | 7159e9970ce2cc58482416392d1b489087b913c1 | /tests/gis_tests/inspectapp/tests.py | c272b65aa841e9617eec552f04cb53c518c83025 | [
"BSD-3-Clause"
] | permissive | ufgstores/django19 | d4a53f12aa6d89405e2332d0c53a29447e6f8650 | 644716493ecac37271610de0e9cf97fc1fe46f10 | refs/heads/master | 2020-09-20T13:54:04.608149 | 2019-11-28T14:07:07 | 2019-11-28T14:29:02 | 224,502,004 | 0 | 0 | BSD-3-Clause | 2019-11-28T14:08:25 | 2019-11-27T19:23:16 | Python | UTF-8 | Python | false | false | 8,022 | py | from __future__ import unicode_literals
import os
import re
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.core.management import call_command
from django.db import connection, connections
from django.test import TestCase, skipUnlessDBFeature
from django.test.utils import mod... | [
"slenart@alefajnie.pl"
] | slenart@alefajnie.pl |
0eb85f794e58990a2c1f81d075205d9ae6c00710 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/1407.py | da7697f02acb65b0afe0600629f286dd3dd3792c | [] | 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 | 526 | py | import math
def is_square(integer):
root = math.sqrt(integer)
if int(root + 0.5) ** 2 == integer:
return int(root)
else:
return 0
def palindrome(L):
return L == L[::-1]
f=open('C-small-attempt1.in')
T=int(f.readline())
for i in range(0,T):
AB=f.readline().split()
AB = map(int, AB... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
89731aa069ceb76f20e907b1477225369950f2fd | fd173195d07b5a5ce229a0c1a20ee61884d8c8a1 | /python_practice/rock_paper_scissors.py | c75e9f18562123af4d9b33b82a0891f081a6ec1a | [] | no_license | anitrajpurohit28/PythonPractice | f7e71946144e04b7f9cb9682087e5d4f79839789 | 8b75b67c4c298a135a5f8ab0b3d15bf5738859f1 | refs/heads/master | 2023-04-12T07:04:12.150646 | 2021-04-24T19:52:24 | 2021-04-24T19:52:24 | 293,912,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,400 | py | from random import choice
options = ["rock", "paper", "scissors", "garbage"]
print("...rock...")
print("...paper...")
print("...scissors...")
# === implementation 1 start ===
# for i in range(10):
# p1 = choice(options)
# p2 = choice(options)
# print(f"(enter Player 1's choice): {p1}")
# print(f"(enter... | [
"anitrajpurohit28@gmail.com"
] | anitrajpurohit28@gmail.com |
fb733c6e8e48fc3ab9f1c4c7fd9d997c88c5f216 | 13cf27e496536b31f158fd117af1cb22841e53da | /year_2017/day_08/solution_part_2.py | 7130d61f1ea755a4db35d2991785bf6db3857f04 | [] | no_license | timofurrer/advent-of-code | 8ab34e4ae58c103d351697b0bd80eef276708a04 | 45839eff32b1bfec2e2560438a6c1f002b9a9269 | refs/heads/master | 2021-10-08T05:31:29.844886 | 2018-12-08T13:59:02 | 2018-12-08T13:59:02 | 112,767,579 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,930 | py | """
Solution for the first puzzle of Day 4
"""
import os
import operator
import functools
from collections import namedtuple, defaultdict
from typing import Tuple, List
import pytest
# My puzzle input
MY_PUZZLE_INPUT = os.path.join(os.path.dirname(__file__), 'input.txt')
Instruction = namedtuple('Instruction', [
... | [
"tuxtimo@gmail.com"
] | tuxtimo@gmail.com |
649c1843d6146a2e3ecd918e102c168566d7362a | d5da22b51c111f3d0ede725dddd97bb4cf94de4e | /calib/calib/misc.py | 422549fd63db29a3ed3e856530ac20f20edde71d | [
"BSD-2-Clause"
] | permissive | jabozzo/delta_sigma_pipe_lascas_2020 | bb5a18fa6fcf3753b9e7901d313546bc9368ef67 | 1351371aa03a12385c6fd9b29cf606ddd421ee18 | refs/heads/master | 2023-01-09T07:46:48.246573 | 2020-02-19T01:59:27 | 2020-02-19T01:59:27 | 241,505,258 | 0 | 1 | BSD-2-Clause | 2022-12-27T15:36:34 | 2020-02-19T01:24:33 | Python | UTF-8 | Python | false | false | 4,124 | py | #! /usr/bin/env python
import copy
import json
import numpy as np
NO_PARAM = object()
"""
Object to use instead of None when None is a valid value and cannot be used as
default.
"""
def default(value, default):
"""
Same as default if value is None else value, but less efficient.
:param value: Value t... | [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
3517a4562f9c5c46f13d3beb5eb663b05736e6e4 | 134267f2244954d48c65daae0b58051aba757fed | /236B.py | 8f53d741c174b829cf1bd613281e0eee391ae21a | [] | no_license | mobin-zaman/misc_python | 47fe836d1eae154210912b8b353f241303523e6b | 7a22329ae38b2d5ee9cd9ce29d995686759f5f87 | refs/heads/master | 2020-04-28T00:48:06.774434 | 2019-07-24T15:28:15 | 2019-07-24T15:28:15 | 174,829,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | a, b, c = map(int, input().split())
max_number = 100 * 100 * 100
d=[0]*(max_number+1)
for i in range(1, (max_number+1)):
j = i
while j <= max_number:
d[j] += 1
j += i
count = 0
for i in range(1, a + 1):
for j in range(1, b + 1):
for k in range(1, c + 1):
count += d[i * ... | [
"mobin_zaman@hotmail.com"
] | mobin_zaman@hotmail.com |
3e5288257df2d5b216c1c97b8925e7775fc045e1 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03569/s275849554.py | ddfe141423dd23ba336384b2047d8b947eccc03c | [] | 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 | 455 | py | from collections import deque
def main():
s = deque(input())
ans = 0
while len(s)>1:
if s[0]==s[-1]:
s.popleft()
s.pop()
continue
if s[0]!='x' and s[-1]!='x':
ans = -1
break
if s[0]=='x':
ans+=1
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
defefdf63b8f66c146cde4e733d11504ee4ef9d3 | 97eb35e37480f2b6cfb7c8055d467cec1e1c018e | /script.module.resolveurl/lib/resolveurl/plugins/cda.py | 7fa2ddcdbc0f79a0437d7eb925fc94b4abf3931b | [] | no_license | CYBERxNUKE/xbmc-addon | 46163c286197e21edfdeb3e590ca4213eade0994 | eb4d38f11da7ea54d194359c7dcaeddfb3a40e52 | refs/heads/master | 2023-01-10T20:24:08.629399 | 2023-01-07T21:28:06 | 2023-01-07T21:28:06 | 55,860,463 | 7 | 2 | null | 2022-12-08T10:39:26 | 2016-04-09T18:27:34 | Python | UTF-8 | Python | false | false | 2,694 | py | """
Plugin for ResolveURL
Copyright (C) 2020 gujal
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, or
(at your option) any later version.
... | [
"cyberxnuke@computertechs.org"
] | cyberxnuke@computertechs.org |
a3e1822a2db66eb4ca0a66cf3086570f3deaaee9 | 2a61b02c26e77686e38cd9039e6f4b0530ddb7c9 | /bitbots_misc/bitbots_live_tool_rqt/scripts/position_msg.py | fbe1130cfa173d142c489a4d9e0284074fa48118 | [
"MIT"
] | permissive | fly-pigTH/bitbots_thmos_meta | 931413e86929751024013b8e35f87b799243e22c | f45ccc362dc689b69027be5b0d000d2a08580de4 | refs/heads/master | 2023-08-27T02:58:08.397650 | 2021-10-22T17:17:11 | 2021-10-22T17:17:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,018 | py | from geometry_msgs.msg import PoseWithCovarianceStamped, Point, Pose
from std_msgs.msg import Header
import yaml
import rospy
import tf
from name import Name
class PositionMsg:
label_orientation = "o"
label_pos = "p"
label_yaw = "yw"
title = "position_msg"
def __init__(self):
# the dic... | [
"759074800@qq.com"
] | 759074800@qq.com |
168c09948d663d36f0a4ff326f00c0c1ade3eec7 | e2081f2f873825a3cc8b529614eb784f5cf5e8c5 | /queue2.py | db104feb8fff4a762dc98e1e2cba55592c776324 | [] | no_license | yilinanyu/Leetcode-with-Python | 17b454058c673381dbafa5a2a154c4e84b449399 | a55d2a3e383f858477170effbf8f6454e5dfd218 | refs/heads/master | 2021-01-21T04:55:31.025194 | 2016-07-11T20:10:18 | 2016-07-11T20:10:18 | 36,630,923 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | class Queue:
def __init__(self):
self.items = []
def isEmpty(self):
return self.items == []
def enqueue(self, item):
self.items.insert(0,item)
def dequeue(self):
return self.items.pop()
def size(self):
return len(self.items)
q=Queue()
q.enqueue(4)
q.enqueu... | [
"ly783@nyu.edu"
] | ly783@nyu.edu |
f2d296fe0c7e4c778ff85a9d45217c4f02b624de | 52b2e3470cd4b91975b2e1caed8d1c93c20e5d05 | /examples/python/amod/__init__.py | 220052cc03a60dd492d9e8d8c3160016148fad78 | [] | no_license | xprime480/projects | c2f9a82bbe91e00859568dc27ae17c3b5dd873e3 | 3c5eb2d53bd7fa198edbe27d842ee5b5ff56e226 | refs/heads/master | 2020-04-27T03:51:29.456979 | 2019-04-12T14:34:39 | 2019-04-12T14:34:39 | 174,037,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | __version__ = '0.0.1'
__all__ = [ 'basic' ]
def basic(a, b) :
from .first import fnfirst
from .second import fnsecond
return fnfirst(a) + fnsecond(b)
| [
"mi.davis@sap.com"
] | mi.davis@sap.com |
1979f8687f6086dc166fa09e25c94817cd1bcf04 | 53edf6b0f4262ee76bb4e3b943394cfeafe54865 | /animated_tests/sine_wave.py | 9b6aed48f367410b1b6083d3726e44fa4928ee59 | [] | no_license | Yoshi2112/hybrid | f86265a2d35cb0a402ba6ab5f718717d8eeb740c | 85f3051be9368bced41af7d73b4ede9c3e15ff16 | refs/heads/master | 2023-07-07T21:47:59.791167 | 2023-06-27T23:09:23 | 2023-06-27T23:09:23 | 82,878,960 | 0 | 1 | null | 2020-04-16T18:03:59 | 2017-02-23T03:14:49 | Python | UTF-8 | Python | false | false | 1,487 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 7 23:10:32 2019
@author: Yoshi
"""
"""
Matplotlib Animation Example
author: Jake Vanderplas
email: vanderplas@astro.washington.edu
website: http://jakevdp.github.com
license: BSD
Please feel free to use and modify this, but keep the above information. Thanks!
"""
impor... | [
"joshua.s.williams@uon.edu.au"
] | joshua.s.williams@uon.edu.au |
405182fd5a3647c295d939623d3db62d878ff687 | 4e8ac215b672b333f19da87787c0d8768fee439e | /MIDI Remote Scripts/ableton/v2/control_surface/components/undo_redo.py | b00227651ef063ea6efa1784468fe529d1d3cedb | [
"MIT"
] | permissive | aarkwright/ableton_devices | 593f47293c673aa56f6e0347ca6444b7fce2812a | fe5df3bbd64ccbc136bba722ba1e131a02969798 | refs/heads/master | 2020-07-02T08:11:21.137438 | 2019-08-09T13:48:06 | 2019-08-09T13:48:06 | 201,467,890 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py | # uncompyle6 version 3.3.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
# Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\ableton\v2\control_surface\components\undo_redo.py
# Compiled at: 201... | [
"apollo.arkwright@gmail.com"
] | apollo.arkwright@gmail.com |
6982cf3dba3e276b311b1ddba1e3ea9aeb85fe86 | 760e1c14d056dd75958d367242c2a50e829ac4f0 | /string/20_valid_parentheses.py | 4eb8636be7ce1b2fe9b74d2985cb111214afc6a1 | [] | no_license | lawtech0902/py_imooc_algorithm | 8e85265b716f376ff1c53d0afd550470679224fb | 74550d68cd3fd2cfcc92e1bf6579ac3b8f31aa75 | refs/heads/master | 2021-04-26T22:54:42.176596 | 2018-09-23T15:45:22 | 2018-09-23T15:45:22 | 123,894,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 843 | py | # _*_ coding: utf-8 _*_
"""
็ปๅฎไธไธชๅชๅ
ๆฌ '('๏ผ')'๏ผ'{'๏ผ'}'๏ผ'['๏ผ']' ็ๅญ็ฌฆไธฒ๏ผๅคๆญๅญ็ฌฆไธฒๆฏๅฆๆๆใ
ๆๆๅญ็ฌฆไธฒ้ๆปก่ถณ๏ผ
ๅทฆๆฌๅทๅฟ
้กป็จ็ธๅ็ฑปๅ็ๅณๆฌๅท้ญๅใ
ๅทฆๆฌๅทๅฟ
้กปไปฅๆญฃ็กฎ็้กบๅบ้ญๅใ
ๆณจๆ็ฉบๅญ็ฌฆไธฒๅฏ่ขซ่ฎคไธบๆฏๆๆๅญ็ฌฆไธฒใ
__author__ = 'lawtech'
__date__ = '2018/4/28 ไธๅ3:11'
"""
class Solution:
def isValid(self, s):
"""
:type s: str
:rtype: bool
"""
stack ... | [
"584563542@qq.com"
] | 584563542@qq.com |
b0d859ae3fd1591ce741d3883f653465621fb851 | af9268e1ead8cdb491868c14a2240d9e44fb3b56 | /last-minute-env/lib/python2.7/site-packages/django/views/decorators/http.py | a1fb98382d892ffad2f8bbdc655d574b650903d8 | [] | no_license | frosqh/Cousinade2017 | d5154c24c93ca8089eeba26b53c594e92cb6bd82 | c34d5707af02402bf2bb7405eddc91297da399ff | refs/heads/master | 2021-01-20T07:57:34.586476 | 2017-10-22T18:42:45 | 2017-10-22T18:42:45 | 90,074,802 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,752 | py | """
Decorators for views based on HTTP headers.
"""
import logging
from calendar import timegm
from functools import wraps
from django.http import HttpResponseNotAllowed
from django.middleware.http import ConditionalGetMiddleware
from django.utils.cache import get_conditional_response
from django.utils.dec... | [
"frosqh@gmail.com"
] | frosqh@gmail.com |
a38b83a00e47e07950f6c79fb27eddfac0d2ae1e | 5a61eb222fda029d2b0a8169d6508bf8b3222d57 | /group_reputation_v2/one_learn_group_network_new/long_time_pgg_original_price_positive_hete.py | 7bd98b75c6b236f97a34eb07cde340c2d903c430 | [] | no_license | Dcomplexity/research | f7b5ed539ce63b16026bddad0d08b3d23c3aa2a8 | 7e487f765b7eee796464b6a1dc90baa5d3e5d5db | refs/heads/master | 2022-04-16T19:02:38.634091 | 2020-04-13T02:31:28 | 2020-04-13T02:31:28 | 199,882,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,282 | py | import numpy as np
import pandas as pd
import random
import math
import matplotlib.pyplot as plt
import networkx as nx
import datetime
def pgg_game(a_l, gamma): # r in (0, 1]
a_n = len(a_l)
p = np.array([np.sum(a_l) * gamma * a_n / a_n for _ in range(a_n)]) - np.array(a_l)
return p
def price_model(n, m... | [
"cdengcnc@sjtu.edu.cn"
] | cdengcnc@sjtu.edu.cn |
ac98451edb913e03fa32c02e54b21bf44a487584 | ec21d4397a1939ac140c22eca12491c258ed6a92 | /Zope-2.9/bin/test.py | e92ddcc1fb7fd8e3d16f64fc27a88170c6935365 | [] | no_license | wpjunior/proled | dc9120eaa6067821c983b67836026602bbb3a211 | 1c81471295a831b0970085c44e66172a63c3a2b0 | refs/heads/master | 2016-08-08T11:59:09.748402 | 2012-04-17T07:37:43 | 2012-04-17T07:37:43 | 3,573,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,448 | py | #!/var/interlegis/SAPL-2.3/Python-2.4/bin/python2.4
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of t... | [
"root@cpro5106.publiccloud.com.br"
] | root@cpro5106.publiccloud.com.br |
168c90051272f897704b82df305c78fc89fbe16e | 6b63f4fc5105f3190014e1dd5685a891a74f8c63 | /0024_desafio.py | 8cbac1cdce046f3a4fbfd895992c622db4b75a04 | [] | no_license | matheuszei/Python_DesafiosCursoemvideo | a711c7c9c6db022cc8a16a3a1dc59afabb586105 | 5b216908dd0845ba25ee6d2e6f8b3e9419c074d2 | refs/heads/main | 2023-05-10T18:13:09.785651 | 2021-06-04T13:50:48 | 2021-06-04T13:50:48 | 370,851,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | #Crie um programa que leia o nome de uma cidade e diga se ela comeรงa ou nรฃo com o nome "SANTO"
cidade = input('Digite o nome de uma cidade: ').strip().upper()
print('SANTO' in cidade[0:5])
#cidade = input('Digite o nome de uma cidade: ').strip()
#print(cidade[:5].upper() == 'SANTO)
| [
"noreply@github.com"
] | matheuszei.noreply@github.com |
13c0f8ebf1ba81fb4c8befc8cd426cbb0791be34 | ce828d2c95b445ecf928f74626bac6397b4af202 | /otter/assign/r_adapter/tests.py | 54e09c829845e88e9a79d9cae513e36f9735c0c3 | [
"BSD-3-Clause"
] | permissive | JinwooPark00/otter-grader | fe8df82ae5b325d6e620e42997a7e334ff19154e | 1e037fa56e7833650980347fc8db64bd0a152e09 | refs/heads/master | 2023-06-13T02:38:01.583389 | 2021-06-20T20:50:34 | 2021-06-20T20:50:34 | 375,860,574 | 0 | 0 | BSD-3-Clause | 2021-06-22T03:44:07 | 2021-06-11T00:14:53 | null | UTF-8 | Python | false | false | 6,008 | py | """
ottr test adapters for Otter Assign
"""
import re
import pprint
import yaml
import nbformat
from collections import namedtuple
from ..constants import TEST_REGEX, OTTR_TEST_NAME_REGEX, OTTR_TEST_FILE_TEMPLATE
from ..tests import write_test
from ..utils import get_source, lock
Test = namedtuple('Test', ['name', ... | [
"cpyles@berkeley.edu"
] | cpyles@berkeley.edu |
e4f3d2a23983b4dbfb4c02e219aab16dd2417d1a | 7a4cfe0e9f6c87780c53ecc2431473ca71b9e841 | /crypto-caesar/hack.py | c6bad2c7a10cf1f10414a0402aeb797e3dd59883 | [] | no_license | chakra7/wechall | 6c7985c17ee34411c24df7bac5147ec07f04ce98 | b5c35cc4fc5ee9014a83c190e53cbf7b4e07efbe | refs/heads/master | 2021-01-12T17:30:42.404953 | 2016-10-21T18:25:39 | 2016-10-21T18:25:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | allchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def decrypto(encs, shift):
decs = ''
for char in encs:
if char == ' ':
decs += char
else :
# 65 + (k-65) % 26
decs += str(unichr(65 + (ord(char) + shift - 65)%26))
return decs
for i in range(1, 26):
d = decrypto('ESP BFTNV MCZHY QZI UFXAD ZGPC ESP WLKJ OZR ZQ ... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
6f1db04426b6bc0855a1be58dab102ebc1ffd1f3 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/5429.py | e440769130e46909840dd9ff35500848ec3a3e50 | [] | 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 | 577 | py | def isTydy(a) :
b=1
while a>100 and b==1 :
if a%10==0 :
return(0)
elif a%10>=(a//10)%10 :
a=a//10
else :
b=0
if b==1 :
if a%10==0 :
return(0)
elif a%10>=(a//10)%10 :
return(1)
else :
return(0)
else :
return(0)
fichier=open("B-small-attempt9.in","r")
output=open("output","w")
ligne ... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
8d92d0a2a04fcd4de1fe0744867226ff24e482df | bfbf65193a6aaa5527f8a58b01bdabfdb87cc924 | /fix-lint.py | 9e8fe0a109126ce5b82ea50899380d4ce75e7924 | [] | no_license | jaredly/file-scripts | 924f8a5a66178273244152e27befebfcee90fd6a | 038ed7a6db1a2eef7a868b63f5d19ec9ea568314 | refs/heads/master | 2020-05-16T23:08:24.869806 | 2015-08-14T23:02:35 | 2015-08-14T23:02:35 | 40,739,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 864 | py | #!/usr/bin/env python
import sys
import re
rx = re.compile('(?P<line>\d+):(?P<col>\d+)\s+(?P<level>\w+).+?(?P<type>[-\w]+)$')
def parse_rule(line):
return rx.match(line.strip()).groupdict()
text = open(sys.argv[1]).read()
files = {}
block = {}
for line in text.split('\n'):
if not line.strip():
continue
if... | [
"jared@jaredforsyth.com"
] | jared@jaredforsyth.com |
552260db3609384a5cbb9c1629cffe94180ee301 | df019e648d75d37a05f3219d27fffad4147fbf3c | /stockprice/stock/views.py | 6d413d5bdbf60847297ccc4c48d97675c1cf969e | [] | no_license | AmrElsayedEG/stock-market-price-USA | 8b6fcccc02fb14dff4ce31af403b2f87a409855d | cdceb7e6e774972bf790f61ba75b1d4ee2cb205e | refs/heads/master | 2023-01-31T13:19:01.652792 | 2020-12-15T09:59:48 | 2020-12-15T09:59:48 | 304,368,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,298 | py | from django.shortcuts import render, redirect, HttpResponse
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
import json
from . import stockapi
from .models import DailyPrice
from django.db import IntegrityError
api_key = 'SMRUPFC8PX39RTRT' #API Key
fr... | [
"newsifb@gmail.com"
] | newsifb@gmail.com |
a7d0319984b9bfb560fa0fa0df10e5c9b81149c6 | 553dce745ab6e97c2588ddec3b1aec1cd0266907 | /Crawler/tools/adjust_tags.py | 3dc3bbf6d90699de629ee88335e43fc4bfb2d73f | [] | no_license | foamliu/hackathon-ocw | ee8879882534a32a3ee7eed2767ae281b77ff029 | 2ec8e045f68ca3cac1333a7b0a045416beba01d9 | refs/heads/master | 2021-01-21T04:40:37.845867 | 2016-07-18T05:24:33 | 2016-07-18T05:24:33 | 52,413,648 | 8 | 11 | null | 2016-07-18T05:24:36 | 2016-02-24T04:14:08 | Python | UTF-8 | Python | false | false | 1,453 | py | #ๆน้่ฐๆดๆ ็ญพ
import json
import codecs
input_file = open(r'C:\Users\foamliu.FAREAST\Documents\GitHub\hackathon-ocw\FeedAPI\app\assets\jsons\items.json', "r", encoding="utf-8")
#output_file = codecs.open(r'C:\Users\foamliu.FAREAST\Documents\GitHub\hackathon-ocw\FeedAPI\app\assets\jsons\output.json', "w", encoding="utf-8")
... | [
"foamliu@yeah.net"
] | foamliu@yeah.net |
548bc3fd3789a2b19f445b59af724f7360dcddd8 | 8ca88f155c3fa4bc4838ffbb3bcfdc0f79d5b923 | /ymage/helpers.py | 2c0bb4b7a8f2db87686772a652278401a411746c | [
"MIT"
] | permissive | cuchac/ymage | b9620da69c54fd7481c2eed236df5aae9c302881 | 025be067acbe002d9443c485c24be4cbacf3ec95 | refs/heads/master | 2021-01-15T23:28:19.709296 | 2011-10-28T10:38:25 | 2011-10-28T10:38:25 | 2,650,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,903 | py | # Copyright (c) 2011 Bogdan Popa
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distri... | [
"popa.bogdanp@gmail.com"
] | popa.bogdanp@gmail.com |
0af2cab361db209fe3c3b299f67b3750fcb8ade9 | 6ef3fc3ffa5f33e6403cb7cb0c30a35623a52d0d | /samples/generated_samples/vision_v1_generated_product_search_get_product_async.py | 347cd239d8975ec76e5bf13895cab884a24f35b2 | [
"Apache-2.0"
] | permissive | vam-google/python-vision | 61405506e3992ab89e6a454e4dda9b05fe2571f2 | 09e969fa30514d8a6bb95b576c1a2ae2c1e11d54 | refs/heads/master | 2022-08-15T08:40:35.999002 | 2022-07-18T16:04:35 | 2022-07-18T16:04:35 | 254,789,106 | 0 | 0 | Apache-2.0 | 2020-04-11T03:59:02 | 2020-04-11T03:59:01 | null | UTF-8 | Python | false | false | 1,435 | py | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | vam-google.noreply@github.com |
4c73136669dd6d941e998a444deea0ce5e842594 | c934f728ee4ef42eaa276ae30769ad9e7c51c285 | /pyhpecw7/utils/templates/cli.py | eb52caad3c82da0e1a3842346f7d5f85b67a3a58 | [
"Apache-2.0"
] | permissive | frepkovsky/pyhpecw7 | c43ccd78cef952b723dbd641818d82d760aef685 | 4f0d1dd696db9ef1620832f460ef3983fde5ec0c | refs/heads/master | 2021-06-26T05:59:48.081377 | 2020-12-10T15:17:25 | 2020-12-10T15:17:25 | 188,609,179 | 0 | 0 | NOASSERTION | 2019-05-25T20:25:16 | 2019-05-25T20:25:15 | null | UTF-8 | Python | false | false | 1,383 | py | #!/usr/bin/env python
# Copyright 2015 Jason Edelman <jedelman8@gmail.com>
#
# 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 requir... | [
"chris_young@me.com"
] | chris_young@me.com |
3bec5e02db0fed7c25830eaa2c018eb686a47f52 | 491f9ca49bbb275c99248134c604da9fb43ee9fe | /MD_analysis/gatherdata_diffusion_D_vs_Ktheta.py | f3a1bea862b4e2f4a07913147a98f5f403728180 | [] | no_license | KineOdegardHanssen/PhD-subprojects | 9ef0facf7da4b2a80b4bea9c890aa04f0ddcfd1a | c275539689b53b94cbb85c0fdb3cea5885fc40e9 | refs/heads/Windows | 2023-06-08T13:32:15.179813 | 2023-06-05T08:40:10 | 2023-06-05T08:40:10 | 195,783,664 | 2 | 0 | null | 2020-08-18T14:42:21 | 2019-07-08T09:49:14 | Python | UTF-8 | Python | false | false | 6,515 | py | from skimage import morphology, measure, io, util # For performing morphology operations (should maybe import more from skimage...)
from mpl_toolkits.mplot3d import Axes3D # Plotting in 3D
import matplotlib.pyplot as plt # To plot
from scipy.optimize import curve_fit
from pylab imp... | [
"noreply@github.com"
] | KineOdegardHanssen.noreply@github.com |
760fe60455ccfa4e6c8013edef2dbcc1d00d6bb3 | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/4020/858004020.py | 82bf10a750b1dab5753ae2fbdef20cf4efa23175 | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 4,886 | py | from bots.botsconfig import *
from records004020 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'SI',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'ZC1', MIN: 0, MAX: 1},
{ID: 'BX', MIN: 1, MAX: 1},
... | [
"jason.capriotti@gmail.com"
] | jason.capriotti@gmail.com |
d3e9bc7a33216b4305b5ef54b7857edaf7042ddf | c2bf671e929b33bb74362559f5afb3e765662382 | /colossus/apps/clientapp/forms.py | 9d594ab69e9939a368fa67fd83eda1ff61eb1f8a | [
"MIT"
] | permissive | EnockOMONDI/jihus-dev | b7bf0e880dcaa6664b42eb9d942e3addb3b10b8e | a63ea595750748daf56a4fd5e0e9d53a7cfa3cd4 | refs/heads/main | 2022-12-31T21:45:48.417080 | 2020-10-22T17:05:33 | 2020-10-22T17:05:33 | 306,346,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | from django import forms
class SendMessageForm(forms.Form):
title= forms.CharField(max_length=100)
message = forms.CharField(widget=forms.Textarea)
recepients = forms.CharField(widget=forms.Textarea)
| [
"enockomondike@gmail.com"
] | enockomondike@gmail.com |
ac89c6b2a7ab4aa411c8a6ba2e5e23ec635bb727 | 2251d71bc3ecb589ce1a8b274a08370c3240bf51 | /0083 Remove Duplicates from Sorted List.py | dac2eed98424509c281b1b681789beb06ad5f2f3 | [] | no_license | YuanyuanQiu/LeetCode | 3495a3878edc2028f134bddb5b9ec963069562cb | 6f5d0ef6a353713c0b41fa7ec0fb8c43a7e8dc55 | refs/heads/master | 2022-12-11T04:04:01.686226 | 2022-12-06T18:42:14 | 2022-12-06T18:42:14 | 231,168,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
node1 = ListNode(1)
node2 = ListNode(1)
node3 = ListNode(2)
node1.next = node2
node2.next = node3
# def printList(node):
# while node:
# print(node.val)
# node = node.next... | [
"50243732+YuanyuanQiu@users.noreply.github.com"
] | 50243732+YuanyuanQiu@users.noreply.github.com |
e07f19ebcb868a53956f4158c34c0e154545cca5 | 9b96c37db1f61065094d42bc5c8ad6eb3925961b | /level2/target_number.py | bb5973bc44e3a2e092e766a33bd4c3b539f9a973 | [] | no_license | Taeheon-Lee/Programmers | a97589498c866c498c1aa9192fdf8eec9f8e31f4 | c38b1c7dc4114c99191b77e5d19af432eaf6177e | refs/heads/master | 2023-07-09T21:10:25.064947 | 2021-08-30T05:17:49 | 2021-08-30T05:17:49 | 394,327,802 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | "ํ๊ฒ ๋๋ฒ"
# ๋ฌธ์ ๋งํฌ "https://programmers.co.kr/learn/courses/30/lessons/43165"
def count(numbers, target, tmp, total):
if tmp == len(numbers): # ๊น์ด ์ฐ์ ํ์ ์ฌ์ฉ, ๋ง์ง๋ง๊น์ง ์ด๋ํ์ ๋,
if total == target: # ๊ฒฐ๊ณผ ๊ฐ์ด ํ๊ฒ ๋๋ฒ์ ๋์ผํ ๊ฒฝ์ฐ, 1๊ฐ๋ฅผ ์ถ๊ฐํ๊ธฐ ์ํด 1 ๋ฆฌํด
... | [
"taeheon714@gmail.com"
] | taeheon714@gmail.com |
9112b55172eef632eca15f787a9bb1457535a1cd | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startPyquil2557.py | 4208349c9bbf8ccc828c76303636edb4bd953026 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,801 | py | # qubit number=4
# total number=35
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += CNOT(0,3) # number=13
... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
0a7e55342d8a4b7b2f538f9bececc852e87badf0 | 04ae1836b9bc9d73d244f91b8f7fbf1bbc58ff29 | /655/Solution.py | 2d8edc9e127ac5e52942f9488260f0e9792c9b4d | [] | no_license | zhangruochi/leetcode | 6f739fde222c298bae1c68236d980bd29c33b1c6 | cefa2f08667de4d2973274de3ff29a31a7d25eda | refs/heads/master | 2022-07-16T23:40:20.458105 | 2022-06-02T18:25:35 | 2022-06-02T18:25:35 | 78,989,941 | 14 | 6 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def printTree(self, root: TreeNode) -> List[List[str]]:
if not root:
return []
def ... | [
"zrc720@gmail.com"
] | zrc720@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.