blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 220
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 257
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a3999bae68200d01e0d1c7cfcc0ba9cd188bd945 | 9d8bd40159f119cea1c2c3fd86743c5bc1d9907c | /examples/spatial_filter.py | 45583d7527bc32d44ff66ff560834c812c30a7f8 | [
"BSD-3-Clause"
] | permissive | mihaieduard/Diffraction-Simulations--Angular-Spectrum-Method | 70757b315d06de40c7914184b4015e53a5f3dd1f | 4ec7abcc1a726c5e7b65d05455cab2467fdca9cf | refs/heads/main | 2023-03-23T16:46:52.097425 | 2021-03-19T18:36:12 | 2021-03-19T18:36:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | from diffractsim import MonochromaticField, nm, mm, cm
F = MonochromaticField(
wavelength=632.8 * nm, extent_x=25. * mm, extent_y=25. * mm, Nx=2000, Ny=2000,power = 0.1
)
F.add_gaussian_beam(0.7*mm)
F.add_spatial_noise(noise_radius = 2.2*mm, f_mean = 1/(0.2*mm), f_size = 1/(0.5*mm), A = 0.2, N= 50)
F.add_lens(f... | [
"rafael.fuente.herrezuelo@gmail.com"
] | rafael.fuente.herrezuelo@gmail.com |
c1d95549cd754be59496169e8ee446c75643f18f | 62dd39e19d2b839d8e01f6d2d6b0d22bc348be77 | /test_PokerScoring.py | fad8fd4d48b9370a068e0d9f6f2e175b647a3093 | [] | no_license | MattMorris1996/PythonPoker | 6c6cc64f39c138dd2c4c73e5bf793f2b0f6cca33 | dd174f0019c618f4754d3630cd5f5bd66048d639 | refs/heads/master | 2020-12-04T14:46:18.741751 | 2020-09-01T23:23:42 | 2020-09-01T23:23:42 | 231,806,220 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,916 | py | import unittest
import PokerScoring
import CardDeck
import random
class TestPokerHands(unittest.TestCase):
def setUp(self):
# suit values
diamonds = 0
hearts = 1
spade = 2
clubs = 3
# duplicates setup
self.multiples = [CardDeck.Card(diamonds, 4),CardDeck.Ca... | [
"matthew.m1996@gmail.com"
] | matthew.m1996@gmail.com |
7df7704850cb5541240900662aa18de7e49573fc | ec9f242c13c271910cf9db0fb8202ab6f2fcdf9c | /Chapter_3/Chapter_3_1_1_1.py | 78c42c8309e6f85f8ca0065f4b9ca077ec018a47 | [
"Apache-2.0"
] | permissive | flytian/python_machinelearning | 0f32807c73e92b98b008cea1e6d8fb92702cb4fb | 004707c3e66429f102272a7da97e532255cca293 | refs/heads/master | 2021-08-30T12:52:20.259662 | 2017-12-16T07:16:29 | 2017-12-16T07:16:29 | 114,345,987 | 0 | 0 | Apache-2.0 | 2017-12-16T07:16:30 | 2017-12-15T08:23:23 | Python | UTF-8 | Python | false | false | 5,622 | py | # coding:utf-8
# 定义一组字典列表,用来表示多个数据样本(每个字典代表一个数据样本)。
measurements = [{'city': 'Dubai', 'temperature': 33.}, {'city': 'London', 'temperature': 12.},
{'city': 'San Fransisco', 'temperature': 18.}]
# 从sklearn.feature_extraction 导入 DictVectorizer
from sklearn.feature_extraction import DictVectorizer
# 初始化D... | [
"flytonus@sina.cn"
] | flytonus@sina.cn |
c5a0ff62b99e765cf2248885b7536589d03a6b90 | 13f6d3ff4764956d61ebb5ca8ad55927e2fea919 | /session1/list1.py | 81f398f7ba7f504c34d9d0da0abe33ab9c7f5198 | [] | no_license | Kit-Data-Science-Telecom-2021-2022/Kit-Data_Marie-Elisabeth-Campo | 73390bf073ee68843f34ca3e354142ba6c9397bf | 522cf35558401557aa74263d09ecc0d6ab3c55fb | refs/heads/main | 2023-09-05T22:35:18.090965 | 2021-11-07T23:24:07 | 2021-11-07T23:24:07 | 409,204,002 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic list exercises
# Fill in the code for the functions below. main() is already set ... | [
"marinette@gmx.fr"
] | marinette@gmx.fr |
8e6db07c7045df813af567ff7094d94f80b3b8c6 | fb6482e5d6c6f93b6d04165048e32ba47ab0f605 | /CSCI 127/Labs/lab12.py | ba610d51fe0d1d80d44ec6d31c607ae79398ced5 | [] | no_license | Risauce/Pre2015Code | 3a5a13bc38769708b151b9a790cf7ccfc0251574 | fc0e641e7bebbaeec8202550ece880b98b48c1fc | refs/heads/master | 2020-08-28T09:33:18.171859 | 2019-10-26T05:54:24 | 2019-10-26T05:54:24 | 217,662,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,931 | py | import numpy as np
import matplotlib.pyplot as plt
# -----------------------------------------------------
# CSCI 127, Lab 12
# November 21, 2017
# Your Name
# -----------------------------------------------------
def read_file(name):
input_file = open(name, "r")
number_buckets = int(input_file.rea... | [
"noreply@github.com"
] | Risauce.noreply@github.com |
d5f4573a4e213f3cc96fd81d923189be3a18f7b8 | e7b5561944ca0cbec321110e17618815e4ff627c | /backend/app/migrations/garpix_notify/0002_auto_20210720_2244.py | 9371a081124611fbdb04a0a27df63a7bec829035 | [] | no_license | AlexandrMikhailovich/cms_test3 | 3a6ac4be10ef7ae5bda2bfdaf2ff38ad9bc5c641 | 1579f853cc2c526f0fdaab9f14baf9659c23d178 | refs/heads/master | 2023-06-23T01:34:19.806972 | 2021-07-21T06:08:39 | 2021-07-21T06:08:39 | 388,012,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,345 | py | # Generated by Django 3.1 on 2021-07-20 19:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('auth',... | [
"Alexandr1990@gitlab.com"
] | Alexandr1990@gitlab.com |
92167807a2c7f1bf7c9b2fa2d8c101cf3984620c | 2f1a2a175bd3b6ef646b6329169dda18127e34b2 | /todoclass/urls.py | 2397da1dd7a14e1820678879959d92ca02b8dd8b | [] | no_license | Alisher007/todomain | 13608ca796a47b69f86ca709c1fafd2b424978b4 | cdd08a21f2bdd0b80bf2f6ae2ebc6825ed760869 | refs/heads/master | 2022-12-14T04:50:09.869081 | 2020-09-11T11:47:00 | 2020-09-11T11:47:00 | 294,675,849 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | from django.contrib import admin
from django.urls import path
from .views import TodoListView, TodoDetailView, TodoCreateView, TodoUpdateView, TodoDeleteView
app_name = 'todoclass'
urlpatterns = [
path('', TodoListView.as_view(), name='list'),
path('create/', TodoCreateView.as_view(), name='create'),
path(... | [
"alisher.khalikulov@jaresorts.com"
] | alisher.khalikulov@jaresorts.com |
db5af6c9ccb8290c2b3765b621537f4f20a2bf9b | fc85f6e336d4d5624af45d58e4d2b6a7b6edafaf | /image_diet/tests/test_commands.py | 2948470b1b1960159a208d6f7081a138281c1f53 | [
"MIT"
] | permissive | ArabellaTech/django-image-diet | 2d0cf77369035c2ebfe6685e2f4ffe347507e092 | dcf904d89f65a5123509a0718ef3758ea5674579 | refs/heads/master | 2020-04-05T22:54:17.661895 | 2016-07-25T07:35:21 | 2016-07-25T07:35:21 | 31,337,651 | 1 | 1 | null | 2016-07-25T07:12:47 | 2015-02-25T21:52:16 | Python | UTF-8 | Python | false | false | 1,018 | py | import os
from os.path import join, dirname
from shutil import copyfile
from django.test import TestCase
from image_diet.management.commands import diet_images
TEST_DIR = join(dirname(__file__), 'test_files')
class DietCommandTest(TestCase):
def setUp(self):
image_path = join(TEST_DIR, 'stockholm.jpg')
... | [
"markos@gaivo.net"
] | markos@gaivo.net |
05fc046d63ad0da119f177a76e959f80d9d8f37b | d184d1fc998a300feee2d716d97209b9fbc78468 | /probability.py | dbeb07713ae4103f2e739fabfa5eb51dd35d80c9 | [] | no_license | MickeyKen/plot_node_master_thesis | df196d7a037b1960c1ee95268a1ae3b1e8f24148 | 5182ea79cb8cfbc6bead60d97eda9307f7e53c10 | refs/heads/master | 2023-02-16T21:17:49.284973 | 2021-01-19T09:19:40 | 2021-01-19T09:19:40 | 330,574,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,316 | py | #!/usr/bin/python
import matplotlib.pyplot as plt
path = 'data/param_UD-v95_output.txt'
isServiceCount = True
ACTOR_NUM = 3
AVERAGE_NUM = 100
LIMIT = 5000
if __name__ == '__main__':
collision = [[] for j in range(ACTOR_NUM)]
average_collision = []
success = [[] for j in range(ACTOR_NUM)]
average_su... | [
"mickey333ff@gmail.com"
] | mickey333ff@gmail.com |
71d68c642a70a8d625599303258d762986ccd3f6 | 46537fe6906fa10ed515baf36598168ff948aeaf | /mq/apps.py | bd83a9c748c327fc22707100d3383b38124cd392 | [] | no_license | dima-kov/django-mq | 6b0538499a6091601ada1ecb962875d5f5634104 | 08c458780173e64785d30f87536121fa9e8a29ae | refs/heads/master | 2023-07-31T10:33:40.209376 | 2021-09-19T10:18:34 | 2021-09-19T10:18:34 | 408,092,675 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | from django.apps import AppConfig
class MqAppConfig(AppConfig):
def ready(self):
from mq.facade import QueuesFacade # noqa
| [
"dima.kovalchuk.v@gmail.com"
] | dima.kovalchuk.v@gmail.com |
bb45d0593e0bed3aa6c10277e34775a2e6257981 | 4a216a1d968cb3f3ed78f24def35773ed7c04459 | /main.py | c17f90b508427d9ff451d5ab5497d96d8f8826fd | [] | no_license | luizgdias/kafka_producer_topic_consumer | a43d15b40aed048271e37b64f24af3adf2fe47e2 | b4484ece16443423e7e1f2dfe16b5084e98f2abf | refs/heads/master | 2020-06-28T15:44:06.080711 | 2019-08-02T18:09:21 | 2019-08-02T18:09:21 | 200,271,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,230 | py | # -*- Coding: UTF-8 -*-
#coding: utf-8
#########################################################
# author: Luiz Gustavo Dias
# date : 07/23/2019
#########################################################
# At First time is necessary to run in terminal:
# $ docker run -d --name zookeeper jplock/zookeeper:3.4.6
# $ docke... | [
"gusttavodiias@gmail.com"
] | gusttavodiias@gmail.com |
056bd878933e3e8f3a603973ac2a820ac07bce18 | fd43e56e22254e8a653e32ad7262c1f41c670391 | /lcov/__init__.py | 468b86309784894323139b90053882aff64f7019 | [
"MIT"
] | permissive | hubiao7/scons-lcov | 0ba681537aa8b81d1e5668b4bc011c182bf47eee | 0c88bea03c787d001691f970faf5e9b7a3fe98ba | refs/heads/master | 2021-06-01T05:49:25.356588 | 2016-06-01T20:47:08 | 2016-06-01T20:47:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,068 | py | import SCons
from SCons.Builder import Builder
from SCons.Script import Dir, Flatten, Mkdir
from os import path
class ToolLCovWarning(SCons.Warnings.Warning):
pass
class LCovExecutableNotFound(ToolLCovWarning):
pass
def lcov_generator(source, target, env, for_signature):
cmd = ['lcov --capture']
... | [
"rhythm.mail@gmail.com"
] | rhythm.mail@gmail.com |
9f9baa8b7fa3b27ad62e12bd7f6621fcb8b83ba6 | 9bbf1cb7b0cd2444f2830efb696640ad42a2bfd4 | /python/__init__.py | 611fda76681e56175d3830d41a6a4dd31dbb5d14 | [] | no_license | idaohang/KalmanAnalyzer | aad4dfd209c1c160a5cdd8258d5ee77a01bfc769 | 12cdfc1f8ff480c2a2b8a5ca795eb982e1936ed9 | refs/heads/master | 2021-01-22T08:19:11.261942 | 2014-11-17T13:25:14 | 2014-11-17T13:25:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | #Automatically created by SCRAM
import os
__path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/UserCode/KalmanAnalyzer/',1)[0])+'/cfipython/slc6_amd64_gcc472/UserCode/KalmanAnalyzer')
| [
"e.bouvier@ipnl.in2p3.fr"
] | e.bouvier@ipnl.in2p3.fr |
466524b45d53aaa85ccff0695a52ed8c641b06bf | 8a0297dbf9b90f001077ba487f6d7c9263e1242b | /setup.py | 0205937a6520d9311cb7270c3353578328a97bbe | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | shea256/pybitcointools | b2173fe2735229380384460315f00185e3310d3c | f7223208e5ce260f27a447fcef22a98957e938c2 | refs/heads/master | 2021-01-17T11:52:18.686497 | 2013-12-10T02:13:02 | 2013-12-10T02:13:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | #!/usr/bin/env python
from distutils.core import setup
setup(name='pybitcointools',
version='1.0',
description='Python Bitcoin Tools',
author='Vitalik Buterin',
author_email='vbuterin@gmail.com',
url='http://github.com/vbuterin/pybitcointools',
packages=['pybitcointools'],
sc... | [
"vub@gmail.com"
] | vub@gmail.com |
145e5904cf2bc4e6e47030788b2461978b486ece | 6318f1458f9c6cca91cb00aa415638a599d8ba26 | /arcade/python/arcade-theCore/11_SpringOfIntegration/091_Combs.py | ec81b4e9bfbc202b226d08d5d49310be3d66ef37 | [
"MIT"
] | permissive | netor27/codefights-solutions | 836016a048086cd2bc644b2c40b7686102b6f179 | 69701ab06d45902c79ec9221137f90b75969d8c8 | refs/heads/master | 2021-10-28T13:04:42.940059 | 2019-01-16T23:12:08 | 2019-01-16T23:12:08 | 110,753,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | '''
Miss X has only two combs in her possession, both of which are old and miss a tooth or two. She also has many purses of different length, in which she carries the combs. The only way they fit is horizontally and without overlapping. Given teeth' positions on both combs, find the minimum length of the purse she need... | [
"neto.r27@gmail.com"
] | neto.r27@gmail.com |
11fffdf455b5b2de1d41093e5db837b67414fb80 | 5cd8fb2e84e5f50f39505a97e9021198700920e3 | /src/employees/models.py | 9e10dd1d3e77cc6a7f661f1a78ffe127e549711f | [] | no_license | danliu277/openbag_python | 81a597f72bfc943f8ff98e8b732fe7d6fb936999 | aef1596709042f66a93883d67114b5b08f8f504f | refs/heads/master | 2022-12-04T03:23:09.670440 | 2020-08-26T20:49:18 | 2020-08-26T20:49:18 | 287,374,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | from django.db import models
class Employee(models.Model):
name = models.CharField(max_length=120)
username = models.CharField(max_length=120)
password = models.CharField(max_length=120)
address = models.CharField(max_length=120)
email = models.CharField(max_length=120)
def __str__(self):
... | [
"danliu277@gmail.com"
] | danliu277@gmail.com |
b2a3440874508491785688101a4108cfd7f6edcc | 5d2ad10a424fd71cc2f12e1ca78d278362435c3b | /Day4/newPkg/src/myPkg/scripts/comp_sub.py | 4617429fc49187b0c83bde193dc654ee8ec0815b | [] | no_license | IsraaFahmy/ROS-training- | ec7034f55692c062ed42aa2cd9a63d9201db67e8 | 61924149a170292b9e7b049cfd704ed807c01e9a | refs/heads/master | 2022-12-03T00:51:11.341733 | 2020-08-23T22:06:41 | 2020-08-23T22:06:41 | 287,059,743 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | #!/usr/bin/env python
import rospy
from myPkg.msg import comp
def callback(message):
rospy.loginfo("complex number recieved: %d + %d i", message.real,message.imaginary)
rospy.init_node('comp_node2', anonymous=True)
rospy.Subscriber("comp_topic", comp, callback)
rospy.spin()
| [
"israafahmy@aucegypt.edu"
] | israafahmy@aucegypt.edu |
2baa1ddb9774e7deee027fc888daf5f6d3280f5e | a63bd0c2b9ce527a163ebc7f326316dc1d8c50b0 | /tests/fileSizeTest.py | b4346abaa5df91e031f403931282400d1a85f57c | [] | no_license | jan-polaczek/isodBot-demo | 902c20d49ffce225736f82a696fef69e914a7c44 | e963b1835f6706f526249f83237223557ef27f02 | refs/heads/master | 2020-06-04T16:49:33.686587 | 2019-06-15T18:20:45 | 2019-06-15T18:20:45 | 192,110,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,433 | py | import os,sys,inspect
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
from Registration import *
def run():
errorMessages = {}
number_of_test = 5
counter = 0
if Registration.fileSize('anonek.tst') ... | [
"jan.polaczek@interia.pl"
] | jan.polaczek@interia.pl |
5429b29c77f91823ead2f1173cbc0e47dd660763 | d95e6dbbcd0673b8adb81b4bd8c6bf5b8917a6c4 | /spatial_paper_data_archive.py | d4feb4e672e31530d051c3031367e3ff7b3d0e81 | [
"MIT"
] | permissive | Timothy-W-Hilton/COS_Spatial_Analyses | ab907c811605ab6cbd406451bd1dbb386e88695c | dfb6f99f8c7181739c2079936dce83a4d86f5c1f | refs/heads/master | 2021-01-20T20:39:00.748486 | 2016-06-17T20:56:25 | 2016-06-17T20:56:25 | 61,402,018 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,481 | py | """Calculate total size of COS spatial paper data files and copy the
data files to a single directory tree for archiving
"""
import os
import os.path
import shutil
from stem_pytools import NERSC_data_paths as ndp
def Get_Human_Readable(size, precision=2):
"""http://stackoverflow.com/questions/5194057/better-way-... | [
"thilton@ucmerced.edu"
] | thilton@ucmerced.edu |
f723cbdc7b1832a6b9940919ccfcb541b77cc299 | a6b010255c544b51edef707fa675a2f2f120c159 | /_site/lib/ml_level.py | 4e13a8dd97eb2bbb2361ca372f122f4491c5faa6 | [] | no_license | StonyBrookNLP/irene | f30d3dcdc5b336f4816c37017d6cbfd9d4eb80a5 | 54862c65f65bd4eb302344e110401d45c36af49c | refs/heads/master | 2023-07-18T03:54:40.400352 | 2021-09-08T22:01:28 | 2021-09-08T22:01:28 | 371,047,659 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,211 | py | import argparse
from typing import Tuple, List, Dict
import json
import copy
import pickle # may be change to dill?
from collections import defaultdict
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn import linear_model
from lib.tree_node import TreeNode
np.random.seed(13370)
def ... | [
"yklal95@gmail.com"
] | yklal95@gmail.com |
9041c058921688f8d5835b092cb95e45d74fffcf | 042f3881f11f9fc7f7d70aa8d7822c40f21c8fd0 | /crankycoin/__init__.py | 5526dd401e47ec089c0926d4f6b50b5e590db7c3 | [
"MIT"
] | permissive | benthomasson/crankycoin | 1e3801c06a1e9e217de0a171f2b6d5f6926d2446 | 37dc3048cef9b17745da0d21b0c9095a081a87a0 | refs/heads/master | 2021-01-01T15:21:37.481370 | 2017-07-17T09:00:04 | 2017-07-17T09:00:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 106 | py | from block import *
from blockchain import *
from node import *
from wallet import *
from errors import *
| [
"cranklin@gmail.com"
] | cranklin@gmail.com |
261f0667d897b235c0624553e90745571f971418 | 43e8e14e9ffa1a85d4383334d1e9bd0a041131fb | /setup.py | 5fc4d7d525f17172d05a6ce9bc7d98c975aaafbf | [
"BSD-3-Clause"
] | permissive | Python3pkg/PandaRSS | a952d24762ceec0e65a44859590a6e9e49ae49fb | 8e8727744c8a876b314879193ae01422831a76dd | refs/heads/master | 2021-01-21T17:38:48.551614 | 2017-05-21T17:48:59 | 2017-05-21T17:48:59 | 91,976,509 | 0 | 0 | null | 2017-05-21T17:48:57 | 2017-05-21T17:48:57 | null | UTF-8 | Python | false | false | 1,307 | py | #!/usr/bin/python
from setuptools import setup, find_packages
import pandarss
install_requires = [
'Twisted>=15.0.0',
'bottle>=0.12.7'
]
package_data={
'pandarss': [
'views/css/*',
'views/js/*',
'views/*.html'
]
}
setup(name='pandarss',
version='0.2',
author='panda... | [
"pandaman1999@foxmail.com"
] | pandaman1999@foxmail.com |
a5e6bca6ad202cb0a10c51af6c42e62ce5c65b3c | a113ca707799131092e5e5ad9feb71e69c3659e7 | /Employee_project/urls.py | 7816a4acebf308e0c7be98e0f351ad69e90bb4b0 | [] | no_license | thuytran-team/Employee_Project | 648680e9a1fb9ab7827ae17d21b569b05e007ccc | 6bf588b5d294da12a5cfb380b062203bfd68f9e2 | refs/heads/master | 2022-12-17T06:53:39.358047 | 2020-09-12T22:55:12 | 2020-09-12T22:55:12 | 295,039,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | """Employee_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cl... | [
"thuytran898@gmail.com"
] | thuytran898@gmail.com |
85e36f729f2df6e0df523fa8d40795f65a763c64 | 44576656e6be64c8a8f6823f989ecaae1ffc32c8 | /blog/migrations/0007_auto_20200225_2025.py | 456bf4d0c25b73c63c0ce130bb7946c4d9bdca5f | [] | no_license | Rainysponge/mysite | ecbaf5d08a0b4863894e9037af82d4c7b18818a7 | 4ee8aff0c5b90a91041853cea0a14d2a3d063144 | refs/heads/master | 2021-01-26T01:56:21.129558 | 2020-02-26T13:37:10 | 2020-02-26T13:37:10 | 243,265,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | # Generated by Django 2.1.15 on 2020-02-25 20:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0006_auto_20200212_1741'),
]
operations = [
migrations.AlterField(
model_name='blog',
name='content',
... | [
"375364412@qq.com"
] | 375364412@qq.com |
cbae2ad04a7ab972f74b8a1132069e8c30ab885a | dac5f6f1314fa1b2cc19ccc5e3f6ba35dcb04672 | /Loop_for.py | 2be2ca49cbe2584c3de74e2729b3d964c1b88a72 | [] | no_license | mohamedasa2019/PYTHON-ALL-CODE | f0942f3c37847dc301a4e873efdfa279dfa175f0 | 5ab782662c0c4489130b841cc0d953b5ef485bf5 | refs/heads/master | 2020-04-30T09:40:20.204921 | 2019-03-20T15:08:01 | 2019-03-20T15:08:01 | 176,754,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | def main():
L=[1,3,4.5,"hi"] # تستخدم for loop لطباعه كل عنصر قي سطر في
for item in L:
print(item)
if __name__ == '__main__': main()
| [
"noreply@github.com"
] | mohamedasa2019.noreply@github.com |
237ae19dcd1861ce4f5ee4f9d3bcf53f20e82e1f | ca152095b72ce93b6ca79042084f5ef70c658576 | /search_hparam.py | ae2d717cf0cdbbb6e9de860e789f8fc2287a1fcc | [] | no_license | fl16180/SeqModel | 72806eca1ec21b564262f8d444366a984ede7c64 | 3bba92bc23d0fef55a479f18e731c50e1feed186 | refs/heads/master | 2020-12-14T16:49:13.468564 | 2020-05-12T00:24:17 | 2020-05-12T00:24:17 | 234,813,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,639 | py | import argparse
import numpy as np
# hide sklearn deprecation message triggered within skorch
from warnings import simplefilter
simplefilter('ignore', category=FutureWarning)
import torch
from skorch import NeuralNetClassifier
from skorch.callbacks import LRScheduler
from skorch.callbacks import EpochScoring
from skl... | [
"fredlu.flac@gmail.com"
] | fredlu.flac@gmail.com |
add2368027110c4b923645c5840c3a6f70084c32 | a354f18367975097f0b19de816e763425e31f599 | /lists/admin.py | ea9e3c8fc9bfcb1226d740be04827446a4be89a3 | [] | no_license | egibney/listapp | 56f02c4a3311059aca0c73933241bff4d01f177a | f15875c304ff622985eb2dad7b8a20cc4def8b3f | refs/heads/master | 2021-01-22T17:47:59.312735 | 2012-09-14T03:04:55 | 2012-09-14T03:04:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | from lists.models import List
from lists.models import Item
from django.contrib import admin
admin.site.register(List)
admin.site.register(Item) | [
"epgibney@gmail.com"
] | epgibney@gmail.com |
2d2699072eae36c651fe088d627f69f90b657d58 | b39ec77a8f5a5779edcecf5a09c39224472fd139 | /Clase03/contar.py | 0b60d0a7381ff2765efd0891e4b3ce879ffe2a47 | [] | no_license | GonzaloMonteodorisio/ejercicios-python-unsam | 76b6288491ccba8f44b819c26bed4811268e995e | 37ba16197107717a4c582eb552175e1c981c286b | refs/heads/main | 2023-07-28T07:18:10.178029 | 2021-09-15T05:42:46 | 2021-09-15T05:42:46 | 406,627,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 56 | py | for n in range(10,0,-1):
print(n, end=' ') | [
"gonzalomonteodorisio@gmail.com"
] | gonzalomonteodorisio@gmail.com |
55dc1576cdd1996d90d1c4d72010b67b9c856d33 | a54809b430481f1b0047f046d412ffc3f0c7fe68 | /myenv/lib/python3.6/encodings/mbcs.py | fef3c7ee1eaa9a11983fb638e663bd09cc620156 | [] | no_license | vineet0713/PaaS-ProberS-AWS-EB- | 2521d4ee7e41e6d25c839cfea672d5706b4dbd85 | 1f9ca9e5d59ddcb3f94d7aaa96ca66719bc805cf | refs/heads/master | 2020-04-30T05:47:55.793035 | 2019-03-20T02:54:43 | 2019-03-20T02:54:43 | 176,635,164 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | /usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/mbcs.py | [
"vineet0713@gmail.com"
] | vineet0713@gmail.com |
71a4c69ae3c773949b3127804ef78ee861a60fee | f9407b6f9454640b35753a39ac3fc57c1a105630 | /parse_out_email_text.py | 16017ff5240a650c9e78703bc219d8a033e475aa | [] | no_license | saeidmoha/tools | 5e91c7efc79fe75a1a780565233cdcd9b23c000d | 18f20dfdade5a374c5ec2cbd71f4b661d61788db | refs/heads/master | 2021-08-14T14:43:31.181434 | 2017-11-16T02:00:27 | 2017-11-16T02:00:27 | 110,909,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,703 | py | #!/usr/bin/python
from nltk.stem.snowball import SnowballStemmer
import string
def parseOutText(f):
""" given an opened email file f, parse out all text below the
metadata block at the top
(in Part 2, you will also add stemming capabilities)
and return a string that contains all the words
... | [
"saeid@saeidm.com"
] | saeid@saeidm.com |
3c70c973d79447bece9afe2d49c5fd583a4173dd | 4bfe4afd1b1e11f9a03d8e3640aa297c875c076d | /demos/basic.py | 9a86954581726ae9f13bad67294d6355e90d696a | [] | no_license | pankajti/capstone | 81cdd2187e71e8d1bf327579b574ea7cf91a7e76 | af57a52d34dbcdd40e8e81f1d72c142263a98893 | refs/heads/master | 2021-03-02T09:49:51.054153 | 2020-07-09T02:28:58 | 2020-07-09T02:28:58 | 245,857,468 | 0 | 0 | null | 2020-03-22T00:54:01 | 2020-03-08T17:26:43 | null | UTF-8 | Python | false | false | 240 | py | from tensorflow.keras.layers import Dense,SimpleRNN
from tensorflow.keras import Sequential
import numpy as np
from tensorflow.keras.utils import plot_model
model =Sequential()
model.add(Dense(2))
model.add(Dense(1))
plot_model(model)
| [
"pankaj.tiwari2@gmail.com"
] | pankaj.tiwari2@gmail.com |
cc74a182310695445168f47a0e42b74f72ac72f7 | 6026c5fa42c561256510fd997286c21cb935690b | /volumeWidgets.py | be70dd6721a0fd5913db0939ec99b7a62eba1e57 | [] | no_license | frankbx/Volume | b5894e7ac13491e0c52af2ec39ebfea5a695ecf2 | 516815a1498e26b43d73f0c7f55da5fb2765b2d2 | refs/heads/master | 2020-04-03T22:40:43.346951 | 2017-03-13T04:37:05 | 2017-03-13T04:37:05 | 58,268,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,676 | py | import pyqtgraph as pg
from PyQt4 import QtCore, QtGui
# Create a subclass of GraphicsObject.
# The only required methods are paint() and boundingRect()
# (see QGraphicsItem documentation)
class CandlestickItem(pg.GraphicsObject):
def __init__(self):
pg.GraphicsObject.__init__(self)
self.flagHasDa... | [
"xiang.bao.frank@gmail.com"
] | xiang.bao.frank@gmail.com |
837341341225792eaf8191f24e39c25694df9f97 | 726d8518a8c7a38b0db6ba9d4326cec172a6dde6 | /0909. Snakes and Ladders/Solution.py | 29b98be3c2e7335ac5e219780c47380b948657d7 | [] | no_license | faterazer/LeetCode | ed01ef62edbcfba60f5e88aad401bd00a48b4489 | d7ba416d22becfa8f2a2ae4eee04c86617cd9332 | refs/heads/master | 2023-08-25T19:14:03.494255 | 2023-08-25T03:34:44 | 2023-08-25T03:34:44 | 128,856,315 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,069 | py | from collections import deque
from typing import List
class Solution:
def snakesAndLadders(self, board: List[List[int]]) -> int:
n = len(board)
visited = [False] * (n * n + 1)
queue = deque([1])
steps = 0
while queue:
size = len(queue)
for _ in range... | [
"yubowen.ssr@bytedance.com"
] | yubowen.ssr@bytedance.com |
c081b2cc5c19aacf9997f2dcf145d5c6d6a94c75 | a985c0797ed10fc7eef59c527b0490dbfeadd2af | /Docker Model/utils/makeprediction.py | c5e55cdb241d98d033c0a7d78c01784c14785250 | [] | no_license | etheleon/data-science-for-fun | 1bd0c9f04a8c5f0e533d42816a085c8e0656092d | 7488c3f9a3a0e36371905c71fdf7f2528e9d0e95 | refs/heads/master | 2021-07-23T14:21:08.860090 | 2017-10-30T02:30:43 | 2017-10-30T02:30:43 | 108,791,255 | 0 | 0 | null | 2017-10-30T02:19:55 | 2017-10-30T02:19:54 | null | UTF-8 | Python | false | false | 520 | py | from sklearn import datasets
from sklearn.neighbors import KNeighborsClassifier
def predict(inputFeatures):
iris = datasets.load_iris()
knn = KNeighborsClassifier()
knn.fit(iris.data, iris.target)
predictInt = knn.predict(inputFeatures)
if predictInt[0] == 0:
predictString = 'setos... | [
"A0134553@u.nus.edu"
] | A0134553@u.nus.edu |
4faba1910def77457e265813a6749d9fcdc2c9fa | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /ec2_write_3/managed-prefix-list_create.py | a37a54b7d58925db27ffcd48c98d760451977f82 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,393 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_three_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-managed-prefix-list.html
if __name_... | [
"hcseo77@gmail.com"
] | hcseo77@gmail.com |
73ea759b8c4f767004d46136a4cb1eec0f7feabe | eb99e1d5008f90e5a54724863dacba4878fb2cea | /tests/test_basic.py | 875207f11e43de580d9a19a086b9fd20315d8529 | [] | no_license | machow/hoof | fe529ef6573ecae35ba51704cd5c95c188c50295 | 4c9460492f283abd539ab3577982226efe15db5a | refs/heads/master | 2022-05-20T03:43:33.847717 | 2020-04-25T21:47:48 | 2020-04-25T21:47:48 | 256,900,890 | 1 | 0 | null | 2020-04-25T21:38:26 | 2020-04-19T02:56:58 | Python | UTF-8 | Python | false | false | 1,519 | py | from hoof import Hoof, AntlrAst
class Program(AntlrAst):
_fields = ["body"]
class BinaryExpr(AntlrAst):
_fields = ["left", "right", "op"]
class RunExpr(AntlrAst):
_fields = ["op", "expr"]
_remap = ["RUN->op"]
_rules = "RunExpr"
hoof = Hoof("hoof_examples.Expr")
class AstVisitor(hoof.Visitor)... | [
"machow@princeton.edu"
] | machow@princeton.edu |
46296617c7f07b0473680d71fe3811728becd60d | 5f3902453ad41436382bb77e3e6a06dfe94deaed | /ask7.py | b2b9666cc40348812f8a3686d3d5bcd7c8b2a150 | [] | no_license | dimitrisadam/askhseis | 23a6c45a33004c2b50837a42e10dae72479adc34 | 504f270056e2afa6e331bd501a8f476bf35dd991 | refs/heads/master | 2021-01-21T08:21:33.339580 | 2017-02-27T18:13:38 | 2017-02-27T18:13:38 | 83,341,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,647 | py | import tweepy
from tweepy import OAuthHandler
import sys
consumer_key = ''
consumer_secret = ''
access_token = ''
access_secret = ''
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
api = tweepy.API(auth)
#pairnei thn lista me ta tweets (sunolika 10).Ta bazei ta epe... | [
"mitsoseleysina2@gmail.com"
] | mitsoseleysina2@gmail.com |
e253dc4bc39f59c0d01f1734c35d33edfc76853a | c5e7926ffa9af44e3d3fea7c854c013898b8f346 | /scrap_tenders/scrap_tenders/items.py | da60390af0bf3875f87e8865f44838ec5e8df41d | [
"MIT"
] | permissive | Salomari1987/med-tenders-egypt | a821cd1064a5c68cbd7318c8ade254667692b7d9 | 31b5061fe28c56d5e9a8bb4b267148848bfeaf5a | refs/heads/master | 2021-01-19T18:32:36.773483 | 2017-04-19T00:36:02 | 2017-04-19T00:40:26 | 88,364,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
# from scrapy.item import Item, Field
#
#
# class StackItem(Item):
# Tender_Notice_Type = Field()
# Country = Field()
# Category = Field()
# Description... | [
"s.z.alomari.1987@gmail.com"
] | s.z.alomari.1987@gmail.com |
20635375b97f4e276fbfab8866c1ba60fc8aff05 | ffddf50985bd61a6bb4d7001fe838f8d5c709bf4 | /Builders/TechnologyBUILD | 3833e5eef716d6e008e45dbb6d8221286f31d5c2 | [] | no_license | NoahBarrett98/Lost-and-Found | 9a7216e401aa5f3e31da637f1c20e75d681eb12d | 0d828029c466aeda9e5aac27695d22335e574e26 | refs/heads/master | 2021-01-26T07:44:06.501000 | 2020-03-22T19:47:42 | 2020-03-22T19:47:42 | 243,370,004 | 1 | 1 | null | 2020-03-10T13:58:11 | 2020-02-26T21:31:06 | Python | UTF-8 | Python | false | false | 752 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 8 09:27:37 2020
@author: hannahmacdonell
"""
#H: Technology(itemID, tBrand, device, serialNo)
import random
import csv
d = []
c = open("device.txt", "r")
for line in c:
d.append(line.strip().split('\n')[0])
c.close()
l = []
c = open(... | [
"noreply@github.com"
] | NoahBarrett98.noreply@github.com | |
5c80ed9e14391ad32e4cc6fd9fcae8dce388c672 | 479518429066a4200b0c9ffbc42f22620dee1749 | /app.py | 5074f7904d2af983e17faf125c1a1f1f6874b9a4 | [] | no_license | nikhilkumarsingh/nitdhack | d2b4871c2aa3ef461c409a2f75e4f346759f1797 | 633ddf770c19fb8b0dd66479bc8e865e36181ffa | refs/heads/master | 2021-01-19T21:33:27.880021 | 2017-04-18T23:43:06 | 2017-04-18T23:43:06 | 88,665,337 | 0 | 1 | null | 2018-10-03T05:33:57 | 2017-04-18T19:59:40 | JavaScript | UTF-8 | Python | false | false | 1,291 | py | import flask
app = flask.Flask(__name__,static_folder='static')
app.config.from_object(__name__)
app.config['SECRET_KEY'] = '7d441f27d441f27567d441f2b6176a'
@app.route('/')
def home():
return flask.render_template('index.html')
def NearbySearch(lat,lng,keyword,radius=1000):
key="AIzaSyApuFoKxVMRQ2einlsA0rkx2S4WJj... | [
"nikhilksingh97@gmail.com"
] | nikhilksingh97@gmail.com |
48201b6182773eb907fb42c0093c1f0bf47efc96 | 853c189602a667990eda858db98d163fb597caa1 | /tfx/orchestration/experimental/core/constants.py | e5a5208afa70ef912a346dc02d4fe9ccce962866 | [
"Apache-2.0"
] | permissive | swap-10/tfx | 9bef96fc592810ed2d7dfa5dd60044c9ac481e02 | 8e80ce2486b4d7b219dcff906d6930e62c5fdd45 | refs/heads/master | 2023-07-15T22:54:18.642120 | 2021-09-06T06:17:48 | 2021-09-06T06:17:48 | 402,296,955 | 0 | 0 | Apache-2.0 | 2021-09-02T05:49:03 | 2021-09-02T05:09:23 | null | UTF-8 | Python | false | false | 823 | py | # Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
"tensorflow-extended-nonhuman@googlegroups.com"
] | tensorflow-extended-nonhuman@googlegroups.com |
1186138ee1bd98ce6cc3c24b6d4b5d7158920d79 | f81099738d3ab7d4a4773a04ed9e36e493632590 | /angelos-portfolio/test/test_domain_update.py | 2ccd8c81f1a7ea5f7e2d64656a9b8ccd5a5df49a | [
"MIT"
] | permissive | kristoffer-paulsson/angelos | eff35753e4d7e4465d2aadac39265f206b09fcf9 | d789f47766fe3a63a6752b92e4ea955f420dbaf9 | refs/heads/master | 2022-05-05T15:16:59.340527 | 2022-03-27T16:05:51 | 2022-03-27T16:05:51 | 142,691,235 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,287 | py | #
# Copyright (c) 2018-2020 by Kristoffer Paulsson <kristoffer.paulsson@talenten.se>.
#
# This software is available under the terms of the MIT license. Parts are licensed under
# different terms if stated. The legal terms are attached to the LICENSE file and are
# made available on:
#
# https://opensource.org/lice... | [
"kristoffer.paulsson@talenten.se"
] | kristoffer.paulsson@talenten.se |
a720e9e9dba4c9e67cd739029eb1e94d9b40b70b | 7b532a7d7c79601a5a8dd7beaf6b06e7a23b3666 | /Inception_model/softmax.py | 7f2dd55bc8779ae70bfbfb3f2fe90788f2300a17 | [] | no_license | lanardo/Image_processing_server | e3d3151cf825ebca01a64d851642bca0e99b0646 | 957ab8d82a453049885f85f440efcfc60c0e7d7f | refs/heads/master | 2021-05-14T13:13:27.358287 | 2018-07-04T19:41:06 | 2018-07-04T19:41:06 | 116,435,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,287 | py | import tensorflow as tf
import csv
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--input_dir", help="path to folder containing the trainning data")
parser.add_argument("--output_dir", help="path to folder containing the result coef files")
parser.add_argument("--restore", default="y... | [
"williams.lanardo@gmail.com"
] | williams.lanardo@gmail.com |
482b54447b3f7cd5d3fb519221920951b5b68ed0 | d9764a604c85c134ff217747d243eac8fe28e792 | /src/demo2.py | e3c0801f18c91206c2e18df08c2caacf8e0007bf | [] | no_license | afcarl/INF421-project | 5a0130c3ba6e0c767323001048d3f191379dbc6e | dc6eef684f6d277b6a9bbbc227a9e20a1525e115 | refs/heads/master | 2020-03-19T21:21:53.465240 | 2017-08-14T13:39:52 | 2017-08-14T13:39:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | py | #!/usr/bin/env python3
"""
Special notes :
This implementation supports MULTIPLE shortest path.
(except for the number_of_possible_locations_with_mindist_simple function)
"""
import random
from Graph import Graph
from algo import *
from unused import *
from Dijkstra import *
from util import timeit
from reach import... | [
"louis.abraham@yahoo.fr"
] | louis.abraham@yahoo.fr |
136b1182e8e9b3bb6006d82097af6a64457a1413 | 817965ef6ee70672eabedbbafe336ca07d6443ff | /0x0B-python-input_output/8-load_from_json_file.py | 34f8ae593948ca8fc24e3410cf357a351c626b5f | [] | no_license | julianfrancor/holbertonschool-higher_level_programming | f021086eb2a86b366c391452b13581c87587a3a8 | bd2a291c725ba09d88e9a629d0b22cf4ed7122e7 | refs/heads/master | 2022-12-23T05:27:27.942300 | 2020-09-24T21:22:56 | 2020-09-24T21:22:56 | 257,935,813 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | #!/usr/bin/python3
"""
function that creates an Object from a “JSON file”
"""
import json
def load_from_json_file(filename):
"""
Args
filename: JSON file form where the string
is going to be read
json.dumps() method can convert a Python object into a JSON string.
json.dump() method ... | [
"julianfrancor@gmail.com"
] | julianfrancor@gmail.com |
d6b4abc7fbe0628b62ce4ae5c4de91acedb25971 | 962feeffee41625ff841f6590f97bb09cef9be4c | /torch_glow/tests/nodes/avgpool3d_test.py | 93e26349ac4e677a2d89d2388568725436963f2f | [
"Apache-2.0"
] | permissive | SushantDaga/glow | 8c4c3fbc58c3ae760bdd8e1df2e8c05a72ff07bc | aab22c3e0421dadd29950c2ebfa88b86027cecf5 | refs/heads/master | 2022-11-03T08:39:33.958233 | 2020-06-19T17:03:14 | 2020-06-19T17:05:42 | 273,568,864 | 2 | 0 | Apache-2.0 | 2020-06-19T19:12:31 | 2020-06-19T19:12:30 | null | UTF-8 | Python | false | false | 860 | py | from __future__ import absolute_import, division, print_function, unicode_literals
import torch
import torch.nn.functional as F
from tests.utils import jitVsGlow
import unittest
class TestAvgPool3d(unittest.TestCase):
def test_avg_pool3d_basic(self):
"""Basic test of the PyTorch avg_pool3d Node on Glow.... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
5f1d4ae6e02e4e33bd1e5716d22ee7da2b0c0cbd | f774ccfe88871fbe37b52487253108144c07f968 | /exer95.py | d4a749738c38516b4e2e8805d75fdd3495a48c8e | [] | no_license | capy-larit/exercicios_python | 4bcfdc8985983dc69c63f315931c200c4c9f1100 | c92b8ff31e2eb0c87f2dfdad9d97149db6f1181e | refs/heads/master | 2023-03-23T05:29:07.409948 | 2020-09-08T22:42:48 | 2020-09-08T22:42:48 | 245,882,895 | 0 | 0 | null | 2021-03-15T21:43:15 | 2020-03-08T20:28:15 | Python | UTF-8 | Python | false | false | 675 | py | """
Faça um programa utilizando um dict (dicionário) que leia dados de entrada do usuário. O
usuário deve entrar com os dados de uma pessoa como nome, idade e cidade onde mora.
Após isso, você deve imprimir os dados como o exemplo abaixo:
nome: João
idade: 20
cidade: São Paulo
"""
def chamar_menu():
nome = input('... | [
"larissa.laritt@icloud.com"
] | larissa.laritt@icloud.com |
e1bea179688f6a672cd83a7f2b9f861bbb702425 | 4b5c21db88a80fcca418c0c8b431d93774d9336a | /envfarmaciaveterinaria/Scripts/viewer.py | fb21137537dab877fe83180aef6958ef73bea3df | [] | no_license | laMoradaPostrera/FarmaciaVeterinariaUnillanos | e9620b1b108ab53956a50e754dd7f339e237f150 | 2312ccee591c4991c3ee0627ea4815de65e7a1eb | refs/heads/master | 2020-10-01T23:43:19.395012 | 2018-06-14T05:15:36 | 2018-06-14T05:15:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,076 | py | #!c:\users\lenovo~1\mispro~1\unilla~1\farmac~2\envfar~1\scripts\python.exe
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
#
# an image viewer
class UI(tkinte... | [
"diegoasencio96@gmail.com"
] | diegoasencio96@gmail.com |
3e4c84c039144eaf018a0dbe4dfa92d68101bbe8 | f745231568d2f15c75a82638ffa4fd86c5b682ea | /assignment_4/shapes.py | 2856f2733a4a28e8f7ad12c5634c596f054b3aef | [
"WTFPL"
] | permissive | gauravjuvekar/ppl | c53dccd274e93207f543afc8ded787cff9319085 | fc5592623fa294c18a6e24444b9e06e2a08b2f6c | refs/heads/master | 2016-09-12T21:31:07.960658 | 2016-04-26T07:16:00 | 2016-04-26T07:16:00 | 57,103,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,886 | py | #!/usr/bin/env python3
import math
class Shape(object):
def __init__(self, turtle=None):
self.turtle = turtle
class Polygon(Shape):
def __init__(self, points, turtle=None):
Shape.__init__(self, turtle)
self.points = points
def draw(self, turtle=None):
if turtle is None:... | [
"gauravjuvekar@gmail.com"
] | gauravjuvekar@gmail.com |
f8a4758b89fce2ae01dfdac0c57540060c9a0e3f | 1f416c5f06c6ccf14e0f9778e52a2e556e6888b7 | /Config/ssd_config.py | 73fd796b7d333e67b702743a2931a59f96af67bd | [] | no_license | LLLibra/yolo-v3 | 0a8961b3e7c8d099174c72685176b82c3e627f59 | 6dedf28f5b9d07cb609dc1c91119c328d02b6e17 | refs/heads/master | 2020-09-24T17:54:22.993738 | 2019-12-28T08:04:11 | 2019-12-28T08:04:11 | 225,812,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | # -*- coding:UTF-8 -*-
from utils.ssd_loss import *
from Model.SSD import build_SSD
extras = {
'300': [[1024,256,512],[512,128,256],[256,128,256],[256,128,256]],
'512': [],
}
mbox = {
'300': [4, 6, 6, 6, 4, 4], # 最终特征图中每个点有多少个box
'512': [],
}
##SSD 300 config
voc = {
'num_classes': 21,
'feat... | [
"245407754@qq.com"
] | 245407754@qq.com |
7a8949c381732e07d4f492876a8541503b3d5db0 | 8f7b755a7d21332ae26a9d2e59dc0da00da8affb | /euler-081.py | ab42d76c52e73ce1d22a8a8550abf38c61c371fb | [] | no_license | msbelal/Project-Euler | 95204d1ea455f45a49e9ce517d427db80fe15e36 | 1eda6b8a1786f0613023193d3dcde3090edaac9a | refs/heads/master | 2020-04-12T12:07:41.921989 | 2012-04-01T15:41:12 | 2012-04-01T15:41:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | from __future__ import with_statement
with open ("matrix-81.txt") as f:
lines = [ line.strip().split(",") for line in f.readlines() ]
q = {}
for i in xrange(159) :
for j in xrange(0,i+1) :
x, y = j, i - j
if (0 <= x < 80) and (0 <= y < 80) :
if x == 0 and y == 0:
q[x,y] = 0
elif x == 0 :
q[x,y] = q... | [
"hughdbrown@.(none)"
] | hughdbrown@.(none) |
d43e3d2d2a4cade3e15bd4256deff2b47f891672 | 2e4c9dafb6fc03d48df9f80d506474b87438056d | /fibers.py | 55b6a4bd996a1723437447420a402201d3353313 | [] | no_license | ericwang915/pypbc | fd35d2d91d2f50c6b0353abc84b3dcd72261006f | 22c97949c549867103e667d998e8be2cfb1911a6 | refs/heads/master | 2020-06-11T00:01:54.795875 | 2009-09-23T09:00:41 | 2009-09-23T09:00:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,479 | py | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Basic functions to read and write TrackVis .trk files and to play
with fibers.
Copyright (c) 2009 Emanuele Olivetti <emanuele_AT_relativita.com>
This library is free software; you can redistribute it ... | [
"emanuele@relativita.com"
] | emanuele@relativita.com |
4120b422aab2e14830f4047978f9995ac06fa5c4 | 430722ea44c3704706f506554bb3ce64a7ee6596 | /tests/image/test_backbones.py | 60369275557cfe450f81d029b1bc533270f6f016 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license"
] | permissive | ethanwharris/lightning-flash | 462907c7e7dbbbf0840917ae72a67b5ddbdc7138 | 48bdfd86639aa4aad493d264cd8a6eeeb50a394f | refs/heads/master | 2023-06-07T10:06:06.672478 | 2021-07-12T11:55:15 | 2021-07-12T11:55:15 | 385,288,776 | 0 | 0 | Apache-2.0 | 2021-07-12T15:09:39 | 2021-07-12T15:09:39 | null | UTF-8 | Python | false | false | 2,080 | py | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
"noreply@github.com"
] | ethanwharris.noreply@github.com |
e9f935855c936f7be736e9cada0f8dfb9d5cbf2c | 6f444f025f27a10dd7b1bf61083ea2832ffcb196 | /backend/location/api/v1/serializers.py | f4a37f977e26a6abd08e6dffcee6108c10dadd98 | [] | no_license | crowdbotics-apps/ledger-wallet-29295 | 2fe0eee9e06cb1f5c8e514ad650df8276aac789b | d96542a71685ce6d335882c10cf840355c8252f7 | refs/heads/master | 2023-06-24T00:46:30.889717 | 2021-07-30T20:37:03 | 2021-07-30T20:37:03 | 391,182,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | from rest_framework import serializers
from location.models import TaskLocation, CustomerLocation, TaskerLocation, MapLocation
class CustomerLocationSerializer(serializers.ModelSerializer):
class Meta:
model = CustomerLocation
fields = "__all__"
class MapLocationSerializer(serializers.ModelSeria... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
8b95e2ada92485e2e3e8915583d7b6c7899d04f7 | 5022b48f311ba4710e1851855552b9546a3142c5 | /unittest/case_test.py | 3b355326b97f14c7a95801f1b8d7f47cb5b04d82 | [] | no_license | 18786262315/python_lx | a7a15a294312b8382c3d1fd97a8d0ede38f1c5a5 | a870d49cc4ca6efd1b54c2b89dfbf5e3d911a568 | refs/heads/master | 2020-03-21T12:37:30.748759 | 2020-03-18T09:31:31 | 2020-03-18T09:31:31 | 138,563,274 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,228 | py | '''
unittest条件断言
tester: cc
此文仅做翻译只用,不介绍具体使用
'''
Skiptest() # 在测试中引发此异常以跳过该异常。
_ShouldStop() # 停止测试
_UnexpectedSuccess() # 测试本来应该是失败的,但是没有失败
Skip() # 无条件跳过测试。
skipIf(condition, reason) # 条件为真时跳过测试
skipUnless(condition, reason) # 条件为假时跳过测试
expectedFailure(test_item) # 标记该测试预期就是失败,如果运行失败时,不算作失败用例。
_is_subtype(ex... | [
"843092012@qq.com"
] | 843092012@qq.com |
8904819a1aed374abfd0b4aa31c6e9d42770301e | be8190250b78ced1dbc94ae8c9774299621c3905 | /boxtree/pyfmmlib_integration.py | 812eae4aa4d044bb5f198e8d8b8674066014057b | [
"MIT"
] | permissive | Dracogenius17/boxtree | 45b03f67df5c9faaffccec25d480dde787cd15ac | 313159f001c5d8c4bbe68de65ed1077a954ce2f9 | refs/heads/master | 2021-05-02T02:36:42.958288 | 2017-12-13T16:44:23 | 2017-12-13T16:44:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 28,929 | py | from __future__ import division
"""Integration between boxtree and pyfmmlib."""
__copyright__ = "Copyright (C) 2013 Andreas Kloeckner"
__license__ = """
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 So... | [
"inform@tiker.net"
] | inform@tiker.net |
820ed298b2d0d51b64a647c759fec6a4a95c79e1 | 0c4b33d04cf7fb73b3752b03af89eeaf76b8a0d2 | /第14章-网络编程/client.py | 93a57207689113ca5cbd684fb77a81dba69d2db4 | [] | no_license | kingflyfly/python_study | 3b3ab427d23174b61b8f14c223059cfa9f303219 | 8a63a7c11b408bbc11a2b636517beaa424b37725 | refs/heads/master | 2020-06-11T01:39:52.655730 | 2020-03-24T16:09:39 | 2020-03-24T16:09:39 | 193,817,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = socket.gethostname()
port = 9992
# 连接服务,指定主机和端口
s.connect((host, port))
# 接收小于 1024 字节的数据
msg = s.recv(1024)
s.close()
print (msg.decode('utf-8')) | [
"542001608@qq.com"
] | 542001608@qq.com |
81f726744a38d25f6099ad36107663ac8a5d3212 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/stdlib-big-2805.py | b2c7ae07ef65cab60cc16a7073cc6a18c9d869b1 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,992 | py | # ChocoPy library functions
def int_to_str(x: int) -> str:
digits:[str] = None
result:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
73d6c871a33247c5a769ff502a2741d904f94c16 | 8813753442439c5408db80ed07a97f54ee90a115 | /check_memavail.py | 3a7da71db15642d156598096f164d05ee7b87032 | [
"Unlicense"
] | permissive | Rattkener/Check_MemAvail | 7a0e801e01ca9aa4677a9e9646b36c30881902da | e963636d7421533d0d0019c98805bfd810262af3 | refs/heads/master | 2021-06-20T14:16:11.478011 | 2021-05-06T20:37:21 | 2021-05-06T20:37:21 | 206,613,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,867 | py | #!/usr/bin/env python
#import#
import paramiko
import argparse
#end import#
parser = argparse.ArgumentParser(
description='Remote Memory check for Linux servers. Intended for use on OpsView/Nagios monitoring systems.',
usage = '%(prog)s -n [--hostname] HOSTNAME -w [--warning] warning%% -c [--critical] crit... | [
"29561978+ProficientPanda@users.noreply.github.com"
] | 29561978+ProficientPanda@users.noreply.github.com |
ace0c793df344ee3d16d8b97ce61547ac0670a0d | 7accb98587c694db57507468525261458e707138 | /fabfile.py | f12579758e7aff044a31e3975c7fa50ea643997a | [] | no_license | kotechkice/kicekriea | 47f6ce4b9fa162b3dafe8dda45c640876a3e4aeb | 6457e97aeea13f768488287abc4a8afcf40f8131 | refs/heads/master | 2021-01-01T03:46:39.199835 | 2016-04-26T05:57:16 | 2016-04-26T05:57:16 | 57,111,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | true | false | 22,058 | py | from __future__ import print_function, unicode_literals, with_statement
from future.builtins import input, open
import os
import re
import sys
from functools import wraps
from getpass import getpass, getuser
from glob import glob
from contextlib import contextmanager
from posixpath import join
from os.path import bas... | [
"wogud86@gmail.com"
] | wogud86@gmail.com |
5258a863174e0b8e1845a0504b06107374ae09f5 | 357eaed9e37bc97357261098e06a1219cfba73ff | /fpeg_helion/wsgi.py | 9cc2d70e23adb4bb095d5e1310b1c62a795b0075 | [
"MIT"
] | permissive | andrewschreiber/fpeg | 7acc6d39b7eb3fb6e662a5ac205f38f5372a3680 | 16fc3afb795040aea2e41216d6a9f88cedff2ba4 | refs/heads/master | 2021-07-12T09:19:31.461056 | 2020-06-30T21:43:17 | 2020-06-30T21:43:17 | 30,467,410 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 937 | py |
import bottle
from bottle import route, request, post, template
import logging
import json
import os
logging.basicConfig()
log = logging.getLogger("fpeg")
log.setLevel(logging.DEBUG)
STATIC_ROOT = os.path.join(os.path.dirname(__file__), 'static')
@route('/')
def home():
bottle.TEMPLATE_PATH.insert(0, './views'... | [
"Andrew Stocker"
] | Andrew Stocker |
4fe2cf1c3b72558c9e48a68238cf6abf7425b930 | 073e5c1775886ec42ed741378e682534e79bb856 | /kdb/MTS_patch.py | 3ff2e1324c47467096b8afed52a839baa28a898d | [] | no_license | tt9024/huan | 97edd01e280651720a7556ff75dd64cc91184a04 | 48dcc7ef0ea40902e33bc67faf0298736a3ebe6b | refs/heads/master | 2023-07-26T12:30:53.116852 | 2023-07-11T02:30:14 | 2023-07-11T02:30:14 | 134,997,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,463 | py | import numpy as np
import repo_dbar as repo
import l1
import os
import glob
import dill
# patch vbs of various barseconds
def patch_vbs(dbar, day, utc, vbs, barsec):
bar, col, bs = dbar.load_day(day)
if bar is None or len(bar)==0:
print('problem getting bars from repo on ', day)
return
# ... | [
"joy@joy.com"
] | joy@joy.com |
59c2ab248f18fdadf951a4ecbbc12b55c6db470a | 8e050e70e597102ccfebe9dce91cf804ae73260b | /cdd.py | 4b16530762ea2f40ef1414f12a4fa8da9fbb5d2a | [] | no_license | AngeloMendes/LogDel12 | aac23176f9bb3357f38443692285d735009b8f20 | 266c99f3185242ac8e4b6e04d1ba9d4f50ed0634 | refs/heads/master | 2021-03-24T23:14:16.468273 | 2020-03-15T23:49:38 | 2020-03-15T23:49:38 | 247,571,030 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,951 | py | #esse codigo eh para avaliar a qtd de grupos existem e agrupar os distribuidores
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
def get_name(names, lat):
for key in names['latitude']:
if names['latitude'][key] == lat:
return names['cl... | [
"contato.angelomendes@gmail.com"
] | contato.angelomendes@gmail.com |
18bd370f71f589cf2bcef712de9b7795ea1f4538 | d6a182d1ab766f47ccdfbb7862bf4cd4c1d5cf48 | /delete.py | 025abad5ef6777be447639a89ed1c3ee6a504fbe | [] | no_license | mlnsvbd/CRUD_SqLite_Python | e7db43bf154776b92b27f5489e563f3caf968b25 | 18f88ecb036017a92ac308f6aac3df3294e5192f | refs/heads/master | 2021-05-28T14:16:35.306800 | 2015-01-25T22:21:12 | 2015-01-25T22:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | import sqlite3 as lite
con = lite.connect('text.db')
cur = con.cursor()
sql = "DELETE FROM users WHERE id = '1'"
try:
cur.execute(sql)
con.commit()
print("Delete ok!!!")
except Exception as e:
print(e.args)
finally:
con.close() | [
"welser.m.r@gmail.com"
] | welser.m.r@gmail.com |
9af53ed594299e5bca7f79a0631bb772ce8737c6 | f2f96ef63c721dbc985dae99f294aa49e7c5fe48 | /Server/database/__init__.py | 5825c14821c76e90269bc986588ee40a40b21363 | [
"MIT"
] | permissive | Ricky-Hao/IMPK-Server | 6e44e7ea81563908dfad3ea6347b2ca0da6cbb0c | 786e24269e7cc506a82ae8aa0fa0d1df8c478f51 | refs/heads/master | 2018-09-25T05:17:24.551553 | 2018-06-07T05:42:20 | 2018-06-07T05:42:20 | 124,077,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 62 | py | from Server.database.database import Database
db = Database() | [
"a471558277@gmail.com"
] | a471558277@gmail.com |
0572ff0cec28243d6b72452f3f61deda3e6df64b | 5be2bbf713c09e4f03f29a1c2fd071f3a8e90b5f | /src/main/local.py | 684bfa9db184d454a15afb02d248836c50bdb193 | [
"MIT"
] | permissive | amrutadharmapurikar/hmr2.0 | 47a4c5ebfb64ce6349ad4e6446d84a033c8f0e05 | a566fe424618f4cbdefe6441f8b91c9efeaa1219 | refs/heads/master | 2023-06-26T08:06:10.593071 | 2021-07-12T00:58:49 | 2021-07-12T00:58:49 | 382,423,981 | 0 | 0 | MIT | 2021-07-02T17:54:05 | 2021-07-02T17:54:04 | null | UTF-8 | Python | false | false | 1,265 | py | import os
from datetime import datetime
from main.config import Config
from main.model import Model
class LocalConfig(Config):
ROOT_DATA_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
LOG_DIR = os.path.join(ROOT_DATA_DIR, 'logs', datetime.now().strftime("%d%m%Y-%H%M%S"))
DATA_DIR = os.p... | [
"alessandro.russo@allianz.de"
] | alessandro.russo@allianz.de |
722bf8448ff08e49ce1034f948b5d66e67fbe025 | 9eeddfe1707dfd5a899fab157432b77e4a4892b5 | /code/get_embeddings.py | eeab87a1e8ff1b27af73502273d48d2a0e725ac9 | [] | no_license | ksenia007/humor_recognition | f523870945480c8ba4a83a7cabb49e40da4a3073 | 2f4077ace36f1e961a30f358eb73ed21ded1ff6f | refs/heads/master | 2023-02-21T01:36:31.688257 | 2021-01-22T00:35:57 | 2021-01-22T00:35:57 | 261,538,901 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,111 | py | from dataset import *
from train import *
from models import *
import torch.optim as optim
import pickle
import uuid
import warnings
from helper_functions import *
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=UserWarning)
dataset_function = BasicWeigh... | [
"26440954+ksenia007@users.noreply.github.com"
] | 26440954+ksenia007@users.noreply.github.com |
d1a7559941c43363cdb920c3cdf95dfd113e5caa | 4ba0b403637e7aa3e18c9bafae32034e3c394fe4 | /python/PyProfiler/profiler6/test.py | bfa05d76fd1e3862c546d51554804efb9d66d939 | [] | no_license | ASMlover/study | 3767868ddae63ac996e91b73700d40595dd1450f | 1331c8861fcefbef2813a2bdd1ee09c1f1ee46d6 | refs/heads/master | 2023-09-06T06:45:45.596981 | 2023-09-01T08:19:49 | 2023-09-01T08:19:49 | 7,519,677 | 23 | 6 | null | null | null | null | UTF-8 | Python | false | false | 1,620 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2023 ASMlover. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright... | [
"ASMlover@126.com"
] | ASMlover@126.com |
94d547688e8c427036b8536f3210d9fa20b16541 | 792d26133b5504fef31ab56138db28a2c7f666db | /LINETCR/Api/Talk.py | be91375f5bef0da83ce54dbdd2d4ae6fbc4df023 | [] | no_license | GieVh4/aisya | 333f18f7806ca99d242213ef41248335ac111c4c | 6f14e06fa7c9df13d4830a435a11c1751b230038 | refs/heads/master | 2020-03-07T10:17:14.854975 | 2018-04-24T07:46:47 | 2018-04-24T07:46:47 | 127,427,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,662 | py | # -*- coding: utf-8 -*-
import os, sys
path = os.path.join(os.path.dirname(__file__), '../lib/')
sys.path.insert(0, path)
import requests, rsa
from thrift.transport import THttpClient
from thrift.protocol import TCompactProtocol
from curve import LineService
from curve.ttypes import *
class Talk:
client = None
... | [
"noreply@github.com"
] | GieVh4.noreply@github.com |
b9691e61dfe1e73f0cfed348461860d2ce4d6495 | 16ecabb5d9010c7fa4aebb8ab852f7c6a19193db | /src/0809.py | 0ba2428a1bbf7638358e2412cd9b40399abf0b68 | [] | no_license | LeeSM0518/OpenCV-python | 74ff0d899d291a35f9cd82d2ef37835a0c5ccdf2 | 46c234879f5d48876ca0888bdede8bfb347b7c30 | refs/heads/master | 2020-04-30T19:35:33.201278 | 2020-02-25T14:35:20 | 2020-02-25T14:35:20 | 177,043,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 535 | py | # 0809.py
import cv2
import numpy as np
#1
src = cv2.imread('./data/momentTest.jpg')
gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY)
ret, bImage = cv2.threshold(gray, 128, 255, cv2.THRESH_BINARY)
#2
##M = cv2.moments(bImage)
M = cv2.moments(bImage, True)
for key, value in M.items():
print('{}={}'.for... | [
"nalsm98@naver.com"
] | nalsm98@naver.com |
0fd5b6297580acd6887f5d68daa551292c7e1c7a | ab3e6cee73c76e1bda1ac8d4e9cb82286de757fe | /190605_Day7_Class_Model_CRUD/django/crud_review/boards/migrations/0001_initial.py | 998b0a6ce4811fcda7f8db94df926fc4d27a1226 | [] | no_license | arara90/TIL_django | cc961535feba95e55d531c90a5d274cb5ec5f02e | 5aa5fcb839dceb0abc9c5b09fdcb5a478dca34f4 | refs/heads/master | 2020-05-27T20:15:46.663200 | 2020-03-21T06:13:40 | 2020-03-21T06:13:40 | 188,775,950 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | # Generated by Django 2.2.1 on 2019-06-10 05:49
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Board',
fields=[
('id', models.AutoField(au... | [
"arara90@hotmail.com"
] | arara90@hotmail.com |
b08a51aeb6644672aa2d6a3f7fcc2d9b19c3f3a1 | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/insights/v20210401/data_collection_rule_association.py | e5cc8f03d180c23ad08149bb40a76e212462e4f5 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 12,201 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
"noreply@github.com"
] | morrell.noreply@github.com |
a2c60c899f14d1dd9b97de4c9161123df14940e5 | 753a569a2ce6466d236220d0ba8c61c39656cb87 | /BP_gradient_descent/gradient_descent.py | 6b569c8056faf552630e34d6a8c8f3d7eef9b218 | [] | no_license | RabbitTea/AI_DS-Learning | e26c5fa453bf5434ddbefbc323a94c74faaa282e | 66db4e6079c1210447776b3324b30b6667af2172 | refs/heads/master | 2020-04-05T18:00:27.943196 | 2018-11-21T09:45:17 | 2018-11-21T09:45:17 | 157,084,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,524 | py | #实现梯度下降算法
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import xlrd
#Some helper functions for plotting and drawing lines
def plot_points(X, y):#将两个类别的点按照标签绘图
admitted = X[np.argwhere(y==1)]
rejected = X[np.argwhere(y==0)]
plt.scatter([s[0][0] for s in rejected], [s[0][... | [
"354496262@qq.com"
] | 354496262@qq.com |
980bdcafecbd81a687de64b1aa498e359f541eb6 | 6a90c88cd3898a0936f83c7d2a8f713943d440db | /POSTagging/rnn_easy.py | 245cb834e3e35727bcafae2471703f73190745f7 | [
"Apache-2.0"
] | permissive | LindgeW/POS-Tagging | 3be4bc5da30444b22722a15e3e39350231d42c76 | 358570047e8ad8403bcab4a1e9e3b082b9bea5fc | refs/heads/master | 2022-02-17T23:21:58.504742 | 2019-07-25T09:11:03 | 2019-07-25T09:11:03 | 186,325,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,426 | py | import torch
import torch.nn as nn
'''
LSTMCell
输入: input, (h_0, c_0)
input (seq_len, batch, input_size): 包含输入序列特征的Tensor。也可以是packed variable
h_0 (batch, hidden_size): 保存着batch中每个元素的初始化隐状态的Tensor
c_0 (batch, hidden_size): 保存着batch中每个元素的初始化细胞状态的Tensor
输出:h_1, c_1
h_1 (batch, hidden_size): 下一个时刻的隐状态。
c_1 (batch, h... | [
"ncu151wlz@qq.com"
] | ncu151wlz@qq.com |
096c2a0a7401aae836823744ed882e946775d8c3 | 74309d28c3c966ab46fe1d7bd7c6d6ca9e7009d4 | /setup.py | 86192f497fb7f45cf50128f2fc1870d69363a8a8 | [
"MIT"
] | permissive | seporaitis/graphqlpy | c476b4632c3d117a95663ee88d1710a4999f22e7 | c16623a00a851a785eaef7b27a72c35d49b0c4a4 | refs/heads/master | 2023-01-05T06:52:14.647528 | 2017-09-07T20:56:48 | 2017-09-07T20:56:48 | 102,777,202 | 1 | 0 | MIT | 2022-12-26T19:45:27 | 2017-09-07T19:25:20 | Python | UTF-8 | Python | false | false | 1,497 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import find_packages, setup
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("__version__ ... | [
"julius@seporaitis.net"
] | julius@seporaitis.net |
bc0b91140f22fc81bcbba5bcd8f3452133cf725e | 207f0427e0ffb10941db14d8de08ccbeac83dac1 | /gmail.py | 45dc9d762624648a1e30049e1f655efb972a3d08 | [] | no_license | appollo88/py | 0d9182b64928bcda6be0a3a36906b6144371acd7 | 1644d3f45a9b948a76f2a08df046db05d2f329a3 | refs/heads/master | 2021-01-20T14:39:24.128069 | 2017-02-22T05:46:33 | 2017-02-22T05:46:33 | 82,765,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | """import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login("liuxun931@gmail.com", "lx061511")
msg = "YOUR MESSAGE!"
server.sendmail("liuxun931@gmail.com", "liuxun931@163.com", msg)
server.quit()
"""
# smtplib module send mail
import smtplib
TO = 'liuxun931@163.... | [
"noreply@github.com"
] | appollo88.noreply@github.com |
829fb8cdd606f109189879a5e3ad261af91f8278 | ca5bac9deca017e02b8af87ffaaa91d1eb6c6d07 | /Si_Nd/example_code/plot_2D_Seasonal.py | a194819969a902c3d8ba3f4bf7a50b45dd6fcae3 | [] | no_license | ndoyesiny/metrics_workshop | 36dcc0b444a8ab3b8a0f897c81ada142a5ba6ad1 | b74f062c27243eb0705eab367167d1fb9eaf0cd8 | refs/heads/master | 2020-06-14T10:29:58.282850 | 2017-03-30T11:20:19 | 2017-03-30T11:20:19 | 75,197,976 | 0 | 0 | null | 2016-11-30T15:04:27 | 2016-11-30T15:04:26 | null | UTF-8 | Python | false | false | 1,738 | py | '''
plot_Func.py
This function make some plot
Author: Siny NDOYE, December 2016
'''
import os
import iris
import iris.quickplot as qplt
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.basemap as bm
#import pdb
#def plot_Func(cube2plot,outpath,mnth,nlevc):
def plot_Func_SAT(cube2plot,figpath,mnt... | [
"siny@lodyn416.locean-ipsl.upmc.fr"
] | siny@lodyn416.locean-ipsl.upmc.fr |
4e98ab90157e2164c540617da24de059870e5e34 | 3071ce441681abbfea11c9cc5a5ba853aecff2d2 | /game_over.py | 56bb93d1293913866d464c7cc38a5f883a36e269 | [] | no_license | xodapi/python_learning | d75ffc7c8312f52be3c5123fd003537943d75fe7 | afd7ff56b8ccdfea42ccb3dc52ef25dfd44d3d68 | refs/heads/master | 2016-09-11T04:58:55.524656 | 2015-04-21T10:51:28 | 2015-04-21T10:51:28 | 28,742,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20 | py | print('Game over')
| [
"faneropi@gmail.com"
] | faneropi@gmail.com |
339289d6118565d385d545357077d0aeb36d8cc1 | 2a2def196a68319147631a4af93095d1a03de754 | /MuZero/game/gym_wrappers.py | 62ee3e3e4cc0c785f3b6090d3fd5fecc49ca4076 | [] | no_license | colindbrown/columbia-deep-learning-project | 8b7d2dc791046426ff6030ec52d1c9dddc99de3c | 9046552bd631270838b0e49a2b8c9c524d40f1ed | refs/heads/master | 2023-05-25T14:39:55.978535 | 2020-04-29T20:16:59 | 2020-04-29T20:16:59 | 248,585,231 | 2 | 2 | null | 2022-06-22T01:52:03 | 2020-03-19T19:13:58 | Jupyter Notebook | UTF-8 | Python | false | false | 631 | py | import gym
import numpy as np
class ScalingObservationWrapper(gym.ObservationWrapper):
"""
Wrapper that apply a min-max scaling of observations.
"""
def __init__(self, env, low=None, high=None):
super().__init__(env)
assert isinstance(env.observation_space, gym.spaces.Box)
lo... | [
"jayantsubramanian2020@Jayants-MacBook-Air.local"
] | jayantsubramanian2020@Jayants-MacBook-Air.local |
d5a4535689e5faed501055cb510fae7e65574690 | f4e7b66391205df44ea15e3bd9e93e4439393df0 | /inputcheck.py | 8037747f04d28cb4eb79fef72fd11160dbda0821 | [] | no_license | thakurakhil/chemical-NER | a2fcf93ad3bfaec95e3e6af42e75fe044354284d | 9b47ab96f178e0e665688e4bcaf677f44db2919b | refs/heads/master | 2021-08-08T20:36:15.448621 | 2017-11-11T04:01:12 | 2017-11-11T04:01:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | import csv
f = open('./inputtext/ninefilefeatures.txt', 'rb')
reader = csv.reader(f,delimiter='\t')
for row in reader:
if(len(row)!=8):
break
else:
for i in row:
if(i==''):
print row
break
| [
"singhakhil33@gmail.com"
] | singhakhil33@gmail.com |
1c6a094af068444ca3d28073d89315729267ff26 | e57613c79e9a7a014ae67c00ccaf7c8014011954 | /lab3/Ast.py | fbe23583ed7d7db393eef7caeaf51eec4008e320 | [] | no_license | szymon-rogus/CompilersLabs | cfebbab381e8ded24a122b03baba23c1a011b60b | d0f878bdaf8cf584ff28cd2449e2fe2dd4aa6c90 | refs/heads/master | 2021-04-02T15:28:58.725704 | 2020-06-10T09:01:59 | 2020-06-10T09:01:59 | 248,289,803 | 0 | 0 | null | 2020-04-30T11:44:18 | 2020-03-18T16:51:10 | Python | UTF-8 | Python | false | false | 6,214 | py | class Node(object):
def __init__(self, type, children=None, leaf=None):
self.type = type
self.leaf = leaf
if children:
self.children = children
else:
self.children = []
class BinaryExpression(Node):
def __init__(self, left, operator, right):
super... | [
"benroszko@gmail.com"
] | benroszko@gmail.com |
8d63e564dff2869969a823b0cef0bf2bc6eef4ef | 064a954c8dd7d50720aa8fa748d24e8495b8f7d9 | /OpenCv/字符投影.py | 0258d496027be7b77d2b2ad6e748db532e8445a9 | [] | no_license | xianyichi/keras | 73169c248dde73f0e49e19f117b21080d1b3ba14 | 7ca5ab7e0ef1291b97b985e5ec9c78785e2ff3ec | refs/heads/master | 2021-06-10T23:02:02.354669 | 2021-05-20T12:59:41 | 2021-05-20T12:59:41 | 182,005,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,386 | py | import cv2
import numpy
img = cv2.imread ('/Users/apple/PycharmProjects/keras/image/data/images/0_00h_0.png', cv2.COLOR_BGR2GRAY)
height, width = img.shape [ :2 ]
# print height, width
# resized = cv2.resize(img, (2*width,2*height), interpolation=cv2.INTER_CUBIC)
gray = cv2.cvtColor (img, cv2.COLOR_BGR2GRAY)
(_, thres... | [
"1369362296@qq.com"
] | 1369362296@qq.com |
1e342c9a885841dca5ceca8cad3414989c843045 | abd2a91cb26dd7ca8d3fca6f9c4f5ef9dea2f066 | /logReg.py | 95a8eee77371997300560c19e27f423c142fc9fc | [] | no_license | Saniewski/multiclass-perceptron | dd0018ce7cde93bec978c24e920853e19e16d938 | 36a475dc4c2f5142b5205259a69ee403248d6eea | refs/heads/master | 2022-04-15T07:13:44.429956 | 2020-04-08T20:20:12 | 2020-04-08T20:20:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,638 | py | import numpy as np
import matplotlib.pylab as plt
from sklearn import datasets
from sklearn.model_selection import train_test_split
from scipy.special import expit
from plotka import plot_decision_regions
class LogisticRegressionGD(object):
def __init__(self, learningRate=0.05, epochs=100, random_state=1):
... | [
"pawel.san16@gmail.com"
] | pawel.san16@gmail.com |
5d8cd2c7638647e1cdd05a42eaf90febc0a95726 | 5ebe757ed6a2a339525c349922a3218b9d2b3f94 | /lstm-language-model/preprocess.py | 3930b2bf16a8a4194f5abff4da1756b269b70a3c | [] | no_license | esun0087/self_parser | aa3ef6103c470c5f85627fe59e6d82239bcd63d6 | cae1f45be1c954839980334e16d343bfae27dbe6 | refs/heads/master | 2020-03-21T10:27:18.247597 | 2018-08-07T08:26:29 | 2018-08-07T08:26:29 | 138,451,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,516 | py | import torch
import argparse
import data
def preprocess(opt):
print('Begin preprocessing')
train_dataset = data.DataSet(opt.train_data, display_freq=opt.display_freq)
train_dataset.max_dict = opt.dict_size
train_dataset.build_dict()
print('Save training data')
torch.save(train_dataset, opt.trai... | [
"a1a2a3a4a5"
] | a1a2a3a4a5 |
7dd4a52eccf53f87ba02f0c31ca36819d8d641e7 | 6cd799da036e019e61ca25351c3c2b368aeda6f4 | /lossScreenTest.py | 30158367f332718455312c2b49e234747e0a7977 | [] | no_license | Tammon23/IceCream-Jump-recreate | d78f3c7c6352d8bef540df4cc5b182fdd76f543e | bfcdf2bb823b9ebae6e9e399c974f358d8d2c61e | refs/heads/master | 2021-05-09T20:56:00.489803 | 2018-01-28T03:47:05 | 2018-01-28T03:47:05 | 118,714,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | import math, random
import pygame
from pygame.locals import *
from settings import *
from functions import *
lossScreen = True
while lossScreen:
pygame.event.pump()
k = pygame.key.get_pressed()
if k[pygame.K_q] or k[pygame.K_ESCAPE]:
break
#start Splash screen
screen.fill(sBackground)
... | [
"Tammon2000@gmail.com"
] | Tammon2000@gmail.com |
4edfcf8e234bf582b8a3e06752421dff27a5d562 | 679b923d6ba62d00ab5ad8aef3f82f42df71a58c | /Server_Kapfumvuti_Patel.py | 3a730631bb548c6f480757df43a85d6b5b03bea9 | [] | no_license | GurenMarkV/Go-Back-N-Protocol | 957086dbca5e4c60ed18ff2ee418016cb102e8f6 | 949c3db7bd38cc9e09a847853bc45531517a3620 | refs/heads/master | 2020-03-18T22:30:12.789811 | 2018-05-29T20:21:56 | 2018-05-29T20:21:56 | 135,348,768 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,023 | py | # Project 1: Implementation of Go-Back-N Protocol
# Group Member: Daksh Patel ID: 104 030 031
# Group Member: Nyasha Kapfumvuti ID: 104 121 166
# Date: Mar 30th, 2018
import socket
import numpy
import time
import json
from random import randint
acked = [] # acknowledged packets
unAcked... | [
"noreply@github.com"
] | GurenMarkV.noreply@github.com |
8177accba9ea1009914fc04bc9522e187b19a4bc | 82008bbe06f77d17898565e20d08bf34bf28c313 | /test/functional/wallet_scriptaddress2.py | 4c431a5ed81f6d5e0aac1749f833e51d0f3e9782 | [
"MIT"
] | permissive | hantobi-europe/aox | 6e6884c852fcb08f8c5d89384c9ae60746d3f149 | 74cd6d07a0d4058648dbb5bc42d829a04a0e5327 | refs/heads/main | 2023-02-07T20:36:36.487504 | 2020-12-28T18:11:13 | 2020-12-28T18:11:13 | 323,902,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,968 | py | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test new aox multisig prefix functionality.
#
from test_framework.test_framework import BitcoinTestF... | [
"hantobieurope@gmail.com"
] | hantobieurope@gmail.com |
2489e16d137ef37dbe2ade7e983532c88dcf0e31 | 50c0726bb32c8b0229d4b354f95e4bf654faa374 | /Proyect-Lovelace/Molecular_Mass_Calculator.py | 231e21b22291e47128b97b9e2b0759d8985a4e4e | [] | no_license | JorgeAvilaG/programming-problems | 291dec9e90aebf3a7643082a5605b495d288253e | 1be1d845589bb430106c023ba5b10ae3a3517a1d | refs/heads/master | 2020-04-18T23:41:35.703093 | 2019-01-27T16:11:50 | 2019-01-27T16:11:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,034 | py | #This problem asks for a function to calculate the molecular mass for different compounds.
#This version passes the tests in the Proyect Lovelace but with complex formulas or special nomemclature
#will not work. Example: '(NCH3)3PO2' 'Ph3N'
import csv
import re
#A dictionary is used to load the atomic mass for each... | [
"noreply@github.com"
] | JorgeAvilaG.noreply@github.com |
d670fc71f610fb31b49e00a8c5c71b54ca6ed4ef | 83a59e255f681e85828399c6c2323f2cf0997e10 | /kibble/scanners/scanners/git-evolution.py | 8f4a83698faccdae147d2985f32bfb605884f6ff | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | kaxil/kibble | f4ab6f1039086adcb37c544c60bbbc27e8538128 | 96959acec06fed4d91d5da73fee1aa1200ffbb3c | refs/heads/main | 2023-02-01T03:14:53.813091 | 2020-12-16T23:04:45 | 2020-12-16T23:04:45 | 320,881,184 | 1 | 0 | Apache-2.0 | 2020-12-12T17:04:54 | 2020-12-12T17:04:54 | null | UTF-8 | Python | false | false | 8,447 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"noreply@github.com"
] | kaxil.noreply@github.com |
3f7354b9288836c07c2c87bd9ffea73108e2c462 | 5390bfe2cb9732547ca36d655bc206665b357e97 | /pytorch/audio_tf.py | c35a7dda5c040071bdcc5f92d87849bbad8e496e | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | vladbataev/nv-wavenet | 71682ad79e6107f44dd50726db27ce657280623a | 2e16155cef2a460bb7862df674a1b8fa074a5cab | refs/heads/master | 2020-03-28T17:11:06.953684 | 2019-08-02T14:35:05 | 2019-08-02T14:35:05 | 148,765,145 | 1 | 0 | BSD-3-Clause | 2018-09-14T09:14:19 | 2018-09-14T09:14:18 | null | UTF-8 | Python | false | false | 4,660 | py | import json
import librosa
import math
import numpy as np
import tensorflow as tf
LOG10_TO_LN = math.log(10)
LN_TO_LOG10 = 1 / LOG10_TO_LN
DB_TO_LN = LOG10_TO_LN / 20
LN_TO_DB = 20 * LN_TO_LOG10 # 20 as the power is proportional to power of amplitude
class AudioProcessor:
def __init__(self, audio_config):
... | [
"v.bataev@tinkoff.ru"
] | v.bataev@tinkoff.ru |
e0c97f958b39a77c224ebe75cd5b1fe26876f2f1 | 0c265021768e72b91b40d77e0c7d78fcf0e70935 | /Recursion/Module1/SumOfNnumbers.py | 6ea101cae243b483a2db6144bc28d7b927e62a97 | [] | no_license | pawarvishal/cninjads_python_problems | 0b49fb987cb3b8571ff0fe2e6f617174d36fc7d6 | 380fea5e9e507087dbb5743a30770cae2d9bc0ae | refs/heads/master | 2020-12-12T12:33:34.759314 | 2020-02-02T06:24:53 | 2020-02-02T06:24:53 | 234,127,793 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | # Calculate sum of n numbers
def sum_n(n):
if n == 0:
return 0
small_output = sum_n(n-1)
output = small_output + n
return output
num = int(input())
print(sum_n(num)) | [
"openstack.vishal@gmail.com"
] | openstack.vishal@gmail.com |
022da1ef07e8a25cde535e2903bacc012f2e4f9b | 74aa886d0e28c2792751a45a8392e9ffb8ca45e1 | /base/utils/type_utils.py | b73f49014a848cb05a500b6712c84a0fe733b36b | [] | no_license | bluesky139/MjolnirTornado | 16d7cb3ecb6748bd557396de471846f7f09bd860 | 18fd0567dbb167423d0079ed86d7b191fe1cb77b | refs/heads/master | 2020-06-01T05:24:43.707431 | 2019-12-27T07:05:05 | 2019-12-27T07:05:05 | 94,063,353 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,019 | py | import re
from base import *
class List(object):
@classmethod
def parse(cls, value, except_class=InvalidArguments, except_message='Can\'t convert list.'):
try:
return value.split('|')
except:
raise except_class('Invalid list format, %s', except_message)
class Int(object):
@classmethod
def parse(cls, val... | [
"bluesky139@gmail.com"
] | bluesky139@gmail.com |
a60cce92b01defcbf4760f93cdbc9f636e0e3cef | 1503bb33834c463657977765e821620f189a4685 | /p007.py | 79f340ac96bd0e0708ffbde2fc2002a0b35e7944 | [] | no_license | JackPound/Euler-Problems | 94a2ff36d92cc28c4a23586847698d33710f24b0 | fac5975d4fa323b3f992daedc12aec1246dbdb82 | refs/heads/master | 2020-03-22T20:53:26.655150 | 2018-07-12T22:51:57 | 2018-07-12T22:51:57 | 140,639,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
# What is the 10 001st prime number?
def is_prime(number_to_check):
prime = True
for x in range (2, number_to_check):
if number_to_check % x == 0:
prime = False
break
return prime
def prime_pos... | [
"jackpound@live.com"
] | jackpound@live.com |
fdec487f680975aba7bad02c2d5c07d9a4a332aa | a269305ed7ae331ce13a6581659d6c8eed98f81d | /demo14_sorted.py | 97e080c88a542a7f135f69332ebbb12dde1d41d6 | [] | no_license | Honfeil/pythonWorkspace | e3490330350ef862526029a4f441a14bf14281c7 | 25c7b8a7d665a69c9adb84f468abeb483b27b7d4 | refs/heads/master | 2021-01-15T17:50:16.677942 | 2017-10-07T16:19:51 | 2017-10-07T16:19:51 | 99,761,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | # -- coding:utf-8 --
# sorted()
li = sorted([35, 58, 42, 4, 65, 4, 5, 5, 2, 4, 55, 14, 5])
print(li)
li = [-5, 6, -7, 8, -9]
print(sorted(li))
print(sorted(li, key=abs))
# 字符串排序
li = ['Candy', 'Honey', 'atom', 'bust', 'Bug']
print(sorted(li))
print(sorted(li, key=str.lower))
# 复习map
li = list(map(lambda s: s... | [
"honfeil.163.com"
] | honfeil.163.com |
f555f4db1b57f5a3fdb41deb28cc1c6151bd4ea2 | 6cde76beabb943b4de4ab9f7516ebffca51f6da6 | /generate.py | ea8517289fa84e335e308416701d7c7449ebf6f2 | [] | no_license | A1exRey/ReflectionOfNAR | 801bf23eb098f03e663f89f553355f43eb6a7d9e | 79ed86873322d45cbfc28f98a4e224c961d5bad2 | refs/heads/main | 2023-05-13T23:00:54.703916 | 2021-06-01T11:01:02 | 2021-06-01T11:01:02 | 372,795,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,600 | py | #!/usr/bin/env python3 -u
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
"""
Trans... | [
"noreply@github.com"
] | A1exRey.noreply@github.com |
7918dfa9b23e9132b0e9ee1227ce130b85ce717a | 4dbb4e1c3e3c5c0471150cba23fbfb9592fbf1f4 | /accounts/forms.py | 1cf25e666b098a830eeb81df420fd1a842233215 | [] | no_license | OwenCookman/owen-webdev | 745f0c4a1735f4ce084c2094ab2425d3ca4ca925 | 9a912ba47a09597d0069884f0d603806d955cbe3 | refs/heads/master | 2021-09-29T10:46:37.210443 | 2021-06-21T12:46:29 | 2021-06-21T12:46:29 | 251,331,742 | 0 | 0 | null | 2021-09-22T18:50:34 | 2020-03-30T14:33:54 | JavaScript | UTF-8 | Python | false | false | 1,415 | py | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.core.exceptions import ValidationError
class UserLoginForm(forms.Form):
"""The form used to log in users"""
username = forms.CharField()
password = forms.CharField(widge... | [
"ozzycookman@hotmail.com"
] | ozzycookman@hotmail.com |
463e34a0ed580f880b1b6faaa67e1eb98751a792 | df6d070cf9b984d291dfe23df5b3dc11fe6a32ac | /old_scripts/CCCM/2010_dataset.py | c2154df67f5ef4e2877280570cc030a44c4b5279 | [] | no_license | tristanohanlon/climate-analysis | 5a439e4f08d6cae5a0f6cfec9bb5c5e4f59f122b | 7e8a97cf83a308772cc7bc3081b3f117cc0eeb6d | refs/heads/master | 2023-02-12T13:15:22.995914 | 2021-01-09T20:32:19 | 2021-01-09T20:32:19 | 184,121,830 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,476 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 5 09:26:33 2019
@author: Tristan O'Hanlon
"""
import time
import numpy as np
import os
from pyhdf import SD
import h5py
import matplotlib.pyplot as plt
###############################################################################
cccm21_cloud_free_area = []
cccm34... | [
"tristan.ohanlon@gmail.com"
] | tristan.ohanlon@gmail.com |
5cd5169112b0e7cc5061b202aed603c35d5262cf | 5ebdbc630bfdfc582a41d7e353e517604ab336ab | /Exec/SCIENCE/code_comp/analysis/plot_generator.py | db7190719ae0bfc4dc05d7b4d477646547dcf717 | [
"BSD-3-Clause"
] | permissive | pgrete/MAESTROeX | 661fd437caa1508dbc910772ba4d6ed8b551176a | 1d7e89365379eea57680f738f271c93d7f28e513 | refs/heads/master | 2020-08-23T17:24:46.488221 | 2019-11-01T21:31:27 | 2019-11-01T21:31:27 | 216,671,997 | 0 | 0 | BSD-3-Clause | 2019-10-21T21:52:22 | 2019-10-21T21:52:22 | null | UTF-8 | Python | false | false | 7,139 | py | #!/usr/bin/env python3
import yt
from yt.units import amu, cm
import os
import sys
import glob
import argparse
import numpy as np
import string
from collections import namedtuple
from functools import reduce
def parse_args():
# Argument information
description = """Generates plots of datasets using a specif... | [
"aliceharpole@gmail.com"
] | aliceharpole@gmail.com |
89af1b2212557b7e7be169b88220d18081782bf6 | 2e8e55636b879af65b7ba9753a8c11c8e30c0ebe | /src/controllers/__init__.py | 47264b39f17e5098a44049263628533c83ccb74f | [] | no_license | ScottBurleighHeads/Portfolio | 9db72161589892bd8bfb844bd7b854709c5dba0f | 2e2e1631ec98c096d9586af444aa0474b2b08cf5 | refs/heads/main | 2023-05-14T16:14:06.528988 | 2021-06-10T04:18:15 | 2021-06-10T04:18:15 | 351,339,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | from controllers.index import index
from controllers.aboutMe import aboutMe
from controllers.contact import contact
from controllers.project import project
registerable_controllers = [
index,
aboutMe,
contact,
project
]
| [
"scottmcarpentry@gmail.com"
] | scottmcarpentry@gmail.com |
cd443962bf7cf38b44666bf351ee733655fb1f43 | 539c7a9147965b248625b5bb3507737f141accf2 | /20_Funcs_Files.py | 9981781a1e970eb4b12316ebee246d94671f8b00 | [] | no_license | rtvalluri/LearnPythonTHW | 24c775ff43cb21cf49531d6ecf57c49810c61ea5 | 9104b53a25421a18ddd33b8d2a47ff3b13c3eea3 | refs/heads/master | 2021-01-10T18:34:12.352028 | 2015-03-02T06:55:11 | 2015-03-02T06:55:11 | 21,772,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 556 | py | from sys import argv
scriptname,filename = argv
def print_all(f):
print f.read()
def rewind(f):
f.seek(0) #to the starting of file
#f.seek(2) to the end of file
#f.seek(1) from the current position exactly
#f.seek(-3,2) to the 3rd byte from the end
def print_line(f):
print f.readline()
current_file = open(file... | [
"valluriraviteja@gmail.com"
] | valluriraviteja@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.