blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
836ddf2bb50c061022d2533131b74c92c979bf5a | b29bc810068f3295e509eb2cf5d7ea83f3d3d25e | /bishi/bishi_2.py | 76284fa6c4143b83e1e4f70947f8bb1ec37f483d | [] | no_license | wmm0165/mianshiti | 854d9f380fef2261ad35875f1e2aebda934875e4 | 23af140e5d736d755136b1a91299feb25f1cfe96 | refs/heads/master | 2021-04-02T11:27:12.917549 | 2020-08-05T10:26:52 | 2020-08-05T10:26:52 | 248,270,133 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | bishi_2.py | # -*- coding: utf-8 -*-
# @Time : 2019/11/28 17:34
# @Author : wangmengmeng
"""字符串 "axbyczdj",如果得到结果“abcd”"""
a = "axbyczdj"
print(a[::2]) # 字符串的切片 |
d73e96a7e98571c782f8a9855bc5d55b44e0f5ca | da25b74803865255438816b5d112b2ad5158a9d8 | /mysouq_api/src/models/__init__.py | c1b401778207fe47d165fe50b453b3c2d902878f | [] | no_license | obiedaomar/-HTU-CP-Python-Web-Submission | 1bac6b92c96363474867f620a66d801122e3873b | 07b4bff5055633edcc3b91ff8ccd6fbf60ab0cd1 | refs/heads/main | 2022-12-31T05:10:35.465775 | 2020-10-20T21:59:45 | 2020-10-20T21:59:45 | 305,830,982 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 78 | py | __init__.py | from .user import User
from .product import Product
from .cart import Cart
|
8f1255574e93081ba2621ed481df6d26906e7ffb | 8519cc340770d1d05842dd75a1ce0e2cb47ac705 | /basic_rs/parse/parse_tps_tcp_decisec.py | 9369b76f3031019a7368326a15e5abf3e1bb3651 | [] | no_license | igor-barsukov/hurst-calc | 25c6194d4a98cb191d233f0d99dc33e8ce0c90f9 | 03d3ec160af780029b7fed4a5a916c044388ac5d | refs/heads/master | 2023-03-23T14:22:22.513762 | 2019-11-20T20:34:32 | 2019-11-20T20:34:32 | 221,783,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,293 | py | parse_tps_tcp_decisec.py | #!/usr/bin/python
# -*- encoding:utf-8 -*-
"""
Обработка pcap файла с получением на вызходе суммарной статистики
по количеству переданных пакетов и байт в секунду.
Для работы требует модуль dpkt, достуаный через pip.
В качестве первого аргумента коммандной строки требует имя
файла для обработки, результат записывается... |
66dc4495b8f0b73bed318aa3b3c224a920c1a293 | c91339f5aa88bff1a016413fab53f8c5770cc412 | /like_program.py | 65adf12dfaae8db8bf5f14db51e151231548ff30 | [] | no_license | Daniel98p/Codewars | c6030612b6f98dce083c8f6b975b44fa51e00407 | 2b5f525b3ef55406d632304f187e32aeec0c416f | refs/heads/master | 2021-02-09T01:00:59.770240 | 2020-07-15T16:00:08 | 2020-07-15T16:00:08 | 244,219,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | like_program.py | def likes(names):
if len(names) == 0:
return 'no one likes this'
elif len(names) == 1:
return f'{names[0]} likes this'
elif len(names) == 2:
return f'{names[0]} and {names[1]} like this'
elif len(names) == 3:
return f'{names[0]}, {names[1]} and {names[2]} like this'
e... |
28b87198141a302fa9d533bd5bfc138d5b60d530 | cc2a51058bc11c347d6413f246e535c3b7799eb5 | /osmaxx/conversion/size_estimator.py | cc787ba5ce885206d0b93e2ccd8c892c33455a53 | [
"MIT"
] | permissive | geometalab/osmaxx | fb6828400774c30af6efd55a59289cc2a5bb1aef | 7857d2630a6036e4c5d6aa53d277cfd907ca32d0 | refs/heads/develop | 2023-05-02T04:30:10.649561 | 2023-04-16T19:41:45 | 2023-04-16T19:41:45 | 28,986,110 | 28 | 6 | MIT | 2023-02-16T05:26:49 | 2015-01-08T21:05:34 | Jinja | UTF-8 | Python | false | false | 2,912 | py | size_estimator.py | import math
from osmaxx.conversion import output_format
from osmaxx.conversion.converters.converter_gis import detail_levels
from osmaxx.excerptexport.models import Export
PRE_DATA = {
output_format.GARMIN: {
"pbf_predicted": [25000, 44000, 96000, 390000],
detail_levels.DETAIL_LEVEL_ALL: [11000, ... |
4949dec75cdbd918551332623d9759fa190a120b | d7934a00eb5aeccb8c801b94364f3fd61f994884 | /reversecomplement.py | d807a7487a0b6a89aa2bd58e1faba19b004ae39c | [] | no_license | kew222/Self-Targeting-Spacer-Searcher | 2e2a68158770d7b0bc3f8b9d04947f5f214ef9a9 | 9e5d560ffb6100c5c28b46e71dae0bcde7e533e2 | refs/heads/master | 2022-10-30T18:52:59.757717 | 2022-10-11T06:57:39 | 2022-10-11T06:57:39 | 92,024,866 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 541 | py | reversecomplement.py | def import_data():
input_file = "Spacers_outside_islands.txt"
with open(input_file, 'r') as fileread:
lines = fileread.readlines()
imported_data = []
for line in lines:
imported_data.append(line.strip().split('\t'))
def reverse_complement(sequence):
sequence = imported_data(0)(7)
reverse_complement= sequen... |
8f92a873feb2237450b979cacab0464892b3fd37 | 1d89d110c16fad523646d413d0a50bd0dea9ce0f | /nosampling_pipeline.py | 00453d52835a11fef6b5f583144ffceafb660f1e | [] | no_license | puzzle91/Model-Pipeline-Machine-Learning | 5d582f292cab2809d61f00b921938cfc097bb7ae | 7a5451a978e5470c4a3f01d4df2addfeb626b683 | refs/heads/master | 2023-07-19T20:16:38.082908 | 2020-01-12T22:06:29 | 2020-01-12T22:06:29 | 231,584,794 | 1 | 0 | null | 2023-07-06T21:55:25 | 2020-01-03T12:33:54 | Python | UTF-8 | Python | false | false | 13,304 | py | nosampling_pipeline.py |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
#Isolation forest for outlier removal
#and sampler for outlier removal
from sklearn.ensemble import IsolationForest
from sklearn.metrics import classification_report
from imblearn import FunctionSampler
from sklearn.model_se... |
477ab117fa79f33fc6bbdc0453450bcb719a00dc | 5376b09a7370dec42a62bd2a11c01843d2adbe2f | /examples/docs_snippets_crag/docs_snippets_crag/concepts/io_management/config_input_manager.py | 315edc2832addfae103b05a6040062b0e10fd89c | [
"Apache-2.0"
] | permissive | geoHeil/dagster | 72c4ce3bc9f793e6e6de2c38bea531b4a768e9af | f044147f1cb0a545152bbe651f079974293deb73 | refs/heads/master | 2023-08-24T06:06:52.000940 | 2021-10-05T17:28:15 | 2021-10-05T17:28:15 | 413,931,608 | 1 | 0 | Apache-2.0 | 2021-10-05T18:17:31 | 2021-10-05T18:16:00 | null | UTF-8 | Python | false | false | 923 | py | config_input_manager.py | # pylint: disable=unused-argument
from dagster import (
InputDefinition,
ModeDefinition,
execute_pipeline,
pipeline,
root_input_manager,
solid,
)
def read_dataframe_from_table(**_kwargs):
pass
@solid(input_defs=[InputDefinition("dataframe", root_manager_key="my_root_manager")])
def my_so... |
8121b3a289d8a83f39bc2a4d9ca272372e28cc34 | 38d2a77508f3b99bf346617bbfb300393ea1cdb6 | /常见oj算法/sort/quick_sort.py | ec10391f306215c58fcbad8b2759572bd9a43044 | [] | no_license | hertz-pj/studyNotes | bab43e166c5b721213936ec4e5fd1a5d9ed21c36 | c76674c1e24e2cdc6d0ae0bfa4b02eac096499f5 | refs/heads/master | 2023-08-11T14:05:08.159768 | 2021-09-23T06:35:04 | 2021-09-23T06:35:04 | 178,392,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | quick_sort.py | def quick_sort(arr, left, right):
if left >= right:
return
pivot = arr[left]
i = left
j = right
while i < j:
while j > i and arr[j] > pivot:
j -= 1
arr[i] = arr[j]
while i < j and arr[i] <= pivot:
i += 1
arr[j] = arr[i]
ar... |
2cece877f97d23d9398fb0335c6dfa1a38d723b5 | 5ff9797770f9b8bc4d5f0072cac5e4cec494b288 | /app.py | 2abecd94396d6949398c89f5a09d06e90377dfec | [] | no_license | scaryswe/WEB-1.1-Homework-4-APIs-Starter | ad6054883a4524e247437bbaa65d7412d5ac9391 | 452201ea7c742d0c9feb6878f640229474cb3d95 | refs/heads/master | 2023-03-11T21:40:49.707267 | 2021-03-05T23:38:25 | 2021-03-05T23:38:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,982 | py | app.py | import os
import requests
from pprint import PrettyPrinter
from datetime import datetime, timedelta
from dotenv import load_dotenv
from flask import Flask, render_template, request, send_file
from geopy.geocoders import Nominatim
################################################################################
## SETUP... |
4a39657d3ed9b4eebf0421c5bc8b78eb3682043b | f6d6bacd906c362201e925feb8396feda013900b | /projects/raspberry_pi/rpi_controller.py | 67f94b140cce27f802485026adedd68c0bdf5166 | [] | no_license | hans-boden/pyws-fablab-lisbon | 32b31e33788fd7307edd15cbe689e4c725b1a68c | e68df5f66b347723614040dc9f14cf95f2190bc7 | refs/heads/master | 2020-04-06T13:30:11.640631 | 2016-10-04T11:35:05 | 2016-10-04T11:35:05 | 49,223,361 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 898 | py | rpi_controller.py | # python3
"""
learning to program the raspberry pi
simulate parts of the RPi.GPIO interface
"""
from collections import namedtuple
TrafLite = namedtuple('TrafLite', 'cr cy cg pr pg')
class G():
btn_a = 10
lites_a = TrafLite(11, 12, 13, 14, 15)
btn_b = 20
lites_b = TrafLite(21, 22, 23, 24, 25)
... |
ac7fb453d6438e68f764261179171b13ba683bc8 | 59bb398c5f23770e4725f35f932f3a5fd013efae | /jwst/mrs_imatch/mrs_imatch_step.py | 56fc8b267696f8b79f60e36a177c86abcbc1c2ba | [
"BSD-2-Clause"
] | permissive | spacetelescope/jwst | 9826d86781c6e01aced951882471f8b967fa1f6e | a4a0e8ad2b88249f01445ee1dcf175229c51033f | refs/heads/master | 2023-09-04T09:54:04.504036 | 2023-08-31T20:19:27 | 2023-08-31T20:19:27 | 60,551,519 | 449 | 106 | NOASSERTION | 2023-09-14T21:21:33 | 2016-06-06T18:34:23 | Jupyter Notebook | UTF-8 | Python | false | false | 14,791 | py | mrs_imatch_step.py | """
JWST pipeline step for image intensity matching for MIRI images.
:Authors: Mihai Cara
"""
import numpy as np
from jwst.datamodels import ModelContainer
from .. stpipe import Step
from wiimatch.match import match_lsq
from astropy.stats import sigma_clipped_stats as sigclip
__all__ = ['MRSIMatchStep', 'apply_b... |
019fce88c0e4dfc4606e54d4b3e8aa9ed78f67b4 | ac91dc0d319bce54e8f9938232ee85fbf45fd1af | /ia/workspace/ml/BackUp/GradientBoostRegressor.py | 83ed4cecdbf86b31693133a1953ad1e1419bc807 | [] | no_license | lucashca/TCC | c926ea46280299c7d18a283cd652d0449f9d2d4f | 4b31ebbcda5216a14166c08b31135de1d9b454d6 | refs/heads/master | 2023-01-23T20:39:37.180658 | 2020-08-23T13:19:31 | 2020-08-23T13:19:31 | 213,916,730 | 0 | 0 | null | 2023-01-07T10:34:53 | 2019-10-09T12:46:50 | Jupyter Notebook | UTF-8 | Python | false | false | 7,756 | py | GradientBoostRegressor.py |
from sklearn.model_selection import train_test_split
import sys
sys.path.insert(0, "../myTools")
from dataSetPreProcessing import train_validation_test_split
from loadDataSet import loadMainDataSet,loadTesteDataSet,loadCompletDataSet,loadMainDataSetWithElevation
from tools import verifyArgs,findBalancedDataSet,pltResu... |
bac367de5788823f04fa83592ae431e6663d4603 | 6689c67620eaab900809c0cce761a9c046b389b3 | /Codeforces/749A.py | b44e418e047af21c9c7da542083e3358aa3e67dd | [] | no_license | manmeet17/Competitive-Coding | 33ecf0d56ca4a17c1adf6e96bbce69d40afe06cf | e161623eb5a4c4610663fadade6523b9ae87407d | refs/heads/master | 2020-12-30T14:44:26.708633 | 2019-05-24T12:49:30 | 2019-05-24T12:49:30 | 91,076,872 | 0 | 1 | null | 2017-10-28T19:19:32 | 2017-05-12T09:49:41 | C | UTF-8 | Python | false | false | 105 | py | 749A.py | n=int(input())
print (n//2)
s="2 "
if(n%2==0):
print (s*(n//2))
else:
print (s*((n-3)//2) + "3")
|
1d63db69d68b74c40083eb42d3cf3cd18e762fca | a1dbeea694d6e88e950c1e38f99f3629aedac28e | /vk_friends_online.py | 3a997b722076189ab4678e6d9c17003f4bbb14e1 | [] | no_license | karadorum/8_vk_friends_online | 7021721cab4e2b5570c5931d72df14fbcee0ce47 | 1c872f7d22579819e7171721625c678b2d84d65b | refs/heads/master | 2020-03-28T18:51:41.151396 | 2018-11-11T20:50:40 | 2018-11-11T20:50:40 | 148,920,164 | 0 | 0 | null | 2018-09-15T16:38:42 | 2018-09-15T16:38:42 | null | UTF-8 | Python | false | false | 894 | py | vk_friends_online.py | import vk
import getpass
APP_ID = 6695750
def get_user_login():
return input('login: ')
def get_user_password():
return getpass.getpass(prompt='password: ')
def get_online_friends(login, password, version=5.85):
session = vk.AuthSession(
app_id=APP_ID,
user_login=login,
user_p... |
3783b8e27b24963fee6aee12fa7ee2efd65dbbb9 | 6295236eaf09ce0a6b8e31a1e2aaf4731e0e0d07 | /lidar2cam_as_kitti.py | 8839bbc27885d2dc8202404ffa6248324da9c533 | [] | no_license | 441599828/data_extract_from_rosbag | b099be46709970f129fdc6bdeeb6c774ca6286f5 | e369b709decf2ec2bb22068a853773226b73c927 | refs/heads/main | 2023-06-25T10:30:53.713428 | 2021-07-26T06:37:21 | 2021-07-26T06:37:21 | 389,527,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,384 | py | lidar2cam_as_kitti.py | import numpy as np
from scipy.spatial.transform import Rotation
# BJ11_param
lidar2carR = np.array([0, 0, 0])
lidar2carT = np.array([[0.0, 0.0, 0.0]])
car2camR = np.array([0.00218161, 0.00436332, -9.57284e-06, 0.999988])
car2camT = np.array([[0.0, -0.135, -0.21]])
shortcamR_rect = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,... |
a6df26c86afc0a9df1a0d2511e78bf6433f71384 | dcce230b7aecd71f48f3ea09a6eb3d01ee4fa306 | /table_funcs.py | 54e884b06d83174e4ddb5a64aed02edd7494eb73 | [] | no_license | Fa773NM0nK/Simplex-Algorithm | d8118713359e6637290a5e44d8d9c7d2e8b69a00 | 60511e5513d2b67efccf717351dc13e830447002 | refs/heads/master | 2016-09-05T10:04:26.020594 | 2013-11-14T16:11:34 | 2013-11-14T16:11:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,869 | py | table_funcs.py | import sys
def printTable(B, fn, table, ZjCj=[], theta=[]):
print
print "\t|C\t",
for i in fn:
print str(i) + "\t",
print
print "-------",
print "-------",
for i in fn:
print "-------",
print
print "B\t|X\t",
for i in xrange(0, len(fn)):
print str(i+1) + "\t",
print
print "-------",
print "-------"... |
f2c80db87a7e22e4f6bab7c6182f7b1ea9dce825 | 65d3cde62300f572522e3439f3a5338156988def | /proj1.py | 2eeea2504337213b151c83694d825f022acdaa88 | [] | no_license | pedrofgodinho/FP1819 | 38e358655594e7cd7eaf04ffe9daf0ef5ff16810 | fa4a73c7c2a713ca308926887198fcd0d9231950 | refs/heads/master | 2022-03-22T13:19:22.498794 | 2019-09-15T17:11:51 | 2019-09-15T17:11:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,058 | py | proj1.py | # Nome: Pedro Manuel Fernandez Godinho Numero: 93608
def eh_tabuleiro(tab):
"""Uma funcao que retorna True se o argumento for um tuplo que representa um tabuleiro, False se nao o for.
Considera-se um tabuleiro um tuple com 3 elementos:
-Um primeiro tuple de 3 elementos;
-Um segundo tuple de 3 e... |
e88ad0b1ebefa7a93a0d1d51912296caaabf2de0 | 8267dd1ad7602fa03bd0d45a57689b4b3cc8878e | /algorithms/textrank.py | 55c1cd731a34d6b100147591932f38a9d551b690 | [] | no_license | Doniol/Vacature_Analyse | bdadc4090044935e3fdd99a271e44b6615b35c8a | eadf85e450777e09ba29dcf5d851ccd93fdfb520 | refs/heads/master | 2023-02-19T12:34:53.371208 | 2021-01-20T17:47:45 | 2021-01-20T17:47:45 | 299,846,496 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,980 | py | textrank.py | from pipelines.pipeline_verzamelaar_analyse import pipeline_db_to_analyse as pipeline_in
from pipelines.pipeline_analyse_interface import pipeline_analyse_to_db as pipeline_out
import spacy
from summa import keywords
from summa import summarizer
from spacy import displacy
from spacy_langdetect import LanguageDetector
f... |
ba9f6c056f268d3adc6bcc89a34b357d218bf514 | f0f6ba08266c506b7fe822a0a6575f7d563ce650 | /aspl_website_customer_wallet/models/res_config_setting.py | 204226faff70311393bd5618e3ab9ccf5de5da0a | [] | no_license | akradore/V13_ACC_-_MORE | 5f240eaaa53ea1c9272ff68367a59b3dd4dae450 | 8222989542e9ad474e4d43cc5c76b1f489c1d78a | refs/heads/master | 2023-03-18T17:16:22.292492 | 2020-12-01T20:52:34 | 2020-12-01T20:52:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,349 | py | res_config_setting.py | # -*- coding: utf-8 -*-
#################################################################################
# Author : Acespritech Solutions Pvt. Ltd. (<www.acespritech.com>)
# Copyright(c): 2012-Present Acespritech Solutions Pvt. Ltd.
# All Rights Reserved.
#
# This program is copyright property of the author menti... |
ea857bd66f50d5256f6d2b318894a0d8fddde3fa | cc5292ad6e4ef007f779cf13b8cd62fead516107 | /tests/test_constructors.py | 6deac4185de8cd0ec0ad9edce161f68d83e74e52 | [
"MIT"
] | permissive | dalemyers/deserialize | aa2f34ffbde794a74fd3d8eaa540fd9f49f57e8e | 798df0e3eebf4e6fe91c55fb5d800ec76c15fb5f | refs/heads/master | 2023-08-03T04:57:17.920077 | 2023-05-24T09:31:45 | 2023-05-24T09:31:45 | 160,041,186 | 21 | 5 | MIT | 2023-07-25T21:15:47 | 2018-12-02T11:39:03 | Python | UTF-8 | Python | false | false | 1,729 | py | test_constructors.py | """Test deserializing with specified constructors."""
import os
import sys
from typing import Optional
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
# pylint: disable=wrong-import-position
import deserialize
# pylint: enable=wrong-import-position
class BasicConstructor:
"""... |
be6359f464562395c7757ce26c63164661ed8175 | 67378e5718f0fdd78d91e84f2acacadb0c22c8cd | /geotools/process.py | cdf58029cc919979c1d6226e428717c629423323 | [
"MIT"
] | permissive | hulaba/EarthLearning | ec5083d2a4eb3baae87f828f9188f334090df604 | f2fa9c07f8af2512c4091a7901e781cc3dde99cf | refs/heads/main | 2023-04-10T20:58:10.473637 | 2021-04-27T12:48:34 | 2021-04-27T12:48:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 961 | py | process.py | import argparse
import geotools
def parse_args():
parser = argparse.ArgumentParser(
description='Convert shp to semantic segmentation datasets')
parser.add_argument('--input', default=r'C:\Users\hp\Desktop\Ecologicalproject\HabitatFragmentation\ndvi2020.tif' ,help='raster data path' )
parser.add_... |
206d496cd4f742b14160630a542609fd1a0fb727 | 4da6ba414d2657ba1b3dc6704dd910429155b059 | /ex13.py | a35e56b4d3e5b152efeae831bd830f2e3a667181 | [] | no_license | hairuo/LPTHW | 36ebfa8ee40f6eb9317919f49e403a3450c2c741 | 7923391b4f775b395dfbd7f9f8ce3150694881a3 | refs/heads/master | 2020-12-03T09:27:57.290214 | 2017-08-15T12:16:22 | 2017-08-15T12:16:22 | 95,622,714 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | ex13.py | from sys import argv
script, first, second, third = argv
print "The script is called:", script
print "Your first variable is:", first
print "Your second variable is:", second
print "Your third variable is:", third
# script, first, second, third = argv
# ValueError: need more than 1 value to unpack
# see : https://ww... |
68d62e6e8d6ed9b4ede0f0b4193f835acc0fa027 | b71f837c90eeb04e463da0f078d3339acf8b2b0d | /src/learn_pandas.py | 75b14ec26498ae89f697e9144f81958fa071283d | [] | no_license | xyBen2016/learn_python | 2d3beabcbfdd78e52219ccc841f2c30ab7d822a5 | d09f3ef70ee8b780b7a93e2175f544a11f1aec94 | refs/heads/master | 2021-05-09T16:43:43.876786 | 2018-02-27T10:17:09 | 2018-02-27T10:17:09 | 119,123,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,036 | py | learn_pandas.py | import pandas as pd
import pickle as pk
class BugFreeBug:
# 定义一个bug信息类
# bug id
bug_id = ""
# bug名称
title = ""
# bug链接
href = ""
# bug状态
BugInfoView_bug_status = ""
# bug严重程度
BugInfoView_severity = ""
# bug优先级
BugInfoView_priority = ""
# bug创建者
BugInfoView_c... |
d6b500dc1236a04bbfd2e54af6070753b2fcb0e7 | 468643f0eb9cd1e71b19de1f35adb314a51c23f8 | /SURFGAN_3D/optuna_objective.py | 991865489464b967622822fd00097686ba6f94d9 | [] | no_license | sara-nl/saraGAN | 5f5b98241cd356777151a14276a5cc9a8fa5c314 | cb83d84d61cddb0b301372248f85fef278673c13 | refs/heads/master | 2022-07-07T14:06:17.147330 | 2022-07-05T16:48:33 | 2022-07-05T16:48:33 | 196,439,494 | 8 | 1 | null | 2021-04-13T12:35:54 | 2019-07-11T17:36:01 | Python | UTF-8 | Python | false | false | 36,922 | py | optuna_objective.py | # # pylint: disable=import-error
import numpy as np
import tensorflow as tf
import horovod.tensorflow as hvd
import time
import random
import logging
import copy
import pdb
import os
import importlib
import optuna
from mpi4py import MPI
from utils import count_parameters, parse_tuple, MPMap, log0
from utils import g... |
242932d4853a4c1bf0c84e257dca01dbb7d591bf | 67a7073a443cbcffa75eb0ae1f839f14529ab378 | /metadata_generator.py | 1f99184c723e247e69de1824da378838ebac443f | [] | no_license | harinder1985/TeradataDBCreator | 33695e22ce68091d66bd370b0ae93a490597c8ae | ebadde1939ce9c5be2697ca8f8d39be620f1b4a9 | refs/heads/main | 2023-05-04T16:53:50.942098 | 2021-05-21T18:25:13 | 2021-05-21T18:25:13 | 369,621,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,034 | py | metadata_generator.py | import argparse
import logging
import random
import sys
import uuid
from teradatasql import connect
_DATA_TYPES = [
'INTEGER', 'CHAR(25)', 'DECIMAL(8,2)', 'DATE', 'VARCHAR(25)', 'SMALLINT',
'CHAR', 'BYTEINT'
]
_COLUMN_NAMES = [
'name', 'address', 'city', 'state', 'date_time', 'paragraph', '... |
bea1870c8c54ea0e6d5b80e6ea2910cd8d049435 | 2e035822fd05e07e7315bbed3b7dace057c3123c | /djangoblog/posts/forms.py | 00fc9a1a8fe76cd8caf88d66a0f3835046e0547a | [] | no_license | gzpgg3x/DjangoOneFiveinanutshell06122014 | 96216c3a50a13cd327d0ea703eea981db6214541 | af5f867272cd401f62b471f679c7d4ca00326d29 | refs/heads/master | 2020-05-05T10:08:30.936610 | 2014-06-13T00:09:29 | 2014-06-13T00:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | forms.py | # -*- encoding: utf-8 -*-
from django import forms
from posts.models import Commentary
class AddCommentaryForm(forms.ModelForm):
class Meta:
model = Commentary
fields = ('author', 'content')
# fields = ('post', 'content')
# fields = ('owner', 'content') |
816460f555dc6091217d7c599fe2364916ab72f2 | 86f725b8c2d5be364c70ee959215d7dd7a904767 | /see_data/die_visual.py | 581c9dca0693e0d6ed0baa90242ac96c4053888c | [] | no_license | whsasf/python | 676a917835d94eb577e6313a56594e761e79f84f | 98344ee5afc4ef92022c36943e08361a241b2c9e | refs/heads/master | 2021-01-24T23:24:05.120031 | 2018-07-18T05:33:45 | 2018-07-18T05:33:45 | 123,283,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 561 | py | die_visual.py | #!/usr/bin/env python3
import pygal
from modules.dies import Die
die=Die()
results=[]
for roll_num in range(1000):
result = die.roll()
results.append(result)
print (results)
frequencies=[]
for value in range(1,die.num_sides+1):
frequency = results.count(value)
frequencies.append(frequency)
print (fre... |
02e3d25c0362927e943709228e9936697ef6559b | e3858c288dfa74ec783e7b6f68865ac6b1fdc066 | /LF2.py | 3a155fe895ff3f1b8f6d4a759520d34ad5e2b2a7 | [] | no_license | Sindhu973/Dining-Concierge | d10dc8fc87ad23933978611b0903967f1c8bdc92 | 75e4e50a9a812b6481375589060382648812fbbc | refs/heads/main | 2023-08-12T00:00:51.534292 | 2021-10-10T17:41:08 | 2021-10-10T17:41:08 | 415,477,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,808 | py | LF2.py | from opensearchpy import OpenSearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
import requests
import boto3
import json
from boto3.dynamodb.conditions import Key
def lambda_handler(event, context):
sqs = boto3.client('sqs')
queue_url = 'https://sqs.us-west-2.amazonaws... |
570659f5db83d896d4aaeed260383ed0d954a8c2 | 09278fbc2568bec98756873d8302f560594f0233 | /test/test_note.py | 1ad81cedc9ccbac35d9eaa82fe820916f98367ac | [
"Apache-2.0"
] | permissive | jdum/odfdo | af0f7d640a148d8a815c034396b8d687b2ebc6a8 | 41554a07965af70cacc023a9a0a73c25b42d25a2 | refs/heads/master | 2022-08-23T04:37:23.430896 | 2022-08-20T10:01:34 | 2022-08-20T10:11:12 | 130,136,194 | 30 | 10 | Apache-2.0 | 2021-04-29T23:32:00 | 2018-04-19T00:13:23 | Python | UTF-8 | Python | false | false | 12,662 | py | test_note.py | #!/usr/bin/env python
# Copyright 2018 Jérôme Dumonteil
# Copyright (c) 2009-2010 Ars Aperta, Itaapy, Pierlis, Talend.
#
# 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.apach... |
747dd8d5144d83e04dfa6be40c9c4ec979a7d9a7 | 031ff3466e7fac6c2c7aabfe6cde8554b60fdb7e | /src/network_quinn/stream_combo.py | 59103f006f2d16cfa34a23cb602de8d7b05def02 | [] | no_license | Quinn-Thompson/Capstone_Video_Recognition | 6ae22e1576e75aa1ad0e5e31f56282867fb636da | 573dad7f947144f21c55653b9ca69dd48322365f | refs/heads/main | 2023-04-27T18:29:15.304647 | 2021-05-21T05:04:43 | 2021-05-21T05:04:43 | 344,700,324 | 0 | 0 | null | 2021-05-07T18:56:55 | 2021-03-05T05:04:38 | Python | UTF-8 | Python | false | false | 6,750 | py | stream_combo.py | import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from tools.RSC_Wrapper import RSC
from tools.preproc import PreProc
import numpy as np
import cv2
import pickle5 as pickle
import os
def draw_bb(event, x, y, latchesl, coordsl, color):
global display_drawn_on, display
i... |
9f9cbc61d2fc84e6da3fbbd3e60b1edb7035865b | 8fcc27160f8700be46296568260fa0017a0b3004 | /client/spacecomponents/common/componentConst.py | caa36e1b8b8de02e332588aeb9a2e7292741fd1f | [] | no_license | connoryang/dec-eve-serenity | 5d867f4eedfa896a4ef60f92556356cafd632c96 | b670aec7c8b4514fc47cd52e186d7ccf3aabb69e | refs/heads/master | 2021-01-22T06:33:16.303760 | 2016-03-16T15:15:32 | 2016-03-16T15:15:32 | 56,389,750 | 1 | 0 | null | 2016-04-16T15:05:24 | 2016-04-16T15:05:24 | null | UTF-8 | Python | false | false | 2,092 | py | componentConst.py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\packages\spacecomponents\common\componentConst.py
DEPLOY_CLASS = 'deploy'
ACTIVATE_CLASS = 'activate'
DOGMATIC_CLASS = 'dogmatic'
SCOOP_CLASS = 'scoop'
DECAY_CLASS = 'decay'
FITTING_CLASS = 'fitting'
CARGO_BAY = 'cargoBay'
CYNO_... |
d7583d3cc910a963d74a8eff88b8d3fad5688baf | 9a8c40e77ae7758533c1c1c711cc958c3c88111f | /userModel.py | 43d712e675938514eca5a7f5e76b80575bbdc245 | [] | no_license | berkekocar/Building-an-application-that-will-store-user-photos-and-galleries | 3a33b544668ab5fd732da0749b465bfc818cc177 | 8d3633542c92e7229fa2f9339506c3dc981d8417 | refs/heads/master | 2022-12-19T04:22:14.205451 | 2020-09-24T16:42:46 | 2020-09-24T16:42:46 | 298,337,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | userModel.py | from google.appengine.ext import ndb
class UserModel(ndb.Model):
user_email = ndb.StringProperty()
galleries = ndb.StringProperty(repeated = True)
|
61b725f0f6c017a9abfa803f4962d7d935dc6171 | ef6da88e4662059edcb40cd5a32a4a9b7a589135 | /models.py | 7768d587c200daa501a5698b4d51b07f87eff286 | [] | no_license | shuaizhu23/183_final | 94a5f40fb6b1b4ea7b978f66dc5d6d895d6e33d6 | bd37a02580c2dd1ddf3e92a588acb0a2888082f7 | refs/heads/master | 2023-08-15T17:33:00.558047 | 2021-09-19T21:15:10 | 2021-09-19T21:15:10 | 402,923,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,496 | py | models.py | # This file defines the database models
import datetime
from .common import db, Field, auth
from pydal.validators import *
def get_user_email():
return auth.current_user.get('email') if auth.current_user else None
def get_uid():
return auth.current_user.get('id') if auth.current_user else None
# also calle... |
0ece62ad7700a2f6a0e6db8d04a665fe6ae282d6 | eea20c745c4f5ae8abe87d28606ce2d465f5474b | /Biweekly Contest 26/SimplifiedFractions.py | 510fc7bbd2baeb147be311d9bf8239db4c0f7301 | [] | no_license | harshavaranasi61/leetcode | ceaafa52eff9d84835a9b072d1359e540ea4d0a9 | 72c22abb1330ea427b17a8d3e5e079999aef3d9b | refs/heads/master | 2022-07-28T22:38:54.836839 | 2020-05-17T07:56:24 | 2020-05-17T07:56:24 | 260,722,009 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | SimplifiedFractions.py | class Solution:
def simplifiedFractions(self, n: int) -> List[str]:
frac=[]
den=[]
if(n==2):
return ["1/2"]
j=3
for i in range(2,n+1):
frac.append("1/"+str(i))
den.append(1/i)
while(j<=n):
i=2
while(i<j):
... |
32ea9e0f82743389e5238bcb82fe9cd959feaa20 | 33d67b81ea4c4ae234e99871cf3e1e0985ccdfbf | /home/wake2_led.py | 18913dbcbf2349b019839d8256144d164fed30c6 | [] | no_license | ktrips/smart | 84d9cde18f4353aa6933c39c9be0acfac9511c45 | 1898aa411d2840f3cb621dde1e69c9af180e4033 | refs/heads/master | 2020-03-19T09:02:25.700496 | 2019-02-06T15:52:09 | 2019-02-06T15:52:09 | 136,255,314 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,291 | py | wake2_led.py | # -*- coding: utf-8 -*-
import snowboydecoder
import sys
import signal
import RPi.GPIO as GPIO
from light import Light
interrupted = False
LED=17
GPIO.setwarnings(False)
def signal_handler(signal, frame):
global interrupted
interrupted = True
def interrupt_callback():
global interrupted
return int... |
4d733c0066a9fcc98054c6901e52f940e0ff89a7 | d473f228dbac6656e5a9dfb063ab21081f89a5b5 | /test/cone.py | 201e591acd06e8850a6a52abeb719504a5352336 | [] | no_license | YumoeZhung/3Dswc | f563e99f36da69e3a63b0fc0e725cb29bf3a2a02 | dedfc333724ec1adfcf5274470b0c9473e665d0e | refs/heads/master | 2020-05-30T07:26:40.845606 | 2015-08-31T01:41:42 | 2015-08-31T01:41:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py | cone.py | __author__ = 'Su Lei'
import pyglet as pg
from pyglet.gl import *
import numpy as np
import math
window = pg.window.Window(400, 400)
window.set_caption('Cone')
@window.event
def on_draw():
window.clear()
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(-100, 100, -100, 100, -100, 100)
glMatr... |
4e84c1654da12f54248a625c08ecc97aa0343aa7 | fc172cd996f464ae9d82d6c296450a6e4e92cb49 | /Ninja Side-Scroller/Code/startGame (not required).py | a2341ffc7780818934aa422877bcdadcdc83010e | [] | no_license | zirus23/Shadow-of-the-Ninja | 69fb35ddf28cfecc02f2062d30b363f3070c82f4 | 43b809703db5a8da96e7f8901ace07c9123fe30a | refs/heads/master | 2020-04-20T14:07:45.533633 | 2019-02-02T23:21:15 | 2019-02-02T23:21:15 | 168,888,785 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,242 | py | startGame (not required).py |
import ninja
import mapGen
import pygame
import mainGame
import pygamegame
import global_data
import compute_stuff
import time as globalTime
class NinjaRPG(pygamegame.PygameGame):
def init(self):
self.mainGame = mainGame.game
self.map_editor = mapGen.mapGen()
self.gHeight... |
8db4de7eed06e6f3e125af5bde3d7dc7a101a167 | d2123b608d78bbaf188bc20aafcdf90aa083cade | /volumential/list1_gallery.py | 70463ec705258db9cfe45bd0e6b2ac474a9453f7 | [
"MIT"
] | permissive | xywei/volumential | 3817d1383374727c57058d5e6b625c68076abaab | 07c6ca8c623acf24fb8deddf93baa1035234db58 | refs/heads/main | 2022-06-02T14:13:33.661588 | 2021-05-22T03:23:28 | 2021-05-22T03:23:28 | 206,889,998 | 6 | 2 | MIT | 2021-05-21T21:25:58 | 2019-09-06T23:48:21 | Python | UTF-8 | Python | false | false | 5,769 | py | list1_gallery.py | from __future__ import absolute_import, division, print_function
__doc__ = """
.. autofunction:: generate_list1_gallery
"""
__copyright__ = "Copyright (C) 2017 - 2018 Xiaoyu Wei"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentati... |
28ee5a2129f2d43fe64352b20e83bec7dd7439c2 | 106adab00927b8883743eed853e3dff3377c1c59 | /tests/test_main.py | 3dc6223dec0b7e1f2e0f87ce50b8871850d12a33 | [] | no_license | epswartz/t-SNE | 546e7703935c64c478288816ae7e3d53ffbd19c0 | 0b40f642eb0a5444078f3d2a2ab86ea7507ecfd6 | refs/heads/main | 2023-04-15T04:23:22.889880 | 2021-04-27T23:24:40 | 2021-04-27T23:24:40 | 355,291,113 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | test_main.py | import numpy as np
from simple_tsne import tsne, momentum_func
from sklearn.datasets import load_digits
import matplotlib.pyplot as plt
from matplotlib import rcParams
plt.style.use("seaborn-whitegrid")
rcParams["font.size"] = 18
rcParams["figure.figsize"] = (12, 8)
digits, digit_class = load_digits(return_X_y=Tru... |
b2d3ebe4b1ce8f6f0fde8495fb90542080b810ce | 9c8c4f16117b85d2857969e8dda4727fc8af6def | /SpeedIT/BenchmarkIT.py | 96f13bc53c7aecc3719c721b502b82b7493d24b6 | [
"BSD-3-Clause"
] | permissive | peter1000/SpeedIT | 26b99d3bbeadcb6f29bd3dc367152ea23a790a96 | d9fea5a70da6857416599015bc962a89fac88aae | refs/heads/master | 2020-06-04T23:43:51.557565 | 2014-09-04T13:34:10 | 2014-09-04T13:34:10 | 21,705,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30,785 | py | BenchmarkIT.py | """ Benchmark module: can also compare multiple functions
"""
import gc
from inspect import (
signature,
getsourcelines
)
from operator import itemgetter
from time import perf_counter
from SpeedIT.ProjectErr import Err
from SpeedIT.Utils import (
format_time,
get_table_rst_formatted_lines
)
def _helper_... |
4e30f0a9b420123c28858aad2a71040dcc952829 | 52f39afe1ea6de5b5bf47380c348a1d676f7e093 | /machop/watch.py | 384fef3cbea4b3b84aaa59520fa8a3489328a355 | [
"BSD-2-Clause"
] | permissive | neuroticnerd/machop | af5037e05de52bcb8417950d34d9eadabb4dcbd3 | 457e9c436720d806c747517c31b9779c5aa2b55e | refs/heads/master | 2021-01-25T08:54:11.453835 | 2014-11-27T00:15:11 | 2014-11-27T00:15:11 | 21,373,124 | 3 | 0 | null | 2014-07-17T16:49:07 | 2014-07-01T02:47:10 | Python | UTF-8 | Python | false | false | 2,558 | py | watch.py |
import fnmatch
import hashlib
from .mplog import MachopLog
from .utils import MachopProcess, wait_for_interrupt
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
class MachopWatchCommand(MachopProcess):
class MachopHandler(PatternMatchingEventHandler):
"""... |
d19310a45a684a7bbb456555a954439df8ae92b6 | 1b2ff48a82e19354a0f8053cae5b73ae76d3c86d | /reddit.py | ddacd24ef4bb085b011cf98a494449754c13b271 | [] | no_license | braninpodolski/Automated_Instagram | d33fb63b1e577d5eb14cc393a7c82092c9782b29 | 608a1639ab94e466e1bddd96e6cddc3639b0b493 | refs/heads/master | 2023-06-24T10:55:43.628705 | 2021-07-30T15:45:12 | 2021-07-30T15:45:12 | 382,203,251 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | reddit.py | import urllib.request
import praw
from praw import reddit
from praw.models.listing.mixins import submission
def download_subreddit(sub):
reddit = praw.Reddit(client_id='oFOYuOd31vUb4UstBWDhnQ',
client_secret='0W_86zufGFCJlSE4lK3CwF_0UEQEQw',
username='MarshallBranin',
... |
f5b74ca95cb368d70139b5d36e3c8d553b8c5393 | 97a6a1667da10867847f9027f2e83319a5792dae | /0x03-python-data_structures/9-main.py | c434c8f3a670260bb39eb1d424904a07ca58cb20 | [] | no_license | diegozencode/holbertonschool-higher_level_programming | 6e9ed65f0e967b283cbb244f0ac271fa5a54cd29 | bd75d65d5534195ae71d14def7f6fce9b61b33d8 | refs/heads/master | 2021-07-05T22:44:33.593299 | 2020-12-24T02:58:16 | 2020-12-24T02:58:16 | 207,422,222 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | 9-main.py | #!/usr/bin/python3
max_integer = __import__('9-max_integer').max_integer
my_list = [1, 90, 2, 13, 34, 5, -13, 3]
my_list1 = []
my_list2 = [1, 90, 2, 13, 34, 100, -13, 3]
max_value = max_integer(my_list)
max_value1 = max_integer(my_list1)
max_value2 = max_integer(my_list2)
max_value3 = max_integer()
print("Max: {}".for... |
09660cfcff7d5da0339da201cb18b6f63bec2df9 | 642b1aabf314fb7dab7caa5895611c20bf91f528 | /backend/app/shop/migrations/0033_auto_20210717_1035.py | e83714e091d085f7a03e538b094a602636591f85 | [] | no_license | goooodmafia/goooodshop | 6a9f80e20921c93630895cdde4128e5cdded77cd | 4c56b8b108895bbdebba0ffe95d45897b3e138d2 | refs/heads/master | 2023-07-17T06:10:46.013915 | 2021-09-04T09:32:35 | 2021-09-04T09:32:35 | 335,975,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,703 | py | 0033_auto_20210717_1035.py | # Generated by Django 3.1.6 on 2021-07-17 10:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0032_product_sex'),
]
operations = [
migrations.AddField(
model_name='product',
name='price_ret_sale',
... |
7404dd324d54bb072e56985716bbae746b4dd219 | fd96c08770ae6ce5004a5fa916a592f48a6d7dce | /networking/Extract_data_in_JSON.py | 352f49ebef496500a109bfe895d8d09bbe6f51e4 | [] | no_license | Yuhta28/TestPJ | 1e016504f90605bf06d5d025541606b21315d08c | 1d9189aaeddc84a09b21852506ac964abf304425 | refs/heads/master | 2021-05-21T08:25:24.990243 | 2020-04-17T04:24:53 | 2020-04-17T04:24:53 | 252,618,285 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | Extract_data_in_JSON.py | import requests
import json
r = requests.get('http://pythonspot.com/')
jsondata = str(r.headers).replace("'", '"')
print(jsondata)
#headerObj = json.loads(jsondata)
#ERROR >> json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 556 (char 555)
#print(headerObj)["server"]
#print(headerObj)['content-leng... |
90f1fd45d58c7e6f275a33cd9c693ff584b2df47 | f36793946cde686a9b39e9f9424e89522d7949fa | /code/table9x9.py | 8a17778fb881a02bc9c66930300018ac21a096cf | [
"MIT"
] | permissive | jieshenboy/LeetCode | 65f2590d2a2ede0dc8929a6ee9ce2c07c8fd5b50 | 59b58961b3f28f4f0276a6de6a9078ae033c5594 | refs/heads/master | 2021-05-11T23:56:14.859364 | 2018-03-21T13:48:14 | 2018-03-21T13:48:14 | 117,522,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | table9x9.py | #-*- coding: utf-8 -*-
def print99():
"""
打印99乘法口诀表
:return:
"""
for i in range(1,10):
for j in range(1, i+1):
print('%dX%d=%2s ' %(j,i,i*j))
print('\n')
print99()
|
1e9afe6435285da6c6efb678177587d7ba5a01b2 | ea05b6c3960317e4c620dad1319aa48c1e52908b | /main.py | 42535073312ca3702d8c1ffe3a506a8a60487328 | [] | no_license | Anas-siddiqui/Visitor_project | c12c762acb48db8e6a7ecfec9f5bbcc6a14b1902 | 9a7e65cde617cbea80047d3b8c1e148aafc60820 | refs/heads/master | 2020-09-14T01:52:49.560787 | 2016-09-28T07:46:46 | 2016-09-28T07:46:46 | 66,293,341 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,182 | py | main.py | import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import tornado.options
import serial
import time
from datetime import timedelta
import cv2
import time
from datetime import datetime
#for webcam users
camera=cv2.VideoCapture(0)
#for picam users
#import picam
#camera=picam.Op... |
d9b6efce92e30267a9f992c4fea698fe14e0c3e4 | 4bc7fb8d61af65a567aa1fbdb17336ccf8929e66 | /src/compas/datastructures/mesh/operations/insert.py | 9cb034c373a5f3d88668a178c0334811caf4c8b8 | [
"MIT"
] | permissive | yijiangh/compas | ff2df26bc5f52273bd57ac5122675dad769a1778 | a9e86edf6b602f47ca051fccedcaa88a5e5d3600 | refs/heads/master | 2021-07-02T00:45:21.029645 | 2019-06-21T07:17:05 | 2019-06-21T07:17:05 | 193,090,812 | 0 | 0 | null | 2019-06-21T12:02:11 | 2019-06-21T12:02:11 | null | UTF-8 | Python | false | false | 2,126 | py | insert.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
__all__ = [
'mesh_add_vertex_to_face_edge'
]
def mesh_add_vertex_to_face_edge(mesh, key, fkey, v):
"""Add an existing vertex of the mesh to an existing face.
Parameters
----------
mesh :... |
27d9e6a868cfc18780ec9615e8dbc3b5ea2fd0c3 | 926cb69e1957db2375fc9aac336f48583d68687b | /app.py | 69d7bcfe6594d9547ea839dfe244d89238bb5e03 | [] | no_license | khimsh/contact-form-flask | 8a699312c0c17d488c3731c0945a160e544e1e95 | 6f6cacd1985b12e4bff1bbdc87dd580bd3d3b635 | refs/heads/master | 2023-05-12T14:12:05.996811 | 2023-05-08T09:44:56 | 2023-05-08T09:44:56 | 207,011,997 | 0 | 0 | null | 2023-05-08T09:44:57 | 2019-09-07T18:49:11 | HTML | UTF-8 | Python | false | false | 998 | py | app.py | from flask import Flask, request, render_template, redirect
import os
import smtplib
from email.message import EmailMessage
app = Flask(__name__)
EMAIL_ADDRESS = os.environ.get('EMAIL_USER')
EMAIL_PASSWORD = os.environ.get('EMAIL_PASS')
@app.route('/')
def index():
return render_template('index.html')
@app.ro... |
79467fbb5072d83a8694670305275372ed97ce13 | 28f4f8b15146d6824d9382bf87c5dd3c3c0dc622 | /ccurl.py | 084dea70c585416b130d10abb392419a61060cce | [] | no_license | vinodpanicker/ccurl | bccc084b54f423e7e6610f02bf266ee54e21cb7d | 1ec9bb0451621fd7f3630391a8d4b825848f6c78 | refs/heads/master | 2020-12-03T05:27:57.866065 | 2015-02-13T13:16:45 | 2015-02-13T13:18:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,065 | py | ccurl.py | # Copyright (c) 2012 Alon Swartz <alon@turnkeylinux.org>
#
# This file is part of CCurl
#
# CCurl is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any la... |
368d24b8dde32b995ccfe96adc36126ef4982cd0 | fe24b009913d625f8dca547cf5a3956514678e04 | /plugins/dtl/src/layers/save/SuperviselyLayer.py | 586531ade4c1ffa6b64b102138bf82f15cf545ad | [] | no_license | ai-motive/supervisely | 6fed135b27afe166627c24bbee811d07053bd0e0 | f6ef26cbb8a5f3457f97b2db600a442aa03aa5d2 | refs/heads/master | 2023-07-13T21:36:00.541608 | 2021-08-24T03:05:07 | 2021-08-24T03:05:07 | 372,686,196 | 1 | 0 | null | 2021-06-01T03:05:10 | 2021-06-01T03:05:09 | null | UTF-8 | Python | false | false | 1,662 | py | SuperviselyLayer.py | # coding: utf-8
from copy import deepcopy
from Layer import Layer
import supervisely_lib as sly
class SuperviselyLayer(Layer):
action = 'supervisely'
layer_settings = {
"required": ["settings"],
"properties": {
"settings": {}
}
}
def __init__(self, config, out... |
6daff287190bd203a2ddafcc35173718a0f84cce | 9d28e0556978f3436795d1042c05904395eb9e14 | /3b.py | 73a5038f7851950f7e5730e00139b04a1562a462 | [] | no_license | kariln/Numerical-Methods | b487d276970cac72ad95ac1134a13cd4584b14a9 | 8deb954d3a6b876039eeb3a3bb4a1cbd14484548 | refs/heads/master | 2022-12-12T11:37:31.297217 | 2020-08-27T08:50:16 | 2020-08-27T08:50:16 | 290,724,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | 3b.py | # -*- coding: utf-8 -*-
"""
Created on Tue May 15 09:53:44 2018
@author: Bruker
"""
from __future__ import division
import sympy as sp
#import numpy as np
t = sp.symbols("t")
f = sp.exp(t)
def taylor(a,f,n):
#a-punktet som taylor rekken går rundt
#f - funksjon
#n - antall ledd
fT = [... |
de1f12f2a540068ddd749619b94e77cf57e580c8 | 50c51e40abbed5f8fe07399df61ffb3c8e648c06 | /src/main/util/file.py | c583fd039c6f43a68c0d5afd4475a605254743e6 | [
"MIT"
] | permissive | Samuel-Campbell/arpspoof | ebde6729fb63bd742e8db1a12baaa509871f70e4 | a339dddc0dbb96ae71dd8afc683f6ae9d9f526d9 | refs/heads/master | 2021-04-12T02:02:29.669396 | 2018-03-21T02:15:29 | 2018-03-21T02:15:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,486 | py | file.py | import os
import joblib
import sys
class File:
def __init__(self):
pass
@staticmethod
def load_binary(directory, filename):
"""
returns binarized model
:param filename: name of file to load
:return: None
"""
try:
print("Loading " + filen... |
5c965cc17332020063251c92dd12e3775629bf84 | 01857ef455ea60eccaf03b5a9059ec83e9803c2e | /website/more_documentation/label_documentation.py | 15ef84a0ca3988aa089ddbf4df42ac1b6120b3b3 | [
"MIT"
] | permissive | zauberzeug/nicegui | f08312cc1f393deca79e0e84a2506d3a35efff16 | c61b1315f29d51e26cc1168207f5616b302f8df0 | refs/heads/main | 2023-08-18T18:09:30.937322 | 2023-08-18T15:04:00 | 2023-08-18T15:04:00 | 365,250,183 | 5,128 | 271 | MIT | 2023-09-14T01:50:56 | 2021-05-07T13:55:05 | Python | UTF-8 | Python | false | false | 925 | py | label_documentation.py | from nicegui import ui
from ..documentation_tools import text_demo
def main_demo() -> None:
ui.label('some label')
def more() -> None:
@text_demo('Change Appearance Depending on the Content', '''
You can overwrite the `on_text_change` method to update other attributes of a label depending on its co... |
f9b5bc775be7a61c1540d7d0c7ef67d3f2752269 | fbb681cb35ad3495fec68f06cbc80434fe9234b9 | /Route/config_routes.py | eda51e2b678a001b56594fe41bb4d8e7a086cd20 | [] | no_license | weiwuxajh/NET | 74006794541f0ec6a60825aaef6831dc56128461 | 75edbe7beec98807cc17f9f9c1510111b816d347 | refs/heads/master | 2021-05-28T21:17:59.544886 | 2020-04-17T13:16:46 | 2020-04-17T13:16:46 | 254,281,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,503 | py | config_routes.py | #!/usr/bin/env python
# coding: utf-8
from netmiko import ConnectHandler
from Interface.models import devicelist
import textfsm
from Route.models import routes
class config_routes():
def __init__(self,hostname="SW1",net='2.2.2.0',netmask='255.255.255.0',nexthop='vlan1'):
self.hostname = hostname
s... |
a34c9f5a07eee227446f3db02d79be0691d4f511 | 59c4a9ba177ad6e572a9867631ddbcfe6bd31c93 | /tests/example_tests.py | 764f307278b874977c7456dff44317b072dfe39f | [] | no_license | Ashu7397/program_tester | 280ca36ed5154da0d566b46d2ec6ca3c1559c710 | 077d3aa6fdce291f003508666b583f4a291a37d1 | refs/heads/master | 2022-10-25T03:58:58.030477 | 2020-06-05T11:31:09 | 2020-06-05T11:31:09 | 260,560,878 | 0 | 0 | null | 2020-05-01T21:22:02 | 2020-05-01T21:22:01 | null | UTF-8 | Python | false | false | 341 | py | example_tests.py | from tester import Test
# Test = namedtuple("Test", ["name", "args", "excpect"])
tests = [
Test("hi", "hi", "Hello user! You entered hi\n"),
Test("nadav", "nadav", "Hello user! You entered nadav\n"),
Test("ron", "ron", "Hello user! You entered ron\n"),
Test("homework", "homework", "Hello user! You ent... |
8eb875b34d36b045a2edbbfac79b2813e8baff87 | b29acea20a58fb325a16908ecc9317323e54463b | /Problem44.py | 54659138fb52ee28f0543ed8928e46b4dda06da6 | [] | no_license | mihaelacr/ProjectEuler | c1dc192b65d7ac196a1d410575118b531b99991c | cadb4eb5c9997426bb28caed7cfeb11cffbadd7f | refs/heads/master | 2023-03-09T15:58:20.654220 | 2023-03-04T17:51:54 | 2023-03-04T17:51:54 | 7,702,206 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 953 | py | Problem44.py | import numpy as np
def pentagonal(n):
assert n >= 1
return n * (3 * n - 1) // 2
def inverse_pentagonal(p):
return (0.5 + np.sqrt(0.25 + 6 * p)) / 3.0
def is_pentagonal(p):
# Will have precision issues if the
# floats get too large
pentagonal_inv = inverse_pentagonal(p)
return float(pen... |
9038c99ae0fefab027397bb1ebfa84a4e8f99c88 | c051da91f465b3370a513af7ec10275ef9056575 | /src/charge/utils.py | 7bc21a9c41c676128a6e97be183726ffe1a8b026 | [] | no_license | basa/charge | 47159cc160c0690f3a1463832507a1f682b87a1a | 8de57e53378ca4cc82b1555cc35a6fc7daa28519 | refs/heads/master | 2021-01-10T20:56:22.089041 | 2013-02-12T21:36:53 | 2013-02-12T21:36:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,462 | py | utils.py | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import (login_required as
auth_login_required)
from django.contrib.contenttypes.models import ContentType
from django.utils.decorators import method_decorator
from charge import converter, models
def create_log_entry(object, user, action_flag):
... |
fb3221514d8b39c4b640088287f3b9a9a98f9970 | 62e1a1479ccdc2651f2e339cd657584c2f2fc62f | /generate_password.py | 1a24e8e5268ba6763ea2c0752185b92f731c3285 | [] | no_license | daniel-cretney/PythonProjects | d2075883c0ca5ab165749ace69e86e923215b168 | 17b6baefe8126b589cc18c05e0571f755dabd4e6 | refs/heads/main | 2023-03-13T19:53:04.624620 | 2021-03-02T20:21:02 | 2021-03-02T20:21:02 | 343,901,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,993 | py | generate_password.py | # the point of this module is to generate a random password when executing the function
import random
import math
def generate_password():
list_of_randomized = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x"... |
0e45189d2e22647ca956355ade63739a6adf2dfb | 0c8d655843b5f10dc25d4a288148200c041b7c50 | /SPoC.py | c6b2bf81600bbcff1ad1e79b9f02fa0865eda806 | [
"MIT"
] | permissive | neurophysics/DrumsAndBrains | 4a8e49995e89109ae6c6a3a442ef3029da78d95f | e6b8c8f21f10cfdab8805cb4290852fb10cc4aa7 | refs/heads/master | 2023-08-09T09:57:01.126022 | 2023-07-25T16:16:35 | 2023-07-25T16:16:35 | 145,560,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,042 | py | SPoC.py | import numpy as np
from scipy.optimize import minimize as _minimize
from scipy.optimize import shgo as _shgo
############################################
# internal funtions and constructors #
# the functional classes are at the bottom #
############################################
class _SPoC(object):
def _... |
414e6fafc8ca17a8283ca65fb867ee822713be70 | dbee9b96067443b56ce4d0340bac9b206bcca44e | /RanPassGen.py | e79939dfdd9e9650a5de21a6d20fc61efb61efbc | [] | no_license | bhanson81/First-Repo | a705de49fa9af007ff9de281e05a36f529253d44 | 247acad5901fb2433d3e77bfa92d89e7e5b397b5 | refs/heads/master | 2021-10-14T07:18:06.872937 | 2021-10-12T05:11:50 | 2021-10-12T05:11:50 | 218,228,853 | 1 | 1 | null | 2020-10-20T09:05:38 | 2019-10-29T07:32:28 | Python | UTF-8 | Python | false | false | 2,597 | py | RanPassGen.py | import random
def rand_word_gen(lang):
myline_1 = 0
myline_2 = 0
#myline_1 is the first word
#myline_2 is the second word
#we're adding the first word to myline_2
if lang=="1":
file_1=open("wordsENG.txt","r")
file_2=open("wordsENG2.txt","r")
elif lang=="2":
file_1=op... |
e7422627164bff592d10e0445dd70c94e4a1c0ef | 979e12e6b91972205e9e63a0dd497f746eb505af | /search.py | f7cf8c8b82e5e271652712935218d25a76365f58 | [] | no_license | sameer-patel-dev/IMDB-Real-Time-Search-Engine | 7e79f96516e91951c3f7a04cac6c0b03756e09dd | 8f7f26c57dfd7afdce09f03c9259f18cf047c75f | refs/heads/master | 2023-06-06T14:35:00.491501 | 2021-06-29T04:35:09 | 2021-06-29T04:35:09 | 259,990,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,335 | py | search.py | from scraper import Scraper
class Search:
def __init__(self):
"""Initialize the iMDB top 1000 search object
"""
self.imdb_scraper = Scraper()
self.imdb_scraper.startScraper()
print("==================== WELCOME TO IMDB's Search Engine =================")
print("Ty... |
e1bad1ca10f156dc5407e85f9dd21e0f9caeafb1 | dd573ed68682fd07da08143dd09f6d2324f51345 | /algorithm_study/swea/3282_Knapsack.py | a725c3ead45c335b38d0457116d0bed927ba1d0b | [] | no_license | chelseashin/My-Algorithm | 0f9fb37ea5c6475e8ff6943a5fdaa46f0cd8be61 | db692e158ebed2d607855c8e554fd291c18acb42 | refs/heads/master | 2021-08-06T12:05:23.155679 | 2021-07-04T05:07:43 | 2021-07-04T05:07:43 | 204,362,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | 3282_Knapsack.py | import sys
sys.stdin = open("3282_input.txt")
# 순열
def comb(depth, k, I):
global N, M, L, K, MAX
if depth == I:
volume = 0
temp = 0
# print(order)
for i in order:
volume += L[i][0]
temp += L[i][1]
if volume > K:
return
if temp ... |
a163ebca93097ed8186e418b25dd71288e57c1d0 | 6646365429c87c14c652e148c87fc9cd2301b28a | /test_exception.py | 11f2b980f82d3b84acec03d8e8c8230122cd0528 | [] | no_license | linminna/python | 812678e980376fdda05b3c55ed709b17116ccb70 | befbce5418c5618af254d2d6e895291f03458792 | refs/heads/master | 2020-09-15T22:17:32.264031 | 2019-12-14T07:14:56 | 2019-12-14T07:14:56 | 223,568,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | test_exception.py |
# 异常捕捉 try-except-else-finally
# 异常抛出 raise
try:
a = "异常测试"
print(a)
# open("a.txt", "r")
except NameError as msg:
print("--error--" + msg)
else:
print("--else--")
finally:
print("--finally--")
def say_hello(name=None):
if name is None:
raise NameError("'name' c... |
6ff64ad4becb9ff9823c4aeebce2bb3108edafaa | e9b66a01ce4af8b36b2e29300da1559e0f04406f | /server_impl/game_mgr_server/game_mgr_register_robot_service.py | 10d6fe6f11615eb99431ecbdf06a12ef92bdefb6 | [] | no_license | Q1143316492/DTSGameServer | f035335251cb1962332fbb95de582989c09bd866 | 806de982c92dd3826df1cd53d334942da28cccc6 | refs/heads/master | 2021-04-16T19:41:40.447783 | 2020-05-30T16:19:05 | 2020-05-30T16:19:05 | 249,380,681 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,981 | py | game_mgr_register_robot_service.py | # coding=utf-8
from server_core.function_handler import FunctionHandler
from server_core.log import Log
from server_core import config
from server_impl.server_config import ckv
from server_impl.base.common import common
# 关于 robot_key 一个场景预先摆了很多AI点,所有客户端一起发起请求,但是只有一个能强度控制权,其他的负责同步
# 最终能 ret = 0 的会获得控制器,如果有控制权的客户端挂了,被... |
fc92ebc30a3ee1afb1cc6625b091ace368174f97 | b74320ad439e37dfa48cd8db38dab3b7a20a36ff | /src/diffusers/utils/dummy_flax_objects.py | 2bb80d136f338d193c67773266355956afd1d98a | [
"Apache-2.0"
] | permissive | huggingface/diffusers | c82beba1ec5f0aba01b6744040a5accc41ec2493 | 5eeedd9e3336882d598091e191559f67433b6427 | refs/heads/main | 2023-08-29T01:22:52.237910 | 2023-08-28T18:16:27 | 2023-08-28T18:16:27 | 498,011,141 | 17,308 | 3,158 | Apache-2.0 | 2023-09-14T20:57:44 | 2022-05-30T16:04:02 | Python | UTF-8 | Python | false | false | 4,940 | py | dummy_flax_objects.py | # This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class FlaxControlNetModel(metaclass=DummyObject):
_backends = ["flax"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["flax"])
@classmethod
def from_c... |
1350e7767b1b1779e930de6724f2c57927316fcc | 8cfc885d0d461a8dac456e819c69d763c6d21169 | /tests/template/ml_network_data/net2.out/net.py | 8c2fdff79dde72e9387ab269eef78c8da99c281b | [
"Apache-2.0"
] | permissive | radiasoft/sirepo | 07763cfed492b2b796394d2e15cab54061cd9a74 | baa21720a1749c49c291f040796da5ee4f2ae8f5 | refs/heads/master | 2023-08-22T07:24:47.736445 | 2023-08-18T20:06:04 | 2023-08-18T20:06:04 | 37,476,480 | 56 | 30 | Apache-2.0 | 2023-09-14T01:56:12 | 2015-06-15T16:16:24 | JavaScript | UTF-8 | Python | false | false | 807 | py | net.py |
from keras.models import Model, Sequential
from keras.layers import Input, Dense, Add
input_args = Input(shape=input_shape)
x = Dense(10, activation="relu")(input_args)
x = Dense(10, activation="relu")(x)
x_2 = Dense(10, activation="relu")(x)
x_3 = Dense(10, activation="relu")(x)
x_1 = Add()([x_2, x_3])
x_5 = Dense(10... |
2e7e237b77f01537de5b8c9a439be9a572efab23 | 1e3d5fa20caede50ab80573b6501061f57920e16 | /core/templatetags/cart_template_tags.py | bc8144483314fc689ab98733a8e74d0b9fc256cb | [] | no_license | ramgopal99/Ecommerce | bee47606fac93c592872d1aaef430ba08ab0d554 | 6038a722ba88aee70e0625ff6d3776078fe7bdea | refs/heads/master | 2022-12-27T20:05:53.964555 | 2020-09-30T14:45:52 | 2020-09-30T14:45:52 | 299,949,032 | 0 | 0 | null | 2020-09-30T14:37:19 | 2020-09-30T14:37:18 | null | UTF-8 | Python | false | false | 1,255 | py | cart_template_tags.py | from django import template
from core.models import OrderItem,WishList
from django.db.models import Sum,Count
register = template.Library()
@register.filter
def cart_item_count(user):
if user.is_authenticated:
return OrderItem.objects.filter(user=user,ordered=False).aggregate(Sum('quantity'))['... |
6e2086aea3cc2660e1dd5b4e8ca9342c50fc2f7c | 3e5ecad4d2f681f2f4f749109cc99deea1209ea4 | /keras/keras53_pandas1.py | 727f99d2ffe108683a42b9503bb79ef1fa1fea7b | [] | no_license | SunghoonSeok/Study | f41ede390079037b2090e6df20e5fb38f2e59b8f | 50f02b9c9bac904cd4f6923b41efabe524ff3d8a | refs/heads/master | 2023-06-18T06:47:55.545323 | 2021-07-05T00:47:55 | 2021-07-05T00:47:55 | 324,866,762 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,316 | py | keras53_pandas1.py | import numpy as np
import pandas as pd
from sklearn.datasets import load_iris
dataset = load_iris()
print(dataset.keys())
print(dataset.values())
print(dataset.target_names) # ['setosa' 'versicolor' 'virginica']
x = dataset.data #(150, 4)
y = dataset.target #(150, )
print(type(x), type(y)) # <class 'numpy.ndarray'>
... |
03218fc23273363f3cf04e0395a5007978f0ca1b | 97d7cf8341d21b77fab6587b632e11f2bdf6a79f | /examples/python/traits/utility.py | 2a698d352f6afcbb6938ea2d1aa8924f3c2d2fa1 | [] | no_license | dineshpinto/timetagger | 3485372015c7575d0e94de588752b0d4d56c16a1 | 30e1a309d33555dd59732b3d3e3c1b786659c7c1 | refs/heads/master | 2022-04-29T04:48:05.304116 | 2022-03-23T07:26:21 | 2022-03-23T07:26:21 | 90,400,501 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,683 | py | utility.py | from traits.api import Float, HasTraits, HasPrivateTraits, Str, Tuple, File, Button, SingletonHasPrivateTraits
from traitsui.api import Handler, View, Item;
from traitsui.menu import OKButton, CancelButton
#import logging
import threading
#import weakref
class StoppableThread( threading.Thread ):
"""
A threa... |
44d092c9235ccf8c551de6b4c6b1a37a0b6f9b6a | 8b4c65a579270a43072758a39544007a5051ca6c | /Scripts/Section-7/mitm-3.py | bbaa6781730f69f386f42f6f95df89bb56a95118 | [
"MIT"
] | permissive | CS5331-WLKB/web-scanner | a7314ccffae86ce310a37d8459821d3ee1ca9109 | 2fe78db2a3cbb9291c1c6d9d38c616a795214901 | refs/heads/master | 2020-03-09T18:31:22.599289 | 2018-04-27T08:04:27 | 2018-04-27T08:04:27 | 128,935,110 | 0 | 0 | MIT | 2018-04-27T08:04:28 | 2018-04-10T13:14:22 | null | UTF-8 | Python | false | false | 944 | py | mitm-3.py | import urlparse
from copy import deepcopy
import requests
import sys
def injector (url):
errors = ['Mysql','error in your SQL']
injections = ['\'','\"',';--']
f = open('sqlinjection_results.txt','a+')
a = urlparse.urlparse(url)
query = a.query.split('&')
qlen = len(query)
while qlen != 0:
querys = deepcopy(... |
663e3e5862da1c9007630a7a8297355ab61abf1e | 973c69a47bb81be7017227c248bd06a12e9b0775 | /sugarloaf_status.py | 35fe0968c98710522977cb11ef35ad0c1494b181 | [
"MIT"
] | permissive | abkfenris/sugarloaf | 53d0b5291e18e98c11a2a2eb7396aee81820b546 | 73ca92520b2e4dd727551b9afe913d435ce3a3e4 | refs/heads/master | 2023-05-25T17:47:57.201468 | 2022-05-15T02:23:59 | 2022-05-15T02:23:59 | 75,126,231 | 0 | 1 | MIT | 2023-05-23T14:14:06 | 2016-11-29T22:03:20 | Python | UTF-8 | Python | false | false | 1,933 | py | sugarloaf_status.py | #!/usr/bin/env python
# coding: utf-8
from bs4 import BeautifulSoup
import requests
import pandas as pd
MOBILE_SUGARLOAF_CONDITIONS_URL = (
"http://spotlio-snowconditions.s3.amazonaws.com/sugarloaf/status.json"
)
MOUNTAIN_REPORT_HTML = "https://www.sugarloaf.com/mountain-report"
response = requests.get(MOBILE_SU... |
f5d379a0b6c68e0e69705f6eb7f45fe37f7b6c66 | acf4b57b9dd4b8c854335127f713a9783c1526bf | /Sparkify-zh (3).py | 1e2d212ff2288ddc47159e4051916481a4b18a86 | [] | no_license | kimkimheel/Sparkifyproject | 17f9747925bbf2ff62871f3834faf253e4069b4f | c32aeb8c62636ac6cd5f5ecc0a7f5a74b200749a | refs/heads/master | 2021-02-12T07:36:32.674565 | 2020-03-03T08:08:52 | 2020-03-03T08:08:52 | 244,573,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,457 | py | Sparkify-zh (3).py | #!/usr/bin/env python
# coding: utf-8
# # Sparkify 项目 Workspace
# 这个 Workspace 包括一个迷你的子数据集(128MB),是完整数据集(12GB)的一个子集。在将你的项目部署到云上之前,你可以自由使用 Workspace 来创建你的项目或用Spark来探索这个较小数据集。设置 Spark 集群的指南可以在选修 Spark 课程的内容里找到。
#
# 你可以依照下面的步骤进行项目的数据分析和模型搭建部分。
# In[1]:
# import libraries
from pyspark.sql import SparkSession
from pysp... |
c4a6d25dec4053f410c3f4d1410465435a51d09c | 0cf03482ae3763a5e0fff3d4dd731571f2f27205 | /word_buddy/related.py | f4d06371cdcc5429d6ec6a656d88e3309255592a | [] | no_license | spider-robinson/echo_buddy | a768450621a756c3016df2e374902a6ccf901f42 | eca93691617a3897e2b8500f16c552351634ce9e | refs/heads/master | 2021-01-01T20:43:54.488926 | 2017-08-05T20:59:13 | 2017-08-05T20:59:13 | 98,919,803 | 1 | 1 | null | 2017-08-05T13:58:30 | 2017-07-31T18:55:14 | Python | UTF-8 | Python | false | false | 808 | py | related.py | from flask import Flask
from flask_ask import Ask, statement, question
import requests
import time
import unidecode
import json
import numpy as np
import gensim
from gensim.models.keyedvectors import KeyedVectors
app = Flask(__name__)
ask = Ask(app, '/')
global glove
path = "glove.6B.50d.txt.w2v"
glove = KeyedVectors... |
6d711f8a93938b91916ac206e6878e4742e96b90 | 46a5f25dd3ceff8bf9e5e4433cc07e8c740e4fb1 | /FL_linearMixUP_main.py | 46d30e00b759a0da14e2b3e012e0bf4a9fff13a7 | [
"MIT"
] | permissive | XinDongol/XOR-Mixup | 52b2a10a262b844539e7ce0a6f8eae3d77ebb307 | b61df2cd8e05f079bf568fd07d8d02fa4427280b | refs/heads/master | 2022-12-03T18:38:16.825824 | 2020-08-10T08:16:02 | 2020-08-10T08:16:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,062 | py | FL_linearMixUP_main.py | import tensorflow as tf
from tensorflow import keras
import numpy as np
import pandas as pd
# from arguments import Args
import copy
# -*- coding: utf-8 -*-
import cv2
import matplotlib.pyplot as plt
# from utils import manager, user, server
import os
import random
os.environ["CUDA_VISIBLE_DEVICES"] = '... |
e74dcce08a616599556ad0abea05dfaeb6781171 | dba16143d8fa6aa73ca1d4df7bcfaca42824412c | /src/year2016/day01a.py | dcfb62773d77b391b18d88dd59fde8bf5a0fc291 | [
"Unlicense"
] | permissive | lancelote/advent_of_code | 84559bf633189db3c3e4008b7777b1112f7ecd30 | 4b8ac6a97859b1320f77ba0ee91168b58db28cdb | refs/heads/master | 2023-02-03T14:13:07.674369 | 2023-01-24T20:06:43 | 2023-01-24T20:06:43 | 47,609,324 | 11 | 0 | null | 2019-10-07T07:06:42 | 2015-12-08T08:35:51 | Python | UTF-8 | Python | false | false | 2,176 | py | day01a.py | """2016 - Day 1 Part 1: No Time for a Taxicab."""
from collections import namedtuple
from typing import Any
Instruction = namedtuple("Instruction", "direction distance")
class Point:
"""Point coordinates representation."""
def __init__(self, x: int = 0, y: int = 0) -> None:
"""2D point representatio... |
3163ff253acc726805b85656d31561a66b94afd3 | 41beb3bef8850eee424ba897a6fac2ca2cf97c5e | /openCVTrials.py | efddc4e832142c5d39bd7e255a0cfd3791c627aa | [] | no_license | srinithish/robotic_arm_consolidated | c9008093fc83b271973271d88fe5187ec7d56e1f | f0fdd422687fd816fa030af64f4ec92c0594c721 | refs/heads/master | 2020-06-20T09:05:54.157395 | 2020-04-30T15:33:11 | 2020-04-30T15:33:11 | 197,071,005 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,462 | py | openCVTrials.py | # -*- coding: utf-8 -*-
"""
Created on Mon May 20 15:54:35 2019
@author: GELab
"""
import cv2
import numpy as np
from matplotlib import pyplot as plt
import numpy as np
import imutils
img = cv2.imread('./imageCaptures/AllTrails_2.jpg',0)
edges = cv2.Canny(img,100,200)
edges = cv2.GaussianBlur(edges,(7,7),0)
#plt.subp... |
8045b42877c49729b6e0c0746a220c1aff77fbcf | 32d73ad3f5ce6bdd8c369c9fc0830c464d2bda6d | /lessonn_6/hmw_6_2.py | 44ebc1f37a441f353a0bd2b4d52f30bbf97030a2 | [] | no_license | EugenePolyanitsin/some_example_rps | 6d7a09f41e80f017ec770fb4a06795a5d3af30c1 | 8f35a215f3cd2974c15859bb960397023de8f7bb | refs/heads/main | 2023-03-23T20:38:37.428525 | 2021-03-14T14:11:54 | 2021-03-14T14:11:54 | 310,568,400 | 0 | 0 | null | 2021-03-14T14:11:55 | 2020-11-06T10:45:13 | Python | UTF-8 | Python | false | false | 1,410 | py | hmw_6_2.py | """Реализовать класс Road (дорога),
в котором определить атрибуты: length (длина), width (ширина).
Значения данных атрибутов должны передаваться при создании экземпляра класса.
Атрибуты сделать защищенными.
Определить метод расчета массы асфальта, необходимого для покрытия всего дорожного полотна.
Использовать формулу:... |
5522d66d94defcf8e7b795935ecfb0d64bb81db0 | a41e1498e3c080f47abd8e8e57157548df3ebbf1 | /pandas/tests/extension/base/index.py | 72c4ebfb5d84ae82f74a4c814e72372a651ae6b8 | [
"BSD-3-Clause"
] | permissive | pandas-dev/pandas | e7e639454a298bebc272622e66faa9829ea393bb | c7325d7e7e77ecb4a4e57b48bc25265277c75712 | refs/heads/main | 2023-09-01T12:42:07.927176 | 2023-09-01T11:14:10 | 2023-09-01T11:14:10 | 858,127 | 36,166 | 18,728 | BSD-3-Clause | 2023-09-14T21:18:41 | 2010-08-24T01:37:33 | Python | UTF-8 | Python | false | false | 517 | py | index.py | """
Tests for Indexes backed by arbitrary ExtensionArrays.
"""
import pandas as pd
class BaseIndexTests:
"""Tests for Index object backed by an ExtensionArray"""
def test_index_from_array(self, data):
idx = pd.Index(data)
assert data.dtype == idx.dtype
def test_index_from_listlike_with_d... |
3edede6d05193434415fd7b9bea17d46d887f1c9 | 8f47a1c4cafdaecb55e97fe248e4d6741542df8a | /test/calculator.py | 45eabd6117210af32a0240d586947c25ab3e68f2 | [] | no_license | sushilnayak/python-template-for-sagemaker-calc | d4d62ded6338f732d7cc1e46650dbe6439c7ec9a | 3854f2cb373db1605ec268866e113adabe9ff945 | refs/heads/master | 2020-03-30T13:45:24.521820 | 2018-10-02T16:25:32 | 2018-10-02T16:25:32 | 151,285,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | calculator.py | import flask
import handler as CalcClass
app = flask.Flask(__name__)
@app.route('/ping', methods=['GET'])
def ping():
status = 200
return flask.Response(response='\n', status=status, mimetype='application/json')
@app.route('/invocations', methods=['POST'])
def transformation():
try:
calculatio... |
0a95832350720c3bd5df3b06c9fdf630ac296ef7 | 2d51cdf6aa8e286ce2737d734d1b4154cecf0fca | /pythonTask.py | 1a4f5591c2811f1eef49cef1c22bbdbd80674574 | [] | no_license | mir-jalal/PythonProgramming | 739adf5a07d7ed61bb78a197e214a4f208b8e3a2 | 3954fd3b8e5fe26653244d9bdeb50354aa776241 | refs/heads/master | 2022-11-18T16:46:51.865493 | 2020-07-16T21:22:45 | 2020-07-16T21:22:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | pythonTask.py | prime = 1000000*[True]
for i in range(2, 1000):
for j in range(2, 1000):
prime[i*j] = False;
sum = 0
k = int(input())
for i in range(2, 1000000):
if prime[i]:
sum = sum + i
if sum % k == 0:
break
print(sum)
|
02b59bb94e5b6709a11a4cf6c502572d4dedf442 | d099534ca8a7b89a9d541d8cb79d2ee966d9986d | /molecule/default/tests/test_ssh.py | 904980e4c72c72912fbdd4d223843d7f52bfd670 | [
"MIT"
] | permissive | diogenes1oliveira/ec2-iam-users | 2257e5c8466835f40a811b847d7aacda083aecf5 | 9eb59f581b83159a1b8d32641a07f67f32e6bd02 | refs/heads/master | 2020-05-09T22:37:48.569477 | 2019-05-07T14:14:30 | 2019-05-07T14:14:30 | 181,477,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,596 | py | test_ssh.py | from base64 import b64decode
from collections import namedtuple
from contextlib import contextmanager
import os
from pathlib import Path
import subprocess
import tempfile
import paramiko
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ[... |
fa02b6b918e12d951ca471015b1416ed7c3f0306 | 7edfe0c37e4419aa195a1100c0ef4b91be430e01 | /app/mongo_query.py | 50f45c8129a43e6b653c1978190cb3193ae9037f | [
"MIT"
] | permissive | Ekram49/DS-Unit-3-Sprint-2-SQL-and-Databases | 076b36bb07103029d7af52a453c5d4d8e26aac02 | 9449e60c744438eaedba5598fac1f3f4fab81471 | refs/heads/master | 2022-07-12T18:17:28.460304 | 2020-05-14T22:47:47 | 2020-05-14T22:47:47 | 255,167,890 | 0 | 0 | null | 2020-04-12T20:51:16 | 2020-04-12T20:51:15 | null | UTF-8 | Python | false | false | 3,358 | py | mongo_query.py | # app/mongo_queries.py
import pymongo
import os
from dotenv import load_dotenv
load_dotenv()
DB_USER = os.getenv("MONGO_USER", default="OOPS")
DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="OOPS")
CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS")
#mongodb+srv://user123:<password>@cluster0-brbdg.mongodb... |
f889fa844726cdfa47a8e171682aa462986ddb35 | 7aa475d5ff82fb57d00c3e1c1c70616eb55cb9d5 | /app.py | 05202b82adbab185d06cf746381bf2152b62a6ef | [] | no_license | Scrapper89/streamlit_heroku_example | 78463cd8fd25c811abbc633cb0992683f3426e59 | 31969c3324f543269063c9446159ed69e318f4aa | refs/heads/master | 2023-03-26T20:36:03.854317 | 2021-03-15T00:10:39 | 2021-03-15T00:10:39 | 347,784,067 | 0 | 0 | null | 2021-03-15T00:10:39 | 2021-03-14T23:55:04 | Shell | UTF-8 | Python | false | false | 2,266 | py | app.py | import streamlit as st
import pandas as pd
import numpy as np
import datetime
import markowitz_example as mwe
import plotly.express as px
#st.set_page_config(layout='wide')
st.title('Markowitz Portfolio Optimization')
@st.cache
def load_data(choice):
data = mwe.get_data(choice)
return data
cho... |
4769090fee3872dcf18e16599a06a892d48c0695 | 253576caa27b9db0b8db1dcbe9d05bf0b713dba3 | /NoteShrinker/cli.py | e9067775c4b36445f8e7b6138312f8f4068aa71c | [
"MIT"
] | permissive | YJingyu/NoteShrinker | 345e022431eca2125ddd1f5e0dfde7ddcad50267 | 36bd6f825c28aeda8fd35433f4f609ba83406e4f | refs/heads/master | 2020-12-02T00:42:55.078764 | 2019-03-11T21:57:44 | 2019-03-11T21:57:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,099 | py | cli.py | #!/usr/bin/env python3
"""Commandline interface for NoteShrink"""
import os
import re
from argparse import ArgumentParser
from . import NoteShrinker
# TODO: dpi
# TODO: logging/debug/print
def main():
options = get_argument_parser().parse_args()
unshrunk = get_filenames(options)
ns = NoteShrinker(uns... |
d78d3581f81abb6b416baa04ea91f81ad7f03012 | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/qt/5.x.x/test_package/conanfile.py | 5a7b088d4aa4107f4a233d5f7e368caaed259498 | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 1,921 | py | conanfile.py | import os
import textwrap
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.env import VirtualRunEnv
from conan.tools.files import copy, save
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
... |
22c88bb9420f1311e7a9104aa8b731e33b337951 | c76aab0f4a36ba71a5cb0f7b66d506c9f86c6e2d | /networks.py | 84940506a1d3e56233476f7ada480f5b4003648a | [] | no_license | btx0424/ReversiV | 2b0fd6712f35bb6bb7a1df487ccd53671321aac0 | 93aef37f687e8e2360278344b674d9b57870b643 | refs/heads/main | 2023-07-15T23:02:48.760196 | 2021-08-31T16:44:55 | 2021-08-31T16:44:55 | 401,742,307 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,014 | py | networks.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class NNet(nn.Module):
def __init__(self):
super(NNet, self).__init__()
self.fc1 = nn.Linear(in_features=64, out_features=64)
self.fc2 = nn.Linear(in_features=64, out_features=64)
def forward... |
2b4afb8c43f2a57cbcad42fdc54de3d580035044 | 32c92f29016fee4600fc917b3c5930e5955fbceb | /App/backend/core/security.py | 71cb17af6b1c49fa52ccba5f31ce9866375cf1f6 | [] | no_license | zeetaros/KickStart | 9e53ced55cbda146c35f29d199a00ebd6fe01c78 | 6369b958b40c826b5c2856bdc806830afa7d0686 | refs/heads/master | 2023-07-23T23:01:40.973149 | 2023-05-02T15:06:06 | 2023-05-02T15:06:06 | 245,274,089 | 2 | 0 | null | 2023-07-06T23:20:40 | 2020-03-05T21:45:45 | C | UTF-8 | Python | false | false | 1,180 | py | security.py | from datetime import datetime, timedelta
from typing import Optional
from jose import JWTError, jwt
from core.config import settings
def create_access_token(data: dict, expires_delta: Optional[timedelta] = None):
"""
Args:
data (dict): a data dictionary with a subject which ideally is an email or use... |
0a95c22b8d4e84f724a5021ca1a913574685b951 | 76005ae5ca97021c24cadca53da81cfb419aea0b | /twitter.py | 79473d4eef15a52070d03b9421a67376e7cedce1 | [] | no_license | abhi-jha/twitter-work | 04a37fe25d12a40b4c5e106a3309e378cfab1c43 | dacf8b74e3b0f5aedbf3ad2a15ff157fcbbfbbce | refs/heads/master | 2020-03-19T23:03:46.114211 | 2018-06-12T04:13:00 | 2018-06-12T04:13:00 | 136,991,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,662 | py | twitter.py | import tweepy
from credentials import cred
import peewee
from peewee import *
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
fh = logging.FileHandler('twitter.log')
fh.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.set... |
2759db5cf572de836f679c3146563d304ac062f1 | e4d3b93b4e75144a672330104008292cfeeabbed | /Translation/test_online_localsource.py | ab2f34fd97b6a36a34724f3179152fd8a1e5ca31 | [] | no_license | dleng-vmware/codeclient | f7399f55ca1405ff6c86bd49337a52a441c77bb8 | bce385c269d9883b6a0f3e9624af3576ce5f77b7 | refs/heads/main | 2023-07-03T01:09:22.241407 | 2021-08-06T11:35:45 | 2021-08-06T11:35:45 | 393,356,027 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,269 | py | test_online_localsource.py | import sys
#sys.path.append('../..')
#from sgtn_client import I18N,Release,Config,Translation
from sgtnclient import I18N
#sys.path.append('../..')
#from sgtn_client import I18N,Release,Config,Translation
import os
import shutil
import time
import json
import pytest
PRODUCT = 'PythonClient'
VERSION = '0.0.00.1'
COMPON... |
37658e69298c97010b3030a6a5ecca383a993a2e | 5178402d9bcddb631b0f1c9d339cf87bccb3cd9d | /TwitterSentiment/code.py | 078fae279de1a0617f60dd2dd83724544f4e7448 | [] | no_license | imrojq/Independent-Projects | c16deaf878d370a7aef721991bef1a9f655f3d32 | ea68e0de9e3e1db19e2759a687d4700f54f17d7d | refs/heads/master | 2016-09-08T00:21:09.431823 | 2015-08-05T20:10:01 | 2015-08-05T20:10:01 | 40,209,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,997 | py | code.py | """
The code requires different python packages to be installed before runnig these code
these packages can be found on http://www.lfd.uci.edu/~gohlke/pythonlibs/
"""
import re
import numpy as np
from nltk.stem import SnowballStemmer
from nltk.corpus import stopwords
from sklearn import svm
from sklearn.ensemble impor... |
97dda94dd8180f42e4f14cb88555773925511635 | 36ca932c7180738f501190f1d28c3a63e462c413 | /devilry/utils/groups_groupedby_relatedstudent_and_assignment.py | c531b22b0841cace546f723c479fded6d523f21f | [] | permissive | devilry/devilry-django | 4e2741f29fcf2ae6b75690e9cd0cded154decf6e | a3355fe78992466cfcae8b166128bf51ddbb26d0 | refs/heads/master | 2023-08-08T22:00:58.952030 | 2023-07-21T13:17:27 | 2023-07-21T13:17:27 | 486,298 | 42 | 22 | BSD-3-Clause | 2023-07-21T13:38:30 | 2010-01-24T13:31:14 | Python | UTF-8 | Python | false | false | 12,329 | py | groups_groupedby_relatedstudent_and_assignment.py | from devilry.utils import OrderedDict
from devilry.apps.core.models import AssignmentGroup
class GroupList(list):
"""
Represents a list of :class:`devilry.apps.core.models.AssignmentGroup` objects,
with utility functions for commonly needed actions. The list is ment to hold
groups where the same stud... |
b6631c03642d54b0425d4da5041e9592697f1f30 | 502dbcf7d69ab6f2da2970c5f3e7a6924b928097 | /app/config/urls.py | 83ea632b35fff4be49b5ce5380d721bca50c5c17 | [] | no_license | Dav416/Needlebox | 04a8fa3f035d2186a1c127977accde6495758920 | 16f5e9dde602c79ecab2e6c9237409a9825d908f | refs/heads/master | 2023-08-27T13:59:55.217037 | 2021-10-13T03:34:01 | 2021-10-13T03:34:01 | 377,961,072 | 1 | 0 | null | 2021-10-13T03:33:49 | 2021-06-17T21:08:31 | JavaScript | UTF-8 | Python | false | false | 1,688 | py | urls.py | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... |
02a01da8c3eff744ef9f73340c439cdf133d37da | 5aea1903d8b118c7ec6ac65776d9e4befbaa3411 | /pymzml/__init__.py | da0622c64075dc4e29363b3c5fc374a0da7e62d8 | [] | no_license | HegemanLab/VanKrevelenLocal | 7454b50492b3fb9ea4346a22b3f93e53f4f5077e | 0abbc8d2cc0b013ec970906d7a14c2ceadf31066 | refs/heads/master | 2020-12-26T11:24:07.426362 | 2018-06-06T16:30:39 | 2018-06-06T16:30:39 | 63,805,083 | 6 | 0 | null | 2018-06-06T16:30:40 | 2016-07-20T18:32:50 | Python | UTF-8 | Python | false | false | 1,325 | py | __init__.py | # -*- pymzML -*-
# encoding: utf-8
# Copyright (c) 2009 <The authors in here!>
# module is distributed under the terms of the GNU General Public License
# See LICENSE for more details.
"""
Python mzML module - pymzml
Copyright (C) 2010-2011 T. Bald, J. Barth, M. Specht, M. Hippler, C. Fufezan
This program is fre... |
b0f68e480e0663cf5346725090db930749244059 | 8cfc038b9410565ed5276806ba26ded68aeba515 | /pizzaWeb/menu/models.py | 0984660d1f4de84bb065c6e44621245ef37030db | [] | no_license | IBonane/PizzaWebDjango | bffee701e1b88f31305d0162ca698b28854a78a9 | ff366caa300f69cd36cba0623957c1e6ccbf6d90 | refs/heads/main | 2023-08-28T20:32:17.555226 | 2021-10-31T13:15:59 | 2021-10-31T13:15:59 | 420,533,568 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | models.py | from django.db import models
class Pizza(models.Model):
nom = models.CharField(max_length=120)
ingredients = models.CharField(max_length=400)
prix = models.FloatField(default=0)
vegetarienne = models.BooleanField(default=False)
def __str__(self):
return self.nom
|
d7d4e5487507f8b25d1ddf8c09c929204bb91142 | 82a9077bcb5a90d88e0a8be7f8627af4f0844434 | /google-cloud-sdk/lib/tests/e2e/surface/compute/network_endpoint_groups/e2e_test.py | 0e3ef59981f57b4fceb5b84f4e018ea27dd268b4 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | piotradamczyk5/gcloud_cli | 1ae2553595e569fad6ce84af62b91a7ee5489017 | 384ece11040caadcd64d51da74e0b8491dd22ca3 | refs/heads/master | 2023-01-01T23:00:27.858583 | 2020-10-21T04:21:23 | 2020-10-21T04:21:23 | 290,238,061 | 0 | 0 | null | 2020-10-19T16:43:36 | 2020-08-25T14:31:00 | Python | UTF-8 | Python | false | false | 12,198 | py | e2e_test.py | # -*- coding: utf-8 -*- #
# Copyright 2018 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 requir... |
76c97b9a3a3a4a4444c41b25baf4b537b14841c3 | 91d86e0c28cd26d6542428b16f5975b2563aeecc | /python/calculate.py | 6fe603a967f50dd10d8f317759ee6e5cad1fa249 | [] | no_license | xkKevin/Comp_ZJ | 8311b193ee0e9c65a83ad70450d863213bbbc4d7 | f25d5b4586adea5c92d4a1e8929feca48f3aadec | refs/heads/master | 2022-12-15T09:10:43.619768 | 2019-08-27T12:24:49 | 2019-08-27T12:24:49 | 204,697,972 | 0 | 0 | null | 2022-12-11T03:27:34 | 2019-08-27T12:26:12 | HTML | UTF-8 | Python | false | false | 634 | py | calculate.py | import networkx as nx
import community #this is from python-louvain
import sys
import json
def degree(G):
degree = nx.degree(G)
d = {}
for di in degree:
d[di[0]]=di[1]
jsonStr = json.dumps(d)
print(jsonStr)
# sys.stdout.flush()
# if __name__ == "__main__":
try:
calculate = sys.arg... |
674796c810d0548e5c20d923b3937f4c253f4ae4 | e93530a02ab45a31614f679b097607991f6de1ea | /50-masala.py | 71ea854702f56c8aa0269814d6442a6a2689885a | [] | no_license | HusanYariyev/Python_darslari | 6a0ab3c5fc728679dbc09ba784c8c66bce4835f4 | 481300c99073ca1c3b43cb7facaf48b90a31ddd8 | refs/heads/main | 2023-06-28T04:26:34.001714 | 2021-07-26T05:45:58 | 2021-07-26T05:45:58 | 381,596,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 72 | py | 50-masala.py | def fibonachi(n):
if n == 0:
print(n)
print(fibonachi(3)) |
c72141142e9cbf912524f1aaddaab61b579c3872 | 842e36ac3dd3e031e9fb76fc25178c1f7c4b27bb | /src/schema/task.py | f77acdf71ec2bc719ff9f10b0ec20522cbb9856f | [] | no_license | aless10/data-engineer-challenge | 28b4923dc8bbe0a99ddcd889c5bed073c111844d | 6035546e542cd92cf3f5994dc404ca8707660145 | refs/heads/master | 2020-04-20T23:15:01.328927 | 2019-02-04T23:12:13 | 2019-02-04T23:12:13 | 169,163,497 | 1 | 0 | null | 2019-03-05T20:01:36 | 2019-02-04T23:03:27 | Python | UTF-8 | Python | false | false | 1,419 | py | task.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from marshmallow import Schema, fields, post_load, pre_load
from src.schema.base import BaseResponseSchema
from src.model.task import TaskRequest
class RequestSchema(Schema):
total_events = fields.Int(required=True)
start_date = fields.Date(re... |