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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c4cee67bc46e2c38f688927d5adf12d3285bec33 | 70cb0e74c5f8d9d9bd7cfeb13e0f7ba144308d81 | /project/bookmarks/pagination.py | c4bf8982f31386ab2e297dfb31a0d7af1fd2ff7b | [] | no_license | aiham-badran/bookmark_server | 586c295d2ac80b09e5b738b96310a034f617f074 | 2972998fb0729d5a15068dc6356527b690824f53 | refs/heads/main | 2023-06-06T06:35:35.468446 | 2021-07-06T15:59:50 | 2021-07-06T15:59:50 | 352,696,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,276 | py | pagination.py | from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
class Paginate(PageNumberPagination):
"""
custom pagination using PageNumberPagination from rest_framework
@retrun Response :{
'query': the word is using in query param,
... |
c6c221d297a379adc1562ee52e3428728e89f230 | ec9cbb1f7ea8483142f77a08af52ac686a4e0b62 | /01-download/download.py | d5da380cc561d606fe5e3122a421b16e8d573af1 | [] | no_license | ixime/landsat-8-scene-classifier | d35d12878ec77ed7cd8978d3b4a9074354ebadee | 9b8da303a8d88da06de6762cb5902613f213cf48 | refs/heads/master | 2021-10-09T07:16:29.783136 | 2018-12-23T15:57:41 | 2018-12-23T15:57:41 | 144,519,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 997 | py | download.py | """
USGS Landsat 8 Scene Classification
01 Download
Downloads one Landsat 8 OLI/TIRS C1 Level-1 Scene in a compressed file tar.gz
through the USGS/EROS API
"""
import os
from dotenv import load_dotenv, find_dotenv
import argparse
from requests_ee import RequestsEE
from download_session import DownloadSession
# Load cr... |
5bde8528ed4a740b72b78460118720646ba998b1 | 55559fd41c23e72398e09f98f79567149778d002 | /OOPS/Class_Objects.py | 8a2618dc8eacadd865fa9f2bf7c896bfef0b494f | [] | no_license | JATIN-RATHI/7am-nit-python-6thDec2018 | d5b86bf27c23d3ec6712a58fb8d3e98444c4ef44 | e5f1f45e34a05d2051f18654cdf4b9417458b043 | refs/heads/master | 2022-12-23T12:08:23.544925 | 2020-09-30T19:14:52 | 2020-09-30T19:14:52 | 300,032,148 | 1 | 0 | null | 2020-09-30T19:12:37 | 2020-09-30T19:12:36 | null | UTF-8 | Python | false | false | 4,076 | py | Class_Objects.py | # Python Objects and Class :
""" Table of Contents :
1. What are classes and objects in Python?
2. Defining a Class in Python
3. Creating an Object in Python
4. Constructors in Python
5. Deleting Attributes and Objects
"""
"""
What are classes and objects in Python?
Python is an object oriented programming lan... |
e5f818434c2fa9be0ac84011b37fb5cc6be71c7e | bc5cf15a4e078422b4b755485a4db760b2c7d564 | /detect.py | b8a96e77af999211e61c2a41b54cbafd326e7000 | [] | no_license | Kmozcan1/Computer-Vision-Project | b7755e9602627e3a2bf1b72a6d8736b6dd6f3518 | 1c346b18c97f2711d457d74ffcbfd19388f0c116 | refs/heads/master | 2020-07-27T08:50:33.762332 | 2019-09-17T11:27:56 | 2019-09-17T11:27:56 | 209,035,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,776 | py | detect.py | import operator
import os
import cv2
import draw_graph
from enum import Enum
# DISPLAY: Displays images and found wheels
# GRAPH: Displays ROC Curve and
# STATS: Show Precision and Recall etc.
class MODE(Enum):
DISPLAY = 1
GRAPH = 2
STATS = 3
# Our cascade classifier
wheel_cascade = cv2.CascadeClassifie... |
de1d5b615302bf1aa1a31da9ad04e94c134e49db | f897b5c8b52e9e531471610d34371ba2bad27465 | /configs/faster_rcnn_r101_fpn_1x.py | 09d344bf71749e0fd2b16db3c30fe94542ae55e4 | [
"Apache-2.0"
] | permissive | t0efL/mmdetection | 0a3a82144d9c8164eadc0e9f4416a320af55bf64 | 54126b6ff48f412e57343931229fddfc995ce69b | refs/heads/master | 2022-11-30T16:52:04.240657 | 2020-08-02T11:58:31 | 2020-08-02T11:58:31 | 283,963,289 | 1 | 0 | Apache-2.0 | 2020-07-31T06:45:15 | 2020-07-31T06:45:15 | null | UTF-8 | Python | false | false | 23,323 | py | faster_rcnn_r101_fpn_1x.py | model = dict(
type='CascadeRCNN', # The name of detector
pretrained=
'torchvision://resnext101_32x8d', # The ImageNet pretrained backbone to be loaded
backbone=dict( # The config of backbone
type='DetectoRS_ResNeXt', # The type of the backbone, refer to https://github.com/open-mmlab/mmdetect... |
8c1f3a353a171835e3352706026d2c14a0040262 | f33a7b2d6a4cbac5588ea8d99ea9605c20b666aa | /get_binance_data.py | 0bf37438a994c0170369bc2de37a85acf59a81db | [] | no_license | lazaros-23/demo-crypto-app | f8d5e5b8ec0094db169f62dda4d519cfeed583d1 | 236741b15fc8a37be11223c39bf2a253db166fc9 | refs/heads/main | 2023-08-28T05:44:48.238513 | 2021-10-26T07:46:58 | 2021-10-26T07:46:58 | 421,137,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | get_binance_data.py | import json
import requests
import datetime as dt
import pandas as pd
def get_bars(symbol, interval):
"""
Collect data from Binance API
"""
root_url = 'https://api.binance.com/api/v1/klines'
url = root_url + '?symbol=' + symbol + '&interval=' + interval
data = dict()
data['limit'] = 1_000 #... |
d48a0add366c7f8d827d3051dce7897d20101215 | 5691ddd119b5f3f563a54949e5ffa082f0d041c3 | /benchmark_7/cli.py | 10e7b95d7ecb46e71b5dd29a13e5de39cfcdbe4f | [] | no_license | hyperion-rt/hyperion-trust | 125bc7c469ec13382eb1553c5b138a2de5a2bd18 | 06a6ce22476308d4409b5979680ff45c3296b17c | refs/heads/master | 2020-12-24T15:23:24.978773 | 2016-10-29T11:01:31 | 2016-10-29T11:02:44 | 13,900,441 | 0 | 0 | null | 2014-08-06T15:16:13 | 2013-10-27T12:00:48 | Python | UTF-8 | Python | false | false | 4,766 | py | cli.py | import sys, getopt
class command_line_arguments(object):
__slots__ = ['filament', 'sources', 'opticaldepth', 'mode', 'resolution', 'photons_temperature', 'photons_raytracing', 'photons_imaging', 'verbose']
def handle_command_line_arguments(cli):
Usage_str = \
"Usage: python " + sys.argv[0] + " <args> \n\
w... |
df72f04a6108f61c671b588f42f8c2b2fe33526f | 2b65e93c7b75925c12190929e1c04aa6c3875717 | /app/api/v2/models/users.py | 257c7caf1091dbf5c17dd399ec57f2993032eaec | [] | no_license | bedann/Agile-Politico | 2a3b9af43dadc2024ed58f70cd33a917b4941688 | 207fd42020dead3ab3921409276a2b393df40177 | refs/heads/develop | 2022-12-12T08:06:57.522302 | 2019-03-03T10:24:08 | 2019-03-03T10:24:08 | 176,307,346 | 0 | 0 | null | 2022-12-08T01:42:19 | 2019-03-18T14:47:12 | Python | UTF-8 | Python | false | false | 5,729 | py | users.py | # imports
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from flask import abort
import sendgrid
import os
from sendgrid.helpers.mail import Email, Content, Mail
import jwt
from app.api import utils
import sys
from . import db
class UserModel:
"""
The... |
5ccbc7bb9c71f1421738529d2c56f7cca65e95b5 | 674d15b81cbb0dec4ee2d9c0477f83ee27bfe016 | /rango_core/forms.py | ba13019b1651f5908b39126cade4bb2dc93d8142 | [] | no_license | vasiliumuraviov/rango | 146848a71346ac1f074c5e700754150334987d9e | fae2bbe5b4c16c897a4d7cd2c4af85940cdd878a | refs/heads/master | 2020-07-09T18:20:22.941902 | 2019-10-25T16:13:29 | 2019-10-25T16:13:29 | 204,046,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,235 | py | forms.py | from django import forms
from django.contrib.auth.models import User
from . import models
class UserForm(forms.ModelForm):
# overriding User's model field 'password' with field's own field 'password'
password = forms.CharField(widget=forms.PasswordInput())
class Meta:
model = User
fields... |
fcc19194a1e40a395578f15817c6a583c89fc326 | 2339b4eb2d08a53464c43b01d78e243c62a60e82 | /zenora/utils/misc.py | e5085cb180cc540fecea62e8294fd964f4a5aa8d | [
"MIT"
] | permissive | MaksymKarunos/zenora | 51b2556fbbdcb9048f5a9b310c53040998e5127f | a1886dac5f3c84dcddea3368e21f7986368ad63f | refs/heads/master | 2022-12-15T02:27:56.999074 | 2020-09-13T06:27:59 | 2020-09-13T06:27:59 | 294,660,398 | 1 | 0 | MIT | 2020-09-11T23:24:53 | 2020-09-11T10:07:53 | null | UTF-8 | Python | false | false | 2,854 | py | misc.py | import random
from datetime import datetime
import zenora
import platform
def print_welcome():
msg = [
"""
/$$$$$$$$
|_____ $$
/$$/ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
/$$/ /$$__ $... |
c1a76eed0a15303cb7727e67434ac94cc3ef72ab | 0b9de9f72ce829f9f2daf3eba9b5ca8ee77f9585 | /up_counter_bench.py | 3c27aee0ce13c6e0dcf8171c538c0dd149560b3b | [] | no_license | psycowithespn/nmigen-sandbox | 226c9ea487cd6e267c972fe8ca45ca2454bc0be6 | 27b576663789fcb2f655e374a2abe3503a7bf5f9 | refs/heads/main | 2023-03-08T16:00:31.210538 | 2021-02-21T18:30:30 | 2021-02-21T18:30:30 | 340,765,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | up_counter_bench.py | from nmigen.back import verilog
from nmigen.sim import Simulator
from up_counter import UpCounter
dut = UpCounter(25)
def bench():
yield dut.en.eq(0)
for _ in range(30):
yield
assert not (yield dut.ovf)
yield dut.en.eq(1)
for _ in range(25):
yield
assert not (yield d... |
477bf5b33912b8253aafc59160fa29f4b8d1dd5b | 5ed7570f75430435913a005a895150dff0c9bb63 | /old_py_yahtzee/test_scorecard.py | 41e6c6c3eb36b2c69edc857c98caadcb17082e00 | [] | no_license | sudoddbe/yahtzee | 312c91590360c4e34d580309e967b32dd69fca80 | c9f6e3c9092ca11282a119b0f461796a2d76c6c1 | refs/heads/master | 2021-01-01T22:08:08.678245 | 2019-12-20T18:31:40 | 2019-12-20T18:31:40 | 239,363,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,599 | py | test_scorecard.py | from yahtzee_scorecard import Scorecard
import numpy as np
def test_create_scorecard():
scorecard = Scorecard()
assert(scorecard.categories)
def test_all_scoring():
scorecard = Scorecard()
names = [cat.name for cat in scorecard.categories]
roll = (1,1,1,1,1)
expected_scores = { name:0 for nam... |
87513a0a7e7c97022dc382e8bbf9e763b236289e | 46676b1ce3797eb1f9bbd964c9552dff4ee2c233 | /components/sortableselect/sortableselect.py | 277cba11c3a3a400afe2163f4087c9639e40b104 | [] | no_license | JesusZerpa/nuclear | eba2bab9436ec870503fad1ec0aede2f0415d955 | 702d18ce3610961909550ea70cf8c6d91ab41ca8 | refs/heads/master | 2023-08-06T02:20:45.178980 | 2020-05-12T00:32:39 | 2020-05-12T00:32:39 | 405,796,919 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | sortableselect.py | __pragma__("alias","s","$")
def sortable(widget_id,name):
def update():
def fn():
value=""
for elem in s(widget_id).find("li"):
if s(elem).attr("data-value")!=None:
if value!="":
value+=","+s(elem).attr("data-value")
else:
value+=s(elem).attr("data-value")
s("[name="+name+"]")... |
14268b170e9904d007e53ab24f6942e0fda22b5f | 9643b0c3645f78f0fbe736feb33fe000292ccd88 | /frida-snowrunner-trainer.py | 9418a0bc59d425e547931b3ef580c52404742eff | [
"ISC",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tickelton/misc.re | 78d5210d0c12586ab2e76a9c8ec35300ac5d3b2e | d21aeb97bfd28ab7fd0374e600a88900e497bdf5 | refs/heads/master | 2023-03-01T15:13:30.901041 | 2021-02-06T09:49:50 | 2021-02-06T09:49:50 | 291,286,279 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,652 | py | frida-snowrunner-trainer.py | #!/usr/bin/env python3
# Copyright (c) 2020 tick <tickelton@gmail.com>
# SPDX-License-Identifier: ISC
import frida
import sys
# From: https://www.maprunner.info/resources/rank-xp
xp_table = [
(0, 0),
(700, 0),
(1000, 700),
(1200, 1700),
(1200, 2900),
(1300, 4100),
(1500, 5400),
(1600,... |
c65dc345390329da8a5360b30a8ac2bf0b23e056 | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /dockerized-gists/98489c05f0898abe612eec916508f2bf/snippet.py | 9f473584107b4df5b8a1f4729aa90563a4030869 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 2,446 | py | snippet.py | #!/usr/bin/env python
# How to use:
#
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto
#
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var:
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py
#
# Manua... |
dfde68060e6f634b219441104eca77c2d5e0ba78 | 02e2fd820ddb452c56de2c2fb0efb8d982f89321 | /dog_class.py | f262a91d0f17828be6f209b4057f137836e6bda2 | [] | no_license | Ubaid97/python_classes | e051a6bb69404dd048ecd1bf01e320f74ae6e4c2 | 79add52c59fdbe8a92308d047123d21623e8177c | refs/heads/main | 2023-01-05T17:27:49.131687 | 2020-11-05T12:53:57 | 2020-11-05T12:53:57 | 310,016,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | dog_class.py | class Dog:
animal_kind = "canine"
# defining a class variable
# function within the class
def bark(self):
# self refers to the current class ie Dog
return "woof"
# To execute a class you have to create an instance of the class
fido = Dog()
# fido is an instance of the class Dog
# You can... |
eae730fc3a1736f98cf39bdc29ef96f34ce94f3c | e94b4283aaff494e155140364ea874955e259b90 | /silly.py | 51d6f569ad7dfe1468c1438174003672cdcc8030 | [] | no_license | phatboyle/programs | 420a0d3a10c787b0bde42d5269bda8a5a02d321d | 256b26cb6ae86cd3cbd64c32403b25de9b6a2b09 | refs/heads/master | 2020-06-05T15:33:31.597460 | 2013-06-01T18:29:21 | 2013-06-01T18:29:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | silly.py | import time
import random
def random_word(f):
wordlist = f.readlines()
index = len(wordlist)
index = index-1
nn = random.randint(0,index)
o = wordlist.pop(nn)
return o
nouns = open('nouns.txt', 'r')
a = open('a.txt', 'r')
verbs = open('verb_ph.txt', 'r')
adverbs = open('adverbs.txt', 'r')
time.s... |
22f678895de36f5d78b88d0785778cf76d9b1445 | 66912b0d82593e3a4e858b5801be52f3405109e3 | /skel/.config/nvim/plugged/sparkup/vim/ftplugin/html/sparkup.py | 0504c750ad60f51843ca91cceb1da3bd26eaa628 | [
"MIT"
] | permissive | harish2704/dotFiles | 57e8a18e97280979917af04da7d07bcd2572aea4 | 544641f8001381f9ea420c77ff4aa87bb0b28726 | refs/heads/master | 2023-07-07T12:35:24.396201 | 2023-06-28T11:51:53 | 2023-06-28T11:51:53 | 11,558,346 | 5 | 4 | null | 2023-09-10T17:02:00 | 2013-07-21T07:03:59 | PHP | UTF-8 | Python | false | false | 19 | py | sparkup.py | ../../../sparkup.py |
93f7aa9efba67a042c16b6601c490fd488f54301 | 11a0fab712b139bcba9e90f6acdc7597dff68dbb | /mestrado/ppgmcs/m07-elaboracao-de-dissertacao-i/projeto/codigo/teste1/.qt_for_python/rcc/source.py | 4d8f56b0f7dbff787d8f15ab7dd272284e3bf9dd | [] | no_license | fapers/MeusTreinamentos | 17ba096d518df533433ae2528b70d18717f3cf96 | 32a6b791b0c3dbb8b29ffd177597919e768b09b5 | refs/heads/master | 2023-06-04T14:00:37.847808 | 2021-06-28T02:37:11 | 2021-06-28T02:37:11 | 292,962,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608,661 | py | source.py | # Resource object code (Python 3)
# Created by: object code
# Created by: The Resource Compiler for Qt version 6.1.1
# WARNING! All changes made in this file will be lost!
from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x11\x22\
\x89\
PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
\x00\x00\x8c\x00\x00\x00\x8... |
76407ed60acf17b3a8fb09e61d8e3bc6d0580156 | 6ff95cd8a2d5f67673e378e461fbc7162af97226 | /session11/binary_search.py | b72047ea10b363b0b3f86bb4ec456a36a0a8df8f | [] | no_license | alastairng/mis3640 | 80c52a473afecc45d28693a6539cff490e24a789 | 3bb15fa4007a81249fb9a7181ad2ad907b4e90f4 | refs/heads/master | 2020-03-27T16:41:42.306924 | 2018-10-25T03:22:36 | 2018-10-25T03:22:36 | 146,800,422 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | binary_search.py | def binary_search(my_list, x):
low = 0
high = len(my_list) - 1
while low <= high:
mid = int((low + high) / 2)
if x == my_list[mid]:
return mid
elif x < my_list[mid]:
high = mid - 1
else:
low = mid + 1
my_list = [1, 2, 4, -100, -60000, 1... |
414e9446017f3fa5f5abd52f9768b4805c648908 | 3c60bd11ceacb1a90659eb2d7878023fc10b2c5a | /app/shared/utils.py | 252dfc3097770a832e7bf4ed8a0097e66b7ed8e0 | [] | no_license | joeljames/slacker-command-app | be4fc8d3cf8ec6edb4fd7ed61f5625d3e96a697f | 649047d38dd40403f85f758586ec4450330934b4 | refs/heads/master | 2020-12-24T19:04:12.598869 | 2016-04-14T19:06:36 | 2016-04-14T19:06:36 | 56,188,437 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | utils.py | import config
__all__ = [
'get_config',
]
def get_config(key, default=None):
"""
Get config from config module if exists,
return default value otherwise
"""
return getattr(config, key, default)
|
ba68a7699333541ae0563c31a63cb3fe84fd7605 | d4d89bfe844dba307030410957c22b22d0a3d92e | /python_code/abc137_c.py | 51a8faf5c5b896102b7063d20f9079336407f0f0 | [] | no_license | Adaachill/atcoder | 4dcb4435e0d9ca5c7363fe19f565e939ecfc056d | 22af74e80fec95e77ce4d137eba6c7cc7e490ab3 | refs/heads/master | 2020-03-26T04:45:29.468222 | 2019-08-16T12:22:52 | 2019-08-16T12:22:52 | 144,521,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | abc137_c.py | n = int(input())
s = [input() for _ in range(n)]
ans = 0
for i in range(n-1):
l = list(set(s[i]))
for j in range(n):
if i < j:
for k in range(len(l)):
if s[i].count(l[k]) != s[j].count(l[k]):
break
if k == len(l)-1:
ans += 1
print(ans)
|
d9d2b7f9d68ab5d33669ad800f9d0a88f277a265 | a7059edd10633c0e37782cb17e1b92f797356f9b | /common/src/stack/ws/command/add/api/group/perms/__init__.py | 41586e08e96f1f7ec1cc138c7c266dcb0221893b | [
"BSD-3-Clause"
] | permissive | circls/stacki | bc4b5a588d52b86a37c0f0a25bb4fcebb88806e4 | ef9212427f27eb2e63eb6c1f37027a481329e7ef | refs/heads/master | 2020-03-19T23:00:25.382080 | 2018-06-08T23:59:08 | 2018-06-08T23:59:08 | 136,989,243 | 0 | 1 | null | 2018-06-11T22:50:45 | 2018-06-11T22:50:45 | null | UTF-8 | Python | false | false | 1,239 | py | __init__.py | #
# @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
import os, sys
import stack.commands
import stack.django_env
from django.contrib.auth.models import Group
from stack.restapi.models import ... |
fa81c1bafa46ee8b353141f44861bd9bdbe0cf1e | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/pa3/sample/op_add-11.py | 079fa14dcc044e529d4071bf413b7cfcf8d32c1d | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18 | py | op_add-11.py | print($Exp + 100)
|
34d05a035139d458a2758d17dbd0e7e807ab90e7 | ca23a93a48672001def5ca133308c83fc6f88657 | /preprocessing/basics.py | afa152c67733dad8b020bd721f08f972735b975a | [] | no_license | ruteben/IN4325-Applied-NLP | 4ea93c60c1f15e87230bca92c0e8709a9e29a58b | d5aa8d60411ba14fcc04bd50d7288dd0e6515292 | refs/heads/master | 2020-04-29T17:59:49.047943 | 2019-04-08T20:51:33 | 2019-04-08T20:51:33 | 176,311,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,523 | py | basics.py | """This file contains all functions to extract the basic content related features"""
from nltk.corpus import wordnet as wn
# Note: wordnet corpus should be downloaded. In order to download it run: nltk.download()
def post_img(p):
"""Get the image of a post
:param p: post
:type p: dict
:return: imag... |
847984cf0c69e36c579ad0e2eb4bb31d058114a0 | 8817c48b882795a9c66b6f40eeb9558d98af5190 | /Week4/Permutations.py | 922bb6a6dac7d903914aa9830c7076975ee9398e | [] | no_license | JuanMBarba/WallBreakers | 313d5129ab22714b66bdcdcb5dda5818ea81cd4b | 985128f7665e944fac83b16cf03b22f8ee4410ab | refs/heads/master | 2020-05-19T03:06:56.576785 | 2019-06-23T22:47:02 | 2019-06-23T22:47:02 | 184,792,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | Permutations.py | class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
if nums == []:
return [[]]
result = []
for x in self.permute(nums[1:]):
for i in range(len(nums)):
result.append(x[:i] + [nums[0]] + x[i:])
... |
cdeacc408a2545ff2029936419aaba4fbc8a841d | 76f9732b4e42a613e73539ed6412c3097fe1cf0f | /week8/salariesPlot.py | 8926abb979aad14091bf9e91e7e6ee758cf82ecc | [] | no_license | pascalmcme/myprogramming | 1baffd706cbcdc31cecc1f1e36282064321af89f | 5da7a08dec962944d2aa1a5568afa113fec8a140 | refs/heads/main | 2023-03-26T03:32:17.432992 | 2021-03-22T14:09:56 | 2021-03-22T14:09:56 | 332,830,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 466 | py | salariesPlot.py | import numpy as np
import matplotlib.pyplot as plt #https://matplotlib.org/ for help
minsalary = 20000
maxsalary = 80000
entries = 100
np.random.seed(1)
salaries = np.random.randint(minsalary,maxsalary,entries)
np.random.seed(1)
age = np.random.randint(low = 21 , high = 65, size = entries)
plt.scatter(age,salari... |
81dcd3e3ee3a3cbf9271509c3e8cef76eb8faea6 | 2b1aad1049d8164438deb2b24cc8324fccfcc1c7 | /Live Face Tracker.py | 04b8480571b83f33c7f647ec41e6ab433b54a8d3 | [] | no_license | LuffyUchiha/Facial-Detection-and-Recognition | 011d1cc9eb046248b82cbe9861cebd30367a343b | 059c6741ae34c223e336fc916ca41510895451a1 | refs/heads/master | 2020-04-10T04:32:50.443514 | 2019-01-17T09:11:12 | 2019-01-17T09:11:12 | 160,801,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,948 | py | Live Face Tracker.py | import os
import numpy as np
import cv2
def draw_rect(img,rect):
(x,y,w,h)=rect
cv2.rectangle(img,(x,y),(x+w,y+h),(0,255,0),2)
def detect_face(img):
if img is not None:
im_cp=img.copy()
gray=cv2.cvtColor(im_cp,cv2.COLOR_BGR2GRAY)
face_cascade=cv2.CascadeClassifier('D:\\Python\\haarcascade_fro... |
a37ed61c7b4b9f3ff12f6d397c2dcc27b9051446 | 8627ea675e8b14c1f2f1ba91d69c517a25bb3c6e | /sudoku_AC3_algorithm/sudoku_AC3/main.py | a8d53d599c136aba951eff0c8168e8c62113e8fb | [] | no_license | waterloostar/waterloostar_python | 48453f8b772839c8be5d0d843ba16f6a3cfedf96 | 2ade6fc42ade65d222df2c720b69d00c780c4183 | refs/heads/master | 2021-06-26T07:29:20.320782 | 2017-09-14T20:25:07 | 2017-09-14T20:25:07 | 103,468,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,278 | py | main.py | """
-------------------------------------------------------
main.py
open file
close file
-------------------------------------------------------
Author: lingchi chen
ID:
Email: jackchen4work@gmail.com
__updated__ = "2016-11-09"
-------------------------------------------------------
"""
D = [1, 2, 3, 4, 5, 6, ... |
2c2afaef2cd13bf47564d322a07ff0ef80c736d5 | c090a494fcb0f0f02f2d432df902cde8e5eef70b | /memories/views_create.py | 566cf381fdd9bfa1360a790af0c31ee21be8bf00 | [] | no_license | daglundberg/djemember | 6147b7af4cc7ea2ace05c5a1fc4105a861d0622e | 1a7dde3c54b9fd888c670c52ad758b64fc533893 | refs/heads/master | 2022-02-17T19:29:50.734585 | 2019-09-15T02:29:26 | 2019-09-15T02:29:26 | 105,361,164 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,745 | py | views_create.py | from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect
from django.forms import formset_factory
from django.utils import timezone
from .models import Post, Picture
from .forms import TextForm, CommentForm, PictureForm, BasePictureFormS... |
6b62be62d83e6ca90867cc0c0e469897f7d07f59 | 45b191642dff3964d0b89de2875ce510773cff26 | /csScoreToPython.py | fc91513e5c9a0e98ca57c5419b7ba26fab9d65b9 | [] | no_license | khoeger/genCsdHRTFwithPython | 16b38647b6f837a6b78e1b841782665839e84578 | 673d7588a28e6273ae9854780ee2789a15965aca | refs/heads/master | 2021-09-12T22:20:51.859916 | 2018-04-22T00:11:51 | 2018-04-22T00:11:51 | 126,050,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | csScoreToPython.py | #readFileName = "cabs_CsScore_v1.cs"
def retrieveLineInfo(line):
return(line.split())
def readScore(fileName):
pieceArray = []
with open(fileName) as f:
for line in f:
#line = f.readline()
lineParts=retrieveLineInfo(line)
pieceArray.append(lineParts[1:])
f.cl... |
b8f135624125be518b52a9f07fb6a74ce5060ed0 | c10074840c24bc64b7e8fa095e65b002f4dea982 | /app/nlp/rake.py | 5c97597eb91835e85c1415d50500c1e48c634f8a | [] | no_license | davidmaignan/giftsmarts | cd1dc4d41288a0410c51334277b5e62fdb90b870 | 190345c231a3db47610fb204f10e6500b2d94592 | refs/heads/master | 2021-01-21T02:41:55.857267 | 2016-05-29T14:46:42 | 2016-05-29T14:46:42 | 56,160,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | rake.py | from app.vendor.rake import Rake
from app.config.config import config
rake_runner = Rake(config["STOPLIST"])
def run(text):
return rake_runner.run(text)
|
e915405f9df389270df2822b5c5e9ae636a6bd25 | f49221a24bd655425ad567eeb9003bec64237ebf | /Fibonacci_number.py | a1194d29df6cf33b26489fb0f04151b687ff2dd1 | [] | no_license | mustafa0624/projects_of_python | e049982c9f4941013037f52592882f7158d8ff10 | f7d714743969f28f7c99e510fbd92ff515c07eb3 | refs/heads/master | 2022-11-25T01:04:11.883666 | 2020-07-27T19:40:39 | 2020-07-27T19:40:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | Fibonacci_number.py | list = []
for i in range(-2,8):
if i < 0:
list.append(1)
else:
list.append(list[i] + list[i+1])
print(list) |
1e5d212a7ad7e56b38139c810f8c9c759db56ff4 | 9fa177f0cef68ba4d708b08eec3d1ea2190b1e35 | /processing.py | 411b6645784ce2272019b8391c1e21106e108593 | [] | no_license | mallibiswas/reports-and-dings | c3aeb73863dfc908d407a1fb6a6288f3be408753 | 3fa2ac8733832fc5c50436b7708230994642bfa4 | refs/heads/master | 2020-03-16T12:28:14.757137 | 2018-05-08T21:33:57 | 2018-05-08T21:33:57 | 132,667,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,987 | py | processing.py | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 13 13:06:47 2018
@author: mallinath.biswas
"""
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 10 14:09:30 2018
@author: mallinath.biswas
"""
#!/anaconda3/bin/python3.5
# Note: Run using Python 3.x
#
import pandas as pd
import numpy as np
from fun... |
8f5d55abe14fbc88db7c8e7db1c3483ac4fb30c7 | 87f28dd06eae45c629485f572d07206b4b7ecbec | /APIReactProject/api/views.py | 0322c14f2648a3eb087030248c6c52c079452f44 | [] | no_license | giaphien363/React-Django | 53bae786dca4a691929ebf82eaf4c6d418a74083 | 1e28a9072781bd9af96ffd3cd69a3c76923ce97d | refs/heads/master | 2023-05-31T15:13:26.599070 | 2021-06-22T06:15:04 | 2021-06-22T06:15:04 | 379,160,894 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,278 | py | views.py | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, JsonResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import api_view
from rest_framework.parsers import JSONParser
from rest_framework.response import Response
from rest_framework.vie... |
07b694a052c3e992e569629eedd988dbd17221cf | c6053ad14e9a9161128ab43ced5604d801ba616d | /Lemon/Python_Base/Lesson4_20181102/Lesson4_dictionary_20181102.py | c5edd9a942ad510886cf34a046d7c4f94d4a8167 | [] | no_license | HesterXu/Home | 0f6bdace39f15e8be26031f88248f2febf33954d | ef8fa0becb687b7b6f73a7167bdde562b8c539be | refs/heads/master | 2020-04-04T00:56:35.183580 | 2018-12-25T02:48:51 | 2018-12-25T02:49:05 | 155,662,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | Lesson4_dictionary_20181102.py | # -*- coding: utf-8 -*-
# @Time : 2018/11/4/17:07
# @Author : Hester Xu
# Email : xuruizhu@yeah.net
# @File : Lesson4_dictionary_20181102.py
# @Software : PyCharm
# input: 从控制台获取一个数据,但是这个数据都是字符串类型
# data = input("请输入一个数据:")
# print(data)
# print("类型:",type(data))
# 1 字典 --
# 2 空字典:d={}
# 3 key:value 键值... |
4eeb403f30d106f773dba40961e71d252b31d20d | 4411267e974fdbc7fae9fb5322cec164a8ed3ff6 | /src/events/validations/IsRequired.py | 2c76b75f8db77c88584ffd6c347bcae53e7a31a3 | [] | no_license | fdmsantos/moving-average | 3eee77d7f164c11d5c8aaaad327a9f18603c6391 | 3cff9c76f3abfb34f1ef7dfaf553c516cd050410 | refs/heads/master | 2020-05-30T00:10:37.901040 | 2019-06-03T16:11:17 | 2019-06-03T16:11:17 | 189,453,740 | 0 | 0 | null | 2019-05-31T18:50:18 | 2019-05-30T17:17:22 | Python | UTF-8 | Python | false | false | 281 | py | IsRequired.py | from src.events.validations.RuleAbstract import RuleAbstract
class IsRequired(RuleAbstract):
def handle_request(self):
if self.field not in self.event:
return False
return self._successor.handle_request() if self._successor is not None else True
|
1bf85686d8b991ca65be44ad87fb803428e0a11e | 0f07071a881feab5a95969a4445d7b7258438e7b | /DeepModel.py | a35432a7f765e3942eac62c663b1eabbf2ce6826 | [] | no_license | thyaravind/EnergyInnovations-ML | 5e1d9acc08952b3a1f25157cad6c7f786c8e50cf | 595e982cb0209c6a7fa7ba1db06d307615032f09 | refs/heads/master | 2023-01-10T09:59:45.199922 | 2020-10-29T16:57:20 | 2020-10-29T16:57:20 | 291,561,994 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,951 | py | DeepModel.py | import numpy as np
import pandas as pd
import pickle
from sklearn.preprocessing import MinMaxScaler
import keras
from keras.models import Sequential
from keras.layers import *
from keras.wrappers.scikit_learn import KerasClassifier
from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_... |
6c8f88282914ef26f1523d1d2ead9ffec9f190c3 | d23ffc25cf61b2dd7aebd9747d1c3676d9d9115f | /v1/zz.py | 446e4daee802faf813d073f4a7adadbc20e51524 | [] | no_license | wrfly/captcha_verify | 5060804c9e6cc7602fce747b055e3f2cf9100f8d | f04bf007e2c65c5acb7851ab63ce3bd1f3bb1dbf | refs/heads/master | 2021-01-10T02:20:25.340390 | 2016-04-11T08:44:16 | 2016-04-11T08:44:16 | 55,893,475 | 30 | 15 | null | null | null | null | UTF-8 | Python | false | false | 4,201 | py | zz.py | # coding=utf-8
import Image
import ImageEnhance
import ImageFilter
import sys
import os
from pytesseract import *
pics = os.walk('test').next()[2]
class captcha:
"""docstring for captcha"""
def __init__(self, image):
self.imgname = image
self.img = Image.open(image)
self.size = self.... |
ef9dd9fa08bac351c5c54514267b0bda706029e9 | 705a31cbc802b6245f8b7ff6919da6eb269b0c60 | /tests/__init__.py | 1f5f592543c6a895d8cfa25b62d15edfae02778a | [] | no_license | wookay/motiontools | e0c667e9a9040d772e82c2563351e37ca2778c42 | acb33dfb74137ee398595cfc33232042ae707a4c | refs/heads/master | 2022-12-15T09:13:37.071011 | 2020-09-17T20:58:58 | 2020-09-17T20:58:58 | 272,008,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 259 | py | __init__.py | import os.path
import unittest
def get_tests():
return full_suite()
def full_suite():
from .motiontools import MotionToolsTestCase
suite = unittest.TestLoader().loadTestsFromTestCase(MotionToolsTestCase)
return unittest.TestSuite([suite])
|
c1e649b73c207ea08235d295c28daad8c91398a7 | 62fcf7dad61d8fbfd9bd37cdf2da936388f27209 | /professional-python/part-1/Generators/generators-within-generators.py | 3e195b82ac2d89f014851e5ce0e3356d9c194e56 | [] | no_license | manojkumar-github/books | 5490bd9702618f6643b87637faa4bb92993b8054 | 13d07eda2d1a2f24d5427c3446bd44dbcf02cfb9 | refs/heads/master | 2020-03-20T18:50:39.031533 | 2018-08-16T01:57:28 | 2018-08-16T01:57:28 | 137,607,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,059 | py | generators-within-generators.py | """
Python 3.3 introduces the new "yield from" statement to provide straightforward way for
a generator to call out to other generators
"""
def gen1():
yield 'foo'
yield 'bar'
def gen2():
yield 'spam'
yield 'eggs'
"""
For python versions < 3.3
"""
def full_gen():
for word in gen1():
yiel... |
263a853f33eb9724101ca87f12b914282dea9981 | 623548590e8ee1a07126b7c2475f72fe4b1db033 | /company/apps/users/adminx.py | 47eaf333594970eb1a0576ef2e01b7919606d412 | [] | no_license | chengming1993722/company | 3cbe376875cb087890c5d4fc5cd65bd192282b3e | 46b23349721257670dc40e36c5afdb1c9f89d04f | refs/heads/master | 2021-08-11T22:38:45.490611 | 2017-11-14T06:03:21 | 2017-11-14T06:03:21 | 110,648,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | adminx.py | import xadmin
from .models import EmailVerifyRecord,Banner
from xadmin import views
class EmailVerifyRecordAdmin(object):
pass
class BannerAdmin(object):
list_display=('title','url','index')
class BaseSetting(object):
enable_themes=True
user_bootswatch=True
#设置xadmin页面标题和页脚
class GlobalSetting(objec... |
ae38995d153deed2e6049b7b65fb5f28dfcef470 | 73568bbf1915fce9f7ac8c39cb9e5a08eae3e193 | /remoto/backends/__init__.py | 0332274d96ec3582366eb6e053e1419fc4fd40fb | [
"MIT"
] | permissive | alfredodeza/remoto | 70d82f4a740a2b425aae4a6070441f4033f62866 | b51ce4bd02123f012e4740c54f09ae5dc1fec3dd | refs/heads/master | 2022-08-11T14:12:15.489601 | 2022-07-31T18:18:05 | 2022-07-31T18:18:05 | 12,590,140 | 24 | 24 | MIT | 2021-09-03T17:52:34 | 2013-09-04T12:26:29 | Python | UTF-8 | Python | false | false | 11,528 | py | __init__.py | import inspect
import json
import socket
import sys
import execnet
import logging
from remoto.process import check
class BaseConnection(object):
"""
Base class for Connection objects. Provides a generic interface to execnet
for setting up the connection
"""
executable = ''
remote_import_system... |
55c9fe8caf1983f22d5a752574f590fa129e8017 | 6110288c46c7436c58c4ca6987ebb8d2e5452904 | /总结/图片程序.py | f1176613bc97efc53c456b9539e045eb7164d6a2 | [] | no_license | liuyy6/python | f87fca456b99a2460afdba9b7a1b3896a88295a4 | a05b1e8d425b8271cc7ab66c2baa99dc5fca94dd | refs/heads/master | 2020-04-10T04:37:05.900484 | 2018-12-08T08:11:35 | 2018-12-08T08:11:35 | 160,803,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | 图片程序.py | def pin():
print('wqeqwwqe')
from tkinter import *
from tkinter import messagebox
from PIL import Image
from PIL import ImageTk
window = Tk() #创建一个窗口
window.title('爱你吆') #定义窗口标题
window.geometry('400x400+800+200') #定义窗口大小 窗口显示位置
# window.protocol('WM_DELETE_WINDOW', pin) #摧毁窗口,引到另一个函数命令
window.protocol(... |
11045cffc6d47902be7236e1d684422317f2c5f9 | d41456d49124025f97c1bce47112e9a58d81789d | /conjureup/api/models.py | 6976179bbe854176baccfafcd7acffa7a0640355 | [
"MIT"
] | permissive | frankmalcolmkembery/conjure-up | 13bad0d4016f72f8efd1f84a73adc9b3c7f5c3f3 | 891f089dbaa0de43c737aed587d1871612dd39a7 | refs/heads/master | 2020-05-30T13:57:00.156316 | 2016-08-30T22:43:42 | 2016-08-30T22:43:42 | 67,026,271 | 1 | 1 | null | 2016-08-31T10:04:24 | 2016-08-31T10:04:24 | null | UTF-8 | Python | false | false | 949 | py | models.py | """ Interfaces to Juju API ModelManager """
from conjureup import juju
@juju.requires_login
def list_models(user='user-admin'):
""" Lists Juju Models
Arguments:
user: Name of user to list models for.
Returns:
Dictionary of known Juju Models (default: user-admin)
"""
models = juju.CLIENT... |
7af0566161c909457d40d3856434f1fb1e800aab | c0d01ab811d3417eae29eec26a78b8b404d07dc9 | /Tracking/oldvid.py | 0ee6fa141411adebc678425d60f41873b81131f2 | [] | no_license | danhan52/facial-recognition | 3d5fcc2d021d6642483a6535a4b1326dc60d0375 | 031bada8344447eb436a14ee05cd708b7f4f52f3 | refs/heads/master | 2016-08-11T13:56:14.577028 | 2015-03-15T19:50:41 | 2015-03-15T19:50:41 | 49,789,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,776 | py | oldvid.py | import math
import datetime as dt
import cv2
import os
from face import Face
class Video:
def __init__(self, vidSource, variableList=[], showWindow=True):
self.vidcap = cv2.VideoCapture(vidSource)
self.cascade = cv2.CascadeClassifier("face_cascade2.xml")
self.visibleFaceList = [] # contains all Face objects wi... |
aea196566bbbe9d37bf03b9b17a4062659a27bb6 | 47e5d8e2bdf0ae48d42ba8777761ff0f11de1edd | /TestCase/webCase/case_user_info.py | 6336b307a716084ec914caef23974b3712a9472a | [] | no_license | hi-noikiy/apiTest | 44138bd8783bb1eed71939b4e7b93cd951ef2ea5 | c777e3392630e6768c7cb14eae2793da53bace10 | refs/heads/master | 2020-03-18T13:42:28.898333 | 2018-04-21T09:32:57 | 2018-04-21T09:32:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,383 | py | case_user_info.py | import unittest
from common.ReqLogin import req
import os
import yaml
from common import util
from TestCase.runnerBase import TestInterfaceCase
import paramunittest
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
def getYam(homeyaml):
try:
with open(homeyaml, encoding='ut... |
c2cf74893c7f7515a95141bb10be6a446b45a0cc | c54aaa47bdf6f5a8191a9a9dd53bce10f86611f0 | /wrapper.py | f75d3e65fe61401461543eebe4623d4387170193 | [] | no_license | stefanknegt/CIProject | 9a954098bd7677cef7846d1505f9bb73b684a6e1 | d83217cf91c95a4afd5f613675cfa5d4db9a9589 | refs/heads/master | 2021-03-27T19:51:57.288242 | 2018-11-03T12:07:52 | 2018-11-03T12:07:52 | 108,977,497 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py | wrapper.py | import os
import time
#if __name__ == "__main__":
# os.system('xterm -e "pwd ; cd ~ ; torcs -r ~/quickrace.xml ; echo press RETURN to close this window ; read" &') # delete the echo and the read to don't stop the process and make it run quickly
# os.system('xterm -e "pwd ; ./start.sh ; echo press RETURN to close... |
65da68d33aa382ed6deeff3c66a063ee299c2567 | f3ccac66b2f1300cc0c13428bd5edc2b8b5a128e | /python/grtsml.py | 3d12627bdb5ee4d3e55e71ee09be9776bd2ef209 | [] | no_license | serasaheera/ICT-CALICUT | b9b9af8f379592ce4de554fa885daa13e68692ef | efbb01a5883c16c78ad6fcce51712e1715de09b2 | refs/heads/master | 2020-05-01T15:43:37.463986 | 2019-04-12T12:35:02 | 2019-04-12T12:35:02 | 177,553,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | grtsml.py | a=[1,2,3,4,5]
max=0
for i in a:
if i>=max:
max=i
elif i<=min:
min=i
print max
print min
|
d6f8ec0fd8be0fa7019a84af47d08ab8b5b32d92 | 86627627e41b003377525a24a1dd812f19c69263 | /resolwe/flow/serializers/collection.py | f6ea5acbac10f59cdc40a8af4820a33d9aa71b30 | [
"Apache-2.0"
] | permissive | genialis/resolwe | 573c94d501fd39363f51aea3a6c26c196eeedf1c | 25c0c45235ef37beb45c1af4c917fbbae6282016 | refs/heads/master | 2023-08-31T10:24:28.130289 | 2023-08-22T11:43:01 | 2023-08-22T11:43:01 | 33,678,988 | 35 | 29 | Apache-2.0 | 2023-09-14T15:08:46 | 2015-04-09T16:07:20 | Python | UTF-8 | Python | false | false | 4,013 | py | collection.py | """Resolwe collection serializer."""
import logging
from rest_framework import serializers
from resolwe.flow.models import Collection, Data, DescriptorSchema
from resolwe.rest.fields import ProjectableJSONField
from .base import ResolweBaseSerializer
from .descriptor import DescriptorSchemaSerializer
from .fields im... |
63f0fd00820cea481c8ad1ef518c8578728eafa5 | b4630d559274f7d1513c394482c6cab6d02bfc49 | /add_background.py | b6e6136f1258b18249220fadcfe56c2c6a11e079 | [] | no_license | ddxgod/PCA-Image-Stacking | 6178f19c694d413f16297a8cd296fc3a437e6082 | 8b2256316e562d46f4c35960b1b7f9406e7ba555 | refs/heads/master | 2023-08-19T06:24:29.236396 | 2021-10-08T05:08:41 | 2021-10-08T05:08:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,579 | py | add_background.py | import numpy as np
import scipy as sp
from scipy import interpolate
from astropy.io import fits
from astropy.stats import sigma_clipped_stats
from astropy.stats import mad_std
from astropy.table import Table
from astropy.cosmology import WMAP9 as cosmo
import astropy.units as u
import photutils
from photutils import DA... |
88b5e3afe418a7a4d838d03c92dbcf2265314b81 | 01d3192d00335b1bb707b53900b4052fd5ce813c | /apps/lotes/views.py | 31208c00754e99940d9acace5cca6c1c770f5bde | [] | no_license | carloscba/ndvi-map | 01e57f6722abae85b609e8fd737e6d373396a3c5 | fb121637d408da0528980ae143af94343c2932ae | refs/heads/master | 2021-01-19T08:29:07.843421 | 2017-07-14T22:40:24 | 2017-07-14T22:40:24 | 87,635,274 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | views.py | from django.shortcuts import render
from rest_framework.response import Response
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.authtoken.views ... |
5029a0bd4ff212364fa942ccf32686c6e1bf95ac | 101ab2b4c6ef10a24b55f0e1dafb83a989d90b96 | /run.py | 354a632b2c5c5ab2abe4448dd86b82dcddabe60f | [] | no_license | caio-cacador/OpenDoorWithFaceRecognition | bfff5bd5feb12ae3643f8bd4beadfbe8e51901a0 | e1bd6953d29ab0780abb6cbbaf74aacc96875c64 | refs/heads/master | 2022-11-16T23:43:52.367190 | 2020-07-16T01:04:50 | 2020-07-16T01:04:50 | 277,304,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,516 | py | run.py | import ujson as ujson
from OpenDoorWithFaceRecognition.arduino.arduino import Arduino
from OpenDoorWithFaceRecognition.face_recognition.recognition import Recognition
from time import sleep
from OpenDoorWithFaceRecognition.telegram.telegram import Telegram
from OpenDoorWithFaceRecognition.video.camera import Camera
i... |
4bf0a6165e873c3fc05964aca3cda7d1ff3e1464 | d492fc672ba6aa8769f37fecc5c143b4f9e4e84c | /old_stuff/masterOOScript.py | 9dceb12b9b07158a70259b46592533d5cd27f75c | [] | no_license | brendobendo/DSI-Religion-2017 | 1226b83cfcc17fd0f1c93f4ec54724e0ef3ed231 | 42ea057bdb34d100a0c65b0015cfc638c01262b3 | refs/heads/master | 2020-12-03T02:17:45.213330 | 2017-05-11T13:53:07 | 2017-05-11T13:53:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,255 | py | masterOOScript.py | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 19 16:14:43 2016
@author: nmvenuti
"""
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 2 15:23:11 2016
@author: nmvenuti
"""
import time
start=time.time()
import sys, os
os.chdir('./github/nmvenuti/DSI_Religion/')
#from joblib import Parallel, delayed
#import multiproc... |
9f36eb080545935eaaf74a58af081efc9894139f | 49e02c769d57f689ebeda9582b37104029e63e35 | /python/word-count/word_count.py | 3320ecf99e6c71bc2671f1bae196f94e3db65a67 | [] | no_license | feliperoveran/exercism | cb33f6e281564720390d3b9438deb33fb5bd5f73 | 1d5153ae5132a9f77f8d3f6c9afcc90076306839 | refs/heads/master | 2021-05-03T11:12:48.731187 | 2018-07-21T22:35:03 | 2018-07-21T22:35:03 | 120,546,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | word_count.py | from collections import Counter
import re
def word_count(phrase):
regex = re.compile('([0-9a-zA-Z]+\'?[0-9a-zA-Z]+|\d)')
result = regex.findall(phrase.lower())
return dict(Counter(result))
|
2e110c2e05ce33f87ae7393fcbf2341689acd1a5 | 688660218a3a90d7d0bb3c66eb58aaa34d8af52e | /intent/interfaces/mallet_crf.py | 936a611ad25ccef91404da6bf96e81f6c63189d9 | [
"MIT"
] | permissive | rgeorgi/intent | ff88d1cb9b9c9ee25b2d68a74426de21f0849304 | b1d89e7bce684bd8bc53f937a88f19d6550d6927 | refs/heads/master | 2020-04-12T06:19:49.524468 | 2018-04-13T19:03:25 | 2018-04-13T19:03:25 | 46,454,576 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,485 | py | mallet_crf.py | '''
Created on Apr 4, 2014
@author: rgeorgi
'''
# Global imports ---------------------------------------------------------------
import argparse, os, sys, re
import subprocess as sub
# Internal Imports -------------------------------------------------------------
from intent.utils.argutils import existsfile
from int... |
f78f840abe518632f9ab95569c9956d583d6a16e | 80fecf605a2b62132e47200d0c6b71a26664ee2f | /uncertainty2/src/ModelCalibration/GA_f.py | 8a64d73064f1f25970af7f2d0f70a82f5007ec84 | [] | no_license | WeaponZhang/uncertainty | 3c15732e803afb9cf3e3c39dcbf9439c25ba44fe | ffed62399e1e3641dfdf0d773570ec77fb173b25 | refs/heads/master | 2020-03-18T15:38:40.746554 | 2018-05-28T15:22:49 | 2018-05-28T15:22:49 | 134,920,097 | 0 | 0 | null | 2018-05-26T01:42:34 | 2018-05-26T01:42:34 | null | UTF-8 | Python | false | false | 6,125 | py | GA_f.py | # -*- coding: utf-8 -*-
import double_loop
import numpy
import matplotlib.pyplot as plt
import build_meta
avg_dif = list()
max_dif = list()
min_dif = list()
cmp_dif = list()
best_mat = 1
sym = 0
cross_num = 0
mut_num = 0
def GA_1(cog_p, svr):
shape_v = cog_p.shape
population_num = shape_v[0]
output_l = li... |
0cf46308c54ed8c23a55635ce5b6e405b5ea3c6c | a9efc91ffaec4009d0f10c15e9d427381b86239a | /pgextra3.py | 2f168379036a4b394c55fc7fdf387847cdf993ca | [] | no_license | 0siris7/LP3THW | 05f27da62ca0bde768bb3fc7aeea681e6bab9254 | 0f3736b1ad09f9e18d3606e1357b54bab08d1ef3 | refs/heads/master | 2020-06-26T12:03:24.201099 | 2019-07-30T09:44:00 | 2019-07-30T09:44:00 | 199,625,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | pgextra3.py | from sys import argv
a,b = argv
print(f"we got {a} and {b}")
x = int(input("enter a number:"))
y = float(input("enter a float number:"))
z= x+y
print("the result of {} and {} is {} ".format(x,y,z)) |
2863212d19b925c510e903dc7b92223c5ebd892e | a5f0c1bf79fb6d567509a317cc0527b856505834 | /show_different_texp.py | cc8ca3359288073c4eee0a17793ac38500e48950 | [] | no_license | lbrl/tsukuba2017aug | 17538774244c95c070e9e58ff02612493007f3ac | 4c7a4ca852fb4163fa5b16c08a869a616b0dfa49 | refs/heads/master | 2021-07-03T09:59:03.241399 | 2017-09-25T08:15:19 | 2017-09-25T08:15:19 | 104,720,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,771 | py | show_different_texp.py | #! /usr/bin/env python
# from ROOT import RooFit as rf
# from ROOT import *
import ROOT as r
import sys
import os
import glob
# import math as m
# import datetime
import numpy as np
# from array import array
# import re
# import matplotlib as ml
# import matplotlib.pyplot as plt
# from PIL import Image
# R.gSystem.Lo... |
11e17203a8ea0f0903032c2639dffcf72a099c2c | b11236690278ea94978495f69af779ca5a81bb8d | /breakfast/breakfast_from_fv.old.py | 146c4a4bed558355739a6c49087f16118cf54ffa | [] | no_license | aclapes/breakfast-lstmcrf | f37fd216ad210c03bb40341bd8595237f481c9b0 | 86c260778739bdbad5027d454a2c1dcf9af04a17 | refs/heads/master | 2021-01-19T17:30:54.049832 | 2017-11-28T13:14:14 | 2017-11-28T13:14:14 | 101,065,273 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,771 | py | breakfast_from_fv.old.py | import h5py
import argparse
import json
import os
import numpy as np
import time
def import_labels(f):
''' Read from a file all the labels from it '''
lines = f.readlines()
labels = []
i = 0
for l in lines:
t = l.split('\t')
assert int(t[0]) == i
label = t[1].split('\n')[0]
... |
46141a0a36419a9ff235b948d54f9fa5f172b1c7 | 74c5eda86c7ec63aaf57dbebdab270aa0769af3b | /blog/views.py | f7213cb004b7bef8dd4456a8f133eaef04571967 | [] | no_license | 5l1v3r1/my-first-project-django | 95d7b60f8995a6182353d46718d80a280f569716 | ec27eb2549287ebd1e72a1bcd0caba9e91a31c36 | refs/heads/master | 2021-05-25T19:06:50.732602 | 2019-06-14T11:38:30 | 2019-06-14T11:38:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,675 | py | views.py | from django.core import serializers
from django.db.models import Q
from django.http import HttpResponseNotFound, HttpResponse, JsonResponse
from django.shortcuts import render
from account.models import *
# Create your views here.
def index_view(request):
auth = False
if request.user.is_authenticated:
... |
f17ada6518ac1c426d2eebc7a1c667ae5e89310a | 323a498338c34b9595dc05eb803935913e3f1b4e | /Code/Data_preprocessing_&_training.py | 84e94303a4881b029412d916f762c045f1217e40 | [] | no_license | osman-95/Supermarket_Sales_Forecasting | b1ffb4556c2bb0bf846b2fcfdd19ecaeb75dd9cc | 5586b9605cba725f41149be8037f1e158be45c13 | refs/heads/main | 2023-08-30T05:46:55.285634 | 2021-11-12T02:28:30 | 2021-11-12T02:28:30 | 427,205,256 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,029 | py | Data_preprocessing_&_training.py | ## Performing data preprocessing, cleaning and training the models with respect to set of Machine learning Algorithms
#importing prerequisite libraries
import pandas as pd
import numpy as np
from sklearn import preprocessing
from sklearn.feature_selection import RFE
from sklearn.model_selection import train_test_... |
eec2179d6cf208a99d337f119e260253ba3bae88 | 372fa71721f52d91ddfda42df8f8b0f54a69cec8 | /utils/eval.py | 03485711f009417982bf789faad624574d6bc0bb | [] | no_license | 590shun/video_summarizer | 5cd5b84ff80dca4ee2ec67c113c554fc9d2bd3ce | 78fdcc90f0fb4264cec03e09aeab79f52f4a12f7 | refs/heads/main | 2023-08-16T02:51:44.120860 | 2021-09-21T01:27:00 | 2021-09-21T01:27:00 | 378,163,371 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,624 | py | eval.py | import os
import sys
import math
import numpy as np
from scipy import stats
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from utils.knapsack import knapsack_ortools
"""
From original implementations of Kaiyang Zhou and Jiri Fajtl
https://github.com/KaiyangZhou/pytorch-vsumm-reinforce
ht... |
f529e7c6de9ba4fbd2ac821e3ccb572f286408ea | 144f586b0c73f121b40bcb4ee70ea1e4d9f059b1 | /question1_3.py | af7dcf00bcda14c685575909d45652623811cd11 | [] | no_license | ebegeti/LeetCode-problems | 2d49dff16ee78283e77566652569aeb5dd99a6d9 | 1d5628f51adce49b295efc514325eeb0489e2602 | refs/heads/main | 2023-04-21T18:14:59.369851 | 2021-05-13T08:50:56 | 2021-05-13T08:50:56 | 366,947,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | question1_3.py | #Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An extra copy of the array is not.
#FOLLOW UP
#Write the test cases for this method.
def removeDuplicates(st='abc'):
# String length cannot be... |
25b3bc2e20684df2c21d574e8acc499666e28efd | 07907a0ae73ee7b3b04665cfa28e93ddcccd95fd | /src/features/spect.py | 24402e94ee68951d857eefd6bbd9401ee027ee97 | [] | no_license | markanderson96/birdGAN | 00a191fc24a26b7baa3c43bd28cccfc72c72d8c8 | fd3290651fdfbf82b58a3ab1793d43c95974009e | refs/heads/master | 2023-06-07T14:48:20.677104 | 2021-07-05T17:31:32 | 2021-07-05T17:31:32 | 380,746,144 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,072 | py | spect.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
import torchaudio
import torchaudio.transforms as T
from omegaconf import DictConfig
class Spectrogram(nn.Module):
def __init__(
self,
conf: DictConfig
) -> None:
super().__init__()
self.... |
5a34ea31d4a27a93e5b37e0d5b3921eb5f3b60ca | 8b9c26a300b550cc98ba7c576da693b536895708 | /app/views/__init__.py | 35f7550dc2077c171cee82c68a2aba3f844d323a | [] | no_license | Honza-m/near-you | ba9d758ae5cd460f3151cd5daa8cfc2e1f27cd74 | b261a9fa1e1dbc040c08a24a4c81cfe368f29b5a | refs/heads/master | 2022-12-13T02:00:18.277750 | 2018-04-12T23:10:22 | 2018-04-12T23:10:22 | 129,313,111 | 0 | 0 | null | 2022-12-08T00:59:52 | 2018-04-12T21:28:12 | HTML | UTF-8 | Python | false | false | 28 | py | __init__.py | from . import frontend, api
|
8d244b6d6254ed30696ccfd4e79cbe6ec4326f28 | 10ca8a1d04eb2d95b5153725366d1483a21ce085 | /src/svviz/demo.py | 8eb1fcbe62c72799bbe00c3a4ea70cf168ae0bbe | [
"MIT"
] | permissive | apregier/svviz | b5c04620d47eee4b92e61c0549294c07ace06e2b | e3e0cbee3eda104199f70142d0fc9264d613f1f7 | refs/heads/master | 2021-01-17T18:32:56.835803 | 2015-10-29T21:49:24 | 2015-10-29T21:49:24 | 45,568,368 | 1 | 0 | null | 2015-11-04T21:24:32 | 2015-11-04T21:24:32 | null | UTF-8 | Python | false | false | 2,919 | py | demo.py | import logging
import os
import requests
import shutil
import sys
import tempfile
# import urllib
import zipfile
logging.getLogger("requests").setLevel(logging.WARNING)
def downloadWithProgress(link, outpath):
print "Downloading %s" % link
response = requests.get(link, stream=True)
total_length = response... |
6fd6364f536ecad9c60cbd3fc86c3ca83bce7f15 | 3bb3e213670000386a0b49cb1f939ab3d1126507 | /Prova 1 - Atividade 2/principal_grad_newton_sem_busca_alpha.py | 3cf29c4a2488669b663c1c882dd576536243674f | [] | no_license | hugohvf/SistemasInteligentes | 3698c1386812934fec3e144675f93072fb179d71 | e9c937a5bd76172b7b99b89fc13671e873e9e235 | refs/heads/main | 2023-02-08T17:58:41.627518 | 2020-12-20T15:19:46 | 2020-12-20T15:19:46 | 306,438,298 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,213 | py | principal_grad_newton_sem_busca_alpha.py | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 25 08:57:38 2019
@author: rkrummen
"""
import numpy as np
import matplotlib.pyplot as plt
#import matplotlib.cm as cm
from math import exp
from numpy import linalg as LA
#import calc_d
# ======= funcoes ===============
# Função não-linear quadrática
... |
885615218eed04e8a4011dcedcc856cac1a503f1 | 3293569b09b717a6dbe5c8e0d6c12f91d163a3cf | /arviz/tests/test_plots.py | deca38515985f6dc5503c34a34a91454f5a88b0b | [
"Apache-2.0"
] | permissive | afcarl/arviz | 470db338509eccd61a9bdd9701f7f3c5cf11d213 | 85a54579f051ff5d764f8c9a292a7da567c8ec3f | refs/heads/master | 2020-03-16T12:33:08.548339 | 2018-05-07T18:38:35 | 2018-05-07T18:38:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,023 | py | test_plots.py | from pandas import DataFrame
import numpy as np
import pymc3 as pm
from pytest import raises
from ..plots import (densityplot, traceplot, energyplot, posteriorplot, autocorrplot, forestplot,
parallelplot, pairplot, jointplot)
J = 8
y = np.asarray([28., 8., -3., 7., -1., 1., 18., 12.])
sigma = ... |
ad089f63253652361d578bed5a3f639e5d0754ed | 0b1fd71f50bde5d15c8a66bd0ff7efc84d66e791 | /SimpleTrading/gold_s_p_volatility.py | a1528dedda4d7181d887a3b472a16dfd45474f7e | [
"MIT"
] | permissive | kumars99/Quantiacs | a43d94a72212689b6e9b36b3be4e72fe174fe4cf | 95ea9443744c5a2e5268fa18f5e38928a6452d5d | refs/heads/master | 2020-04-11T02:47:17.329599 | 2018-11-28T13:03:03 | 2018-11-28T13:03:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,071 | py | gold_s_p_volatility.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon May 22 14:15:48 2017
@author: edwardpuccio
"""
# This algo buys and sell gold and the sp500 during price moves in the
# sp500 greater tham 2 standard devaitions, 3 standard deviations and 4
# standard deviations
import numpy
def myTradingSystem(DATE,... |
9681b8d2a8bedef9cf4c684b0540e29856a155db | 306e399a50e027cf83693544f2a9072129834eb0 | /src/receipt_certify.py | 54adef68283bae5c8419fc5e55144e177ddbc6e4 | [] | no_license | rtilder/receipt-key-certifier | 37e1a8a9220e86253f1e9cf460abb318ef40f45e | c76226a5c02a9b7cec6ff781363fb903a7be44a3 | refs/heads/master | 2021-01-18T04:25:31.284640 | 2012-04-09T22:23:25 | 2012-04-09T22:23:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | receipt_certify.py | import crypto
import logging
import cStringIO
# Expects a receipt as a serialized string
def certify_receipt(aReceipt):
# Part one of the certified receipt is
# our ephemeral key's certificate
result = cStringIO.StringIO()
result.write(crypto.get_certificate())
# Delimiter:
result.write("~")
# Part two of t... |
a00e670567d6d28c682472be32c61a5cd225e59e | 3a7af2534ba693ede2395e37f77e94a54fdfb5e9 | /train.py | 4c67ea1a03d155909b7046b5ef6c1204c0f0d992 | [] | no_license | LAOS-Y/2Stage-EGFR | 843d7dc7f755538f1b1d1861d5db4fa03ce12294 | c6859e36969169bc23abdb57c01d540687cc2c55 | refs/heads/master | 2022-02-15T17:07:58.520998 | 2019-09-25T09:41:16 | 2019-09-25T09:41:16 | 209,357,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,154 | py | train.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from utils.data import NoduleDataset, myCollate
from models import DenseNet
from torch import optim
import matplotlib.pyplot as plt
from model import generate_model
from setting import parseOpts
from sklearn i... |
fee3d06528e44d377b3758fb4c67704361da987f | 4bfa0e1f7c7d8e4077a31f47e7638a875eb14a8d | /InstantNews/views.py | 941db63f12246ff82972d848d508be220e50b579 | [] | no_license | AmanChauhan2020/News_Aggregator | 6407d61d0cb32765aba067786da0867908f9fed4 | 009faa083baf42253022ca11625c2ce92dc49384 | refs/heads/master | 2023-03-04T13:07:49.018604 | 2021-02-05T06:15:21 | 2021-02-05T06:15:21 | 336,179,599 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,130 | py | views.py | from django.shortcuts import render
# Create your views here.
import requests
import nltk
from bs4 import BeautifulSoup
from newspaper import Article
from textblob import TextBlob
import geocoder
import json
import pandas as pd
import numpy as np
import time
#to scrape Twitter
import tweepy
from tweepy import OAuthHa... |
d28de145849061eb69746b0f81b4ca7d45836582 | 41a3a48e01b218a0879b018818d6c5832c5b3fdd | /decoder.py | 8b4972801351a7649833bc4142bad510818b2875 | [
"MIT"
] | permissive | sumnercreations/penpal | 11e23217bbdfbb26d61e1714103457fad476ba99 | 2fccd3a4677a062e14214129861e53e355b7a8ce | refs/heads/master | 2020-07-13T12:18:12.919629 | 2019-10-17T04:30:45 | 2019-10-17T04:30:45 | 205,081,538 | 0 | 0 | MIT | 2019-10-17T04:30:46 | 2019-08-29T04:38:53 | Python | UTF-8 | Python | false | false | 1,192 | py | decoder.py | def decode(message):
alpha_dict={'a':0,'b':1,'c':2,'d':3,'e':4,'f':5,'g':6,'h':7,'i':8,'j':9,'k':10,'l':11,'m':12,'n':13,'o':14,'p':15,'q':16,'r':17,'s':18,'t':19,'u':20,'v':21,'w':22,'x':23,'y':24,'z':25}
alpha_num={0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k',11:'l',12:'m',13:'n',14:'o... |
8b4d3ff0a7d1e06681df3ad3d3b6c2bc474b653e | 0891b7f33497c7e3cb43af5f9938a89301fa36a6 | /pytorch/examples/resnet50v1.5/qa/check_curves.py | 7e235ac2ef3717b634061f89b2707c7de83808ae | [
"BSD-3-Clause"
] | permissive | openshift-psap/mlperf_v0.6_resources | 3a776e65b4d85c7a730ab5ac1c9d70f6b6c482d8 | 0ffa4b8d86449b87ae6a96c83379000adc3c1516 | refs/heads/master | 2022-07-23T01:14:44.785832 | 2020-03-30T20:18:12 | 2020-03-30T21:26:43 | 249,757,966 | 0 | 1 | null | 2022-07-05T21:44:55 | 2020-03-24T16:22:17 | HTML | UTF-8 | Python | false | false | 1,165 | py | check_curves.py | import argparse
import json
parser = argparse.ArgumentParser(description='PyTorch Convergence Tests')
parser.add_argument('baseline', metavar='DIR', help='path to baseline')
parser.add_argument('raport', metavar='DIR', help='path to raport')
args = parser.parse_args()
METRICS = ['train.loss', 'train.top1', 'train.top... |
afa2b3d87b273e95aa0f33254f87b062a0264491 | b5f435a7ab66d4f748dcb9d07a0b06fba32866c7 | /plugins/probability.py | 0e0af423b78b36185b0c9453c7db9adc0089c6d3 | [] | no_license | jurassicplayer/NekoLoliBot | 6fa167bdca69d6866589281dce14344707b53474 | f79299a3392c181d3d3c0e799f79cb542da2fb02 | refs/heads/master | 2020-05-30T18:35:02.892247 | 2015-01-24T05:31:53 | 2015-01-24T05:31:53 | 28,890,788 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,169 | py | probability.py | #!/usr/bin/env python
import template
import re, random
class IRCScript(template.IRCScript):
print('loaded probability')
def privmsg(self, user, channel, msg):
if re.match('^-(eight|8)(-|)ball', msg, re.I):
answers=['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes definitely'... |
765a5faff7af6eb8698d81c49b03dc7264123130 | a947235eaf99b9d2f3ddedf1e0ba3151ae56ae06 | /springboard/tests/__init__.py | d2a03985a46a685da078bc389abd1bc834cbc65d | [
"BSD-2-Clause"
] | permissive | universalcore/springboard | fe256b84f7e270d8bd342098a06da569ca4a60fa | 9f0393d310a1d2219613e8cd30cc52c75fb4dd61 | refs/heads/develop | 2021-01-21T12:52:58.310271 | 2016-05-20T10:01:53 | 2016-05-20T10:01:53 | 26,876,866 | 1 | 2 | BSD-2-Clause | 2023-08-24T20:23:49 | 2014-11-19T19:08:45 | Python | UTF-8 | Python | false | false | 90 | py | __init__.py | from springboard.tests.base import SpringboardTestCase
__all__ = ['SpringboardTestCase']
|
96b6674b017133004959c8865281598451ed82bc | b1d154baead60cd1d8a38c9b22fca0b30e729214 | /downloadandrename.py | d9b5c79b5df275d9fc1cdff852458f2ca2cc301d | [] | no_license | Corsario-CL/Ftpdownload | 62d6b26e1150f0a918de36fe66cd6db83f4f3712 | ed56c51047ef4abc2f719e303350cde10f11b5f5 | refs/heads/master | 2022-11-03T08:25:12.848499 | 2020-04-06T16:32:43 | 2020-04-06T16:32:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | downloadandrename.py | import shutil
import urllib.request as request
from contextlib import closing
def download(filename):
with closing(request.urlopen("ftp://username:password@ftp.example.com/"+filename)) as r:
with open('C:/MyPath/recievingfolder/'+filename[1],'wb') as f:
shutil.copyfileobj(r, f)
files = [("file.... |
027949809a13487ff739b23bdce7f2ab60b34a33 | b7ee3ab618d1c6568c3aad05e211c2e0d56be270 | /third-party/PyPoE/PyPoE/cli/exporter/__init__.py | 73f93684a51fc454693960fa49e84abd5310e403 | [
"MIT"
] | permissive | erosson/pypoe-json | b29baa5be3cc7c6e007b6b2d87da5865602dfbed | 7b3ddc8dc310c580c3e75c4835389c1204936206 | refs/heads/master | 2023-03-26T11:06:55.219722 | 2021-03-15T03:02:22 | 2021-03-15T03:02:22 | 327,727,393 | 1 | 0 | MIT | 2021-02-25T04:21:52 | 2021-01-07T21:20:36 | Shell | UTF-8 | Python | false | false | 1,932 | py | __init__.py | """
GGPK User Interface Classes
Overview
===============================================================================
+----------+------------------------------------------------------------------+
| Path | PyPoE/cli/exporter/__init__.py |
+----------+-------------------------... |
8d9faf848aaaf05267cb3f26c1383b9ba40660b3 | 8a566adb27d825232a42c3ea67fa6cf9e6bfdc2d | /src/tests/test_baseimage_.py | 3a5e8c72368eb68ce00bdca3b403ef00b5f85f92 | [
"MIT"
] | permissive | varghesetom/Photomosaic | 69112434283a60d13198a5c126c7196c71538315 | 0e16a0cf3e4f3ca68cad006b76d171f2651e4fef | refs/heads/master | 2023-02-11T07:12:06.916747 | 2021-01-09T02:26:30 | 2021-01-09T02:26:30 | 320,422,277 | 0 | 1 | null | 2021-01-09T05:57:36 | 2020-12-11T00:16:27 | Python | UTF-8 | Python | false | false | 946 | py | test_baseimage_.py | import unittest
from src.BaseImage import BaseImage
class BaseImageTestCase(unittest.TestCase):
"""
Test BaseImage Class for various initialization errors.
"""
def setUp(self):
self.base_im = BaseImage
self.sample_image_path = 'test_eagle.jpg'
class InitTestCase(BaseImageTestCase):
... |
0106cf0be09fd250120818cce36f885f3f8158db | d55c8e311a34e0f18f5916f46d91b255fb4b0636 | /d04/ex03/views.py | f4753ae49d124e86956a3e511be4bb68efda6199 | [] | no_license | hwcho0456/PythonPiscine | 978940cf09da77b3c0e0c58486d7a69dc5691e5c | 807367fa3bec001126d2c1542b6468b1e3de7fde | refs/heads/master | 2023-06-21T14:24:25.286219 | 2021-08-04T10:53:40 | 2021-08-04T10:53:40 | 389,523,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | views.py | from django.shortcuts import render
from django.views.generic import TemplateView
# Create your views here.
class Ex03(TemplateView):
template_name = 'ex03/index.html'
def get(self, request):
self.context = {
"shade": ["{:02X}".format(int(i*255/50)) for i in range(50,0,-1)]
}
... |
1a2076986cd4446fd37707623acea307d5d58b20 | 4b14d4a0d3269bf27ec5222adf691a8877fba884 | /Bg39.py | 996449db4ab7cc5d6c899962ce1cd17332bfdb28 | [] | no_license | Subheiksha/first-repository | 0a4e08c94e99583ecb9c11a8e627c9592286125e | a9dde4b77a4bd92f7855723c9b5ae797923369ac | refs/heads/master | 2020-05-17T23:47:42.737355 | 2019-08-13T14:30:39 | 2019-08-13T14:30:39 | 184,042,838 | 0 | 4 | null | null | null | null | UTF-8 | Python | false | false | 58 | py | Bg39.py | q=list(map(int,input().split()))
max=max(q)
print(max)
|
38ca2fa3172d8baa5ea6161407a5d15a63c0a123 | 394ff39b8662d6e8afcb228a660ec891f9c6cc65 | /app/migrations/0004_biz.py | 9e7be2950468481507ae90e5b13109f55c397a67 | [] | no_license | WALL-E/django-admin-practice | 34b44d4e27d557dde2f78664f64c1dec92ee970a | b867de549e4778a4994315c48da3f9ac7b7fe73d | refs/heads/master | 2020-03-25T01:57:10.576599 | 2018-08-02T08:49:11 | 2018-08-02T08:49:11 | 143,266,431 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,772 | py | 0004_biz.py | # Generated by Django 2.0.7 on 2018-07-31 08:14
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('app', '0003_auto_20180731_0743'),
]
operations = [
migrations.CreateModel(
name='Biz',
fields=[
... |
66bdafbbb4da99ff2655bbfa7823947c3cf03b94 | 0d29b962420a9dbd6308ffd0b065b1a40e678d8c | /answer_selection/lr_xnet/model_ens_utils.py | 20ef364b9bb47f0cc5a6dc57f01c2b1ea4becd06 | [
"BSD-2-Clause"
] | permissive | Chunlinx/Document-Models-with-Ext-Information | 5de240969fd7bf0e179671da42587a1aac954804 | 8db8dc4ab2d9a49af6523742ce9580aa22e12c8e | refs/heads/master | 2020-04-13T00:28:44.695359 | 2018-11-10T14:45:32 | 2018-11-10T14:45:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,851 | py | model_ens_utils.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
sys.path.append('../../common')
import numpy as np
import tensorflow as tf
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import seq2seq
from tensorflow.python.ops impor... |
f7b5cdd6ce3ded65faca692383186be1985d985e | 6e88027a684cf8da07043d9104ed7f4c04a59f28 | /code/reproduce/reproduce.py | bedfe7d8d9f90e703ff4772ce460647fac9e1499 | [
"MIT"
] | permissive | yidanliu-psy/GameVis | 08f236f391322820448820e041a82a7f12783dfd | 2fadf3687ec1a47ca9920a05b32c231c0ba23752 | refs/heads/master | 2023-02-26T18:04:21.386613 | 2021-01-30T04:30:32 | 2021-01-30T04:30:32 | 281,670,003 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,435 | py | reproduce.py | import pickle
import numpy as np
import statsmodels.api as sm
# find the games which are 2v2, 3v3, 4v4
def scan_game_table(table_path):
team_game_set = set()
target_file = open(table_path, "r")
line = target_file.readline().strip().split(",")
while len(line) > 1:
game_id = int(line[0])
... |
e5779bbf0d333feb9580e980740148c5fe738206 | a74f6ebc35a41a1f713a223b0b01e984f23530a9 | /untitled/venv/py2/pepper/Audio/Audio_Processing.py | 59f6841f1973e56a3f37eb4c50c40411dc4049da | [] | no_license | Zyj870534948/PycharmProjects | edf65bbcce074c2ffa9e6cf850dfb8ab0308cf82 | 9a1674e55ee32552cbd862fd0abc6e95bd0a5052 | refs/heads/master | 2020-04-24T13:58:10.267200 | 2019-06-13T07:02:53 | 2019-06-13T07:02:53 | 172,005,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,333 | py | Audio_Processing.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# __author__:"MrZhu"
'''
__introduce__
'''
import qi
import argparse
import sys
import time
def main(session):
audio_processing = session.service("ALAudioDevice")
# audio_processing.enableEnergyComputation()
# audio_processing.getFrontMicEnergy()
# time.... |
cfa61ae1091bbaf478e89d4913f93200c97d3a8c | a3a3e4317b7c2f9d49b85c8b8c41b2b0fb046387 | /_lecture/inheritance/Cat.py | 9edc2a16268289f864c9846fdc528dc44dfeead1 | [] | no_license | bryanee23/Advanced-Python-Programming | 8ff6a7481128d901f6a631550727e452f11f7387 | 31b182184e00dda5efba515824a6a3551fbd5870 | refs/heads/master | 2023-02-01T00:03:21.310600 | 2020-12-12T23:52:54 | 2020-12-12T23:52:54 | 291,519,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | Cat.py | from Pet import Pet
class Cat(Pet):
def __init__(self, name, age):
Pet.__init__(self, name, age)
def sleep(self):
print("{} continues to sleep".format(self.name)) |
a2595bde6991f3ff3689fac139b4caf3b5a1ea73 | a90f626701f07ad7e582752b799f0bd5d16ea9ba | /Flask/01PythonTutorial/01conditions.py | 374a28f014d26fd6db707136113eb29996d3028a | [] | no_license | sansoohan/Tutorials | 1aa1e1cb5417dd5323463e4839ca591948148de7 | d6b68f93a417294bce152d17ac53f7b9a568c7c0 | refs/heads/master | 2023-01-21T08:59:51.838924 | 2020-07-12T09:31:44 | 2020-07-12T09:31:44 | 174,697,415 | 0 | 0 | null | 2023-01-19T05:33:24 | 2019-03-09T13:23:31 | CSS | UTF-8 | Python | false | false | 478 | py | 01conditions.py | import sys
import math
import math
import threading
import time
import random
from functools import reduce
age = 30
if age > 21:
print("You can drive a tractor trailer")
elif age >= 16:
print("You can drive a car")
else:
print("You can't drive")
if age < 5:
print("Stay Home")
elif (age>=5) and (age<6):
pri... |
a9f44e2e16c2d422dea996e41c579456f8fd5347 | 6b54971380f6668f6f8eb4fdb76e504b4c33e1b8 | /lesson_3/The math quiz program.py | 85d85ef41c36fc3dd997af89fcbe5fca912165b3 | [] | no_license | denyadenya77/beetroot_lessons | 1bd0a0382cf98b08dd54a803b32a3ab7b2b6e4c2 | 0ee39965eb33bdc15abd1f42e90199af3e4aec11 | refs/heads/master | 2020-08-06T13:04:01.720353 | 2019-10-17T17:49:02 | 2019-10-17T17:49:02 | 212,985,689 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | The math quiz program.py | from random import choice
q1 = '5 + 5 = ', 10
q2 = '10 + 10 = ', 20
q3 = '15 + 15 = ', 30
all_q = q1, q2, q3
question = choice(all_q)
ansuer = int(input(f'Введите ответ на выражение {question[0]}'))
if int(ansuer) == question[1]:
print('True') |
94d13de40c81ed29f237d2b517bebd5e8236a349 | 9aaad887150377fe3ae250aa59103322b10b7b25 | /start.py | 3fd7f5d3067ca19bc6ef946d20e2514c64bf8f7e | [] | no_license | b1naryth1ef/pydskchk | d35cf135b09a2f4445d5f03fc8d5c31c780740e0 | fc8565bac0dbc9bffdbf98ddd36013462360900a | refs/heads/master | 2020-06-04T21:02:12.947016 | 2011-10-27T07:33:54 | 2011-10-27T07:33:54 | 1,569,600 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 33 | py | start.py | import reqs.Main
reqs.Main.main() |
a4983e99d4a3d229d4f90ba66538568648825f6f | c235dcc6f804d6374f8c700242124421ba9a0630 | /Problem Solving/Simple Array Sum.py | b936fcc847bff98694fd99e9bd0eda1d60e38f71 | [] | no_license | major-sri/hackerrank | 6405ddda806eb63c7d7825c9b6d479f734e95971 | 4728046b76c7ae66b7991a424196aafbbe6ed8af | refs/heads/master | 2021-01-07T08:43:21.206515 | 2020-09-22T16:39:04 | 2020-09-22T16:39:04 | 241,637,890 | 0 | 1 | null | 2020-09-30T17:30:29 | 2020-02-19T14:09:48 | Python | UTF-8 | Python | false | false | 99 | py | Simple Array Sum.py | def simpleArraySum(ar):
sum=0
for element in ar:
sum +=element
return sum
|
54ccd755d3cadfc856452423bb0e745f9d3e11d4 | cc304d212f7c5ec2371b5a3e8d18be6e865b23ea | /dailyadventure/items.py | 6b8b4c7c6b9592e14e8c701afd76f557e040507e | [
"MIT"
] | permissive | jmdejong/daily_adventure | a2e7a54e15aa0b40d9a77a5d5b8fa482d2e062a9 | 103982c0aa3ba12283a1530c82befa43db5d07bc | refs/heads/master | 2020-04-07T02:40:58.928147 | 2019-09-23T09:38:32 | 2019-09-23T09:38:32 | 157,985,485 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | items.py |
from .item import Item
class ItemSpace:
def __init__(self, data):
for id, item in data.items():
setattr(self, id, item)
def _make_items(data):
itemdict = {}
for d in data:
if isinstance(d, str):
item = Item(d)
else:
item = Item(*d)
... |
706a4db79ab99ed6d22091086de0fc938b51212c | d90598cb4085b04342d8bf904815add715b70ac1 | /extract.py | b284e9d178140d6ef9b1b8ba2f01fd30ea2b34ef | [] | no_license | DailyDreaming/load-project | 50cc7258b61323dd8d68b2917f69b89bb077b1a6 | 8f2a199049f2db870e6bd3fdf45169888836e248 | refs/heads/master | 2023-05-27T01:44:48.837206 | 2020-01-25T05:49:21 | 2020-01-25T05:49:21 | 227,292,644 | 2 | 1 | null | 2023-05-22T22:35:22 | 2019-12-11T06:27:45 | Python | UTF-8 | Python | false | false | 4,196 | py | extract.py | import zipfile
from operator import methodcaller
from _pathlib import Path
import shutil
import tarfile
import logging
from util import get_target_project_dirs
logging.basicConfig(level=logging.INFO)
def main():
project_dirs = get_target_project_dirs()
for project_dir in project_dirs:
extract_recu... |
b215276a2930c827f619921008d2c9061a21f2f8 | 5a61ba76c770de8469218ff457213e122e08c7d1 | /code/at_offer/finding_sorting/coding_interview57_2.py | 965f5dc2914698b5f2dd42d89a2f2353ca9c3d68 | [
"Apache-2.0"
] | permissive | zhangrong1722/interview | 6a71af26f08f036a294e36073cb9eb6ca798b993 | 187a485de0774561eb843d8ee640236adda97b90 | refs/heads/master | 2020-09-06T08:15:00.229710 | 2019-12-10T06:32:05 | 2019-12-10T06:32:05 | 220,372,777 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | coding_interview57_2.py | """
题目:和为s的连续正数序列
输入一个正数s 打印出所有和为s的连续正数序列(至少含两个数) 例如 输入15 由于1+2+...+8=15 哟所打印3个连续序列1~5 4~6 7~8
"""
class Solution(object):
def FindequenceSumSS(self, s):
if s <= 0:
return
small, middle, big = 1, (s + 1)//2, 2
curSum = small + big
while big <= middle:
if ... |
7d14ef26f9204e1ddaba7b8c8b91be1a45389f06 | 8f02eb64e58d28dcea2721515f51ea413a73c0ac | /1.py | 94cca36529c3fa2dc703b598c6173d822fbb4177 | [] | no_license | TeaPanda/python-Rock-Paper-Scissors | 94dddc7b6d3c867bb9353999b73f370369f638b6 | 0cc80ae0f0e70e7e3850bb7e3607733ee278d41b | refs/heads/master | 2021-08-22T23:44:24.850394 | 2017-12-01T18:27:33 | 2017-12-01T18:27:33 | 112,773,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 988 | py | 1.py | import random
'''1 = rock
2 = paper
3 = scissors '''
result = 0
while True:
while True:
print("What would you like to choose?")
print("Say 'S' for Scissors 'P' for Paper and 'R' for Rock ")
choice = input()
out = random.randint(1,3)
choice = choice.capitalize()
if choice == "S":
print... |
d06294e1ab29139c64f90352badc81e7fa75374e | b9db4206a82c068a4758baeb6dacc2430151f106 | /source/P_02/L9_BiquadraticEquation.py | b11666b52b8dd5b9201ee010ef3eb1491cf2932b | [] | no_license | krenevych/oop | 2a1e9fe5fe1ff1f568dc8940c01dcaef466d6407 | cb3acb5547659cc52e7e5d99dded7dee2992a56c | refs/heads/master | 2023-03-23T20:27:24.558328 | 2023-03-05T20:02:05 | 2023-03-05T20:02:05 | 163,889,245 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | L9_BiquadraticEquation.py | from source.P_02.L8_QuadraticEquation import QuadraticEquation
class BiquadraticEquation (QuadraticEquation):
""" Клас біквадратне рівняння виду ax**4 + bx**2 + c = 0 """
def solve(self):
result = []
solutions = super().solve() # розв'язки квадратного рівняння при заміні y = x**2
fo... |
b1e046dbc5adc0f6c83968b55972b4e32ec1cc3c | 27982359419d8d09db6b97c4f9a00b4d5532ee2e | /hidoi/__init__.py | 973dd5eec2cf87d3e35cc24fec2ac6982aa40efd | [] | no_license | podhmo/hidoi | bdbdaa86fa8b1f5298b6a193d5f26908f784b08a | f5df12de0a3fdd6aeca325fcc0b950d1d33e01a3 | refs/heads/master | 2021-01-20T12:22:45.084588 | 2014-06-08T14:13:54 | 2014-06-08T14:13:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 786 | py | __init__.py | # -*- coding:utf-8 -*-
def parse_option_from_config(config, settings_prefix="hidoi."):
settings = config.registry.settings
def sget(name, default=None):
return settings.get(settings_prefix + name, default)
if sget("model.module"):
config.set_default_model_module(sget("model.module"))
... |
7676ef74708e009db102e53e2238985eeda396f0 | 2cbcfb9b9046ac131dc01a6fd048b6920d29cd42 | /树与图/669. 修剪二叉搜索树.py | 160c7cf80d9a5204272dbec7820a4f0d4d2d0128 | [] | no_license | pulinghao/LeetCode_Python | 6b530a0e491ea302b1160fa73582e838338da3d1 | 82ece6ed353235dcd36face80f5d87df12d56a2c | refs/heads/master | 2022-08-12T21:19:43.510729 | 2022-08-08T03:04:52 | 2022-08-08T03:04:52 | 252,371,954 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | 669. 修剪二叉搜索树.py | #!/usr/bin/env python
# _*_coding:utf-8 _*_
"""
@Time :2020/4/19 3:11 下午
@Author :pulinghao@baidu.com
@File :669. 修剪二叉搜索树.py
@Description :
"""
import leetcode_utils
class Solution(object):
def trimBST(self, root, L, R):
"""
:type root: TreeNode
:type L: int
:type R: ... |
4408ecdce6d061ed7bfc6337add9f71e12543de0 | 89ec2e57f0418eab59b439db88f0390fbb40c575 | /users/features/steps/create_new_club.py | 9aa3c9ce9df2619a6a060b5fe017f8fcc195c05f | [] | no_license | Citram/MyCampus-Backend | 087e19b6d4c162f45c6625919652a84a1416b8c9 | 740bd8ccbfba5de467b7fff77cf03a598f354431 | refs/heads/master | 2021-09-25T02:58:20.704202 | 2020-03-09T22:11:04 | 2020-03-09T22:11:04 | 233,702,428 | 2 | 0 | null | 2021-09-22T18:29:54 | 2020-01-13T22:00:15 | Python | UTF-8 | Python | false | false | 1,417 | py | create_new_club.py | from behave import *
@given(u'club <club_name> with club email <club_email> is a club type <club type>')
def step_impl(context):
pass
# raise NotImplementedError(u'STEP: Given club <club_name> with club email <club_email> is a club type <club type>')
@when(u'club representative of <club_name> requests a new ... |
6a29dd01891fc7e9b4d37f5040c091481177c595 | e7a6abe153e92db9a5ac77cf7b68ad23ac8fa620 | /webserverAutomate.py | aab38b3f9efb41edb021c6ae0cf181fb630f0705 | [] | no_license | Charan2k/Menu-Driven-Python-Utility | f44aa1bb3f2e345f60b96863171a27e199cbae23 | ec4f8aa50f57c4d69e8b10624765c627b5926f54 | refs/heads/main | 2023-02-27T06:39:37.703935 | 2021-01-30T07:36:50 | 2021-01-30T07:36:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | webserverAutomate.py | # Module for Automating Apache Web Server Configuration
def webserver():
print("""------------------MENU------------------
1. Install the Web Server
2. Configure the Web Server
3. Start the Web Server
4. Stop the Web Server
5. Check Status of Web Server
""")
choice = int(input("Enter your choice: "))
if(cho... |