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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bdf611ad6dc52aa9cc84370f9db344c161ef73ee | c6492c2bd219bf0e6b0b77658e1e8a689ea09497 | /Equalize the Array | 9d1e49fa85ff24d7d8c699508d842ffee40fb7b4 | [] | no_license | shikharr03/HackeRank | 644f6ef829b6596b2c7b053a3f2eacc34a99b7ae | 3dcc148b80459a222905a88751ed8a5e76315f8f | refs/heads/master | 2022-06-03T11:54:47.429331 | 2020-05-04T05:37:18 | 2020-05-04T05:37:18 | 261,081,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | Equalize the Array | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the equalizeArray function below.
def equalizeArray(arr):
minn = 0
maxx = 0
cn = [None]*n
c1 = [None]*n
ct = p = 0
for i in range(n):
cn[i] = arr.count(arr[i])
maxx = max(cn)
if maxx == 1:
... | |
001c016c37e5e745e32da09484c54041185da91d | c1f2ec41dfc78716b9e5bfeb366e97b3f6d8b483 | /pypeit/scripts/trace_edges.py | ffe3066cfd2ac0c30e5bf74988d02e221bea294e | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | NathanSandford/PypeIt | 996eb3ce597fcba1259b751a4f829ffce8fffeee | 89470d27422b7f8662642060b5687a5b2fda27ed | refs/heads/master | 2021-03-13T10:04:31.521049 | 2020-12-16T18:50:21 | 2020-12-16T18:50:21 | 246,667,849 | 0 | 0 | BSD-3-Clause | 2020-03-11T19:58:34 | 2020-03-11T19:58:33 | null | UTF-8 | Python | false | false | 8,165 | py | trace_edges.py | #!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
"""
Trace slit edges for a set of images.
"""
def parse_args(options=None, return_parser=False):
import argparse
from pypeit.spectrographs import available_spectrographs
parser = argparse.ArgumentPars... |
425361de1ff7af1a3b111129ee122c89367fd977 | 9e35c1a2a4e7e2fe44a558ada08ae37fd23a53b3 | /thankshop/templatetags/thankshop.py | f6953a34f3231e2166201ae9355c84b5c930bc2c | [] | no_license | squallcs12/tangthuvien | 38630f7d060b1e2218d87162a405906672560d90 | fff62a14d067bf8a18a0ccc957e6cce6eb099167 | refs/heads/master | 2021-01-22T22:50:06.863882 | 2014-04-21T03:24:41 | 2014-04-21T03:24:41 | 11,834,996 | 0 | 0 | null | 2014-04-27T13:32:09 | 2013-08-02T04:35:10 | Python | UTF-8 | Python | false | false | 216 | py | thankshop.py | '''
Created on Sep 21, 2013
@author: antipro
'''
from django import template
register = template.Library()
@register.filter(name='thankshop_items')
def thankshop_items(user):
return user.thankshop_items.all()
|
064c5e515a46b6cc909850c9f7629c501f87bc05 | faaf12ab18978082233c09628b815a69e73868e4 | /leetcode/algorithms/easy/check_if_all_the_integers_in_a_range_are_covered.py | be445db9d20d78f36e1c1758abfcee3d33dba5a8 | [
"WTFPL"
] | permissive | ferhatelmas/algo | 6826bcf0be782cb102c1ee20dce8d4345e1fd6d2 | 7b867f6d2c8a9fb896f464168b50dfc115617e56 | refs/heads/master | 2023-08-18T19:59:58.435696 | 2023-08-14T10:16:00 | 2023-08-14T10:16:00 | 3,813,734 | 27 | 16 | WTFPL | 2020-10-25T23:00:16 | 2012-03-23T23:43:31 | Java | UTF-8 | Python | false | false | 269 | py | check_if_all_the_integers_in_a_range_are_covered.py | from typing import List
class Solution:
def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
for n in range(left, right + 1):
if not any(a <= n <= b for a, b in ranges):
return False
return True
|
780b560a94fa60dddc9e45200bb0d182478b887f | 559f3dec0964d2e0f86c6c871371fe779cf3726c | /EISeg/eiseg/widget/label_corres.py | ece0c9f11cdc0665ec5a7585b8b83f5d5f268c98 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSeg | 319ab26665ea492527a1949671650135123ffc39 | 2c8c35a8949fef74599f5ec557d340a14415f20d | refs/heads/release/2.8 | 2023-08-31T09:08:06.724717 | 2023-08-18T01:59:56 | 2023-08-18T01:59:56 | 204,380,779 | 8,531 | 1,866 | Apache-2.0 | 2023-09-12T02:30:42 | 2019-08-26T02:32:22 | Python | UTF-8 | Python | false | false | 10,692 | py | label_corres.py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
9e232e78fcd086cedc6f857054359e6d055ea3d2 | 1ddf0cb5fdc268a4685a81dd474b16e0900a74dc | /main.py | 7f7542eb953625d0b33523bcd4d9e77c61e2339d | [] | no_license | kukwuka/EnergyHack | 3d4aa924aefc65002aa81f63e80a5b4a9c8655ab | d87e2e1956874ac6fc1748506862b40bafc8d23d | refs/heads/main | 2023-08-10T23:13:22.116446 | 2021-10-10T15:00:04 | 2021-10-10T15:00:04 | 415,231,574 | 1 | 0 | null | 2021-10-10T10:02:42 | 2021-10-09T07:07:33 | Python | UTF-8 | Python | false | false | 4,896 | py | main.py | from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from fastapi.middleware.cors import CORSMiddleware
import pickle
from bayes_opt import BayesianOptimization
from catboost import CatBoostRegressor
import numpy as np
import pandas as pd
app = FastAPI()
origins = ["*"]
app.add_middleware(
... |
eac68be7a6ad2596ad1a61c067c163f7e56573e4 | ed7342bcfd051d5280c444f5a625fac507ef9b53 | /demo/funs/filter_demo.py | 12573270b446bec24f2bfeab55590d41a9c6e993 | [] | no_license | srikanthpragada/PYTHON_19_MAR_2021 | 55f86289e7d6be5398c18ad9f52bfd4d81563827 | 20cd95481c1fc4c156d1fed01e29cb3b09b03333 | refs/heads/master | 2023-04-06T02:37:52.657864 | 2021-05-05T03:01:31 | 2021-05-05T03:01:31 | 350,551,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | filter_demo.py | strings = ['abc', '34343', '12', 'xyz', 'abc123']
def hasdigit(st):
for c in st:
if c.isdigit():
return True
return False
for n in filter(str.isdigit, strings):
print(n)
for n in filter(hasdigit, strings):
print(n)
|
e934bdb37c6c4daedb37b3c26460489079fd4e2e | e432127df6f1d06a9db5d0cb004037d6210ffe52 | /file_system_explorer.py | 50d145dc26df10adaa3231de281e39e5b6bb98b1 | [] | no_license | not-much-io/python_coding_club_scripting_examples | a6b5c2f51cfb07c57d88c78df9c30d23346c63e1 | d7d22fee023e122864afab32ae3c661c6f3069fb | refs/heads/master | 2021-01-10T05:44:32.600335 | 2016-03-02T14:48:39 | 2016-03-02T14:48:39 | 52,663,760 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | file_system_explorer.py | from glob import glob
import os
def files_with_extension(dir_path, ext):
search_query = dir_path + ext
return glob(search_query)
def find_in_tree(root_dir, ext):
found_files = []
for dirName, _, _ in os.walk(root_dir):
found_files += files_with_extension(dirName, ext)
return found_file... |
c847c3d1bd14fa7a75c610a7da7fa3d8dd6445cf | 046bc41bbf56e4ec62161d6f7668f2035d3e954f | /Rozpoznawanie obrazu/Classifier.py | b7d424f17ada8c0e89ff7a813774c0efa76cc55d | [] | no_license | mlynarzsrem/IWM | df27e3e7872863dc0b7da1a3867695cb54427c81 | 1e539f4d260c73963d56863b7d83ced731403173 | refs/heads/master | 2021-09-15T14:12:08.323394 | 2018-06-04T08:22:36 | 2018-06-04T08:22:36 | 123,717,550 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,525 | py | Classifier.py | from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
import numpy as np
import pickle
import os.path
import cv2
from sklearn.model_selection import KFold, cross_val_score
class Classifier:
def __init__(self,dataSets,size):
self.size = size
self.dataSets... |
1a84b52fddc17f3d674244459a97c11cfad39919 | 85e4a2d0fe7e274f58e93f23e8c25feeea32927e | /2-dars/eleven.py | 6dc688e6f5a34f2630f37f9bcb4a0b13121e5731 | [] | no_license | AlimardonQurbonov/Python_SariqDEV | 117cf2dfc4dc7a346d1404defe160bc5f36ac107 | f899af9265322fc88cd2ef7a836a7694eedda1bb | refs/heads/main | 2023-07-16T10:30:36.255453 | 2021-08-23T07:04:43 | 2021-08-23T07:04:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,433 | py | eleven.py | # 11-Dars
# Sana: 22.08.2021
# Ko`chiruvchi: ALEVcoder
# ===================================================
# ===================================================
# MISOL
# yosh = int(input('Yoshingiz nechida? \n'))
# if yosh>=4:
# print('Sizga kirish bepul')
# elif yosh<=12:
# print('Sizga kirish 5000 so`m'... |
f0cffbd35355a01d048771b8f03dd2d7de6541d2 | aef5cde3ff6695f5e78c1460448a6bce34229781 | /TV_Remotı.py | 7cae5c8b0def2aa416a3421e165703792918389d | [] | no_license | turgutguvenc/TV-REMOTE | 3ce1f493b09ea20c08ec6c094daf756e667cbdde | 552930415ee91491e6b7e08f5cee2af00b5445fc | refs/heads/main | 2023-04-28T21:54:26.900622 | 2021-05-21T07:12:10 | 2021-05-21T07:12:10 | 369,446,494 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,809 | py | TV_Remotı.py | import random
import time
# we imported the necessary libraries
class Remote():
def __init__(self, tv_case="close", tv_volume=0, channel_list=["FOX"], channel="FOX"):
self.tv_case = tv_case
self.tv_volume = tv_volume
self.channel_list = channel_list
self.channel = chann... |
fd81e18c5ef9766889ede13b2d9864539bb0c4f5 | a46a8c2639026e8aae10648e61cda535c4ea1127 | /2020-02-07 Riddler_Express Palindromic dates.py | 4a9d0a50632b1b317d1e9a7489b6ce91c07e13ab | [] | no_license | setalyas/Riddler | a95377a1e204621505a4b9d4b9cb38e830286f1d | 253c00a1617bc939c049d70540bb3836ca8cdeef | refs/heads/master | 2022-08-19T09:16:24.752214 | 2020-05-24T12:09:41 | 2020-05-24T12:09:41 | 198,107,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,103 | py | 2020-02-07 Riddler_Express Palindromic dates.py | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 8 10:46:03 2020
@author: setat
"""
import datetime as dt
start = dt.date(2020, 2, 2)
reverse = lambda st: st[::-1]
start = dt.datetime(2020, 2, 2)
end = dt.datetime(2099, 12, 31)
remaining = (end-start).days
date = start
dttypes = {'UK': {'counter'... |
3ee0632d7fce6fb1b2c0e9e68a079726b05f50e6 | 33c84aee83c90987d2123fd5f5eecfd1c7b00cb2 | /src/lorawan/pytrack-ttnmapper/lorattnca.py | 6d3f9c6c5ac4755ad1bc093b96ff7db7ed34c9ad | [] | no_license | NSIL/smr3188_mirror | 1b33fa1f7df53fccbd6957a1aa862268bd6caf0e | 02acd7e2fafc9b9108d19207385d0e9f128893b2 | refs/heads/master | 2020-03-16T07:44:08.660764 | 2018-05-08T07:52:19 | 2018-05-08T07:52:19 | 132,582,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,839 | py | lorattnca.py | # Class lorattnca TTN-Cayenne
# Wrapper for LoRa communication
# Based on this project:
# https://github.com/puthli/meet-de-klas
# Version 1.0
# mod 19/03:
# set lora connection to the things network / cayenne
#
#
from network import LoRa
import socket
import time
import binascii
import pycom
from CayenneLPP ... |
68fa5d5a9922a0799c5b2fd9170b9238b758b3e3 | 780b01976dad99c7c2ed948b8473aa4e2d0404ba | /tradingcore/campaign.py | da800f9453faffe3c2f7c708580de569b4b27ec6 | [] | no_license | trendmanagement/tmqrexo_alexveden | a8ad699c2c3df4ce283346d287aff4364059a351 | 4d92e2ee2bc97ea2fcf075382d4a5f80ce3d72e4 | refs/heads/master | 2021-03-16T08:38:00.518593 | 2019-01-23T08:30:18 | 2019-01-23T08:30:18 | 56,336,692 | 1 | 1 | null | 2019-01-22T14:21:03 | 2016-04-15T17:05:53 | Python | UTF-8 | Python | false | false | 10,983 | py | campaign.py | from exobuilder.exo.position import Position
import warnings
from exobuilder.exo.exoenginebase import ExoEngineBase
from datetime import datetime
from tradingcore.campaign_bridge import ALPHA_NEW_PREFIX, CampaignBridge
class Campaign:
def __init__(self, campaign_dict, datasource):
self._dict = campaign_di... |
96b25fca16937573f39c227a68ce9661f18f34c5 | 58bc0904112db4c3205f40f55ef6bad7713a72c0 | /AlertPopUp.py | 825bb333049f993b0dec098dbb7307fc51abedf2 | [] | no_license | BansodeSS/Software-Testing-Selenium-Python | a3ce478866e9655506dd294679b70fdb32262f0b | 848228947b66867b2db75df03b837b8e52c53c37 | refs/heads/master | 2023-07-16T22:42:33.729387 | 2021-08-20T14:14:48 | 2021-08-20T14:14:48 | 384,049,711 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 614 | py | AlertPopUp.py | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time
from selenium.webdriver import ActionChains
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(1... |
920b6ec0a1e6eff1e243adcb9d1c1939b8918490 | 9c928d3df14e5b6c22b262632199d66f3c0342f8 | /LonelyForest.py | 27ad0d57349bf03393b228ef4bdf42d6a3538adf | [] | no_license | WestZY/MLTraining | af8cd7481a9fc2242f2751877aaf1bd93ce3ea74 | 8ea47ffebb909fc38ff68d6ae5877d51c966e82e | refs/heads/master | 2021-08-14T09:47:55.801321 | 2017-11-15T08:32:50 | 2017-11-15T08:32:50 | 109,358,109 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,489 | py | LonelyForest.py | # coding: utf-8
import numpy as np
import pandas as pd
import re
from sklearn.preprocessing import Imputer, OneHotEncoder, MinMaxScaler
from sklearn.feature_selection import chi2,SelectPercentile
from sklearn.decomposition import PCA
from sklearn.model_selection import train_test_split
from sklearn.ensemble import Iso... |
74df4b02400ff794fadd3433f1d808e1c04d42c2 | 4d259f441632f5c45b94e8d816fc31a4f022af3c | /brdcast/mysqltest/test.py | 3a7e57087faaf3928f9caff1bfa4fed1ee199afe | [] | no_license | xiaoruiguo/lab | c37224fd4eb604aa2b39fe18ba64e93b7159a1eb | ec99f51b498244c414b025d7dae91fdad2f8ef46 | refs/heads/master | 2020-05-25T01:37:42.070770 | 2016-05-16T23:24:26 | 2016-05-16T23:24:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 123 | py | test.py |
table = 'ahah'
sql = """CREATE TABLE %s(
Id INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(25))"""%table
print sql
|
638e2b719f7b21bb25b383753409f7ceec359ecc | c8c466d98733d0e8f5ba3008b106c2f314344817 | /src/run_eval_msu.py | d986ac0bc99bc2fc4a4a5d8a8b65dc3d67044979 | [] | no_license | ankushpanwar19/Face-Anti-spoofing | 5fcce4bf98e4226ff9df6bbdf24d83cf05367205 | 4ef0c97825a540f03a33cf5ee9c8d8f544b3ff92 | refs/heads/master | 2023-08-27T14:23:34.497173 | 2021-03-10T13:49:02 | 2021-03-10T13:49:02 | 424,564,490 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,688 | py | run_eval_msu.py | # from get_examples_labels_siw import get_examples_labels as get_siw_dataset
from get_examples_labels_oulu import get_examples_labels as get_oulu_dataset
# from get_examples_labels_pxlvision import get_examples_labels as get_pxlvision_dataset
# from data_loader_dnet import get_loader as get_loader_dnet
from data_loade... |
eae4c3ce213237490cf21ba8079eee26e21a8e1d | 3c31ba48dacc3d3ecfae4a4a0e7db5322346e19f | /chapter20/example9.py | 667e5a1d1afb3e92e45f0fc05d06ff51e2a197ae | [] | no_license | vipinvkmenon/canddatastructures_python | e512e2a13700cbcb2b589fb103e62a606af34166 | c2ab87720307b9c392539ccef683e6c1ea25b75d | refs/heads/master | 2020-12-25T21:56:30.246404 | 2013-10-24T10:01:04 | 2013-10-24T10:01:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,628 | py | example9.py | # Chapter 20.9
# MERGING OF TWO SORTED LISTS
class node: # Node class
def __init__(self):
self.data = 0
self.link = None
def insert(p, n): # Insert function
if(p ==None):
p = node()
if(p == None):
print("Error")
exit()
p.data = n
else:
... |
34013ebe0abfce0abeba8ee14809dd540fd0423e | 22ef8b740d2739b1309e946dc87c5a2c80f2f8dc | /main.py | 8c6252abd43a14ec30f9e17f14b92fc1ad7a0bc4 | [] | no_license | MxClownx/MxClown | 5238ce52f773e0e0b4977f363ad1c9a46498e522 | 5cf40ee5e4c052e85d2ef414e0f956ff40c923f8 | refs/heads/master | 2022-12-03T23:11:20.176222 | 2020-08-14T12:46:15 | 2020-08-14T12:46:15 | 287,530,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,375 | py | main.py | from pyrogram import Client, MessageHandler, Chat, Filters, InlineKeyboardButton, InlineKeyboardMarkup
import logging
import os
import requests
from subprocess import Popen, PIPE
import json
from bs4 import BeautifulSoup as bs
import wget
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s... |
f053847d91f66a35ab3a17a859a6f1609c3b7cf4 | fe6bde2efe99b8822d697b377077042bc923fa6d | /.py/get_para_fcn.py | d2ffb7af3b4ada8f8f6350bcb85a7968c7e43186 | [] | no_license | ShouqingChen1/Intelligent-Dispatch-in-PowerStation | 499ce885ba8e22ed627b60c944ce5ed6e0c45521 | aeb9e1eafa8b8ca752d030381c955c89d113aa0c | refs/heads/main | 2023-07-05T22:44:40.718002 | 2021-08-03T07:29:19 | 2021-08-03T07:29:19 | 392,152,225 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | get_para_fcn.py | import pandas as pd
# 机组运行工况须在模型曲线范围内
def get_para_fcn(A,Tur):
L = []
R = []
xls = pd.ExcelFile(r"zz680.xlsx")
left = xls.parse(2)[['N11', 'Q11',]]
right= xls.parse(3)[['N11', 'Q11',]]
L.append(left)
R.append(right)
L.append(left)
R.append(right)
xls_1=xls... |
edf7fa52c06bd39a4f6b66e4511408ad0ef89045 | 75da2e644254b7bf3b47507ae17be91b6eb32999 | /python/parse_files.py | a893cd5313050971263a244a6df1055abfa9dc76 | [] | no_license | VeslavT/templates | 86f935c18df82bf742768e18e81907283418043b | feef8f295927d159f31b4275d9be5a6b6c83950c | refs/heads/master | 2020-03-30T12:22:14.876035 | 2019-04-02T13:58:24 | 2019-04-02T13:58:24 | 151,221,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,527 | py | parse_files.py | import os
import pymysql
import pymysql.cursors
gl = []
def main():
root_dir = ''
files = get_files(root_dir)
tables = get_schema()
for table_name in tables:
parse_f(files, table_name)
# r = list(sorted(set(gl)))
# for nm in r:
# print(nm)
def get_files(root):
... |
496fa426bdf3593015949c9f057d4e5b728965ec | ee7f2ae9f58c6724c4774ab541661277f5019907 | /HW08092020/HW2.py | b86f242aa104d6642f410b1124699aa4da0867f0 | [] | no_license | vagaganova/homeworks | db55d74a16dd9f7c80442e8a0b8ed613139e6eb5 | f41a0737fc0189d7040f1f1c2914a35c2ab10afc | refs/heads/master | 2023-01-20T06:35:06.984628 | 2020-11-28T19:18:02 | 2020-11-28T19:18:02 | 290,870,266 | 0 | 0 | null | 2020-09-20T18:44:35 | 2020-08-27T20:03:57 | Python | UTF-8 | Python | false | false | 361 | py | HW2.py | with open('my_file.txt') as my_file:
lines = my_file.readlines()
print ('Количество строк: ', len(lines))
for i in range(len(lines)):
if len(lines[i].replace(' ', '').replace('\n','')) > 0:
print('В строке ', i, ':', len(lines[i].split(' ')))
else:
print('В строке ', ... |
f79155a4b4c2077c071ac5620ec467852845a4b0 | 13304ac6ff52a3eea55df3e3ef4367ab71a28feb | /code/infectioncause.py | d1eac3167bb09113bfe62aeed2439b6d72e44967 | [] | no_license | vikkyomkar/communityhelpcovid19 | 28103a99a6756cfeba935ad39303613d5d2a575a | 3224e2ccfda761728f2ee5fa0b0bd0aca3966785 | refs/heads/master | 2023-01-20T11:43:06.710352 | 2020-11-19T03:25:02 | 2020-11-19T03:25:02 | 254,794,541 | 2 | 2 | null | 2020-07-12T16:57:49 | 2020-04-11T04:45:57 | Python | UTF-8 | Python | false | false | 2,508 | py | infectioncause.py | import sys
import json
import datetime
import subprocess
import influx
### Variables ####
db = sys.argv[1]
table = "covid_india"
with open('/mnt/covid/code/rawdata') as f:
data = json.load(f)
MedicalStaff = ['doctor','compounder','nurse','health worker','private hospital','hospital staff']
FamilyTransmission = ['f... |
fb78db02c5abfa7eef67689e4880afb0f500fda7 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /xFme9FBuvHLveh5nE_0.py | af74d4c5dd9b08009331558f9dee5ba8093e7b3e | [] | 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 | 72 | py | xFme9FBuvHLveh5nE_0.py |
import re
is_zygodrome = lambda x: not re.sub(r'(\d)\1+', '', str(x))
|
2624622489f6fd2a79b3b455a356bf4121c28b1d | ef85c7bb57412c86d9ab28a95fd299e8411c316e | /ngraph/test/frontend/paddlepaddle/test_models/gen_scripts/generate_dropout.py | 6f40afdb1f2938ca8bcda3a9ddd005ac06228870 | [
"Apache-2.0"
] | permissive | SDxKeeper/dldt | 63bf19f01d8021c4d9d7b04bec334310b536a06a | a7dff0d0ec930c4c83690d41af6f6302b389f361 | refs/heads/master | 2023-01-08T19:47:29.937614 | 2021-10-22T15:56:53 | 2021-10-22T15:56:53 | 202,734,386 | 0 | 1 | Apache-2.0 | 2022-12-26T13:03:27 | 2019-08-16T13:41:06 | C++ | UTF-8 | Python | false | false | 1,367 | py | generate_dropout.py | #
# pool2d paddle model generator
#
import numpy as np
from save_model import saveModel
import sys
def pdpd_dropout(name : str, x, p, pdpd_attrs):
import paddle as pdpd
pdpd.enable_static()
with pdpd.static.program_guard(pdpd.static.Program(), pdpd.static.Program()):
node_x = pdpd.static.data... |
9ab97e1759762b90555576a77b44a68638b1bd9f | a4e5dce837561adf58f99cdd7b4a0f8b1ebfe3e3 | /tree/form.py | 18dc5862a9d16376887dac4eef1439e8b07f515d | [] | no_license | jplhanna/TBD | 0cd5589a205de00fd33459a2ac49adec886e9eb2 | bcb034310147c24402a1db96d168abf878c9549b | refs/heads/master | 2021-01-13T16:53:24.817574 | 2017-05-01T17:42:51 | 2017-05-01T17:42:51 | 80,360,349 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 941 | py | form.py | from django import forms
from django.contrib.auth.models import User
from bootstrap_toolkit.widgets import BootstrapDateInput, BootstrapTextInput, BootstrapUneditableInput
class LoginForm(forms.Form):
username = forms.CharField(
required=True,
label="Email",
error_messages={'required': 'Pl... |
3995e388f199c87ecbd04adf5f9c59f71ad76d4f | a03b5ef4d13649a8734ba04fd65dd8350ea0f4a8 | /EducationLOC/PlacementPrediction/models.py | 3860a9a8f075f20627db9cfe859e616ad53c19a1 | [] | no_license | Zekromaegis/LOC-Hackathon | 2bc1485597ae291ca9c1be8a59ca331f2e4f575a | 56c93bce4c0d85d91e7241bdd3aec66563ca4caf | refs/heads/master | 2021-07-06T14:26:31.098486 | 2021-05-14T04:54:25 | 2021-05-14T04:54:25 | 242,472,449 | 0 | 0 | null | 2020-02-23T07:05:54 | 2020-02-23T07:05:54 | null | UTF-8 | Python | false | false | 1,680 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
RESEARCH=(
(1,'Yes'),
(0,'No'),
)
GENDER=(
(1,'Male... |
358f17bd00428701bc62770ed742dc96caa56470 | cae988f6e699bbff34bc5872130ec6bf6074db9d | /experiment02/greetings.py | 98d6f84b9df1d6cff65606a15a712696aaae4e14 | [] | no_license | ShanYue33/_mysql_builtins.py | e452cfd7fe5dd589e4082c753ff592232dc9e0be | 6c50302dfa09857e24101885422e109ef438cfa0 | refs/heads/master | 2023-06-30T01:54:22.194151 | 2021-08-01T08:24:00 | 2021-08-01T08:24:00 | 391,569,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | greetings.py | names_list = ['小红', '小明', '小梅', '小化', '小天', 'admin']
for name in names_list:
if name == 'admin':
print(name + ", Hello! would you like to see status report?")
else:
print(name + "hello!thank you for logging in again!")
|
442ef89565efb3a40c82ef97e73fb9c41a89ca6b | eeb4e5ab733c989620b81a834d02eb4edafe7b17 | /lab_architect_4sem/3lab/lib/db.py | d455ad51e3f3aaa6e8bff5b4bbc965053737a233 | [] | no_license | xreadcor/python | 0ae8fda2a753b5c467367bc7147b0803173d14ac | b591c552c4ed11e3836625e9902b934aaf98a3b5 | refs/heads/master | 2023-05-10T21:23:29.722518 | 2023-05-08T11:57:26 | 2023-05-08T11:57:26 | 221,765,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,483 | py | db.py | from sqlalchemy.sql import text
from lib.db_init import init_db
class DBInstance:
def __init__(self):
engine = init_db()
self.conn = engine.connect()
def get_rates(self, currency, from_date, to_date):
query = text(f'SELECT {currency}_rate FROM rates '
f'WHERE rat... |
2c78e95419768631b2a623135c187d9de71a154e | b53d8d3d0a024275991a8ef8af00aebba9b05dcc | /app/configs.py | 02423fa061bbb3c4252256f8898e920e19bfdbf2 | [
"MIT"
] | permissive | JulienBalestra/enjoliver | 3e5b3b0e4152717c1e7a10f26f91ffad546513e5 | 13b41d0c40a56ea212a88d3e4f3aee91a318f3f0 | refs/heads/master | 2021-05-01T16:31:34.664055 | 2018-02-10T11:06:11 | 2018-02-10T11:06:11 | 75,554,874 | 33 | 5 | null | 2017-10-19T15:37:21 | 2016-12-04T18:10:18 | Python | UTF-8 | Python | false | false | 10,089 | py | configs.py | """
Configuration loading and storing inside EnjoliverConfig class
"""
import logging
import os
import yaml
APP_PATH = os.path.dirname(os.path.abspath(__file__))
PROJECT_PATH = os.path.dirname(APP_PATH)
class EnjoliverConfig:
"""
Used to propagate easily the configuration inside the application
"""
... |
c275b196d4b834c9fd8ff3d01371d525ad6149cc | e706a365cca858eaefc229e9cca5a6e246690f35 | /old_compilers/batch_compiler_helper/code_format.py | d9db4e200071a1748f4f80d6fe0db4d92eec0b56 | [
"MIT"
] | permissive | chidraqul/chidraqul6 | 68b8b7730209df57104c907fd5273533cc3e2bf4 | b9208298eea19a4adb89fdcb3a85605160959154 | refs/heads/master | 2021-10-10T20:02:29.196930 | 2019-01-16T14:08:42 | 2019-01-16T14:08:42 | 111,290,952 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | code_format.py | #made by ChillerDragon
#all rights reserved to ChillerDragon copyright(c) blabla
import sys
import os
import os.path
def cls():
os.system('cls' if os.name=='nt' else 'clear')
def menu():
cls()
print("=======================================")
print("ChillerDragon's Batch formater")
print("print batch code with b... |
544f97c7062e8a89891ccb20c68251a31355ad81 | a2b194aaaf2b00b6e0aa35b3dad21ef773f1ef94 | /tests/snakes/old_self/app/entities.py | c669d0c07c638c5d5a16b1d3c8a948bda3e2a097 | [
"MIT"
] | permissive | DAChenScratch/QueenB-Battlesnake2018 | 2731adb23246f1f206777b06bd5eca18f17eed50 | 07400db367bc3765e5364c18f40ddb32703bf287 | refs/heads/master | 2021-09-08T08:33:05.311630 | 2018-03-08T18:38:43 | 2018-03-08T18:38:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,207 | py | entities.py | from .utils import sub, add, dist
from .constants import DIR_VECTORS, EMPTY, FOOD, SNAKE, SPOILED
class Snake(object):
ATTRIBUTES = ('id', 'health', 'length')
def __init__(self, clone=None, **kwargs):
if clone:
# Clone another snake
self.attributes = clone.attributes.copy()
... |
af9d741ce9bf7eaedfa1789f824a0bb2b6d6d89d | 5ac8deafbe17bf3c1709c5815dabe79fb28d44c8 | /day4/d4p1.py | deebfeec5e9011993b5fa26d956d67a5868b97ee | [] | no_license | chuangbo/adventofcode-2020 | ae80b1628a73f832752dcb229b7617c29e2d97a0 | 79e5217ee7fef920386f6ff7d05e47c15fc8000a | refs/heads/main | 2023-04-20T05:45:58.045379 | 2021-05-19T10:11:32 | 2021-05-19T10:11:32 | 318,771,106 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | d4p1.py | #!/usr/bin/env python3
filename = 'example.txt'
filename = 'input.txt'
count = 0
for passport in open(filename).read().split('\n\n'):
p = {}
for pair in passport.split():
k, v = pair.split(':')
if k != 'cid':
p[k] = v
if len(p.keys()) == 7:
count += 1
print(count... |
15723de383153f7f757924c876a98752fa6c0f29 | e976eb4db57ddee4947cbab8746446dd53f6cf6f | /151-200/二叉搜索树迭代器.py | 7a63835d5ece1412d409602a05d4ff46d3ee1ee6 | [] | no_license | Aiyane/aiyane-LeetCode | 5328529079bcfbc84f4e4d67e3d8736b9745dc0d | 3c4d5aacc33f3ed66b6294894a767862170fb4f6 | refs/heads/master | 2020-04-01T20:33:54.125654 | 2019-06-25T09:56:10 | 2019-06-25T09:56:10 | 153,610,015 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | 二叉搜索树迭代器.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 二叉搜索树迭代器.py
"""
实现一个二叉搜索树迭代器。你将使用二叉搜索树的根节点初始化迭代器。
调用 next() 将返回二叉搜索树中的下一个最小的数。
注意: next() 和hasNext() 操作的时间复杂度是O(1),并使用 O(h) 内存,其中 h 是树的高度。
"""
__author__ = 'Aiyane'
# Definition for a binary tree node
# class TreeNode(object):
# def __init__(self, x):
# ... |
0c3d477d12f2198732f6a1f9e846dda5ef9d677d | 6e1552c80abc63ffb70a0f80ae63407744b79136 | /PythonClass/week4/4-7-2.py | 30f510be7c94260f932a1773382a3a051815de5c | [] | no_license | liu-yuxin98/Python | beadc02aff53b9c162d65a4bf63d1f70b65de345 | 54f74febfc82bf867583d3545acf5b52c26492c6 | refs/heads/master | 2023-02-20T19:09:57.201997 | 2021-01-29T09:04:18 | 2021-01-29T09:04:18 | 334,043,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | 4-7-2.py | # -*- coding: utf-8 -*-
# 2020-03-16
# author Liu,Yuxin
'''
def fibloop(n):
if n ==0:
return 1
elif n ==1:
return 1
else:
return fib(n-1)+fib(n-2)
'''
def fib(n):
if n ==0:
return 1
elif n ==1:
return 1
else:
a,b=0,1
for i in range(n):
... |
a72754e718392c735e78f669e4f1fd1d9cc0a9c1 | 449de3b52a9395158a2372b024e6406fdc385f9f | /HW08/D3b.py | 03b6be823743229aa2c207cf18ca073dc7e3f567 | [] | no_license | tracyJCI/Python | 8bc0d5ab4a61d3d161b27a3d25d0ab21302b446a | ea7730f60b052c7b7ff1e8c05799e70cefc2efbe | refs/heads/master | 2022-11-03T03:00:13.248219 | 2019-12-31T04:08:17 | 2019-12-31T04:08:17 | 230,836,989 | 0 | 1 | null | 2022-10-25T09:00:12 | 2019-12-30T02:58:29 | Python | UTF-8 | Python | false | false | 314 | py | D3b.py | #KJC4 4CREDITS
def main() :
print("This program finds the sum of the first n odd numbers")
total_sum = 0
count = 1
num= eval((input("please input your n:")))
while count <=(2*num)-1:
total_sum = count + total_sum
count =count +2
print("the sum is" ,total_sum)
main()
|
970863b6a6aa4f5976da182a2e1874287407c09c | 7f40ce0f19c5286323391594e996e032c3d12142 | /response.py | eb1efbd0567f10242dd80855dd3822a6e39a8a07 | [] | no_license | Fraks51/AuthenticatedDictionary | a7c97932fc83fe9075c172777fd35772d512fd16 | 4d354640abaca92fe63d7e1ec8badd7197809cef | refs/heads/main | 2022-12-31T17:28:29.412147 | 2020-10-23T22:29:16 | 2020-10-23T22:29:16 | 306,508,016 | 1 | 0 | null | 2020-10-23T02:20:27 | 2020-10-23T02:20:27 | null | UTF-8 | Python | false | false | 834 | py | response.py | from hashlib import sha256
from typing import Union
def hash_fun(x: bytes, y: bytes) -> bytes:
return sha256(bytes(min(x, y) + max(x, y))).digest()
class AuthenticResponse:
def __init__(self, timestamp: bytes, item, proof, result: bool):
self.timestamp = timestamp
self.item = item
se... |
699c6acb03ec91ae5616271761f7cc7e96c4f93b | 50d1238f1659b55967bb3305b012587860676200 | /custom_components/wyzeapi/wyzeapi/wyze_lock.py | 051d15365d6df3063e443095fcb71ef72b0fffe7 | [
"Apache-2.0"
] | permissive | jfarmer08/ha-wyzeapi | cec601474dd6087d0b5d12196bbddee4eb4b1d30 | 9361f529f49efc0341854909724c53808a764dd7 | refs/heads/master | 2022-11-11T11:09:03.755891 | 2020-07-07T19:14:19 | 2020-07-07T19:14:19 | 263,384,478 | 4 | 2 | Apache-2.0 | 2020-05-12T21:07:11 | 2020-05-12T16:00:39 | Python | UTF-8 | Python | false | false | 4,303 | py | wyze_lock.py | import asyncio
import logging
#from .wyze_device import *
_LOGGER = logging.getLogger(__name__)
class WyzeLock():
def __init__(self, api, device_mac, friendly_name, state, open_close_state, device_model):
_LOGGER.debug("Lock " + device_mac + " " +friendly_name + " " + "initializing.")
self._api =... |
50156e8204bc78936b0a9a242fb250e90e9ab942 | c0c40f67e1d966b7207b4d317ddbe912eb86a8df | /prob_2.py | 60e31e666e28d36fcdb93268ad1251fb3ab01fac | [] | no_license | avv77/Exel_3 | 9a2cd1f230e720d2f279625eee1d51c7ea77deb8 | ee870a8b45cc1dee63ddbeb6a98505e1ad37673a | refs/heads/master | 2023-06-28T03:36:30.268752 | 2021-07-30T14:13:45 | 2021-07-30T14:13:45 | 391,041,846 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 814 | py | prob_2.py | import openpyxl
path = 'D:\\Обработка файлов таможни\\Пример.xlsx' # начинаем сортировку по производителю
wb = openpyxl.load_workbook(path)
sheet = wb['2019']
quantity_row = sheet.max_row
quantity_column = sheet.max_column
data = []
row_i = []
for i in range(2, quantity_row + 1):
for j in range(1, quantity_column ... |
46d85a3babab4b18f4e0e0384f254f6105cf691d | 1daee4c4a66c1053e3b0f550ede5391c52d362f2 | /lms/migrations/versions/106d94be7705_remove_family_grading.py | 35f217766cf43c99d459961acf4df82dfdf744f2 | [
"BSD-2-Clause"
] | permissive | hypothesis/lms | 90120b1e9f84731c20ca270877a698ad7745a063 | 86614d8fe690ca52516fef87bfffe9e61dd2c21f | refs/heads/main | 2023-08-26T19:05:46.486141 | 2023-08-25T09:53:30 | 2023-08-25T09:53:30 | 108,909,388 | 44 | 13 | BSD-2-Clause | 2023-09-14T11:20:33 | 2017-10-30T21:15:37 | Python | UTF-8 | Python | false | false | 653 | py | 106d94be7705_remove_family_grading.py | """
Remove tool_consumer_info_product_family_code from GradingInfo.
Revision ID: 106d94be7705
Revises: 973c9358b616
Create Date: 2023-07-06 11:23:10.850486
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "106d94be7705"
down_revision = "973c9358b616"
def upgrad... |
51642dbb210600f9ca4e035fb884fbdda030fd04 | b4fe79ad6dfebbb349b014cd43e7dbf39829e10b | /beyond_the_basics/registry.py | 9660eebb04942b370e433056bcbce9d7f19e8359 | [] | no_license | grace0927/PythonPractice | 146b0ac4f113ff691983a429d758065acae295f9 | d4c7090290dfdf5a5a42a7674e4c1a41328c3e79 | refs/heads/master | 2023-08-10T14:29:09.396278 | 2018-02-21T03:10:52 | 2018-02-21T03:10:52 | 77,288,524 | 0 | 0 | null | 2023-07-25T15:10:35 | 2016-12-24T15:15:12 | Python | UTF-8 | Python | false | false | 115 | py | registry.py | _registry = []
def registry(name):
_registry.append(name)
def registry_names():
return iter(_registry)
|
5b919bde9f4fe1da867695ece58f151abb9b70fb | c9136d3edad01096ecc9070b3a79ba7fb0655509 | /Exam2/Question2/Q2_ModelSelect.py | a71937e2e48aff29efaca630280c0748a6eb778f | [] | no_license | WilliamLi822/EECE5644_TianchuLi_Homework | a7a3dcc49e57d46ced8e44ec36a641054e6b1cd4 | 55752baeeda893812cc615b137542853939d8e37 | refs/heads/master | 2020-08-03T15:08:37.854348 | 2019-12-03T03:38:12 | 2019-12-03T03:38:12 | 211,795,759 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,187 | py | Q2_ModelSelect.py | import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import KFold
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers.core import Dense,Activation,Dropout
from keras.optimizers import SGD,Adam,RMSprop
from keras.utils import np_utils
x_train=n... |
ac5c4edda8a5df7abc030fd637866fa4c8fc4bfc | e84a7ae9c43adb634bbdecc6c42a23766d2e7331 | /example_project/django_mptt_example/tests/test_util.py | 11934bb5d40a9371b5d223fdea041a75769f4a3c | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | rvaccari/django-mptt-admin | 8ed8993b5b8ca4580758e1e2869e010c3d4db5d1 | a95aa63177c03d0ad18869eff59eaa17a6c0a580 | refs/heads/master | 2020-03-25T05:41:14.239917 | 2018-08-03T20:23:30 | 2018-08-03T20:23:30 | 143,460,566 | 0 | 0 | null | 2018-08-03T18:27:41 | 2018-08-03T18:27:40 | null | UTF-8 | Python | false | false | 1,372 | py | test_util.py | # coding=utf-8
from django.test import TestCase
from django_mptt_admin.util import get_tree_queryset, get_javascript_value
from ..models import Country
from .utils import read_testdata
class UtilTestCase(TestCase):
def setUp(self):
super(UtilTestCase, self).setUp()
read_testdata()
def tes... |
08420d31713859946b2f19cebf68c333331cb80e | 5e84763c16bd6e6ef06cf7a129bb4bd29dd61ec5 | /blimgui/dist/OpenGL/GLES2/EXT/YUV_target.py | a272a7fbdf0a79604245e3e476c1c8198e9fd578 | [
"MIT"
] | permissive | juso40/bl2sdk_Mods | 8422a37ca9c2c2bbf231a2399cbcb84379b7e848 | 29f79c41cfb49ea5b1dd1bec559795727e868558 | refs/heads/master | 2023-08-15T02:28:38.142874 | 2023-07-22T21:48:01 | 2023-07-22T21:48:01 | 188,486,371 | 42 | 110 | MIT | 2022-11-20T09:47:56 | 2019-05-24T20:55:10 | Python | UTF-8 | Python | false | false | 1,604 | py | YUV_target.py | '''OpenGL extension EXT.YUV_target
This module customises the behaviour of the
OpenGL.raw.GLES2.EXT.YUV_target to provide a more
Python-friendly API
Overview (from the spec)
This extension adds support for three new YUV related items: first
rendering to YUV images, second sampling from YUV images while keeping ... |
e4422010337eade12226d84c79532cdbcae68d67 | 47efd42e4a7f4efb75d4ca93ae9b078244a9030f | /backend/blog_backend/api/issue/serializers.py | 384cf501f408afc2590e5d2db597dadbb30de40f | [] | no_license | RajuAgt/Dashboard_Django_React | e1bce0a6ee6500e01d9ea7b4d6de4a4dee593e68 | 441ea8630d01d225a17105b8ed25be5406140c40 | refs/heads/master | 2022-12-12T13:50:31.614080 | 2020-09-14T12:58:01 | 2020-09-14T12:58:01 | 253,311,541 | 0 | 0 | null | 2022-12-12T09:47:19 | 2020-04-05T19:07:39 | JavaScript | UTF-8 | Python | false | false | 736 | py | serializers.py | from rest_framework import serializers
from issue.models import Issue
class IssueSerializer(serializers.ModelSerializer):
"""DRF Serializer For Listing Published Issue"""
class Meta:
model = Issue
fields = ['issueName', 'website', 'issueBody', 'impact', 'published_on']
class IssueCreateSer... |
7159b447ed6fcb2005f63c7b7359970defbc9d43 | 8ff45b78ff6539e78379f01db5f5caa8b3e4f3e7 | /messages/models.py | 54fa3af6e42bfe901a6ec09abed9e5b8ec415522 | [] | no_license | bootandy/happy-little-messages | c7e72a71cecbad0e3d08365820bc16c234d8b9ee | fe0f9f166767b691a161f636fe06b8b31bf15842 | refs/heads/master | 2021-01-01T05:41:41.519899 | 2018-05-31T21:57:29 | 2018-05-31T21:57:54 | 4,849,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | models.py | from django.db import models
from datetime import datetime
class Message(models.Model):
text = models.CharField(max_length=200)
votes = models.IntegerField()
date_added = models.DateTimeField(default=datetime.now)
score = models.BigIntegerField()
next_vote = models.IntegerField(default=3600) # 8640... |
8d9f4bce998857bcc7bc2fda0b519f370bf957fe | cd28ab4fcc87ff6f14cef49b98cfb8ba5f91afe2 | /Cursos/devf/Lesson13/exercise4.py | 12dfe941e31ceacc20da117d46c870e8589da271 | [] | no_license | HomeroValdovinos/hello-world | c654102eb6e03839c10224d0154198e72b664640 | f7a6321fec06b79a78be1c790e843790d6fab15b | refs/heads/master | 2021-01-21T08:55:31.791600 | 2018-05-09T06:24:37 | 2018-05-09T06:24:37 | 101,960,695 | 0 | 0 | null | 2017-08-31T05:08:59 | 2017-08-31T04:54:40 | null | UTF-8 | Python | false | false | 1,690 | py | exercise4.py | # Identify a vowel
class MainInit(object):
def __init__(self):
self.vowel = str(input("Please type the character: \n"))
if len(self.vowel) > 1:
print("Invalid number of character")
else:
Vowel(self.vowel)
class Vowel(object):
def __init__(self, vo... |
9fea76b1612bd02f512072692090f8ef60e8a0fe | 5c1c29116083d9d2cfa668cf8c36a1cce2b8bc1c | /Env/__init__.py | 2bc27193aac7dbdb7498e385aa7067d1860feea6 | [] | no_license | phlindg/gangan | 332484cde27334df63313bba32d4bd715ce52678 | 9a14c22999557d54ffec838fd4dbbff9cd830fc4 | refs/heads/master | 2020-05-22T13:22:32.592068 | 2019-05-14T10:44:21 | 2019-05-14T10:44:21 | 186,358,859 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20 | py | __init__.py | from .exenv import * |
bacaaf5c91232d85f451c2c17a42cd2ec6966684 | 153b19185d36a86494453a31fd79e21c567a9edf | /problem_11.py | 142790bb7f5c5b844108ecfb71c362a3bbb276e2 | [] | no_license | mbhulst/euler-projects | b81cc09756778f0b7360c45ea9cdc2b2c5606b54 | b8f37306e1adfda877a27228c12d177b397c35c5 | refs/heads/main | 2022-05-30T20:58:11.470555 | 2022-04-07T14:51:58 | 2022-04-07T14:51:58 | 207,397,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,036 | py | problem_11.py | # In the 20×20 grid below, four numbers along a diagonal line have been marked in red.
# The product of these numbers is 26 × 63 × 78 × 14 = 1788696.
# What is the greatest product of four adjacent numbers in the same direction
# (up, down, left, right, or diagonally) in the 20×20 grid?
import numpy as np
data = np.ge... |
c68104e8a1866d67563385cb78343ffadfb4cedf | 534f795c2297befff28cf94f0db35ffc1e67c104 | /pyAzureDevOpsWiqlAlerts/utilities/slackinterface.py | 21cecec94d970b1f1a61792b609dc30b449b96a5 | [
"MIT"
] | permissive | AKloc/pyAzureDevOpsWiqlAlerts | 247ed48f944d3d2620e109d65393fda47d5534d2 | 13c3bd2a9fc7ad1dbaec6c635a8858403ee537b8 | refs/heads/master | 2022-12-10T21:56:03.512572 | 2020-11-24T14:48:03 | 2020-11-24T14:48:03 | 249,253,589 | 0 | 0 | MIT | 2022-12-08T03:54:08 | 2020-03-22T19:07:41 | Python | UTF-8 | Python | false | false | 2,889 | py | slackinterface.py | #! python3
from slack_webhook import Slack
class SlackInterface:
def __init__(self, slack_api_uri: str) -> None:
print('Building slack interface. URI = ' + slack_api_uri)
self._slack_api_uri = slack_api_uri
self._client = Slack(url=self._slack_api_uri)
# self._client = slack.WebCl... |
45fea7ae94af068e3c69c0a74762a2c44cab56cd | 0ff17ee041b29edd12dbf57b26fb9a63aa710f27 | /drug_information/modules/api/drugs_api.py | 3b8082cc5cf99fb7644084e9ca4f72da8d8a4b6e | [] | no_license | jorgec/project_linecare | b7537557970cdbeb315d93efae6aadbecc5e9e10 | 65150e69c447605dc3958505c02dad1a59bbb6db | refs/heads/master | 2020-03-28T20:43:23.225165 | 2019-03-07T06:14:33 | 2019-03-07T06:14:33 | 149,096,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,253 | py | drugs_api.py | from django.contrib.postgres.search import SearchVector
from django.db import IntegrityError
from django.db.models import Q
from rest_framework import permissions, status
from rest_framework.generics import get_object_or_404
from rest_framework.response import Response
from rest_framework.views import APIView
from dru... |
78e4073bf9a690ba657a2820252221861c118068 | 01a03c25119ba3109a9b6f6738b2c9625d40e183 | /underground_stations.py | 7378c826c182f5a58e14e1e2b496ab09b866c722 | [] | no_license | fuverdred/Random-scripts | 01370eaf1f8c734818ed3ad5f3ae8235df745d11 | 4aa47dbce3badc9ee500ca211692b938277a6c24 | refs/heads/master | 2020-05-21T09:05:10.898543 | 2019-09-19T12:34:13 | 2019-09-19T12:34:13 | 185,990,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | underground_stations.py | import requests
from bs4 import BeautifulSoup
from collections import defaultdict
url = 'https://en.wikipedia.org/wiki/List_of_London_Underground_stations'
dic_url = 'http://www.greenworm.net/sites/default/files/gw-assets/enable1-wwf-v4.0-wordlist.txt'
p = requests.get(url)
soup = BeautifulSoup(p.content, 'html.pars... |
7aa501331403fd16aafe5d33e2ef1bf460ed12d8 | 54469a8441d3cbd26ce3baa0211d2203545d29bf | /enumerates.py | aae5df60d36b63d522a875ac4248cce3515d5bad | [] | no_license | barbariskami/volunteers-bot | fe846b6f87d487e09013d9434b75304951cbf373 | 307bed7723ba9db86251230b44da705b78dc2a67 | refs/heads/master | 2021-07-05T06:31:59.937032 | 2021-04-28T15:24:42 | 2021-04-28T15:24:42 | 234,618,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,602 | py | enumerates.py | import enum
class Media(enum.Enum):
"""Enumerates all media and platforms this bot works with"""
TELEGRAM = 1
class TextLabels(enum.Enum):
"""Enumerates all the Texts that can be sent to a user by the bot. They are used for specifying pieces of text
that must be loaded from a file and sent to a user... |
a626cfca80e2e81db12247db9abf6f82cd0537d0 | 455cf3f5fdf84d341274f510dd19084c8386da3b | /data_analysis.py | d065614dbcb0fdd84a7daddc50ad9468c90b1b04 | [] | no_license | ankit-sinhation/scrapping | 7387fe8d09037117d3a73ff634b235e088655897 | f487e39ace181d09e184e872a54c000bcdc9b5e5 | refs/heads/master | 2020-03-22T08:32:56.485109 | 2018-07-06T22:15:56 | 2018-07-06T22:15:56 | 139,773,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | data_analysis.py | #!/usr/bin/python3
import tweepy
#defining consumer key and secret
#making connection with twitter api
c_key="7yyvLE5vaOjXg9mZwfaqKaGGq"
c_sec="2tme8Ijx9JLYYsn7619BBmInZaWobYezdCjpibld1C6DGkSGhN"
#token key & secret
#to search & get information u need to use token
t_key="1014803225210441728-5CN0MXhld6NsBww3fjNSwaZyr... |
9088081f5b13ab8a852986cab74c78a7290f6906 | de64b143a346585f51590bd674e8d13bbc672386 | /algorithm/2021/1007_15_3Sum/jungmin.py | 710fe9b23f32a021c6118cb8a59f029add4918d7 | [] | no_license | ai-kmu/etc | 304ec20f59e4026025abdcbcae21863c80630dcb | 9c29941e19b7dd2a2037b110dd6e16690e9a0cc2 | refs/heads/master | 2023-08-21T16:30:31.149956 | 2023-08-21T16:26:19 | 2023-08-21T16:26:19 | 199,843,899 | 3 | 24 | null | 2023-05-31T09:56:59 | 2019-07-31T11:36:16 | Jupyter Notebook | UTF-8 | Python | false | false | 1,455 | py | jungmin.py | class Solution:
def threeSum(self, nums: List[int]) -> List[List[int]]:
ans = []
nums.sort() # nums 정렬
for i in range(len(nums)-2): # num안 요소를 마지막에서 3번째까지 for문 반복
# 2개 더할 왼쪽과 오른쪽 설정
right = len(nums)-1
left = i+1
if i>0 a... |
1d864a47210e3f7c0f764a439cf6a31829de61a1 | 3792eac3e0cb917ca32d21b601efda44dedb5b73 | /robotstxtpy/__init__.py | 6f59a40142785c15e9b21cfb025b9403d99a1f9c | [] | no_license | algobot76/robotstxtpy | 1046f10b9534dd63acc6f1df2c60dce53c88b17b | b13ad925b50f91e2803087cecfbddc1898a4a035 | refs/heads/master | 2021-06-29T19:50:10.721870 | 2020-01-13T18:11:17 | 2020-01-13T18:11:17 | 233,297,449 | 0 | 0 | null | 2021-06-02T00:55:19 | 2020-01-11T21:06:51 | Python | UTF-8 | Python | false | false | 1,167 | py | __init__.py | from itertools import chain
from robotstxtpy.exceptions import RobotsTxtException
class RobotsTxt:
def __init__(self):
self.content = dict()
def add_user_agent(self, user_agent):
result = self.content.get(user_agent, None)
if result is None:
self.content[user_agent] = []... |
02a8899680274c33aeb491eebea39dc022fbd177 | a4717a562cbea3813eec1d95a6cc8c6942463a44 | /Anagrams.py | 3cf016b8fc3abded6bbccca052c71bb05d7e3274 | [] | no_license | saumyasj/HackerEarth | e21b8d93f3f9df14dc21dce52d4bec0d0b0ffc97 | cee367802a7f65de3a37e18934b193656e2e6d3e | refs/heads/master | 2021-04-02T04:00:40.918990 | 2020-05-04T16:06:25 | 2020-05-04T16:06:25 | 248,241,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | Anagrams.py | from collections import Counter
def anag(a,b):
p=Counter(a)
q=Counter(b)
print(sum((q-p).values())+sum((p-q).values()))
n=int(input())
for _ in range(n):
a=input()
b=input()
anag(a,b) |
bde454680f226008fc1ddeffa5666c5f1d95e6df | 20cd3bc4401a4bd7f869929c651830b49087f4bb | /board.py | 5515b3906820b1fd342ac3699d8301f4c90c4d5e | [] | no_license | Kalva014/AlgoPathFinder | da924dd8c824def921ad654d023dc82edcfe1a85 | 5c2082ebca41fdc4e3d0f91963b6b7c5589bcdbf | refs/heads/master | 2023-03-24T22:19:08.596837 | 2021-03-26T06:13:22 | 2021-03-26T06:13:22 | 264,376,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,486 | py | board.py | import pygame
import math
from node import *
# Window details
width = 700
screen = pygame.display.set_mode((width, width))
pygame.display.set_caption("Path Finding Visualizer")
# Board and path colors
red = (255, 0, 0)
green = (0, 255, 0)
blue = (0, 0, 255)
yellow = (255, 255, 0)
white = (255, 255, 255)
black = (0, 0... |
e09de53e3b993be8add7bd957e684d466af57210 | 75ad75aeebcd5f5c6aa605333c179501fdddd891 | /python-samples/task_1/gen_ex.py | d6a5650db07ffdd5af4a2859fb3896fb9f20566f | [] | no_license | Someshwaran/Python-Basics | 8fb5efeb686cf8dff441cd5df974d84c3619fd7c | f99ea462f100b7c8608bea6993df08888db28e49 | refs/heads/master | 2021-08-22T09:10:58.990801 | 2021-07-05T16:31:13 | 2021-07-05T16:31:13 | 144,714,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,421 | py | gen_ex.py | def fibonnoic():
""" Definition of the fibonnoic method. """
#variables for the fibonnoic series
variable_a = 0
variable_b = 1
#loop to generate the series
while True:
yield variable_a
# here the main logic of Fibonnoic series
variabl... |
09b1c524ddd39ccf83bcfcb3f727581d3935ed0c | fd7997ff9bb7b2cae5cf5f6e012e15ed75811511 | /HW1/mycreategrid.py | 2eef6b942a026d10ef528536e0868cee0fe18adf | [] | no_license | shangeet/GameAI | 7358bd48143585361aea6cbace2443432330a0f2 | d009143f6af017e6513f3dd18c3fd1cdb882d8e9 | refs/heads/main | 2023-03-24T18:11:12.055406 | 2021-03-23T13:19:03 | 2021-03-23T13:19:03 | 350,717,156 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,986 | py | mycreategrid.py | '''
* Copyright (c) 2014, 2015 Entertainment Intelligence Lab, Georgia Institute of Technology.
* Originally developed by Mark Riedl.
* Last edited by Mark Riedl 05/2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... |
8de1d209355ee6167d28fb651f76181581c8b8aa | 384d0be5ac54b306b945cf38c10d9b0a44c975ea | /stack/glance/glance/api/v1/images.py | 34efd5f29fd9036116b0e85015309fca0f1da06c | [
"Apache-2.0"
] | permissive | ashokcse/openstack-bill | 05ae313637b3cfecba946d2a9b32e8c7609fc721 | 1a3d7575d4b341f64fa1764ed47e47a7504a9bcc | refs/heads/master | 2021-01-18T14:05:24.696165 | 2012-09-12T11:29:20 | 2012-09-12T11:29:20 | 5,424,267 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 34,876 | py | images.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... |
105f3a78a8ae39b4917fa67b5062dca7adcc8ecd | 4d122852980e2f6bd14e1276e11a50b1c244143c | /backend/mobie.py | 0448acbd9243d58c6e5620be6d2c820e470852ec | [
"BSD-2-Clause"
] | permissive | geocrafter-studio/mobi.e-status | d2c1ab7e094911b76649b0df4a852664f7fb704f | 1c100a535ffed07dcc186ef9b6d5b8e7fce5d7f8 | refs/heads/master | 2021-05-11T19:01:14.324063 | 2018-02-14T12:45:30 | 2018-02-14T12:45:30 | 117,850,918 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,742 | py | mobie.py | import re
import requests
from time import time
class Mobie(object):
def __init__(self):
self.api_url = 'https://www.mobie.pt/public/asset/'
self.timestamp = str(int(time()))
self.params = {'version': self.timestamp, 'timestamp': self.timestamp}
self.session_cookies = {'allowCooki... |
92c30a241bb153a5d2e6ea6d68df08747639404f | e66252aca4fa73932ec2cf4ac0cd2e654be244f4 | /db_create.py | 21530cfd5542fff74245bdfbcdef930a7bb84a4d | [] | no_license | productanalyticsteam9/back_end | 045f49ed16703f93d10fe7e79383a680c901a6ee | e424210f3a245f1a89f4d89113d51b052e4dad97 | refs/heads/master | 2020-04-30T19:41:06.038209 | 2019-05-16T00:57:04 | 2019-05-16T00:57:04 | 177,045,711 | 5 | 1 | null | 2019-05-14T05:19:50 | 2019-03-22T00:43:51 | CSS | UTF-8 | Python | false | false | 223 | py | db_create.py | import sys, os
if os.path.abspath(os.curdir) not in sys.path:
print('...missing directory in PYTHONPATH... added!')
sys.path.append(os.path.abspath(os.curdir))
from project import db
db.drop_all()
db.create_all() |
d3a43aeb90bd5171f0a2d815f36c5a8ac5b114f4 | 2b077f9db401c47d67f89216046f0f4b8384d1dd | /problem_solving_wads/playing_cards/round.py | d55816bdc1193859445e9219c5255017e018eaa3 | [] | no_license | pythrick/problem-solving-wads | 773772e4e3cafec76fa902d5badd7f67ee643d41 | 172050024987d1e2ddedad2283ac6f6656660f03 | refs/heads/master | 2022-04-25T14:57:39.217696 | 2020-05-01T20:13:28 | 2020-05-01T20:13:28 | 260,033,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | round.py | from dataclasses import field, dataclass
from typing import List, Optional
from problem_solving_wads.playing_cards.play import Play
from problem_solving_wads.playing_cards.player import Player
@dataclass
class Round:
plays: List[Play] = field(default_factory=list)
@property
def winner(self) -> Optional[... |
956652f68d4120cddc32d65678ba26775c0fda19 | a41e1498e3c080f47abd8e8e57157548df3ebbf1 | /pandas/tests/arrays/sparse/test_accessor.py | 87eb7bcfa9cee3e92386ad0f148b896c0e682b07 | [
"BSD-3-Clause"
] | permissive | pandas-dev/pandas | e7e639454a298bebc272622e66faa9829ea393bb | c7325d7e7e77ecb4a4e57b48bc25265277c75712 | refs/heads/main | 2023-09-01T12:42:07.927176 | 2023-09-01T11:14:10 | 2023-09-01T11:14:10 | 858,127 | 36,166 | 18,728 | BSD-3-Clause | 2023-09-14T21:18:41 | 2010-08-24T01:37:33 | Python | UTF-8 | Python | false | false | 9,025 | py | test_accessor.py | import string
import numpy as np
import pytest
import pandas as pd
from pandas import SparseDtype
import pandas._testing as tm
from pandas.core.arrays.sparse import SparseArray
class TestSeriesAccessor:
def test_to_dense(self):
ser = pd.Series([0, 1, 0, 10], dtype="Sparse[int64]")
result = ser.s... |
a9c6ee9fe1c0de7faa5d0d98ba3651feb07e4c8e | dd4622390bb7122db37a889e647f28004a265ccd | /1906101001周茂林/第18周/1.py | 4570776dafd3fa85d23cbc213f1f778a52be4519 | [] | no_license | gschen/where2go-python-test | c8adaa095aa8a095401f98c7b3f8f17c72d0532d | eb9e6011b8d33fa45a6b1ef853affd01a296db21 | refs/heads/master | 2022-12-13T19:45:09.874691 | 2020-10-15T13:12:52 | 2020-10-15T13:12:52 | 211,591,156 | 4 | 1 | null | 2022-12-05T07:46:12 | 2019-09-29T02:35:00 | Python | UTF-8 | Python | false | false | 811 | py | 1.py | '''
给你一个整数 n,请你返回 任意 一个由 n 个各不相同的 整数 组成的数组,并且这 n 个数相加和为 0
示例 1:
输入:n = 5
输出:[-7,-1,1,3,4]
解释:这些数组也是正确的 [-5,-1,1,2,3],[-3,-1,2,-2,4]。
示例 2:
输入:n = 3
输出:[-1,0,1]
'''
def sumZero(n):
lis = []
if n % 2 == 0:
for i in range(1, int((n/2)+1)):
lis.append(i)
lis.append(-i)
return... |
3d00644b579dc61a1520b0ba28adde12c1691559 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/ms_data/element/elem_s008_xsd/__init__.py | 6b98f66124969f6e57a5f29e744da3d214aee942 | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 231 | py | __init__.py | from output.models.ms_data.element.elem_s008_xsd.elem_s008 import (
CInvalid,
Cc,
Cs,
Fr1Valid,
FrValid,
Root,
)
__all__ = [
"CInvalid",
"Cc",
"Cs",
"Fr1Valid",
"FrValid",
"Root",
]
|
04fd25fad7d4fa4ad154feeab659736c83c7ae61 | 6c52342f78f8790018a24a55251ef3f8bc479452 | /Desktop/HealthCareApp/HealthCare/medical/urls.py | d531be389245f84b3d11d795dfcef4e27e8bd3de | [] | no_license | richard9145/CRM-project | 534911cc238f4c37a07f3b4131bfb6da85b44ac4 | 24c3fafceef1e1cb6544c06dc858bcb1269546ab | refs/heads/master | 2022-06-09T02:23:34.617338 | 2020-05-07T19:33:48 | 2020-05-07T19:33:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,010 | py | urls.py | from django.urls import path
# from django.contrib.auth import views as auth_views
from . import views
app_name = 'medical'
urlpatterns = [
path('', views.home, name='home'),
path('login/', views.loginPage, name='login'),
path('logout/', views.logoutUser, name='logout'),
path('register/', views.reg... |
7b41ecddd105b2d2e3fff60dfc11f98e06b7ea3f | 0a848b5b2ea31a7e2e997f27b13f363530df78d1 | /backend/justAdmin/migrations/0001_initial.py | da49b53f6b796a606af350c55a6125f66d913561 | [] | no_license | PhanVanThanh-hub/React-Django-Ecommerce | a88e4c0747a9a3d6179d45c60641595221fe701c | 00946075486495676595fe0a17dcdd0799756d4b | refs/heads/main | 2023-08-13T19:24:40.492000 | 2021-09-30T13:05:03 | 2021-09-30T13:05:03 | 412,066,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,931 | py | 0001_initial.py | # Generated by Django 3.2.6 on 2021-09-13 05:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('product', '0002_product_amout'),
]
operations = [
migrations.CreateModel... |
48b0591f5d28453c9f890d45e8dfa1d7284dd3db | 7e6f0efd6f4733d09e61b4c6658455e6727cd48f | /seed/lib/superperms/orgs/migrations/0015_organization_property_display_field.py | c8084a3a58f06d9d7103188ce8cb6cfc414c8dc3 | [
"BSD-2-Clause"
] | permissive | SEED-platform/seed | 0e4a6a2fa93f4c2528d0c295163a91f836a4253d | 680b6a2b45f3c568d779d8ac86553a0b08c384c8 | refs/heads/develop | 2023-09-01T10:46:25.502697 | 2023-08-30T18:44:21 | 2023-08-30T18:44:21 | 25,450,714 | 108 | 75 | NOASSERTION | 2023-09-13T22:18:47 | 2014-10-20T04:26:53 | Python | UTF-8 | Python | false | false | 442 | py | 0015_organization_property_display_field.py | # Generated by Django 2.2.13 on 2021-01-26 19:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orgs', '0014_organization_geocoding_enabled'),
]
operations = [
migrations.AddField(
model_name='organization',
nam... |
7da2b3ff41eacdee30755ec72d0217e6ca6a69b5 | 0c476690d52cf78040d1f08e2d574675601da8b1 | /jsminify.py | 69f3ba240eb2d3f16a5bb4457ca263dbdae31c2c | [] | no_license | danielwilkinsonthompson/hyde-plugins | 96d69bb58f3999bd5222ae1d085647d0dc1ac702 | 817df6525645bf557d2ef3456fddbb480af441b9 | refs/heads/master | 2016-09-15T20:24:54.978467 | 2013-07-26T12:54:09 | 2013-07-26T12:54:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | jsminify.py | # -*- coding: utf-8 -*-
"""
JSMin plugin
"""
from hyde.plugin import Plugin
from jsmin import jsmin
class JSMinifyPlugin(Plugin):
"""
The plugin class for JSMin
"""
def __init__(self, site):
super(JSMinifyPlugin, self).__init__(site)
def text_resource_complete(self, resource, text):
... |
ccb21709136d407ef53c9e3cb76168f8afdf9156 | 301f06103f32c6a458bdeb2a1113877b2a56e51d | /Unidad_1/tuples.py | cbc154a704a7ce5d201d7af35456dc29d6b4e700 | [] | no_license | RicardoM99160/Python | a2448ce65a882fd7b6a1ac342d0b7cf3558e2a49 | ca5b43059e27b82b66f8883730e988374b7117b5 | refs/heads/master | 2022-11-30T20:53:38.845755 | 2020-08-19T04:17:18 | 2020-08-19T04:17:18 | 288,628,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | tuples.py | short_tuple = "Rolf", "Bob"
a_bit_clearer = ("Rolf", "Bob")
tuple_in_list = [("Ricardo", "Racardo")]
not_a_tuple = "Rolf"
friends = ("Rolf", "Bob", "Anne")
friends = friends + ("Jen",) #La coma al final sirve para convertir el valor de Jen en una tupla
print(friends) |
d8b9f0dabeec6988f6f6a7a80afba46e380d8ea8 | e8e411a0ff1da1e0ec9350e4d1b7d24353c2c4c6 | /getsizeofstring.py | c1ad622cad6df377fad44ef4d1933399e15d188b | [
"MIT"
] | permissive | manand881/Python-Programs | b3333b68172d4f0d7c0757f40f1608bfc6a6523a | eb970cb1b21d4aede0102c60425eb8a1d4ac605c | refs/heads/master | 2020-03-24T22:50:25.430484 | 2019-05-17T04:57:59 | 2019-05-17T04:57:59 | 141,669,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | getsizeofstring.py | # Get the size of an object in bytes
import sys
str1 = "one"
str2 = "four"
str3 = "three"
number=1
number2=2
number3=1024
number4=2048
print("Memory size of '"+str1+"' = "+str(sys.getsizeof(str1))+ " bytes")
print("Memory size of '"+str2+"' = "+str(sys.getsizeof(str2))+ " bytes")
print("Memory size of '"+str3+"' = "+s... |
4466336ade31863df97c6abec9e3c2a2f0a10fca | 61ef3a8928caa88e874aa79d46203871d0e5bbfb | /p/dist-packages/cfnbootstrap/lang_package_tools.py | a791be01a2aa597e9e10389d4254dd898224e610 | [] | no_license | joshg111/craigslist_kbb | cd941f237821fa7d2a9a8140b2744294948ba56c | a473d0d389612e53a2ad6fe8a18d984474c44623 | refs/heads/master | 2021-01-10T09:35:04.334601 | 2018-05-26T16:05:20 | 2018-05-26T16:05:20 | 44,120,875 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,320 | py | lang_package_tools.py | #==============================================================================
# Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... |
5866cdf66a61f985ba7f713286f6c149f77ee444 | 41000f1d38394dde3534945567f45cc52ce2f096 | /jackalope/model/data/db_worker.py | 67b155878a2002e351a60337a63e05ce42c079ec | [] | no_license | sendjack/jackalope | b1187e7fededb95873b571058224d03aaf6767a0 | 6ba787d682fd3c28678207faf9fd75db645b5b3f | refs/heads/master | 2021-01-21T12:39:35.371257 | 2013-04-08T22:02:27 | 2013-04-08T22:02:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,540 | py | db_worker.py | """
DB Worker
---------
DB Worker converts data from our database into Jackalope objects and vice
versa.
NOTE: This class is intended to subclass from VendorWorker as there are a
lot of similarities between the vendor workers and the db worker, but that
is for another day.
"""
from jutil.... |
cfbfbe218ce664d1085632a98d59c8a62673884c | 7f446cbc9cfeff35ddca053e924612b6b8febb0d | /.pycharm_helpers/python_stubs/-533200126/_padding/lib.py | 1256ee3ad4ff1da8e205a62d07de9b94237a06f1 | [] | no_license | theskyareblue/testdemo | 2832f9d643a0b2905b8fb38f78f02f60959f34a2 | 833afe4ea8dd92ebaed5fd40f1ad6ce4a1206604 | refs/heads/master | 2023-04-09T07:40:27.638892 | 2019-06-21T03:34:32 | 2019-06-21T03:34:32 | 192,511,828 | 1 | 0 | null | 2023-03-16T16:19:55 | 2019-06-18T09:46:52 | Python | UTF-8 | Python | false | false | 770 | py | lib.py | # encoding: utf-8
# module _padding.lib calls itself <Lib object for '_padding'>
# from /usr/lib64/python2.7/site-packages/cryptography/hazmat/bindings/_padding.so
# by generator 1.145
# no doc
# no imports
# functions
def Cryptography_check_ansix923_padding(uint8_t, *args, **kwargs): # real signature unknown; NOTE: ... |
24527de54547b43479a7e5dc244a4e73f535dbf9 | dc0e351303e36ad6fe4b78366d6ec8f76a756706 | /backend/njiani/njiani/users/schema.py | bdf22b9144303ccc65173b968a85f6404245abd4 | [] | no_license | JrFelix540/njiani | b13cf74a9af3d0d6b2f2ccdcd2527a1e9a0e8bb0 | 39c2266c4ada58ca0e1de79dec0accb0b1548772 | refs/heads/master | 2022-12-09T06:34:30.182699 | 2020-08-21T14:03:31 | 2020-08-21T14:03:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,882 | py | schema.py | from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission, Group
from graphene_django import DjangoObjectType
from graphene_django.filter import DjangoFilterConnectionField
from graphql_auth.schema import UserQuery, MeQuery
from graphql_auth.mutations import Register
import graphe... |
d5c8cd482c2023ef2e4ba4e91956a86282875cc1 | 7f0d39941eb607b1ec36b648067988f8da178ab6 | /Demo_3/calibkinect.py | b7437d603ced0179b97ef4127997fbe1756ac181 | [] | no_license | kamelakapllani/Point-Cloud-Project | 28c52758b3bde949d96c12d0f6582a123fe08215 | 4f1e3c7fff10f447673dad2409fa541d982e5655 | refs/heads/master | 2022-04-27T21:59:38.952029 | 2020-04-01T01:38:15 | 2020-04-01T01:38:15 | 255,515,961 | 0 | 0 | null | 2020-04-14T05:12:51 | 2020-04-14T05:12:51 | null | UTF-8 | Python | false | false | 2,285 | py | calibkinect.py | # Edited version of : https://github.com/amiller/libfreenect-goodies/blob/master/calibkinect.py
import numpy as np
scaler = 1
theta = 0
# Return real-world coords from raw kinect depth data
# Depth values returned should be in meters
def depth2xyzuv(depth, u=None, v=None):
transl = 0
if u is None or v is N... |
479da4a887c117f805a46d65afc53f745857bf54 | 11ed3eb12f795eab25cbab0487c3fb5c55018e36 | /server/gif.py | d1ce0867f049f6b1517f04003f47a6b84a7203f9 | [] | no_license | mynameisbenzo/kapwingInterview | c66f23bed6c15d2f07159ab74b404fa3fd57d514 | 017f81555ccfd1a8ec8e7db11ff80bd1d2f762fa | refs/heads/master | 2022-12-23T08:36:01.620831 | 2020-09-28T20:58:05 | 2020-09-28T20:58:05 | 297,507,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | gif.py | """
Handles GIF making
"""
import shutil
import tempfile
import glob
from PIL import Image
from upload import upload_file
from urllib.request import urlretrieve
import ssl
from flask import Blueprint, request, jsonify
ssl._create_default_https_context = ssl._create_unverified_context
Gif = Blueprint('gif', __name__)
... |
71e1ee98f5e4189e9fe4e770a8aa60844f775e64 | f8f0e349ed63992f6689e5e81217b5dae1a0748a | /map/urls.py | 77b1e3f129a7abdd3ee7e237ced8b8c8f481060f | [] | no_license | jathpr/rjubr | faefbe06fac4d995954714ba06171f5d4c5c392e | f3077fc06ac7a9d9374e259b00f8348bd1f4b9fd | refs/heads/master | 2021-01-11T21:47:17.907258 | 2017-02-03T18:35:39 | 2017-02-03T18:35:39 | 78,849,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.map_prev, name='map_prev'),
]
|
81da09c9d25c1e349b38717069c5054bbf5f70e8 | 92ced2f5572a5235c68f42e059ba6f3d467f1c3d | /api/migrations/0001_initial.py | 8f10abe3134a5250320448fb7cb97ad08ebeee02 | [] | no_license | mehdirazajaffri/menaCoin | 210e8422d275b1b4f053c9b5487c68fe9ebc4a5d | 55850be559dd0006c48abfb5ac2ecfc7708b9b67 | refs/heads/master | 2023-06-02T20:06:06.982187 | 2021-06-20T16:06:11 | 2021-06-20T16:06:11 | 378,645,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | 0001_initial.py | # Generated by Django 3.2.4 on 2021-06-20 12:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ExchangeRate',
fields=[
('id', models.AutoF... |
3225f4a7d2a1b11fb8afedf91d725626df1b2203 | 4057fed1fa43f2441a29983171c656850c948be3 | /python/Comrobot.py | 5acb68cda20303b1b11a673ee5ae3f11ae170b2c | [] | no_license | Liganggooo/Work_File | 4f904f98b9b6e2e241d5061e2b9266ed9e9f960f | 1ce37ea138e950addfa79d07fb86c50e6a7ea47d | refs/heads/master | 2020-04-01T10:15:39.800166 | 2018-10-15T13:35:34 | 2018-10-15T13:35:34 | 153,110,028 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,579 | py | Comrobot.py | # def test():
# a = 100
# def test2():
# print(a)
# #a = 120
# return test2
# result = test()
# result()
# import requests
# newurl = 'http://news.qq.com/'
# res = requests.get(newurl)
# print(res.text)
# import requests
# from bs4 import BeautifulSoup
# newurl = 'newurl = 'http://news.qq.c... |
b194636450438384ba87a6bce280aff9fabd6192 | 6c9ffcf4933268e8a11b26d17bdc92ffef04ef4c | /playground/initialD/ros_environments/message_composer.py | 0afe4788779eedcebe00f50371a8a90d629de081 | [] | no_license | hobotrl/hobotrl | 90bfb8be099117a808cd7cad58211835c90f2390 | 1dc925419b041f8a0b62a76c3ce0fbad66ce344a | refs/heads/master | 2021-03-22T04:03:07.381709 | 2018-03-22T05:25:23 | 2018-03-22T05:25:23 | 92,576,948 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,667 | py | message_composer.py | """Remote ROS Message.
has to types
RMsg1 = (class_name, built-in) -> Msg1 = class(builtin_value)
RMsg2 = (class_name, {'field1': RMsg21, 'field2': RMsg22}) ->
"""
import importlib
__type_mapping__ = {
# bool
'bool': 'bool',
# int
'int': 'int', 'char': 'int', 'uint32': 'int', 'int8': 'int', 'int16': '... |
aec9e5ce3db9b92ac8c162fe5cfb6b4532441b3b | cc14e5ac92b74f9e6275676d91c5f644cad02767 | /fdgis/tests/test.py | 43013de79c09efdb7f406a6b9ec3d73e4af69abe | [
"Apache-2.0"
] | permissive | rsmahabir/fdgis | 72b086aac2749a148123fabe85116e839e3e6c84 | ba09633a44ec61a153810f27ec557f544c6e0e1b | refs/heads/master | 2020-04-11T23:51:49.447369 | 2018-12-17T19:57:31 | 2018-12-17T19:57:31 | 162,181,870 | 0 | 0 | Apache-2.0 | 2018-12-17T19:47:56 | 2018-12-17T19:47:55 | null | UTF-8 | Python | false | false | 9,717 | py | test.py | #-*- coding: utf-8 -*-
from collections import Counter
from sys import version_info
python_version = version_info.major
import unittest
import fdgis
from os import listdir
from os.path import dirname, join, realpath
#from tempfile import gettempdir
from tempfile import mkdtemp
path_to_directory_of_this_file = dirn... |
c01808ad3e58d9d652ec6a5b92ba184a17049cf4 | b209346b9e135e4a09434b2a8b567476e9cea61d | /src/329.py | bd8de6903419252ec414ca0f8fcab9eb56f7c6a3 | [] | no_license | Abe27342/project-euler | 0f924773c8bae3fd477db1cd26617f7ca6d23e87 | a01e7843a7b6359b0b3ff90cbf3fe26aa99bae06 | refs/heads/master | 2021-09-01T21:26:16.955967 | 2017-12-28T18:04:41 | 2017-12-28T18:04:41 | 12,110,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,099 | py | 329.py | from fractions import Fraction
from helpers import sieve
primes = set(sieve(500))
memo = {}
def left_hop(n):
if n > 1:
return n - 1
assert n == 1
return 2
def right_hop(n):
if n < 500:
return n + 1
assert n == 500
return 499
def probability(n, string):
if (n,string) in memo:
return memo[(n, string)]... |
60cd4dfed5e3beb973f54e446272211da5b1e2b2 | 27331020ff20d00f4e875f6a20ce0ca1c906da43 | /PythonClass/DEEP_LEARNING/4. learning.py | 7b72e97eac26b7489d26020c0e6445266f5ae222 | [] | no_license | MOOSUNGPARK/source | 2ac7f24766c953cfafc632eb2812f713aa708944 | 50b2d169d5c64778d818decd564045d7f8e6c304 | refs/heads/master | 2021-01-20T14:29:02.015764 | 2019-01-09T06:37:35 | 2019-01-09T06:37:35 | 90,616,630 | 1 | 7 | null | null | null | null | UTF-8 | Python | false | false | 4,698 | py | 4. learning.py | import matplotlib.pylab as plt
import numpy as np
from PythonClass.DEEP_LEARNING.common.functions import softmax, cross_entropy_error
from PythonClass.DEEP_LEARNING.common.gradient import numerical_gradient
from PythonClass.DEEP_LEARNING.dataset.mnist import load_mnist
### 손실함수1. 평균 제곱 오차 ###
def mean_squard_error(y... |
55c074dd57204092409768800d8ff1a931237dd5 | cf462e91503d1a938c0f31b19887b747ec3ee5eb | /orchestra/globals.py | ff54dd95ffc299bc32cefeeacde5e6b1ae1b632c | [] | no_license | aleclearmind/revng-orchestra | b584f934f2958f0f9d04a6dd003056bd23b9e34c | 2ca42e81de3503a15248a55cff4f156fa95cb85c | refs/heads/master | 2023-07-25T08:09:54.627669 | 2021-08-24T09:37:29 | 2021-08-24T10:17:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 61 | py | globals.py | global loglevel
global quiet
loglevel = "INFO"
quiet = False
|
7748ae4c50d98ba0b269f74d27d1b0bbbef5b0ed | d84c57420c7f4c33a030f072727f5b2a86a8edf4 | /SAI_K/lists/palindrome.py | 5ddc9feadb6c92f89f4639e0a57fd16ddc52003b | [] | no_license | Surajsah9/my_new-_js_code | fcd12698ac02791455a61b1d2cf39ab54f515279 | 4d64dc31560aa09338d17f22b787db0aad0cae6e | refs/heads/master | 2023-06-06T04:09:57.653263 | 2021-06-24T12:09:24 | 2021-06-24T12:09:24 | 379,176,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | palindrome.py | print("palindrome example :- NITIN ")
print()
palindrome=str(input("Enter a palindrome string:-"))
l_palindrome=list(palindrome)
print(l_palindrome)
index=len(l_palindrome)-1
rl_palindrome=[]
while index>=0:
rl_palindrome.append(l_palindrome[index])
index-=1
print(rl_palindrome)
if l_palindrome==rl_palindrome... |
7720eebb8cfaabd8f1c7231f4c702cf2a172e2d7 | df2cd040187b619c2446e1ddea34c363038c1079 | /BSC-Doan-master/stuff/code-MarcoKinkel/pytorch_model_marco/data.py | 24a93fa07d3f92e4c462942d2b9e8b0d0c5fe7e5 | [] | no_license | doan97/BSC | b4bb98da311d22b7e3e3c5ca7b1c8b35b8981772 | c84072f241df134683c503667965d4bb4ba19970 | refs/heads/master | 2021-01-06T19:00:18.067722 | 2020-05-11T18:17:07 | 2020-05-11T18:17:07 | 241,447,870 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,539 | py | data.py | import numpy as np
import random
from ringbuffer import RingBuffer
from simulator import Simulator
import global_config as c
import math
class Data(object):
def __init__(self, sim):
self.reset()
self.sim = sim
def reset(self, new_idx=None):
# All data sets represent the data **before**... |
9859d05f24e270de88f6c03efa579d474a2e7485 | dd85fd91b7bab66088daaae247b04ca3385523d8 | /sarpy/annotation/afrl_rde_elements/Research.py | 5e122fd75dcfd079d0679e8c7bdc370de4ebdbbf | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain"
] | permissive | ngageoint/sarpy | 37a182fdae6bc40221f4d03cd81467f015e1529a | de1b1886f161a83b6c89aadc7a2c7cfc4892ef81 | refs/heads/master | 2023-08-21T11:04:01.776416 | 2023-08-07T19:24:44 | 2023-08-07T19:24:44 | 126,400,199 | 192 | 72 | MIT | 2023-08-29T20:16:46 | 2018-03-22T22:03:23 | Python | UTF-8 | Python | false | false | 8,911 | py | Research.py | """
Definition for the main NGA modified RDE/AFRL labeling object
"""
__classification__ = "UNCLASSIFIED"
__authors__ = "Thomas McCullough"
from typing import Optional
import os
from sarpy.io.xml.base import Serializable, parse_xml_from_string, parse_xml_from_file
from sarpy.io.xml.descriptors import SerializableDes... |
ba9d7171cd718f38283bad2760f76287dbe4c412 | bd6f0d34809f73d443e27f72052ba8455a77e5ad | /huiqiantong/yanzhengma/make_yanzhengma.py | 4f0af9da01eb45227e715c2931182e1bf0a5f8bf | [] | no_license | xiyangxitian1/spiders | f6aad68d2022f78340ec6ee54ae9824eac59ef95 | b93046de733be624c18c7d3877d88d7e86eba8ee | refs/heads/master | 2020-09-07T18:31:08.349987 | 2020-03-27T07:04:41 | 2020-03-27T07:04:41 | 220,877,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,222 | py | make_yanzhengma.py | '''
1. 画一张空白的画
2. 画底色,给每一个像素填充一个颜色,颜色随机 -- 函数
3. 往画上写字,字是随机的(函数),字的颜色也是随机的 (函数)
4. 保存图片
PIL 在py2.6以下可以用
pillow py3以上使用
pip install pillow
Pillow_PIL 现在用的是这个包
'''
import numpy as np
from PIL import Image, ImageDraw, ImageFont
mylist = []
def random_char():
'''
生成随机数
unicode
大写字母 65-90,小写字母97-122 数... |
a726be09101b71419afa515ad7edb94f76078beb | aa7d7d4555e47173b8b8810ebddff3484f5ac38c | /kuvar/recepti/migrations/0007_auto_20210106_1521.py | e5746183df9f776dc5b71d7a858461752a9ba760 | [] | no_license | Geralt43/FWW | c4a6bc08a4f67e19876ffa7e5c0ca44ffe847f13 | 013e7ba2702c2e94a179692aabd1b52d7f77334b | refs/heads/master | 2023-02-12T21:03:20.874608 | 2021-01-09T12:09:22 | 2021-01-09T12:09:22 | 328,142,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | 0007_auto_20210106_1521.py | # Generated by Django 3.1.5 on 2021-01-06 14:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recepti', '0006_auto_20210106_1515'),
]
operations = [
migrations.AlterField(
model_name='rating',
name='rating',
... |
8407ef1082f90bcae2298b80b8b5764b22954727 | abbc7acc47b455dab770dd00f6ce4e1c9358bc13 | /NLP_projects/Indian_Language_Translator/transliterator/final.py | 1cd7183dfd35118f630b8a1005b378606cc0c052 | [] | no_license | mekaushalmittal/NLP | 5347201165f5802f6e6669b51ce97072521345ec | 12d64d4d4f0c84580a273fdedbd1e7a575cbbc36 | refs/heads/master | 2022-11-25T01:10:44.768257 | 2020-07-30T08:09:15 | 2020-07-30T08:09:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | final.py | import segmenter
import romanization
if __name__ == "__main__":
inp = input("Enter Hinglish Text: ")
out1 = segmenter.hindi(inp)
lst = []
if (out1 == None):
print ("Some incorrect spelling used. Check documentation for instructions on how to use Transliterator")
else:
for i in out1:... |
6fc37d9c748fbcd70ca656613ca6954fca5d68c7 | 77b9c69248d194248c94d5e959b8c3e8d3792a37 | /sdc/sdc_method_backup.py | d9c5fb113a7953decb9a8247794b509351d158da | [
"Apache-2.0"
] | permissive | sysdiglabs/sdc_client | d8afccabf5e9165c65a2da4bef6bacef95ae8fae | f72f476f7b555ce8be4d1b6d6ce21c53400aeb08 | refs/heads/master | 2020-04-16T13:54:34.748785 | 2019-01-14T11:11:01 | 2019-01-14T11:11:01 | 165,647,509 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,599 | py | sdc_method_backup.py | # Copyright 2018 Sysdig
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
ba583d73828e48a45c6f415a8336442707dacffb | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /ABC/abc001-abc050/abc015/b.py | 2c6bd56a03fdd996c9e0d3de2a077d49da13b115 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 258 | py | b.py | # -*- coding: utf-8 -*-
def main():
from math import ceil
n = int(input())
a = list(map(int, input().split()))
zero_count = sum([1 for ai in a if ai == 0])
print(ceil(sum(a) / (n - zero_count)))
if __name__ == '__main__':
main()
|
5f5f229e46962de4a91a0906da5d345db748ffa0 | 5645d5ffaced5961332b8ab0e07110fc5afa296a | /pytrec_eval/utils.py | 494ef4293b8e64e87096e3966f27379fca7639b0 | [] | no_license | pombredanne/pytrec_eval | bef4216b22e0ba0c5db3aea4d2fd1503389919c2 | c7b51d5878c28115892728e23443ed5f3ced285b | refs/heads/master | 2021-01-18T11:05:37.646453 | 2013-10-01T08:12:28 | 2013-10-01T08:12:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,603 | py | utils.py | import sys
import pytrec_eval
__author__ = 'alberto'
def evaluate(run, qrels, measures = pytrec_eval.STD_METRICS, detailed = False):
"""Evaluates a TREC-run by using the specified qrels to compute the given measures.
Measure is a list of functions.
If detailed is True then the value of each measure is re... |
dddf62eaa0d316a50fff09dd84b80cfff859d021 | 422dd5d3c48a608b093cbfa92085e95a105a5752 | /students/carlos_novoa/lesson04/json_save/example_meta.py | 1ae831eb458bdd4760c89b0e8453cd27858c923f | [] | no_license | UWPCE-PythonCert-ClassRepos/SP_Online_Course2_2018 | a2052fdecd187d7dd6dbe6f1387b4f7341623e93 | b1fea0309b3495b3e1dc167d7029bc9e4b6f00f1 | refs/heads/master | 2021-06-07T09:06:21.100330 | 2019-11-08T23:42:42 | 2019-11-08T23:42:42 | 130,731,872 | 4 | 70 | null | 2021-06-01T22:29:19 | 2018-04-23T17:24:22 | Python | UTF-8 | Python | false | false | 1,051 | py | example_meta.py | #!/usr/bin/env python
"""
Examples of using json_save
"""
import json_save.json_save_meta as js
# Metaclass examples
class MyClass(js.JsonSaveable):
x = js.Int()
y = js.Float()
lst = js.List()
def __init__(self, x, lst):
self.x = x
self.lst = lst
class OtherSaveable(js.JsonSaveabl... |
8165f744e6e2667966cea2ca816d371c30de3e6c | 934006dea2505448843ee7b3e94f4bd20afafc3c | /dijkstra.py | 105473624dc36e595c8598fb34b42c0e8bb136e0 | [] | no_license | ojohnso3/python-sample | bb67adc517a489c6d9060dd6d6933b6d1098f1d3 | 3cff30025f2afcc3e838902678fc8d72e08537a6 | refs/heads/master | 2020-05-19T03:19:14.722238 | 2019-08-01T19:22:05 | 2019-08-01T19:22:05 | 184,797,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | dijkstra.py | from heappriorityqueue import *
from mygraph import *
def dijkstra(g, src):
""" Calculates the shortest path tree from the source in the input
connected graph g using Dijkstra's algorithm.
Runs in O((|E| + |V|) log |V|) time using a HeapPriorityQueue data structure.
"""
if g == None or src == None:... |
77d53e32d2fe95c06afb4d8dc373a822af6c1d0b | a73da00199d1dc35441882c5ecd3836ab545c588 | /wrappers/python/simtk/openmm/app/simulation.py | 9199d582d54f3f940ff4f88b909e74153f1e162d | [] | no_license | rmcgibbo/neb | 78c5e662c3fdef6f5228c305aaef400f1f904951 | ace0a2e691dfa4c34b8790a0f87ba7a82a8db0ac | refs/heads/master | 2016-09-05T19:22:52.164333 | 2013-03-07T01:26:19 | 2013-03-07T01:26:19 | 7,921,138 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,334 | py | simulation.py | """
simulation.py: Provides a simplified API for running simulations.
This is part of the OpenMM molecular simulation toolkit originating from
Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See h... |