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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a25a732a65ac5b806dc8ea118792af7cbe315fe | 7ac0c6272d24a77b37c1a61f39401e610d947b89 | /Temperature in Farenheit.py | 116d618140d32f21fdd07bc2b18ad13ab478073d | [] | no_license | Nathanpugh6/Week-Two-Assignment | 8a4a0c197a0137203b43c33ff5df350966a4cc86 | 63366268c11bca267a6a531be0cc867880a99b8d | refs/heads/master | 2021-01-09T05:19:46.806622 | 2015-09-16T18:16:48 | 2015-09-16T18:16:48 | 42,467,005 | 0 | 0 | null | 2015-09-14T17:59:31 | 2015-09-14T17:59:31 | null | UTF-8 | Python | false | false | 149 | py | Temperature in Farenheit.py | # Second Assignment
F = eval(input("please input a temperature in Fahrenheit:"))
C = (F-32) * (5/9)
print("The temp",F, " is equal to",C, " Celsius") |
32e4e28bc55f0a80d9940a42c362207f2009f18c | 48a8c40b30f1f1c923729f606f45926f1025c325 | /ex6.py | edb1290785076be90756c86580fe072cc7df9649 | [] | no_license | ichHowell/WHL_Python | f2170a1c011ff4757f60a68133c48800c48c98e1 | a84f8ff6bf1d47abd07e5dd9fdf720bf129ed8c5 | refs/heads/main | 2023-02-18T05:12:39.455761 | 2021-01-21T14:09:19 | 2021-01-21T14:09:19 | 331,632,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | ex6.py | types_of_people = 10#创建了一个变量
x = f"There are {types_of_people} types of people."#f代表什么?与{}配套使用,字符串格式
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."#{}有什么作用?将字符串放在字符串里
print(x)
print(y)
print("I said: {x}")
print(f"I also said: '{y}'")#可以看出来有f和没有f的区别
hailarious = True
joke_... |
272b894bdc2cbe565aa145445dbf5d43e74c50e4 | 6273d8816018561356765218ad1c20d373ab78b9 | /app.py | 52571fa12b3fba0160c3ece4d1e0d83107b65657 | [] | no_license | brunohl91/sw-rest | fb382a2e41ad1c2d81a48e98ac3135ccf6b614fd | 285948023e4eece8ecdf0908c58af8dd62d7ae15 | refs/heads/master | 2021-06-10T14:51:12.597325 | 2016-11-26T13:29:15 | 2016-11-26T13:29:15 | 74,826,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,094 | py | app.py | #/usr/bin/python2.4
#
# conexao com postgres
import psycopg2
# servidor rest, modulos principais
from flask import Flask, Response, request
# biblioteca de CORS
from flask_cors import CORS, cross_origin
# biblitoeca para auth
from flask_basicauth import BasicAuth
# json para responses
import simplejson as json
# cria... |
93f3bf286513ecd279fb623f965636d9649dd4cf | dbe873934d9414ce4f512359b43a1634da48cf7b | /cvd.py | d4705e68aaeb61ab4b71602c6970034a107c0c48 | [] | no_license | shacharosn/Deep-Learning-Course | 41d07b873c1ec5100ee05b3a23189dca1c181dfa | 3d8a5ffb2b839262adb670da424bd2a75ebf3bf2 | refs/heads/master | 2021-04-03T01:28:59.275921 | 2018-03-13T10:40:02 | 2018-03-13T10:40:02 | 125,035,542 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,548 | py | cvd.py |
from sklearn.preprocessing import LabelEncoder, MinMaxScaler, StandardScaler
import tensorflow as tf
import csv
import numpy as np
import pandas as pd
from numpy import genfromtxt
train = pd.read_table("C:\\Users\\shachar\\Desktop\\trainprod.tsv")
#train= train[0:140,1:6]
print(555)
train.category_name.f... |
95a74c83f47aaf204c3a0322fad1106c6b7f1046 | 30848688c597a189837781a2f85e0d0d70f2828b | /src/ImageListGenerator.py | 9764f7f4c580331fc80ee5a5566f91511b10644e | [
"CC-BY-4.0"
] | permissive | min-archive/miike-db | e859d1ce70826aa9ade65eab3f8891a4fb11f00d | 03a8e3072ce63868901417762b0884bdbb8a273c | refs/heads/master | 2020-04-28T21:58:38.634884 | 2019-03-14T11:13:48 | 2019-03-14T11:13:48 | 175,601,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,702 | py | ImageListGenerator.py | import sys
import urllib
import json
import argparse
import urllib.request
import csv
import os
import yaml
def parse_args(args=sys.argv[1:]):
""" Get the parsed arguments specified on this script.
"""
parser = argparse.ArgumentParser(description="")
parser.add_argument(
'site_name',
... |
f4bdd95d4cec6373ef6e7289363854796ee6fb68 | 0eb52834f465766b5d47f9422dd94aa79f809bd7 | /plotResol.py | a59a99119154372a9f63c5bc10513ffe566c75c8 | [] | no_license | jwill24/PPSAnalyzer | db4a335ca83e97558ef3a6594469cc5323207ba9 | 78ee66bef64388f901eda5fbeaeb6c7e2fa6a31c | refs/heads/master | 2021-06-25T18:11:53.598807 | 2021-05-19T18:09:29 | 2021-05-19T18:09:29 | 224,227,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,188 | py | plotResol.py | #!/usr/bin/env python
import os, sys
from itertools import combinations
import math
import ROOT
ROOT.PyConfig.IgnoreCommandLineOptions = True
from ROOT import TCanvas, TPad, TFile, TPaveLabel, TPaveText, TAttText, TLine, TLegend, TBox, TColor, THStack, TGaxis, TH1F, TH1D
from ROOT import gROOT, gStyle
from common imp... |
faef70151e9fed947329b89f77c53aec91d473e9 | 75a8c6579e8b3d40145ca076af9eb46966bd488b | /python-stack/django/dndproject/apps/campaigns/migrations/0005_note.py | 7a30a8806aef45eda286a5ed3f8c4ae9772a2b63 | [] | no_license | CodingDojoTulsaMay2018/claire_elliott | 32fa39652a4bad576634427537b9f8755f43019c | 943110c0c12902739edae593d925e629e15e00b7 | refs/heads/master | 2020-03-17T11:50:46.337341 | 2018-08-20T20:30:51 | 2018-08-20T20:30:51 | 133,565,787 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,053 | py | 0005_note.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-06-29 01:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('login_registration', '0001_initial'),
('campaigns', '... |
ae4d9cadd20a87855d53e4d495d7c4228bde4713 | 24372251aa3ef603837a386d2acefd478bdd6d9a | /VisualizeMst.py | 77549fec0a7322a0c3c76695c36eedfe8525e385 | [
"MIT"
] | permissive | arunkumaraqm/Prims-Algorithm-Using-Fibonacci-Heap | 1900db37ececfb2b40ff7326f3b5134c1d1b64e9 | 8795f46ac852de465708a2f6ec63e5b6970ae485 | refs/heads/master | 2021-05-20T22:03:09.987141 | 2020-07-20T09:01:24 | 2020-07-20T09:01:24 | 252,431,508 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | VisualizeMst.py | import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
from Graph import Graph as myGraph
from sys import stdin
def visualize(matrix, edges_in_mst, strip_edge_weights = False):
grf = nx.from_numpy_matrix(np.array(matrix))
pos = nx.spring_layout(grf)
edge_labels = nx.get_edge_attributes(grf, 'we... |
41e6b60cd0748751937e609602072a517eafb436 | fd4163b9032ea17ea34e7575855a33746c1772c6 | /src/azure-cli/azure/cli/command_modules/iotcentral/commands.py | 790483b9c92a0a5f9653f2bd70aead4cdd719e0e | [
"MIT"
] | permissive | ebencarek/azure-cli | b1524ed579353ee61feb9a2ec88b134f7252d5cd | ede3aaa83aa4ac8e352e508408cada685f9f8275 | refs/heads/az-cli-private-env | 2021-06-02T04:51:29.831098 | 2020-05-01T00:15:31 | 2020-05-01T00:15:31 | 137,520,442 | 2 | 9 | MIT | 2020-05-01T00:15:33 | 2018-06-15T18:33:10 | Python | UTF-8 | Python | false | false | 1,292 | py | commands.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
c69340321be1372545cfc07477d9cae271eebf4a | caa282babaafe837faf8fcc087189df17c4b89bd | /source/verification/coref-scorer.py | 1309300dcdcd48a634ebdd0e2844dc4a9a57a303 | [] | no_license | roylanceMichael/cs_6340_nlp_coreference_utah | 53b8c65c95f9a34ede5e22e21c2a83eb09a7dbd0 | 4d80741a51ff322b0ae341b57015b6e65235a1fb | refs/heads/master | 2021-01-22T08:48:40.305860 | 2015-02-02T08:39:55 | 2015-02-02T08:39:55 | 6,305,719 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,827 | py | coref-scorer.py | #!/usr/bin/python
# Scoring program for CS 5340/6340 coreference resolution project.
#
# Usage: ./coref-scorer.py <listfile> <official-keys-directory> [-V (optional)]
# Example: ./coref-scorer.py /home/riloff/listfile.txt /home/riloff/keys/
#
# The optional -V flag will produce more verbose scoring information.
#
i... |
cf1094848fc8d07c845983186f2481a0066c7894 | 101e0358ed3dd18682a1668c4a7ca2a127a8153d | /tf_core/nltoolkit/lib/named_entity_extraction.py | b158f1e134bc231598eb304dcdd2c9594707b77c | [
"MIT"
] | permissive | xflows/tf_core | 6a70f8b5054246c30afa7652f7e7574a26b8196a | 0b8ce80e6d8e38dcec17ec4c2f2100ba30e183fa | refs/heads/master | 2022-12-10T09:11:29.751644 | 2020-01-11T11:46:28 | 2020-01-11T11:46:28 | 71,784,059 | 1 | 1 | MIT | 2022-12-08T03:28:41 | 2016-10-24T11:55:59 | Python | UTF-8 | Python | false | false | 1,306 | py | named_entity_extraction.py | import nltk
# with open('football.txt', 'r') as f:
# sample = f.read().encode('ascii', 'ignore')
#
# sentences = nltk.sent_tokenize(sample)
sentences=["CNN.com delivers the latest breaking news and information on the latest top stories, weather, business, entertainment, politics, and more",
"Flights to ... |
32d12e139cdc96e5d32097468e22c72e0890f3b6 | e6a195d19e323554afa57a754a276685125f2237 | /neuroflow/moods/helpers.py | 47962e86133223379e480c121592b51e95e91106 | [] | no_license | mmyoung979/NeuroFlow | 3ba46d9855bb7e166265bec80e3104cb05fa5438 | 1a665bc48fe29e09f2a3d13c33784324984824ab | refs/heads/master | 2022-11-13T18:20:00.075117 | 2020-06-19T14:35:53 | 2020-06-19T14:35:53 | 259,836,240 | 0 | 0 | null | 2020-06-19T14:36:34 | 2020-04-29T05:49:44 | Python | UTF-8 | Python | false | false | 1,035 | py | helpers.py | # Project imports
from .models import Mood
from neuroflow.accounts.models import Account
# Python imports
from datetime import datetime, timedelta
# Check if user didn't record mood yesterday
def check_if_reset_needed(user):
yesterday = datetime.now() - timedelta(days=1)
if Mood.objects.all().count() > 0:
... |
54bc5f2f6bdbcfdc9d7769fdce37af0f27ef0701 | 93c337b0f21a4514d82c664dea832b01b9343f66 | /experiments/vlctest.py | 52e6a44cc256b4d5added3a6d8b2724920c2fb3d | [
"MIT"
] | permissive | pinballpower/pipup | 87dc52bb9b3089a81fe3e5dd755c57639bbefbfe | b345dcbad4d6da5a2e98b8221c6df990a784dda4 | refs/heads/main | 2023-08-16T03:30:16.161222 | 2021-10-13T16:39:46 | 2021-10-13T16:39:46 | 415,516,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 827 | py | vlctest.py | from vlc import Instance
import time
import os
import glob
class VLC:
def __init__(self):
self.Player = Instance('--loop')
def addPlaylist(self):
self.mediaList = self.Player.media_list_new()
for s in glob.glob("*/*.mp4"):
self.mediaList.add_media(self.Player.media_new(s))
... |
d1eb35bdf482bebaaa1b3d01e6a0ef326b8efab5 | cd13d11282bdae2f0d66ac4c71ff9c5fb44ab6e9 | /turlteintro.py | 2fe45417c3bf4aeaae57df795cad58e601cda091 | [] | no_license | Techsrijan/december2019 | 279942f8a07fa6e1fa5f6b13dc125708cdbb0619 | 1ce2a8ad9c69517846a76faf12c3ba194455156c | refs/heads/master | 2020-09-28T18:57:26.849907 | 2020-01-28T05:37:21 | 2020-01-28T05:37:21 | 226,840,155 | 0 | 4 | null | 2019-12-19T08:32:24 | 2019-12-09T10:02:03 | Python | UTF-8 | Python | false | false | 1,057 | py | turlteintro.py | from turtle import *
#help('turtle.shape')
'''
Shape with name must exist in the TurtleScreen's shape dictionary.
Initially there are the following polygon shapes:
'arrow', 'turtle', 'circle', 'square', 'triangle', 'classic'.
help('turtle.penup')
help('turtle.pendown')
'''
t=Turtle()
window=Screen()
#window.bgc... |
32ba0480d65dc8b17e29a78796b93354f4d25d81 | a6127204ad2b8fd9aaa8f7afc36ee37440170f07 | /serwer.py | af8502db32e0f2fd6c36480f6f285475ad25159a | [] | no_license | Igossx/NoticeBoard | ff960ba0eed4ccc9f63261434f5b336f1d44b149 | ce6fd2574311a5a26f9354e98380ace852d36b0a | refs/heads/main | 2023-08-18T02:45:49.006856 | 2021-09-25T16:25:25 | 2021-09-25T16:25:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,507 | py | serwer.py | import argparse
import socket
import sys
import struct
import signal
import os
from pathlib import Path
parser = argparse.ArgumentParser(description = "Tablica ogłoszeń.")
#argument niezbędny
parser.add_argument("port", help="server port", type=int)
#argumenty opcjonalne
parser.add_argument("-n", dest="l... |
b1b0de5203e4cf0c28ef78c846da910ae97365fd | 8fb18e325c161e234b92e49f93bdcf297b23a1ec | /felixdb/admin.py | 73164490fcd98db7b9047abebcc66cc59d98213c | [] | no_license | jostlowe/regiweb | 432c477eff45b81814aeede5893b2badfae8d4c5 | 4913d17df5b2ed1fde913b5ee7058ae3a440f68e | refs/heads/master | 2020-04-29T12:06:56.899286 | 2019-08-10T18:08:12 | 2019-08-10T18:08:12 | 176,125,238 | 3 | 0 | null | 2019-04-09T19:55:29 | 2019-03-17T16:02:05 | Python | UTF-8 | Python | false | false | 747 | py | admin.py | from django.contrib import admin
# Register your models here.
from .models import Verv, Regifant, Vervperiode, Uke, Ukeverv, Ukevervperiode
class RegifantAdmin(admin.ModelAdmin):
list_display = ('fornavn', 'etternavn', 'kallenavn', 'tatt_opp')
list_display_links = ('fornavn', 'etternavn', 'kallenavn', 'tatt... |
28d18f179f9e6f8c0c075dec1227def2800f95a3 | 231215127283b2d3a40943ccd636dcdca1df5351 | /python教程练习/tuple(元组).py | d8083138d80b9e689fe5aabdd6f65331632ee3ff | [] | no_license | EricGao-Byte/My_Python_Practice | 8713ce41051200f18c6e24f60b3ad2f7d75d2ef2 | e54a15db30fc6f28f8af70e4878bd25fc84f0a8d | refs/heads/master | 2023-01-14T08:53:32.927674 | 2020-11-25T12:52:34 | 2020-11-25T12:52:34 | 301,386,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | tuple(元组).py | # tuple 元组 也叫有序数列
classmate = ('gao', 'bob', 'jin', 1)
# 一旦初始化就无法修改,其中的元素也无法赋值为其他值
print(classmate)
# tuple陷阱
t = (1, 2)
print(t)
t = ()
print(t)
# 当定义单元素的tuple时,会出现问题
t = (1)
print(t)
# 正确的定义方式
t = (1,)
print(t)
# 元素可变的tuple
t = ('a', 'b', ['A', 'B', 'C'])
print(t)
t[2][0] = 'X'
t[2][1] = 'Y'
print(t)
|
b194a960b479e210ebd9aa2b4d847cdeffd45670 | 2bd1562cbf46787b48b0c4a5a800ad4cdf8e8409 | /redditlinks/settings_default.py | 450db4a6ffd4b108d3ea14a4db32dd9a02c288b3 | [] | no_license | jeffisabelle/redditlinks | 5a88bae805de9bcb6edfc08b76fbf4aca4d31bb8 | a5d6719adbdf310f956c02aa8b277dcb7b4f3e6f | refs/heads/master | 2022-07-21T21:38:02.661382 | 2019-12-11T12:48:22 | 2019-12-11T12:48:22 | 33,455,044 | 1 | 0 | null | 2022-07-06T20:19:55 | 2015-04-05T20:58:55 | HTML | UTF-8 | Python | false | false | 4,085 | py | settings_default.py | """
Django settings for redditlinks project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... |
3eec704221daa8e9c65d8bdbe858724db5fd321f | f0323b285aaabf0e599cf3420100fcbc93cd8bba | /main.py | b1026fc52ae394f2f414eea894863fa4a32889e8 | [] | no_license | GabrielKP/4win | d2487504591033f79789cf3a191395b34a3ac81d | d9681fa19f9d9b96cdfd5c911633ced26e490d77 | refs/heads/master | 2021-07-02T08:29:49.546523 | 2020-08-24T15:59:33 | 2020-08-24T15:59:33 | 138,419,306 | 0 | 0 | null | 2020-08-24T15:24:21 | 2018-06-23T17:05:51 | Python | UTF-8 | Python | false | false | 4,779 | py | main.py | #!/usr/bin/python3
# Implementation of a connect 4 game in python.
# Inspired by John Tromp: https://tromp.github.io/c4/c4.html
import sys
import time
import timeit
from player import *
class FourWins:
"""
Basic connect 4 game
"""
def __init__( self, p1, p2, verbose ):
"""
Initialize ... |
3f8427d58fd7d8631bd9f4bf77d987087003ac79 | 37ec04fd917f6c3a5d67a42a38f0b85f777f0c69 | /includes/saver.py | bf88b5f55126e4297043b0da7f7ece81eb09ae18 | [] | no_license | sergoslav/yukon | 4950dcd44ab9a5db3c7ca8746a43412c5d5bfada | 2970dd7fa4017509f9826660789cc34a0641fa44 | refs/heads/master | 2020-03-12T18:25:25.366812 | 2018-01-06T20:29:12 | 2018-01-06T20:29:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,934 | py | saver.py | # -*- coding: utf-8 -*-#
import cPickle
import sys
import os
"""
Pickler class
-------------
list of /data:
a.pick
b.pick
--------------
Usage:
mydata = pickler('/data')
a = mydata.a
b = mydata.b
if there is no file '/data/b.pick', then mydata.b equals to None
"""
class pickler(object):
def __init__(self, l... |
6ec17c5b71be392272d5513ca1fc84bafc07a4ff | 7ec38beb6f041319916390ee92876678412b30f7 | /src/leecode/easy_1859.py | 95b101a853c2ca9a8a91296ea013f89e94ecf61d | [] | no_license | hopensic/LearnPython | 3570e212a1931d4dad65b64ecdd24414daf51c73 | f735b5d865789843f06a623a4006f8883d6d1ae0 | refs/heads/master | 2022-02-18T23:11:30.663902 | 2022-02-12T17:51:56 | 2022-02-12T17:51:56 | 218,924,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | easy_1859.py | from datetime import datetime
from typing import List
'''
tag: ^1859 ^easy ^string ^sort
name: ^(Sorting the Sentence)
'''
class Solution:
def sortSentence(self, s1: str) -> str:
res = []
dic = {int(word[-1]): word[:-1] for word in s1.split(' ')}
le = len(dic)
for i in range(1, le... |
5dd8c606e1e48c9a185be574a327d6d3f4192110 | 9a20ae6f4a818f128c08da8f74e090f0f3b13ec3 | /workbook.py | bddd3aaf5dc3b45329379c663b363885c2da8389 | [] | no_license | suhuihuang/excel | 5925a858324556c8322a2de913a9a093ea8acdd6 | c14787e20b58f9a70a4b8bb969220fdafc2f1810 | refs/heads/master | 2020-07-22T02:08:39.919729 | 2019-09-08T01:04:43 | 2019-09-08T01:04:43 | 207,040,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,746 | py | workbook.py | # import workbook as workbook
import json
from openpyxl import load_workbook, Workbook
from openpyxl.styles import colors, Font, NamedStyle
from openpyxl.styles import PatternFill, Border, Side, Alignment
# # 加载文件
# wb = load_workbook('./5a.xlsx')
#
# # 读取 sheetname
# print('输入文件所有工作表名:\n', wb.sheetnames)
# ws = wb... |
e19ef55958ae56af6172c6e0ec2cbc6454719acf | 6ec39f0aa295c8f5b7280a1f012e628e1afaac20 | /words/management/commands/loadlexicon.py | 25edff5e277be3b6b9177d4cc97c85a4bd1cc839 | [] | no_license | CulturePlex/lexicorama | c8eba011bef2c9e75c64b3adf1346bc56b7aed97 | 2233cb9a8130e7028010b23efc7c01b51cf58a02 | refs/heads/master | 2022-01-29T10:51:57.175020 | 2020-05-25T10:42:15 | 2020-05-25T10:42:15 | 2,789,750 | 0 | 0 | null | 2022-01-21T18:57:32 | 2011-11-16T17:53:51 | Python | UTF-8 | Python | false | false | 3,061 | py | loadlexicon.py | # -*- coding: utf-8 -*-
import json
import re
from optparse import make_option
from django.db import transaction
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.db.utils import IntegrityError
from words.models import LexicalEntry
class Comma... |
6b944eec9258e25b6601e7df51264121762dfea0 | 0aa6bbfe9505e99d6c53413209a0d6c6d9225e60 | /download2-5-3.py | b1b4d738370d7e05fac43a649e436798c77b4e77 | [] | no_license | mju3356/Python_Section2-2 | e59f0a0e0c9378dcebff16839d3599bc3da067fd | 05b3ae854e60fe977b54be46973056a1248175b7 | refs/heads/master | 2022-07-22T08:52:26.157635 | 2020-05-06T13:22:24 | 2020-05-06T13:22:24 | 261,764,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | download2-5-3.py | from bs4 import BeautifulSoup
import sys,io
sys.stdout=io.TextIOWrapper(sys.stdout.detach(),encoding='utf-8')
sys.stderr=io.TextIOWrapper(sys.stderr.detach(),encoding='utf-8')
html='''
<html><body>
<ul>
<li><a href="http://www.naver.com">naver</a></li>
<li><a href="http://www.daum.net">daum</a></li... |
696e3b110ffafacbcc756c28c82fde6a206b5a99 | 61e39861295b8c713d10a24e673388f30d8b0333 | /test_unit.py | 68e9fb73c0cc64893bf085ebfa18851ed9402c7b | [] | no_license | AlJoCo/Fantasy-World-Tracker-Project | 997973a8ae46d69836f8bab9728977538c0533ca | 2e57308ca5d07bf7934731710f243e4016b28af0 | refs/heads/master | 2023-04-30T01:23:49.231850 | 2021-05-24T04:40:37 | 2021-05-24T04:40:37 | 368,829,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,159 | py | test_unit.py | from flask import Flask, render_template, redirect, url_for, request
from flask import url_for
import pytest
import fwtapp
from flask_testing import TestCase
from fwtapp import Characters, location, time, app, db
from os import getenv
class TestBase(TestCase):
def create_app(self):
app.config.update(SQLAL... |
3ecf32bc6be8a50b5388e52dcdeb3f5bda972aa5 | b0636a3c1caba1253f3bbb75090d935f5bfa9932 | /sentence_construction.py | 8bff8454f939ee9de1fcbe8cc14d3b8f635256bb | [] | no_license | monini13/sentenceconstruction | 15c79b63a034ba72dfa55820f731297032231ccc | ef73a695a650aea38dc3d5283d14194d47728519 | refs/heads/main | 2023-04-01T19:43:10.678370 | 2021-04-09T06:27:13 | 2021-04-09T06:27:13 | 356,160,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,701 | py | sentence_construction.py | # -*- coding: utf-8 -*-
"""DL_HW6.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1mNrq8j81Q4XXGExdDuEj2qqZLFiJ7yZm
"""
from __future__ import unicode_literals, print_function, division
from io import open
import glob
import unicodedata
import... |
927a093f7960b24dd618e85589f86ec10b713648 | 97bfe03de6ed0821ded02f9a582536b1801156e8 | /tests/test_user_get.py | 4125e38bdfc3358f4db59ed93e825249ee9d8a57 | [] | no_license | MaximM27/testing_api_with_python | 2c4fd5e8d1654c945395aefd2f1e85200f4fb704 | 18b1c68ff4adb33fdd5b8b373d0e9113b5c6ced9 | refs/heads/master | 2023-08-26T07:40:49.823983 | 2021-11-08T08:46:47 | 2021-11-08T08:46:47 | 413,999,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,563 | py | test_user_get.py | from lib.base_case import BaseCase
from lib.assertions import Assertions
from lib.my_requests import MyRequests
import random
import allure
@allure.epic("Get user data cases")
class TestUserGet(BaseCase):
def create_login_request_by_user(self):
data = {
'email': 'vinkotov@example.com',
... |
b71d97800546187137635a876c1ac0ff2ac5f97d | 89eacc408417b15fc7325c65c5cb0832ab0ca5de | /classes/stack.py | 19127f3307985b479ac0b35a690fb0affe0a7e70 | [] | no_license | ThomasLee94/graph_challenges | e6fc195892bf1595cf5c09454dbaa1b0d4245535 | 9b0c4e602d9744e2d2007bf8462c015d7facb972 | refs/heads/master | 2020-06-19T22:47:23.856047 | 2019-08-13T05:50:39 | 2019-08-13T05:50:39 | 196,903,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,387 | py | stack.py | #!python
from classes.linkedlist import LinkedList
# Implement LinkedStack below, then change the assignment at the bottom
# to use this Stack implementation to verify it passes all tests
class LinkedStack(object):
def __init__(self, iterable=None):
"""Initialize this stack and push the given items, if a... |
68f040130d03c33c98bedfae8b1a73a63d4bdedf | bdf57aecac3534729500b7d16d38bb5b587c5024 | /Experiments/Heuristic_Concentration_Around_Plan/metamandering.py | 8dd105f5161cee583991b997b72c004b9407b2e9 | [
"MIT"
] | permissive | gerrymandering-project/Sensitivity_To_Dual_Graph | b2579659f8ee1b0d1248a1eb8dc7986f1e7fd86f | d783e2b38b83a6ad77c201f2bd9e965f2d639054 | refs/heads/master | 2023-04-19T16:54:34.708204 | 2021-04-13T23:28:27 | 2021-04-13T23:28:27 | 298,416,624 | 1 | 5 | MIT | 2021-04-13T23:28:27 | 2020-09-24T23:16:23 | Python | UTF-8 | Python | false | false | 25,212 | py | metamandering.py | import facefinder
import matplotlib.pyplot as plt
import time
from multiprocessing import Pool, Value
from functools import partial
from mpl_toolkits.axes_grid1 import make_axes_locatable
from collections import defaultdict
import networkx as nx
import numpy as np
import copy
import random
import math
import json
impor... |
571e7b174757ebd476c5c339b9398233c7bd555d | 27ba1a1dbcdcd5e2af8466ebe0da7c5cb0cb20f9 | /robotice_auth/__init__.py | 6295d9b76dc792db1c7c55fb1111feae64c8865c | [
"Apache-2.0"
] | permissive | robotice/django_robotice_auth | c5ecd8528af01b39b5b563a45b85f3b89e6bd838 | 854605f2f37af9861851fff046794581fbdc93e6 | refs/heads/master | 2016-09-06T13:05:35.185183 | 2015-03-05T23:12:11 | 2015-03-05T23:12:11 | 31,337,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | __init__.py |
import pbr.version
__version__ = pbr.version.VersionInfo('django_robotice_auth').version_string() |
6ea381dd78100a16b09cd9693c1da411e635b151 | 8d9b9ce42fcbc5d03b05e87614c7ea18023b9ae4 | /ABC/172/a.py | 208faf757542b24857538bfa1fd0e104be931954 | [] | no_license | ponkotsuMEN/AtCoder | 50524518eba4cabf60283050922230fdf631b6f0 | 3340f0a0135726dbd557d2b386ec4484e6ac90de | refs/heads/master | 2023-03-23T22:06:29.299211 | 2021-03-22T01:49:29 | 2021-03-22T01:49:29 | 341,588,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | a.py | a = int(input())
print(a+pow(a, 2)+pow(a, 3))
|
535316da650e89ed569bd03cb204d197878678be | 90f84fbf596c08947b6d4a7a49c07bcecf5d99f1 | /regex_practica.py | 0db49f416604b9a436b5921af4b72bf1648da2dd | [] | no_license | mauriciopuente/fwtemp | 2c7d1f4a3195629ecad14caedd3a6968213581b6 | 90c57455852ff4ef7eec9b8e23ea22a8abc09d74 | refs/heads/master | 2021-01-19T03:35:29.839643 | 2018-02-13T15:06:55 | 2018-02-13T15:06:55 | 48,382,143 | 3 | 0 | null | 2018-02-16T12:43:33 | 2015-12-21T16:27:49 | Shell | UTF-8 | Python | false | false | 2,070 | py | regex_practica.py | import re
print ('\n ====== Greedy ========= \n')
greedyHaRegex = re.compile(r'(Ha){3,5}')
mo1 = greedyHaRegex.search('HaHaHaHaHa')
print (mo1.group())
print ('\n ====== Non Greedy ========= \n')
nongreedyHaRegex = re.compile(r'(Ha){3,5}?')
mo1 = nongreedyHaRegex.search('HaHaHaHaHa')
print (mo1.group())
print ('\n... |
95b525fa6ab3c7059b555be53a1a93b783c54cd0 | ffae4beabf3d7f3284dd100c7f965dab69b3559d | /data/data/akshay/python/first.py | 4b20b136466624e8900ca4ead9c0f7d69ee4541c | [] | no_license | akshaychanna/all | 236f8bcb3672b9a6b5d367d4ccf194bb258b0dda | c0a1d3528a0705233e5ad5daf53a9b333f1bf5d8 | refs/heads/main | 2022-12-26T06:14:23.386518 | 2020-10-09T18:20:04 | 2020-10-09T18:20:04 | 302,704,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | first.py | from elasticsearch import Elasticsearch
es = Elasticsearch(HOST="http://localhost",PORT=9200)
res = es.search(index="first",body = {
"size": 1,
"query": {
"bool": {
"must":[
{
"match_all": {}
}
]
}
}
}
)
print res |
1e2f8451262d08e195b5b546abfb4e0856a41aef | 476cf198b7650c204a0466e4fdac9a3a698b346c | /src/combination_sum_39.py | cd65c4bda0ddf345a0d14cb7bb2e581424ea7530 | [] | no_license | yibwu/leetcode | 95f3154e34578daad19b1aa4c9019148c8fbb79a | 6c716ee37fcb82387f050422f578daa142926101 | refs/heads/master | 2021-11-19T16:52:52.922779 | 2021-10-15T14:36:33 | 2021-10-15T14:36:33 | 131,368,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,372 | py | combination_sum_39.py | class Solution:
def combination_sum(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
result = []
unduplicate_set = set()
tmp_arr = []
self.helper(candidates, target, result, unduplicate_se... |
989d3d9fd1b452943577138d7eae8aa0f0a1880c | 1d00b26220611c83f97bddf34a68128771982338 | /tikzgen.py | f71b8dbf778872d61fbe4e4bab60d45c4549cbb7 | [] | no_license | 0x17/SchedulingExperiments | c0dbfca81d0035d6b79c1ff869018ac71c5bb253 | 68450ae46952d2dd266d9766b8d78df97fb39b5f | refs/heads/master | 2018-10-19T20:13:17.567470 | 2018-10-02T06:46:49 | 2018-10-02T06:46:49 | 115,206,294 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | tikzgen.py | import sys
import os
basedoc = r'''
\documentclass[a4paper,oneside]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[TIKZ_CODE]
\end{tikzpicture}
\end{document}
'''
class Picture(object):
def __init__(self):
self.drawlst = []
... |
8bc1f7071af65fc16e9622c5c21097b0d018d897 | c3b22881c5ff87ce3896d4559e94ed89cf068747 | /allbus/thebus/utilities/client.py | 1e477c0ea1e621a88233bf1f0aa94f2744e7d725 | [
"BSD-3-Clause"
] | permissive | CodeWithAloha/allb.us | 143ad2f062e4090113d73771a82c538844a95f9b | 9fc86eb1656a3f3e2c5ab73437998a88251a3774 | refs/heads/master | 2023-05-11T04:07:42.404784 | 2017-01-09T09:04:46 | 2017-01-09T09:04:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,714 | py | client.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib
import urllib2
import time
import re
from datetime import datetime
from datetime import timedelta
from bs4 import BeautifulSoup
from django.core.cache import cache
from allbus.utilities.cache.decorators import cacheable
from allbus.thebus.utilities.xml2json... |
617028bddd12ed8200d550d556a52224520e94dc | 2702d9172e468a716d9487260d096c9b62354d80 | /python01/pairs.py | bda12f2ad5f1310b7eeaa6fe2a1c199347c602a0 | [] | no_license | maksimok93/Dp-189 | 4c2484b40d127fd90457c5aee4a2cc35e12fedfa | 3a500c9d55fecf4032b5faf59a1cbecf64592e9a | refs/heads/dev | 2022-11-05T21:34:42.263786 | 2020-06-19T09:09:53 | 2020-06-19T09:09:53 | 265,221,584 | 0 | 0 | null | 2020-06-08T09:36:55 | 2020-05-19T10:54:17 | Python | UTF-8 | Python | false | false | 694 | py | pairs.py | def create_list(*args) -> list:
"""Creating a list of entered numbers"""
num = input("Enter the numbers: ").split()
entered_numbers = []
for _ in num:
entered_numbers.append(int(_))
return entered_numbers
def iterate_all_pairs():
"""Iterate over all possible pairs of numbers in the gen... |
eb1fcc4ebb90399a11c010e0aa9a2eb0784cb4d6 | f785abb5fb11212658eb53e7574b069612f1ddd3 | /kai/04.py | be59e07451c5586ac468ebbbf091ae39638aaff3 | [] | no_license | WangkaiAN/Code | 7f1354d4ead067eec508c3a98d2ef6ed643b97a0 | b30422bc7d4ae8668861b88d5a0feb9af11973d6 | refs/heads/master | 2023-05-04T22:40:04.970285 | 2021-05-20T14:39:32 | 2021-05-20T14:39:32 | 334,585,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 719 | py | 04.py | # s="ham"
# print("eggs"+s)
# print(s*5)
# print(s[:0])
# print(('x',)[0])
#
# D = {'x':1,'y':2,'z':3}
# D['w']=0
# print(D)
# print(D['x']+D['w'])
# D[(1,2,3)]=4
# Y=list(D.keys()),list(D.values()),(1,2,3)in D
# print(Y)
# print([[]],["",[],(),{},None])
# L = [1,2,3,4]
# # print(L[4])
# print(L[-100:100])
# print(L[3:... |
edbd1b0187b3f899499a9ebe63875111e7fc0f78 | a968ee069a957929d5ba7e64125a9a379d3eb078 | /vm_shutdown.py | 6fd74ac6cc116abc06bbae8479f018e4d8455a52 | [] | no_license | Spider-Zhong/ovirt-restapi-scripts | 8e0a127bb0c902d1ae244c0bcb5d396bbe3ebea6 | f63e2f083d17188f0a6a1ff5d96e9b4596cd4f38 | refs/heads/master | 2020-04-25T08:31:57.693879 | 2018-06-25T16:11:42 | 2018-06-25T16:11:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,729 | py | vm_shutdown.py | #!/usr/bin/python
#
# Copyright (C) 2011
#
# Douglas Schilling Landgraf <dougsland@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 of the License.
#
# This program is dis... |
62cb24c1efdd539c675ab038a50104a217b3dd54 | 61e32bb5ebf868965d3af68b5717672f7b4c51c2 | /sumDigit.py | 707c2706221ccf94c4f1b3807bd10b3b42a3a274 | [] | no_license | billaanil3/PRACTICE | e4f885473cc10a17ab422da2f6d29aea576c7b94 | 9e0d6512bd8cbfc0fa4e0d1472ac23d1482bacf9 | refs/heads/master | 2020-11-26T18:25:30.318395 | 2019-12-20T02:22:45 | 2019-12-24T11:00:14 | 229,172,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | sumDigit.py | num=int(input("Enter a number:"))
sum=0
while num>0:
rem=num%10
sum=sum+rem
num=num//10
print ("The sum of Digits of a given number is:",sum)
|
2aee4632c1e1d4fe8ab9fb3fb20b4268b64512eb | 0eaf0d3f0e96a839f2ef37b92d4db5eddf4b5e02 | /hitachi2020/c.py | 0f2d366ff4deb74951762f6f0ea97f36dc84ac04 | [] | no_license | silphire/atcoder | b7b02798a87048757745d99e8564397d1ca20169 | f214ef92f13bc5d6b290746d5a94e2faad20d8b0 | refs/heads/master | 2023-09-03T17:56:30.885166 | 2023-09-02T14:16:24 | 2023-09-02T14:16:24 | 245,110,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | c.py | global aa, bb
es = []
n = int(input())
for i in range(1, n):
a, b = map(int, input().split())
es.append((min(a, b), max(a, b)))
es = sorted(es)
threes = set()
for i in range(1, n + 1):
visited = {i}
cands = [i]
for j in range(3):
new_cands = []
for c in cands:
... |
42cc9af391e9a83a7fee040f2ac0d3c7b84f0e43 | 4a546919709c2d577596b7d8c92b742665588036 | /bjgovAndquLeader/beijingshunyigovLeader/shunyiquL/spiders/rendagov.py | 8134ee754650321d983b9d97afc6f31d3c65ae46 | [] | no_license | AReallyMan/ztcm | a1713c5b41112b60f7d57336f50d92edeb5b51cf | c09da66a5a4726fcc6603ca2b4109a4cc41814a6 | refs/heads/master | 2022-12-08T05:01:01.517476 | 2020-09-08T05:32:29 | 2020-09-08T05:32:29 | 292,792,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,544 | py | rendagov.py | # -*- coding: utf-8 -*-
# @Time : 2020-08-10 09:25:06
# @Author : ZhangYangyang
# @Software: PyCharm
import scrapy
import datetime
import re
from scrapy.spiders import CrawlSpider, Rule
from ..items import ShunyiqulItem
from scrapy.linkextractors import LinkExtractor
# 顺义区人民代表大会常务委员会(机构设置)
class ShunyiSpider(Crawl... |
f6a5da2ff3a4fcc157d73ac7d24b85b6e1d8272d | 43901a18a9fe904a8efc6a03d21902b245c69d3e | /cables/models/__init__.py | 560e83ded9a2bdaec95cb0246aaf25acd1dd8f1c | [] | no_license | PnVanoise/Avifaune-Cables_aeriens | 26509b938ddfdb59d3f2918ca272baaef703df29 | 6b892117772cadb2279e7d204e1f10bec366be8a | refs/heads/master | 2021-04-28T09:53:11.912783 | 2018-07-06T13:41:42 | 2018-07-06T13:41:42 | 122,052,594 | 0 | 3 | null | 2018-07-04T12:30:35 | 2018-02-19T11:22:04 | Python | UTF-8 | Python | false | false | 28,551 | py | __init__.py | #-*- coding: utf-8 -*-
import logging
import sqlahelper
from sqlalchemy import BigInteger, Boolean, CheckConstraint, Column, Date, DateTime, Float, ForeignKey, Index, Integer, String, Table, Text, text, Unicode
from sqlalchemy.sql.sqltypes import NullType
from sqlalchemy.orm import relationship, mapper
from sqlalchemy... |
46e416175f2a65281449439f162887b297032363 | 36e7c8369ed1399cf96e49545b37385efc2db1f4 | /PythonBasics/模块使用.py | 102d93701c2e063f4b8b7ff8e44977a380d1496f | [] | no_license | pllee1121/PythonCode | 1e7e1c68a3174bc57aa995448081818f038c8cb0 | 7a271ae10512844c5bd3fbbff0da5dd918f3ed09 | refs/heads/master | 2021-07-01T11:36:56.584851 | 2020-12-09T13:26:15 | 2020-12-09T13:26:15 | 196,841,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,408 | py | 模块使用.py | # i = __import__('exerciselogin')
# i.test()
# f = open('PythonBasics/a', encoding='utf-8')
# print('-'*20)
# for i in range(6):
# data = f.readline()
# print(data)
# with open('a', 'r', encoding='utf-8') as a, \
# open('b', 'w', encoding='utf8') as b:
# data = a.read()
# return_info = b.write... |
ed2075027d441070fb822d1857312e9740edb817 | f374dc45112e388e8e1512a54a6aa418f9873996 | /admin.py | dd85db33b11de374c86bd11267b621e8c6669040 | [] | no_license | Domendranarayan/socioapp | dbe1dd688011349f6b46835ef5723dd54cd5e682 | 9b9ca2b4654caf51af6d21328b39abce32bc6748 | refs/heads/main | 2023-06-01T22:04:44.926923 | 2021-06-22T03:37:36 | 2021-06-22T03:37:36 | 378,938,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | admin.py | from django.contrib import admin
# Register your models here.
from .models import User, FriendRequest, Post
admin.site.register(User)
admin.site.register(FriendRequest)
admin.site.register(Post) |
1a455c9b1ce2c52eebaa35d8e942ad20891cfaec | 715bd2d67f382e8afe7906ea343810d120dba1f3 | /python/autoplay.py | a6621a832ccdf292e273f13076e0967d9afd2985 | [] | no_license | slindberg/robot-jenga | 616eac8c1eb4d612a63acfbd9d17693e1227b11c | 745a345a2980e312381eef53a32aca349f7e14dd | refs/heads/master | 2021-01-21T16:58:10.730381 | 2017-06-07T04:36:58 | 2017-06-07T04:36:58 | 91,921,411 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | autoplay.py | #!/usr/bin/env python
from controller import *
from robot_instance import robot
controller = Controller(robot)
try:
controller.play()
except NotConnectedError as err:
print(err.message)
|
a3ad7c7c52123b93bf68a3723bb327ab5b89527e | 50514562fd4f8ea688e1c24444af7fa6f941c982 | /main/page/BasePage.py | 8f6c9ae96d3c9b2e86e54faeda7c131c7dedd9d8 | [] | no_license | barrioso/ExpediaTest | 04fcc1b99a299a3675d4a47fbe3f41a09e2dc119 | acd12d43859ef5db51aec560564634e513ef58ba | refs/heads/master | 2022-06-18T07:27:45.923025 | 2020-05-10T20:56:32 | 2020-05-10T20:56:32 | 262,869,427 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,884 | py | BasePage.py | from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
class BasePage:
DEFAULT_FLUENT_WAIT_TIME = 10
def __init__(se... |
40f81ae9a8dde40b3366f06747b75c38609344c9 | 82651d604d68e798d9e58ec51ddbced420b96be5 | /src/lib/tools.py | 75ea2882c779448dbc6ed2a1555de2d34aed51e6 | [] | no_license | akoeb/dashboard | 902ae1be0aecf5a905e0e6cf5ee2e1dcee521695 | 79a74a6929bb30b9a973bb70bb306f39e594893b | refs/heads/master | 2020-05-17T18:32:46.753917 | 2019-04-22T18:33:49 | 2019-04-22T18:33:49 | 183,887,489 | 0 | 0 | null | 2019-04-28T09:34:08 | 2019-04-28T09:34:08 | null | UTF-8 | Python | false | false | 2,429 | py | tools.py | import os ; import pandas as pd ; from pandas.plotting import register_matplotlib_converters ; register_matplotlib_converters() # register converters
from lib.config import config
'''Takes a column, removes all the duplicates
and returns a list of unique values.'''
def makeList(df, what):
newList = []
for... |
b8d80acfe75ed48376e026cac74d47af084d7f38 | 01184c7098e40569dd48219fbe3012321cf31244 | /test/test_store/test_store_triple_store.py | e37530647a00cc3f756b3871939ed767cc7412cf | [
"BSD-3-Clause"
] | permissive | RDFLib/rdflib | 1c81136f2656207042f81374540d8e1f02be28f5 | 077f4ac3abb3038b266f40dc95a8ccf9f4e9a84c | refs/heads/main | 2023-08-30T11:22:00.041615 | 2023-08-29T21:31:43 | 2023-08-29T21:31:43 | 3,342,046 | 1,754 | 562 | BSD-3-Clause | 2023-09-12T14:58:35 | 2012-02-03T05:49:13 | Python | UTF-8 | Python | false | false | 689 | py | test_store_triple_store.py | import pytest
from rdflib.graph import Graph
from rdflib.namespace import RDFS
from rdflib.term import BNode, Literal
remove_me = (BNode(), RDFS.label, Literal("remove_me"))
@pytest.fixture(scope="function")
def get_store(request):
store = Graph(store="default")
store.open("store")
store.add(remove_me)
... |
8ef49fe1efd3da060c5ab8f734fbc40a5e482151 | 817cec1921d5e89956dd7f0e8ec59ecd8e14810c | /variables_and_loops.py | 2ac8c0c61596a4b43fafecf50f579df94d16b2ba | [
"MIT"
] | permissive | SpencerFr/astr-119-hw-2 | 15fe2831e0a2b040d71f037014d1fb9241f4c634 | 0475b946bcf4bd0ab1f1b9ceaf389b8f04b75b86 | refs/heads/main | 2022-12-31T08:07:07.287502 | 2020-10-18T20:26:42 | 2020-10-18T20:26:42 | 302,429,922 | 0 | 0 | MIT | 2020-10-18T20:26:43 | 2020-10-08T18:33:22 | null | UTF-8 | Python | false | false | 579 | py | variables_and_loops.py | import numpy as np #we ise numpy for lots of things
def main(): #define the main function
i = 0 #declare integer i = 0
n = 10 # declare n = 10 integer
x = 119.0 # float point num are declared with .
# we can use numpy to declare arrays quickly
y = np.zeros(n,dtype=float)
#we can use loops to... |
a50d5952412fb26c0a208db69406badc6734d619 | e6721078736896924f98f4803da73cb490b8b1a2 | /apps/ndb/api.py | ae67ea83527d4b99f856ad0df1ebcdf5542a2695 | [] | no_license | bigswitch/snac | 04776e32612f94bc9059be2318ad1cc6d0698e65 | e1d5311005c767f320abd25e0bcd4c5948b72e2c | refs/heads/master | 2021-01-01T16:51:33.340411 | 2011-05-06T17:19:25 | 2011-05-06T17:20:03 | 762,683 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,253 | py | api.py | # Network database features are:
#
# - Support for multiple tables, each consisting of arbitrary # of
# columns. Each column can be used as a key while retrieving rows.
#
# - Supported operations are get(key1, key2, ...), and put(key1=val1,
# key2=val, ...).
#
# - Put() and get() operations can be grouped into tra... |
3b5bbe0beccd035f1730b6df4c46089adcda1682 | 67019a666092a12dabe4b0aa0b6f8a7cd947885e | /sealions.py | 4f2f2f7ee88c21f5f463240f0365915857e78a0e | [] | no_license | nishathussain/Kaggle-sealions | b6b154a3b79cfafbef0fd272555bf608cc000d1e | 6b91e0349e8ba52c68f593e6eb4d743ad5085c8d | refs/heads/master | 2021-01-19T17:28:14.834019 | 2017-08-22T12:54:56 | 2017-08-22T12:54:56 | 101,061,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,114 | py | sealions.py | import os
import os.path
import sys
from PIL import Image
import numpy as np
from polarbear.aimg import AnnImg
from polarbear.ann import Ann
from random import seed, shuffle
from tqdm import tqdm
import pandas as pd
CLASS_NAMES = (
'adult_males',
'subadult_males',
'adult_females',
... |
a359faaeb5315767b64e88c769dd4b464ad49a31 | f4718ccf40b56896da8fb5de910e773ca3461884 | /6.py | eb4eeffdecbeea5a933f7450e9108543cbf1ed4a | [] | no_license | Surye/aoc2018.py | 428b815342ccb6df6c588a737f74b6c8dadb2d2a | deba74b52ef750e92d23627f62778a2dfcc0680e | refs/heads/master | 2020-04-09T04:28:56.994544 | 2018-12-07T10:02:49 | 2018-12-07T10:02:49 | 160,024,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,157 | py | 6.py | from collections import Counter
day = 6
def dist(p1, p2):
return abs(p1[0] - p2[0]) + abs(p1[1] - p2[1])
def algo1(data):
coords = [tuple(map(int, x.split(","))) for x in data]
bounding_x = [max([coord[0] for coord in coords]), min([coord[0] for coord in coords])]
bounding_y = [max([coord[1] for co... |
6018f6c6b06b1ce7466a13e8e381331ec57909b5 | ba0c7c0df3c073c3396559c41452703173762d21 | /exercicios-iv/questao4.py | 9c564ef6d95c0b3c29f4e30db5602e64fb71e1ca | [] | no_license | felipemfp/py-exercicios | fa9f5389c0007cc26488767d2243a4c2afcfed72 | af9ec6f4f60e4e3dac628279aa95f258fdf626de | refs/heads/master | 2021-01-21T01:58:21.605493 | 2016-06-07T01:54:42 | 2016-06-07T01:54:42 | 48,954,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | questao4.py | # Implementar uma classe Vetor:
# - Com coordenadas x, y e z.
# - Que suporte soma, subtração, produto escalar e produto vetorial.
# - Que calcule o módulo (valor absoluto) do vetor.
class Vector(object):
def __init__(self, x, y, z):
self.__x = float(x)
self.__y = float(y)
self.__z = float(z)
@property
def ... |
404006696870d37966e209950898f7675a8b8ba3 | 8aabbe31ac601afe7859554852e707ae59466421 | /crateweb/apps/core/social_auth/pipeline/associate.py | f9aed385bd9104c2bacc278c93b9be0bd52be4c5 | [
"BSD-2-Clause"
] | permissive | crate-archive/crate-site | 67b20f2d62360d16e7aced20c1c9f8431f63d20c | fd7a623357a4615eadd9a66bd1e9d6894653c2c9 | refs/heads/master | 2021-01-10T20:38:20.610262 | 2012-05-12T16:12:29 | 2012-05-12T16:12:29 | 3,050,759 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | associate.py | from django.core.exceptions import MultipleObjectsReturned
from account.models import EmailAddress
from social_auth.utils import setting
from social_auth.backends.pipeline import warn_setting
from social_auth.backends.exceptions import AuthException
def associate_by_email(details, *args, **kwargs):
"""Return us... |
44408b665979869fe716ab0524f20cdd387315c9 | 8211849ff84585318867ba5972f02b52852ee78b | /code/mir_final.py | 19b62f25e40e561dd8b844a2b966ff621155b196 | [] | no_license | grace107061513/Acapella-Creator | 5b979846f908dc29b5699c0f2dbdc15e14972d65 | 99037eec865eb35cdaa8d06e2c76ca9b546d8d50 | refs/heads/master | 2020-06-03T01:15:46.905151 | 2019-06-11T09:00:00 | 2019-06-11T09:00:00 | 191,373,517 | 0 | 0 | null | 2019-06-11T13:06:49 | 2019-06-11T13:06:48 | null | UTF-8 | Python | false | false | 9,610 | py | mir_final.py | # -*- coding: utf-8 -*-
"""
Created on Wed May 29 20:29:42 2019
@author: user
"""
import sounddevice as sd
import soundfile as sf
import librosa
from madmom.features.beats import BeatTrackingProcessor
from madmom.features.beats import RNNBeatProcessor
import utils
import matplotlib.pyplot as plt
import sc... |
ddc249cb0817f824d52eb10ba40400af7c347f48 | 88ac4dbef327380853bb5d9dcf9bc477d8867fb0 | /wap/urls.py | afda3a654fc125b5d223d2eae8ddf9cf32f17191 | [] | no_license | 695518147/mysite-dev | e00cb69a33d51665fe7241f1007bf9d3212216fa | f7061a617299b695ee9de2db890f1e86bcdb07ef | refs/heads/master | 2020-04-23T12:03:47.363562 | 2019-05-17T14:00:27 | 2019-05-17T14:00:27 | 171,157,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | urls.py | from django.urls import path, re_path
from django.views.static import serve
from mysite import settings
from wap import views
urlpatterns = [
path('', views.index),
]
urlpatterns += [
# 媒体文件前缀
re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
# 文件前缀
re_path(r'^stati... |
7c689d6fa04aab9e5dfb09ffa1eb53bbf237bd6d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03071/s069581496.py | 72a7002ca08022183f3459197239af1dc6144bae | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 421 | py | s069581496.py | import sys
sys.setrecursionlimit(10**6)
#a = int(input())
#b = list(map(int, input().split()))
a, b = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split... |
649be81e8c1f0e71f0bcfc09644eaa02e75c742d | 431f29ad64ca4ca2c37480c44802d9258d2d08e8 | /prairie/paire-impaire.py | 8be1cb0c2fb9ecb36f508c1f263fb60307431d22 | [] | no_license | cobee509106/Simplon-p2-Codou | 072602cec82356a9b522dd16d817c838ed80e950 | 7934c0f987062babc39a1ff7f36cf271a727edcd | refs/heads/master | 2020-05-06T13:31:10.666551 | 2019-05-19T16:40:33 | 2019-05-19T16:40:33 | 180,141,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 153 | py | paire-impaire.py | a = input ("saisir la valeur de a")
a = int (a)
r = a % 2
if (r==0):
print (" le nombre saisi est pair")
else:
print (" le nombre saisi est impair")
|
3ff273525eae4b1a9406303f166dda378ebe7373 | dd53532535cfddfe5ecc33e7f3b04c30503b04f9 | /main.py | ad2103d01bf58f11d2e8a6a5d518a5ed8a464315 | [] | no_license | krendelek42/Project6 | 4b07a956d1136770da988a8294acaedecd361494 | d594e511426ac756bb4e85b59d4063b84bbb25eb | refs/heads/master | 2023-04-11T08:30:48.672686 | 2021-03-21T09:32:45 | 2021-03-21T09:32:45 | 349,951,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,161 | py | main.py | '''Орнамент'''
import turtle as t
t.speed(100)
def triangle(a, b, c):
t.fillcolor(c)
t.down()
t.begin_fill()
t.right(45)
t.fd(a)
t.right(90)
t.fd(a)
t.right(135)
t.fd(b)
t.end_fill()
t.up()
t.right(90)
t.fd(100)
def square(c,a):
t.fillcolor(c)
t.down()
... |
a28c795b71fb9e6d40510f9eebecdd98bf070e4a | 0aac75d4028b3e25294a9fcf002c5da396c156db | /customer/migrations/0013_auto_20200425_1434.py | 51e4af091e463cd4204bd11bf8a56b9be0947845 | [] | no_license | EliteDevSolution/DjangoCRM | d2688f2469f2d688fe63acdd1b6479485ecc8019 | 3b08ba9e9ea0c554f608eed41b9e7a79af94e526 | refs/heads/master | 2023-04-20T10:14:04.969228 | 2020-07-14T17:06:48 | 2020-07-14T17:06:48 | 279,645,715 | 5 | 0 | null | 2021-04-08T21:21:59 | 2020-07-14T17:05:29 | Python | UTF-8 | Python | false | false | 1,571 | py | 0013_auto_20200425_1434.py | # Generated by Django 3.0.5 on 2020-04-25 04:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('customer', '0012_customer_customer_check'),
]
operations = [
migrations.AddField(
model_name='r... |
6dc030d371d1b151a64c165e6a637706237470c6 | bc4b02a0c0fb7304f7b7dd67c656c1d13f84d80b | /snappycap/lib/utils.py | aac418c71907341ef59ec2fc9c39c32251f5fcfb | [
"MIT"
] | permissive | CoolHandSquid/SnappyCap | b0a479d1e5bd51565ee384290ca0175ad6dcf551 | 1da6ff28466778830f5c691fae4597d694ec2c04 | refs/heads/master | 2020-05-22T19:31:41.453208 | 2018-11-17T16:00:36 | 2018-11-17T16:00:36 | 186,492,885 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,286 | py | utils.py | """
__author__: Jamin Becker (jamin@packettotal.com)
"""
import os
import sys
import time
import socket
import logging
import pathlib
import warnings
from hashlib import md5
import psutil
import pyshark
import progressbar
from magic import from_buffer
from terminaltables import AsciiTable
from snappycap.lib import... |
0bd04f991d34c0001d0cd8664fe871d57212655d | 30229b5e4cb72eab4a9d7c4fa5acabb53df46061 | /data/tests/test_constants.py | e64b5072a3a71a1f49b60653d1519ccb7cc8e0d5 | [
"MIT"
] | permissive | codeforsanjose/calischools | 7e0b30a292581634170f3922a54e26c964ad9568 | ada0d7f1e5da999f11c24bc03cae70aeb6535cf1 | refs/heads/master | 2021-01-10T13:10:27.539602 | 2015-10-24T05:31:12 | 2015-10-24T05:31:12 | 43,990,002 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | test_constants.py | from data.api.cde import CdeAPI
from .utils import fixture, json_fixture
CDE_BASE_URL = CdeAPI().base_url
CDE_PUBLIC_SCHOOL_ENDPOINT = 'details.asp?cds=01100170123968&public=Y'
CDE_PRIVATE_SCHOOL_ENDPOINT = 'details.asp?cds=57726787099492&public=N'
CDE_PUBLIC_SCHOOL_DETAIL_HTML = fixture('public_school_detail.html')
C... |
352a4f984f250cc1199b55f17045387e3f4c9a4e | 2a79d05a853bee248909088c0d2a0f5b5d27058d | /Tree.py | 3c2396cb7334eb8823d32a25db3e32f7ae985684 | [] | no_license | fanyang88/distributed-algorithm_Agarwal-El-Abbadi | 2e6878ad79280e456925d55c70b1c97a08217b7c | 2b9b1244fed472ec21b3065361c52b541b2b33de | refs/heads/master | 2016-09-01T21:30:31.466473 | 2012-12-29T02:21:41 | 2012-12-29T02:21:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,442 | py | Tree.py | import math
class CNode:
left , right, data = None, None, 0
def __init__(self, data):
self.left = None
self.right = None
self.data = data
class CBOrdTree:
def __init__(self):
self.root = None
def addNode(self, data):
return CNode(data)
def insert(se... |
e55a0e68b4ce963d57645626760684ede6cc1c84 | 419a5aa23f11917b95b768f178a323ef15b03019 | /flow/render_status.py | 657808d0f6ffe7e710124e8b111eb5fec55a39d7 | [
"BSD-3-Clause"
] | permissive | glotzerlab/signac-flow | 571bb0987959616a755e3a99b619e9c2760cb5f5 | 845865c5f34135243ac21800495c46c915662c64 | refs/heads/main | 2023-09-01T02:16:58.299895 | 2023-08-01T13:30:26 | 2023-08-01T13:30:26 | 168,431,310 | 54 | 48 | BSD-3-Clause | 2023-09-06T19:07:18 | 2019-01-30T23:27:23 | Python | UTF-8 | Python | false | false | 5,314 | py | render_status.py | # Copyright (c) 2020 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Status rendering logic."""
from .scheduling.base import JobStatus
from .util import mistune
from .util.misc import tqdm
def _render_status(
template,
template_en... |
951ec8c89828485fab24cc75e5dfa99a0c23575a | a8f2ed3b244e415787e6dc5838405143cfcb71b3 | /other/p/Snipppets/mandelbrot.py | dccb86e46375bb73d966c420ae274b758bb2ce07 | [
"MIT"
] | permissive | thezaza101/Python-Code-Snippets | 60676aec58da63f919ef6c5bc8c0a54a83de90ab | e9c3004165161960f812af8f83794adc8a11f891 | refs/heads/master | 2023-02-06T00:51:57.731182 | 2023-02-03T08:04:51 | 2023-02-03T08:04:51 | 157,140,258 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,641 | py | mandelbrot.py |
import sys
import math
import numpy as np
from numba import jit
from PIL import Image
from itertools import repeat
from multiprocessing import Pool
@jit
def get_col(args):
iy, width, height, max_iterations = args
result = np.zeros((1, width))
for ix in np.arange(width):
x0 = ix*3.0/width - 2.0... |
fe97d012feab15b41fc77e3eb42db4504b844984 | ea3d8137a51974569b0ea270d34908eeb5627aa2 | /app/__init__.py | cd329b5bc925fdec7dc852a07387f6acd52fba3a | [] | no_license | RatarovDaniil/flask-docker-heroku | 1f53616ccda14b209da491fc3c1b6a3f74171a03 | 4a63be0eca6e6c47ec06462e3f5b4cb6c00bd218 | refs/heads/master | 2023-05-11T21:26:59.824339 | 2019-09-17T13:22:44 | 2019-09-17T13:22:44 | 209,047,338 | 0 | 0 | null | 2023-05-01T21:15:26 | 2019-09-17T12:25:47 | Python | UTF-8 | Python | false | false | 142 | py | __init__.py | from flask import Flask
from .config import config
app = Flask(__name__)
app.config.from_object(config['production'])
from app import routes |
d36e578bd3a18686a008d4120d24312e455e8b17 | e8b5b9b5d01dcd172e735e26e14d10983fe47bb0 | /volumes.py | e9e54c3a7faef56bbe27378decd31b120dd543bc | [] | no_license | Imhotep504/PythonCode | 2502e02ae5af03c636a337079f1f754746f48156 | 6e28eb828064728cf0f23db0ac52c7342d1a808a | refs/heads/master | 2021-01-10T16:29:51.571173 | 2017-01-16T03:01:13 | 2017-01-16T03:01:13 | 46,542,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | volumes.py | #!/usr/bin/python
#volumes
from math import pi
def sphere(r):
return (4/3)*pi*r*r*r
def cube(l,w,h):
return l*w*h
def cone(r,h):
return (pi*r*r)*h/3
|
d8966cc0152bd6faf7e30cde346713fc5bdf4536 | 48ba8d0788e4ac7d4cacd7e7a2e2cf4f391c85ad | /Directory_Operations/traverse_directory_tree.py | 52f535c9e27ddea6b8b6acf7e5b782083ff8a9b6 | [] | no_license | rahulvshinde/Python_Playground | c28ac2dc0865e254caa5360c3bb97b4ff5f23b3a | 7a03b765dd440654caba1e06af5b149f584e9f08 | refs/heads/master | 2023-04-19T17:25:55.993837 | 2021-05-17T01:15:30 | 2021-05-17T01:15:30 | 280,736,898 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | traverse_directory_tree.py | import os
rootDir = "/Users/rahuls-mac/Desktop/Devops_Project/"
#Print tree strcuture for the files and subdirectories under root directory
for dirname, subdirlist, filelist in os.walk(rootDir):
print("Found Directory: %s" % dirname)
for fname in filelist:
print("\t%s" %fname)
#print absolute path fo... |
d5c2e17cae5f3eafa7248bbf9eecb528f32be3ce | affa1e26ca0db5b5a3ca1a37cbe8bf3072edb760 | /MRT_OD_traffic_analysis.py | 3cc68fffbe713a1ebf1d83f9dccbef726a520a99 | [] | no_license | lwkuant/Side_Project_Taipei_MRT_OD_Traffic_Analysis | 4356047fe6ec36cf7491ffcad5e4ae6ae1c1fbf6 | 3e6eae64bae938ba381178a9da924c888a5e394d | refs/heads/master | 2020-04-10T02:30:15.138336 | 2018-03-18T23:34:27 | 2018-03-18T23:34:27 | 124,256,136 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,719 | py | MRT_OD_traffic_analysis.py | # -*- coding: utf-8 -*-
"""
MRT OD traffic analysis
http://data.taipei/opendata/datalist/datasetMeta?oid=63f31c7e-7fc3-418b-bd82-b95158755b4d
"""
"""
### Load required packages
import pandas as pd
import numpy as np
import os
os.chdir('D:/Dataset/Side_project_MRT_OD_traffic_analysis/data')
### Process the data in... |
cf583249c80e0c9324e905485437e14020e6dd7d | 86a9800830fa7290772b17bced70af3d46cb6906 | /points/views.py | b892131253879af5fa9d76f09ad7b1553c87827d | [] | no_license | sonimik13/canairio_backend | 6f6495c0a95ea74a64b568e9bb1d758293b6e5c3 | 0c3b967146ab2a8fb4553ac7383a6f2ef90f654d | refs/heads/master | 2023-05-12T18:39:18.517714 | 2019-09-10T17:59:00 | 2019-09-10T17:59:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,934 | py | views.py | # Create your views here.
import logging
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from drf_yasg.utils import swagger_auto_schema
from rest_framework import viewsets, permissions
from rest_framework.authentication import BasicAuthentication
from rest_framework.decorators imp... |
6453bceda02a8b9b91b0ad72354fc1c4aad7dfb2 | 9cb71e043d688c640025c63f05bc413d74d37540 | /signal_comparison.py | d2dd985b9e24fce71cfb06d201c65959b95b4cc1 | [
"MIT"
] | permissive | mknecht/gruschen | 364e02d3fbeb7cd9e640be4fd9dd08c8ee2ea33e | ec46512fb9575beb015704e6b5bffb281f78d8a6 | refs/heads/master | 2020-12-28T23:45:51.666532 | 2015-07-12T16:58:37 | 2015-07-12T16:58:37 | 38,993,917 | 0 | 0 | null | 2015-07-13T05:58:03 | 2015-07-13T05:58:02 | Python | UTF-8 | Python | false | false | 2,314 | py | signal_comparison.py | import dbscan
import mfcc
import operator
import pre_processing
import sound_file
def compare_files(filenames, save_preprocessed_files):
class Sim:
def __init__(self, name1, name2):
self.name1 = name1
self.name2 = name2
characteristics = {}
for filename in fi... |
baac376aa33206e683eb575c19cf8d1862a80d29 | 6fe788b871194f491e12652559e37688653677cd | /2 лаба/2.py | 27d7f1e1c0d2164febb850d829494d05df720893 | [] | no_license | SarutoriGod/- | 6ded9775b91328629d371fb7aa5f50784d75199c | 4ea18918426c629313b5e4d004c73d19112c0af8 | refs/heads/master | 2020-05-21T21:26:23.704794 | 2019-05-25T11:26:43 | 2019-05-25T11:26:43 | 186,154,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | 2.py | my_string = "Ф;И;О;Возраст;Категория;_Иванов;Иван;Иванович;23 года;Студент 3 курса;_Петров;Семен;Игоревич;22 года;Студент 2 курса".split(';_')
for i in my_string:
i = i.split(';')
print(i[0] + ' ' + i[1] + ' ' + i[2] + ' ' + i[3] + ' ' + i[4])
|
53f0eb2dfd58103dfefbfc64ab4928a02971e8ed | 47fca3bbc47306bfc8f9f79b033d48522ec272c5 | /rijalrifus.py | 89c15de17f0ce6ceace4bc5a863c959c8d04f4cb | [] | no_license | RijalRifus17/Hacktoberfost | 96e1b4f78c9c5a4d3a08cd65a0106a93257b59b9 | f661b0bdedaf2f4906bb8f73d1fdcc04cc40c179 | refs/heads/master | 2021-07-16T13:51:07.169962 | 2019-10-01T14:11:01 | 2019-10-01T14:11:01 | 212,113,018 | 1 | 2 | null | 2020-10-02T13:12:43 | 2019-10-01T14:09:47 | Python | UTF-8 | Python | false | false | 15 | py | rijalrifus.py | print('Kuyyy')
|
1143131874c48b96a6bf77f405c621a3bdff6bea | 99d72c1cae87fb4e296267c3dbf26f067001dc2b | /aws-mfa-gen/aws-mfa-gen | ded9ceb25805ebce189b599acf9e4377fc0c1ad7 | [
"MIT"
] | permissive | mbyrdziak/aws-mfa-gen | fb9f2acb64d6a046ce9dc2112e57d0bb047e4e3f | 7b60c6d4e63860ee7ae1b915274cee392e1b20e4 | refs/heads/master | 2020-04-23T20:53:16.362386 | 2019-02-19T12:17:34 | 2019-02-19T12:17:34 | 171,453,695 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,628 | aws-mfa-gen | #!/usr/bin/python
import logging
import random
import os
import sys
import boto.sts
try:
import ConfigParser
except:
import configparser as ConfigParser
from os.path import expanduser
##########################################################################
profile = os.environ['AWS_PROFILE'] if 'AWS_PROFILE' i... | |
ddd9ad5fa356500bf4d604ac919480ac910befea | fc9f8c12c67c7079b2e0f32f997b7005fafca08d | /reverseInt.py | ca09f6b127a3521ed05d559a0c5ef649dd71c473 | [] | no_license | SeanM743/coding-problems | 0901cc162fb949e11f0166c0d0a48b48a5b17337 | b84915b2a51721b3ae9690011d8dff5fd670fe52 | refs/heads/master | 2020-05-19T05:30:48.414966 | 2019-10-07T13:50:30 | 2019-10-07T13:50:30 | 184,851,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 369 | py | reverseInt.py | # -*- coding: utf-8 -*-
"""
Created on Thu May 2 17:28:24 2019
@author: seanm
"""
def reverse(x: int) -> int:
st = str(abs(x))
rev = ''
for i in st[::-1]:
rev += i
rev = int(rev)
if x <0:
rev = -1*rev
if (x > 2**31-1) or (x < -2**31):
retur... |
9e2ca2ae4141b8dae6a7cceaf7099bdc4c3fe222 | 4bf61291adcbfcd6cab745b2e0662380719c20e5 | /oop/cwiczenie_2.py | 8a9c7e7af6af2d8aee7dac0ac9d57e11db2622e1 | [] | no_license | darkendar/python_bootcamp | 812ac3959381120afbc1000c907d9509437e7a44 | 404102a3cabb0865f79cece1d83c32c983940a09 | refs/heads/master | 2020-03-31T10:04:09.026901 | 2019-05-24T17:07:52 | 2019-05-24T17:07:52 | 152,121,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | cwiczenie_2.py | class Osoba:
def __init__(self, imie, nazwisko):
self.imie = imie
self.nazwisko = nazwisko
class Employee(Osoba):
def __init__(self, imie, nazwisko, stawka):
super().__init__(imie, nazwisko)
self.stawka = stawka
self.czas_pracy = 0
# def register_time(self, czas_p... |
cbefca1a34e9371fb3d38381e160e343c7bcd8cf | 9d694f2e88a3e512be50156b171f9827267d58c3 | /Interview_problems/find_min.py | ca648d365b17c2db7a25c74eda489aaa57d0ef4c | [] | no_license | no-raise/CSC-Problems | afcff65870493e3dd05545df83ba2c4af727a35c | bf393855dfbfaa9bb0f487088ac18ac3ac9ac870 | refs/heads/master | 2021-07-01T10:59:01.752308 | 2021-02-07T21:07:11 | 2021-02-07T21:07:11 | 218,854,332 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42 | py | find_min.py | # Find minimum in sorted and rotated array |
28324956e96ac7ad98bc4d4de8d9cec884d997bc | 1c416d327ef9461c4325c01fee31f4abf7b488d6 | /custom_components/svt_play/video_url_fetch/live_test.py | 91e2af3c80161f3bcefe0e5d0c25d4be8fc2a820 | [] | no_license | lindell/home-assistant-svt-play | dec22c0bf9783094b36a3a72aa6108098bc07e8e | a7f363c3daad01c027365b72f164c4f73133eee0 | refs/heads/master | 2023-08-19T12:46:18.869662 | 2022-04-15T21:42:17 | 2022-05-24T17:32:12 | 242,335,771 | 22 | 5 | null | 2022-05-24T17:28:20 | 2020-02-22T12:13:11 | Python | UTF-8 | Python | false | false | 1,219 | py | live_test.py | from video_fetch import video_url_by_channel, video_id_by_time, video_url_by_video_id, suggested_video_id, random_video_id
import pytest
def test_rapport_by_time():
id = video_id_by_time('rapport')
url = video_url_by_video_id(id)
assert url.startswith('http')
def test_rapport_by_suggested():
id = su... |
43590423ab79277ba3197c6677a2e628e98798d4 | 0de5b6015b532125deca088af4aef936202451e5 | /api/item.py | f7379b22afe58052d24f6a79368f3adc26496e05 | [] | no_license | EmeraldHaze/QFTSOM | 75974c7d44a0acd5f39415c8328065861e284114 | f14937bcb9a6c0abf891e3ff0102256b93af2d37 | refs/heads/master | 2021-01-10T21:32:18.514550 | 2012-09-23T14:23:12 | 2012-09-23T14:23:12 | 2,121,761 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,478 | py | item.py | from core.utils import copy_attrs, Settings
from api import Real, PotentialReal
class RealItem(Real):
"""Represents an specific iteming of a specific person."""
def __init__(self, parent, name):
copy_attrs(self, parent, 'equip', 'stats', 'actions', 'data')
self.name = name
self.owner =... |
29268dca54d2584db6c58fedd9f9b04bf1cb9fca | 46451e8f380893568350682ccf8fb61c010cdef6 | /gnmutils/parser/dataparser.py | 8175f4574ffa01e324106767c0dfd1671ef3840c | [] | no_license | eileen-kuehn/gnmutils | 7b95391e379e7f07951f48a6cc63a8339c40ab39 | 85d7505c417fc9a0c05303beb79e720e16ada42a | refs/heads/master | 2020-06-18T21:46:26.056327 | 2019-08-16T14:26:00 | 2019-08-16T14:26:00 | 196,461,971 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,894 | py | dataparser.py | """
Module offers abstract definition of a :py:class:`DataParser`.
"""
import logging
from ..exceptions import ParserNotInitializedException, FilePathException
from ..utility.tree import Node
class DataParser(object):
"""
A :py:class:`DataParser` is able to parse different formats produced by the GNM tool. D... |
f9cf5c340dccb0d760d7c083a410515d32675ab9 | b8ef5030e8ca3fbe473ed5f12b163f405db37780 | /tests/test_vault.py | 951646a2b43f23c00abd13e4a77016d1c88000a6 | [] | no_license | tomlinford/docker-integration-sample | 2465a294d761c6e99d3214540ae4f3b3512fe636 | 57ebf4fb3413ac066fa74c78034b97b168e1a5bc | refs/heads/master | 2021-01-10T02:43:36.806064 | 2015-12-31T20:58:16 | 2015-12-31T21:13:36 | 48,862,138 | 24 | 6 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | test_vault.py | from .base_test_case import AppTestCase
class TestVault(AppTestCase):
compose_file = "vault"
def test(self):
secrets = self.make_request("get", "secrets").json()
self.assertEqual(secrets, [])
secret = self.make_request("post", "secrets", data={
"secret": "foo",
})... |
b6f1e6f46f5233d2be531590681a5be01200dbc3 | 21e9342b7b9d169f8d9e9ebab7697dcac391eacd | /ecs_crd/destroyStackStep.py | 3a27ca65a3b3f426d6921160bd266bb1f9fbf154 | [
"MIT"
] | permissive | AdventielFr/ecs-crd-cli | 721ce63a91d3b70fa465fb7765a7620ac4778d8b | d90757dc353b4147b81b8ab7688bee339c00ba63 | refs/heads/master | 2022-12-24T01:26:28.958064 | 2022-07-08T05:02:28 | 2022-09-20T21:01:14 | 207,733,167 | 4 | 7 | MIT | 2022-12-08T06:09:02 | 2019-09-11T05:49:36 | Python | UTF-8 | Python | false | false | 2,760 | py | destroyStackStep.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import boto3
import time
from abc import ABC, abstractmethod
from ecs_crd.canaryReleaseDeployStep import CanaryReleaseDeployStep
class DestroyStackStep(CanaryReleaseDeployStep):
def __init__(self, infos, title, logger, stack_infos ):
"""initializes a new in... |
0cce2b53f3849b6afb6ef5a015fa563e5b95ee27 | 6146e33102797407ede06ce2daa56c28fdfa2812 | /python/GafferOSLUI/OSLObjectUI.py | e7a217f71f35ba16033b2b99d32e6e1e0349dbf1 | [
"BSD-3-Clause"
] | permissive | GafferHQ/gaffer | e1eb78ba8682bfbb7b17586d6e7b47988c3b7d64 | 59cab96598c59b90bee6d3fc1806492a5c03b4f1 | refs/heads/main | 2023-09-01T17:36:45.227956 | 2023-08-30T09:10:56 | 2023-08-30T09:10:56 | 9,043,124 | 707 | 144 | BSD-3-Clause | 2023-09-14T09:05:37 | 2013-03-27T00:04:53 | Python | UTF-8 | Python | false | false | 9,834 | py | OSLObjectUI.py | ##########################################################################
#
# Copyright (c) 2013-2014, John Haddon. All rights reserved.
# Copyright (c) 2018, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... |
499666963f11cefc653290b3b877db26689ee268 | a926b7ab55732a847033696d57c24f6d9b4c12b8 | /clients/summary_milestone.py | 9b067aff004382e6c27dfbb3d2e80b8d78077082 | [] | no_license | aroth-arsoft/pkg-trac-clients | a24b3a2dff3ebfe498cc5dc9b0e0bdca888bc896 | 1dce48700c4c08b381c7cdbb42ebb6e872747acd | refs/heads/master | 2021-06-07T19:35:31.378278 | 2021-04-17T12:43:46 | 2021-04-17T12:43:46 | 135,186,623 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,972 | py | summary_milestone.py | # -*- coding: utf-8 -*-
import time
from lxml import etree
from trac.core import Component, implements
from trac.util.datefmt import format_date
from trac.web.chrome import web_context
from trac.wiki.formatter import format_to_html
from clients.summary import IClientSummaryProvider
from clients.processor ... |
0674b1ec27428ad80b3fcef3824b3e3d9cdd70ab | b3256db9a97fef697e77852ca8358760a4b491b9 | /centrify_testing.py | d3afe79edfbcf46444f3d8fb6de53790ac2aab7f | [] | no_license | angrek/dashboard | f6e36f6f1ad3ec0b2231e22b1a6be5c4c1843935 | 40f6602aeb569e49dfb68cbe99b5b207da1fd430 | refs/heads/master | 2020-04-05T14:07:07.025675 | 2016-09-16T19:07:43 | 2016-09-16T19:07:43 | 23,161,596 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,515 | py | centrify_testing.py | #!/home/wrehfiel/ENV/bin/python2.7
#########################################################################
#
# Script for centrify testing
#
# Boomer Rehfield - 6/20/2015
#
#########################################################################
import os
# from paramiko import SSHClient
# these are need in django... |
f515e98c80fb7df42ea9d93deea4ca93a2d0564f | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/226/users/4148/codes/1709_3031.py | 3032c14b719396433cfc5291196dbc508144f05c | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | 1709_3031.py | from math import*
x = float(input("valor de x: "))
if (x<=1):
print("1")
elif(1<x<=2):
print("2")
elif(2<x<=3):
print(round(x**2, 2))
elif(x>3):
print(round(x**3, 2)) |
731aaab43ab328d4cfce6c05fbe39cf20be2c34d | 842d9237402f1b5f4533b9af5d9c722aad37deab | /__init__.py | 84fac0d9532d5907099133c24039eab17d594e10 | [] | no_license | josedanielcl18/Thesis-Python-Prototype | 945f595c9997f1d41daa5c6280fa618a0e50f312 | da93a524a7a90daec1d73b92c18845f5159f2523 | refs/heads/main | 2023-02-04T03:48:20.128993 | 2020-12-22T20:10:23 | 2020-12-22T20:10:23 | 323,722,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | __init__.py | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 26 13:33:48 2020
@author: jcuellar
"""
|
99de09e0c20da95e23ae750ffdd98900d0a131da | d46035500be69465849ed908ec235371bcc46284 | /catkin_ws/src/nuc_main/src/handlers.py | cf320d96758fb37c4fea7c2df5a07e4cf9b7d10f | [] | no_license | choonkiatlee/rescue-major-software | 610210e6ed8753ec7a528f16f195759c70c17e21 | 24f70bdd35894f1c3edc420e8ded175bb0f24ac7 | refs/heads/master | 2020-04-02T17:41:05.508924 | 2019-11-04T13:19:09 | 2019-11-04T13:19:09 | 154,667,695 | 0 | 1 | null | 2019-11-04T11:49:40 | 2018-10-25T12:33:52 | Python | UTF-8 | Python | false | false | 4,915 | py | handlers.py | import rospy # in PyCharm shows error, solution: https://gavazzi.us/2017/07/31/pycharm-ros/
from std_msgs import msg
import drive
# SUBSCRIBER CALLBACKS
def _commands_cb(command):
try:
if chr(command.data) == 'r':
drive.full_reset_and_calibrate_all()
if chr(command.data) == 's':
... |
edbbe4df41ae124a00f0d4b31d0c64cec9a8997e | bc7daa1dc229ab3bd943ddaaf1ccd03138f8e4e7 | /tests/config_parser_test.py | 0db455f13c1b2b6993971f558554214a0c9353d3 | [
"MIT"
] | permissive | cash2one/Postr | f6e944272c1c8ba82fda70f18f09aba65fe46952 | c374648134123f857babb65aff161a4c3c470502 | refs/heads/master | 2020-04-24T20:03:42.150403 | 2018-12-11T03:00:15 | 2018-12-11T03:00:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | config_parser_test.py | import os
import secrets
from typing import Generator
import pytest
from postr import config
from postr.config import update_api_key
from postr.config import git_root_dir
from postr.config import get_api_key
from postr.config import add_section
from postr.config import _current_config
from postr.config import _config_t... |
5337ca398f7c4e67e6ef12d0c4426394ccab3696 | b8c23bcd57c888557412455d23b3acb5963c92ea | /Assignment1/e22.py | 9afa537002186eb72617559689c6f7f22b674970 | [] | no_license | stephenbaiuoft/ECE521 | a2cdfa7d65b5ec569c8a2fd98bb7a090123b35b0 | d85f031d7fe32a3a2a88346e98ba2a72be812557 | refs/heads/master | 2021-01-25T05:44:11.167410 | 2017-02-05T21:25:11 | 2017-02-05T21:25:11 | 80,670,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | e22.py | import numpy as np
import tensorflow as tf
class model:
def __init__(self):
with np.load("tinymnist.npz") as data :
trainData, trainTarget = data ["x"], data["y"]
validData, validTarget = data ["x_valid"], data ["y_valid"]
testData, testTarget = data ["x_test"], data ["y... |
90854fd4ee3f6ec9d214412a0682425cd10e37da | c2362ea8126f9c7e56db025d6b174fd2827e8f02 | /projects/01/scripts/DMux8Way.tst.py | e174229502a96943579c2d30e82304061df00ba2 | [] | no_license | itotallyrock/nand2tetris | d22a7280064ba6f72364d4e03a2dd98bb788ea45 | 034c11a5bb05d518a00834dddf3c48e2d2866ba6 | refs/heads/master | 2020-03-28T04:54:28.807199 | 2018-11-30T05:35:22 | 2018-11-30T05:35:22 | 147,743,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,075 | py | DMux8Way.tst.py | #!/usr/bin/python
fout = open("../DMux8Way.tst", 'w')
fout.write("load DMux8Way.hdl,\n")
fout.write("output-file DMux8Way.out,\n")
fout.write("compare-to DMux8Way.cmp,\n")
fout.write("output-list in%B3.1.3 sel%B3.3.3 a%B3.1.3 b%B3.1.3 c%B3.1.3 d%B3.1.3 e%B3.1.3 f%B3.1.3 g%B3.1.3 h%B3.1.3;\n\n")
ss = "set %s %s"
# 3-... |
2e00f22f3e9f5820d492b245d9009b179ca7704f | aac07be8563b50481dda119f60e1af84a14bf1e9 | /RobotCode/clearpath_horizon/src/joy.py | f5488d22f063453ed5da0782ad4d89bbad2749ff | [] | no_license | thegouger/ME597 | 34ac1eaca75ea6f2094c50b8115e05ebf88fccaa | b443ad3659b5bef347dd6a42012c6ca5b6bc7a97 | refs/heads/master | 2021-01-18T14:24:04.540981 | 2012-12-18T13:01:32 | 2012-12-18T13:01:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | joy.py | #!/usr/bin/python
# ROS stuff
import roslib; roslib.load_manifest('clearpath_horizon')
import rospy
from geometry_msgs.msg import Twist
from clearpath_horizon.msg import Joy, Announce
import os
rospy.init_node('horizon_joy', anonymous=True)
turn_scale = rospy.get_param('~turn_scale')
drive_scale = rospy.get_param... |
1eef67a4950875fae6ca31609dfce4e16421bedd | b1549e80c3a6f58d4738b01a4eb8bd4384c218d2 | /block-device-detect.py | b7e0b27a585bc45f2dcf760ce9eb1b0a0ef00fdb | [] | no_license | rishavanand/Anti-USB | 63fe928b64f5ec65f79907fa07f67bd189025a93 | bc2faf6cb05acfd10c3f799aa2d07b13715356c2 | refs/heads/master | 2020-07-27T03:34:41.973570 | 2019-09-16T17:04:36 | 2019-09-16T17:04:36 | 208,853,506 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | block-device-detect.py | #!/bin/bash/python3
import pyudev
import os
import time
user = 'student'
context = pyudev.Context()
monitor = pyudev.Monitor.from_netlink(context)
monitor.filter_by('block')
print('Monitor script is running!')
for device in iter(monitor.poll, None):
if device.action == 'add':
print('{} co... |
033c0a63404c135e9fd9681c5395396de7a1203c | a35aa63643d3e9b6fc0c15204698062dfe679f09 | /migrations/versions/a4146bdf2d7f_init_db.py | 41c2b338d1202b3193a46474269675322e99ab4b | [] | no_license | caowenbin/dabai-cms-server | 414ee5de901d19c076b7967996fce1f99d63a421 | 83d052798ea1d09ac2d663d0059a52a8fc585c43 | refs/heads/master | 2023-02-10T21:14:00.473629 | 2020-04-08T15:29:01 | 2020-04-08T15:29:01 | 247,930,455 | 2 | 0 | null | 2023-02-02T07:27:56 | 2020-03-17T09:36:44 | JavaScript | UTF-8 | Python | false | false | 24,782 | py | a4146bdf2d7f_init_db.py | # coding: utf-8
"""初始化表
Revision ID: a4146bdf2d7f
Revises:
Create Date: 2016-04-08 13:04:56.387851
"""
# revision identifiers, used by Alembic.
revision = 'a4146bdf2d7f'
down_revision = None
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
# 管理员表
op.exe... |
5a1b74d31fc20dd37c549987385a0ddcdcf1deaa | cdb7ca03c14d100d0c3e2f7bc1ab8f447c5b4b05 | /Python27/Problem20.py | 9d1a5998df9e39994f7a966534cc0b4cddee706d | [] | no_license | AlyxMoon/Project-Euler-Solutions | 96690d24ab7a5f47890fdfb58cefe9868431415c | 36789f69d736d8030afc34a9c89f9ebd4c275a92 | refs/heads/master | 2021-01-17T07:15:26.141497 | 2016-07-21T04:49:52 | 2016-07-21T04:49:52 | 49,565,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | py | Problem20.py | from math import factorial
from math import floor
n = int(raw_input("Enter the factorial number to calculate: "))
num = factorial(n)
sum = 0
while num > 0:
sum = sum + (num % 10)
num = num // 10
print "Sum of digits: %i" % sum
|
2e6536c7ca827b0b5ebc9da8ae41f0fa8e3f4fdd | 5e36caf8e581ec3399806c0dc9e252eeb3c34143 | /blog/urls.py | 44c35c342e8217572a74f6084692787975b5c71e | [] | no_license | wssss/Django-Vue-SPA | ac6fe3af98b178a20bcb0b168fd6b2b153531e61 | cfa3a42e0b0ed304035d50c6fb6664a3377f575c | refs/heads/master | 2021-10-27T12:23:35.923503 | 2019-04-17T09:02:13 | 2019-04-17T09:02:13 | 109,239,313 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | urls.py | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^$', views.postListView.as_view(), name="post"),
url(r'(?P<pk>\d+)/', views.postRetrieveView.as_view(), name="postDetail"),
url(r'tags', views.tagListView.as_view(),name="tag"),
url(r'categories', views.CategoryListView... |
a53ca0b35e0e0b59b626765693ee4fe59d4b2cb3 | 55815c281f6746bb64fc2ba46d074ca5af966441 | /easy/1047.py | e64acc6157c326f1bee946ce2ab90906ce103c34 | [] | no_license | brandoneng000/LeetCode | def5107b03187ad7b7b1c207d39c442b70f80fc2 | c7a42753b2b16c7b9c66b8d7c2e67b683a15e27d | refs/heads/master | 2023-08-30T23:38:04.845267 | 2023-08-30T08:42:57 | 2023-08-30T08:42:57 | 199,584,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 973 | py | 1047.py | class Solution:
def removeDuplicates(self, s: str) -> str:
from collections import deque
stack = deque()
for letter in s:
if stack and letter == stack[-1]:
stack.pop()
else:
stack.append(letter)
return "".join(stack)
... |
eeeb3f56def5d082fd96b1ff5b4ab7403e84dc8a | f7613a07349c942f60a97caa88cc42d71924833b | /Password_Checker.py | 70038df06d1108a40819b3db81487d04c110b91e | [] | no_license | PriyankaMali-13/Python-Learning | f088a45fabd2f48f93f5406f32580f0206d73c7e | ca6ff55dcfe66efb54c95b1801c9fdced4fb1734 | refs/heads/main | 2023-03-02T08:32:50.856031 | 2021-02-05T15:38:31 | 2021-02-05T15:38:31 | 329,941,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | Password_Checker.py | def CheckPassword(s):
upper = False
number = False
if len(s)<4:
return 0
elif s[0].isdigit():
return 0
for i in range(len(s)):
if s[0] == '/' or s[0]==' ':
return 0
elif s[i].isupper():
upper = True
elif s[i].isdigit()... |
4b90ff463d8b095601873d50c885b943885b0579 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /Mwh3zhKFu332qBhQa_2.py | 5a3f72aca23cc7652cd9c7c6f3bfb4418e156178 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51 | py | Mwh3zhKFu332qBhQa_2.py |
def guess_sequence(n):
return n*(120+(n-2)*30)
|