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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bed212a7399296be33c5b5f590c67c6a903913fe | d3d849f9ca35abe4b213618a552236706725eb5a | /config.py | 6a150a9b826fffb3c992206b95dbd7711661402a | [] | no_license | ayoungdahl/RestaurantBlog | 377c4d0df4f81255b9651bcb1bf6b31cb54fa92a | 4b7e6acefbcb9bf2052f89e30d226fc6f69a3255 | refs/heads/master | 2020-07-31T15:14:30.309179 | 2019-09-28T16:02:15 | 2019-09-28T16:02:15 | 210,647,120 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | config.py | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config():
dflt_restaurant_db = 'sqlite:///' + os.path.join(basedir, 'restaurant_db.sqlite')
SQLALCHEMY_DATABASE_URI = os.environ.get('RESTAURANT_DB_URI') or dflt_restaurant_db
SQLALCHEMY_TRACK_MODIFICATIONS = False |
eca11412e2e0beb3ed70ae25f77b7aec267f446b | 3f4ef121ac03c1c5446fb1c2dc7f3cd3e92f95a2 | /scripts/split_utt.py | b2a9d5137347eeb10c8dfcf53d559c3997865e4c | [
"MIT"
] | permissive | ishine/RPNSD | 4c527c5ece8357c87564b97b27516a9c30b0b2ac | 9b6e0b66110185180b29393b6e2e785cd909bf34 | refs/heads/master | 2021-01-06T23:36:51.488873 | 2020-04-23T08:15:14 | 2020-04-23T08:15:14 | 241,514,884 | 0 | 0 | MIT | 2020-04-23T08:15:15 | 2020-02-19T02:30:42 | null | UTF-8 | Python | false | false | 5,284 | py | split_utt.py | #!/usr/bin/env python3
# This script splits long utterances into short segments
# making it more convenient for data loading
import os
import sys
import numpy as np
import subprocess
import argparse
parser = argparse.ArgumentParser("Splits long utterances into short segments")
parser.add_argument('src_dir', type=str... |
af6ef92226391650531fcfcf09088506f1e1f9b3 | 9646b0e8ca14e6dc8aee12582111178cecbfc83f | /basic_programs/fibonacci_using_DP.py | 3f5bec592f125587666927bd962091a611f212b5 | [] | no_license | HarshitaSing/Discovering_Python | c4ff4216c3eebcb6f642e9c889d836ea1bb89919 | cc42ed669e2c57c00c10270817831543a1ae3084 | refs/heads/main | 2023-08-02T12:01:02.222761 | 2021-09-25T14:23:49 | 2021-09-25T14:23:49 | 367,881,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | fibonacci_using_DP.py | #Python Program for n-th Fibonacci number
def fibonacci(n):
a,b = 0,1
if n == 0:
return a
if n == 1:
return b;
else:
for i in range(2,n+1):
fibo = a+b
a = b
b = fibo
return b
val = fibonacci(6)
print (val)
|
d1831e2c2852e4e828d33a26e706b42bfd738b1a | d0efbc5c44823e0abe144fe05e86b621198d5d79 | /module03/ex02/ScrapBooker.py | 49e1113c517f05ca9aa1dc3d79157cdb54fa7970 | [] | no_license | yanis-fourel/42ai-bootcamp-python | a7b1e4ac9fcc3b1b3fff327bbc31f0396c4118e0 | 1e0eec6089c4540f90d2a6917afb01ac5543dbd1 | refs/heads/main | 2023-08-04T18:35:35.381487 | 2021-08-12T10:14:09 | 2021-08-12T10:14:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,282 | py | ScrapBooker.py | import numpy as np
class ScrapBooker:
def crop(array, dimensions, position = (0, 0)):
newsize = tuple(x - y for x, y in zip(array.shape, position))
if any(x <= 0 for x in newsize):
raise Exception("Position out of bounds")
if any(x > y for x, y in zip(dimensions, new... |
ca45558aaf56f107a50cec1dcac93e28abe891db | 5142dda1f886aa972a5c6df79881221ce3f0ce63 | /CA4/CA4_simple_test.py | 0d8abee5c50d38f8554f41ad29d0bf249aa99d81 | [] | no_license | 10354795/programming_for_big_data_10354795 | a8b37bb94d6d4202eb3c8cfe41170497d74615ee | a472b70f4bfc62f40fd38b0e2f1c87dad5084d8c | refs/heads/master | 2021-01-19T06:23:45.504490 | 2017-05-18T19:56:07 | 2017-05-18T19:56:07 | 87,459,893 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,990 | py | CA4_simple_test.py | # Thomas O'Brien ID 10354795
# Program to test the funtions that extracts data from a log file of support calls.
import unittest
# import the funtions from the commits program in CA4_simple.py
from CA4_simple import get_authors, get_commits, get_number_of_1_comment_lines, get_number_of_4_comment_lines, read_file
... |
fdc54de3b8385872a2cbd36bb523ee83bebc9e61 | 3daeeb1336dce317e3f0012476ec5d6a4b4b50ea | /fns.py | 554dd0d866209910b8efa38a54eebd248eb89d17 | [] | no_license | NEONGASHMEN/G-SIM | 9662fa06886d62af6608a12415caf88cc5dcd2e9 | 5674c16054936b254c0da69b2e5965a85d73f264 | refs/heads/master | 2023-08-26T06:05:04.929825 | 2021-10-11T07:11:05 | 2021-10-11T07:11:05 | 397,301,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,735 | py | fns.py | import math
import cnsts
import numpy as np
import linecache
from vpython import vector
def velocityMod(rMod,a):
return math.sqrt(cnsts.muEarth*((2/rMod) - (1/a)))
def norm(vctr):
rtn = math.sqrt(vctr[0]**2 + vctr[1]**2 + vctr[2]**2)
return rtn
def prop(state):
r = [state[0],state[1],state[2]]
rMod = norm(r)
r... |
0e99b650b5d8b4d90fc468cde75e699ea28e3b75 | e5be5fed8b36af8361a66ff5e152ad7553a4b729 | /main_program.py | 048f0b363b81997ee6801533c586c3e5090e5a2d | [] | no_license | bertwang95/smooth | fcf49565784ca0aa8f62e2a4c52958f84d7fe420 | f0000374156b22d0e2deb0fb08dac213783b5e74 | refs/heads/master | 2020-06-29T03:48:09.748372 | 2019-08-04T00:10:55 | 2019-08-04T00:10:55 | 200,431,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,465 | py | main_program.py | '''
@author: Guanqi Wang
@summary: the main program of the smooth program
'''
import numpy as np
import get_slice as gs
import open_pgm as op
import weight as we
import matplotlib.pyplot as plt
import find_median as fd
import weight_median_filter as wmf
import combine as cb
def main():
a = int(input('the begin pgm ... |
d0fee6df6f8360fd461d1a883c29c8f2c3bc4f5e | 5f04bceb5dcbba9c8872bb5fdaf5b75a48b48189 | /Natural Selection/SOLVER/Heck-Me.py | ebf80e08294f61ecefba669ab12391aed126a379 | [
"MIT"
] | permissive | bemrdo/CTF-2019 | 2da5e7fb5f2c9c77ba27ce21523ce2db8335ce9b | 424512f7c43278d72091aa737da78907c14f9fc1 | refs/heads/master | 2020-04-17T00:08:57.921749 | 2019-12-30T20:20:01 | 2019-12-30T20:20:01 | 166,038,900 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | Heck-Me.py | import binascii
enc = open('flag.enc','r').read()
print (binascii.unhexlify(enc)) |
642e3d4f97ae0a8d83931947df444b129e9fa2bd | e01aabc5c266b082e825eb0e4c5127e556dab3e6 | /lib/framework/py_version_func.py | f119756983fd35c99df6bfab5133c03d4daf04db | [] | no_license | ucomas7/SJVA3 | 54ffef3014de3ecdb44b4dd9e1ee21927083cd5c | 3da0e3c4133c4df0583c03340e3566828da1979a | refs/heads/main | 2023-04-04T13:53:15.876318 | 2021-04-21T08:06:16 | 2021-04-21T08:06:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | py_version_func.py | # -*- coding: utf-8 -*-
import sys
if sys.version_info[0] == 2:
import Queue as py_queue
import urllib2 as py_urllib2 #Request, urlopen
import urllib as py_urllib #quote, unuote, urlencode
py_reload = reload
def py_unicode(v):
return unicode(v)
else:
import queue as py_queue... |
6e4a7c586e2abce6cf55ef450250f067a5fc3163 | d77764a5c585e1e127cdd0b298ac0f277277ab7f | /networks/zeoliteDNN.py | d54e3547fa37aa2cd1e497db5e6ee66c5ea51173 | [] | no_license | samuelhoover/chan-ml | 0e760df01cef8bb2316796605485215e2bcfca2a | b8844ef925c3828c2fc20734b7472f1d914f56e0 | refs/heads/master | 2023-06-08T18:15:47.126795 | 2023-05-25T23:33:22 | 2023-05-25T23:33:22 | 329,745,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,803 | py | zeoliteDNN.py | import torch.nn as nn
from utils.ops import Swish, LearnedSwish
class LongNet_V1(nn.Module):
def __init__(self):
super(LongNet_V1, self).__init__()
self.regressor = nn.Sequential(
nn.Linear(11, 20),
Swish(),
nn.Linear(20, 20),
Swish(),
... |
02a14ca8626aa4f39199b4b84518de6eba084b7a | 864db6b625dc4ba1f698805ba8ec1915194b5e65 | /python-lists.py | 4ad6c8a23010020006c9142ab7f3b862cd13aa88 | [] | no_license | quachio/Python-Fundamental | 91b49b49e92637ea3a23d52d7e488646e72a04f9 | acca4a17dbafb6967ed56f50292f9d240936e8ac | refs/heads/master | 2020-12-04T08:52:18.792086 | 2016-09-07T15:44:22 | 2016-09-07T15:44:22 | 67,620,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,211 | py | python-lists.py | ninjas = ['Rozen', 'KB', 'Oliver']
my_list = ['4', ['list', 'in', 'a', 'list'], 987]
empty_list = []
fruits = ['apple', 'banana', 'orange', 'strawberry']
vegetables = ['lettuce', 'cucumber', 'carrots']
fruits_and_vegetables = fruits + vegetables
print(fruits_and_vegetables)
salad = 3 * vegetables
print(salad)
# Acce... |
aef91a4e6f99b8515a2dfc417281d5505a8cade8 | 1a0436f69b813dfc0344bbb5f790092bee08aa34 | /中文文档测试.py | f5f8ec0330fbb41828f525afa35dddedb092e2cd | [] | no_license | finesunny/gitlearning | 094c298ab9b736f3f8d488c6bbac4e6d06040f13 | 9466e958cbfb14cd14b72cf99269c0ed34258573 | refs/heads/master | 2020-03-25T21:23:55.968844 | 2018-08-09T15:51:06 | 2018-08-09T15:51:06 | 144,173,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22 | py | 中文文档测试.py | print("中文文档")
|
5670c59010af79754f2d4ecbab32c2677bc5c99e | 1ecc41da4c18aee18f4e42873e5f5a692f512ccd | /hiob/hiob_gui.py | a0d992d4ec52dcddd91f388b7e6d2e73b8d38a33 | [] | no_license | kratenko/HIOB-stale | 368f145d71ed8095aa5c61945391f8a7c313ee1e | ad795dbef24ebb365f011cb95426abadc7586f02 | refs/heads/master | 2021-09-24T01:44:09.197401 | 2018-04-23T20:50:28 | 2018-04-23T20:50:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,290 | py | hiob_gui.py | import logging
import transitions
from PIL import ImageTk, Image
import queue
import threading
import argparse
import collections
from PIL.ImageDraw import Draw
# Set up logging
logging.getLogger().setLevel(logging.INFO)
transitions.logger.setLevel(logging.WARN)
logger = logging.getLogger(__name__)
import tkinter as... |
4d8705712af083627ceb0fa735aef720420690ee | 91b81acba1741d27c9d48dcf1580ad2a86523615 | /review.py | 07223d034486fd960041a0a63bf1df8b1c87ecc9 | [
"MIT"
] | permissive | bradleyhd/pydup | 0965e2e84e8039a600f58f51386df549e8d7692b | 73f519ea531d63d6041aa87fe7ca60c315a3eea2 | refs/heads/master | 2021-01-10T14:20:47.334274 | 2015-12-30T03:46:55 | 2015-12-30T03:46:55 | 48,764,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,234 | py | review.py | import pymongo
import argparse
import csv
from pymongo import MongoClient
parser = argparse.ArgumentParser()
parser.add_argument("--outfile", help="the name of the output file")
parser.add_argument("--minsize", help="exclude files smaller than minsize bytes", type=int)
parser.add_argument("--collection", help="the na... |
4e03b6207365dd1168428c928757505bfb83daf2 | 2d384a0abf19939801515e75fb7856c9b4390f8d | /plotCa.py | 9b34b57ca0d2d66528fe6efe75bd19151a0127c9 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | SMPugliese/hnn_calcium | dac01b61052c974b0dd97a3906e8bd09f646b530 | 4555f8390906876f7c4720ad235db72c4667b5e4 | refs/heads/master | 2023-05-01T23:03:44.383484 | 2021-05-08T03:38:10 | 2021-05-08T03:38:10 | 279,381,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,885 | py | plotCa.py | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import pickle
import numpy
import matplotlib.pyplot as plt
with open('/Users/sarahpugliese/hnn/data/ERPYes3Trials_ca_test/cai.pkl','rb') as cai:
caidata = pickle.load(cai)
cai.close()
#
# with open('/Users/sarahpugliese/hnn/data/... |
b8b19f01545a49a0efc0e6c41d36addc2fab1a69 | 8c08453486038201aa621cd74cf0afeacb03b890 | /src/errors.py | f5d41a4767f7e03bd0dac2d95e0521786f8b87cb | [
"MIT"
] | permissive | petercollingridge/markov-chain | b763d5c613bb3724acbf40e65e9678703b2a795b | 5f46b156a3ce22552ed14aefb00e4b040ec56be5 | refs/heads/master | 2022-08-20T10:17:52.486952 | 2020-03-03T13:00:49 | 2020-03-03T13:00:49 | 233,840,656 | 0 | 0 | MIT | 2022-06-22T00:52:00 | 2020-01-14T12:51:33 | Python | UTF-8 | Python | false | false | 258 | py | errors.py | class Error(Exception):
"""Base class for exceptions in this module."""
pass
class MarkovChainPropertyError(Error):
"""Exception raised for errors in a Markov chain's property."""
def __init__(self, message):
self.message = message
|
cdf76a788282e3c9b021daf7d07f0537e75eb3c9 | 1268ec7ab6918024a1c5e9960218aec706ae1434 | /processing/toJson.py | 299c37a9f5def6eb9c068b08fb1fcd7ed16994f6 | [
"Apache-2.0"
] | permissive | pointnb/ezytool | 6c5e6935e55daa78d8acd4850b87d27c30976022 | 2af02719b5d3300d4a079ae5c378278c5bf6f13c | refs/heads/master | 2021-04-29T02:40:15.118302 | 2017-01-04T14:38:09 | 2017-01-04T14:38:09 | 77,654,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py | toJson.py | import sys
fin = open(sys.argv[1], 'r')
fout = open(sys.argv[2], 'w')
_type = sys.argv[3]
while 1:
line = fin.readline()
if not line: break
if line[0] == '@': continue
data = line.replace('\n', '').split("@")
body = data[0]
year = data[1]
month = data[2]
indexStr = "{\"index\": {\"_index\": \"baseball\", \"... |
4413ba1685c643f8ff271755e7feaf159ffa01a4 | 1ee03b2bf3f35ccc346fb9b1e511995734ceed12 | /CH05-LogisR/logRegres.py | 13670314ee21a0ff9c1287c62c4126088a4492b2 | [] | no_license | SJTUwanglei/machinelearning_inaction | 02aa33dfe976fdae8c579a904709b934e35d9f03 | 25ada7730d8a6bb13ee8ff05ae82262413dc7f30 | refs/heads/master | 2021-05-12T10:02:19.750127 | 2019-08-18T14:38:59 | 2019-08-18T14:38:59 | 117,340,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,046 | py | logRegres.py | # -*- coding: utf-8 -*-
from numpy import *
def loadDataSet():
dataMat = []; labelMat = []
fr = open('testSet.txt') # 数据是x1,x2,类别0或1
for line in fr.readlines():
lineArr = line.strip().split()
dataMat.append([1.0, float(lineArr[0]), float(lineArr[1])]) # 将x0设为0
labelMa... |
36cfe26c0d06424dc4b3c1b1dbdc4383cef0c4a1 | 7e49aee03575fdf7151bed23090da3e76c1bb44a | /managedata/util/conectCogroo.py | 68207491882684f0d8218f6fc06ec21d7a454139 | [] | no_license | deslise/lise | 9655a0a1e6dfa3eadd2c8f98378c0bb2f856c03b | 9543924a0e329a60d1b88f55c7f223f6dca1f507 | refs/heads/master | 2021-09-01T19:10:20.629943 | 2017-12-28T10:51:14 | 2017-12-28T10:51:14 | 104,816,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 55 | py | conectCogroo.py | import os
os.system('java -jar ../util/cogroo4py.jar') |
928bb4021fa38707246e469fca47a4bdfc029b80 | 98d0893df45637eaaa034c7b00e19ceae464699c | /lectur/lectur_app/migrations/0003_comunidad_imagen.py | 4479451e0b88027caf93a53dc39bd31814a90736 | [] | no_license | Valentina0924/lectur | a3de7553901992a12f7fd9cca05fd231ab33a265 | 87f0e25d673a888d1818bd66f03c360dffb7096b | refs/heads/master | 2021-01-18T13:12:30.057769 | 2017-05-19T19:17:50 | 2017-05-19T19:17:50 | 80,735,742 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | 0003_comunidad_imagen.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-07 19:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lectur_app', '0002_auto_20170227_1451'),
]
operations = [
migrations.AddFie... |
776820168eb26a66adb90b329af210b56d7941c5 | ef6afec59d37248c44594a83b79d7c5e80d301c8 | /app/user/models.py | b4ca826542b0c2704257f3c339c4585a8958ecfc | [] | no_license | isaac152/APIHabitsTracker | 73ac2158f6da769f8e6380c58f9d6bd5375ec507 | 121c7cb9f5e70fe01781730de36774a23232cb3f | refs/heads/main | 2023-08-14T15:19:45.882067 | 2021-09-26T04:54:23 | 2021-09-26T04:54:23 | 406,528,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | models.py | from werkzeug.security import generate_password_hash, check_password_hash
class User:
username:str
name:str
password:str
def __init__(self,username,password,name=''):
self.username=username
self.name=name
self._password=password
self.set_password(password)
def set_p... |
ae64efc55bac669156c1c3943da0df6bf56143eb | 4dd92aba349874e36c7c645f6d714d63e311dc39 | /examples/smart_checkbutton.py | 774917ef6c2b34477ed41cbba3031ef24cc7b065 | [
"MIT"
] | permissive | slightlynybbled/tk_tools | d23e3fa12718b7ce9861370b5d28d4d85135dde0 | c845d5c539c693777e0f72a26a5bb0e6236e1827 | refs/heads/master | 2022-07-16T21:36:08.116554 | 2022-06-01T19:43:31 | 2022-06-01T19:43:31 | 89,515,446 | 107 | 29 | MIT | 2018-06-11T10:55:01 | 2017-04-26T18:47:45 | Python | UTF-8 | Python | false | false | 404 | py | smart_checkbutton.py | import tkinter as tk
import tk_tools
if __name__ == '__main__':
root = tk.Tk()
tk.Label(root, text="The variable value: ").grid(row=0, column=0)
value_label = tk.Label(root, text="")
value_label.grid(row=0, column=1)
def callback(value):
value_label.config(text=str(value))
scb = tk_... |
71ba37dde2b22570462d13d92392521cef82d72f | 703fa1025f2ab6853a4639bb717a798644a1b791 | /dxlink_configurator/Magic_DXLink_configurator.py | 329f19132ae0ad4fef85d00673e8b26b7c662971 | [
"MIT"
] | permissive | marselle001/AMX-dxlink_configurator | 43af33fa313235e861e5390ef24ea00fcf32c599 | adf54f19ba12d921263504dad10402d7396defec | refs/heads/master | 2021-01-11T14:44:14.946642 | 2016-07-10T06:04:19 | 2016-07-10T06:04:19 | 80,202,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51,668 | py | Magic_DXLink_configurator.py | """Configurator is a program that integrates device discovery and telnet
commands to ease configuration and management of AMX DXLink devices.
The MIT License (MIT)
Copyright (c) 2014 Jim Maciejewski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documenta... |
c6a7f7a9a1134ef0ae91a9db71d03a11acde02b0 | be6c8d66308e436d773b142650c170692f74b91e | /python/teste_socket3.py | a0a0573116c32f7adde2090d5a52388b505a50ef | [] | no_license | ucrania/raspberry | 2ee4121475207b0fa1990523af64fec65a20b8da | fdc1c9f9e8d0b24e9c869d7d109cb9113bc5496b | refs/heads/master | 2021-01-22T06:11:08.532573 | 2017-06-02T15:44:29 | 2017-06-02T15:44:29 | 92,525,925 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,599 | py | teste_socket3.py | import socket
import sys
import time
import signal
host='192.168.137.114' #104 mario 99 alex
port=23
msg='IGOR'
received_data=''
class color:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE ... |
841c7f78ffa1f2318b01c0d539642384e6b680d4 | 1591ce916bf8dcbccdd347471a338617d535279d | /Other Python Section/07_Error_Handling2.py | 6d4863f39e903f3e88cd1287fb9b8af9ec37d47b | [] | no_license | pavanpandya/Python | 8ea9d06d3a1d0c42fd6edf9b2e3490e29a486bc8 | 58d3f2b7534d4a6a6e9f88867e2290f299c6ecd3 | refs/heads/main | 2023-05-07T04:28:38.713726 | 2021-05-15T08:00:20 | 2021-05-15T08:00:20 | 367,570,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | 07_Error_Handling2.py | # Error Handling:
def sum(num1, num2):
try:
return num1 + num2
except TypeError as err:
print(f'Please Enter Numbers, {err}')
# except (TypeError, ZeroDivisionError,..) as err:
# print(f'Please Enter Numbers, {err}')
# We can wrap multiple errors in one like this.
print(sum('1... |
5f80bcfd0a860976fa88bf17b15a67fb2d4c7d3e | ad72118956c1e26312331346f93ce674b97c9447 | /e09/e09_02.py | 9f3d8445769071b32e0c18e1aa0dd3b617c82baa | [] | no_license | ddtBeppu/introPython3_beppu | 272e5946e8d1e1c859c2ab45b69acdfdb3b248fe | 3b52d20b2295853a1e25d118a9b7bc72107454ed | refs/heads/master | 2020-03-16T08:34:44.428469 | 2018-07-26T12:21:11 | 2018-07-26T12:21:11 | 132,598,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | e09_02.py | # 復習課題 9-2
# Flaskのデバッグ/再ロードできる開発用ウェブサーバーを使って骨組みだけのウェブサイトを作ろう。
# サーバーはホスト名localhost、ポート5000を使って起動すること。
# 手持ちのマシンがすでにポート5000をほかの目的に使っている場合には、別のポート番号を使ってもよい。
from flask import Flask
# ウェブサイトの骨組み作成
app = Flask(__name__, static_folder='.', static_url_path='')
# 実行
app.run(port=5000, debug=True)
# 実行結果
"""
NaotonoMacBoo... |
f5021c5c11f07997a5ed6b1a43e3d9b69b7e1709 | 1a756d45d9e6294ae7945bd018fb0ccebb60806d | /Chapter3/3.6/3.6.4/orderedlist.py | f9bbc8f7b8a69b41f436d61c462e87f7eead2fee | [] | no_license | WustAnt/Python-Algorithm | 0a7f32dfa3da7a640eb303c1e2cbe62896df025e | 5da5236e6c0cd3c8410c3925c5744c97d20bfc26 | refs/heads/master | 2022-12-07T22:19:20.130446 | 2020-08-21T09:25:28 | 2020-08-21T09:25:28 | 284,865,740 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,816 | py | orderedlist.py | # -*- coding: utf-8 -*-
# @Time : 2020/8/10 10:49
# @Author : WuatAnt
# @File : orderedlist.py
# @Project : Python数据结构与算法分析
from node import Node
class OrderedList:
def __init__(self):
self.head = None
def isEmpty(self):
"检查列表是否为空,返回布尔值"
return self.head == None
def length(... |
ccc15fec93f6f1d7f7ebf9ba6e9e9f3440cabe6d | 1696daddb71dcf8b0c62ec45147fb459841b230c | /2015/day07.py | 6622d6cbae227c60ebb3b61fd1ad8209d20e4b8d | [] | no_license | robj137/advent_of_code | 49a6a38a6a980d5fd2db466b300f48c70d7cf626 | feca89941e03876d5d9eec1113f81f3b5a5fcc7b | refs/heads/main | 2022-12-25T01:21:36.183154 | 2022-12-15T01:12:28 | 2022-12-15T01:12:28 | 224,256,357 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,857 | py | day07.py | import re
from collections import defaultdict
import sys
def get_input():
instructions = []
with open('inputs/day7.txt') as f:
instructions = [x.strip() for x in f.readlines()]
return instructions
def parse_instruction(line):
# function is always one or two arguments and an uppercase
# o... |
2a0d5418cacd078cfb83642d490756ec32d48ac4 | 230799d6acd333678fde858ed35bf706e3e3ba33 | /run_origin_destination.py | 9dabd99da488042133c11adaab7f81c88ba4e13a | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | geoHeil/CDR-analysis-tools-hadoop | b356c7074a3e2f783d29ee1ade80f2b7b3373c28 | 2420d719af6a711e00fdbc1a95ddea30852d9ffb | refs/heads/master | 2022-06-08T12:10:13.222818 | 2020-05-07T01:08:54 | 2020-05-07T01:08:54 | 267,060,234 | 1 | 0 | MIT | 2020-05-26T14:08:21 | 2020-05-26T14:08:21 | null | UTF-8 | Python | false | false | 1,373 | py | run_origin_destination.py | from Common.config_object import Config
from Common.cdr_origin_destination import OriginDestination
from Common.hive_create_tables import HiveTableCreator
from Common.hive_connection import HiveConnection
from Common.helper import format_two_point_time
import argparse
import time
def main():
# argument parser
... |
fea2b63c29978233339e07942d479c228b8eea11 | f6aa5ce2ba84b96dc8322a2586418df486a262b8 | /src/0032_Pandigital products.py | 6e9088165a1f058c78af57aab8683db70f55e9c1 | [] | no_license | hotdl/EulerProject | 2193a5bc0067558d423280ed79e8c3e30871ec0f | c8cafd290aeaffe6aaf09a9f8457ee60ea92bcdd | refs/heads/master | 2020-07-11T02:38:46.477497 | 2016-11-22T04:58:19 | 2016-11-22T04:58:19 | 74,006,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,235 | py | 0032_Pandigital products.py | #coding:utf8
# We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital.
#
# The product 7254 is unusual, as the identity, 39 × 186 = 7254, containing multiplicand, multiplier, and product is 1 through 9 p... |
85b266b5d4df21619f68e59bfe3083bfa46c73f8 | 91dcd607c9eef62de4ebb13468a6375d916b9f76 | /gamestoreapi/apps.py | d182d8fc7ee1ebe4f7f73975c14ff0bf2850f9b0 | [] | no_license | thcong12/Online_Gamestore | b05f783da5cf7e0561e5a86769ab095c659df65d | 2a199f8062684b3e3bb7c3077de897db997335d8 | refs/heads/master | 2023-08-29T08:52:01.563495 | 2020-04-08T19:15:35 | 2020-04-08T19:15:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | apps.py | from django.apps import AppConfig
class GamestoreapiConfig(AppConfig):
name = 'gamestoreapi'
|
791e909687625bfe2e21fb8dcab421da5601aad9 | 832c56c377e703e4976e543ad9975b26c2c65316 | /posttojournals.py | 8e2c61e429bbfde550d3900b1e4ad3ba0599de28 | [] | no_license | rainercarr/accounting-automation | 15385b7dd1fc836ab3b96ef7513260121dc4bd54 | 5b23a05aaf9db45a32182a8306e158fd0632bfae | refs/heads/master | 2023-07-21T04:26:57.946903 | 2023-07-14T21:08:39 | 2023-07-14T21:08:39 | 271,666,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,864 | py | posttojournals.py | import accutil
from automateddialog import *
import csv
import pyautogui
from recordclass import recordclass
from selectcompany import *
import sys
import time
class PostToJournals(AutomatedDialog):
def __init__(self, entry_csv):
self.ref_image = 'posttojournals.png'
self.entry_csv = entry_csv
... |
a2474ab35e78a4cfe854641d9fe2c544e68013d3 | 5e3784b6423dd522c46e6b9b2dcab37cde7a51fe | /Checkpoint/COMPANHIA_AEREA.py | 54bb515e524c7a45845b633c5cea4136a54d394b | [] | no_license | allanpreis/FIAP-PYHTON | 62dd588ec4f8e8b8851afe8f879e5f6facf095b2 | 3ab0640c93e51aa5ef3dcb7f0695f374521b4841 | refs/heads/master | 2022-12-05T20:24:41.364237 | 2020-08-28T16:52:02 | 2020-08-28T16:52:02 | 253,375,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,203 | py | COMPANHIA_AEREA.py | nome = input('Insira seu nome:')
print('Bem-vindo, {}.\n'.format(nome), end='')
print('Informe abaixo o hemisfério de destino e se deseja somente ida ou ida e volta para cotação de valores:\n')
print('Atenção usuário, por questões de saúde contra o vírus COVID-19 estamos apenas funcionando para os hemisférios norte, n... |
f6e3d6b9d30e69298402cabf1cd019f3caa70b6f | b3e842c50af8ddc1c2e4fb48a9b83cea9659e4ec | /Practice-Python/Guessing Game/Guessing_Game_One.py | 722ab1d7c0b61fa97d7102dc88ca5fc233e2ea04 | [] | no_license | yaaaas/python-projects | 04b49b3801792e09899133c595efee34e9c67c07 | 0c5612fc968389b5b7706a4bf67989cc526dffd8 | refs/heads/master | 2021-09-01T18:00:32.285648 | 2017-12-28T05:53:06 | 2017-12-28T05:53:06 | 113,281,796 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | Guessing_Game_One.py | import random
num = random.randint(0,9)
n = 1;
while True:
guess = input("Guess the number! Input your guess here: ")
if int(guess) == num:
print("You've guessed correctly! The number is "+ str(num) + ". You took " + str(n) + " guesses!")
num = random.randint(0,9)
n = 0;
choice=input("Would you l... |
4485e2135b328c703c6b3c986a61cf8d9f7f2553 | 8340ac46a4701b6343258ea5431e1aba28a4ee94 | /main.py | 577fd3ddcca8cbd67d0aecb7d677b625d9ba1f8c | [] | no_license | shayansaha85/qr_code_generator | b102f26597e0d69b94476f33a8b5d64085d93517 | 8b7bf634d1669481202c7100dc02aa8dc0fd0478 | refs/heads/master | 2023-04-02T21:22:44.969808 | 2021-04-02T11:30:56 | 2021-04-02T11:30:56 | 343,317,175 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 235 | py | main.py | import pyqrcode
print()
print('Enter your text/link below')
print('___________________________')
print()
text = input()
print()
filename = input('Enter the filename: ')
qr = pyqrcode.create(text)
qr.png(f".//{filename}.png", scale=8)
|
060b00353719fa2d68e4335d231917b4caf71a67 | 8bedde498bec431b6a74515ea398fde36d076e21 | /ideas/forensic/TargetAttack/dev/client/client.py | 49bc8f00f3ab3b03bd4a822d4922eb0b8ae7f87d | [] | no_license | xSPiCa/aero-ctf-2021 | c83924e959598dd777fe5fcd81ba4f11e7cbf485 | 584cdecfb6d22e7991ea6b75c1200d03e312a283 | refs/heads/main | 2023-03-19T02:32:52.631911 | 2021-03-02T17:30:58 | 2021-03-02T17:30:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,612 | py | client.py | import hmac
import hashlib
import socket
from struct import pack
from random import shuffle
from time import sleep
import win32security
from sys import exit
p8 = lambda x : pack("!B", x)
p16 = lambda x : pack("!H", x)
p32 = lambda x : pack("!L", x)
p64 = lambda x : pack("!Q", x)
def g():
return b... |
62cbdb27e5528e88439233187162caa7501941e8 | 9d1cef263064a0e5a1738f9dd97f5691e0fe7a78 | /基础代码/Q1.py | eb79f541c6f017987f46b618b9a0d37dc34f1f20 | [] | no_license | MLlatte/Python- | 760e1a86f5e224c8544091aa364d079bbec1c7b9 | 4c918df9968f5efc6997a081a114f2a72bc55d33 | refs/heads/master | 2020-05-29T14:51:58.661852 | 2019-05-29T10:56:29 | 2019-05-29T10:56:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | Q1.py | #for循环 迭代:就是循环遍历集合的意思
example_list=[2,5,65.47,89]
for i in example_list:
print(i)
|
cacd680df2ea0267e87d132d83ac758a4a1e57ad | 23c15029052b34cd93981905875f35f2f72c902a | /wiki/urls.py | 066ca823bf10b1768bdf9eb315b2f43222768dd2 | [] | no_license | Brobin/pokemonpvp.club | ad859a9fe6a1a3976ed8ca19b614bdb41e4a64c9 | 8b2b39381bb110566fb7631073f3d8dda6804362 | refs/heads/master | 2022-12-09T20:07:10.987350 | 2019-06-03T17:15:41 | 2019-06-03T17:15:41 | 166,421,359 | 1 | 2 | null | 2022-12-08T01:32:51 | 2019-01-18T14:57:53 | Python | UTF-8 | Python | false | false | 1,061 | py | urls.py | from django.urls import path
from .views import (
WikiArticleView,
WikiArticleCreateView,
WikiArticleEditView,
WikiHomeView,
WikiSearchView,
WikiTagView,
WikiArticleUnpublishView,
WikiArticlePublishView
)
urlpatterns = [
path('article/create/',
WikiArticleCreateView.as_vi... |
ced9e765973daab577ebdeb9f43b24cc86510505 | 82aeb326f14a4ab0eb80b9d9b23f7b5f2a3257cf | /code-exercises-etc/section_05_(loops)/ajm.loops05_zip.20160319.py | 48decc157c4db573bf74212610d480297e8af6a2 | [
"MIT"
] | permissive | jiuash/python-lessons-cny | ea61089e4a12c23ede3feadf92f736f885c3341b | d437f9f518f0a5864bfaa8e5b7ff6a98fb71ab0c | refs/heads/master | 2023-07-15T04:22:46.953102 | 2019-03-09T14:26:57 | 2019-03-09T14:26:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | ajm.loops05_zip.20160319.py | classes = ['Lesson 1, January 2016', 'Lesson 2, February 2016', 'Lesson 2, March 2016', 'Lesson 3, March 2016']
attendances = [10, 15, 23]
for a_class, attendance in zip(classes, attendances):
#a_class is classes[0]
#attendance is attendances[0]
print a_class
print attendance
|
956846d56b31c4733f34cd7e31a7d26682e0f5b2 | 2e3913365d5a5c79abd8f8ddac5d74804561a91b | /Code/Example1_4x4/ExactSR-M_4x4_noGoWalls.py | ed2e504f5edecc0ed4b140788cbcdce20955b364 | [] | no_license | nocodehere/SR | 5d77f9fb4d6cf6afcb43906ad74a22e5804886a1 | 07a60a98b4ac41644c8c4dd1c73c1a83400d3916 | refs/heads/master | 2021-09-04T00:55:41.279732 | 2018-01-13T17:07:51 | 2018-01-13T17:07:51 | 116,710,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,906 | py | ExactSR-M_4x4_noGoWalls.py | """
M for 4x4 matrix (skip env steps returning same position
"""
import numpy as np
import random
from env2D import env2D
from replay_buffer import ReplayBuffer
def one_hot(num, maximum):
one_hot = np.zeros(maximum)
one_hot[num] = 1
return one_hot
M = np.zeros((16, 16)) # for starting and end states (s,... |
19cae871fd91d6ae069bfb4fefdaf0b6132bfbd3 | 734c0f6aec4aa7e0603f77e6de5743287949de23 | /main.py | 55326919371c57cc528a3539641681bd192de11c | [] | no_license | xinchaothegioi31415/ITS-Traffic-Capacity-Analyzation | 5dc0c60b30d2f10cbd0a0e2f7d2cd9f2fd728511 | 132aa72ca8fc72bddaa6e36e3fc6dbfdd8e79afa | refs/heads/master | 2022-11-10T05:01:32.239564 | 2020-06-18T23:23:12 | 2020-06-18T23:23:12 | 268,096,605 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | main.py | from traffic_capacity import *
from multiprocessing.pool import ThreadPool
import firebase_admin
# Notifying starting system
print("Starting ITS Capacity Analyzation system...")
# init
path_folder = "stream videos"
video_names = ["road1.mp4", "road2.mp4", "road3.mp4", "road4.mp4", "road5.mp4", "road6.mp4"]
full_path ... |
1d5e6dd5cea67cc88e0d911a29db2db883eeed46 | 2e17f6cc87dbc13bd76b4ab16f0d51d17c5066ef | /mridc/collections/segmentation/__init__.py | 406ae1bedc1e19b27fa778d01e92e78eb5e1ceb1 | [
"Apache-2.0"
] | permissive | wdika/mridc | f91756778472f3313f2aedb962ecab19cee9832f | 6d15dd55ca5ed6fc9fbfd31d8488ee7bab453066 | refs/heads/main | 2023-08-17T16:57:30.676993 | 2022-12-16T17:09:53 | 2023-01-23T09:43:32 | 433,172,120 | 40 | 14 | Apache-2.0 | 2023-08-31T18:01:35 | 2021-11-29T19:32:33 | Python | UTF-8 | Python | false | false | 375 | py | __init__.py | # coding=utf-8
from mridc.collections.segmentation import data, losses, models, parts
from mridc.package_info import __version__
# Set collection version equal to MRIDC version.
__version = __version__
# Authorship.
__author__ = "Dimitrios Karkalousos"
# Set collection name.
__description__ = "Segmentation and Join... |
c30afd435c67dc8f987b9bf26595f0838840e4be | 012a09b3f76dd2d1854bd8b38ee5c1d0ea254e4e | /src/script/get_match.py | 5a4c3495cc9a9ba1b764e164b2bbd0bba1ee3b4d | [] | no_license | yezj/Paladin | 1215106c578cea239305ebe5d9666cf010e0a57b | f347f50d6491eac6c92f70af8c2a71720dcf7774 | refs/heads/master | 2020-04-18T17:27:00.602660 | 2019-10-22T06:27:39 | 2019-10-22T06:27:39 | 167,655,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,217 | py | get_match.py | # -*- coding: utf-8 -*-
#!python -m json.tool
import xlwt
import xlrd
from datetime import datetime
import json
SQL = False
wb = xlrd.open_workbook(u'关卡汇总.xlsx')
table = wb.sheet_by_name(u'武将出场')
#武将出场
FIRSTBATT = {}
for x in xrange(2, table.nrows):
if type(table.cell(x, 3).value) != float and str(table.cell(x, 3).val... |
2b153946945c1497d767c1828f209d35a8d8cee7 | f952b0354477d9b14e9737770f709025bd199d9f | /IronPythonApplication1/Quiz1/Page1Problems.py | 508d636c519ff34901e9a1d6a4c0971c46d7e92a | [] | no_license | MarcusQuigley/MIT_Python | 6db9d51210e5529c4a28ca78bc4ee321a9562fde | b997d29d3a30c0995200ecd9f3a319d33b615308 | refs/heads/master | 2021-01-17T12:59:24.214741 | 2016-07-22T00:46:39 | 2016-07-22T00:46:39 | 62,411,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | Page1Problems.py | def problem1():
x="pi"
y="pie"
print x
print y
return
print "---------------"
x,y=y,x
print x
print y
def loop(i,j):
while i >= 0:
while j >= 0:
print i, j
def tuples():
listx = [1, 2, 3]
tuplex = (1,2,3,listx)
print listx
print "------------... |
cf6006b36fa2f4230ae6b3a98e7202185684a8b7 | 9fcf92a0540f12626624b315a4d45df6518e699c | /py_test/structsample3.py | 69823906e1cc10701d56ae044b5da63d6fcee5e1 | [] | no_license | ants5te9/VBS_TEST | c5e9fc0268848068ebc8c3b4e8aea66c9f48fe43 | 5967e4cb2be6a291f3a9d9de41563517a02725bd | refs/heads/master | 2020-06-02T03:17:11.319048 | 2020-04-16T07:33:32 | 2020-04-16T07:33:32 | 191,017,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,127 | py | structsample3.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
# 複合データ型の定義
# U12:最大長12のUnicode文字列
# i1:1バイト整数(=np.int8)
# u4:(=np.uint32)
dtype = [("field", "U12"), ("bytes", "i1"), ("data", "u4")]
class Test:
def __init__(self, len, buf):
print('コンストラクタが呼ばれました')
print(buf)
self.len=len... |
d6f811cfae16fbb10690adaf173463c318787446 | 89b13cc18f0438ee9ae3b44ddd6d3c941448424f | /DDNews/DDNews/utils/add_test_user.py | 946ab11df43dec722b87845b1bbb3a5bf59ad11d | [] | no_license | Dncey/DDNews | 0f99eaf0df3937d06032ee40576e46abb9652f63 | f4bd5c17f5022747de23a66832bc6b90f5c6a002 | refs/heads/master | 2023-05-14T01:57:09.769659 | 2022-04-15T08:16:20 | 2022-04-15T08:16:20 | 176,964,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | add_test_user.py | import datetime
from news.models import User
import random
def add_test_users():
now = datetime.datetime.now()
for num in range(0, 10000):
try:
user = User()
user.username = "%011d" % num
user.mobile = "%011d" % num
user.password = "e10adc3949ba59abbe56e05... |
ddf39cc652b94d5e6c3071b4f0bd20408e56d67f | dc0d6fbe735b42b35c2a1a278c491f7e58ab8b89 | /views.py | d8f84fda9892df2f1d94d1d9eea7d64655797311 | [] | no_license | selfcommit/HospiPal | fec4f744a58dcf3d9c25485b459dffb7ce36edc8 | 1d1768d18d3b04962303ddff187f5d9cea1f7057 | refs/heads/master | 2021-01-10T21:45:21.732833 | 2018-07-25T02:50:23 | 2018-07-25T02:50:23 | 30,266,801 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 30,055 | py | views.py | from django.shortcuts import render
from django.shortcuts import redirect
from django.http import HttpResponse
from django.http import Http404
from django.forms.models import model_to_dict
from django.shortcuts import get_object_or_404
from HospiPal.forms import *
from django.db.models import Q
from django.db.models im... |
e0004a141b5a5a37a2cf236829dd0a1618f0e228 | acc6a078c25aca61259dacf68983aa45b2c446fd | /filter.py | 8f11e2111b24df4cb748ec367871f6115d1451a0 | [] | no_license | macrocosme/arts_rfi | 22e1f0434d7dffa5083587ee59a7bd39537875f2 | 0a6a59e3c6c331108edaa02d3bc49be6a624f02f | refs/heads/master | 2023-07-27T04:31:09.311728 | 2021-01-08T09:03:06 | 2021-01-08T09:03:06 | 253,585,361 | 0 | 0 | null | 2023-07-06T21:58:28 | 2020-04-06T18:40:26 | Python | UTF-8 | Python | false | false | 5,057 | py | filter.py | import numpy as np
from reader import read_singlepulse, get_triggers
from tools3 import dm_range
def nan_helper(y):
"""Helper to handle indices and logical indices of NaNs.
Input:
- y, 1d numpy array with possible NaNs
Output:
- nans, logical indices of NaNs
- index, a function, wi... |
af70c5ebe16d48127955e811f479b95430beaec2 | af1652ae04fdbc6eceef363a2fedcf6dfacb394f | /TP5/multiLayerPerceptron.py | 173f9cbd9e5ebab2ac3bb19179dc82be0a621d50 | [] | no_license | ig-rib/SIA | df55eded397b1f9c178675bec6dc5f7fda599f00 | 2fde55d3c088a461279b98c49d7c9f9cfa12b3ab | refs/heads/main | 2023-03-22T16:02:58.422705 | 2020-06-30T11:40:07 | 2020-06-30T11:40:07 | 244,903,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,715 | py | multiLayerPerceptron.py | #!/bin/python3
import numpy as np
# from perceptron import Perceptron, SimpleNonLinearPerceptron
# import sigmoidFunctionFactory as sff
import sys
from collections import deque
import random
import constants as ct
beta = 1
def tanh(x):
return np.tanh(beta * x)
def tanhPrime(x):
return beta * (1 - np.power(ta... |
ae52c3f4274160ef5e0c706ef4db089789fae602 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowBgpAllNeighborsAdvertisedRoutes/cli/equal/golden_output6_expected.py | 65ec890249f3bf43d628002ee47d04ecf5387f32 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 2,426 | py | golden_output6_expected.py | expected_output = {
"vrf": {
"default": {
"neighbor": {
"10.106.101.1": {
"address_family": {
"ipv4 unicast": {
"advertised": {
"10.1.17.0/24": {
... |
5890cc052f165c7861625264b785cf8edac544f5 | 9aa1a379dd92eb580a99ede311de0c6ff316b4b5 | /last_test.py | 5befd9e0233e535cf1ae7dbbd64adbc8fbd28fc0 | [] | no_license | drprofMatthijs/Simple-Automatic-Satire-Detection-in-Dutch-Headlines | e4c0888915fbc56a2a5f212068ee8625b4d98f2f | da2c0064b9050726d54da1529e5c0c59828b5a3a | refs/heads/main | 2023-04-07T10:08:33.065061 | 2021-04-12T11:29:25 | 2021-04-12T11:29:25 | 356,855,991 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,337 | py | last_test.py | # This file trains and tests the classifier on the different kinds of news seperately.
# Political news, domestic news and foreign news.
#
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn import metrics
from random import randrange
from sklearn.... |
05533205de09f2b11d16430f147216a60d34a783 | b34809c0064a24cb367b7aab28e02f81316a1c28 | /utils/SKRemoteTaskService.py | 4f411653e5c757c9f01c8e69e4f20ba2aa39960c | [] | no_license | kuhnmarek/sk-pyclient | 6c598d7014becfb704275d8ffc75d3357f9f896c | c99850ecd7a88bb59092690afab41fd0f291c899 | refs/heads/master | 2022-07-09T03:38:45.704234 | 2019-05-24T08:56:59 | 2019-05-24T08:56:59 | 188,284,054 | 0 | 0 | null | 2022-06-21T22:01:14 | 2019-05-23T18:09:50 | Python | UTF-8 | Python | false | false | 948 | py | SKRemoteTaskService.py |
import logging
import asyncio
class SKRemoteTaskService:
"""This class manages SpaceKnow remote tasks in an asynchronous fashion."""
def __init__(self, http_session, loop):
self.logger = logging.getLogger('root')
self.httpSession = http_session
self.loop = loop
self.url = Non... |
7eead9fb87af95bddd353dcac4dc2f4271be34d4 | af9a8ce8920d4159d14bd21a189573ea67bd9403 | /exemplo-aula-1.py | 91f785a40b747694b2999bb2e1149a1d357c0bb3 | [] | no_license | GolfettoGuilherme/EstudoPython | 8617314a33854cb6c30e282b39c61ed3756a6919 | e1724eb0b5756413a028dd542d2a870658de7d51 | refs/heads/master | 2021-08-16T13:45:50.711437 | 2017-11-20T00:55:08 | 2017-11-20T00:55:08 | 109,470,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | exemplo-aula-1.py | # Nosso primeiro programa em Pytho
#DevMedia
print("Hello World!")
|
ffca63ee77634d8f9744e2a35a3c5b0cfa10749f | 0bb7eff9059be9b905796e96be5997da2a889fef | /mmtfPyspark/utils/columnarStructureX.py | 74145b691b9f88665bc999c10928a33f61de6544 | [
"Apache-2.0"
] | permissive | sbl-sdsc/mmtf-pyspark | ab87fae57ade8a8cfae11f12ac6f25d7325e9035 | 9a3244a329a62e4e450d3e0f3f2dc93f45b4a453 | refs/heads/master | 2023-04-14T05:35:45.304479 | 2023-03-27T20:56:51 | 2023-03-27T20:56:51 | 91,004,686 | 66 | 33 | Apache-2.0 | 2023-03-27T20:56:52 | 2017-05-11T17:13:16 | Python | UTF-8 | Python | false | false | 4,185 | py | columnarStructureX.py | #!/user/bin/env python
'''columnarStructureX.py
Inheritance class of ColumnarStructure
'''
__author__ = "Mars (Shih-Cheng) Huang"
__maintainer__ = "Mars (Shih-Cheng) Huang"
__email__ = "marshuang80@gmail.com"
__version__ = "0.2.0"
__status__ = "Done"
import numpy as np
import sys
from mmtfPyspark.utils import Column... |
6ff467195204c3dfefe27e926cdd5ee6b8328c04 | 977c427791f84c92118acd29a4f97d5adfd3cdcd | /text.py | 75325aa00551daf00dcf1546c8adc0d8afa104ad | [] | no_license | huazhicai/shengnei | 4271174e4d58ee8ecbb5d4d74082500489cdd267 | f82597f95404b7c0644b13a2e641a7ece34f4ccc | refs/heads/master | 2020-06-14T18:05:59.561471 | 2019-07-10T09:17:40 | 2019-07-10T09:17:40 | 195,079,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | text.py | import os
print(__file__)
print(os.path.basename(__file__))
print(os.path.splitext(__file__))
print('.'.join([os.path.splitext(__file__)[0], 'txt'])) |
9e9a058c0e6c125227407014dfdb152b3c6a8da7 | 050b636be9914b2ead58e063fa57d2f9f6405c48 | /utils/module_StatFunc.py | 938f223e003259276d8090ec9f9fecf8b15127fa | [] | no_license | pangpang20/ChIP | 50a62e7e70b64bec2d95ff767545ae324aa1f55f | d58d699b176d0b37714e43699d961796bccc1567 | refs/heads/master | 2020-07-06T03:52:53.893674 | 2017-07-24T06:25:21 | 2017-07-24T06:25:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,916 | py | module_StatFunc.py | from __future__ import division
import re,sys,os
import subprocess,time
import numpy as np
import gzip
def check_gzipped( infile ):
f_infile = gzip.open( infile )
is_gizpped = 1
try:
f_infile.read( 10 )
except IOError:
is_gizpped = 0
f_infile.close()
return is_gizpped
class QcS... |
cc1f71aa3d51d8960944359081588f3913515cbf | cfd40d4e07be56fdbadccf3953fd71fd8fa583df | /Batch.py | 31eb7098dcb2254af16fc3519982fe31d7e7b19a | [] | no_license | noa-cohen-Israel/DNA-project | d85e61485ed4e952035392067b974c56aeed2634 | 076af2b35cdc80409ef524251ce1e2541c6e0a28 | refs/heads/master | 2023-08-20T02:40:37.399553 | 2021-08-13T13:50:48 | 2021-08-13T13:50:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,246 | py | Batch.py | import json
class Batch():
__instance = None
@staticmethod
def getInstance(command=None,str=None):
""" Static access method. """
if Batch.__instance == None:
Batch(command)
return Batch.__instance
def __init__(self, command=None):
if Batch.__instance !... |
bf02002b9dd262c08ef8716bdc2f7f84e27af47f | 87c58ec88dfc70d7bc32702b39e0d648332335b9 | /grafos/test_graph.py | 17a0725b82a9382672b1920f561cd1cc18fdd79e | [] | no_license | everaldo/aed_ii | 1b83e12634a2af3d2530eced206ed183e83f06ce | 31dc6426463737193536a98f59abe6cb0f077697 | refs/heads/master | 2021-01-10T12:09:11.877720 | 2015-11-06T19:29:29 | 2015-11-06T19:29:29 | 44,832,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,146 | py | test_graph.py | #
# Everaldo Gomes - everaldo.gomes@pucpr.br
# 28/10/2015
#
#
import unittest
from vertex import Vertex
from edge import Edge
from graph import Graph, KGraph
from edges import Edges
from vertices import Vertices
class TestGraph(unittest.TestCase):
def setUp(self):
self.a = Vertex('a')
self.b =... |
6c307381bccf6e048083fa4a2b5bc0e173fcd503 | 11280127773f7aa023c691b59bf4909185a0b867 | /app/reader/services/__init__.py | 8b6465f09c23a6b3b83147a98b1005a10cd8f729 | [] | no_license | MattSegal/blog-reader | 426457470dbeb660d8b9a5fee9df1bb514d4b3ce | c910a7f22e07f51402f4e463cf3ddd6beaf84a6d | refs/heads/master | 2020-04-20T04:31:15.912354 | 2019-03-17T00:26:42 | 2019-03-17T00:26:42 | 168,629,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33 | py | __init__.py | from . import scraper, translate
|
773969afefd9998fe4e29426bafd623a60b9a942 | f524aae3aca5bd57954814a1ca848796d6a5818d | /tests/test_particle_filter.py | 9af0fa5671d71b8c806df177b2ff2e62bc723ab1 | [] | no_license | amirulmenjeni/irobot-create-2-kinect-slam | 0b01e17670e075c75ca98c90d1d5e4e434724564 | 50369a2f58dc8ead078db199c30d42f7bcc4afb7 | refs/heads/master | 2022-12-31T19:46:30.052126 | 2020-10-19T14:34:37 | 2020-10-19T14:34:37 | 305,408,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,214 | py | test_particle_filter.py | import numpy as np
import slam
import cv2
import time
import rutil
import imdraw_util as imdraw
def main():
N_SENSE = 100
sense = [0] * N_SENSE
for i in range(N_SENSE):
sense[i] = np.load('./data/kinect_depth2/{0}.npy'.format(i))
MAP_SIZE = (500, 500)
RESOLUTION = 5
DELTA_TIME = 0.25
... |
d0dc042525b4a605e38eddea921a9070866d4246 | 496930cc3a21018f5030dbd68f1c5c2409782eb0 | /assignments/4_Pentesting_I/stub.py | 56e3cc128cbb02fa4ec0f4bcadc3f2200d728b29 | [] | no_license | knagpal97/389Rspring19 | 76eb716444a8b936ba350f59d2f3934e174c8a1d | 5a3e4f0a533cc800c630c566842091d2ce0dbfd7 | refs/heads/master | 2020-04-22T18:43:41.228773 | 2019-05-11T02:46:19 | 2019-05-11T02:46:19 | 170,586,028 | 0 | 0 | null | 2019-02-13T21:59:34 | 2019-02-13T21:59:33 | null | UTF-8 | Python | false | false | 2,419 | py | stub.py | """
Use the same techniques such as (but not limited to):
1) Sockets
2) File I/O
3) raw_input()
from the OSINT HW to complete this assignment. Good luck!
"""
import socket
import sys
host = "1337bank.money" # IP address here
port = 1337 # Port here
def execute_cmd(cmd):
"""
... |
02093ce1fa4cd4fc96e14e57a5dd2a7eb9fcc93f | 1f7f2845861290d48ae0e532e4568a4750553bff | /Programming Questions/gcd.py | c5867c14e4e4a978ec1503c3f38e3bbff67a34f6 | [] | no_license | venugopalkadamba/Programming-Data-Structures-and-Algorithms-using-Python | 5cb5506dc05fbc665c4d432faf1b4087e29ce1da | 22fd41f49b5bb87adb27186084608ab79541f1b9 | refs/heads/master | 2023-06-01T11:15:08.573643 | 2021-06-29T14:24:21 | 2021-06-29T14:24:21 | 296,683,577 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | gcd.py | # Euclids Algorithm
# Time Complexity: O(log(min(a,b)))
def gcd(a, b):
if b == 0:
return a
return gcd(b, a%b)
a, b = map(int, input().split())
print(gcd(max(a,b), min(a,b))) |
2244694b113a8dc77ebc81147580e3d0d57e7362 | e26d89b7e11f902fedb6642e9e4fe942105a1f1e | /LAB06/lab06.py | 44319872c430721321771dce9b2a504769706f00 | [] | no_license | Marcos-Tonari-Diaz/MC102 | 8caed787a897e42a4bead1aa46f4d89dd8b028de | 6482fa4ed09f103ed5757e7b76c202b1e5f85d9c | refs/heads/main | 2023-03-01T02:29:25.506078 | 2021-02-02T00:24:50 | 2021-02-02T00:24:50 | 335,121,247 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,165 | py | lab06.py | """
LAB05
MArcos Gabriel B D Diaz
RA 221525
"""
ryuWins=0
kenWins=0
def round():
HPryu = 2000
HPken = 2000
countneg= 0
countpos= 0
while HPryu >0 and HPken >0: #loop
if countpos >= HPken:
lastHP= HPken
HPken= HPken - countpos
print ("Ken: "+ str(lastHP)+... |
a2de4b3e869034ff668826085cbd90ee03fcee20 | b58ab3929c43bab2f977142fdbe6a47956620577 | /bot.py | 3ce65b0306ad7ec99a440ae5ce7d7e4376a0f150 | [] | no_license | abizinoto/Entradas-Automaticas-IQOption | e554b7406751505f4b68eb1334caa42daa40844d | ba13baa6526d6e9bbe151395d899884f0bc0a4f0 | refs/heads/master | 2022-11-11T04:55:33.849906 | 2020-06-26T12:45:45 | 2020-06-26T12:45:45 | 274,694,951 | 0 | 0 | null | 2020-06-24T14:50:28 | 2020-06-24T14:50:27 | null | UTF-8 | Python | false | false | 2,176 | py | bot.py | # coding: iso-8859-15
from iqoptionapi.stable_api import IQ_Option
import logging
import time, configparser
from datetime import datetime
logging.disable(level=(logging.DEBUG))
def configuracao():
arquivo = configparser.RawConfigParser()
arquivo.read('config.txt')
return {'email': arquivo.get('GERAL', '... |
b097e9a959d42899ba358fab80a917be7d1e39d2 | 8e24e8bba2dd476f9fe612226d24891ef81429b7 | /geeksforgeeks/python/python_all/75_3.py | fa4724023364721988c8c5a4ee518fab310bcb36 | [] | no_license | qmnguyenw/python_py4e | fb56c6dc91c49149031a11ca52c9037dc80d5dcf | 84f37412bd43a3b357a17df9ff8811eba16bba6e | refs/heads/master | 2023-06-01T07:58:13.996965 | 2021-06-15T08:39:26 | 2021-06-15T08:39:26 | 349,059,725 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,651 | py | 75_3.py | Python – Key Lists Summations
Sometimes, while working with Python Dictionaries, we can have problem in
which we need to perform the replace of key with values with sum of all keys
in values. This can have application in many domains that include data
computations, such as Machine Learning. Let’s discuss cert... |
6b640838753678a5026b983afbd7b7f4db4df7c2 | 0959cf67b95ec9e8042175f20ec5669f0b67d478 | /session03/trianglestar.py | edfc396b4921a45184f0e468513c931965dc28bb | [] | no_license | hieutrungnguyen90/nguyentrunghieu-fundamental-c4e17 | baca1f859cb19bcaad669268f77b6cdf38c7a64c | 2d52e5e4b9bfc5d1e02317b6629060f64529d7f1 | refs/heads/master | 2020-03-10T07:04:35.184700 | 2018-04-16T16:23:26 | 2018-04-16T16:23:26 | 129,254,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 115 | py | trianglestar.py | m = int(input("enter m: "))
for i in range(m):
for j in range (i+1):
print(" ", end= '8')
print()
|
b8c4de000f204ea1bf89fde4ac37693c3b4387ac | acfb4bfa18dc73f797e4885ff6834136530f5b24 | /AFNI_3dttest_NFseed_neg.py | f48c56cc948264c524966ff79969f750cd7727e1 | [] | no_license | amennen/rtAttenPenn_analysis | 212b81d96f53c56b7e05ed431acad3eac3cfb819 | f1cfec898606cb41b938d8fe65befdcd930ff9eb | refs/heads/master | 2021-07-12T12:31:10.117768 | 2020-08-17T16:20:08 | 2020-08-17T16:20:08 | 190,396,432 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,670 | py | AFNI_3dttest_NFseed_neg.py | # PURPOSE: run AFNI noise regression
import os
import glob
from shutil import copyfile
import pandas as pd
import json
import numpy as np
from subprocess import call
import sys
second_level = '/data/jux/cnds/amennen/rtAttenPenn/fmridata/Nifti/derivatives/afni/group_level/neurofeedback/'
noise_save_dir = '/data/jux/cn... |
3a2d0f62f86de2419165c2dfad9c3d12e8fd534b | 7a4515a3831bd6145eb225928ff20397e0accebb | /devel/python/python/ert/ecl/ecl_sum.py | 8d8212c819f11b0310ae254ec2148dfba33236b8 | [] | no_license | danielfmva/ert | 1d8103bc7415f9f08bb932209b12346afe2bfee7 | 261f2f58b29bf6f56452aa81a8f778a1fad91563 | refs/heads/master | 2021-01-14T09:23:57.611339 | 2015-01-02T13:19:08 | 2015-01-02T13:19:08 | 24,201,326 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 39,105 | py | ecl_sum.py | # Copyright (C) 2011 Statoil ASA, Norway.
#
# The file 'ecl_sum.py' is part of ERT - Ensemble based Reservoir Tool.
#
# ERT 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 t... |
43b63d430f9c1d7cdc0b3f52b36d9986bce1a5cb | 59f03c7528c9c806e3e25b9864db89f25dfa73c2 | /src/onegov/org/views/resource.py | b18e30e06bd47c05ab84d25da2b1b848fbf70fed | [
"MIT"
] | permissive | OneGov/onegov-cloud | 8d8cd6d0378991ebc2333b62337246719102e723 | c706b38d5b67692b4146cdf14ef24d971a32c6b8 | refs/heads/master | 2023-08-24T15:37:52.536958 | 2023-08-24T14:15:54 | 2023-08-24T14:15:54 | 189,431,418 | 17 | 4 | MIT | 2023-09-14T20:39:37 | 2019-05-30T14:47:14 | Python | UTF-8 | Python | false | false | 28,909 | py | resource.py | import icalendar
import morepath
import sedate
import collections
from collections import OrderedDict, namedtuple
from datetime import datetime, time, timedelta
from isodate import parse_date, ISO8601Error
from itertools import groupby, islice
from morepath.request import Response
from onegov.core.security import Publ... |
d2eb4d6e491e2d5d944888436c1c8ca79bef5354 | d2845579ea6aa51a2e150f0ffe6ccfda85d035ce | /kernel/security/protol/spdz/communicator/federation.py | 6bef180bbc99cd197f4130ced27654332b31570b | [
"Apache-2.0"
] | permissive | as23187/WeFe | d8de9ff626f9f3e5d98e0850b0b717a80fd73e72 | ba92871d4b1d2eef6c606c34795f4575e84703bd | refs/heads/main | 2023-08-22T12:01:06.718246 | 2021-10-28T01:54:05 | 2021-10-28T01:54:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,982 | py | federation.py | from kernel.transfer.variables.transfer_class.secret_share_transfer_variable import SecretShareTransferVariable
class Communicator(object):
def __init__(self, local_party=None, all_parties=None):
self._transfer_variable = SecretShareTransferVariable()
self._share_variable = self._transfer_variabl... |
32402cc5e61373dd1d4f8c89930573d99b533e0d | 10f32fec0ecc8a416a6a38254ccf08d867c69319 | /deprecated/findbugs-in-db.py | 089179bdd24ba1739a95195c3310c599e88ae6c2 | [
"MIT"
] | permissive | markraemer/mH-PriSe | 03ae06a1559283019330d37f021c9d337be53cad | 1555c4c7e6457c3bb5bce3b6dae9c514ed7fc3d3 | refs/heads/master | 2021-01-24T08:29:39.564605 | 2016-09-22T09:51:43 | 2016-09-22T09:51:43 | 68,900,406 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,285 | py | findbugs-in-db.py | #!/usr/bin/python
# KK, Jan. 2015
# The script searches XML Findbugs reports and
# puts them in DB
import re
import sys
sys.path.append("/home/labits/svn/kk")
from deprecated.db_functions import *
# Settings
APK_DIR = "/home/labits/APKs/Twins/" # dir where apks reside
#SMALI_DIR = "/home/labits/smali/"
#RPDIR = "/t... |
228c8357c8b5af337b1d230e8cf33ee1c5cdad49 | 8dd5ce5eeb08447916c3423c4369b6af3fda11a5 | /Snakefile | 88645435a1f550c530ddca7980dbafb810f5e6ae | [] | no_license | kobolock/bwa_map | 7969a84c8e5db8037dc494a9cd1d54aa750cd64a | 4f2fb86758f914ee40e32132dfaa97f4feaa86ff | refs/heads/master | 2020-12-22T12:09:53.862181 | 2020-01-30T10:48:05 | 2020-01-30T10:48:05 | 236,775,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 833 | Snakefile |
##### load config and sample sheets #####
configfile: "config/config.yaml"
#SAMPLES = config["samples"][wildcards.sample]
## A partir d'un fichier .tsv
##===========================
#import pandas as pd
#
#samples = pd.read_table(config["samples"]).set_index("sample", drop=False)
#
#units = pd.read_table(config["un... | |
6de30d69748f99900d88bac3c16103e8848bd045 | 29f500b79953530f28d90f9d928a05b6757c0f33 | /DCamp_Bool.py | 78309cd5833969cdf01c64acf090391926a85d10 | [] | no_license | shinichimatsuda/Python_Training | 11e965d25d128371172f870cc7b2c8689403d2c0 | a6f5fb65ef6819bd92e79ecd7548ee45d68714a4 | refs/heads/master | 2018-10-13T19:20:02.655063 | 2018-09-15T08:17:32 | 2018-09-15T08:17:32 | 59,041,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47 | py | DCamp_Bool.py | x = 0
print(bool(x))
# The answer is 'False'.
|
aa13335cba91458011305bdf6ca687850a05f5f0 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-MetalPerformanceShadersGraph/PyObjCTest/test_mpsgraphsparseops.py | c43e72e79c77a9d01a24c37585d526baffabb5c7 | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 520 | py | test_mpsgraphsparseops.py | from PyObjCTools.TestSupport import TestCase
import MetalPerformanceShadersGraph
class TestMPSGraphSparseOps(TestCase):
def test_enum_types(self):
self.assertIsEnumType(MetalPerformanceShadersGraph.MPSGraphSparseStorageType)
def test_constants(self):
self.assertEqual(MetalPerformanceShadersG... |
31b4d182f33de4a76b66b16ab96eb6b567d3d819 | 2f0e0c589c1ae4b92b6895886af6329d7b7b2dd8 | /gunicorn.conf.py | 407a8bd0d156c28b4c7aacded208f799a3abd078 | [] | no_license | uktrade/lite-hmrc | 62223edf36661cfae01707c7854d173884731e7d | d4020b6be2db7b02def402041ece2dd0225711f8 | refs/heads/master | 2023-09-02T10:42:52.626560 | 2023-08-09T10:25:01 | 2023-08-09T10:25:01 | 225,411,958 | 1 | 0 | null | 2023-09-06T13:43:31 | 2019-12-02T15:47:36 | Python | UTF-8 | Python | false | false | 240 | py | gunicorn.conf.py | # Default gunicorn config file. https://docs.gunicorn.org/en/stable/configure.html
import gunicorn
# Override the `Server: gunicorn/x.y.z` version header in responses.
gunicorn.SERVER_SOFTWARE = "lite-hmrc"
accesslog = "-"
errorlog = "-"
|
0d06bb6d4032eda64ba8956a2bd6af86d57650a2 | dd07c99694a8e162a89e0eceb3e23ebc7e776203 | /backend/views.py | c08e3505d83a8c45ae3cda34525416ec39303844 | [] | no_license | udavs/weatherapp | 3c70618dae65117a1eb140361b4056c9ecb54e2b | be4a2d618cbf260323a4b98b9879d5b6762e9ec8 | refs/heads/main | 2023-05-04T17:49:17.676889 | 2021-05-31T16:52:14 | 2021-05-31T17:47:36 | 372,570,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,110 | py | views.py | import logging
from django.core.exceptions import ValidationError
from django.http import JsonResponse
from django.views import View
from backend.forms import WeatherForecastForm
from backend.helpers import (
find_existing_forecast_in_database,
add_forecast_to_database,
evaluate_avg_temp_into_result,
... |
2a03382a3cc417f29d060d5e7f5766a6ae380390 | 7f49ef317dd14a177f0e4df7971483cd4296fbe7 | /projekt3/chart_generator/main.py | badd25ade2d4c6187fe215a7f5cb7b69e98b62c0 | [] | no_license | msoroka/algnum | 88338d30fa90d8651453da9a19fd7f87c477a7c7 | 1aa826337030e73521bd8853a57f1b1e59ca3b24 | refs/heads/master | 2020-05-23T00:43:02.521090 | 2019-05-14T07:59:32 | 2019-05-14T07:59:32 | 152,389,890 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,141 | py | main.py | import plotly
import plotly.plotly as py
import plotly.graph_objs as go
import csv
iter = '';
prob = '';
gauss = '';
gaussSeidel = '';
jacobi = '';
absG = '';
absGS = '';
absJ = '';
iterations = [];
mcResults = [];
gaussResults = [];
gaussSeidelResults = [];
jacobiResults = [];
absGauss = [];
absGaussSeidel = [];
abs... |
6b1a7bafe16a876109385819d757d59c7c15ce80 | be7ec168862f485fca292d1c2ae984feb12bebc0 | /catapult/__main__.py | dfc5b5e980f50a34742a06927e3c8054fe0973ec | [
"MIT"
] | permissive | Tessian/catapult | 91682b8062702a762dc9fb9a82ce28f1463c970d | 6cc99e93900df53953fab8494bd0380993177745 | refs/heads/master | 2023-05-12T12:44:31.475041 | 2023-05-10T16:14:49 | 2023-05-10T16:14:49 | 166,229,143 | 16 | 13 | MIT | 2023-05-10T16:14:51 | 2019-01-17T13:20:02 | Python | UTF-8 | Python | false | false | 3,009 | py | __main__.py | """
Collection of tasks for *catapult*.
"""
import logging
import os
import sys
import boto3
import invoke
from catapult.deploy import deploy
from catapult.projects import projects
from catapult.release import release
from catapult.tickets import tickets
__version__ = "0.1"
root = invoke.Collection()
class _Execu... |
809d186bab3c4e63dc4892f10d5341bb8d8fa0f7 | b8e3191c852c3f36f446d974812bb8d5c047e388 | /driverlicense/jobs/download.py | 968309202b3ded4d3888f133de3cf600f21109a9 | [] | no_license | m-rau/driverlicense | 197968d4c61bbfd2d2f9f99538f1d01de5f66cc1 | 30e3e8828803c50c0a612f206e53c42c3d8df752 | refs/heads/master | 2022-03-31T14:14:29.996050 | 2019-12-11T13:57:09 | 2019-12-11T13:57:09 | 213,016,439 | 0 | 3 | null | 2019-12-05T13:52:29 | 2019-10-05T14:46:03 | Jupyter Notebook | UTF-8 | Python | false | false | 2,218 | py | download.py | from core4.queue.job import CoreJob
import requests
import re
from gridfs import GridFS
from core4.queue.helper.functool import enqueue
from driverlicense.jobs.process import ProcessFiles
url = "https://www.agof.de/service-downloads/downloadcenter/download-daily-digital-facts/"
class ScrapeFacts(CoreJob):
author... |
af52c83c3e619f59d2fb222b0d2e10457d40ce04 | a08422b51197e4d7927c251d7b9dd861f67a048a | /setup.py | 41fc4042a25dda8e9d3a4f36ef1f50588868f58b | [
"MIT"
] | permissive | MatteoMagri/Mandelpy | 54606fb2116f28747652f1d538ee712d0ff8f8af | 4771a58cb836d83a7621917b15a066363e63ae27 | refs/heads/master | 2020-05-15T13:19:33.573653 | 2019-04-22T19:07:28 | 2019-04-22T19:07:28 | 182,296,650 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 995 | py | setup.py | from distutils.core import setup
setup(
name = 'mandelpy',
packages = ['mandelpy'],
version = '1.31',
license='MIT',
description = 'Mandelbrot library for Python',
author = 'Matteo Magri',
author_email = 'magri.matteo@outlook.com',
url = 'ht... |
f8e4ea415ea4ee057d82deb54852d0236e9d08ac | 613416df08516af987b45b61c7a94fa014d3e367 | /tests/test_entity/test_portal.py | 890af77446f634d43377291f0104bbd3e2e4b5de | [] | no_license | srespondek/portal-statistics-reporter | 02fdf0b48e65a50ca2efe2f015c7704bf4f85a43 | 39c47f9e354de8cb6342eed84ed9f5f39ebf339e | refs/heads/master | 2023-05-25T14:48:47.701113 | 2020-05-02T16:18:44 | 2020-05-02T16:18:44 | 249,227,659 | 0 | 0 | null | 2023-05-22T22:42:35 | 2020-03-22T16:45:15 | Python | UTF-8 | Python | false | false | 3,174 | py | test_portal.py | import os
from unittest import TestCase
from bs4 import BeautifulSoup
from src.portal_statistics_reporter.entity import Steam, IMDB
test_base = os.path.dirname(os.path.realpath(__file__))
class TestPortal(TestCase):
def setUp(self):
super().setUp()
self.steam_portal = Steam()
self.imdb... |
639ad96b2deda23530450a1a7825d02c3e1c1632 | da8652f3633bf016903c1b9431bb81f6a97d3ec4 | /Prioritize/generate_gene_2_HPO_dict.py | afb5894b4fbeac61c6a9b7d95a65eaaf32078466 | [
"MIT"
] | permissive | mbosio85/ediva | 095f0c689bb2876de7a8f3760bb7140c586482c3 | c0a1aa4dd8951fa659483164c3706fb9374beb95 | refs/heads/master | 2021-01-01T17:53:55.089146 | 2019-11-29T17:13:30 | 2019-11-29T17:13:30 | 98,191,080 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 797 | py | generate_gene_2_HPO_dict.py | #get mapping gene -> HPOs
#download from HPO charite ALL_FREQ gene to phenotype
#wget http://compbio.charite.de/jenkins/job/hpo.annotations.monthly/lastStableBuild/artifact/annotation/ALL_SOURCES_ALL_FREQUENCIES_genes_to_phenotype.txt
import cPickle as pickle
import sys
gene_2_HPO = dict()
with open(sys.argv[1]) as r... |
46ae17a2caa9ed82e4aa765b13c52fdf3af3349f | ef06995488a72d28703dd011bed763710aceb27a | /todo/views.py | ff38c7e39d1986f759ceed4e589ee83d0715f625 | [] | no_license | timamero/django-task-complete | 16678834e091d4c788785de69ead55f2dbecbb74 | 2e937a0f52b57cbd4644b0c11c235ee7f7a66b2f | refs/heads/main | 2023-06-15T04:16:39.271712 | 2021-07-07T00:47:56 | 2021-07-07T00:47:56 | 361,348,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,072 | py | views.py | from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.auth.models import Group, User
from django.contrib.auth.views import PasswordResetView
from django.shortcuts import get_object_or_404, redirect, render
from django... |
d55dc129adfd0db569ba00114c4565114a285aff | 6eacc18fe1674ce137b9b6ee67fa98ab18e47ed1 | /engine.py | 2feafe8da93f8be158b9256cfadddc58201592e8 | [] | no_license | Zac-HD/tic-tac-tournament | b1ae3f4b300e06aff80bef8ad69647b64bc7c23b | 6d58a618288821ff67495e4f896ad19bf7883538 | refs/heads/master | 2020-04-28T19:55:44.795937 | 2020-03-12T04:31:48 | 2020-03-12T04:31:48 | 175,526,992 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,492 | py | engine.py | """Tic-tac-toe engine code and helpers."""
from collections import Counter, defaultdict, deque
from functools import lru_cache
from typing import Callable, Deque, Dict, Optional, Tuple
MoveGetter = Callable[[str], Tuple[str, ...]]
MoveCache = Dict[str, Tuple[str, ...]]
@lru_cache()
def move_at(board: str, index: in... |
884e2601aa06e56482e3ee6d112b94b698da1b04 | 3093520d03fb2701e97b60755dd55534efa8d6c6 | /yoursite/urls_production.py | 147e6fb61fe66ae0d1e265a00a830b44b6b5b438 | [] | no_license | bradwright/django-layout | 6da01d613135ffa37a1b335f961a0e7e0d2c8baf | 9b2fe6b862237217e56d00b1f634e15791a96b26 | refs/heads/master | 2020-04-10T16:54:26.939487 | 2009-08-29T08:41:14 | 2009-08-29T08:41:14 | 76,139 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | urls_production.py | from django.conf.urls.defaults import *
from yoursite.urls import urlpatterns
# customised URLs here, such as 500 errors |
373d2e9485582b0b4cb2d5340713e16f2ce8c14f | a5aa3ea00130a315a762c5630fa5614839cb794b | /index/migrations/0002_auto_20180819_0522.py | 4ecca70913e91e008703dc54655d5a4305aa40d0 | [] | no_license | zhang12590/django_haircut | 4226ae3fca2551201e4d8de1c7c2e17258c88716 | 7bc1b2ce5304fa30731274b676ecac354ad37644 | refs/heads/master | 2020-03-26T20:04:48.097141 | 2018-08-19T12:53:26 | 2018-08-19T12:53:26 | 145,302,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,554 | py | 0002_auto_20180819_0522.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-08-19 05:22
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('index', '0001_initial'),
]
operations = [
... |
9568f9a3d3d347a912ce17ac3762a44c550277ab | 4c8c93fbd33d696d29a334812f64a808e86d0e11 | /hello.py | a17f3805881b3f89fdf6a9235db941aec3645961 | [] | no_license | RenukaSenthil/tutorials | 811d4e56559857a5808213741e7a91b21da5c0c6 | 8b60443a7d87e6d5b3b69bfcce30662eb739a278 | refs/heads/master | 2020-05-30T12:29:17.975436 | 2019-08-09T08:13:58 | 2019-08-09T08:13:58 | 189,735,000 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 43 | py | hello.py | count=int(input())
print("Hello\n"*count)
|
0a80e961c5c45416f697406386775aead5e85772 | 00c9124de185eead1d28dc190e1e125e5b4ceb26 | /site-packages/sharing.py | 226e63ae88ee8d8b96ffb1b517b085ef8f69827a | [
"MIT"
] | permissive | cclauss/Pyto | 028b9e9c3c2fefa815a4d6831e25f5ebae5b14f1 | 1c4ccc47e3a91e996bf6ec38c527d244de2cf7ed | refs/heads/master | 2020-04-23T22:09:21.151598 | 2019-03-02T00:44:20 | 2019-03-02T00:44:20 | 171,491,840 | 0 | 0 | MIT | 2019-02-19T14:49:25 | 2019-02-19T14:49:25 | null | UTF-8 | Python | false | false | 2,752 | py | sharing.py | # -*- coding: utf-8 -*-
"""
This module allows you to share items, to import files and to open URLs.
"""
if __platform__ is not iOS:
raise ImportError("sharing can only be imported on iOS. To check for platform, see the __platform__ global variable.")
import pyto
import mainthread
from rubicon.objc import *
__Py... |
563b3c5d1eb7d0922c80120ae0731a25e2ce9dee | a05fcb3ea297af7fc05640c22c95c43be8f44a52 | /litex/boards/platforms/zcu106.py | b9c67de25df279f4d3fa2cd8ee22c376b7583c7a | [
"BSD-2-Clause"
] | permissive | bjbford/litex | 90a58b8c99cc9219eae4267140a91f6de860625e | db2693004f04062a682b5e5d04679865a0dfcb4a | refs/heads/master | 2020-04-06T12:04:27.839987 | 2019-07-17T05:02:47 | 2019-07-17T05:02:47 | 157,442,473 | 0 | 0 | null | 2018-11-13T20:31:51 | 2018-11-13T20:31:51 | null | UTF-8 | Python | false | false | 15,589 | py | zcu106.py | from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
# All IO pins/ports on zcu106 device.
# Above each section is listed the format for how to Ctrl-F to that
# specfic pin set in the ZCU106.xdc file. Swappable parts are surrounded
# by ().
_io = [
# GPIO_LED_... |
c0ff741fd617f131b15bcff54688736361f6a4cc | af27de946f04d809da054f95a689cb13d4b58401 | /032/pandigital_products.py | d0cfb78eee80253846f9d1bef11a1e8eebe8d5e3 | [] | no_license | jwmortensen/project-euler | 5069a74a39504fa1e2de270b059f4818c33afd02 | 89651173b59a81e1efd0c63375023888b60f71eb | refs/heads/master | 2020-12-24T08:26:38.384773 | 2020-06-18T17:23:13 | 2020-06-18T17:23:13 | 34,122,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | pandigital_products.py | # can't have zero
# what's the largest number of valid digits for the multiples?
# it seems like they have to be either 1 and 4 so that 1+4+4 = 9 or 2 and 3
# (10*100=1000 -> 2+3+4)
import itertools
def is_pandigital(a, b, c):
in_digits = list(str(a)+str(b)+str(c))
equal_length = len(in_digits) == len(digits)
retu... |
9419a09c1914c45727528422c20364fff8f7f8ad | 901b6b0331ee98cac8c678f52052e53e7efcbcac | /mjolnir/test/image_test.py | acf96caab14457c5a120438b216bd01265a54669 | [] | no_license | OxfordIonTrapGroup/mjolnir | fe0bef3d392cbc239a08b974342f74a9c41eb6b1 | 8d751a43ffdfdb89571cc15b74db244c4cdea392 | refs/heads/master | 2023-08-19T07:47:02.014042 | 2023-08-09T16:52:13 | 2023-08-09T16:52:42 | 231,916,318 | 6 | 2 | null | 2021-01-25T11:29:46 | 2020-01-05T12:47:01 | Python | UTF-8 | Python | false | false | 1,469 | py | image_test.py | import numpy as np
from scipy import misc
from scipy.stats import multivariate_normal
from mjolnir.tools.image import *
def generate_image(
centroid=[640, 512],
cov=100*np.eye(2),
intensity=220,
noise="poisson",
background=0,
m=1280,
n=1024):
pxmap = np.mg... |
d1ef4baa6e6cbc6f3ca122d92e5b195d4c45a295 | 03520abb58a66aeed9a556d53e3a21006af02dde | /named_storms/migrations/0016_auto_20190419_1740.py | 4843631aa44535a0381b20424a0500c2b109add5 | [] | no_license | flackdl/cwwed | 23ce1d1a5e48a57ee2cb3229860f1b97ccc81636 | 0a1454897d397cd5e1652643616abe883ccc853b | refs/heads/master | 2023-07-21T20:05:35.093270 | 2023-06-29T15:29:26 | 2023-06-29T15:29:26 | 118,942,664 | 1 | 0 | null | 2023-09-12T21:56:59 | 2018-01-25T17:06:47 | Python | UTF-8 | Python | false | false | 477 | py | 0016_auto_20190419_1740.py | # Generated by Django 2.0.5 on 2019-04-19 17:40
import django.contrib.gis.db.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('named_storms', '0015_auto_20190419_1735'),
]
operations = [
migrations.AlterField(
model_name... |
124084430cb77d85e717ea159e0a799655c6b66a | 6e0425910972fbf71af32e4a06cbc9ea520c33b5 | /home/migrations/0001_initial.py | f594ece45e0c2db5e20ce7025c3754454c909526 | [] | no_license | medinaalexandre/moBike | be94079cb74895df69eaf71581a3aac0fb71124f | 2f19a42986bf47d8b22295e9074bdbf46c405bd1 | refs/heads/master | 2020-03-27T21:32:11.647095 | 2018-11-29T04:10:12 | 2018-11-29T04:10:12 | 147,153,694 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 675 | py | 0001_initial.py | # Generated by Django 2.1 on 2018-08-25 18:57
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Entrega',
fields=[
('id', models.AutoField(au... |
bdfba81c0bbbd5f49ad85ec37e73780380bb32a6 | f52c718d74055d87549db2f6d10bc9fb7613e4da | /tests/test_loo_utils.py | 94e8463e4130412678f88ef4d33d5b9086f00f98 | [
"BSD-3-Clause"
] | permissive | wmvanvliet/posthoc | c4acb180c2a5494ddd8d10de2465fdaa48a447f6 | 3f299f820fdc8e4fb9bf3db31a50cb590040cead | refs/heads/master | 2023-04-09T09:12:57.535826 | 2022-06-06T14:24:18 | 2022-06-06T14:24:18 | 120,709,988 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,597 | py | test_loo_utils.py | #encoding: utf-8
from __future__ import print_function
from __future__ import division
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal
from sklearn.linear_model import LinearRegression, Ridge
from sklearn.model_selection import LeaveOneOut
from posthoc import Workbench
from posthoc.ut... |
209db267f69922814336aae48e29cd6282124390 | 355155ba62cdfc3eb1fafa44d54c64a82172770e | /DataCraft/DataSearch/migrations/0003_auto_20180223_1214.py | 849d57c6849531f7e2fa415d22557d0116a176a0 | [] | no_license | Singh-Sg/DataCreaftWithReact | 863e4408a8ba106df23d18f69bfcf7c98803aea4 | 4285124dc5581228f5266b3c9c21f120a349a333 | refs/heads/master | 2020-03-23T09:36:37.298854 | 2018-07-18T07:36:59 | 2018-07-18T07:36:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | 0003_auto_20180223_1214.py | # Generated by Django 2.0.2 on 2018-02-23 12:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('DataSearch', '0002_auto_20180223_1209'),
]
operations = [
migrations.AlterField(
model_name='client',
name='departme... |
7b16b75014d9152c0f841e0576b210a5a418ceba | f0faf78dd797d746e54d8f6b219a8108f9bfb686 | /module/jobscallme.py | fa2ef6227c17577b1e45c41384f5ce270be0cda3 | [] | no_license | Mane-Network-Team/Macau-PT-Fetcher | 18012e18531b463e8540b2f51104add48b705b1a | 10851c47abe9695eed9a2d567149a1044a10aca3 | refs/heads/master | 2023-07-01T15:12:52.871615 | 2021-07-16T07:27:45 | 2021-07-16T07:27:45 | 286,384,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,959 | py | jobscallme.py | from selenium import webdriver
from datetime import datetime, timedelta
from urllib.parse import quote
import time,sys
def run(Hide = False):
print('[jobscallme]',end='')
sys.stdout.flush()
chrome_options = webdriver.ChromeOptions()
if Hide :
chrome_options.add_argument('--headless')
c... |
e09c5751c69da78b5d6740c23c81c9ad569771ee | 4ab26cf316444170d190114f8c54c25fae29df5f | /the-file-system/ospath/ospath_main.py | a67f0b7fc11cea06eea610efe5516b66188db78f | [] | no_license | carltonf/pymotw-workout | 6bc72958871c7f0644e4cfe75eb60687cf830ca8 | c29037559dc2119783053c1ccc7211c15a95f38c | refs/heads/master | 2020-12-12T02:36:11.037109 | 2020-01-19T12:02:33 | 2020-01-19T12:02:33 | 234,022,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,444 | py | ospath_main.py | import os.path
print('-------------- split, dirname, basename:')
PATHS = [
'/one/two/three',
'/one/two/three/',
'/',
'.',
'',
]
for p in PATHS:
print('os.path.split:')
print('{!r:>18}: {!r}'.format(p, os.path.split(p)))
print('os.path.dirname:')
print('{!r:>18}: {!r}... |
14eac4f2407734f6885977d4245419acf0835eef | 30a50a515f99c5d30487ef7f7b06f0cdd427b0c9 | /api/serializers/seller_review.py | 479b40d2b738ae2e1423fb545ca5088634ef2b32 | [] | no_license | davidjfelix-legacy/instameals-services2 | c0b0c55c2f227f12c4fa776ea78cfcb611c3dc0f | b780de73adf059cc3cd1be6cb97c4a20873ca17b | refs/heads/master | 2021-01-18T19:16:34.596456 | 2016-07-17T16:07:42 | 2016-07-17T16:07:42 | 54,166,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | seller_review.py | from rest_framework.serializers import ModelSerializer
from .uuid import UUIDModelSerializerMixin
from ..models import SellerReview
class SellerReviewSerializer(UUIDModelSerializerMixin, ModelSerializer):
class Meta:
model = SellerReview
fields = ('id',)
|
6e2f5d61e7a9490db0779e5851821f6c4ffccd87 | fd0c223311526ede520d9911e1ab20e234b3567c | /Chapter3/c3-2.py | da30db6918b4c5dabedf98d3c3917932b9ccab68 | [] | no_license | yosho-18/PyTorch-Introduction_to_development | a3e912a4c65929d630bbfd828b846417ee4def44 | 8c1b8715381f073678ce0c0c2cd24db2ef165025 | refs/heads/master | 2020-07-03T16:03:38.635248 | 2019-09-28T13:07:39 | 2019-09-28T13:07:39 | 201,960,422 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,466 | py | c3-2.py | # DatasetとDataLoader
from sklearn.datasets import load_digits
from torch.utils.data import TensorDataset, DataLoader
import torch
# %matplotlib inline
from matplotlib import pyplot as plt
from torch import nn, optim
digits = load_digits()
# 0~9までの10種類の手書き文字の数字データセット
X = digits.data
Y = digits.target
# NumPyのndarray... |
7fdb4f574f9cee092367ca5036a3ff9180eae082 | 97664d3ad63018b329a59df83002029f5f6f01d1 | /notes/ho.py | d4fcfb61d1d4e9e9f8a553b4e008885ab66c2d1d | [] | no_license | paik11012/8python | a108ebea381a5d80f414c5aeff76760fe57b636f | 0190d2cd8f74a48106c85c646b17e5d3246c4b3e | refs/heads/master | 2020-06-19T23:59:22.720351 | 2019-07-25T07:28:06 | 2019-07-25T07:28:06 | 196,919,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | ho.py | # List comprehension을 활용하여 만들어주세요.
# words = 'Life is too short, you need python!'
# vowels = 'aeiou'
# result = [char for char in words if char not in vowels]
# print(''.join(result))
words = 'Life is too short, you need python!'
vowels = 'aeiou'
result = []
for char in words:
if char not in vowels:
resul... |