blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31eb1cf4b67d58ffffd4219adc37ed67200c8205 | 527ffd5744d0507a02daaa0b2e97b1a8a898d161 | /Chapter-12_Excel/personalnotes.py | be50801e1adae9c3db16c63b223fc658ac52c03c | [
"MIT"
] | permissive | Vandeilsonln/Python_Automate_Boring_Stuff_Exercises | 87422e7364dd0c692ff86c54b4fbd16374a8ac03 | 9f98e26bd04d841bd99a765a993e3b692ff4b9c4 | refs/heads/master | 2023-01-05T06:43:37.892885 | 2020-11-06T01:54:05 | 2020-11-06T01:54:05 | 298,720,105 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | personalnotes.py | import openpyxl
import os
import json
os.chdir(r'.\Chapter-12_Excel')
myWorkbook = openpyxl.load_workbook('example.xlsx')
mySheet = myWorkbook.active
print(mySheet['A1:C2'])
print('-'*40)
for row in mySheet.iter_rows(min_row=1, max_row=4, min_col=1, max_col=5):
print(row)
print('-'*40)
for column in myShee... |
859177f080e007fa917be158da7390505425cde1 | 085e51c9b5107867ad0c3b03a7e2842e465676c5 | /python_resources/main_lca_star.py | d28607d586ae63cfd211f22b13889aee465b2e35 | [] | no_license | hallamlab/LCAStar | 91ddbedea4b9e07b91afc96649bbfeff24792129 | 96ffec9e5d917fd808f080d4f661974ba5a829ff | refs/heads/master | 2021-01-21T02:21:04.951823 | 2016-09-07T23:08:52 | 2016-09-07T23:08:52 | 17,349,980 | 15 | 3 | null | null | null | null | UTF-8 | Python | false | false | 4,133 | py | main_lca_star.py | #!/usr/bin/python
"""
create_analysis_table.py
Created by Niels Hanson
Copyright (c) 2014 Steven J. Hallam Laboratory. All rights reserved.
"""
from __future__ import division
__author__ = "Niels W. Hanson, Kishori M. Konwar"
__copyright__ = "Copyright 2014 "
__credits__ = ["r"]
__version__ = "1.0"
__maintainer__ = ... |
ce15826870b920d2ce622328ae587ab0feb9b92c | f075b105f9941f91fbed3254102fc11263c97023 | /cms_app/urls.py | 9a54c79d0442e0491ccac7146b7946d2c6cd2322 | [] | no_license | peterlawless/cms_exercise | 28a54a7ee41239d425f4c2ccf17c97e1ba2dad84 | 4d54d5857c1fb83602086c365b2a77d310029e6d | refs/heads/master | 2021-01-17T08:50:51.347521 | 2016-08-16T16:27:31 | 2016-08-16T16:27:31 | 65,824,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
# url(r'^blog/$', views.)
]
|
2ee39eb0e398692347025da2b423851f20f95ab4 | c654d5377d3c2d854609f450b945a73726953e83 | /experiments/id_slow_preconditioning/flowstar_runner.py | 599c6342311020c2ece80218b5cd1d0e42d7a641 | [] | no_license | kristjanl/fs-extension-code | 1ac9f7a49baa6f129325291c73b4159987b3355b | 918bfcaa31b564b0f1647d90f882b3cd39c07848 | refs/heads/master | 2020-05-22T23:19:25.615958 | 2019-09-11T19:41:05 | 2019-09-11T19:41:05 | 84,718,324 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | flowstar_runner.py | #!/usr/bin/env python
import sys
import subprocess
import math
import re
import os
def runFlowstar(modelDir, flowstar, models):
for model in models:
print "======%s======" %model
modelFile = os.path.join(modelDir, model)
modelStream = open(modelFile)
run = subprocess.Popen(flowstar, stdin=modelStrea... |
944ff0704cf9d09f3e34226f6d633bb01189eec2 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_97/836.py | 9a7aebb8a6c7857b8f321b5a33545bd24bac5767 | [] | 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 | 640 | py | 836.py | from itertools import combinations
def recycled_pairs(s):
set_ = set()
for i in range(len(s)):
set_.add(int(s[i:] + s[:i]))
return (tuple(sorted(t)) for t in combinations(set_, 2))
def go(A, B):
count = 0
pairs = set()
for test_num in range(A, B + 1):
pairs |= set(recycled_pair... |
cf68446a3e37d85fe4b5e9e998e0ef36602c9e53 | dc85af4ae9c475de1d0f353521d071434a8925bf | /spotify-bot/models.py | 689ffdf594f888267e65a835e829ee34aa964219 | [] | no_license | geektype/Login-Bot | 1efe89811ce8fb9458c29369e73f470536ab44ab | 99b4edaa95ec895323b1aadac1cf58abcd495697 | refs/heads/main | 2023-02-04T09:27:28.135146 | 2020-12-22T06:39:31 | 2020-12-22T06:39:31 | 322,291,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | models.py | import csv
class Credential(object):
def __init__(self, uname, passwd):
self._uname = uname
self._passwd = passwd
@property
def uname(self):
return self._uname
@property
def passwd(self):
return self._passwd
@classmethod
def from_csv(self, file_name = "spotif... |
2c82819b6bea0fa360fdb2bd391980f472c21bc2 | cbf9f600374d7510988632d7dba145c8ff0cd1f0 | /abc/137/d.py | 68730ab1270d82fe8daaaedc294369fb9a579fca | [] | no_license | sakakazu2468/AtCoder_py | d0945d03ad562474e40e413abcec39ded61e6855 | 34bdf39ee9647e7aee17e48c928ce5288a1bfaa5 | refs/heads/master | 2022-04-27T18:32:28.825004 | 2022-04-21T07:27:00 | 2022-04-21T07:27:00 | 225,844,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | d.py | import heapq
n, m = (map(int, input().split()))
part = []
for i in range(n):
a, b = map(int, input().split())
part.append([a, b*-1])
part.sort()
# print(part)
idx = 0
takable = []
allmoney = 0
for i in range(m):
if len(part) > idx:
# print(part[idx])
while part[idx][0] <= i+1:
... |
7673b367e2f911c1bcaec613833e54a831a10cc6 | 57e605844a3e34c4cd75a7c6dd489c5a9c308ee5 | /LIAvalanches.py | f4fb5379520788f87de131e4dbabf2618b1a07ad | [
"MIT"
] | permissive | Lei-Gu-901/Millman | a40f08fb6a3b36fc914fc084cd79bd60661f3a6a | 8eda66d22c9dec1a60a44beefe35f0e189e4f098 | refs/heads/main | 2023-03-20T02:10:04.540131 | 2021-03-11T19:29:02 | 2021-03-11T19:29:02 | 346,813,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,582 | py | LIAvalanches.py | import numpy as np
import matplotlib.pyplot as plt
import struct
with open("stimes.dat", mode='rb') as file: # b is important -> binary
timing = file.read()
file.close()
with open("sind.dat", mode='rb') as file: # b is important -> binary
index = file.read()
file.close()
'''
Spikes are delta f... |
6b0cdb048cde88b277c9acb37d84440acbf84cd9 | 981eb4ec53d80dce430f352841f07348383a1dde | /src/models.py | a59b36606cff3020a9f55f45a41ce5fc56aefbe0 | [
"Apache-2.0"
] | permissive | a7744hsc/TensorFlow-Speech-Recognition-Challenge | e2d173e392df976813ce337150a16012b563b7e0 | 7ddb6573c85ca79c1996d5560ba21d1913078837 | refs/heads/master | 2021-09-01T19:18:30.833120 | 2017-12-26T06:37:02 | 2017-12-26T06:37:02 | 115,005,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,093 | py | models.py | import tensorflow as tf
def generate_fc_model(fingerprint_input, model_settings, is_training):
fingerprint_size = model_settings['fingerprint_size']
label_count = model_settings['label_count']
weights = tf.Variable(
tf.truncated_normal([fingerprint_size, label_count], stddev=0.001))
bias = tf.... |
533cb8ec7625d42be6711e895bc27f9c94c16349 | f95f5c3da00ecbc405081cf40697b6e405e65553 | /utils/paycenter/callback/callback.py | a6e1ac355f9d8c60c73988549811b9489c626581 | [] | no_license | game-platform-awaresome/Mobile-Phone-Game-SDK | e4e0a871b1fd61071cf849f856ced0e2fa221663 | 5e981115989f24635107162d07bb2e5d933b7cd6 | refs/heads/master | 2020-04-01T08:55:54.481871 | 2017-10-27T05:57:52 | 2017-10-27T05:57:52 | 153,052,640 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | callback.py | #coding=utf-8
'''
Created on Sep 10, 2016
@author: Felix
@summary: 用户付费确认之后需要向
'''
from django.conf import settings
def get_callback_arg_tuples(order, others=[]):
'''
@param order: 本地订单的一条记录,从这个订单记录中获取相关的数据之后,
按照settings.PAY_CALLBACK_LOCAL_REMOTE_MAPPING设置的顺序提取成[(k1, v1), (k2, v2)...]的形式,
由于验签的内容依赖于这... |
5a4641a3a099357e645a8a8b523f357ad3c62b84 | fd6e69fb0971eec0363f30444581c6f5e3f7c77c | /AI_1.py | df34f50dead87f0051fe3d6a6656e53bc5d973c9 | [] | no_license | andrea-covre/minesweeper-mine-search-AI | ab01adc33d000bc0bf340b11bb8a8cc1f96de158 | 2bff953984d5c5870e3c45d4c3bc9d33467f1075 | refs/heads/master | 2023-05-22T17:08:38.490425 | 2021-06-09T14:13:26 | 2021-06-09T14:13:26 | 373,711,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,345 | py | AI_1.py | '''
@authors Parisha Reddy
'''
import numpy as np
import random
class AI1():
# Define settings upon initialization. Here you can specify
def __init__(self, numRows, numCols, numBombs, safeSquare):
# game variables that can be accessed in any method in the class. For example, to access the number... |
742525c636915b4914059d5cc4edea7fb682b188 | 8e321ab097e6de7661369e6216b130954426c6b8 | /models.py | 77de4efb1968c85f8b46fd0abe42748b43a1e4c8 | [] | no_license | sirilyan/chorizo | e7dcc64c430d70be98b766914e98c11e1239eed4 | 6e1bcc6a1b77c8b26e3c65d7fa6d1a29852a8012 | refs/heads/master | 2021-01-04T11:51:43.714299 | 2020-02-14T15:33:53 | 2020-02-14T15:33:53 | 240,534,729 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,928 | py | models.py | from django.db import models
from django.utils import timezone
from django.conf import settings
from django.contrib.auth.models import User
# Create your models here.
class ChoreType(models.Model):
""" master list of chore types """
description = models.CharField(max_length = 40)
def __str__(self):
... |
e986361546a182d0b48a9477194113be2db54fb1 | a0aacfe00c02a78e65e32d8668d09626d5ee6dfd | /spreukbot/pixabay.py | 214833c85648bc12d8f2097ace7b68fb3804a807 | [
"MIT"
] | permissive | mivdnber/spreukbot | d701bcf73eb79950eedebf9d229c7a82d035ba4c | 758c51d78ab9c2dea22b92ab97ff1fff838fc322 | refs/heads/master | 2022-12-10T02:33:39.008246 | 2020-11-11T20:12:00 | 2020-11-11T20:12:00 | 104,569,038 | 1 | 0 | MIT | 2022-12-07T23:57:32 | 2017-09-23T13:21:01 | Python | UTF-8 | Python | false | false | 760 | py | pixabay.py | import random
import requests
import spreukbot.config as config
PIXABAY_CATEGORIES = ["nature", "backgrounds", "people", "feelings"]
def random_pixabay(categories=None, search=None):
params = {
"key": config.PIXABAY_KEY,
"safesearch": "true",
"order": "latest",
"per_page": 200,... |
389d007aafd3214309be72360a1e1c802acf2c7d | 0c9dbd235ff67cdcdc245a669603e74b9355cc78 | /whatsapp/main.py | a70bb9f55a94589ec6d15e615e1df7fb80b7d8fc | [] | no_license | ConnorIngold/Auto-Response-Python-Bot | bdf7226f167a26c77b597ded7da38b9f08cff3ad | 336ffaf5a7999d954a4cd211cd609ee498a03ef2 | refs/heads/master | 2023-03-22T22:30:31.409971 | 2021-03-15T22:22:01 | 2021-03-15T22:22:01 | 348,122,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,629 | py | main.py | import pyautogui as pt
from time import sleep
import pyperclip
import random
sleep(2)
# if the image looks 70% the same (70% confidence)
position1 = pt.locateOnScreen("./smallyPaperClip.png", confidence=.7)
x = position1[0]
y = position1[1]
# Gets message
def get_message():
global x, y
position = pt.locateOnScr... |
3e9c19d836777d7cd71ecc4be6c85d65a1f794d7 | ec51d59269860fa0e2db4481ab7067d203d8e0a0 | /production_main.py | fac2522e973ad429b510a0c0366294280213d3b3 | [
"BSD-3-Clause"
] | permissive | iesus/systematicity-sentence-production | 29d874c75aa131131e19199a49cc2bb8f7e714a2 | f281d3642cea2cb342cdaeccfb0d9a0fb643ebc7 | refs/heads/main | 2023-07-03T22:04:21.567176 | 2021-08-18T16:31:00 | 2021-08-18T16:31:00 | 384,828,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26,806 | py | production_main.py | import os, numpy, random, sys
import data.loadFiles as loadFiles
from data.crossValidation import Fold
from tools.similarities import levenSimilarity
from tools.plusplus import xplusplus
import prodSRNN
sys.path.append("data")
wordLocalistMapPath='data/dataFiles/map_localist_words.txt'
outputsPath="outputs"
def ... |
8055f72d050114ac7868ea93b55456609830cc33 | d80d2c6d7c018f60a18ac9a254406421c1729f49 | /interNN.py | 622a677e6135a492dca502ab7ce54f23a07ea35e | [] | no_license | weilai0980/wideInterNN | 4a17b2b48139451923a9dbbc927353903343156b | 6623bd1676b798d890d3619ad9732c7514f0ee86 | refs/heads/master | 2021-01-18T19:55:28.206812 | 2017-06-20T07:49:59 | 2017-06-20T07:49:59 | 86,922,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52,722 | py | interNN.py | # -*- coding: utf-8 -*-
import gzip
import os
import tempfile
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
from tensorflow.contrib import rnn
import math
import random
from keras.utils import np_utils
from sklearn imp... |
4c1412bb6faa9d129c1e8f434657ea79e8fc481e | c2ce7155a393e1056b5fdc4d3f9b9a89046e9285 | /aw_nas/base.py | 071e3fa0e417a80a9ea0161f0aed934f9cba0e56 | [
"MIT"
] | permissive | blyucs/aw_nas | 9c068dab1bd84a35e58a4c426f7c852a67b93882 | 8a32196ce342b8ad9e3885895735d1286e25beba | refs/heads/master | 2023-08-19T11:00:00.526229 | 2021-08-21T05:16:13 | 2021-08-21T05:16:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,439 | py | base.py | # -*- coding: utf-8 -*-
from collections import OrderedDict
import six
from six import StringIO
import yaml
from aw_nas import utils
from aw_nas.utils import RegistryMeta
from aw_nas.utils import getLogger
from aw_nas.utils.vis_utils import WrapWriter
from aw_nas.utils.exception import expect, ConfigException
# Make... |
51481698a277d20b03020706b390ddf6c9f4fa4c | c97fc7658c39feb51c0ed42c04783797c8675b8a | /2018/chpro/ch_goods/migrations/0004_auto_20180520_1859.py | 7177ee10083390fe2855a18e876f00822a93a9b4 | [] | no_license | githubvit/study | 8bff13b18bea4954e8ed1b4619a091b134b8ff97 | 845e19d1225f1aa51c828b15effac30be42fdc1b | refs/heads/master | 2023-02-20T15:59:19.635611 | 2021-12-15T08:30:54 | 2021-12-15T08:30:54 | 241,928,274 | 1 | 1 | null | 2023-02-02T06:18:48 | 2020-02-20T16:08:06 | Python | UTF-8 | Python | false | false | 1,872 | py | 0004_auto_20180520_1859.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-05-20 10:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ch_goods', '0003_auto_20180520_1007'),
]
operation... |
06c1a7bac2315ac2d53391b64fdb3e8ce8c7b8c7 | 91b5175d2de247a8a8c553ad8453b20a324af023 | /blog/views.py | 0cee0ab7a88d5bd87be54cb06033d597a71acd01 | [] | no_license | poorvakhandare3006/Ecart | 2c01c0acc6765b157121a560906fbbcb36f892a4 | da61dece7173cae6a0c789b28252c6a1c49e6846 | refs/heads/master | 2022-06-05T16:41:14.232852 | 2020-05-04T17:19:40 | 2020-05-04T17:19:40 | 257,315,304 | 0 | 0 | null | 2020-04-20T14:58:18 | 2020-04-20T14:58:17 | null | UTF-8 | Python | false | false | 449 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
from .models import Blogpost
# Create your views here.
def index(request):
blogposts = Blogpost.objects.all()
n = len(blogposts)
return render(request, 'blog/index.html', {'blogposts':blogposts,'count':n})
def blogpost(request,myid):... |
c3252db045eb4982165baaf014b8dfd7fcbf14d5 | ef9cb97820e16bc74d81a83b8c4ae6edf4e5bf46 | /1-EstruturaSequencial/ex5.py | a8b928a356739e4b402fba44a9976ec5a23467be | [] | no_license | allyshoww/python-exercicios | a962b0f4d3f5f5eceb0865fd5ace34142924b71e | 34a29b1bf940130e74b14a294094a367aff501c5 | refs/heads/master | 2022-02-14T01:12:42.717532 | 2019-07-01T21:39:03 | 2019-07-01T21:39:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | ex5.py | metros = float(input('Metros:'))
centimetros = metros * 100
print(centimetros, 'cm')
|
7e1f77210b3beb4e496ff95686d65bd7d79561a3 | f124b56e19e45b32b42fa8f2bc90f4e9044890c4 | /b.py | 5b56006a358c4d9fefb65ec0d325714a326b2781 | [] | no_license | anudeepdaggupati/hello-world- | c8996e3ecf5e21d01a0451ce65ce6eab590c535a | 566e8c3fc289063d77c7705b62dda908e4553003 | refs/heads/master | 2020-03-28T14:04:22.389009 | 2018-11-16T03:34:17 | 2018-11-16T03:34:17 | 148,456,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | b.py | import random
a=input("enter 'r' to roll the dice and 'q' to quit")
while True:
if (a=="r"):
print(random.randint(1,6))
elif(a=="q"):
print("bye!")
exit()
else:
print("give either 'r' or 'q'")
|
9188d58a6d9e832b8908b823d57249fcdd80ff51 | 27befddd6f209f6d8537f604df0cd79e1ff2529f | /Classifier.py | a805479bc8769a34919d81de922c2af327353303 | [] | no_license | thatkahunaguy/p5-Vehicle-Detection | 3320fd2933648b58bdce128758d20e613bd14a31 | 4c0daed97b40b16e0ff9262a579d8553b117d4ff | refs/heads/master | 2020-12-13T21:53:14.854095 | 2017-06-26T22:19:51 | 2017-06-26T22:19:51 | 95,491,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | Classifier.py | class Classifier(object):
"""
Trained classifier
"""
def __init__(self, classifier, scaler, orient, color_space, pix_per_cell,
cell_per_block, spatial_size, hist_bins):
"""
Initializes an instance.
Parameters
----------
classifier : Trained S... |
2f6e0b6a7e14ac9c5a38db6fd2b1cf23cff7144e | d52ab659e8751b51c266ff532b4fb6d66220eaf2 | /Data_structures/Palindrome_checker.py | ebd3fae232a58be481b11969019def7e76b46232 | [] | no_license | antonyalexcm/Bridgelabz_updated | 13b115e1522bb8e6d0e451536fac2b8725061377 | d1c971b911a6a3bacd0e7d421949842602026f02 | refs/heads/master | 2020-07-29T23:04:19.638206 | 2019-09-26T13:51:08 | 2019-09-26T13:51:08 | 209,995,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,650 | py | Palindrome_checker.py | class Node:
def __init__(self,data):
self.data = data
self.next = None
self.prev = None
class dequeue:
def __init__(self):
self.front = None
self.last = None
self.count = 0
def add_front(self, data):
new_nodef = Node(data)
if(self.front ==... |
95f7710fb0137617025819b6240312ce02915328 | 26a3992f209d8788d1ef7be4a1de0c477a89dd51 | /merging/MergeFiles.py | 1c06759c8b7361a809cf0fd9c64fa70d2176b796 | [] | no_license | aiola/alice-yale-hfjet | cf4355421d95c523fa97134283db62d92db3efed | 1ed3737d3280f8f03cb85aaed2979abbe84cbe7f | refs/heads/master | 2021-03-27T11:04:40.035387 | 2019-05-01T17:46:10 | 2019-05-01T17:46:10 | 132,776,814 | 1 | 1 | null | 2018-06-25T11:43:47 | 2018-05-09T15:25:04 | Python | UTF-8 | Python | false | false | 1,150 | py | MergeFiles.py | #!/usr/bin/env python
from ROOT import TFileMerger
import subprocess
def MergeFiles(output, fileList, skipList=[], acceptList=[], n=20):
merger = TFileMerger(False)
merger.OutputFile(output);
merger.SetMaxOpenedFiles(n);
print "Total number of files is {0}".format(len(fileList))
for fileName... |
bfb2d7b811fd450b53493375fa130649349d308f | 4148b1d093f6060d4d640f778b332b354a34a2b8 | /loops/forelse.py | 3d07ebdec3051c00c1748f1fcd99e5d9a2433467 | [] | no_license | bishoyromany/python_tutorial | 44cb74d72e236a457ae0de74ca6121110e88c47f | a515e0400338ef9b45846569bc59b8ed0077522d | refs/heads/master | 2020-12-06T07:44:01.772638 | 2020-03-01T07:38:45 | 2020-03-01T07:38:45 | 232,394,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | forelse.py | for i in range(0,20):
if i % 20 == 0:
print('Stop It')
else:
print('The For Loop Failed') |
720ec6c222659a13d4a0f3cf9096b70ce6e2b2b3 | 473fc28d466ddbe9758ca49c7d4fb42e7d82586e | /app/src/main/java/com/syd/source/aosp/external/toolchain-utils/automation/server/job_group_manager.py | d66f5e0717a250da51cc85a7709da97c42c6c55a | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lz-purple/Source | a7788070623f2965a8caa3264778f48d17372bab | e2745b756317aac3c7a27a4c10bdfe0921a82a1c | refs/heads/master | 2020-12-23T17:03:12.412572 | 2020-01-31T01:54:37 | 2020-01-31T01:54:37 | 237,205,127 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,896 | py | job_group_manager.py | # Copyright 2010 Google Inc. All Rights Reserved.
#
import copy
import logging
import threading
from automation.common import command as cmd
from automation.common import logger
from automation.common.command_executer import CommandExecuter
from automation.common import job
from automation.common import job_group
fro... |
700d35f9e941fe9325821a377ec1ca1c245ddaec | 7dc28c125f9b3d7cfd774a40a76d53812add6cd1 | /tests/test_cli.py | 1cba40ccc1394defd92c0f911812c8ba128f4c5d | [
"MIT"
] | permissive | vmstarchenko/jiml | 9d5723da222c6bc61b09df8643251762dae1afce | d27caa19fef7aba95d10a099c1a1da59beda7708 | refs/heads/main | 2023-08-17T06:25:13.020496 | 2021-09-25T23:36:02 | 2021-09-25T23:36:02 | 404,997,973 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | test_cli.py | import jiml.cli
def write_file(path, text):
path.write_text(text)
return path
def test_argparse(tmp_path):
tmpl = write_file(tmp_path / 't.yaml', 'key: {{ var }}')
inp = write_file(tmp_path / 'i.json', '{"var": "Hello!"}')
out = tmp_path / 'o.json'
jiml.cli.main(jiml.cli.parse_args(
... |
e868998833774c829b05ae8da3280bed61363be1 | 7d43caf73bec8934a663e77847a47d1f43468545 | /python/gen.py | 70abca4ee4ce3661e969e1b3ff5db5e05e10a27b | [] | no_license | ktp-forked-repos/wis-core | 99d8563a4ae865aae607dc4069242f7b0cfc25fd | 5c73192bb83b88513fe61616eb4ecf7824656ad5 | refs/heads/master | 2020-05-25T06:55:53.405551 | 2013-05-22T10:47:41 | 2013-05-22T10:47:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | gen.py | #!/usr/bin/env python2
from rpcz import compiler
PROTO = '../index_server.proto'
compiler.generate_proto(PROTO, '.')
compiler.generate_proto(
PROTO, '.',
with_plugin='python_rpcz', suffix='_rpcz.py')
|
848e4abcd0b4f118030fc62f1272a19bfce9db4e | de900210e578a479bc9e504152de39165c404707 | /docker/dl-integrated-gradients-gcp/ig/ig/integrated_gradients.py | 8e0451b4b4a88efa038b540dc5961332e346cd7d | [
"BSD-3-Clause"
] | permissive | richford/hbn-pod2-qc | 4da220a73189621db704dac2d03be9fcee1fa6f7 | 46d7ece38b4ca11d63c36094d1aa48025b31f44b | refs/heads/main | 2023-04-17T21:57:58.395206 | 2022-07-21T18:28:46 | 2022-07-21T18:28:46 | 354,328,251 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,902 | py | integrated_gradients.py | import argparse
import gc
import gcsfs
import nibabel as nib
import nilearn
import nobrainer
import numpy as np
import os
import os.path as op
import pandas as pd
import tensorflow as tf
def interpolate_images(baseline, image, alphas):
alphas_x = alphas[:, tf.newaxis, tf.newaxis, tf.newaxis, tf.newaxis]
basel... |
3817770a80f8ab16322485522be18edd6b3f5516 | c74e4e8281fe3eca256e4eae61998571418c43b3 | /flask_project/saral.py | 81c3c2b43776531af9cfef9c9457e1e5d2321e8a | [] | no_license | Rajeshravula588/Flask_Content | 05d187d6f1a176a16cc075025910ab7cc962de38 | 5eadf266a6050e66f537911a841ee1231b14aa68 | refs/heads/master | 2020-06-28T10:43:00.365912 | 2019-08-02T05:15:49 | 2019-08-02T05:15:49 | 200,212,378 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | saral.py | from flask import Flask
app=Flask('__name__')
@app.route("/my/<name>/<age>")
def my(name,age):
name ="saral"
age="20"
return "my name is {} and age is {}".format(name,age) |
ba47a90adaab1d2b11556b1cb9e27fd07e436d2d | 41ee100881e7fae2fa0dee3ecc1aadf9a8dcbbc7 | /bot.py | 5aba2fbb645c776c77df823d4e4d3b77e1bca04e | [] | no_license | xdeyyan/snjesko-bot | 42a706093e4005753728609a2d4926e85d286dcc | c40473ea8c41e8e7bab9c111b0ebcd60fe027604 | refs/heads/master | 2020-04-13T02:12:16.321399 | 2018-12-23T14:35:19 | 2018-12-23T14:35:19 | 162,896,646 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,009 | py | bot.py | import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
Client = discord.Client()
client = commands.Bot(command_prefix = "!")
@client.event
async def on_ready():
print("Učitavam Discord API")
print("Povezivanje na servere....")
print("Pr... |
998303fd3a31c5d19ebb27cd1cbd0d9c64027f6d | 39ef8ecbca02a4bf5fd473acd2db8485cffa44bd | /server.py | c1316ef4f323db5858420f49f58f14e597031fa8 | [] | no_license | yajiang4215/Attack-Adaptive-Aggregation-in-Federated-Learning | 47a6cd6879b57b85518175e787b4867b84a94a90 | 886e57ab48ad548b3ba7f90afe9a7e4f2ce0c5b2 | refs/heads/master | 2023-07-09T15:13:09.146815 | 2021-08-21T09:03:53 | 2021-08-21T09:03:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,257 | py | server.py | from __future__ import print_function
from copy import deepcopy
import torch
import torch.nn.functional as F
from utils import utils
from utils.backdoor_semantic_utils import SemanticBackdoor_Utils
from utils.backdoor_utils import Backdoor_Utils
import time
class Server():
def __init__(self, model, dataLoader, ... |
473778eb12d2577577b10d312077731ccafeb838 | fcc123e78a2252e5475bedcb2400f4bd55ac0812 | /smi/zone/views.py | 4e31117ddbfbe7781540b1bfe324f312479d5f8c | [] | no_license | akhmad-john/sadsad | 48626398653ef6842f8fad37424f1ee0af0a5596 | d99ef64d2609476e7ba793cc0cdd0d2bfd814667 | refs/heads/main | 2023-03-14T14:43:16.701695 | 2021-03-15T06:21:20 | 2021-03-15T06:21:20 | 347,859,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,405 | py | views.py | import django_filters
from rest_framework.viewsets import GenericViewSet
from rest_framework import mixins, response
from rest_framework.filters import SearchFilter, OrderingFilter
from rest_framework.decorators import action
from smi.zone.models import Zone, ZoneFile
from smi.zone.serializers import ZoneSerializer, Z... |
22eb7278a3e6cb06f3b16c878a957c675846adc2 | e28009b0a4584e8d128ed6fbd4ba84a1db11d1b9 | /2.Add Two Numbers/Add Two Numbers.py | a6c93b426bd57e4f5be424c6e582307320a1a21a | [] | no_license | jerrylance/LeetCode | 509d16e4285296167feb51a80d6c382b3833405e | 06ed3e9b27a3f1c0c517710d57fbbd794fd83e45 | refs/heads/master | 2020-12-02T23:10:27.382142 | 2020-08-02T02:03:54 | 2020-08-02T02:03:54 | 231,141,551 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,508 | py | Add Two Numbers.py | # LeetCode Solution
# Zeyu Liu
# 2019.1.20
# 2.Add Two Numbers
from typing import List
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
# method 1 利用ListNode概念
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNod... |
af526d353da0d441d91a5a8cad60c0550d27a270 | f5e353a07c9fb39e8b9fab565cfa993e5b783a87 | /selenium/__init__.py | ab8168395d67d9d80e26d96675f64b0080d2b4ad | [] | no_license | lztestjust/lztest | 22865e2fb44ef20051b6563d580c5a5ad3975209 | bfca384b309d9a59e57e548c36dc67ac628c5abe | refs/heads/master | 2020-04-30T19:57:09.096591 | 2019-03-26T12:12:44 | 2019-03-26T12:12:44 | 177,052,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | __init__.py | """
本包主要包含 selenium 针对一些控件的操作封装
目前仅是封装 ActionChains 对控件的操作,例如滑动
widget_slider 模块就是对滑动的封装
widget 包里的模块是在 widget_slide 模块上进行操作封装,使其更符合实际场景的需求
""" |
645ee5adb06cc66ea1e2a634dd3cadbc56ef4acd | 86df126a63d476298faff3096d2e0f925dee70c4 | /Project/views.py | e10f9823c51aa1ae4ee2bd2d1331a59056388504 | [] | no_license | SabikAbtahee/BYTE-PRO | 0b76f32efaa47855d2386c2d3abc9ce96099f25e | a84ad04241d63e9d2104c554319d2023c4864b0c | refs/heads/master | 2022-12-25T19:30:22.742603 | 2019-04-27T07:37:13 | 2019-04-27T07:37:13 | 124,196,353 | 4 | 3 | null | 2022-12-11T06:00:11 | 2018-03-07T07:26:17 | JavaScript | UTF-8 | Python | false | false | 38,510 | py | views.py | from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
import Database
from django.contrib.auth.models import User
from django.conf import settings
import difflib
import os
import shutil
from datetime import datetime
from Communication.views import Communication
class Project... |
14b9f93d7773a1e9909ef6e05db53aa879b1072d | 4e6b442c1e2d3bcad9ae6e7fe668fa31e10512de | /docs/conf.py | 310bda8b832a8e5b228c4963ed254134a4b4e858 | [
"BSD-2-Clause"
] | permissive | billyshambrook/taskman | 3ee1ee0616c3eba8623bcc8c0687c4a15b4e12b0 | 7e293ce9ea89ec6fc7e8b5a687f02ec9d4ad235e | refs/heads/master | 2021-01-10T14:09:36.230050 | 2016-01-18T23:16:22 | 2016-01-18T23:16:22 | 49,792,892 | 8 | 0 | null | 2016-01-18T23:04:04 | 2016-01-16T22:06:05 | Python | UTF-8 | Python | false | false | 698 | py | conf.py | # -*- coding: utf-8 -*-
import sys, os
sys.path.insert(0, os.path.abspath('..'))
import taskman
extensions = ['sphinx.ext.autodoc']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'taskman'
copyright = u'2011, Billy Shambrook'
version = taskman.__version__
release = taskman.__... |
969b86293be6b7940d3d54c35fd309311c74cebb | 0caed5a794e2a33c177f24ab90b236dca7456313 | /cppbacken/calc/sort_demo.py | 3343aa5160aa64b3f74e2eac7c04416a3ed2c279 | [
"MIT"
] | permissive | SeanLee97/python_intermediate | 9586b233d7e70b49fa2ae3c068b6c43a7a8f579f | 994e9998069f9d34420d5bd3be830146bee1ab10 | refs/heads/master | 2020-03-21T09:02:55.719577 | 2018-08-31T08:26:40 | 2018-08-31T08:26:40 | 138,381,147 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | sort_demo.py | # -*- coding: utf-8 -*-
from wrapper import Wrapper
wp = Wrapper()
print(wp.sort([2, 1, 4, 3]))
|
36348e9246fffbbeddc5a357d8b5b734e206cef6 | 0161af5d4af0585d55ee5fbe2411ff4e51bdc22b | /binary-tree-tilt/solution.py | 0248588c6f8fd39f1c5eb23805f524bd12832e01 | [
"MIT"
] | permissive | LYZhelloworld/Leetcode | 92560472205de70366e355525eefb424eaaea62a | 1ef3c8d3a75a20755e7474427224ed8757f97932 | refs/heads/master | 2020-03-27T02:28:51.517247 | 2018-09-19T03:59:47 | 2018-09-19T03:59:47 | 145,793,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | solution.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 findTilt(self, root):
"""
:type root: TreeNode
:rtype: int
"""
def calc(root):
if... |
3c72fb9fc1a02f4823bc965f2e0ff53d45400306 | 6ae9a494a9fd4496af4221d83a5c579a0ee7efb8 | /tree.py | c2b15078a498dbb0840872ef222395abd6d34fda | [] | no_license | wndessy/Algorithm | c0d4eb564466fbb9a06537b7383e7da149b8c3cd | a92ec24bda27f0e128b5dbd32800f60657180033 | refs/heads/master | 2021-07-19T00:35:26.439935 | 2020-05-21T11:25:28 | 2020-05-21T11:25:28 | 167,376,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | tree.py | from _ast import List
import unittest
class Node():
def __init__(self, data):
self.left_child = None
self.right_child = None
self.data = data
class Tree():
def __int__(self):
self.root = None
class CreateTrees():
def __init__(self):
pass
def create_binary_tree... |
81492fe4e7501eaa4cde88a1a0afa7e40abce645 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_81/413.py | 4624ab3e7244e3835b48e109e7f40c8e0955a9f5 | [] | 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 | 3,438 | py | 413.py | from decimal import *
getcontext().prec = 20
fin = open("A-large.in")
fout = open("A-large.out", "wt")
numCases = int(fin.readline().strip())
def output(string):
print string
fout.write(string)
for caseIndex in range(1,numCases+1):
output("Case #%d:\n" % caseIndex)
numTeams = int... |
8d33c58a191922ae6b9bdc078f70b9961bc9f78b | 290317ec041967f5d5fb23d6d573b287d5819ed8 | /previous_code_2/level4/bringing-a-gun-to-a-guard-fight/solution.py | 9081d7493331abc33c631bb40ebb3fc7cb8d2b4a | [
"Apache-2.0"
] | permissive | kevinpz/google-foobar | 24548cb6dd219105ec4649923f57b33439b765bd | f6b12b5ff1ad8282faf98f6ad079dbaba104dc38 | refs/heads/master | 2023-01-14T17:55:40.345294 | 2020-11-19T22:13:15 | 2020-11-19T22:13:15 | 119,523,380 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | solution.py | def solution(dimensions, your_position, guard_position, distance):
res = 0
return res
|
969cc159580fe81130fb2f2fa414e806c6ac726d | 0023d42c9180bdfae052cb6acc3a5fd142353943 | /apps/app1.py | 5356062c5664d76f11e076b2080741cda7394070 | [] | no_license | techSash/noaa_storm_analysis | 8da1de501f8a3b24d7752ac1e501b2026545a82a | a723f04d98e79591e41957e6f2cf7bcdf9564723 | refs/heads/main | 2023-08-14T17:48:45.506973 | 2021-09-20T08:36:32 | 2021-09-20T08:36:32 | 586,279,598 | 1 | 0 | null | 2023-01-07T15:25:03 | 2023-01-07T15:25:03 | null | UTF-8 | Python | false | false | 8,696 | py | app1.py | import numpy as np
import pandas as pd
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
from dash.dependencies import Input, Output
import dash_alternative_viz as dav
import altair as alt
from app_df import get_counties_json, get_storm_data, get_list_years, CA... |
0e58b90fcfc237f8f9c5e2c319cc8bb9500e3376 | 9228384b16e71ab491830440d9193262129c7b07 | /test.py | 19f41273699798195831e8fc330e905753c4151b | [] | no_license | harvestnote/mole | 3a1ca863fa973611bd8993e41a0b4182415b1ebc | 334c23ab118cfd10db54183491e3143546b8cdc9 | refs/heads/master | 2020-09-05T13:22:02.655403 | 2019-11-15T09:56:31 | 2019-11-15T09:56:31 | 220,118,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | test.py | import queue
import threading
import time
import os
import _thread
arr = []
lock =threading.Lock()
def put_data(arr):
lock.acquire()
for i in range(101):
arr.append(i)
while len(arr) > 10:
threading.Condition.wait()
lock.release()
def show_data(arr):
lock.acquire... |
9afe23b231956cc1512c4084ec49b9740d344870 | 2b4e8a5d3ace73337a3df72199c8ad6c5ee451d3 | /email_sending_cli.py | 2d7452b4cf2814e92628da876523acd95c302d16 | [] | no_license | mrmammadov/goyerchin | 2711b4a14b216967f3abc9c2d8384b301f4e152c | 21a74413fcef919312eb545360eb0dafa4df00aa | refs/heads/master | 2023-05-14T22:21:47.618465 | 2021-06-08T11:29:32 | 2021-06-08T11:29:32 | 374,379,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,352 | py | email_sending_cli.py | import argparse
import smtplib
import os
import re
import sys
# Environment Variables
email = os.environ.get('EMAIL')
password = os.environ.get('PASSWORD')
# # CLI Installation
# my_parser = argparse.ArgumentParser(prog='email', description='List of all the files in the path')
# my_parser.add_argument('Person', meta... |
45a1369515c8e47c253a9766a2d433e759b19946 | 03f2263a7872bd7b4bbc790f6bd40fe4bc40546d | /env_facial_recognition_v1/lib/python3.6/abc.py | 70105e8bef2a1f474548abad9b43d2db97196328 | [] | no_license | tanlull/facial_recognition_v1 | b17715d506b22f6807fecad5d423506f876efcf4 | 214684ea7df95a8d8b3b15e9873220335b7d8520 | refs/heads/master | 2020-07-19T19:11:09.640314 | 2019-09-21T16:16:08 | 2019-09-21T16:16:08 | 206,497,312 | 0 | 0 | null | 2019-09-05T07:03:24 | 2019-09-05T07:03:24 | null | UTF-8 | Python | false | false | 45 | py | abc.py | /Users/Anthony/anaconda3/lib/python3.6/abc.py |
8bdb85c26fd7d7e4ff72c7acc275e5b5114cdd99 | 49441fc30f5d50a256232a371352330c29216413 | /example-2/Modules/Test/TestClass.py | f4434e96504ff1bb399a1407a5ffab6534436425 | [] | no_license | BlackWaterQrtDx/Atopy | e165cae031d63c3434055f2d8a531487a05afeb0 | 3f1357a805a96a421d34c9cb495eacb6c84a8aae | refs/heads/master | 2020-03-26T06:25:06.887354 | 2018-08-20T11:54:29 | 2018-08-20T11:54:29 | 144,604,082 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | TestClass.py | from Atopy import Atopy
autoloader = Atopy(__file__, wdebug = True, run = False)
autoloader.setCwDirectory(__file__, supdir = 2)
autoloader.autoload()
autoloader.listModules()
autoloader.get('Main').helloMain() |
5b4efb320f31f22dd55c699589026050ef853900 | 036a41c913b3a4e7ae265e22a672dd89302d3200 | /1101-1200/1123/1123_Python_3.py | bd763de4a2b10808bcf6e4c7657d08b728477e43 | [] | no_license | ChangxingJiang/LeetCode | e76f96ebda68d7ade53575354479cfc33ad4f627 | a2209206cdd7229dd33e416f611e71a984a8dd9e | refs/heads/master | 2023-04-13T15:23:35.174390 | 2021-04-24T05:54:14 | 2021-04-24T05:54:14 | 272,088,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 962 | py | 1123_Python_3.py | from toolkit import TreeNode
from toolkit import build_TreeNode
class Solution:
def lcaDeepestLeaves(self, root: TreeNode) -> TreeNode:
def dfs(node, depth):
if not node:
return None, 0
if not node.left and not node.right:
return node, depth
... |
43e1d4b26cd61899f2ebdce97bab9266a52d5ed0 | 6671e46450b19dd2dfa3f254fe19c27775dfd40d | /Test01.py | 6b3e78f64b6a8985de5c03a2ba5b06d043ba7281 | [] | no_license | AlexHululu/Galaxy | d8bc38590360db124441b5aa55f423662670b3ad | 21010ba9ac856ce3cdd086529f405934d3f24575 | refs/heads/master | 2020-09-12T13:08:45.497759 | 2020-06-02T03:47:08 | 2020-06-02T03:47:08 | 222,435,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | Test01.py | # os.environ["PATH"] = r"C:\Program Files\DIgSILENT\PowerFactory 15.2;"+ os.environ["PATH"]
# os.environ["PATH"] = r"F:\software\Digsilentchinese;"+ os.environ["PATH"]
# PYDpath = "F:\\software\\Digsilentchinese\\Python\\3.4"
# sys.path.append(PYDpath)
#import PowerFactory module
import powerfactory
#start PowerFacto... |
1ccb2894a82281d02405459f9bad6344f1b65b35 | fb937a567b79618616881ecd4fea96c474a7d7c6 | /items.py | 175adfef8b954a3967df42bd8aa98625ae95bb3d | [] | no_license | Stochast1c/ac_catalog | 567c187817391af0a907f684f1e42f648b8ca246 | 80b6696b90cbc992f5d6deb7ea7e4003bfb8d903 | refs/heads/master | 2021-01-22T23:16:45.130973 | 2015-07-03T02:23:58 | 2015-07-03T02:23:58 | 18,342,804 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,391 | py | items.py | from readcol import *
import numpy as np
import ast
import collections
import glob
import pickle
import os
def items():
csv_path = "csvs"+os.sep
pickle_path = "pickles"+os.sep
files = glob.glob(csv_path+"*.csv")
for f in files:
dict = readcol(f,asdict=True,fsep="`")
dict.pop("\n", None) #fo... |
5687c634a61731bc8eb38ce85fc442fa3fcfcccf | 21c126886822e5fa77282692c21401e39da71003 | /model_trainer.py | 2dfd1a696aa7b0a9fd792af9424e26c90421c24a | [] | no_license | rahulm/ee239as-project | fe33c83e7aa982f2eaf251301d5cf365179a8fb0 | 9ac291a01a44bd4f84bd6562996771ecb6840b1a | refs/heads/master | 2022-12-24T13:48:11.968895 | 2020-09-28T02:24:25 | 2020-09-28T02:24:25 | 173,244,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,288 | py | model_trainer.py | import torch
import torch.nn as nn
import torch.optim as optim
import datetime
import matplotlib.pyplot as plt
from eigenface_inference import perform_eigenface_inference, perform_eigenface_sampling
import os
import csv
class ae_trainer(object):
def __init__(self, use_cuda, model, loss_func, latent_vec_reg, optim... |
fc9a205380d9c3eeca2d796afee736085447c430 | 931aab992c43c6a944a29d351e7c88ced2dd02fa | /ast_export.py | 7357797b65fe35d96b04bb70c8bdd7514b501041 | [] | no_license | pannous/kast | 4aa7ad700c67d01c1f693183b0667c7eaab40be6 | 8fbd294f58176e496a443506d6e22f001cd9feb9 | refs/heads/master | 2021-01-24T02:05:47.265997 | 2019-11-25T10:19:34 | 2019-11-25T10:19:34 | 37,341,987 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,859 | py | ast_export.py | # https://docs.python.org/release/2.7.2/library/ast.html#abstract-grammar
# https://docs.python.org/release/3.4.2/library/ast.html#abstract-grammar
# -- ASDL's six builtin types are identifier, int, string, bytes, object, >>> singleton <<< NEW
# Deprecated since version 2.6: The compiler package has been removed in Py... |
a3146244eeff54c4d86d5f8ebf54851c1c11b241 | 29f3bf714ad4aa56e23c022b48572c65344868fb | /LayerOfConvPooling.py | c0d252eea6a7ad052332bd01f2beddf4d8a63800 | [] | no_license | MengMengLiao/Cplusplus_With_Python | a36e2b0613a3ec3ef683c5e50c9440c84abc0050 | 9ff64ce792579dd2babf4bb3b9e4e623a4429ea8 | refs/heads/master | 2020-03-19T01:11:19.134113 | 2018-05-31T07:47:31 | 2018-05-31T07:47:31 | 135,528,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | LayerOfConvPooling.py | import numpy as np
import theano as th
from theano.tensor.nnet import conv2d
import theano.tensor as T
from theano.tensor.signal import pool
class LayerOfConvPooling(object):
def __init__(self, rng, Input, filter_shape, image_shape, poolsize=(3, 3)):
'''
:param rng: a random number generator used ... |
7286e4ed2be1f131856606c9e311e17cf486a815 | 8b195afb694e623ba242e915cb56f7ffad446af4 | /rough1.py | 9e3b21998ee8815e036f6c1d4bd64d50a27b4c19 | [] | no_license | lisa2882/CS_1026 | e0d109e7a00874f5a488f20e7f4ccb0229d081a5 | a9612fb0fee69cf710e0b625afa7a93d9c27fd1a | refs/heads/master | 2021-01-13T09:36:25.797489 | 2016-11-17T00:20:12 | 2016-11-17T00:20:12 | 72,043,016 | 0 | 0 | null | 2016-10-26T20:46:27 | 2016-10-26T20:46:27 | null | UTF-8 | Python | false | false | 1,330 | py | rough1.py |
#prompt user for keywords file
def keywordsfile () :
keywordsFileName = input(print("Please enter the name of the file with the keywords: "))
try:
openKeywordsFileName = open(keywordsFileName, "r")
except IOError:
print("File not found.")
quit() #quit?
for i in range (0... |
6829aa4e65a833bf62bfaa312e14d37355ba5156 | f5480020252b658f0206b3640ea5814375885a29 | /playlists/migrations/0012_alter_movieproxy_options.py | f3d59439f0a239f0ec7105224883f015f116f8b0 | [
"MIT"
] | permissive | KibetRonoh/Movie_Zone_-Django | 1e70957066395016373b29ee4d367ab41f926e85 | 901b211540943a98b531db2bc77d6b3a483a694a | refs/heads/master | 2023-09-03T14:37:36.890687 | 2021-11-14T10:35:08 | 2021-11-14T10:35:08 | 427,474,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | 0012_alter_movieproxy_options.py | # Generated by Django 3.2b1 on 2021-03-17 21:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('playlists', '0011_movieproxy'),
]
operations = [
migrations.AlterModelOptions(
name='movieproxy',
options={'verbose_name': '... |
500c8682285a7e9007252100caa3efefcdc51a9e | 8df2756f49d961423222a30a41065dd90ebabfd3 | /PyChips_1_4_1/scripts/glib_vtrx_bert_clear.py | de9d54d7fd4df6e32597f38cef0865e3e6ce85b3 | [] | no_license | zctao/GLIB_Aurora | 75d3cf8383eaf320799d9444be0f0ebc9ec467bc | 52d5a52b4a4acbceb9ff4758955294b3444bc477 | refs/heads/master | 2021-01-10T19:37:46.649189 | 2015-03-04T02:57:31 | 2015-03-04T02:57:31 | 27,398,661 | 1 | 0 | null | 2015-02-18T21:46:14 | 2014-12-01T20:36:34 | C | UTF-8 | Python | false | false | 3,826 | py | glib_vtrx_bert_clear.py | from PyChipsUser import *
import sys
import os
from time import sleep
#####################################################################
glibAddrTable = AddressTable("./glibAddrTable.dat")
print
print
print "--=======================================--"
print " Opening GLIB with IP 192.168.0.111"
print "--==========... |
19b4739018f9d574bfb23f768a54ee2490be55bf | 73aaf9b74aeb60e7f3540dfa484812a072913606 | /data collections/dictinory/dictnry.py | 0b41b1dc3fc8ea5105291db30b5d9c578d675cf9 | [] | no_license | ananthuk7/Luminar-Python | 3082552c6e11bd0ce06cd0f272eb0cd85b24b136 | 5d22cf976bff2e540d09de3aedc6699c3c4b0991 | refs/heads/master | 2023-07-09T08:24:12.409052 | 2021-08-08T03:26:34 | 2021-08-08T03:26:34 | 385,203,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | dictnry.py | dict1 = {'name': 'ananthu', 'age': '23'}
print(dict)
print(type(dict))
#mutable
# hetrogeneous
print(dict1['name'])
dict2 = {}
dict1['age'] = 15 # updating an existing element
dict1['school'] = "hello" # Add a new entry
dict1.update({"location": "thazhava"})
print(dict1)
del dict1['age'] # remove an element
... |
40e724033bf7c845c6d67ac6ac26094dc8bc938f | 4659ef75716389c6f9280c609cc1e639da79d9ee | /tig_loader/tig_projection.py | 20bd7497c0fe01448060ef9e3a8566746acfcf4f | [] | no_license | vvkond/QGIS | cf2ea68f53921010916f999dd34dade190eaa22a | 302dbc948de3163ec74d47164c5e6e1f8a6f7df0 | refs/heads/master | 2021-06-03T22:37:34.290064 | 2020-12-03T04:33:03 | 2020-12-03T04:33:03 | 107,931,779 | 1 | 1 | null | 2019-09-20T04:16:34 | 2017-10-23T04:23:30 | Python | UTF-8 | Python | false | false | 7,600 | py | tig_projection.py | from __future__ import division
import struct
from pyproj import Proj
from tig_loader.utils import StrictInit, cached_property
'''
Interational Metres
Common Feet
International Feet = Indian Feet (1959 legal)
Imperial Feet
Indian Feet (curent Burma & Thailand)
Indian Feet (1963, current India & Pakistan)
Indian Fe... |
7f1905c5dcb3e5a13d43d8a3163153eb62882599 | bbcf5b1d8df4b5f06011169482dbdbd4f18a59be | /test/si.py | df189a6ef43ff8f9ae14f74e6508fc8969f19b55 | [
"Apache-2.0"
] | permissive | liangbaika/smart-spider | c3ed21b50006dfabf3ffc6668414261a83c54921 | 5810151710c5e2d4565d394b8deaaa703776f0f4 | refs/heads/master | 2023-02-19T10:14:30.697550 | 2021-01-25T18:01:06 | 2021-01-25T18:01:06 | 328,535,678 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | si.py | # -*- coding utf-8 -*-#
# ------------------------------------------------------------------
# Name: si
# Author: liangbaikai
# Date: 2021/1/15
# Desc: there is a python file description
# ------------------------------------------------------------------
from blinker import Signal
class AltProcess... |
f5d2457b1f9714fe8733be14fb225c005bd9974c | 6960de700b46889f3d5a1acc36290e77408e06af | /app.py | eebd917e1bf167bc98507a07fc21ddbdbcb4453f | [] | no_license | midnightmastermind/webhook2notion | 0142bf1f8168f06492e6a0b72d3df2385e07a017 | e7e40e5898a56fc544b63a14a20265e2627a1adb | refs/heads/master | 2022-06-04T13:48:04.232989 | 2020-05-05T20:29:02 | 2020-05-05T20:29:02 | 258,924,677 | 1 | 0 | null | 2020-04-26T02:57:06 | 2020-04-26T02:53:19 | Python | UTF-8 | Python | false | false | 7,242 | py | app.py |
import os
from notion.client import NotionClient
from flask import Flask
from flask import request
from notion.block import BookmarkBlock, TextBlock, PageBlock
import markdown
from md2notion.upload import convert, uploadBlock
import urllib3
import urllib.parse
from lxml import etree
import prettierfier
from imgurpytho... |
e9329e1897fed43acfda0971d1329cffd04b8b1e | 8474c5fad466e43d5c8783cf7c004a238c89f8f6 | /app/main/model/borrower.py | 55437e030ca43e277957a34a65de23ef1f81f10a | [] | no_license | Kerod-Fresenbet-Gebremedhin2660/LibraryManagementSystemRestAPI | c628263d47026b88e080242a3e0d336b2a08c9cb | b316805e4063b2b3bc0649f26353ca6cf31b11f4 | refs/heads/main | 2023-05-23T11:20:10.754975 | 2021-06-17T16:15:10 | 2021-06-17T16:15:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | borrower.py | from typing import List
from .. import db
class Borrower(db.Model):
""" Borrower Model for storing Students who are borrowers """
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
borrowerId = db.Column(db.Integer, db.ForeignKey('student.studentId'))
bookId = db.Column(db.Integer, db.F... |
58ff41a62c25e31a0729102e9deeb6aa66272c2f | 3a8408aefe35580e4c1f6a4ac3d22c8bf41827af | /demo/goal_planner_gui/src/focus_swap_test.py | 3a1d2361707873c5ae1325d746b2746679e59270 | [] | no_license | Hankfirst/neurobots_demonstrator | df9cc2b44785da6866fb8161bd9ac4811f886009 | b77fadce8054163899ff7ca65d2d4417441649f0 | refs/heads/master | 2021-09-24T22:04:15.493990 | 2018-10-15T13:27:20 | 2018-10-15T13:27:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 796 | py | focus_swap_test.py | #!/usr/bin/env python
import sys
import rospy
from planner_control_msgs.srv import focus_swap
if __name__ == "__main__":
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "ok.png"
print("Simple test that replaces the focus swap icon with image: >%s<" % filename)
print("send... |
14c262993c688c74f064541f1fa4ab3444654620 | e61e78fac79010663e5682c596e70269a4e872b4 | /codes/method3/test_nn.py | dcbacacce2e07c3d9393f62c96fcb9754f02d751 | [] | no_license | Demon-Black/DIP2-few-shot-learning | df2281e69c1a842cec1224fbb878f4ec2245bd6d | 284a6b93bb20dca094aac7f7b854d3082bdd6749 | refs/heads/master | 2020-03-19T13:30:13.159544 | 2018-06-08T07:23:49 | 2018-06-08T07:23:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | test_nn.py | import tensorflow as tf
import numpy as np
f = np.load('f.npy')
f_test = np.load('f_testing.npy')
x1 = tf.placeholder('float', [None, 4096])
x2 = tf.placeholder('float', [None, 4096])
y = tf.placeholder('float', [None, 1])
def mlp(X1, X2, weights, bias):
X = tf.abs(tf.subtract(x1, x2))
X = tf.add(tf.ma... |
78916f0da231edd26e1f7b74ef5f7e9917599713 | 3434fc18dbd43c9ff4a55f367725c6bb2c3824a7 | /login/management/commands/testAdditional.py | c88e9b5044e1ffc349edd5402e697661583960b5 | [] | no_license | ackzf/cs169-13-warmup1 | adb74a90a793ed743da39e9f45c432dd9496a2be | 1e6f1c94cefeb55d438f6a2e328d7dfd337c3793 | refs/heads/master | 2020-05-02T11:10:48.507931 | 2013-02-20T00:35:35 | 2013-02-20T00:35:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,164 | py | testAdditional.py | """
Each file that starts with test... in this directory is scanned for subclasses of unittest.TestCase or testLib.RestTestCase
"""
import unittest
import os
import testLib
class TestAddUserError(testLib.RestTestCase):
"""Test adding users"""
def assertResponse(self, respData, count = 1, errCode = testLib.Res... |
1b7c44920e834fbff73d4aabe09afca043d2e227 | 51163dd6f5bd1381ac30a93dfbf5eb0fc34d7c3e | /py/mesh_rpc/lib/rpc_pb2_grpc.py | e79946890c72036e158823673c95acee81193817 | [
"MIT"
] | permissive | pravahio/cross-lang-mesh-rpc | 88b8faa5a41fae676a40b36f5fad7af9e701986e | 00b8e0d5eb8af8ab46aec5ebf74cc018ac81e734 | refs/heads/master | 2023-08-08T22:50:25.869014 | 2020-09-06T19:29:45 | 2020-09-06T19:29:45 | 209,133,188 | 0 | 0 | null | 2023-07-05T20:50:55 | 2019-09-17T18:52:52 | Python | UTF-8 | Python | false | false | 4,341 | py | rpc_pb2_grpc.py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from . import rpc_pb2 as rpc__pb2
class MeshStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self... |
525a8c05e69ee8aed701e653ffc7a13d365db53c | 501b5e847e2299e437c4091082313b7d448c0a62 | /machine-learning2.py | d0642c032470004582a3ca0da8562764e8591c35 | [] | no_license | JesNatTer/machine-learning | 37c80ff9319dfef47aac4c346c40b7500f1f22e7 | e5a4f84dd887d3d4a0955ea40a0729625e351eee | refs/heads/main | 2023-05-10T22:14:11.333128 | 2021-06-01T10:01:29 | 2021-06-01T10:01:29 | 372,775,991 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | machine-learning2.py | import matplotlib.pyplot as plt
import numpy as np
nums = [0.5, 0.7, 1., 1.2, 1.3, 2.1]
bins = [0, 1, 2, 3]
a = np.histogram(nums, bins)
print("nums: " + str(nums))
print("bins: " + str(bins))
print(a)
plt.hist(nums, bins)
plt.xlabel("Nums")
plt.ylabel("Bins")
plt.title("Histogram of nums against bins")
plt.show()
|
4b9371651a955c21a52e5b48e8fb1bd537cd6b1c | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /125_algorithms/_exercises/templates/_algorithms_challenges/pybites/intermediate/41_v2/login.py | 31045d2dd488320433fa63d0d3a355955ea6b946 | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 452 | py | login.py | # known_users 'bob', 'julian', 'mike', 'carmen', 'sue'
# loggedin_users 'mike', 'sue'
# ____ f.. _______ w..
#
#
# ___ login_required func
#
#
# $w.. f..
# ___ wrapper user
# __ ? n.. __ k..
# r.. "please create an account"
# __ ? n.. __ l..
# r.. "please login"
#
# ... |
ca30dc6d0c91924df992b5ea31da3ba7b2fe4e62 | 2c9702c5acca19b866dff9a4d619c0574c2a2a6e | /PDF.py | 1948566a3c4ad6ecb24535b13ba820adc74cc520 | [] | no_license | hasansnetwork/python | 80a5cfb467d969c42c823d011c580f322e37005e | 271f2e37a906c023ea89fab9f819b918d7ac5f4a | refs/heads/master | 2022-12-14T18:02:20.786548 | 2020-09-14T09:16:50 | 2020-09-14T09:16:50 | 295,363,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,318 | py | PDF.py | import codecs
import matplotlib.pyplot as plt
dics = []
count = 0
with codecs.open("iz.tr", "r", "UTF8") as inputFile:
inputFile=inputFile.readlines()
for line in inputFile:
item = line.split(" ");
line_dic = {}
line_dic['event'] = item[0]
line_dic['time'] = item[1]
line_dic['from_nod... |
03b71588625c62f2d3d334bd05c63c52be92a571 | 1b9762c3fed4806b447d7a3ddf87613d4b9e5e7a | /6- Condicionales/condicion3.py | 3913c5338ee2c5d3b38cb9a94b86c1fdb644676e | [] | no_license | adri994/Curso_Python_Juan | 8ed549d0f9e9a96a341600e177bfb99d7eee8eb6 | 5ab0981398f1d022a4f1f37770a5728ea780d08e | refs/heads/main | 2023-02-22T21:44:39.372123 | 2021-01-29T00:33:02 | 2021-01-29T00:33:02 | 332,319,406 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | condicion3.py | ocupacion = 'Jubilado'
if ocupacion == 'Estudiante':
print('Tiene 50% de descuento')
elif ocupacion == 'Jubilado':
print('Tienes un 75% de descuento')
elif ocupacion == 'Desempleado':
print('Tienes un 10% de descuento')
else:
print('Tienes un 100% de descuento') |
6b6d36c967e423c187d355beadfd518848b3189a | 4dcebb98135cbd6c96d7d6caa083623778c6340a | /scripts/make_headers.py | e4024c1fc7595ff4061651fd6479e341c74095b7 | [] | no_license | wuxy/Elevator | e35f058ad945b7be7baf919b2cb2c2e5c175dc9b | 4c890928aed55fcc90253718ef857d9c6d0674e8 | refs/heads/master | 2020-03-17T02:47:30.413518 | 2016-02-03T18:46:36 | 2016-02-03T18:46:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,893 | py | make_headers.py | # make_headers.py
# 18-649 Distributed Embedded Systems
# Group 11
# Rahul Ramesh // rahulram. Daniel Santoro // ddsantor. David Thompson // davidtho. Jialiang Tan // jialiant
# !@
import glob
import sys
#global variables
header_start = "@@"
header_end = "!@"
# make headers for all files of type .extension at path
... |
2b2d647b2aac186ac30790b3dce658b674e938d0 | 5118d5ac16ac2b4cac04151bf04a3bcd32ef999a | /fun_formatar_lista.py | 7fed8982a35bafd0bf14a15f41a5fa7022574159 | [] | no_license | danielsantosead1/python-4linux | e46aa68ca6eb3a86d83e3a87591fab0140d04dcc | c58b312e96bbc1ade28d0439f7d2b5c8abb83f2a | refs/heads/master | 2020-03-21T14:36:03.777240 | 2018-07-11T01:22:57 | 2018-07-11T01:22:57 | 138,665,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | fun_formatar_lista.py | #!/usr/bin/python3
minhalista = ['daniel', 'santos', 'guedes', 'sampaio']
novalista = []
def formatar_lista(lista):
for itens in minhalista:
novalista.append('{}\n'.format(itens))
return novalista
a = formatar_lista('minhalista')
print(a)
|
cbda0868717b7dcbd77c0b278775048011196c6d | 142fc53475209ae5b4731299bb4dbeca4244bdbf | /parse_genome.py | 9b546cea9a5d8489fb1d34f9aa91ebbedb30a164 | [] | no_license | LongTianPy/Mayo_toolbox | 7a27a51a2911ad7f3572f8d96e255f1c439f2574 | 2d7f4f7c323632ddfb6014f7af58ad9dbdca7994 | refs/heads/master | 2021-07-17T14:28:47.365860 | 2018-08-13T15:00:46 | 2018-08-13T15:00:46 | 135,592,741 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | parse_genome.py | #!/usr/bin/python
"""
"""
# IMPORT
import sys
from MySQLdb import Connect
# FUNCTIONS
def connect_to_db():
conn = Connect(host="localhost", user="methyldb",passwd="mayoproject",db="MethylDB")
c = conn.cursor()
return conn, c
def parse_gff(gff):
f = open(gff,"r")
lines = [i.strip().split("\t") fo... |
0032f57da152d8ae4b2104ceb4222c500bd71173 | 420511358a18b44d23f8b359d8088f49cc64b7ef | /0702-Django进阶/up2u_bbs1/bbs/models.py | a37496ffd458600f2772d6c530b7be82aad226f7 | [] | no_license | fudamai/classwork | cd3dc9d92bd3b564ea908c99096991382ad4d0b1 | 9a0f10493406d4e6f5525ecc6d618035d5022f7b | refs/heads/master | 2023-01-29T17:26:20.101070 | 2020-12-20T21:38:07 | 2020-12-20T21:38:07 | 233,212,157 | 0 | 0 | null | 2022-12-13T07:20:39 | 2020-01-11T10:11:38 | JavaScript | UTF-8 | Python | false | false | 1,082 | py | models.py | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Topic(models.Model):
# TODO:修改为BBS 样式的类名
# author = models.CharField(max_length=50, default='fubai')
author = models.ForeignKey(User, default=1 , on_delete=models.CASCADE)
topic_text = models.CharF... |
6c86180b1df9eaf121ab7ad9966c05bff5498a73 | 4b835aac7f4971251f41bde4cc21bd7129445c4c | /preprocessing.py | 14c8784e0f9447418d0720be4c83150023f4f848 | [] | no_license | silviutroscot/CodeSLAM | 13f905a64feb300f1eac0932fa35d74e6c638121 | 0abdb2adf9d3fe6c82e2e666278e2a8fbd997a97 | refs/heads/master | 2023-08-09T04:52:21.112790 | 2022-08-25T08:23:00 | 2022-08-25T08:23:00 | 229,407,693 | 171 | 24 | null | 2023-07-23T00:58:23 | 2019-12-21T09:51:18 | Python | UTF-8 | Python | false | false | 6,322 | py | preprocessing.py | import glob
import multiprocessing as mp
import numpy as np
import os
from PIL import Image
import statistics
import sys
TRAINING_SET_PATH = 'data/train/'
DATASET_SUBFOLDERS = range(0, 15)
IMAGE_NEW_WIDTH = 256
IMAGE_NEW_HEIGHT = 192
def create_intensity_images_from_rgb_images_folder(path, subfolder):
print("cre... |
f5bd5b8e95f79e69924f42db6cfbe6efacbd6d2f | 0da1b49f788f5f3c3b1f75bccd8565360f9154a9 | /codeforces/118/A.py | f35518800e0cd3e9ac0339542343c02952934a55 | [
"MIT"
] | permissive | jvrmaia/coding4fun | ea5ff54dbda713dc0deaef158863a55850352882 | 3e4ab5c50e055d7c41436f87ffc8493de8bb2b15 | refs/heads/main | 2023-03-16T05:02:59.509191 | 2021-02-27T19:28:20 | 2021-02-27T19:28:20 | 45,149,618 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | A.py | entrada = raw_input().lower()
consoantes = []
vogais = 0
for i in entrada:
if i == 'a' or i == 'e' or i == 'i' or i == 'o' or i == 'u' or i == 'y':
vogais += 1
else:
consoantes.append(i)
if len(consoantes) == 0:
print '.'
else:
saida = ".".join(consoantes)
print "." + saida
|
ca46a0a487f34ba7b3391a8af55f22bc37f93898 | cdd080ea0b5ead6756c2ce44e789a5bcb506fc79 | /preprocess.py | e5617615f5629584508648cc0c6e4f5d13ff54ae | [
"Apache-2.0"
] | permissive | gouchengcheng/baselinepp | e00833cbb06522b07b608622cd2b2f26d8cd9dfb | ab36422830c245d5dd47f377a695f7159c954e73 | refs/heads/master | 2016-08-11T02:34:48.825237 | 2015-11-22T09:30:22 | 2015-11-22T09:30:22 | 46,653,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,802 | py | preprocess.py | import numpy as np
import random
import cPickle as pickle
class ProData(object):
def __init__(self):
pass
def transtf2(self,tl):
if len(tl) == 0:
return
tf = [0]
ori = 0
for i in xrange(len(tl)):
if i == 0:
ori = int(tl[i])
... |
a2c6aae810131b979057bef6087b6df2dbe69aab | 7033cddb34b089b1e1230094869f9be851084991 | /Pokemon/sandbox.py | 889f54cbc20327f51930a9cd4638a4edded7072f | [] | no_license | vishalb12/Pokemon-Lite | be2b0dcd03f1c6c240f916b34fe7adcbbaf45ce3 | 48165c17124ed604b1c818c51b2686cab0d4d230 | refs/heads/master | 2020-03-24T03:01:04.031807 | 2018-07-26T07:46:39 | 2018-07-26T07:46:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | sandbox.py | statNames = list(reversed(["HP: ","Atk: ", "Def: ", "Sp.Atk: ","Sp.Def: ", "Spd: "]))
print (statNames) |
3d52b0e85403229b9037c84c87a23404a8194c19 | abc3bb5e3152188b65ae41c49aad8184006dbbc8 | /paradise/Maybe.py | ca3a31b135aead4ee644a4e29ef69007e2848d61 | [] | no_license | anthonyshull/paradise | b37aadab8472ba49b4fb0fab60480b26c48a3b77 | a15b731c9fe009d5a0a11d98c09fc6f06024183d | refs/heads/master | 2020-03-26T10:01:33.325714 | 2018-09-24T11:04:04 | 2018-09-24T11:04:04 | 144,777,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | Maybe.py | from .monad import Monad
class Maybe(Monad):
def fmap(self, fn):
if self.is_nothing():
return Nothing()
else:
return Just(self.fmap(fn))
def join(self):
if self.is_nothing():
return Nothing()
else:
return self.value
def is_nothing(self):
if self.value is None:
... |
22b308c78b0860516e61af98ff3d44d2e5c97406 | b0d1bf774f4d41a5f8763490f61638816d035d61 | /app.py | e8fa21d7c926e96684ca0478c0fe16982b247136 | [] | no_license | Da-Huang/my-address-lookup | c4049ecdd9b42888d1e411e2ade08502c946f543 | 972bfc2d8c064869bfea03798f1017f6c56673eb | refs/heads/master | 2021-01-19T16:33:23.998601 | 2014-11-26T08:05:01 | 2014-11-26T08:05:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,019 | py | app.py | #coding: utf8
import webapp2, logging
from google.appengine.ext import db
PAGE_TEMPLATE = """\
<html><body>
<h1>達さんの%sは<a href=//%s>%s</a>です。</h1>
</body></html>
"""
ERROR_PAGE_TEMPLATE = """\
<html><body>
<h1>%s</h1>
</body></html>
"""
class Fetch(webapp2.RequestHandler):
def get(self):
address_query = Addres... |
4c3975ed12d5f69203caae4a959fe0265fb1b492 | af62691ec60b4806a93d100e5db45bc15914efcf | /setup.py | eb44250e60c87d70ab06d6d53ea6da463e619c93 | [
"MIT"
] | permissive | HudsonHuang/yata | 36da89fefac0be187f93bc573b2c783e8458733d | b024aea238fdf467fad7f06f245b24c2ea6770e4 | refs/heads/master | 2022-10-28T05:43:13.096317 | 2022-10-13T15:05:10 | 2022-10-13T15:05:10 | 241,644,772 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,578 | py | setup.py | from setuptools import setup, find_packages
import imp
version = imp.load_source('yata.version', 'yata/version.py')
description='Yet Another Tools for Audio deep learning'
with open('README.md') as file:
long_description = file.read()
def _requires_from_file(filename):
return open(filename).read().splitline... |
9931fc25118981bcce80cffd3fda9dc99d951bf5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03393/s938542133.py | 89573e91a68bda9c4eeb1c1ca62225cec0bf2d05 | [] | 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 | 426 | py | s938542133.py | s = input()
if len(s) < 26:
for i in range(26):
c = chr(ord("a")+i)
if c not in s:
print(s+c)
exit()
else:
for i in reversed(range(1,26)):
if s[i-1] < s[i]:
s1 = s[0:i-1]
for j in range(26):
c = chr(ord("a")+j)
... |
e30bd33ae18881307e7cf4f60d3c60eae91573bc | d7bc3c105072a2259c73b54f3764001f7df92ef1 | /src/sofa/conventions/MultiSpeakerBRIR.py | 2ceb31a4f6147f5c7b663a8d1c6777c205fe087c | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | mberz/python-sofa | 8274c0e079749252a46aef49dae63dc3b873a367 | 739d49194575aa73a075b66124949223ea87c39a | refs/heads/master | 2022-04-05T12:06:24.617828 | 2020-03-03T14:49:06 | 2020-03-03T14:49:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,092 | py | MultiSpeakerBRIR.py | # Copyright (c) 2019 Jannika Lossner
#
# 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, dis... |
ba8b46f830abaaaedf1730cba2f04fd677f11da4 | 3040abc561ae21f54818436cba033c4e6055f2ff | /src/main/python/yamlreader/logging.py | de9b3f877ca421143aa1b49874617d65ccab8b0f | [
"Apache-2.0"
] | permissive | tb3088/yamlreader | 561dd45aa609a307998d72edd638bd1a8e9ef6db | 7cef3b5d9a398822af3e9bae92577c3366ef595d | refs/heads/master | 2021-01-21T12:31:52.168760 | 2018-03-19T21:29:24 | 2018-03-19T21:29:24 | 102,082,661 | 0 | 1 | null | 2017-09-01T06:48:27 | 2017-09-01T06:48:27 | null | UTF-8 | Python | false | false | 4,973 | py | logging.py | # -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, unicode_literals, division
__all__ = ['getLevelName', 'getLevel'] #, 'getLevelOrName', '_checkLevel']
import logging
# private re-implementations till Python Core fixes Lib/logging
# XXX bug numbers here
def getLevelName(level, format='... |
88c304f224ab60062582abbfa1146a651e1233e6 | f21814f3b4c8217e830af48b427de0b24dc398d4 | /missing_value_count_and_percent.py | aed47ea11574bbab9b091a7ff7b5448c8d28d997 | [] | no_license | CaraFJ/Utility | 2d1dbc3f09c33d9d92bf1e602f1a01b0f3ba656e | f032e6b376d65a05fe9d25fca31794c1302ec7ed | refs/heads/master | 2021-09-08T16:47:26.173366 | 2021-09-08T04:51:04 | 2021-09-08T04:52:05 | 248,438,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | missing_value_count_and_percent.py | def missing_value_count_and_percent(df):
"""
Return the number and percent of missing values for each column.
Args:
df (Dataframe): A dataframe with many columns
Return:
df (Dataframe): A dataframe with one column showing number of missing values, one column showing percentage of ... |
e5d31a2ea4a8615d24626be2414f5ae49b9cd6a1 | 096be495ae3e995d884f6154c0e5a00348e49d1d | /common-problems-leetcode/medium/maximal-square.py | 167cff8deffc2256f110fe01c4259043fcf5d54c | [] | no_license | JackMGrundy/coding-challenges | b81828efd580934226931735949c1fba1151dfac | 0ef3ef71d75ea20cd3079ad6aa3211f61efb7b7a | refs/heads/master | 2022-12-04T11:28:27.247546 | 2022-11-28T01:57:21 | 2022-11-28T01:57:21 | 163,903,589 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,255 | py | maximal-square.py | """
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
Example:
Input:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
Output: 4
"""
# 196ms. 98 percentile
class Solution:
def maximalSquare(self, matrix: List[List[str]]) -> int:
if not matrix:
... |
7e2bf898eb1c0118205042797e6dac535342979b | ac0cd94efcd05ed0b77a06d8737d3802494e68d5 | /src/main.py | 31dfbd81c4ea09683a20e419c28d41c888468a80 | [] | no_license | SimonMaracine/Counter | a52d7e04fdfeef9a4f0e12944cbbae7d18620885 | 2f8812339050c4001fcf0f64061eaab61f6fecf2 | refs/heads/master | 2022-11-19T10:07:26.548748 | 2020-07-23T08:34:52 | 2020-07-23T08:34:52 | 276,737,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,064 | py | main.py | import os
import tkinter as tk
from tkinter import messagebox
from os.path import join
from pynput import keyboard
from src.save_count import SaveCount
class MainApplication(tk.Frame):
def __init__(self, root: tk.Tk):
super().__init__(root)
self.root = root
self.pack(padx=32, pady=32, e... |
f8601ed7ba7c2b8d2dd8d5f74f7b5ae8e99dad78 | bb093e7b5ee05f0a945d40a5ba1ea21887dac6a3 | /Computation/lambda.py | 0814f6a87d0fd096f507d79408fe6dedad9e11ea | [] | no_license | chasingSublimity/destroy-all-software | bcd78bfbd62a3d47868741ab96323479a8832916 | 3c9b26c3d1c212b222a95153cc520b0acfc1615e | refs/heads/master | 2020-03-27T23:55:13.202249 | 2018-09-12T15:09:22 | 2018-09-12T15:09:22 | 147,358,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | lambda.py | IS_ZERO = lambda x: x == 0
ONE = 1
SUB1 = lambda x: x - 1
MULT = lambda x: lambda y: x * y
IF = lambda cond: lambda t_func: lambda f_func: t_func(None) if cond else f_func(None)
print(
(
lambda myself: (
lambda n: (
IF(
IS_ZERO(n)
)(
... |
8e854398084e89b0b8436d6b0a2bf8f36a9c7bd5 | 78222ce29316417c94e422d6bcd556c1f9826ef9 | /network_simulator/test/service/test_networkSimulatorService.py | 3d69f89a8f55ae005c76ab108da4ba1d52fc8f9e | [] | no_license | mLe110/network-simulator | 35372e2b2ade39d5f567d3f161f8665a5a8cdb74 | 7245cd1dfd10856db9c35fd35afd968a990b560e | refs/heads/master | 2022-04-12T17:29:13.599374 | 2020-04-06T22:02:21 | 2020-04-06T22:02:21 | 228,492,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,218 | py | test_networkSimulatorService.py | from unittest import TestCase
from unittest.mock import patch, mock_open, call
from network_simulator.exceptions.device_exceptions import DeviceAlreadyRegisteredException, UnknownDeviceException
from network_simulator.service import NetworkSimulatorService
from network_simulator.service.network_simulator_service impor... |
fcd3e4c0d42649833e6c5ff6414c993654691d16 | 42f7487ebb78d2ef870b39a32816a0e9e718aa72 | /product/admin.py | a870f23ed8a49e08a5ca6e5e5c3fdd488cd89ebe | [] | no_license | w3kernel/sokalbikal | 83112457f2f974a693ac98c31ed2acd958646c5d | 72d2856e76998653e73c6aff17833446a019d1d8 | refs/heads/master | 2023-02-04T05:52:34.934714 | 2020-12-24T10:59:11 | 2020-12-24T10:59:11 | 295,072,789 | 0 | 0 | null | 2020-09-22T11:28:52 | 2020-09-13T03:47:05 | JavaScript | UTF-8 | Python | false | false | 248 | py | admin.py | from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from product.models import Item,Product,Category
# Register your models here.
admin.site.register(Category,MPTTModelAdmin)
admin.site.register(Item)
admin.site.register(Product) |
565888d771f53934805555390e48d4886a43bdb6 | 6d162c19c9f1dc1d03f330cad63d0dcde1df082d | /util/test/tests/D3D12/D3D12_Resource_Mapping_Zoo.py | dc63ac99b73c92f0c0473ed033f1514f985ba004 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"CC-BY-3.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | baldurk/renderdoc | 24efbb84446a9d443bb9350013f3bfab9e9c5923 | a214ffcaf38bf5319b2b23d3d014cf3772cda3c6 | refs/heads/v1.x | 2023-08-16T21:20:43.886587 | 2023-07-28T22:34:10 | 2023-08-15T09:09:40 | 17,253,131 | 7,729 | 1,358 | MIT | 2023-09-13T09:36:53 | 2014-02-27T15:16:30 | C++ | UTF-8 | Python | false | false | 3,083 | py | D3D12_Resource_Mapping_Zoo.py | import renderdoc as rd
from typing import List
import rdtest
class D3D12_Resource_Mapping_Zoo(rdtest.TestCase):
demos_test_name = 'D3D12_Resource_Mapping_Zoo'
def test_debug_pixel(self, x, y, test_name):
pipe: rd.PipeState = self.controller.GetPipelineState()
if not pipe.GetShaderReflection(... |
22127b5503e0f55e823dba57464861f529417433 | b9c7ec11478f1fe5d41fa7b8da094286cb04a9bb | /eq/grid_sample/torch/nearest.py | 088fbd6c99e7ac1ac14df3a0f6edbcb25de48f98 | [] | no_license | viacheslav-m/codeheap | cbff698d2f28827d318e8fb729e28a4927af6d1d | 6ce469496b1f37dd86c1e9f6195397e217e64931 | refs/heads/main | 2023-08-24T10:00:46.800335 | 2021-10-28T22:41:23 | 2021-10-28T22:41:23 | 403,634,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | nearest.py | #!/usr/bin/env python3
import torch
__all__ = ["nearest"]
def nearest(
img: torch.Tensor,
grid: torch.Tensor,
out: torch.Tensor,
) -> torch.Tensor:
"""Nearest Neighbor Interpolation
Merit of using this nearest instead is that the grid doesn't need to be a
cuda tensor. Although it is a littl... |
518c93e8c5e2f28209490a750b402f2c08090e1f | 42ceaf7a0d7369e37872cd095b71e1c3b8a6640f | /testcases/deviceadministration/6_1_device_admin_tapjacking_test.py | 79bdd7997c6c6d3ea74d11c9b1b2a9c9b0356e02 | [
"MIT"
] | permissive | super-ply/cts-cerifier | b3ddad3676c77d0d52f4ed22217a4dc34955d420 | 7e0f3f5f0df39533fbabd86554c421ac5f8cf29b | refs/heads/master | 2023-06-26T07:01:44.458896 | 2021-07-27T03:43:42 | 2021-07-27T03:43:42 | 389,814,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,218 | py | 6_1_device_admin_tapjacking_test.py | # -*- coding: utf-8 -*-
# ---
# @Institution: Automation,T&E,Turing,HQ
# @Time: 2021/4/23
# @File: 6_1_device_admin_tapjacking_test.py
# @Author: Restrain
# @E-mail: qiangzhongzhi@huaqin.com
# @Desc: Function of this file
# @update: Record important updates
# ---
import os
import sys
curPath = os.path.abspath(os.path.... |
e46b97513124c76142042d3aa7c5c07772e652fe | 7b3051698bd44484a7bf0037e0a730c23e7e4a1a | /0x04-python-more_data_structures/102-complex_delete.py | a4b312b277a1d3685a106f42379c017c5b065420 | [] | no_license | VieetBubbles/holbertonschool-higher_level_programming | f5868c54a6b0f02ade7bb1e2997fc9f66771c7c0 | d0efcaa632f78eaf7be7dae28c32d1cf4656b697 | refs/heads/master | 2020-05-17T23:25:01.984663 | 2019-09-25T05:35:43 | 2019-09-25T05:35:43 | 184,031,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | 102-complex_delete.py | #!/usr/bin/python3
def complex_delete(a_dictionary, value):
new_dict = a_dictionary.copy()
for key, num in new_dict.items():
if num == value:
del a_dictionary[key]
return a_dictionary
|
d67c5abbb8a4a59a69635c4a4f6a9b7aa3a12c21 | d3c92e180137b9dfac25d14e600f29e4671431a3 | /code/graphsched.py | 67c65d98309f13a558b83aaa74117ff12a0bb33b | [] | no_license | tonchis/simulsched | dd3eac3f20c54f03273395955484a4790447fee8 | 125bbadb8d4e857e38301b9687f7239d21ba2302 | refs/heads/master | 2016-09-06T13:11:15.926458 | 2015-09-04T18:13:31 | 2015-09-04T18:13:31 | 2,269,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,503 | py | graphsched.py | #!/usr/bin/python
# coding: utf-8
import re, sys, os
from PIL import Image, ImageDraw, ImageFont
FONT_NAME = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" ##"LucidaSansRegular.ttf"
CMDS = ['LOAD', 'CPU', 'BLOCK', 'UNBLOCK', 'EXIT']
LOAD, CPU, BLOCK, UNBLOCK, EXIT = range(5)
COLOR_GRAY = ('#a0a0a0', '#d0d0d0... |
7de0318fe3440799443c533d9e78475743fb860d | 53680366b4009b9f8c1287b526eeecdc4f4926f7 | /lab_solutions/lab02_04_char_freq.py | 31fbc70519fbeedc2c9a729fd399273c05accc98 | [
"MIT"
] | permissive | bana513/python_nlp_2020_fall | b6907d8c5be5192e68fd8b02a7937605f03a87fc | 868a0103c3513de6c3519c5f54ba23770165e571 | refs/heads/master | 2022-12-25T02:01:32.490136 | 2020-09-29T10:41:05 | 2020-09-29T10:41:05 | 299,263,566 | 0 | 0 | MIT | 2020-09-28T09:50:49 | 2020-09-28T09:50:49 | null | UTF-8 | Python | false | false | 520 | py | lab02_04_char_freq.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2020 Attila Nagy <attila.nagy234@gmail.com>
#
# Distributed under terms of the MIT license.
def char_freq(s):
frequencies = {}
for char in s:
if char not in frequencies:
frequencies[char] = 1
else:
frequenci... |
dab0718d0dd16dd488caece0a215b6f40b1a7f43 | 0671b7415296278d50bd942c83535f25fcc88288 | /car_mid/model/test.py | 9ba6a3a27b7129a10eef01909c962197ad9dc43e | [] | no_license | liuzhaoo/car_brand | a68466393f9f03bc11507b80db6e21e9bbfaa554 | fe94db02cfee9965aeba4471d3554c4b9db24d41 | refs/heads/master | 2023-05-25T03:12:20.881350 | 2021-06-07T10:37:01 | 2021-06-07T10:37:01 | 365,904,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | test.py | # from resnet import resnet18
# import torch
# from thop import profile
# # 增加可读性
# from thop import clever_format
# inputs = torch.rand(1,3,240, 240)
# model = resnet18(num_classes=27249)
# flops, params = profile(model, inputs=(inputs, ))
# flops, params = clever_format([flops, params], "%.3f")
# print('flops:', f... |
f48d830cc738e2f51e1f7574347da556a53004e6 | 402aca381f9911da75a0097970decb601fa352ab | /biale_znaki.py | dc3107478ea7afe82153a6b54337f1f6a758e70e | [] | no_license | Dzm1992/learning_python_variables | c81c45a844333c581818b4af39d61944e2319954 | 295a2cd3b41cfa905d5b0b2b3ac8d1ca48157cc6 | refs/heads/master | 2021-01-05T09:51:22.486921 | 2020-02-16T23:53:01 | 2020-02-16T23:53:01 | 240,981,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | biale_znaki.py | Imie = " \t\n Damian "
print(Imie)
print(Imie.lstrip())
print(Imie.rstrip())
print(Imie.strip())
#lalalala
|
f946d7303704a68a17dae4cd695c4fc0bbc677b3 | 781630799790b04afc0419403597d1bdd2275094 | /Code/Unique Binary Search Trees-ii.py | 2a25683e530aee22b3355ef90e742988d8dc3a09 | [] | no_license | zolars/LeetCode-Solution | e36e1c2aefc4196d8458a842d241822cc6f53b92 | 030f2d48d20341a16f6ca57715ff1f06a59a20ec | refs/heads/master | 2021-01-20T06:07:43.737599 | 2018-07-06T12:24:39 | 2018-07-06T12:24:39 | 101,485,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | Unique Binary Search Trees-ii.py | # Unique Binary Search Trees-ii
# Definition for a binary tree node
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def __repr__(self):
if self:
serial = []
queue = [self]
while queue:
... |
2e3a6f22517a771f271411bba1b583b5f907620d | 4ce83159b74ac9a756486189c4d21ef8d8146605 | /flaskr/functions/Tokens.py | 8cc888a0bf431e8c652ff1362a70afa1aacdb79a | [] | no_license | samjones310/docker | 1f304988c46c1fc7ce41f7f2e01b87909064f7de | 6e1ac8ddc0c1b38c75b8919b63adbb42af305460 | refs/heads/master | 2023-02-08T12:45:10.652161 | 2019-12-13T16:16:41 | 2019-12-13T16:16:41 | 227,877,255 | 0 | 0 | null | 2023-02-02T06:42:02 | 2019-12-13T16:15:28 | HTML | UTF-8 | Python | false | false | 252 | py | Tokens.py | CONSUMER_KEY = "GSl25oU8bWjtcctPVf0ZaDGqD"
CONSUMER_SECRET = "pxuBCGgYqEe4BTmGTBBuWYyEYuUqTbjOLPyixDWNUbZ5MgqJYk"
ACCESS_TOKEN = "1090268805027119107-cJQn3oXyLCI8FtwSBJJ9sWHdN9hCyi"
ACCESS_TOKEN_SECRET = "Q8M3FbiyXV0sGAEzOP2lEaEqCAH1s6sEOVkAaNjRuBeFk"
|
b2796b04bf22ed0482b927a202b08b2aed4b1a0c | 27ad39c380206eaa84f0edb63c924617b5351e52 | /smoothtest/webunittest/tests/test_WebdriverUtils_Url.py | 50d932d18717644eafdabc8c8ac0bc387733c589 | [
"MIT"
] | permissive | joaduo/smoothtest | a243d544769f7236f359bb1e141a0e29ad0a43c5 | 6b471f9584c58ac31c29cbb8b7a3d5e6c616be26 | refs/heads/master | 2021-01-17T08:02:11.195923 | 2020-11-29T12:08:57 | 2020-11-29T12:08:57 | 23,721,524 | 0 | 1 | null | 2015-05-28T02:56:22 | 2014-09-05T23:30:44 | Python | UTF-8 | Python | false | false | 390 | py | test_WebdriverUtils_Url.py | '''
'''
import unittest
from smoothtest.webunittest.WebdriverUtils import Url
class TestWebdriverUtilsUrl(unittest.TestCase):
def test_urls(self):
u = u'https://www.google.cl/?gfe_rd=cr&ei=ix0kVfH8M9PgwASPoIFo&gws_rd=ssl'
self.assertAlmostEqual(Url(u).get_path_and_on(), '/?gfe_rd=cr&ei=ix0kVfH8M9Pg... |