blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24b0969f347074dde7b34d9eb0ca632fc4327364 | 469cf0d322a3a0d14e3d3aa8a8975eba930c2485 | /experiments/utils.py | 4afdf94965a8a0a3548fb480638ffd7b34d4a520 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | DLwbm123/att_gconvs | 70394bd74eef043abeecd9a4feba9d57b6b2f010 | 872259cad49763fdcfa3e96e80b6b5c331adf084 | refs/heads/master | 2022-11-07T22:02:44.173434 | 2020-07-07T07:53:29 | 2020-07-07T07:53:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | import numpy as np
def num_params(model):
model_parameters = filter(lambda p: p.requires_grad, model.parameters())
params = sum([np.prod(p.size()) for p in model_parameters])
print(params)
| [
"dwromerog@unal.edu.co"
] | dwromerog@unal.edu.co |
295047c1a5bced9d866665ee801ef0a70d580617 | 635f5c838a0fd866ffcf727c56fb9b57bd130c53 | /ADSE13_125/merging/cc_anom_calculator.py | 874b530f5462a9b342ac15c669d675efc0d6fbe0 | [] | no_license | ExaFEL/exafel_project | 3e83aca036f5e3e94b1c6075aec9322c5a194b8d | 9c3a2769820e733704648d0d35c9e23279c8a50b | refs/heads/master | 2023-09-01T19:49:19.709792 | 2023-09-01T19:46:12 | 2023-09-01T19:46:12 | 91,735,247 | 0 | 5 | null | 2023-08-24T06:57:30 | 2017-05-18T20:32:28 | Jupyter Notebook | UTF-8 | Python | false | false | 1,187 | py | from __future__ import division, print_function, absolute_import
message = '''Pass in 2 half dataset mtz file and it should return CC_anom value'''
from iotbx import reflection_file_reader
from cctbx.array_family import flex
import sys
def run(mtz1, mtz2):
# read in mtz files
reflection_file_1 = reflection_file... | [
"asmit3@gmail.com"
] | asmit3@gmail.com |
b1f00c327467380c506ad0afdda9a0a52a98f0f6 | 9b0adb117f19c4a694c421207e0ac5065b46a1ce | /natuurpunt_cmis/__openerp__.py | fd2fbac21ef66daf61888ed7d6505f007a513168 | [] | no_license | smart-solution/natuurpunt-base | 50cd88d116c2d019cf7a0d77cf7167ac51055d12 | 8d44d422d1f777a2ec701a587e2f75e57a9f4059 | refs/heads/master | 2021-01-17T02:28:05.447739 | 2020-11-03T15:57:08 | 2020-11-03T15:57:08 | 39,185,966 | 0 | 0 | null | 2020-11-03T15:57:09 | 2015-07-16T08:35:14 | Python | UTF-8 | Python | false | false | 1,293 | py | # -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
#... | [
"joeri.belis@natuurpunt.be"
] | joeri.belis@natuurpunt.be |
de1d031d0e3f4f8412e64401493eb255b3891c8f | 7946dfd98e8b2cc03b100cfd72c52095783ef6d0 | /pdf_scraper.py | 94570eadea822c5b4faa78507b5a570fe314a621 | [] | no_license | nourouhichi/Scrapme | 709c53dc950e6f654de9f6f9577a316a045144db | 9bd912afb0cdd0f25057331a51482344e7261a26 | refs/heads/main | 2023-07-27T04:49:44.098666 | 2021-09-01T19:36:32 | 2021-09-01T19:36:32 | 340,412,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,709 | py | from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
import codecs
import io
import sys
import os
import re
def scraper():
# Specify the url
... | [
"noreply@github.com"
] | noreply@github.com |
8f344cb73443082ee006077b541cde87ab3ec719 | 193e18687ac40bffaaf87462935960989ac8c3b3 | /app_modules.py | ce9c73cee119bfca1ef912ee4cf40d873a5bc646 | [] | no_license | wejustwantsleep/data-analysis | 3ff6509b8a07d1ea73aec23b243ddb33ba61ade2 | a02bd4759781dbd45bb155a638aa850873de0449 | refs/heads/master | 2023-05-04T13:57:43.319858 | 2021-05-30T06:42:10 | 2021-05-30T06:42:10 | 372,142,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py |
# GUI FILE
from ui_main import Ui_MainWindow
# 서브 GUI 파일
from ui_sub import Ui_SubWindow
# IMPORT QSS CUSTOM
from ui_styles import Style
# IMPORT FUNCTIONS
from ui_functions import *
# Sub GUI Function
from ui_subfunctions import *
## ==> APP FUNCTIONS
from app_functions import *
| [
"84782837+wejustwantsleep@users.noreply.github.com"
] | 84782837+wejustwantsleep@users.noreply.github.com |
446995ae6e5fdca25e665c1c1ccc611cc0762647 | 59c16cc6c8db9dfc0a72102b661e064cc79f2095 | /maximum.py | 07841b7125729e470bff8165c27472823cf93dde | [] | no_license | Ernest-Macharia/Data-Structures-in-Python | 2fa1b29b4fde4df5d91dda8e8d41813fe44265d9 | 13048b56a8037c1a6a335fb23220e241a9920af0 | refs/heads/master | 2022-07-31T01:37:46.295116 | 2020-05-18T16:34:15 | 2020-05-18T16:34:15 | 264,999,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | #string
x = "bag"
print(max(x))
#list
y = ["money", "post", "pricing"]
print(max(y))
#tuple
z = ("Ernesto", "Kigo", "Wanjiru")
print(max(z)) | [
"ernesthuku@gmail.com"
] | ernesthuku@gmail.com |
6ad326d685fd833c1472b2880dd46e33631efef2 | ccc97be67244855a847d682a525479d8d861005c | /profiles/migrations/0009_alter_coach_plan.py | ad34e8ababed7fd8c0531df2572e5253aff4b0d7 | [] | no_license | Code-Institute-Submissions/alychinque-my-coachee_SepResub | bfb20e5ced6eae8d631a6e3c69681ec55c66b981 | f138eaf4ff3a6fd953b98f022dbede26be57123c | refs/heads/master | 2023-08-28T19:12:13.545377 | 2021-10-04T10:50:16 | 2021-10-04T10:50:16 | 413,435,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 480 | py | # Generated by Django 3.2.4 on 2021-10-03 10:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0008_alter_coach_plan'),
]
operations = [
migrations.AlterField(
model_name='coach',
name='plan',
... | [
"alychinque@gmail.com"
] | alychinque@gmail.com |
439573e544eeaa3fb9c9ce2a134bb59042694d57 | c1e93acb58f683ad40ccf0188192efc8426060cb | /flaskblog/main/routes.py | ebded2cd8681021efb2049bf20ac6b898f04d90d | [] | no_license | anuj-jaryal/flask-blog | 7203f6c3fddd63c364119cfedc0467b42f0c6ab8 | 018c10bc6d27e83da8209aa4aa74b36ee78e0072 | refs/heads/master | 2023-07-16T06:12:15.695027 | 2021-09-03T06:50:47 | 2021-09-03T06:50:47 | 402,673,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | from flask import render_template, Blueprint
main = Blueprint('main', __name__)
@main.route('/')
def home():
return render_template('home/index.html')
@main.route('/about')
def about():
return render_template('home/about.html')
| [
"anuj@ourdesignz.in"
] | anuj@ourdesignz.in |
ce9a504baf33919b24dc53bdf46a87dc45cd164e | fa45fe7eaba7ef7c27ecf95db7c460ca189ce0d4 | /everydays/day002/flask_test/hm_07_helloflask.py | c5e844f1d49376ac75384f887e29197ae23fd8cb | [] | no_license | jake20001/Hello | be1a2bb5331f2ad4c1d8f30c6a9a530aff79e605 | 08217871bb17152eb09e68cd154937ebe5d59d2c | refs/heads/master | 2021-07-10T09:48:15.883716 | 2021-04-23T14:49:03 | 2021-04-23T14:49:03 | 56,282,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | from datetime import timedelta
from flask import Flask, session,jsonify
app = Flask(__name__)
# 设置应用秘钥会被用于session签名
app.secret_key = 'test'
# 设置session过期时间 默认31天
print(f'默认过期时间: {app.permanent_session_lifetime}')
# 通过赋值一个 timedelta 对象来修改 session 的过期时间
app.permanent_session_lifetime = timedelta(days=0,seconds=20)
print... | [
"jianke.zhang@beantechs.com"
] | jianke.zhang@beantechs.com |
8cce70bd3c55dcc1923e46f3c5349ea9c70d3833 | e418d71e647079efc1cab228afb3dda13d9df14b | /news/urls.py | b35b24f5164c0b43b8ac164d608b0bfc77c31a7b | [] | no_license | Frankline-Kiplangat/moringa-tribune | 4e0fc08f2df945acdfed0d3e766e641f83b37e09 | 336cd728207d433959eb1ec9ff7839224e517a13 | refs/heads/master | 2022-11-29T22:00:37.592496 | 2020-07-28T12:59:17 | 2020-07-28T12:59:17 | 283,212,873 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | from django.conf.urls import url
from . import views
urlpatterns=[
url('^$', views.welcome, name = 'welcome')
]
| [
"kipfrankline@gmail.com"
] | kipfrankline@gmail.com |
c9979f423a456cb880b77c2b8a584ec0c5691070 | b007d88e6726452ffa8fe80300614f311ae5b318 | /educative.io/coding_patterns/hash_maps/isomorphic_string.py | 3f2177702a7f146a99345b2c40f7a05c9cd83761 | [] | no_license | jinurajan/Datastructures | ec332b12b8395f42cb769e771da3642f25ba7e7f | 647fea5d2c8122468a1c018c6829b1c08717d86a | refs/heads/master | 2023-07-06T14:42:55.168795 | 2023-07-04T13:23:22 | 2023-07-04T13:23:22 | 76,943,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,731 | py | """
Given two strings, check whether two strings are isomorphic to each other or not. Two strings are isomorphic if a fixed mapping exists from the characters of one string to the characters of the other string. For example, if there are two instances of the character "a" in the first string, both these instances sho... | [
"jinu.p.r@gmail.com"
] | jinu.p.r@gmail.com |
8681e67c556768c6c046339c0b3ff64bb0807e64 | 63463bc0976c768406273edd04fbae483d34fbe2 | /setup.py | cc95fdb3f09530b302be185aed7dbed78b673031 | [] | no_license | drnextgis/sport_venue | b894e212d1899f44d0382b615bd21f2dce493996 | 43c097e4b91a7b26e6839a8c1b1be2e2765d05cf | refs/heads/master | 2021-01-01T03:44:59.222224 | 2016-05-31T04:21:20 | 2016-05-31T04:21:20 | 57,450,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | import os
from setuptools import setup, find_packages
requires = [
'pyramid',
'pyramid_chameleon',
'pyramid_debugtoolbar',
'pyramid_tm',
'SQLAlchemy',
'transaction',
'zope.sqlalchemy',
'waitress',
'psycopg2',
'pyramid_sacrud',
'ps_alchemy',
]
setup(name='sport_venue',
... | [
"rykovd@gmail.com"
] | rykovd@gmail.com |
a5c866848db0a2d103e4eccf93def3588d598874 | f20da8440bae10fe73900f787fc7781f23196325 | /downsample/downsample_dense.py | ad5654289ac0181edcac53448c9e825628577396 | [] | no_license | ramesh720/recipe_zs2017_track2_phoneme | 9c5cdb3066a84e5059153b1390802e700c66978e | f8bbd9b8e6ae4f542e52c2582eab1cf166923226 | refs/heads/master | 2020-04-29T11:07:47.406768 | 2018-01-13T13:03:46 | 2018-01-13T13:03:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,364 | py | #!/usr/bin/env python
"""
Perform dense downsampling over indicated segmentation intervals.
Author: Herman Kamper
Contact: kamperh@gmail.com
Date: 2015-2017
"""
from datetime import datetime
from os import path
import argparse
import cPickle as pickle
import numpy as np
import scipy.signal as signal
import sys
OUTP... | [
"kamperh@gmail.com"
] | kamperh@gmail.com |
b95feeca262a9036432d30423ce62dd23cffdd32 | 415fcefe59c8d33bc3f8b0784d48a7509ea7d5da | /addanother_example/models.py | f005bc5f0ebd821cc308a8ef2e021933eecd6f68 | [] | no_license | asifpy/django-quickstart | 6f517699375015584a7d17f112b70b8eeff89762 | 0ff625915cf169d3fb2f9646d9838260629c1576 | refs/heads/master | 2021-01-11T11:19:22.446634 | 2017-05-04T05:28:55 | 2017-05-04T05:28:55 | 72,719,312 | 2 | 1 | null | 2017-05-04T05:28:56 | 2016-11-03T07:24:32 | Python | UTF-8 | Python | false | false | 795 | py | from django.db import models
class Team(models.Model):
name = models.CharField(max_length=20)
def __str__(self):
return self.name
class Player(models.Model):
name = models.CharField(max_length=20)
current_team = models.ForeignKey(
"Team", related_name="current_players",
he... | [
"saluasif@gmail.com"
] | saluasif@gmail.com |
dc4ba9522892d2b29251cd8eab33b73c5fffbcf8 | 2d2c10ffa7aa5ee35393371e7f8c13b4fab94446 | /projects/ai/mrc/haihua/mrc_guwen/loss.py | b36544f5e4359d2393243aba18e0a179e657b745 | [] | no_license | faker2081/pikachu2 | bec83750a5ff3c7b5a26662000517df0f608c1c1 | 4f06d47c7bf79eb4e5a22648e088b3296dad3b2d | refs/heads/main | 2023-09-02T00:28:41.723277 | 2021-11-17T11:15:44 | 2021-11-17T11:15:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,067 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
# \file loss.py
# \author chenghuige
# \date 2021-01-09 17:51:33.472128
# \Description
# ==================================================================... | [
"chenghuige@gmail.com"
] | chenghuige@gmail.com |
be00130b2738c88fe5d3877bc9bc0607dd24e5a1 | 8220a7bf1189002b9e59259c971afab6e2b46948 | /bullet.py | 613ae21dcf8701c5595e7f379bf3fae74970b85a | [] | no_license | YowFung/CodeWarGame | 1003b964dbee89afe468cfe6c1fba91573aeed17 | a72b83cf5b62f44dbd5efa57372a6d9ded797cda | refs/heads/master | 2020-06-06T07:52:02.045936 | 2019-06-20T01:10:48 | 2019-06-20T01:10:48 | 192,683,032 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,954 | py | import pygame
# 定义常量
DIRECTION_UPWARD = 0 # 方向:向上发射
DIRECTION_DOWNWARD = 1 # 方向:向下发射
LAUNCHER_HERO = 0 # 发射者:主角
LAUNCHER_ENEMY = 1 # 发射者:敌机
class Bullet(object):
"""
子弹类
"""
def __init__(self, config, game, default_pos, launcher, direction, bullet_type=0):
"""
构造方法:初始化子弹
:param config: 游戏配置对象
:... | [
"yowfung@outlook.com"
] | yowfung@outlook.com |
620f04f48552c6843b61711ebe8a8794bf4ede01 | 5d386f40d141dbc9f536d1fc94322710ea0f0234 | /Practice Exams/Practice Exam 1/practice_exam_1.py | 5928c669cf8a499c58be55a16de13d8e8b385deb | [] | no_license | oescob16/CS2302-Data-Structures | e07da1313d14fa8708e765248d4ad27543c33e89 | c89b5e354887df0e998b295b0101a5fdf5ddf818 | refs/heads/master | 2022-07-15T03:19:26.629355 | 2020-05-19T23:21:54 | 2020-05-19T23:21:54 | 264,374,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,996 | py | import numpy as np
import matplotlib.pyplot as plt
import math
import singly_linked_list as sll
def set_drawing_parameters_and_show(ax):
show_axis = 'on'
show_grid = 'True'
ax.set_aspect(1.0)
ax.axis(show_axis)
plt.grid(show_grid)
plt.show()
def nested_squares(ax,n,x0,y0,size):
... | [
"noreply@github.com"
] | noreply@github.com |
a511646d6604a9c524b484c4ff7546e7ca14116e | bc167f434158921bcf2c678155c5cdfec1c9b0c9 | /PI_code/simulator/behaviourGeneration/firstGenScripts_preyHunter/behav457.py | 245f22a2fc444ac2254832c1c88ff8828465938b | [] | no_license | s0217391/DifferentProjects | 6450efc89c64ecd21b86c705737e89e5c69433a6 | 7f4da153660817b6cbf72d2e823aa29c0c2f95a9 | refs/heads/master | 2021-01-17T02:58:46.219240 | 2015-05-26T22:45:46 | 2015-05-26T22:45:46 | 34,995,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,209 | py | #!/usr/bin/python
import sys
def compute(prey):
temp0 = -1 * prey[1]
if temp0 != 0:
temp1 = temp0 / temp0
else:
temp1 = temp0
temp0 = -1 * prey[1]
temp1 = temp0 * prey[0]
if temp0 != 0:
temp2 = temp1 % temp0
else:
temp2 = temp0
temp3 = temp1 + prey[1]
if temp2 > temp0:
if temp3 != 0:
temp3 = temp... | [
"i7674211@bournemouth.ac.uk"
] | i7674211@bournemouth.ac.uk |
6bea768e59c3e54463a70a4fb271ffb0ecef73fb | 67f7b3c56261a36c5d54cd895636f6778350012c | /singleton/test_singleton.py | 06cbf8b8c0e2fb3e981971299235ae0bae438d92 | [] | no_license | Va1da2/practical-python-design-patterns | 3b242314b3672d8d3295861ed72e60ac8824400b | db4baf1e600464da83472976c998dcabab9d2222 | refs/heads/master | 2020-03-28T02:20:21.728496 | 2018-09-05T18:12:43 | 2018-09-05T18:12:43 | 147,563,578 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | "Test singleton example object."
from singleton_object import SingletonObject
obj1 = SingletonObject()
obj1.val = "Object value 1"
print("print obj1: ", obj1)
print("---")
obj2 = SingletonObject()
obj2.value = "Object value 2"
print("print obj1: ", obj1)
print("print obj2: ", obj2) | [
"vaidas.armonas@gmail.com"
] | vaidas.armonas@gmail.com |
2bb133762300e9265d25a7e23a5f22a3d5955cd3 | 1d28ff527b9dab5aad32f15a0581f194b1ad686c | /reverseInt.py | 075d9e661a5cd4533454faad95f4a0cffad4ea02 | [] | no_license | omegaman123/ProblemSolving | 605262fcd4947ced0ba534bdde2449bf7f8c6a76 | 210f10da327aca8a70ed6432ff5a027251d4e512 | refs/heads/main | 2022-12-29T05:24:16.422141 | 2020-10-05T01:19:43 | 2020-10-05T01:19:43 | 299,765,906 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 892 | py | # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
idx = 0
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') ... | [
"35475840+omegaman123@users.noreply.github.com"
] | 35475840+omegaman123@users.noreply.github.com |
e6650002cc5f0ae2c46011989e4a6b8137cbf6bb | e91a96b50b15a4146ba2ecce8f2e8b132936be75 | /practise_20180723/test_class.py | 294679d78eeb8d276486f5d580c5c43deed73175 | [] | no_license | Ngwind/PycharmProjects | a7f1a8cbd8019ab51581b648a3182016362836d5 | d21873f2c956cc718f59f90e86cde4ef0c5c47ee | refs/heads/master | 2020-03-24T02:41:15.166778 | 2018-12-13T16:45:04 | 2018-12-13T16:45:04 | 142,381,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,063 | py |
class Person(object):
sex = "m"
age = 18
__birthday = "2018-09-01"
def __init__(self, name: "名字") -> "Person的构造函数":
print("init is called")
self.name = name
self.food_list = []
# 类方法,第一个参数是self
def eat(self, food):
self.food_list.append(food)
print("I h... | [
"137476684@qq.com"
] | 137476684@qq.com |
efaa1812e24c0b64449e7ed4819b46ca098e9ada | 5a1b4527f06262065a992c503cd58097c4deb21c | /register/views.py | c95e4237f3579eede5d3d540f316264c742fba05 | [] | no_license | psachin/aakash_remote_technician | 3b922f3c87f3c7cdfada888543018b5cbbdc53f8 | aa686af8510357ddc2a15b271d1f656356a02df1 | refs/heads/master | 2020-05-17T22:07:15.914014 | 2013-08-07T07:32:37 | 2013-08-07T07:32:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,895 | py | from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.views import logout_then_login
from django.shortcuts import render_to_response, HttpResponse, HttpResponseRedirect, get_object_or_404
from django.template import RequestContext
from django.contrib.auth.models import User, Group
from d... | [
"iclcoolster@gmail.com"
] | iclcoolster@gmail.com |
5930e9a61671605bbfdc30d70204e806177bb540 | aa9d2b3e754954a2fdb852e5eca352cc5546774b | /Logistic Regression/l1_reg.py | b97eac70a048ae94f87718f67f9a5a9b60c1e477 | [] | no_license | yash-sinha/deeplearningudemy | 499ed12ad1156ea7bf2086e7d530d30c84ab3bce | 5b0af9dad4aa64992f42a300fb5975fccb7e62b8 | refs/heads/master | 2021-01-21T18:43:50.330552 | 2017-06-04T23:47:25 | 2017-06-04T23:47:25 | 92,077,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 728 | py | import numpy as np
import matplotlib.pyplot as plt
def sigmoid(z):
return 1/(1 + np.exp(-z))
N = 50
D = 50
X = (np.random.random((N,D))-0.5)*10 #Uniformly distributed btwn -5 and +5
true_w = np.array([1,0.5,-0.5]+ [0]*(D-3))
Y = np.round(sigmoid(X.dot(true_w) + np.random.randn(N)*0.5))
costs =[]
w = np.random.r... | [
"yashsinha08@gmail.com"
] | yashsinha08@gmail.com |
14e1a228d0680642f41d17ebeaa1552a75c5e0c5 | 1aa0ddb70fb893a6f958841b0a606cdcac954e18 | /settings/forms/batches.py | a1931328efe9b17262c46d238776331d3278fa66 | [] | no_license | shitalluitel/LibraryManagementSystem | 3042860a70096bf3821299fb10ca35958e680f62 | eecd909b272ad7e524a031c9142d22a356141fda | refs/heads/master | 2023-02-17T06:42:19.044516 | 2021-01-10T14:52:18 | 2021-01-10T14:52:18 | 166,533,846 | 2 | 1 | null | 2023-02-07T22:14:35 | 2019-01-19T10:22:41 | HTML | UTF-8 | Python | false | false | 1,003 | py | from django import forms
from django.forms import ModelMultipleChoiceField
from settings.models import Batch, CourseBatch, Course
class BatchForm(forms.ModelForm):
class Meta:
model = Batch
fields = ['name', 'code']
widgets = {
'name': forms.TextInput(attrs={'class': 'form-c... | [
"ctalluitel@gmail.com"
] | ctalluitel@gmail.com |
391b6c0bf76d9ad8fdb00474e8986f20c727cd88 | 15c00a40dca1e08c3acce5d782225ac27c34b3c4 | /data/data_utils.py | 7bfb14a50249edd289ffb1d10cfe522a8cbc0fc1 | [
"MIT"
] | permissive | kamisoel/DigiGait | 826eb9420bbb0513386946363995e6bda0831c7d | 80b6fceeb3b426b9a551358bf34e246103d6c421 | refs/heads/main | 2023-07-21T14:06:39.566768 | 2021-09-07T07:53:30 | 2021-09-07T07:53:30 | 368,515,967 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,991 | py | # Copyright (c) 2018-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.
#
import numpy as np
mpii_metadata = {
'layout_name': 'mpii',
'num_joints': 16,
'keypoints_symmetry': [
[3, ... | [
"Leo Simak"
] | Leo Simak |
7c8e4675d0711026385f5328533e7c8eeb8fad4d | 56db1ccba3f8976b2df6d97c99e5aae7108149a1 | /spending/main/admin.py | 2c410651c1a51abbb5f05621793ae519229eae80 | [] | no_license | peterbe/django-spending | 4d60b7a77250fc58eb7a397e388fd22fe73576de | ab2ab1730fbdd999e5ef8d75575795fa3a48d2b9 | refs/heads/master | 2021-01-10T05:32:00.005607 | 2013-07-06T05:41:41 | 2013-07-06T05:41:41 | 8,384,613 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | from django.contrib import admin
from spending.main.models import Household, Expense, Category
class HouseholdAdmin(admin.ModelAdmin):
list_display = ('name', 'no_users')
def no_users(self, obj):
return obj.users.all().count()
no_users.short_description = '# users'
class ExpenseAdmin(admin.Mode... | [
"mail@peterbe.com"
] | mail@peterbe.com |
11ef2cc4fb52774a2fb7d480df6720fc9c79afd9 | 9b20743ec6cd28d749a4323dcbadb1a0cffb281b | /02_Statistical_Methods_for_Machine_Learning/14/01_tolerance.py | 4a81741857f5d7f81dd597a2d99ba09c2f2bae3b | [] | no_license | jggrimesdc-zz/MachineLearningExercises | 6e1c7e1f95399e69bba95cdfe17c4f8d8c90d178 | ee265f1c6029c91daff172b3e7c1a96177646bc5 | refs/heads/master | 2023-03-07T19:30:26.691659 | 2021-02-19T08:00:49 | 2021-02-19T08:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,055 | py | # parametric tolerance interval
from numpy import mean
from numpy import sqrt
from numpy.random import randn
from numpy.random import seed
from scipy.stats import chi2
from scipy.stats import norm
# seed the random number generator
seed(1)
# generate dataset
data = 5 * randn(100) + 50
# specify degrees of freedom
n = ... | [
"jgrimes@jgrimes.tech"
] | jgrimes@jgrimes.tech |
85d95bdfbd59a153f246c62bca01d14bff2342be | 8382f4ec907950a8cfc618d3cceb97b0d00ab478 | /6kyu/encryptThis.py | 98249bc9ece7063bffc8fcf98db0cc716a54aaba | [] | no_license | naistangz/codewars_challenges | 80788f3869a4283c89ee2a05f19142b18ba4820c | 372bbb6f1668b378183a169206526b52315107a8 | refs/heads/master | 2023-04-14T11:52:31.412554 | 2021-04-25T09:39:03 | 2021-04-25T09:39:03 | 299,615,380 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | def encrypt_this(text):
words = text.split(" ")
res = []
for i in words:
new = ""
temp = ""
for j in range(len(i)):
if j == 0:
new += str(ord(i[j]))
elif j == 1:
temp = i[j]
new += i[-1]
elif j == len(i) - 1:
... | [
"a6anaistang@hotmail.co.uk"
] | a6anaistang@hotmail.co.uk |
a02e5e47a56fdcbea48cd9e05aa8c477e211e3d3 | cc6e92dc9e91d8c9339a7585d542661b31c38489 | /src/topic_model.py | df9dd6dedefd4d17d1055f1e655b3d4c83074220 | [] | no_license | faizakk/topic_models | a9ead6af914d55c73ba34afefa4d3ca499bca29f | be072d1b6e000679e82b468a1f2ed7397240b161 | refs/heads/main | 2023-09-02T16:17:46.307141 | 2021-11-01T03:16:59 | 2021-11-01T03:16:59 | 423,319,743 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,311 | py | from sklearn.decomposition import LatentDirichletAllocation
import numpy as np
class TopicModels:
"""
This class applies with topic modeling algorithm
methods:
topic_modelling: Applies topic modelling and does visualization
"""
@staticmethod
def topic_modelling(
doc_re... | [
"faizakhankhattak@gmail.com"
] | faizakhankhattak@gmail.com |
36427016924bc734286ed9ff39b3812b2d38b21a | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2367/60699/251530.py | e61d0d3cb0da03640cd9f10d895c7a604b12880b | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | res1=1
list1=[1]
for i in range(0,30):
res1=res1*10+1
list1.append(res1)
n=int(input())
for i in list1:
if i%n==0:
print(i)
break
print(-1) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
8425cd0230586cba7d321dc4706f57f721a3c5d4 | b246bdb4ae3d845bbf8dee704b8936c32211c0f5 | /Figure_1/initial_subtyping/do_tsne.py | fe059a8bd9f38cb0c2f026356b59d034111066fc | [] | no_license | KnottLab/bladder-snSeq | abfd3d77a04250622e6a28d84878e5adcd335d00 | 2e087dc745046e30c2814ab3e4c295bfa34e6820 | refs/heads/master | 2023-04-07T13:36:44.794889 | 2021-12-08T15:37:45 | 2021-12-08T15:37:45 | 323,445,511 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,966 | py | #!/usr/bin/env python
import numpy as np
import argparse
from load_data import load_data
from MulticoreTSNE import MulticoreTSNE as TSNE
try:
import cuml
CUML_FLAG=True
except:
print('[DO_TSNE] WARNING failed to import cuML. GPU accelerated TSNE will not be available.')
CUML_FLAG=False
"""
Modules have two ... | [
"ing.nathany@gmail.com"
] | ing.nathany@gmail.com |
15efdeea22135b88d20124f5c7de91f61585f160 | 09b8bf3aa9e70c4517f4dc277d980eba36c7fe46 | /SQUAD/unet/baseline/main.py | cd173de7da065a932a1540abc971a8a8e97548e1 | [] | no_license | lionsterben/NLP | e0c46771cdf9abc89e527e2f2d06a1e64d0d6f70 | c4bcaed813cfbb7ed852a9e6501ba914b81b57b5 | refs/heads/master | 2020-04-27T13:15:03.390430 | 2019-03-07T14:43:15 | 2019-03-07T14:43:15 | 152,017,194 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,130 | py | # Copyright 2018 Stanford University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | [
"1412465878@qq.com"
] | 1412465878@qq.com |
a1c8656936ae311af887db2840fb5a9f50e8de6c | e0cafa8fe6e249496584903f377695051e97009b | /customer.py | 867fc28d96a97e8a36052a9ce1bc0258d187f713 | [] | no_license | codelings1/Coursera_test | bdcd8a3fe55eda148e38064c7e5a98d6bada6e11 | 5822bd41b193feb2f4f99402699e81ea2db1afad | refs/heads/master | 2021-01-22T01:18:51.860102 | 2018-05-28T10:55:48 | 2018-05-28T10:55:48 | 102,216,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | import MySQLdb
conn = MySQLdb.connect(host="127.0.0.1", port = 3306)
cursor = conn.cursor()
query = "SHOW DATABASES";
cursor.execute(query);
results = cursor.fetchall();
print results
| [
"noreply@github.com"
] | noreply@github.com |
eb7cf05d82bebc72536e45721c486ec49eb01fe3 | 9dfdd54b73c3b848547b25779c3281cfdf88f3c9 | /main.py | a27f5a555ff2ecb359d025f886ff9f097208a7b1 | [] | no_license | BrejeMihai/FLCD_Lab08 | 5b70fb37a17107474d82cd600485b1837b96b23b | fb0d835a5e074e53c1b7cb51478345d4c984df68 | refs/heads/main | 2023-01-30T15:26:10.759040 | 2020-12-09T09:10:49 | 2020-12-09T09:10:49 | 313,889,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,132 | py | import sys
from Grammar import Grammar, Lr0Parser
if __name__ == '__main__':
gr = Grammar()
gr.read_from_file(sys.argv[1])
print(gr)
parser = Lr0Parser(gr)
parser.canonical_collection()
_menu_string = "Choose an option:\n1.Show the grammar details.\n2.Show productions for nonterminal... | [
"brejemihaipaul@gmail.com"
] | brejemihaipaul@gmail.com |
f51289a9282a25552d7f5b7a10d64965f7d62f94 | f20de8f5bd2c4e1a7348ce9d7dd7e82ac5d61543 | /03-FileHandling/16.py | 4fa4ae6e02d4f8307d6b18a1c894f2c60fd9df3e | [] | no_license | ego6ua/pp1 | 18e6647c4f08498ba3e23c1e0a89ebe91618d230 | c39684d2610537b9b05de549cbac3ee8f7ca657b | refs/heads/master | 2020-08-07T08:35:35.193399 | 2020-01-20T13:38:48 | 2020-01-20T13:38:48 | 213,374,168 | 0 | 0 | null | 2019-10-07T12:12:40 | 2019-10-07T12:12:40 | null | UTF-8 | Python | false | false | 333 | py | import re
komunikat = 'wtorek - 23C, środa - 21C, czwartek 25C'
cyfry = re.findall('\d{2}',komunikat)
a = int(cyfry[0])
b = int(cyfry[1])
c = int(cyfry[2])
x = a, b, c
y = sum(x)/len(cyfry)
print(f'srednia temperatura to: {int(y)}C')
with open('Temperatura.txt', 'w')as f:
f.write(f'srednia temperatura to: {int(y)}... | [
"ego6ua@users.noreply.github.com"
] | ego6ua@users.noreply.github.com |
70ba9905ee148002ae8203247549c0ac39a49b74 | 5b17b29a56b04590e702f3494a166cbde5563b44 | /view/loop_through_low_threshold_crossings.py | 70874c4037a810a679039fdfc9c4cc8514209e57 | [] | no_license | sdwfrost/wind_tunnel | 055f3a124c32f4274ab41238d5205bb63814fd58 | dec912066d9ed5ebeee10c77b6188419bccdb9fe | refs/heads/master | 2020-05-31T02:11:20.275982 | 2018-01-17T23:27:20 | 2018-01-17T23:27:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,253 | py | """
Loop through plots of plume crossings, where crossings are determined by arbitrarily low thresholds.
"""
from __future__ import print_function, division
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from db_api import models
from db_api.connect import session
ODOR_STATES = ('on', 'none', 'afterodor')
... | [
"rpang.contact@gmail.com"
] | rpang.contact@gmail.com |
0dde655a5356b6dc06767f61325182aa266d924f | b41a713ded42967feba2ce9b2cb3d500cb11d1e6 | /naive_bayes.py | 537590623413be6f0674f050bf7446783663850f | [] | no_license | cihanerman/Machine_Learning_Ses | 43a09b26361381b6bfa918d0324a498a08941338 | e95fae17ecbddf396005cf36ada996d59c920c45 | refs/heads/master | 2020-04-16T10:26:01.127355 | 2019-02-16T22:13:33 | 2019-02-16T22:13:33 | 165,505,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,516 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 26 22:23:04 2019
@author: cihanerman
"""
# import library
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.naiv... | [
"cihan.erman@outlook.com"
] | cihan.erman@outlook.com |
4fdc6b0d3c0d6e664d22960a9926a3b2127f2f29 | 753a70bc416e8dced2853f278b08ef60cdb3c768 | /models/research/deeplab/datasets/build_cityscapes_data.py | ce81baef20a460abaa634d3f1dcb6760a0858dec | [
"MIT",
"Apache-2.0"
] | permissive | finnickniu/tensorflow_object_detection_tflite | ef94158e5350613590641880cb3c1062f7dd0efb | a115d918f6894a69586174653172be0b5d1de952 | refs/heads/master | 2023-04-06T04:59:24.985923 | 2022-09-20T16:29:08 | 2022-09-20T16:29:08 | 230,891,552 | 60 | 19 | MIT | 2023-03-25T00:31:18 | 2019-12-30T09:58:41 | C++ | UTF-8 | Python | false | false | 6,244 | py | # Lint as: python2, python3
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | [
"finn.niu@apptech.com.hk"
] | finn.niu@apptech.com.hk |
5f01b00fb146fec0d23c878194633081590499e0 | 59de7788673ade984b9c9fbc33664a7cbdba67d3 | /res/scripts/client/gui/scaleform/framework/entities/abstract/tooltipmgrmeta.py | a6dfedb52bce9035a795727e60fc365f096a4dbc | [] | no_license | webiumsk/WOT-0.9.15-CT | 3fa24ab37a6c91b7073034afb2f355efa5b7fe36 | fbd194fbaa6bdece51c7a68fc35bbb5257948341 | refs/heads/master | 2020-12-24T21:27:23.175774 | 2016-05-01T13:47:44 | 2016-05-01T13:47:44 | 57,600,180 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 1,329 | py | # 2016.05.01 15:22:59 Střední Evropa (letní čas)
# Embedded file name: scripts/client/gui/Scaleform/framework/entities/abstract/ToolTipMgrMeta.py
from gui.Scaleform.framework.entities.BaseDAAPIModule import BaseDAAPIModule
class ToolTipMgrMeta(BaseDAAPIModule):
"""
DO NOT MODIFY!
Generated with yaml.
_... | [
"info@webium.sk"
] | info@webium.sk |
2ede8dd1250d270818bc22577cf17fe657d46615 | f67765cc9a707f462ae3eda4ac0ae4b278ad54d2 | /main3.py | efa5471e814e5d129606dc093627529545527485 | [] | no_license | orlovrs/python_qat_22 | 3c25ac9a0f18d3914172e2a1738bbb4730b2a822 | 747ea578e0e655f18201c9ec90f15f969191eef3 | refs/heads/master | 2022-12-15T01:16:45.129299 | 2020-09-10T07:50:08 | 2020-09-10T07:50:08 | 294,340,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | import pytest
# Задаем ids вручную
@pytest.mark.parametrize("x", [-1, 0, 1], ids=["negative", "zero", "positive"])
@pytest.mark.parametrize("y", [100, 1000], ids=["3 digit", "4 digit"])
def test_multiple_params(x, y):
print("x: {0}, y: {1}".format(x, y))
assert pytest.num == 1
# Генерируем ids автоматически... | [
"helltester666@gmail.com"
] | helltester666@gmail.com |
0f149d04b001516f7e44891758e4f4b9fe1459e9 | 88d555a009f9075e59177fac70036892f397b439 | /bin/saluki_train_folds.py | b0855e380c8a5fecbcf452fe9356988f2c5c8f01 | [
"Apache-2.0"
] | permissive | calico/basenji | f9f406971d355dda81821dcf274696a7d27e332d | 615b9eec8a591783b16d959029ddad08edae853d | refs/heads/master | 2023-09-04T11:14:15.620786 | 2023-07-27T00:05:13 | 2023-07-27T00:05:13 | 96,346,574 | 326 | 143 | Apache-2.0 | 2023-08-16T00:36:32 | 2017-07-05T17:54:18 | Python | UTF-8 | Python | false | false | 13,420 | py | #!/usr/bin/env python
# Copyright 2019 Calico LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agr... | [
"drk@calicolabs.com"
] | drk@calicolabs.com |
4e720f06218c7fbc7e640ea6ec4530d270ebec9b | 5e32cccdde88ed44dae414941cff2ac579a081f0 | /Surveillance.NWB.py | c6aef8864b4f7541e22294a5905dc0a6bc2e0180 | [
"MIT"
] | permissive | Kavyapriyakp/Surveillance | 85392fc86713176bb9be8c3a51e9d84d78537734 | c2a47e5d780ba01a2cf5d9ec7edab64215f0c1d2 | refs/heads/main | 2023-07-14T11:10:20.178598 | 2021-08-23T13:57:45 | 2021-08-23T13:57:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,357 | py | #_____________________HEADER FILES______________________
import tkinter
from tkinter import*
from tkinter import ttk
from tkinter import filedialog
from _cffi_backend import callback
from PIL import ImageTk, Image
import cv2
from cv2 import *
import numpy as np
import sys
import time
import argparse
import imutils
fro... | [
"noreply@github.com"
] | noreply@github.com |
a75b6ed4fd5b72efddd1dd24d8f759d4ff1628e7 | 64c47e207af042b31d820d78d8933ffb8efcd18d | /logchecker/ui.py | b83e9ef58642fa8f882aff05920cf8e0d4938bde | [] | no_license | N0SO/moqputils | 1518395db30a982b8f4e624e9a5fe284acafd475 | 293a2a4fcada1bbce1245fc4f398c35c135c20c6 | refs/heads/master | 2023-06-10T04:34:14.602425 | 2023-05-27T01:53:35 | 2023-05-27T01:53:35 | 149,353,354 | 0 | 0 | null | 2019-09-02T03:41:01 | 2018-09-18T21:18:17 | Python | UTF-8 | Python | false | false | 12,916 | py | #!/usr/bin/python
import gi, os, sys
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from logchecker.filedialogs import *
from logchecker.runlogcheck import runLogCheck
from logchecker.__init__ import VERSION
class About1():
def __init__(self):
gtkvers='Gtk V%d.%d.%d'%(\
Gtk.MAJO... | [
"mheitmann@n0so.net"
] | mheitmann@n0so.net |
5c058bce3f30c1740eeeb245c0d9a7dad6cc4d8c | 8b9d7a83cd2d1824b0f42d2be8bd9887bffcd64a | /pytorch-CycleGAN-and-pix2pix/options/test_options.py | 03063e1a39716e88a0cb08f963beccbe4d2a04bb | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | diaosiji/CRUI | 2c0505ab6556c189872458b5162141a1299f8e84 | 9f5981904a7254bb0d67d01651b1dfb25c9783a1 | refs/heads/main | 2023-03-13T22:56:17.661160 | 2021-03-02T06:44:36 | 2021-03-02T06:44:36 | 338,830,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,258 | py | from .base_options import BaseOptions
class TestOptions(BaseOptions):
"""This class includes test options.
It also includes shared options defined in BaseOptions.
"""
def initialize(self, parser):
parser = BaseOptions.initialize(self, parser) # define shared options
parser.add_argum... | [
"diaosiji@users.noreply.github.com"
] | diaosiji@users.noreply.github.com |
5b52ddbe0bd41cdee13f55f6361a380438db5ae4 | 6bba678da92ee6e462b9e65cebd9f04ad8de54d1 | /week2/Homework/Exercise_12.py | 5b343e0baf56b594cdc55c061993743e441299d0 | [] | no_license | albihasani94/PH526x | 42cd9f84ccbb6b82c9eba911221925cfe3fd8818 | f09da5cfa66e0b95b76031401b432551e4d16cf1 | refs/heads/master | 2021-08-16T04:58:12.472946 | 2017-11-19T00:57:39 | 2017-11-19T00:57:39 | 109,987,441 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | """
This result is expected --- when guessing at random, it's better to go first. Let's see if Player 1 can improve
their strategy. create_board(), random_place(board, player), and evaluate(board) have been created from previous
exercises. Create a function play_strategic_game(), where Player 1 always starts with the m... | [
"albin.hasani@ikubinfo.al"
] | albin.hasani@ikubinfo.al |
e0cef2e9484c65cdeaf1980ebb7c8d939eeb49b2 | 738b4fd5d8ebb8c424947a6786bd41ba30df46d6 | /ibeatles/fitting/fitting_launcher.py | 4d66c124f6dace8967669f0f642adedd8f81d6c0 | [
"MIT"
] | permissive | indudhiman/bragg-edge | ba6e5c02e2bf2c2c5f87b626a4578238f7973e43 | 56af0a448534ef9cb5428879ba900e194dc05db2 | refs/heads/master | 2020-04-16T22:49:53.274903 | 2019-01-08T14:18:32 | 2019-01-08T14:18:32 | 165,985,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 28,018 | py | try:
import PyQt4
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
from PyQt4.QtGui import QMainWindow
from PyQt4.QtGui import QApplication
except:
import PyQt5
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
from PyQt5.QtWidgets import QMainWindow
fro... | [
"bilheuxjm@ornl.gov"
] | bilheuxjm@ornl.gov |
5eddcec5b87e61fbd22e0488898f5e200ba1eeec | 54862efb410ab30283cab76be3a1b2947296d4c0 | /ibbie_19_字符串.py | b172806bc2335a4e152129b255c6357b345c947b | [] | no_license | Three-Y/MyPythonLearning | 1e32a465896fad2caf24fddf6c00d4e63e98d0eb | 84c66632502b846f580cbd19781f7ec487e8b8ab | refs/heads/master | 2023-01-22T08:52:21.073278 | 2020-12-05T10:08:51 | 2020-12-05T10:08:51 | 316,262,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,234 | py | """
字符串
可以用双引号或单引号定义字符串,一般使用双引号
str = "abc"
假如字符串中包含双引号,则使用单引号来定义
str = 'lalala"啦啦啦"'
可以帮字符串看成是一个列表,列表的每个元素都是一个字符
字符串的索引值从0开始
"""
"""定义字符串"""
str1 = "abc"
print(str1)
str2 = '"哈哈"'
print(str2)
"""遍历字符串"""
str3 = "abc123321cba"
for char in str3:
print(char)
"""字符串的长度"""
print(len(str3))
"... | [
"55918473+Three-Y@users.noreply.github.com"
] | 55918473+Three-Y@users.noreply.github.com |
5c92369765c6c39d996b71992115a3db5689d7fc | 615729d4d8647bb819f5eb3f126d31cd8e0d770d | /web2/settings.py | 512ff154561935656a3a903802b2ae78e6eea9a0 | [] | no_license | DucThanh1997/login | e8837ed34048e7d036f750f05874ada66c2910c0 | 7c0705883e338009621d356f3dbb4683c07f50fd | refs/heads/master | 2020-05-04T07:08:47.392252 | 2019-04-02T08:11:52 | 2019-04-02T08:11:52 | 179,021,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,435 | py | """
Django settings for web2 project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | [
"ducthanh191997@gmail.com"
] | ducthanh191997@gmail.com |
fe19dafe65f6a5cc142d3a50c34fab4c64ecb935 | 5882d610d9b1243cd59361d949af7ee3335c07ba | /test/LSTM-sin/sin.py | e86be6531bfceaefeebcd729ea086979cb29a64f | [] | no_license | uranium410/MontezumaAI | 6eb62aad95fcc616bb659a2b77ce2a272221a15d | c3cd2e299d97727b3229fe7a94eb50abe11ee4bf | refs/heads/master | 2020-05-30T03:04:19.282973 | 2019-08-08T02:52:14 | 2019-08-08T02:52:14 | 189,506,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,874 | py | import torch
import torch.nn as nn
from torch.optim import SGD
import math
import numpy as np
import csv
class Predictor(nn.Module):
def __init__(self, inputDim, hiddenDim, outputDim):
super(Predictor, self).__init__()
self.rnn = nn.LSTM(input_size = inputDim,
hidden_s... | [
"36751459+uranium410@users.noreply.github.com"
] | 36751459+uranium410@users.noreply.github.com |
47e5b33bf2c46dffa3df76a2bf4134619041815a | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/Reconstruction/RecExample/RecExCommon/share/ContainerRemapping.py | 00f5c31d568f606d42fba403b8779c3df62a656f | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,782 | py | include.block ("RecExCommon/ContainerRemapping.py")
from AthenaCommon.AppMgr import ServiceMgr
# Instantiate the address remapping service:
if not hasattr( ServiceMgr, "AddressRemappingSvc" ):
ServiceMgr += CfgMgr.AddressRemappingSvc()
pass
if not hasattr( ServiceMgr, "ProxyProviderSvc" ):
ServiceMgr += C... | [
"rushioda@lxplus754.cern.ch"
] | rushioda@lxplus754.cern.ch |
1c493e70c97ea95ec9b98c42aebac1f4257b036f | 741b69f020b60603f5063715557507feae0b08fd | /backend/src/main.py | b0c8d6c86d37d39923de059428a55126491e99ec | [] | no_license | Materson/Warehouse-with-us | 56c4d62a74192fd8ac76b2277462208d41b125eb | bbac2ebf526f72cbad9d4655bf7e862d3e1db9c0 | refs/heads/master | 2023-06-02T23:32:42.580713 | 2021-06-16T12:27:06 | 2021-06-16T12:27:06 | 372,070,864 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | from fastapi import FastAPI, Depends
from routers import user, product, auth, version, category
from utils.auth import get_current_active_user
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
origins = [
"https://localhost",
"https://localhost:3002",
"https://192.168.43.54:3002",
"h... | [
"zapomnialem63@wp.pl"
] | zapomnialem63@wp.pl |
70b13e09918671ec8f42febe6f91674c2a84f798 | d4f2e2e3552ab4b111f78cfbad0d30c144201093 | /2016-12-20/semaphore.py | 2c1f4492110d89b3a3f1daa84001456b57596e8d | [
"Apache-2.0"
] | permissive | dongweiming/mp | c1e9f6f2c1fd8adbd4d7b8ffc45c5cc288cdcd80 | 129c31c818e1f0c39c983aad1f2f1ad9fa7efb1c | refs/heads/master | 2023-04-29T07:56:27.198574 | 2022-10-30T04:20:09 | 2022-10-30T04:21:27 | 75,051,758 | 96 | 35 | Apache-2.0 | 2023-04-17T17:34:17 | 2016-11-29T06:44:53 | Python | UTF-8 | Python | false | false | 509 | py | import aiohttp
import asyncio
NUMBERS = range(12)
URL = 'http://httpbin.org/get?a={}'
sema = asyncio.Semaphore(3)
async def fetch_async(a):
async with aiohttp.request('GET', URL.format(a)) as r:
data = await r.json()
return data['args']['a']
async def print_result(a):
with (await sema):
... | [
"ciici1234@hotmail.com"
] | ciici1234@hotmail.com |
3d2cdb0df6994ed18122a7d3e04ebebc15aee7da | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nnuiy.py | d0fcd3f412294aeefbace25ce9b8a1fa5cf588aa | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 44 | py | ii = [('MedwTAI2.py', 1), ('MereHHB.py', 1)] | [
"varunwachaspati@gmail.com"
] | varunwachaspati@gmail.com |
f1fb146c3e9cf353c726f32799c2e2ff4ae571ae | 5efdd9942b50acb711ba2dbc192fe58d5aa2b143 | /app.py | 6c2ef939995743edf51648e71bb74a43d3447dc8 | [
"Apache-2.0"
] | permissive | sveldurthik/housing_price | 27f95bf6ab7e84dbc4abe0f3222bbbb70aa602bf | c60acd5dd67122bc578911bfbe0ce591cade5373 | refs/heads/master | 2023-03-23T04:11:52.873148 | 2020-04-29T18:46:33 | 2020-04-29T18:46:33 | 260,011,518 | 0 | 0 | Apache-2.0 | 2021-03-20T03:46:30 | 2020-04-29T18:37:15 | HTML | UTF-8 | Python | false | false | 694 | py | import numpy as np
from flask import Flask, request, jsonify, render_template
import pickle
app = Flask(__name__)
model = pickle.load(open('model.pkl', 'rb'))
@app.route('/')
def home():
return render_template('index.html')
@app.route('/predict',methods=['POST'])
def predict():
'''
For rendering results ... | [
"noreply@github.com"
] | noreply@github.com |
b097b7a2e91b91ea67969ca245e6a9c69ad4bc7f | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Selenium_Chromium/source/selenium/webdriver/edge/service.py | 9eac51171035f1d2bd648ca409aeee7b8c69b782 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 2,161 | py | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
"ryfeus@gmail.com"
] | ryfeus@gmail.com |
b64589cd1421d2fafd88fb37d715b2aaaa0206a5 | 5296285725fb1a6cbf809a33859b08d935934114 | /huahua/server.py | 3e13c80d2106af71f6e6fcf0adc12ba1c9c77af0 | [] | no_license | tony84727/huahua | 5aaf30f95699c5c08c7a6e61f2058bd1374e5128 | f7eaaff09bca8c4c532511b15c6a201af5a9cf11 | refs/heads/main | 2023-07-14T14:09:15.913083 | 2021-09-01T05:41:17 | 2021-09-01T05:41:17 | 395,523,578 | 0 | 0 | null | 2021-09-01T05:41:18 | 2021-08-13T04:47:49 | Python | UTF-8 | Python | false | false | 1,496 | py | from typing import List
import sqlalchemy
from sqlalchemy.engine.base import Engine
from sqlalchemy.orm.session import Session
from sqlalchemy.sql.expression import select
from model import Server
class ServerList:
"""Server list interface"""
async def resolve(self, alias: str) -> Server:
"""Resolve s... | [
"noreply@github.com"
] | noreply@github.com |
6c1288b99b5652fc745dbe1c2daa5fa84a0b459f | cd91dd22b391968e077fd0a693813893543cdf1f | /src/opserver/consistent_schdlr.py | d4dee2598c34380e1ab5750983d488d72b64a7fd | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | forsakening/controller | 6c89476901d78423721b4b444d54123630eaa300 | 408892746ea189aecae33ce3b5a8ac6c1200a8d8 | refs/heads/master | 2020-04-08T12:08:27.204902 | 2019-02-13T08:56:03 | 2019-02-13T08:56:03 | 159,334,442 | 0 | 1 | Apache-2.0 | 2019-01-31T01:44:29 | 2018-11-27T12:48:27 | C++ | UTF-8 | Python | false | false | 10,996 | py | #
# Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
#
from consistent_hash import ConsistentHash
import gevent
import os
import hashlib
import logging
from kazoo.client import KazooClient
from kazoo.client import KazooState
from kazoo.handlers.gevent import SequentialGeventHandler
from random import rand... | [
"forsakening@sina.cn"
] | forsakening@sina.cn |
ac4d859daae441283b736274186b6e1067921933 | c739152c0952d944e4304fd64300ee4927f09a9a | /bible/invertedIndex/mainFunction/inputRSV.py | d91390cfe82ce4f66a9c6bc9c9cbe6fc676b8bac | [] | no_license | jesicag/InvertedIndex | 4c74e488900bfa9e8956006a2a488835dfd8cea4 | f33b4e74832caba9d15b71301b9d0020faef85f0 | refs/heads/master | 2020-05-25T05:39:40.378689 | 2019-05-22T14:22:47 | 2019-05-22T14:22:47 | 187,654,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,344 | py | import xml.etree.ElementTree as ET
from nltk import word_tokenize
import string
import re
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
import math
from collections import OrderedDict
from operator import itemgetter
# =============================================================================
... | [
"elisajesica@gmail.com"
] | elisajesica@gmail.com |
e2412b63db991bbfe6f09266360a6f8823075b18 | 8516bcb2cd4f40f5fbdff488605019d6c7ac3e01 | /accelerator_abstract/models/base_partner_judge_application_assignment.py | 985959c1db8306eaf8a433c0243f6c2304d9c193 | [
"MIT"
] | permissive | masschallenge/django-accelerator | 0b0782ceb3b010715fbe829f774246ca4a68af23 | 665351d06c2adc65c48642905c499b8226276d12 | refs/heads/development | 2022-11-22T18:40:08.410117 | 2022-11-10T15:11:38 | 2022-11-10T15:11:38 | 94,241,861 | 6 | 0 | MIT | 2022-11-10T15:11:40 | 2017-06-13T17:55:54 | Python | UTF-8 | Python | false | false | 899 | py | from django.conf import settings
import swapper
from django.db.models import (
CASCADE,
ForeignKey,
)
from .accelerator_model import AcceleratorModel
class BasePartnerJudgeApplicationAssignment(AcceleratorModel):
judge = ForeignKey(settings.AUTH_USER_MODEL,
on_delete=CASCADE)
ap... | [
"jon@kiparsky.net"
] | jon@kiparsky.net |
870a4e1fa223674735ef734050320b5883e5a7cc | 6bf872f1506428e7d2cd216f251959a31c4f3be0 | /TB_IPR/TUT.IMG.pde/python/nonlineardiffusion.py | 7fb4caa9d39b8702dd0cfd00b627dee35d532471 | [
"LicenseRef-scancode-public-domain",
"CC-BY-4.0"
] | permissive | yg42/iptutorials | 25e8c5f8e145085b3938237b6d216a4b7634a013 | a42f13d97ee8a43e3f2097fd3a9be599dfe2380b | refs/heads/master | 2022-11-05T11:29:34.932163 | 2022-10-14T12:43:41 | 2022-10-14T12:43:41 | 228,867,829 | 31 | 11 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 27 14:30:18 2015
@author: yann
"""
import numpy as np
from scipy import ndimage, misc
import matplotlib.pyplot as plt
import skimage
def c(I, alpha):
# diffusion coefficient
# I: image
# alpha: diffusion parameter
return np.exp(-(I/alpha)**2)
def nonl... | [
"gavet@emse.fr"
] | gavet@emse.fr |
0858da6354190a6e487b641799cd95e92128d8e9 | cb5d9a49406dcc8a48b6ac55042035ff6437bc05 | /slyd/slyd/server.py | 13f17a192cce9c31c433a908ef90cd7347c53f97 | [
"BSD-3-Clause"
] | permissive | randy-ran/portia | 45ae4e071f57da01bafcd8b248a1d8e643bfdfc8 | 6dd14b2c73d7db4e008efdfb322b853f72755132 | refs/heads/master | 2021-01-18T12:42:21.657190 | 2015-06-04T21:41:29 | 2015-06-04T21:41:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | from twisted.python import log
from twisted.python.compat import intToBytes
from twisted.web import http
from twisted.web.server import Site as WebSite, Request as WebRequest
class Request(WebRequest):
def is_ajax(self):
req_with = self.requestHeaders.getRawHeaders('X-Requested-With', [])
return '... | [
"ruairi@scrapinghub.com"
] | ruairi@scrapinghub.com |
7ea93492ed3ad89ba1eca2a21213ebb6285063b3 | 63ab7f86a43b7707d7f18cdac64d3d7f6041e44b | /Chapter13/countingMapReduce.py | d102a02b2e18ede970b6554745f3edbc011ef440 | [] | no_license | rms15/PDA_Book | 3189dc9c72bb6287632c49f77e7ad62b0f710c30 | 35f17eff37b28ea3cd42ef4d6533fdf951d51adf | refs/heads/master | 2021-01-11T05:19:21.949423 | 2016-10-26T14:50:45 | 2016-10-26T14:50:45 | 71,997,565 | 0 | 0 | null | 2016-10-26T11:43:21 | 2016-10-26T11:43:21 | null | UTF-8 | Python | false | false | 472 | py | from bson.code import Code
from pymongo import MongoClient
con = MongoClient()
db = con.Corpus
tweets = db.tweets
map = Code("function(){ emit(this.via, 1); }")
reduce = Code("""function(key, values) {
var res = 0;
values.forEach(function(v){ res += 1})
return {count: res};
... | [
"hm_cuesta@yahoo.com.mx"
] | hm_cuesta@yahoo.com.mx |
c2d71a7d3e13c4f19a3368fea8040b5146362a1b | 392e2773c0af4293060debe5f7a3ac217eb13eb0 | /architectures/cloud-centric/nodes/cloud-node/code/classes/policy.py | 6e7d2e63d9369afa3bfc1fa2e5fb3b36d3762e5c | [
"MIT"
] | permissive | Davide-DD/distributed-machine-learning-architectures | 16366c1faa22f218ba1da409448427987914039a | 998d86368c4122ad9937b505405191b316afb060 | refs/heads/master | 2020-08-07T09:00:10.347339 | 2019-10-15T12:42:26 | 2019-10-15T12:42:26 | 213,382,447 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | class Policy:
def __init__(self):
self.wrong_predictions = 0
def update_status(self):
self.wrong_predictions += 1
def is_respected(self):
if self.wrong_predictions < 25:
return True
self.wrong_predictions = 0
return False | [
"davidedidonato94@gmail.com"
] | davidedidonato94@gmail.com |
d29df58a54dda0c6b1cb8a80b91f79e0c52aea41 | 32e10056d02f36aab0195788db1fd46e36bb9d3d | /mysite2/mysite2/settings.py | c007e36e506ebde8d10f73956ebcf412cb305c89 | [] | no_license | dariodegiorgi/asmis_project | b18534f768b9b78f29686ddae44be13a8948c49a | a3414ae11bed6bd264755312cb2a0d9ba0eab4f3 | refs/heads/master | 2023-03-29T02:40:46.151702 | 2021-04-01T16:13:50 | 2021-04-01T16:13:50 | 353,737,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,092 | py | """
Django settings for mysite2 project.
Generated by 'django-admin startproject' using Django 2.2.12.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | [
"dario.degiorgi2@gmail.com"
] | dario.degiorgi2@gmail.com |
cba4850a56bcc405d2f955ea94145e68d71dc137 | 44c7b7cb9b2fc778774f6d2853a31f7f3edd10be | /documentparser.py | 549dbfbea6425e4965e9f1b46ac8b7816cb4773a | [] | no_license | thedern/Python3 | e7f92c66aeed62ad1197419d5291dd916114efdd | aa1a8ebee049c8191f1908c631aa8511a6e7dac9 | refs/heads/master | 2020-03-15T01:17:53.966230 | 2018-09-12T13:24:24 | 2018-09-12T13:24:24 | 131,890,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py |
fhandle=open('romeo.txt')
#print(fhandle)
masterList = []
#read each line and split the text into a list object
for line in fhandle:
words = line.split()
#print(words)
#get each item in the list
for t in range(len(words)):
#print each item in the list
print(words[... | [
"noreply@github.com"
] | noreply@github.com |
fceb31cf00b53fc8ef9df8a4ff1f3b5730c0e402 | ad475b83c8824b1fcb19292866986f2e9b31eddf | /influxdb_client/domain/notification_endpoint_base_links.py | 5f93a4216d9962778ca5d3ab9efc97909851636b | [
"MIT"
] | permissive | reinhard-brandstaedter/influxdb-client-python | 9ec79d7d07d1a52cefa2f0622151c02cce9701f0 | cd3278c90d751a25c8693367a6495a7d07e5c0a5 | refs/heads/master | 2023-04-25T21:39:49.655550 | 2021-05-28T05:03:38 | 2021-05-28T05:03:38 | 371,001,951 | 0 | 0 | MIT | 2021-05-26T10:59:00 | 2021-05-26T10:59:00 | null | UTF-8 | Python | false | false | 5,250 | py | # coding: utf-8
"""
Influx API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class NotificationEndpoin... | [
"noreply@github.com"
] | noreply@github.com |
fe0e6cff95e5d8a330eff9257815093428fb3c63 | 43ab33b2f50e47f5dbe322daa03c86a99e5ee77c | /test/test_od_mcomplex_type_definition_range_check.py | 1654fc81fa59cb3e96dcfdc2ece04a4d325049a1 | [] | no_license | Sage-Bionetworks/rcc-client | c770432de2d2950e00f7c7bd2bac22f3a81c2061 | 57c4a621aecd3a2f3f9faaa94f53b2727992a01a | refs/heads/main | 2023-02-23T05:55:39.279352 | 2021-01-21T02:06:08 | 2021-01-21T02:06:08 | 331,486,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,610 | py | # coding: utf-8
"""
nPhase REST Resource
REDCap REST API v.2 # noqa: E501
The version of the OpenAPI document: 2.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import rcc
from rcc.models.od_mcomplex_type_definition_range_... | [
"thomas.yu@sagebase.org"
] | thomas.yu@sagebase.org |
737c356e9ae7c86db618659b49bd60093191cca9 | 1d8e5a997f256abf7a046681c64554624db6fd8c | /advance_class/func1.py | 636a36aeab63a991cf1c4d2f23b7b03415c751ac | [] | no_license | luckywind/magic_box | 9d6f8eeef26c5431392a101a3dc54b03ef20df58 | 601b36c5008417f52f23af91449fbcce0d806f95 | refs/heads/master | 2021-01-01T05:24:48.181785 | 2016-04-22T01:30:50 | 2016-04-22T01:30:50 | 56,816,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | #coding=utf-8
#1.定义一个方法 func,该func可以引入任意多的整型参数,结果返回其中最大与最小的值。
'''
2.定义一个方法func,该func可以引入任意多的字符串参数,结果返回(长度)最长的字符串。
3.定义一个方法get_doc(module),module参数为该脚本中导入或定义的模块对象,该函数返回module的帮助文档。
例 print get_doc(urllib),则会输出urllib这个模块的帮助文档。
4.定义一个方法get_text(f),f参数为任意一个文件的磁盘路径,该函数返回f文件的内容。
5.定义一个方法get_dir(folder),folder参数为任意一个文件... | [
"1318247907@qq.com"
] | 1318247907@qq.com |
ca2b27f57589812b825aa419c929e23c13f248ee | 93636267195ed83a74fce8796d9b83a668a3160f | /fly_scraper/fly.py | 97ad0d777263d2e288b967bde4808e1a4c9574ca | [] | no_license | AlexandrMalahov/Learning | 46e8ea8c4c4035db483e2d09a76791d2263a0f3a | 18260de924b547e69bed4bfabfcc9a33ddb480f8 | refs/heads/master | 2020-04-22T11:35:03.125779 | 2019-09-12T14:57:14 | 2019-09-12T14:57:14 | 170,345,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,966 | py | """Python 3.7. Parsing of the web site https://www.orbest.com/."""
# сделать с аргпарс и объеденить проверки ввода в одну функцию
import argparse
import datetime
import re
import requests
from lxml import html
def input_query_params():
parser = argparse.ArgumentParser()
parser.add_argument('-w', '--way', h... | [
"knessdar2@gmail.com"
] | knessdar2@gmail.com |
07a83ac60630d1e7e99d2f2c893b69b5234db217 | 9950c7186f421d1bdcb52f6a6b8e3593272fc49f | /py/compare/functions/timepenalty.py | 9447147ff16e01d75048c29189d23e9b68556a88 | [] | no_license | music960633/DSnP_grading | b11016d00f1757d0f155991404ffb3102fd2203e | c0a8bd1244a3bff5b7152f660f4c77c937c514d8 | refs/heads/master | 2021-10-11T14:49:29.683556 | 2019-01-27T15:16:09 | 2019-01-27T15:16:09 | 116,963,124 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,161 | py | """Compare class for "timepenalty" compare method."""
import re
import dsnp_setting
from compare import stat
from compare.functions import base
_RE_TOTAL_TIME = re.compile(r'Total time used\s*:\s*(\d*\.?\d+)\s*seconds')
class TimePenaltyCmp(base.BaseCmp):
def cmpCmd(self, ref_out, stu_out,
min_val, m... | [
"music960633@gmail.com"
] | music960633@gmail.com |
af2c88cf2423b3f63cf4992337ae51d62aaa93a0 | f5603094ddcd49d5ffef11c8feadd4b66edbb112 | /tf/Graph.py | eafd63974ef8561bb3e8601d23b9408339ca9326 | [] | no_license | jesen8/study_english_with_DL | 2cc643bd5e0b67fd1c5be9cc8dead869c2f9e411 | 7ad6b531332b3a7ebdd7bc6107f843ab5f09ceb3 | refs/heads/master | 2020-04-05T03:45:49.071774 | 2019-05-06T02:42:46 | 2019-05-06T02:42:46 | 156,526,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,175 | py | # RIGHT
def my_func(pred, tensor):
with tf.control_dependencies([pred]):
# The matmul op is created in the context, so a control dependency
# will be added.
return tf.matmul(tensor, tensor)
tf.Graph.device(device_name_or_function)
with g.device('/gpu:0'):
# All operations constructed in this context ... | [
"360697611@qq.com"
] | 360697611@qq.com |
1581a1828244d936040e288b0a6211b5ae3ce290 | 4d83081d5bb6e20d4c79cbcc1eeb07310019c6d3 | /tensorflow_test.py | fe3d27da8ee35cd2584b7288ff7b0a74767cc348 | [] | no_license | hbshin00/VAILSP21 | 36760b74b5633b3eb2a134af1182748f6dc63c7a | 3ed0375959061b8d42efbbd4ab9e00bb83ae5df7 | refs/heads/main | 2023-05-12T17:06:35.071822 | 2021-06-04T19:25:15 | 2021-06-04T19:25:15 | 337,241,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,338 | py | import tensorflow as tf
x1 = tf.constant([1,2,3,4])
x2 = tf.constant([5,6,7,7])
result = tf.multiply(x1, x2)
print(result)
#why doesn't this work tho
#sess = tf.Session()
#print(sess.run(result))
#sess.close()
#Belgian Traffic Signs
import os
import skimage
import imageio
import numpy as np
... | [
"noreply@github.com"
] | noreply@github.com |
d273be6ad84e00816624c1c2db81aeb55764ad1f | 49536aafb22a77a6caf249c7fadef46d63d24dfe | /tensorflow/tensorflow/python/ops/metrics_impl.py | 07a43d2961aef78c6af194c06eb1cd62d641f352 | [
"Apache-2.0"
] | permissive | wangzhi01/deeplearning-1 | 4e5ad93f0d9ecd302b74352f80fe1fa6ae70bf0d | 46ab82253d956953b8aa98e97ceb6cd290e82288 | refs/heads/master | 2020-05-28T03:14:55.687567 | 2018-09-12T16:52:09 | 2018-09-12T16:52:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144,255 | py | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"hanshuobest@163.com"
] | hanshuobest@163.com |
116edd3d8348affb82704ee2149a77b01bba66cd | 47a9270b5c84d441a68f5b7486a4897844b89875 | /simulation.py | 514575dc5b24744766b20a119c5e5d7958e8a067 | [] | no_license | RCIITG/HIVE | 74a7b8b9a0f6b9c13015aaf7863c7177e18c63b7 | 027c168280842a2d410bf92f4ea2e1e7c2ed7bfb | refs/heads/master | 2020-04-05T01:35:09.071062 | 2017-07-30T17:11:50 | 2017-07-30T17:11:50 | 81,948,703 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | import random
import time
import numpy as np
from graphics import *
import math
def draw_windows(w, h):
# create windows
win=GraphWin('swarm', w, h)
win.setCoords(0,0,w,h)
return win
class robot:
max_range=50
def create_bot(self,win,x,y):
self.shape=Circle(Point(x, y), 10)
self.shape.draw(win)... | [
"afzalhmd14@gmail.com"
] | afzalhmd14@gmail.com |
33daf81383f07a60e1205b82c0c803721e8fd23e | 25985aeeee54373d26a164e4cc6a014770e3ebf3 | /windows/w3af/w3af/core/ui/gtkUi/.svn/text-base/exploittab.py.svn-base | 7ad6f040980ac9f8abcf7cb7387f8c80945f7141 | [] | no_license | sui84/tools | 4b750dae90940fbe3a226cba72dc071d8fb88b7c | 651cc08eb50199ce1044c684dbf714ea26df6432 | refs/heads/master | 2021-01-22T19:22:26.964580 | 2017-08-20T15:23:38 | 2017-08-20T15:23:38 | 100,774,276 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 29,792 | '''
exploittab.py
Copyright 2007 Andres Riancho
This file is part of w3af, w3af.sourceforge.net .
w3af 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 version 2 of the License.
w3af is distributed in the hope t... | [
"sui84@126.com"
] | sui84@126.com | |
7105f8ccff4a2e7c22be09b82854917a539b4377 | 29cb09a368d3ae3c913ac435d199028ea68963eb | /src/ndngitsync/repo.py | fa545472868d0408a515a1949e1ead1c13ce91a1 | [] | no_license | zjkmxy/GitSync | ba8ea6a918ca5617c8b49b924f5f782bdc6a37b7 | 77c525bc883554545d95eb619c64c11e7e496d1d | refs/heads/master | 2020-07-08T19:39:40.060194 | 2019-08-23T22:15:59 | 2019-08-23T22:15:59 | 203,758,756 | 0 | 0 | null | 2019-08-22T09:16:15 | 2019-08-22T09:16:13 | null | UTF-8 | Python | false | false | 8,894 | py | from pyndn import Face, Name, Data, Interest
from .sync import Sync
from .gitfetcher import GitFetcher, GitProducer, fetch_data_packet
from .storage import DBStorage, IStorage
import pickle
import asyncio
import struct
import logging
from .config import *
class BranchInfo:
def __init__(self, branch_name):
... | [
"bitmxy@gmail.com"
] | bitmxy@gmail.com |
6e98e14a02e0d28ecb66e1529a759262fee35440 | 613f6f7eaa5062b12fe8cd08c77d74b6f424aebd | /scripts/iterm2_change_theme.py | 6c8a1b4551dfee07cb3e36b535c223791c24d4cb | [
"Unlicense"
] | permissive | Furkanzmc/dotfiles | 1009cc257d70f0cb43c79a9f4666ac6e7d8f1a95 | 7840005baaef78d860127868e478f35c72d257fa | refs/heads/master | 2023-08-21T17:33:33.157314 | 2023-08-16T22:14:42 | 2023-08-16T22:14:51 | 158,622,114 | 11 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,202 | py | #!/usr/bin/env python3
# Python
from os.path import expanduser, exists
from subprocess import run
# iterm
import iterm2
async def main(connection):
async with iterm2.VariableMonitor(
connection, iterm2.VariableScopes.APP, "effectiveTheme", None
) as mon:
while True:
# Block until... | [
"furkanuzumcu@gmail.com"
] | furkanuzumcu@gmail.com |
347c80b9aa919c844abeade2e3e7f294c98a2abf | f2a81a8186c540e58d393bbbb2606ef51c26cd35 | /Calculator/User_calculator_1.py | 06207556cb3f39242c7764605b269137066aab90 | [] | no_license | Manoj431/Python | 584befef18e4fd1c02bd58025794902d2266468a | b8fc0220fb8a44232788223973f7e6df7c19836f | refs/heads/main | 2023-04-18T16:45:38.603406 | 2021-05-06T18:25:39 | 2021-05-06T18:25:39 | 364,981,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,258 | py | from tkinter import *
from tkinter.messagebox import *
import math as m
#defining the operations...
def backspace():
equation = txt_field.get()
equation = equation[0:len(equation)-1]
txt_field.delete(0,END)
txt_field.insert(0,equation)
def all_clear():
txt_field.delete(0,END)
def ... | [
"noreply@github.com"
] | noreply@github.com |
463b10f7c87d9bc12379e0dc03342fcc89926b13 | e6dd07d6d6c3777fe5b47ffef0145380c95f68c4 | /sds_ml/test_tree_sds.py | 077f1f0510d054a2dcb73bd4bafd153122340bbf | [
"Apache-2.0"
] | permissive | AndrewOwenMartin/sds-ml | db18ddfb223dd2de0e426f30e468307d92e2d297 | c48a022b762e6e445608efdfcf30334a47934db3 | refs/heads/main | 2022-11-05T14:05:17.090871 | 2020-06-23T17:46:35 | 2020-06-23T17:52:56 | 273,550,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,777 | py | import collections, datetime, functools, itertools
import json, logging, pathlib, random, re
import unittest
from logging import DEBUG, INFO, WARNING, ERROR, FATAL
import sds_ml.tree_sds as tree_sds
import sds_ml.tree_search as tree_search
log = logging.getLogger(__name__)
class TestTreeSds(unittest.TestCase):
d... | [
"a.martin@gold.ac.uk"
] | a.martin@gold.ac.uk |
9057b02d2ebad2cfc59b5649da5d1eeb5780b432 | 8d5f49fa1fda8ffc473e7f5a62786c77838a5820 | /website/drawquest/dbrouters.py | 23bbfb4be240253be8526040cf768de593b23d88 | [
"BSD-3-Clause"
] | permissive | MichaelBechHansen/drawquest-web | dfc6f5d9541860a5df23db678e82564a230bd42e | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | refs/heads/master | 2021-01-14T10:30:10.861222 | 2015-11-10T03:13:42 | 2015-11-10T03:13:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,679 | py | from django.conf import settings
class DatabaseAppRouter(object):
"""
A router to control all database operations on models for different
databases.
In case an app is not set in settings.DATABASE_APPS_MAPPING, the router
will fallback to the `default` database.
Settings example:
DAT... | [
"alex.ehlke@gmail.com"
] | alex.ehlke@gmail.com |
444afd65d83f521bbd49a2443f13fc3fbfceb654 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03078/s480863669.py | ac933d8bc820956754a8b02303270586b6a2aaa3 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | # solution
x,y,z,k = map(int, input().split())
a = sorted(list(map(int, input().split())), reverse = True)
b = sorted(list(map(int, input().split())), reverse = True)
c = sorted(list(map(int, input().split())), reverse = True)
ans = []
for p in range(min(k,len(a))):
for q in range(min(k,len(b))):
for r in range(... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d753dc57a8bfd4864a71762567e126d52cfbeeac | c5205dd59f574915766df1720d2e89a896d7e0f3 | /Pstage4_ModelCompression/code/src/modules/__init__.py | ce1754610b3380ff7f0786441024c8610bd75ccd | [
"MIT"
] | permissive | Hyerin-oh/Naver_AI_Boostcamp_Pstage | 8b965f42b7a631382c2b9ab523004b64ae84efd4 | b789e8eef8d37d614022a1c9b72b39656ab10446 | refs/heads/main | 2023-06-03T11:20:39.693955 | 2021-06-25T18:22:35 | 2021-06-25T18:22:35 | 360,912,985 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,728 | py | """PyTorch Module and ModuleGenerator."""
from src.modules.base_generator import GeneratorAbstract, ModuleGenerator
from src.modules.bottleneck import Bottleneck, BottleneckGenerator
from src.modules.conv import Conv, ConvGenerator, FixedConvGenerator
from src.modules.dwconv import DWConv, DWConvGenerator
from src.mod... | [
"ohhyerin.oh@gmail.com"
] | ohhyerin.oh@gmail.com |
57a86c8cef0f9b2ce056be15b4b0bd185e7a4f54 | 3c9e203640dd7a48c217a2676133e6aba7308e8c | /code/driving_models.py | 93574468339cb126c13739c9d8400721ad1b27c5 | [] | no_license | SeUnv/DeepBillboard | c8cecb5bdc4cb468bfa2c108c835ab5d0a47236e | 9ce636027059703bbe99897fdcd8e0623f4ffdb0 | refs/heads/master | 2021-10-21T07:48:19.848773 | 2019-03-03T12:18:13 | 2019-03-03T12:18:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,097 | py | # usage: python driving_models.py 1 - train the dave-orig model
from __future__ import print_function
import sys
from keras.models import Sequential
from keras.layers import Convolution2D, Input, Dense, Flatten, Lambda, MaxPooling2D, Dropout , Activation, SpatialDropout2D, merge
from keras import models, optim... | [
"husheng.zhou@utdallas.edu"
] | husheng.zhou@utdallas.edu |
e020a43aa9bf4c84b6d4bcd929e8033592c30d60 | f3381cef5984b4100e64d12a25ed6429a177bf32 | /2.py | e69f223a8b5748fdd070981ab9112d4077b51b92 | [] | no_license | wzy-hb/python | e8a61c0d249b04dd6827bbfdce5d6cf27428a5e7 | 3174f7fe3d547c066f6f2bb740fd4b577e0f457f | refs/heads/master | 2021-01-25T23:24:29.053774 | 2020-02-27T14:22:29 | 2020-02-27T14:22:29 | 243,225,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 70 | py | #! /usr/bin/env python3
n = 0
while n < 11:
print (n)
n += 1
| [
"19990349786@163.com"
] | 19990349786@163.com |
f742f0e72baff1300e7da34e28620c6c7e0731fc | df3639d68ffc636b6bac700cf7a62ee756dcb343 | /checklists/urls.py | 26cc51757bbad2cb811e54e3e4dcefc7a517a3f9 | [
"MIT"
] | permissive | wedk/todomvc-django-ujs | c3b4862ddb66bfaa9a5f7c2c1ef46ca387258751 | 3909f2448ee32412f0eebe1007d34fb66cbf7185 | refs/heads/master | 2021-01-10T02:14:18.254744 | 2016-01-08T21:51:38 | 2016-01-08T21:51:38 | 49,298,272 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | """checklists URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | [
"wedk@users.noreply.github.com"
] | wedk@users.noreply.github.com |
05f8acf899356527afbdb989c352a308f1fe1d95 | eb2fe5eaafad67c4f75154b3e30ffef245d93cfd | /SortingVisualizer.py | a31f5a541538c5cc2a32eb04e43e21628404e909 | [] | no_license | Nordicade/SortingVisualizer | 608a34a57763f59223b3225190736995344bd0f2 | eed67d336cd84b0dec6268f8e9ea87f82d3d91df | refs/heads/master | 2020-06-24T08:38:44.408888 | 2019-08-13T19:59:17 | 2019-08-13T19:59:17 | 198,917,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41,045 | py | # Created by Nicholas Nord
# July 22, 2019
#
import pygame
import time
import math
import random
import heapq
import matplotlib.pyplot as plt
pygame.init()
display_width = 1200
display_height = 600
black = (0,0,0)
gray = (214,214,214, 1)
white = (255,255,255)
red = (255, 0 , 0)
blue = (0, 0, 255)
visualizer_dim = 5... | [
"46762778+Nordicade@users.noreply.github.com"
] | 46762778+Nordicade@users.noreply.github.com |
3a21f478e29c918e025b224c83bff5371026c2fe | 56d558d7ff259b66850c0ee6558c3121867f987f | /test01/test02_10_02/example_4.py | 8605bf09528d716d557ef4d9f72a7f65219c7983 | [] | no_license | kongjingchun/PyTest | 9f97e42d03206091bfe6e78f22a967ae242a37fc | ad88c51b5482e5b32c35bd7d4049636f11786d74 | refs/heads/master | 2023-05-25T22:18:05.914096 | 2021-06-05T14:27:04 | 2021-06-05T14:27:04 | 341,505,772 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | # coding:utf-8
# @Create time: 2021/5/25 12:26 上午
# @Author: KongJingchun
# @remark: 异常处理、开启事务
import mysql.connector
confiig = {
"host": "49.233.5.13",
"port": "3306",
"user": "root",
"password": "Jingchun0302!",
"database": "demo",
"auth_plugin": 'mysql_native_password'
}
try:
con = mysq... | [
"jing20130808@vip.qq.com"
] | jing20130808@vip.qq.com |
4528cfbfc0052ddbceffbff345f8f7d6fa21f310 | 3b940d3180fb3ffc5070de8c8aaed26c79df2917 | /Code/augment_bird_images.py | 1ccb78f23f76f4916e6eec2ab93b4394293671a6 | [] | no_license | sumanbhagavathula/kaggle | c6b4d1c22c9b78b5551ad1825510d627fb9f518a | ee4f9ca5863dcf9d863671651955aec034597cec | refs/heads/master | 2021-06-16T09:13:37.368719 | 2017-06-05T05:38:40 | 2017-06-05T05:38:40 | 92,707,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | from io import BytesIO
from matplotlib.pyplot import imshow
from IPython.display import display
import copy
import numpy as np
from PIL import Image, ImageOps # PIL is the Python Imaging Library
import requests
import imageaugmentationfunctions as imgaug
import utilityfunctions as util
imgtype = 'test'
#im... | [
"noreply@github.com"
] | noreply@github.com |
8d692a48c5cb69d40c2ae0bf1496337292cdc744 | 4544f5cc683d1647c3c57da798806cd7c79f22a4 | /datasets/image_dataset.py | 610bd4afbe5c558cca16595dad25c30873472b0b | [] | no_license | zhangyahui520/myDetection | 86ba44e33279abdb3ccd3c04360577e97aa55874 | ff434c05c5170d119fab63e589cf4cdfdce89660 | refs/heads/master | 2022-11-05T14:08:19.352038 | 2020-06-25T20:36:01 | 2020-06-25T20:36:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,735 | py | import os
import json
import random
from collections import defaultdict
import PIL.Image
import torch
import torchvision.transforms.functional as tvf
from torch.utils.data import Dataset, DataLoader
import utils.image_ops as imgUtils
import utils.augmentation as augUtils
import utils.mask_ops as maskUtils
from utils.s... | [
"duanzh@bu.edu"
] | duanzh@bu.edu |
862615a3240f70d7ad9c2529170a5eb9b3cfa420 | 671f266694a1f8e8d5692d5b08871126702d1591 | /1_Arrays_and_Strings/1-7-rotate-matrix/rotate-matrix.py | 5a48b130897a1646ea720e0fc69f5f16263f99d6 | [] | no_license | LuqiPan/Life-is-a-Struggle | 07836fe410c04f6e4cef01e5cd069e96f583027d | 330f864bc03d0ba47b917ff2afa3b5c29688df11 | refs/heads/master | 2021-01-18T18:30:52.758562 | 2017-03-31T20:16:23 | 2017-03-31T20:16:23 | 86,857,055 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | def generate_matrix(n):
return [[x * n + y for y in range(n)] for x in range(n)]
def rotate(matrix):
dimension = len(matrix)
for layer in range((dimension + 1) / 2):
for j in range(layer, dimension - layer - 1):
temp = matrix[layer][j]
matrix[layer][j] = matrix[dimension - l... | [
"luqi@yelp.com"
] | luqi@yelp.com |
b6ff23c0ecf8a41f7bdb4d157d1ac060eceb9977 | 61d8f5ac162d16f2a7785d00febf42c1621e4a1e | /PyCharm 2017.3.2/新建.py | 8e924159d0a48bf824fbea5433dae6247ee1d7e8 | [] | no_license | hezy10/myproject | c77d58c4d638c21b9356f5ead56c6d5e86b520d4 | c242773c3625b2e89f5da92acbcc044a8a2e12d8 | refs/heads/master | 2023-01-12T21:13:23.247800 | 2020-11-13T09:19:34 | 2020-11-13T09:19:34 | 312,503,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,185 | py | # 从键盘输入一个字符串,将小写字母全部转换成大写字母,然后输出到一个磁盘文件"test"中保存。
def file_save():
str_up = input('请输入内容:')
data = str_up.upper()
with open('aaa.txt','w+') as f:
f.write(data)
f.close()
file_save()
# f = open('test.txt','w+')
# f.write(data)
# f.close()
# 求0—7所能组成的奇数个数
def an_odd_number():
pass
# l... | [
"179644835@qq.com"
] | 179644835@qq.com |
346fd4d1f34f826cceeac467e46dac23ffa4b675 | 696ddf845f8058d572d25a443afb70711770eaeb | /UberooBehaviour/features/steps/read_statistics.py | 463bb60e6aae38cbd077864a40c8c9d5793eb7ad | [] | no_license | NassimBounouas/SI5-soa_api_lab_team_d | 14a47b96cdf4ac6462cc2b98f468947c29bf007e | 655c8cc39dc871d54582426c70f9219a07d8a397 | refs/heads/master | 2020-03-29T17:15:36.487575 | 2018-11-11T17:44:25 | 2018-11-11T17:44:25 | 150,152,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | from behave import *
from share.fetch_callback import fetch_callback
from share.query_callback import query_callback
# Note the final $ for regex
@given('a steed "{steed_name}"$')
def step_impl(context, steed_name):
pass
@when('computing kpi "{kpi}"')
def step_impl(context, kpi):
pass
@then('the kpi is r... | [
"nikita.rousseau@etu.unice.fr"
] | nikita.rousseau@etu.unice.fr |
d93d462eb124d9027c852c07d16658e2754aacc5 | 09510e2016c93bd60669a84ec2ff466ec443ecc3 | /IModel.py | 3f77007e65da08ca2175a84af7a8bed1df879ae4 | [
"MIT"
] | permissive | Bigg-T/learn_flask_py | 5b5d508a7a63fa25c85343c9c99e1c254d530c0f | a9c61e562cba88f6f83dbfbf4301c62a04a15f07 | refs/heads/master | 2021-01-16T00:28:52.037401 | 2017-08-14T02:36:18 | 2017-08-14T02:36:18 | 99,965,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,027 | py | from abc import ABC, abstractmethod
class IModel(ABC):
"""
Fetch all of the on the entries in the the database.
@params database_name the name of the the table
return tuple (nunber of entries, all entries in with the given table name)
"""
@abstractmethod
def fetchall(self, database_name):
... | [
"thienn503@gmail.com"
] | thienn503@gmail.com |
a69b56d6e1f220cfd671cf3e1d3815682fc394a0 | 3d5382d38ef618e56ec89c82ec3d2951b28fa364 | /py/Compiler/Exceptions.py | bc027d1e9b606bcebb0cf43dc98be4220c612505 | [
"Apache-2.0"
] | permissive | PierreBizouard/PoC | 26a5e414b630d65e9369d446906741f483f85dcb | 35f7f6cc3a8bf3ec1883f91cf3ec844ed6082379 | refs/heads/master | 2021-01-16T19:31:58.261996 | 2015-08-25T21:16:31 | 2015-08-25T21:16:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,704 | py | # EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
#
# ==============================================================================
# Authors: Patrick Lehmann
#
# Python Class: Base class for all PoC***C... | [
"Patrick.Lehmann@tu-dresden.de"
] | Patrick.Lehmann@tu-dresden.de |
b4809ca9aa90fa49b994c884c229b299da19fb4b | 279170fed05a3001744847c54ab549ea7ee3c904 | /horse_test.py | aeb6fa97edbc37a387a383a8f900c58245c4eeab | [] | no_license | Sarefx/Scraping-Data-From-the-Web | 0c903bbd763f409cd538b3108ffb1850cfc21540 | c62f31e4a600c62e5403997a556966dcafb3027e | refs/heads/master | 2022-10-21T14:25:01.282026 | 2020-06-10T21:17:47 | 2020-06-10T21:17:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | from urllib.request import urlopen
from bs4 import BeautifulSoup
import unittest
class TestHorseLand(unittest.TestCase):
soup = None
def setUpClass():
url = 'https://treehouse-projects.github.io/horse-land/index.html'
TestHorseLand.soup = BeautifulSoup(urlopen(url), 'html.parser')
def tes... | [
"nikitakoba93@gmail.com"
] | nikitakoba93@gmail.com |
a5981b2b8148ceb8e003a84135f5cd35e8ab89a2 | 1ca965019d8e6501eb13ac9d0526877e2aefbca8 | /useful/pickup_images/2_generator_feature/generateFeatures.py | 5f8247f4168d7400483f28054a030080db56a7a6 | [] | no_license | starpicker/something | bcdea511501db2256d3e47ee267c1aecc5ec7f1e | 16a59a4b98ac7eda9216543ef61f19f3c2e03c8e | refs/heads/master | 2021-06-01T11:13:06.887059 | 2021-04-13T02:47:51 | 2021-04-13T02:47:51 | 115,477,577 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,750 | py | import math
import numpy
import itertools
LANDMARK_NUMBER = 68
def facialRatio(points):
x1 = points[0];
y1 = points[1];
x2 = points[2];
y2 = points[3];
x3 = points[4];
y3 = points[5];
x4 = points[6];
y4 = points[7];
dist1 = math.sqrt((x1-x2)**2 + (y1-y2)**2)
dist2 = math.sqrt((x3-x4)**2 + (y3-y4)**2)
# ... | [
"starpicker1@163.com"
] | starpicker1@163.com |
d97a830a2007d70319995bdb9790a1ed2e890cfc | c2004a41f01fa6e0a4d0dcd142bdd589251230a8 | /load_model_and_test.py | 0f80a2f401749baad508dd2c456af319e2c540b8 | [] | no_license | vivekltp120/JBM_image_detection_model | c9978fe6556bc7be7524b39510e5ff4cddc32b9c | 83c5f1d44cfade5bd93ecdee733f4542dbfecb88 | refs/heads/JBM_image_detection | 2022-12-14T04:12:13.113723 | 2019-01-13T05:06:00 | 2019-01-13T06:31:03 | 165,473,819 | 0 | 0 | null | 2022-12-08T01:02:48 | 2019-01-13T06:32:31 | Python | UTF-8 | Python | false | false | 1,261 | py | from keras.models import load_model
from keras_preprocessing.image import ImageDataGenerator,array_to_img, img_to_array, load_img
import glob
from matplotlib import pyplot as plt
import cv2
import numpy as np
import os
import sys
d_path='./Data/validation/YE358311_Crack_and_Wrinkle_defect/'
h_path='./Data/validation/Y... | [
"vivekltp120@gmail.com"
] | vivekltp120@gmail.com |
ebd43be6f3a13daecb6f6bf526df0ca99451a7c8 | a890d538853c835f86e4b70173e23cb21b9f9ca5 | /math_library.py | 3d62a29fa2821baab816c43f2cdcd32e110c0a23 | [] | no_license | PSS1998/Math-Library | 4847d03f2dd2613d741581e369b5ab2faa1c056b | 3efdc7cf10de7da240c4d2c96b1819ed9dc4c642 | refs/heads/master | 2023-03-03T03:42:17.304967 | 2021-02-16T13:33:42 | 2021-02-16T13:33:42 | 290,165,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,847 | py | from abc import ABC, abstractmethod
import math
class Iexpression(ABC):
@abstractmethod
def derive(self):
pass
@abstractmethod
def eval(self):
pass
class expression(Iexpression):
def derive(self):
self.derive()
def eval(self):
self.eval()
class operator(Iexpression):
def __init__(self, left_exp, ri... | [
"p_sadri_s@yahoo.com"
] | p_sadri_s@yahoo.com |
851bb89a66ebd7d849b2460e58cb89a0a210f9c4 | 9b1bc7d4544a3a44fcf1ae548243d7a7d0b0617d | /fass.py | 6268da3e616ee3d6d81d7b1f176a8e885c83689a | [] | no_license | DakaRaka/GeorgeClooney | 5c5cc8ad59292b74838e8caee9f9421934262a93 | 0e193265bd337edbd48f07cd825ddb21aafe128d | refs/heads/master | 2020-09-20T14:50:26.829961 | 2020-01-22T23:16:43 | 2020-01-22T23:16:43 | 224,514,504 | 1 | 1 | null | 2019-11-27T20:58:31 | 2019-11-27T20:47:43 | Python | UTF-8 | Python | false | false | 879 | py | from fassword.utils import load_data
import argparse
from fassword.entries import init_data
from fassword.entries import add_entry
from fassword.entries import unlock_master
from fassword.entries import decrypt_entry
from fassword.entries import list_entrys
parser = argparse.ArgumentParser()
parser.add_argument(
'... | [
"DakaRaka@protonmail.com"
] | DakaRaka@protonmail.com |
e4a2a293357647b5d27f7fdba182e45a9f15b4de | e0994ddf4319aaf2e911d61c5ce57f2dd881ca20 | /faculty_non_teaching/admin.py | 692a8737a066b53f56970fe9657f664b05500a18 | [] | no_license | sarthak221995/ucoe | 98dee2de8b614da4e1a516cc4cbae47269c5f7f0 | 94530cde81ef060e94734cfaabce00d814de3b83 | refs/heads/master | 2021-01-10T04:05:04.102121 | 2016-08-27T12:18:23 | 2016-08-27T12:18:23 | 49,074,017 | 0 | 1 | null | 2016-01-08T07:19:07 | 2016-01-05T15:22:57 | HTML | UTF-8 | Python | false | false | 215 | py | from django.contrib import admin
from .models import Post
class PostAdmin(admin.ModelAdmin):
list_filter = ['created','modified']
list_display = ('name','created','modified')
admin.site.register(Post,PostAdmin)
| [
"sarthak221995@gmail.com"
] | sarthak221995@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.