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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a013072f333fb5fd98f422aa0ece2c174bb38615 | 0f2d4fdd386d6687a8ad8450f0497b4d37d37316 | /masjid_data/models.py | 1316092cb6fd47a4782aab3c7b97ee351705dc55 | [] | no_license | aslamhadi/MasjidData | ae16acd6614171049efd406f465e0b20881d587c | 2c42083ed770e9cc73ffd9eaf2085a6dd7369175 | refs/heads/master | 2020-05-31T23:41:30.297709 | 2015-03-08T15:06:34 | 2015-03-08T15:06:34 | 31,352,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,444 | py | models.py | from django.db import models
class Masjid(models.Model):
name = models.CharField(max_length=255, default="")
area = models.CharField(max_length=100, default="")
address = models.TextField(default="")
remarks = models.CharField(max_length=255, default="")
source = models.CharField(max_length=255, d... |
0e7c46ead5751ee87d607e02dcb0dc0d9684a215 | 2a97314ea72a7298527df89a6b5831fa1180f5b0 | /app/email.py | 011fe0f782fcb2a5be97e021c0905474a40aae06 | [] | no_license | aac3476/DDL | 2ab96c0fd077768a13834c4491190deb1de5a0db | 6dce5fc3d350534904c7ee2099548157e5fc54c5 | refs/heads/master | 2022-12-11T15:00:56.089676 | 2019-02-25T13:51:50 | 2019-02-25T13:51:50 | 172,324,127 | 0 | 1 | null | 2022-12-08T01:21:25 | 2019-02-24T10:29:19 | Python | UTF-8 | Python | false | false | 1,560 | py | email.py | # -*- coding: utf-8 -*-
from threading import Thread
from flask import current_app, render_template,request,Flask
from flask_mail import Message
from app import mail
from app import create_tpapp
import time
from flask import Flask
timedic={}
APP = None
def async_send_mail(app, msg):
with app.app_context():
... |
0495192f70a9885ed3e7642c42b33596d094edc4 | 47f04910a958813b4a7b629cb47a5822fde43153 | /yacybot.py | 90bacb9a520e7f7e2f289e0a01f5efa3da2d9fd5 | [] | no_license | h4ck3rm1k3/yacybot | 07e873cd4f88736a96d61db851f268fa0a3a052d | 74e96c07cc6478c3b72d7f09ddf0f755d15e8cc9 | refs/heads/master | 2021-01-18T02:57:02.088064 | 2016-01-03T15:21:54 | 2016-01-03T15:21:54 | 48,948,431 | 0 | 0 | null | 2016-01-03T14:24:29 | 2016-01-03T14:24:29 | null | UTF-8 | Python | false | false | 9,036 | py | yacybot.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# vim: ts=2 sw=2 expandtab
# ----------------------------------------------------------------------------
LICENSE = \
u""""THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
<cfr34k-yacy@tkolb.de> wrote this file. As long as you retain this notice you
can do ... |
d7e3acf49d7936f1942cd2ea7f4a489b5982cf79 | 7b13e6acb2a1f26936462ed795ee4508b4088042 | /算法题目/算法题目/剑指offer/题52两个链表第一个公共节点.py | 023ddf107628dc72f77b05cc64fe18a0909f2303 | [] | no_license | guojia60180/algorithm | ed2b0fd63108f30cd596390e64ae659666d1c2c6 | ea81ff2722c7c350be5e1f0cd6d4290d366f2988 | refs/heads/master | 2020-04-19T08:25:55.110548 | 2019-05-13T13:29:39 | 2019-05-13T13:29:39 | 168,076,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 910 | py | 题52两个链表第一个公共节点.py | #Author guo
# -*- coding:utf-8 -*-
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def FindFirstCommonNode(self, pHead1, pHead2):
# write code here
len1 = 0
len2 = 0
pNode1 = pHead1
pNode2 = pHead2
while pN... |
4d246d0daa4dff15663016f0e75163cf523fcfa9 | e655fafdf3a675d917135f333d6fa3d7fb9c59f6 | /Exercícios/ex048.py | d15e44132ff198a97f5a7dad2a635c9928cfcedf | [] | no_license | Sabrina-AP/python-curso_em_video | 7b595242a174f10e7e903cb73c8ea395d01ba609 | 43fef2a0aa67d2a67181bc5b73fb3b5de163b1d9 | refs/heads/main | 2023-03-25T22:52:42.811127 | 2021-03-23T17:49:44 | 2021-03-23T17:49:44 | 350,805,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | py | ex048.py | #soma ímpares múltiplos de três (com contagem e soma no FOR)
soma=0
c=0
for n in range(1,501):
if n%2==1 and n%3==0:
c+=1
soma+=n
print('A soma de todos os {} valores solicitados é {}'.format(c, soma))
|
8efaf1f13a032d289cad218e5319278966bbe188 | 8d451d3b5aafce9c9e13e82b56afb00d22cc4fd5 | /cycle_app/admin.py | a970646c29b763dc6b6f67e9857209ea1dd34f77 | [] | no_license | HussainShafayet/Memorable_event_of_versity | e24dded9c05f1755c5884ad9bbb2760ec2dbabab | ccc6970aef75d129593cea48a2cfcbe39b312e3f | refs/heads/main | 2023-04-21T04:40:52.732824 | 2021-05-28T08:57:51 | 2021-05-28T08:57:51 | 371,631,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | admin.py | from django.contrib import admin
from .models import Versity_life_cycle,Institute_info
# Register your models here.
admin.site.register(Versity_life_cycle)
admin.site.register(Institute_info) |
9aba56d045aa5f2df36b6c7b8bfdf7518053c4ce | ad6dea782fb358b87b1ef79777574eead08e78de | /Legacy/summoner.py | 694de67ecec83aa2d9294ff6cb251f479ae35926 | [] | no_license | TheStevieJ/Super-Nova-Scout-Bot | 0bc1d612e5d619da8715626cb086750f883a2e79 | 458c1442493ee24659cb958f169054c7fac8808f | refs/heads/master | 2022-03-24T10:56:45.222494 | 2020-01-02T19:49:32 | 2020-01-02T19:49:32 | 225,104,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,041 | py | summoner.py | import mysql.connector
from request import api_request
from database import connect_db
summoner_list = {}
summoner_done = False
def new_summoner(name):
#print(name)
r_name = name.replace(" ","%20")
url = "https://na1.api.riotgames.com/lol/summoner/v4/summoners/by-name/" + r_name + "?"
data = api_request(url)
#pr... |
97e1116c8e5a057628c01f7aa91d21644e9499eb | e4121c98131a40046a2b18dd1d748b68f33c88a3 | /apps/users/migrations/0004_auto_20180403_1804.py | 8fe62d1af2c5f24d008da2376c8b59187f5abe32 | [] | no_license | k-kyle/MxOline | 566fc3a54dd48ec1238ce328be8352843a6d9492 | 7033c497569052d41b05fbde359c5e085280e78e | refs/heads/master | 2022-12-14T22:31:50.235936 | 2018-05-04T07:43:11 | 2018-05-04T07:43:11 | 127,725,492 | 0 | 0 | null | 2022-12-08T00:55:11 | 2018-04-02T08:08:56 | Python | UTF-8 | Python | false | false | 1,841 | py | 0004_auto_20180403_1804.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2018-04-03 18:04
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20180403_1347'),
]
operations = [
migrati... |
2258814ade7707fd3b22aeb60b377ccd5380234d | 00a1d5aa3b435e1f7f884db804d47bf0c64814e0 | /kml_to_shortest_route.py | 0fdbe58bab1831b9118a493ee6e066b0283aa7f3 | [] | no_license | tdebroc/invaders-fetcher | f60737d4f9a034c104c0fc790a3794318b9d8bc0 | 5525b9cc3d984522391cc9e85c45d31315a765eb | refs/heads/master | 2023-08-04T09:24:11.101354 | 2021-09-10T16:06:58 | 2021-09-10T16:06:58 | 405,131,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,469 | py | kml_to_shortest_route.py | import math
from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
import xmltodict
import urllib.request
mids = ["", "1PRXB3K_wJvCA3c-8w3rILLu6BiRM2_9B", # 1
"1dEe2YCPmt-HDHUSNpDQVfrWGV3ENvPMg", # 2
"1w-bp3Ivpaoexjyff_pYR-Fy-QiDBUPaM", # 3
"1... |
92c306235631f7c8e665a45c21d3000b2e03dd5e | 76022ca8d5e5c9a0c376cdefcd06554ae02cf681 | /commands/crazy.py | 7b83704655a65ee5eddf33bacd19dedc0fc11b3e | [] | no_license | nevereveragain/vk_bot | 749e98d2394dcb180a97e68e9e9c06b5447a90fc | 3f37d5672cd24e09ed79e82ff33d8a0a54510feb | refs/heads/master | 2021-01-01T18:39:11.667114 | 2017-08-03T15:11:25 | 2017-08-03T15:11:25 | 98,391,090 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | crazy.py | from command_system import user_command, Response
@user_command
class Crazy:
keys = ['крейзи', 'крейзи пицца', 'удиви меня', 'необычное', 'кислая']
@classmethod
def process(cls, text):
message = '\n Томатный соус, увеличенные порции цыпленка и пепперони, моцарелла, кисло-сладкий соус \nМаленькая ... |
00f7363ffab7306e70f7c16e9cceb4370a176917 | 69c51af9545cbb80a0f495ecec3cbd8ce2f6eda5 | /src/cert_vuldata/vxref_converter.py | 01fd73dbb2e54d108a455a53a2e987154659a9df | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | ababook/Vulnerability-Data-Archive-Tools | 1c5bd034e2e86680be790903e0ea18853fe5eebc | a8eefd08f530e3ad8fe4b89aae99e760f09feb37 | refs/heads/master | 2020-04-06T13:56:37.784441 | 2017-11-09T12:49:39 | 2017-11-09T12:49:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | vxref_converter.py | '''
Created on Nov 3, 2016
@author: adh
'''
from .vuldb import VulDb
def main():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'datapath', default='./out', help='path to CERT Vulnerability Data Archive')
parser.add_argument(
'outfile', default='cert-vuldata-v... |
944500fedb930b48b1fd15c6578b4b466f52a9f8 | 71917015e22af38daae9c4d32e7c69826ea0a81a | /gramsfit_utils.py | 9b79e7e35cf7f632745cc005e0baddb8b8049e51 | [] | no_license | sundarjhu/gramsfit | 24363c3b67ce15f626aa450be7aac833f43bae20 | 19b2d17276b889eb6d5c8de76ad189efc2b9ba8d | refs/heads/master | 2023-07-25T09:57:54.029995 | 2023-07-21T20:02:37 | 2023-07-21T20:02:37 | 192,650,319 | 1 | 1 | null | 2023-07-20T17:39:11 | 2019-06-19T03:16:30 | Python | UTF-8 | Python | false | false | 17,171 | py | gramsfit_utils.py | from astropy.table import Table
from astropy.io import fits
import numpy as np
import os, subprocess
import pyphot as pyp
import h5py
from matplotlib import pyplot as plt
import warnings
import gramsfit
from astropy import units
def synthphot(lam, fnu, pypLibrary, filterNames=None,
filterFile=None):
... |
79f9522610a95b7861ed8040241c481687497f2c | 009c0b29b3662098641654adcbd3fe7d0b7f7804 | /geekbrains/python/lesson4/2.py | 8c1248b65a653c22668a12e92dfe6abe627e6bd6 | [] | no_license | S-VIN/education | e40193d33ea0d728cddaf831d9f544e9444b8ac5 | 65a022b9c299632e6c60b62976d8333fa8136b76 | refs/heads/master | 2023-03-08T09:34:52.720601 | 2021-02-06T21:26:53 | 2021-02-06T21:26:53 | 303,201,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,718 | py | 2.py | import cProfile
def erSimple(n):
k = 1000
if n == 1: return 1
mas = makeMas(k)
while(len(mas) < n):
k *= 2
mas = makeMas(k)
return mas[n - 2]
def makeMas(n):
sieve = [i for i in range(n)]
sieve[1] = 0
for i in range(2, n):
if sieve[i] != 0:
j = i * ... |
13c9dbf5ae0342c712714cbb925eea2bd3a90b01 | 4472c0ce8b1385f236d0e6784b9319304e0c48a2 | /Tarea1_1/read_data.py | 5842ee1b6d67dec61c94d7d6e178b127b253e472 | [] | no_license | rodrwan/tareas_mineria | 24ba122f02b07bf93a382dd61c4f4e1954015304 | d4e4e2ea08ab5f848090ef4414c3461cdcfffcae | refs/heads/master | 2021-01-10T19:51:34.063318 | 2014-10-24T03:03:10 | 2014-10-24T03:03:10 | 23,373,468 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | read_data.py | import json
from tabulate import tabulate
CATEGORIES = {}
with open('categories.json', 'r') as file_:
results = file_.read()
CATEGORIES = json.loads(results)
with open('results.json', 'r') as file_:
results = file_.read()
data = json.loads(results)
table = []
for category in CATEGORIES:
cat = CATEGORI... |
54d5350a20c0ffe95c98f2cfb1a97d59bd8aef1a | 5d27d46e8b6eb1e483ca47908554869546985314 | /scripts/build_corpusfile.py | 0d269db03d60540a84f88c3314dfe8e75778a4c7 | [
"Apache-2.0"
] | permissive | nlesc-sherlock/spaCy-dutch | c52997e0d7ff8646fbcca5bd112a32e7ae64b28a | 07808079bcd1600f44dbc3c8a022bbc35a4cbbab | refs/heads/master | 2020-06-23T03:03:29.402318 | 2016-12-15T10:08:19 | 2016-12-15T10:08:19 | 74,669,884 | 12 | 0 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | build_corpusfile.py | from __future__ import unicode_literals, print_function
import plac
import os
import spacy
import codecs
def main(lang_id, corpus_dir, out_file):
#corpus_dir = Path(corpus_dir)
#output_dir = Path(output_dir)
#assert output_dir.exists()
nlp = spacy.load(lang_id)
tokenizer = nlp.tokenizer
... |
64d7d99cda391fec4fbeb7301f1c47fbeae314a0 | 4cdc9ba739f90f6ac4bcd6f916ba194ada77d68c | /剑指offer/第三遍/20.表示数值的字符串.py | 04502a8bce61b56081cbf1414c9e508d4da95e42 | [] | no_license | leilalu/algorithm | bee68690daf836cc5807c3112c2c9e6f63bc0a76 | 746d77e9bfbcb3877fefae9a915004b3bfbcc612 | refs/heads/master | 2020-09-30T15:56:28.224945 | 2020-05-30T03:28:39 | 2020-05-30T03:28:39 | 227,313,730 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | 20.表示数值的字符串.py | """
请实现一个函数用来判断字符串是否表示数值(包括整数和小数)。
例如,字符串"+100"、"5e2"、"-123"、"3.1416"、"0123"及"-1E-16"都表示数值,但"12e"、"1a3.14"、"1.2.3"、"+-5"及"12e+5.4"都不是。
"""
class Solution:
def isNumber(self, s):
if not s or len(s) <= 0:
return False
charList = [w.lower() for w in s]
# 如果存在部分C
if 'e' i... |
7200cbc3780572372113cf1baf048b5cc9a71706 | ebbfb7f7daee531e2c52a706d1dc0576b02b2364 | /Exercises/Python/Learning Python_5th Edition/Chapter 5_Numeric Types/Examples/Numbers In Action/Example1/Example1/Example1.py | 175e05e5d1bf22d49f610c43a559676315d4e4d0 | [] | no_license | robinyms78/My-Portfolio | 2415945c530d8ea664a52b0d22e3d516987dcf6d | 0539844c5e34baa133ae14185cb4760d513a8a31 | refs/heads/master | 2022-05-17T10:16:43.351022 | 2022-05-01T06:38:46 | 2022-05-01T06:38:46 | 140,525,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | Example1.py | # Name created: not declared ahead of time
a = 3
b = 4
# Addition(3 + 1), subtraction(3 - 1)
print(a + 1, a - 1)
# Multiplication (4 * 3), division (4 / 2)
print(b * 3, b / 2)
# Modulus(remainder), power (4 ** 2)
print(a % 2, b ** 2)
# Mixed-type conversions
print(2 + 4.0, 2.0 ** b)
# Same as ((4/2) + 3)
print(b/... |
794c354096490f8efda33e893b2f62dfeea292fe | 1293a3f0f7a07b06e32929ce63eb77b0e21773d9 | /Rectification/question14.py | a42d83a8c149791b6dc000df661144623226d1de | [] | no_license | xinyu97/stereo | 4229e377fb8c1b6c8653fbb92ad521decb69563d | e76c0e38200c696354357fd297a68bca6c69b9fc | refs/heads/master | 2020-12-04T13:31:17.301889 | 2020-01-04T15:57:15 | 2020-01-04T15:57:15 | 231,781,270 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,399 | py | question14.py | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 27 16:53:00 2019
@author: DELL
"""
import cv2
import numpy as np
import os
from glob import glob
def main():
img_mask_left = 'left.jpg'
img_mask_right = 'right.jpg'
img_names_left = glob(img_mask_left)
img_names_right = glob(img_mask_ri... |
4ffa066fa15e70c15e25cbe8ceb1a92bafa029e0 | f88534befb2758f5f20d96a507950534a590f0e5 | /script/generate.py | 0bb807e20ac154753db95752a9dc7f214b3e7a64 | [
"Apache-2.0"
] | permissive | spun-oliver/waffler | 8a07ef218e1ec261da59853793792fc1605d9d93 | cd9c7590de4656389c6b9e8bf81d03eaa625f750 | refs/heads/master | 2022-01-18T16:54:09.480744 | 2019-05-17T11:49:13 | 2019-05-17T11:49:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,485 | py | generate.py | import os
import timeit
from argparse import ArgumentParser
import soundfile
import h5py
import numpy as np
import scipy
from keras.models import load_model, Model
from keras import layers
from namelib import get_model_dir_name, get_synth_dir_name, get_testset_names
from libutil import safe_makedir, load_config, wri... |
920642c68f15c2c39ed9a6884969e05e56c9168f | c05b2ab6e7e67e8588449992e5b211ae6c65e419 | /MainMessage/apps.py | b6c3eda1d7613e6c52e1928ccac5375592ed2a5c | [] | no_license | ShuoDu/DxyBackground | ec83cb9a72761688165d824a361a4a1696f91953 | 48364f12bad8f4962d1da88eed37060ae956339f | refs/heads/master | 2021-01-24T11:35:22.613710 | 2018-02-27T07:24:55 | 2018-02-27T07:24:55 | 123,088,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | apps.py | from django.apps import AppConfig
class MainmessageConfig(AppConfig):
name = 'MainMessage'
|
7ed7db4f90801c464f8a1e4bbe798f0cedb60674 | 5fd5ea37528071b6883e126b32e6d52923c7035d | /03-Methods and Functions/CountPrimes-MySolution.py | 43b6849355d3ce2221a492f1b5409b1d0ec18970 | [] | no_license | TeddyTeddy/Complete-Python-3-Bootcamp | fd6c300a4f4b5abefb2ad5d535a204811a4364b1 | df110f6f3dc7ccc7ed686c391a6e70c47eb9314d | refs/heads/master | 2022-03-16T09:23:16.904768 | 2022-02-25T09:11:46 | 2022-02-25T09:11:46 | 210,110,261 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | CountPrimes-MySolution.py | import math
def is_prime(num):
"""
returns True if num is prime. Returns False otherwise
Note that by convention 0 and 1 are not prime
"""
if num == 0 or num == 1: # By convention, 0 and 1 are not prime
return False
if num % 2 == 0 and num > 2: # for 4, 6, 8, 10, 12, ...
ret... |
0372ff73364caadab166972bb34d5378aa4858e6 | 3d9c14be118b15c0255c98bd2712bd5d55fffbbb | /olaf | d4170e9ecc1696a0a3ffa89e3ce81e4fb002ea90 | [] | no_license | artemlitch/olaf | de377661219a03f290a524788e64c75849365dea | efdc76691828efeb4e000c5c3ea7c938f6b0da41 | refs/heads/master | 2021-01-10T13:55:22.068585 | 2017-05-17T20:09:31 | 2017-05-17T20:09:31 | 51,243,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,241 | olaf | #!/usr/bin/env python
import sys
import subprocess
import json
import os
import getpass
def track_process():
process_msg = ''
for arg in sys.argv[1:]:
process_msg += arg + " "
task = subprocess.Popen(sys.argv[1:], stdout=subprocess.PIPE)
process_stdout = []
while True:
line = task.s... | |
84d2b09a403c9e587682a0a7a57bac0c58598dc0 | a6a906a97f1ce73a1a134dffd441ce20a57a1a1e | /safety/update-rollout/inputs/topologies/fattreeGen.py | 0c1f1523366508a70e641f38c24a7317f86a0be9 | [] | no_license | kheradmand/verdict-hotnets20 | d81963948daca723ed7d433b07439e509733f653 | c736bc4e043fe4b6029b95682cc1ef3bca474324 | refs/heads/master | 2022-12-23T18:01:17.137820 | 2020-10-05T01:45:58 | 2020-10-05T01:45:58 | 301,234,137 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,577 | py | fattreeGen.py | import networkx as nx
# fat-tree gen function taken from Plankton source code
def generate_topology(k):
if k % 2 != 0:
raise ValueError('"k" has to be even')
G = nx.Graph()
## Nodes/Switches
# G.add_nodes(range(0, (k / 2) ** 2 + k ** 2))
index = 0
core_switches = range(index, index + ... |
48e3fe73c1058ba732f2e8807be938329c1e284b | bc1ea338abeeecef764a2f2467ef4ce266622cc5 | /CTCI/Trees and Graphs/list_of_depths.py | cc2704fec233798d0532ea54ccd914af41392bc9 | [] | no_license | aliciavissuet/leetcode | d1a5fbdb7e5e6fc8afc967e363f8d56ee53d6f71 | c7bbd287fce55b982b7b41dc33b39953d80f41a0 | refs/heads/master | 2020-05-04T11:09:24.730208 | 2019-04-12T05:45:58 | 2019-04-12T05:45:58 | 179,102,042 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,486 | py | list_of_depths.py | class tree_node:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
#
def minimal_tree(arr):
if len(arr) == 0:
return None
if len(arr) == 1:
return tree_node(arr[0])
mid = arr.pop(len(arr)//2)
root = tree_node(mid)
root.left = min... |
e05e736c9634a5bd81f5f450290abf29ab458cc6 | 8f50c262f89d3dc4f15f2f67eb76e686b8f808f5 | /PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/IPFordG.py | afc7fef685ca8ef1d91c719b916c3fcffd91dc30 | [
"Apache-2.0"
] | permissive | strigazi/athena | 2d099e6aab4a94ab8b636ae681736da4e13ac5c9 | 354f92551294f7be678aebcd7b9d67d2c4448176 | refs/heads/master | 2022-12-09T02:05:30.632208 | 2020-09-03T14:03:18 | 2020-09-03T14:03:18 | 292,587,480 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,604 | py | IPFordG.py | # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
def add_ipfordg(ToolSvc, calibration_tool, BTaggingFlags,
track_to_vertex_tool, track_to_vertex_ip_estimator,
do_neg=False):
# each tagger needs own instance, can't b... |
c045a9c941e5dec7b561e977c3182b3a90c2f198 | 0f01238720b1b589e2a0560f5603ae801631bf58 | /訂正/09訂正.py | 4bbf98e9da3082bc496a5e7e94bcae8dce6706ee | [] | no_license | ikkaku1005/ML100Days-1 | 47f1ba243dcd4bbed8f763c48fb2bff84997e33a | 41c9c542cc3e1139561cefb9b687042d370ba30b | refs/heads/main | 2023-08-02T21:35:37.195489 | 2021-09-26T08:15:22 | 2021-09-26T08:15:22 | 610,780,171 | 1 | 0 | null | 2023-03-07T13:20:44 | 2023-03-07T13:20:42 | null | UTF-8 | Python | false | false | 1,639 | py | 09訂正.py | # 參考解答:方法二
import pandas as pd
d = [
['Austin', 139, 'Sun'],
['Dallas', 237, 'Sun'],
['Austin', 139, 'Mon'],
['Dallas', 456, 'Mon'],
]
df = pd.DataFrame(d, columns=['city', 'visitor', 'weekday'])
print(df)
# city visitor weekday
#0 Austin 139 Sun
#1 Dallas 237 Sun
#2 Austin ... |
a8f8180c0c3d00d8aa2d9ca2e3f7b3607846f93e | d3b158a9d421a773a0c023d5a9b7816aafecec86 | /python/sub_quiz.py | e108dcf0f3e145baea76d0227773084fd41cb38e | [] | no_license | identor/code | 092645c6940a0219d29320017de0b30396f482ef | d88ea2bea64ce8521a0153285c73f160d45b825c | refs/heads/master | 2023-03-16T23:01:35.402260 | 2022-06-29T15:22:14 | 2022-06-29T15:22:14 | 20,333,669 | 0 | 0 | null | 2023-03-03T08:37:57 | 2014-05-30T15:32:04 | Python | UTF-8 | Python | false | false | 939 | py | sub_quiz.py | import time
import random
QUESTION_COUNT = 5
QUESTION_MIN = 0
QUESTION_MAX = 10
start = time.time()
correct_count = 0
counter = 0
while counter < QUESTION_COUNT:
minuend = random.randint(QUESTION_MIN, QUESTION_MAX)
subtrahend = random.randint(QUESTION_MIN, QUESTION_MAX)
if minuend < s... |
19e48affb91def055557771c39cc1db6668e8ea7 | ca70eb0818d2163703b717797e8578d274d20c8e | /Misc Python Exercises/py4.py | 58a5158c0134dce6368b714cc2eacb7eb31c6c27 | [] | no_license | harite/game-hack | d4ddd7b53449ad67a500d38f8224401454b6054e | 6bea823dcf9cb6e3e4d0fe9d6855538bf17cda9f | refs/heads/master | 2021-01-20T07:45:33.584627 | 2013-07-04T16:46:35 | 2013-07-04T16:46:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | py4.py | import random
from sys import argv
script, niggerarg = argv
def DeadNiggers(niggers):
print "Woohoo, %s dead niggers!\n" % niggers
DeadNiggers(30) #1/10
niggerstring = 60
DeadNiggers(niggerstring) #2/10
print "How many niggers would you like to kill?!"
inputniggers = raw_input('> ')
DeadNiggers(inputniggers) #... |
8e63cc4a3d870a3d2194e43f090b3a4fb761c61a | f8975e3a4b4889cebbf3fb2b520384c616fb2432 | /nucompress/nucutil.py | 19de693b89c50204ac9d2ee2e3ff172679e15395 | [] | no_license | jordangumm/nucompress | 210c65a604cf68a605b38713da19a2dbf595b93a | 0cbd7af19bf7b882d8121665723031d64639d38f | refs/heads/master | 2021-09-04T13:23:28.209578 | 2018-01-19T05:30:01 | 2018-01-19T05:30:01 | 112,245,434 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | nucutil.py | def split(seq, num):
return [ seq[start:start+num] for start in range(0, len(seq), num) ]
|
8e30eacd30ccacdf113d978fdd3c0519b877c2cb | f36bd26f1021f18b5883969a3e011f9412e7f104 | /src/ui/scene.py | 83ecbb3c23d3b8b60505fe554027c5d0be62cea5 | [] | no_license | FThompson/SmartPCA-Capstone-v2 | b51c8a13152409cb4f17ac587e5e69ab645af317 | 0ea25f480851354382fc68241bd4155426321d19 | refs/heads/master | 2020-03-17T13:42:53.508716 | 2018-05-29T07:28:12 | 2018-05-29T07:28:12 | 133,641,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,217 | py | scene.py | import pygame
import util.audio as audio
class Scene():
def __init__(self, components=None):
self.components = [] if components is None else components
def add(self, component):
self.components.append(component)
def repaint(self):
for component in self.components:
... |
7cce8d463b8ed3f1e34a243db4d80e98495cddde | b7850ae77b9b9b1cb1eabb87de586f0b51c86389 | /main.py | 6c00d1a8716b38449569b5f5c36a4a1ba348117b | [] | no_license | MochArisandiJayanto/Project-PBO | 1d40725f93f4d6ec8333ab232ca4c886138c268a | 26687110a9f159bb2c3950e85bd260f9fbb7729a | refs/heads/master | 2023-02-17T11:46:12.218477 | 2021-01-11T15:02:37 | 2021-01-11T15:02:37 | 318,435,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,256 | py | main.py | import sqlite3
import abc
import getpass
import stdiomask
class akunn(metaclass=abc.ABCMeta):
@abc.abstractmethod
def membuatAkun():
pass
@abc.abstractmethod
def login():
pass
@abc.abstractmethod
def cekSaldo():
pass
@abc.abstractmethod
def menarikSaldo():
... |
3b06a4ca7c0f620a28de83408319809c12c595ee | 50cd3151800fc03c3db208e6e48e3e04a788ea42 | /msgraph/cli/core/authentication.py | b246a3ba771b7d6710c0284b34e23b24d93a3645 | [
"MIT"
] | permissive | isabella232/msgraph-cli | ba761b1047f9b71fd6b86fa1feedc4a949602eeb | de2e0381ec29e6e0cd7ab47d75f4e7e80e1c1e2b | refs/heads/main | 2023-01-21T09:22:13.246565 | 2020-10-12T13:55:28 | 2020-10-12T13:55:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,584 | py | authentication.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
5d6ba6fe898c2aa3522d7055cce36be83987f0bb | 0f37bfcaae75cf2891734bef8733df0dc3c5c5ff | /day5.py | f53b0e4f73c0d225a7afd02833e013f64fa928f5 | [] | no_license | ironxing/advent_of_code | a5c11f6335159bff3188dd4638ffc16ed31490c4 | e3a23ed7a2ee1457d52410694967a7a7a2095572 | refs/heads/master | 2020-03-26T17:06:43.680750 | 2018-09-03T12:15:39 | 2018-09-03T12:15:39 | 145,142,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | day5.py | import pandas as pd
import numpy as np
csvfile = pd.read_csv("day5_input.csv", header=None)
m = np.array(csvfile)
index = 0
counter = 0
while index <= len(m)-1:
current_number = m[index, 0]
m[index, 0] = current_number + 1 # Update the number at current position
index += current_number # Get the new ind... |
c0f60b07faeae3db9f05dbf9eb807994493a9e09 | a04858482d129b25b3e4a52fc56645862ac8ea7d | /Modeling_Scripts/06_run_model_calibrations.py | ff7c55d49a954d0c791b7db188d89307ee22362f | [
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | VolpeUSDOT/gtfs-measures | edb680498e3fe0580b77b412c1b280d37f8b0540 | 0530d3c7193f10d591edd446d7e4985d03a7c48a | refs/heads/master | 2021-03-27T14:22:19.525162 | 2018-01-25T21:25:40 | 2018-01-25T21:25:40 | 93,409,853 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,272 | py | 06_run_model_calibrations.py | #------------------------------------------------------------------------------
# Name: Run Model Calibrations
#
# Purpose: This function produces calibration statistics and exports
# results for a series of model layouts. The models are all
# simple linear combinations of all or ... |
4e4cac0bc2c02df2c47c77d4431ec853bc8dc252 | f10465390bb4fcef77beca526d208eacb482da1a | /MNIST/build_graph.py | b4ae55376e0d8a853b6cabdd823d3963868b8e8d | [
"MIT"
] | permissive | haiphanNJIT/StoBatch | 414d7560744fecd33347ab41f99ec9e660e17a39 | 08a6505b1fad609850de6c6bbaaa54c0200f0adb | refs/heads/master | 2022-12-09T16:15:11.249292 | 2020-09-17T15:10:35 | 2020-09-17T15:10:35 | 270,418,676 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 30,530 | py | build_graph.py | import os, sys, random, time, math
import numpy as np
import tensorflow as tf
from tensorflow.python.training.gradient_descent import GradientDescentOptimizer
from tensorflow.examples.tutorials.mnist import input_data
from cleverhans.attacks_tf import fgm, fgsm
from build_utils import *
'''==========================... |
fcec396363e6c0533da1a123b6741ddac1056b3a | f029fd007a0ee99a69e95a68a9b062b8fec15211 | /scomix/__init__.py | 6475e7a7c0b920f0f62d4944ab20a2ea7853387e | [] | no_license | rahulbhadani/scomix | e7735aff0b187ce157b1b517ad51ca13c541b6c7 | 24e576183e8582c93a279dcf3528082eef1aed2f | refs/heads/main | 2023-01-19T05:12:28.071201 | 2020-11-30T06:54:15 | 2020-11-30T06:54:15 | 312,780,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | __init__.py | from .rna import RnaCounts
from .viz import tsne_plot
from .viz import plot_cells
from .latent import PCAModel
from .latent import dbscan
from .latent import optics
from .util import log
from .util import LoggingManager |
4de539e42c0879af97ec0bf68787a01a47979070 | afe2d350145f11cbd8a74a8fb70604cd3be70010 | /apps/__init__.py | 8f7d4f48083e008e82af731e45251ea7be5db6ce | [
"Apache-2.0"
] | permissive | zcd1997/flask_news_projects | f1bf9be13c82538b296891d93e4a6068f29d7f6b | efa9c3fcb345573db5bf89fd853a3c1c9c8fa91c | refs/heads/master | 2020-04-28T10:08:37.580770 | 2019-03-12T11:01:51 | 2019-03-12T11:01:51 | 175,192,861 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,189 | py | __init__.py | from flask import Flask
from admin.admin_count import count
from apps.account.views import account
from apps.db_ext import init_ext
from apps.home.views import home
from apps.personal.views import personal
import flask_whooshalchemyplus
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = '12345... |
31b3f5ab05a99b69e1373795365f824f65906ae7 | b059d9ac0d73d90f836957e87c1d67ff194b9684 | /nirum/__init__.py | 990dae4cf972e7ce7af07e071de66f53d9006b5c | [
"MIT"
] | permissive | pbzweihander/nirum-python | b1e7ef9048a1751a1caf337632e8699635c66e4d | e001e858076f0047c29d5b48bb265c9f2eb79a4e | refs/heads/master | 2023-01-11T06:58:45.887468 | 2018-08-17T07:25:33 | 2018-08-17T07:25:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | __init__.py | """:mod:`nirum`
~~~~~~~~~~~~~~~
"""
__version_info__ = 0, 7, 0
__version__ = '.'.join(str(v) for v in __version_info__)
|
4f00b39fc0c6b858946f7d9a61137d216ca3905c | 845afe58650a955fc210f78c25d02fd27be9aff6 | /cut.py | 89e427564ed4990350d37659660c08bbeab78917 | [] | no_license | is928/ShortTexts | 4b39bebfaa51ce2edf5af09f42c3e96ccbb6e77d | 495df9bfaf65732da375b811ed41631c0bad1023 | refs/heads/master | 2021-03-12T13:43:51.181974 | 2020-03-11T17:02:56 | 2020-03-11T17:02:56 | 246,626,103 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | cut.py | try:
import data
except:
import Gdata
import data
d1,d2 = data.d1, data.d2
def ecut(t):
r,x,y = '', 0, 2
while x < len(t):
s = t[x:y]
if s in d1:r +=d1[s]
else:r+=s
x,y = x+2, y+2
return r
def dcut(r):
t = ''
for _ in r:
if _ in d2:t+=d2[_]
... |
9accc64db3ca10094f69897958652268f9221a54 | 574a28f38ce5e4da48f6e6560189efcd9451a687 | /manchas.py | 0e1f620d358a8d8c05d6fee129b71cf52188d228 | [] | no_license | LorenaL10/LorenaLarrota_Final. | 807f706dc6e3ddc508dbcb9a98d2aa87ebc51323 | 0ad1ad75a297f2bd7d4541e2de1204050c90ceec | refs/heads/master | 2020-09-25T04:57:53.753179 | 2019-12-04T17:39:54 | 2019-12-04T17:39:54 | 225,922,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 834 | py | manchas.py | import numpy as np
import matplotlib.pyplot as plt
archivo=np.loadtxt("monthrg.dat.txt")
año=[]
mes=[]
dat=[]
m=[]
for i in range(3476,len(archivo)):
año.append(archivo[i,0])
mes.append(archivo[i,1])
dat.append(archivo[i,2])
m.append(archivo[i,3])
def fourier():
N=len(año)
n=N
list... |
9ebaafa11c3e1ca6922c96e9f9092fd20f83166c | 72513d555b191643fb0adbc564562d7a22c2846c | /Code/dec2bin.py | 7b257e3b655da6388b2ba4cadca9eda17967896b | [] | no_license | satishkumard/Python | 2c3418d920f84a1424fc831f62ae27ae3fdc51bd | 2b948e09940693b574cb995ff031ca28bc05a0db | refs/heads/master | 2020-04-25T11:43:13.314076 | 2019-09-14T16:15:32 | 2019-09-14T16:15:32 | 172,754,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,948 | py | dec2bin.py |
# ----------------------------------------------------------------------------------------------------------------------
# Name: Satish Dandayudhapani
# Class: 603-02 Found. Software Dev-Python
# File: dec2bin.py
# [H5-13] (dec2bin.py) For 1 point, write a function dec_2_bin(dec) which returns the binary equivale... |
d4530f87a4f815b98d7fd64a54876c875234a522 | bb431fdb76732e46dd9743b829defa31a83c7687 | /istruzioni/Random-ForestML (1).py | 16c7e9a0a2a7c917fd027d0f75e66bb10d766fce | [] | no_license | openoffice97/istruzioni | d5d12f82e0dabd4fa8dc311a35f8a5bd8b674a3f | 2f47cc0da12d5c3227be14a5c4d0839b9c7fb580 | refs/heads/master | 2022-05-22T12:13:03.070002 | 2020-04-27T02:36:29 | 2020-04-27T02:36:29 | 259,184,991 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,395 | py | Random-ForestML (1).py | import os, glob
path = 'D:\\formattazione\\Icing\\Freezing_Melting cycle'
tracker=''
folders = []
# r=root, d=directories, f = files
for r, d, f in os.walk(path):
for folder in d:
if '.' in folder.split('\\')[0]:
folders.append(os.path.join(r, folder))
index=0
for f in folders:
os.chdir(... |
86c079030635757fa4a8aa6a9aea25988eb348f2 | 53070db315b1add8dfee3b54d05d70a8f43b2bde | /test_ShellHN.py | f25a02e4310f4203145c463addc32b165ca3a06a | [] | no_license | noampolak/ShellHN | 1ae3c77d4248d62aa51adafc2c49ab8cd97798a0 | 12a54c5f7a9bad1543254dadf38bcf2f52df31b0 | refs/heads/master | 2023-04-21T22:09:44.332230 | 2021-05-09T11:52:43 | 2021-05-09T11:52:43 | 365,740,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | test_ShellHN.py | import pytest
from .ShellHN import *
class TestHNClass:
def test_ident(self):
ident = createIdent(10)
assert(len(ident) == 10)
def test_get_aricle_item_by_rank(self):
item = getArticleItemByRank(10)
assert item != None, "There should be rank of 10"
item = getArticleIte... |
3a60ef56d1343604d5e309fdf9204481254f623c | 5ecb6bf02b59f36e49fd603eccef6d21e0e4bb44 | /Norm.py | f7a6a4715919a444791bfb71ceb0d8edf9dbc599 | [] | no_license | FranciscoChaconTTU/Norm-Practice-6-12 | 7d38072871e3310c2826d370d36de156c3c0ad2a | 6f37dc1bd65bfb31d61a8e333527b971984fbcd9 | refs/heads/master | 2020-03-20T02:45:39.463099 | 2018-06-29T18:58:59 | 2018-06-29T18:58:59 | 137,123,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 553 | py | Norm.py | import math
def norm1(vector):
x=0
for i in range(len(vector)):
x+=abs(vector[i])
return x
def norm2(vector):
x=0
for i in range(len(vector)):
x+=vector[i]**2
return (math.sqrt(x))
def infnorm(vector):
x=0
for i in range(len(vector)):
if abs(vector[i]) > x:
x= abs(vector[i])
retu... |
8b587fcec6b9f232bcfa5cac23c8ee213822d384 | 87e70b50a582c2bed372e2858438493ee1105905 | /Evaluation/LoadPearson.py | 611c2ae9358cd6fa46d693b0d6aa8eb3ac0bfb6a | [
"MIT"
] | permissive | adi-797/AIAMI | 868b96545ffa5ef9ddb214960147c312a956d119 | 37ea2bf61e85bf879a0f4a1014f2e93b87301582 | refs/heads/master | 2020-04-10T13:07:43.580065 | 2017-05-18T22:39:38 | 2017-05-18T22:39:38 | 161,041,442 | 1 | 0 | MIT | 2018-12-09T13:19:48 | 2018-12-09T13:19:48 | null | UTF-8 | Python | false | false | 501 | py | LoadPearson.py | """ Este script carga la informacion que guarde en la etapa anterior en los archivos json
"""
import os
import json
descExt = '.json'
def loadUMA(inputDir):
data_details = {}
for path, dname, fnames in os.walk(inputDir):
for fname in fnames:
if descExt in fname.lower():
... |
ddc7d0864b763df21dfe39d5f370d3b2bf8b7604 | 32025bfbc819bb76bbad55923e8ab10f43dc0801 | /solenoid/records/helpers.py | e01bbfd37f2e5f238ee2325006812f6454cafac0 | [
"Apache-2.0"
] | permissive | MITLibraries/solenoid | 4e843359b6e50d12afe4b075343c0ac80cb7c5da | 1c186f30c9dba442674951a8b283933d92362aaf | refs/heads/main | 2023-02-18T18:05:22.013931 | 2022-02-11T22:22:55 | 2022-02-11T22:22:55 | 88,651,132 | 0 | 0 | Apache-2.0 | 2023-09-12T20:59:34 | 2017-04-18T17:15:38 | Python | UTF-8 | Python | false | false | 2,203 | py | helpers.py | class Fields(object):
EMAIL = 'Email'
DOI = 'Doi'
FIRST_NAME = 'First Name'
LAST_NAME = 'Last Name'
MIT_ID = 'MIT ID'
CITATION = 'Citation'
PUBLISHER_NAME = 'Publisher-name'
ACQ_METHOD = 'C-Method-Of-Acquisition'
DLC = 'DLC'
PAPER_ID = 'PaperID'
MESSAGE = 'C-Publisher-Related... |
d42661413a985822a529cfbaed1d090422c2f4a4 | f5609e8b13a3c42a07a1c1d5fafe607629ffa74e | /yaksh/models.py | 9fbc18db8226a524a3a94f446703938255b673af | [] | no_license | shan18/SBHS-Vlabs | d9954c73daf315b8268cca1a381b68b741d5220f | ecde1026ba14685fd1e4a07e7878c48902d1acdb | refs/heads/master | 2021-07-11T15:31:30.182626 | 2020-06-08T09:48:00 | 2020-06-08T09:48:00 | 94,194,580 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 56,794 | py | models.py | from __future__ import unicode_literals
from datetime import datetime, timedelta
import json
from random import sample
from collections import Counter
from django.db import models
from django.contrib.contenttypes.models import ContentType
from taggit.managers import TaggableManager
from django.utils import timezone
fro... |
54ff0efc57eea9336c79b5a26669ba40524d2bdd | bf9004d318fab1ec9a1ca816a6a1b8356c106074 | /Oefeningen/uDemy/9_loops.py | fe3dd585c37086db71abaac157e090e14aad6428 | [] | no_license | beerfleet/udemy_tutorial | 4140de1d91722a9ba17e22e999f43bae451d85ac | ccef8789b9e687b92e3a2f624d327df3a2ea9d6c | refs/heads/master | 2020-04-18T02:44:48.945174 | 2019-07-04T10:04:43 | 2019-07-04T10:04:43 | 167,174,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,077 | py | 9_loops.py | '''
Created on 24 jan. 2019
@author: jvanbiervliet
'''
lijst = ['een', 'twee', 'drie', 'vier']
for teller in range(0, len(lijst)):
print(lijst[teller])
for teller in range(1, 10):
print(teller, end=' ')
if teller % 3 == 0:
print()
# exercises
# mijn_bieb = ['The Alchemist', 'Hoe blabla', 'H... |
467a91c9cb6236e715bf930ad193ba765f04ba10 | 62bdde43ce88507530610a2b77d2ce0859eebc8b | /BOJ/set-map_by_hashing/01764-듣보잡/01764-듣보잡-jiwoong.py | 69bb532bd2d75af9bb21d567dab8df789e20e992 | [] | no_license | j2woong1/algo-itzy | 6810f688654105cf4aefda3b0876f714ca8cbd08 | 7cf6cd8383dd8e9ca63f605609aab003790e1565 | refs/heads/master | 2023-08-21T12:51:54.874102 | 2021-10-03T04:35:21 | 2021-10-03T04:35:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | 01764-듣보잡-jiwoong.py | """
# 듣보잡
첫째 줄에 듣도 못한 사람의 수 N, 보도 못한 사람의 수 M
둘째 줄부터 N개의 줄에 걸쳐 듣도 못한 사람의 이름과, N+2째 줄부터 보도 못한 사람의 이름이 순서대로
듣보잡의 수와 그 명단을 사전순으로 출력
"""
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
listen = set() # 듣
see = set() # 보
for _ in range(n):
listen.add(input().strip())
for _ in range(m):
se... |
11712da9d0f98920128f920ffeaffb878f264de7 | fcdb6c042b6121034c39081e58048c72d4143d0c | /Python/272A/solve.py | ebde6a94a292f0596f3551523b8874799f8b7212 | [] | no_license | s0nerik/CodeForces | 71ee927782c445aaa66f01474001315f18c7d300 | 5a8283d52e137567637103f30ac09e107f83994b | refs/heads/master | 2021-01-02T09:19:54.833638 | 2014-02-09T16:38:32 | 2014-02-09T16:38:32 | 11,886,506 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | solve.py | import sys
my_file = sys.stdin
#my_file = open("input.txt", "r")
friends = int(my_file.readline().strip("\n"))+1
fingers = sum([int(i) for i in my_file.readline().split(" ")])
result = 0
for i in range(1,6):
if (i+fingers)%friends!=1:
result += 1
print(result) |
3c424fbb29dec9fb624d8ed1299370a7232ff128 | 20818dae3322234af7b95b3769d6c1327a10a49b | /scripts/csv-geocode.py | e066da878086311e4f7d08e3dacfb6ee11227e66 | [
"Apache-2.0"
] | permissive | kiselev-dv/gazetteer-search | 831c2d53be676b39d046a5dd0293aa179a1169e9 | 8d2817b425d4512d9a0325042a3adab8b0529ce3 | refs/heads/master | 2021-07-25T22:49:51.672947 | 2021-01-19T20:32:05 | 2021-01-19T20:32:05 | 127,677,677 | 3 | 0 | Apache-2.0 | 2021-06-07T16:16:59 | 2018-04-01T22:48:12 | Java | UTF-8 | Python | false | false | 1,581 | py | csv-geocode.py | import csv, sys, re
import urllib
import urllib2
import json
reload(sys)
sys.setdefaultencoding('utf8')
def unicode_csv_reader(unicode_csv_data, dialect=csv.excel, **kwargs):
# csv.py doesn't do Unicode; encode temporarily as UTF-8:
csv_reader = csv.reader(utf_8_encoder(unicode_csv_data),
... |
e3afb4a3cf0c98c510baf75c5dcf15e9e8f656ee | 7c98ac4dff8c1b8c7089f8113574769484974610 | /katrinbot_settings.py | c5741ef358c195f73e1a32a809debe67eb55a937 | [] | no_license | vistrcm/katrinphoto_bot | f9fbdc6d6f5ce7da540fe7aaefb868c0bb7b2d34 | 57644b3ac41df91bd06180b71c51ecfe47d32075 | refs/heads/master | 2021-01-21T13:03:33.360561 | 2016-04-18T06:07:19 | 2016-04-18T06:07:19 | 55,399,430 | 2 | 0 | null | 2020-11-05T21:04:22 | 2016-04-04T09:31:59 | Python | UTF-8 | Python | false | false | 115 | py | katrinbot_settings.py | DEBUG = False
URL = "https://vitko.info/katrinphotobot/wh/"
TOKEN = "yourtokenhere"
BOT_TOKEN = "yourbottokenhere"
|
705c2a3fed24e076fe27a6e2c6673f6c528870ec | 097cf96bb7975f5cd3d235f8fe133d16ce04027c | /client.py | 382b1ecc72c48ad9a84978be65e66ca14fb39df4 | [] | no_license | tpzillmer/function-based-chat | 5d627bea136b9bdda8b3ac4d13a84029980ffa0a | 69f92ac7f929a5f6ba4b64dadcd8234be3752360 | refs/heads/master | 2021-01-20T03:08:49.070178 | 2017-04-26T15:45:18 | 2017-04-26T15:45:18 | 89,498,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,688 | py | client.py | def client(server, port):
#Create a client communicator object
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((server, int(port)))
#Create threads to handle sendMsg and recvMsg functions
threading.Thread(target=sendMsg, args=[sock]).start()
threading.Thread(target=re... |
1ee1053e921e288a2b06064a7a6b03c98e041043 | d160bb839227b14bb25e6b1b70c8dffb8d270274 | /MCMS/Main/Scripts/ForceVideo.py | e0cb50aef776f35ff84ad66b47454741e957e72c | [] | no_license | somesh-ballia/mcms | 62a58baffee123a2af427b21fa7979beb1e39dd3 | 41aaa87d5f3b38bc186749861140fef464ddadd4 | refs/heads/master | 2020-12-02T22:04:46.442309 | 2017-07-03T06:02:21 | 2017-07-03T06:02:21 | 96,075,113 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,383 | py | ForceVideo.py | #!/mcms/python/bin/python
# For list of profiles look at RunTest.sh
#*PROCESSES_PROFILE_FOR_SCRIPT=Profile_9
from McmsConnection import *
#*export LICENSE_FILE="VersionCfg/Keycodes_9251aBc471_40_NO_v100.0.cfs"
#------------------------------------------------------------------------------
def WaitAllOther... |
3589f62cbef8a27b852210832f87a3fa44064f2f | 81d71e01ca9bb7dab6961ee9820337d15bff2e8c | /Programmers/islands.py | 363e63b562512ab728ce6801eff8c915b7aefc75 | [] | no_license | sunkest/Algorithm | 5bf63be053e439409c179db6938a1247fb263c21 | 5b1d560e1f078ffafcc1a782440c387c5d45da8c | refs/heads/master | 2023-05-21T03:17:06.062361 | 2021-06-11T11:37:50 | 2021-06-11T11:37:50 | 268,090,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | islands.py |
def solution(n, costs):
answer = 0
costs.sort()
visited = set()
visited.add(costs[0][0])
for i in range(n-1):
pool = []
for c in costs:
if c[0] in visited or c[1] in visited:
if c[0] in visited and c[1] in visited:
continue
... |
994df482bfc0540b9fd658a68d08280ca741253c | 30e7de9ffb547e38ad69efda1290b240b9c10fe8 | /data/imdb.py | 628f320dc34c1faa4ec2f46a90cc1df3edc7167d | [
"Apache-2.0"
] | permissive | axelbeni/perceiver-io | f3b0770aa7e08f2afd5ae7c07178743599fb4b4b | fb818b1763f61e259b23b8b014df2ac01c303a54 | refs/heads/main | 2023-09-02T02:38:53.345251 | 2021-10-29T08:09:01 | 2021-10-29T08:09:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,070 | py | imdb.py | import argparse
import glob
import os
import torch
import pytorch_lightning as pl
from torch.utils.data import Dataset, DataLoader
from torchtext.datasets import IMDB
from tokenizers import Tokenizer
from tokenizers.normalizers import Replace
from perceiver.tokenizer import (
create_tokenizer,
train_tokenizer... |
e4847ae9910433eb24897f61a6a29d2ec9b02446 | c36679186f669c6e3bd1c106c96d4a17be1f5ab1 | /Algorithm/13.py | 6090f0b727a4d1d38023fb56e942e872401aab06 | [] | no_license | touhiduzzaman-tuhin/python-code-university-life | 60a3d671b200a6f5222c6d176c13c5f20f013509 | 6d2e3d90d430faa5c83fe79e7fb1ebe516994762 | refs/heads/master | 2023-03-22T15:18:10.636203 | 2021-03-06T18:52:04 | 2021-03-06T18:52:04 | 332,467,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 271 | py | 13.py | # Linear Search
n = int(input("How Many Number : "))
a = int(input("Enter Your Find Number : "))
print("\n")
print("Enter The Numbers : ")
for i in range(n):
int(input())
if a == i:
print("Found")
break
else:
print("Not Found")
|
637a6d5b06bb3cfb4d8f3fa447537b946273b105 | fc9175c91bf99ce697e3bed46a7cc0db3343283e | /12Formularios/exemplo_post_local.py | 78eb9403fcaa850ca8377598f06a199faf8095a0 | [] | no_license | cerchiariluiza/CodigosScrapsCompiladosPython | 27758df20243146d29bcdc612d58082af450d4d1 | 4b1b7429068fe3072e7bed3f720e8519f9d60629 | refs/heads/main | 2023-04-01T10:33:47.642816 | 2021-04-10T15:07:57 | 2021-04-10T15:07:57 | 356,616,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | exemplo_post_local.py | """
Simulando o formulario.html, que envia os dados
via POST para formulario_pythonwebscraping1.php
Utilizando o servidor PHP local na porta 8000
"""
import requests
params = {'nome':'Evaldo', 'email':'evaldowolkers@gmail.com',
'celular':'(28)99948-3074'}
r = requests.post('http://localhost:8000/... |
96ab657923ea09d3733f1d52cdaa8b874861c5db | c028683e2acd7d5e7e16c062eef4b37e2a6cb30f | /P4 Behavioral Cloning/model.py | aea9cbe3fe7e30a34554f69987574bca0e3bfc7d | [] | no_license | simonazy/Self-Driving-Car-Engineer | 9d71e3be88dace532bb083781d2af511d9777c2f | 8aebd028e6180a5661737db7e5e2a2ff4b7716c0 | refs/heads/main | 2023-08-04T02:57:59.559315 | 2021-09-21T03:26:21 | 2021-09-21T03:26:21 | 390,042,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,802 | py | model.py | import pandas as pd
import cv2
import numpy as np
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, Cropping2D, Dropout
from keras.layers.convolutional import Convolution2D
from keras.layers.pooling import MaxPooling2D
from keras.mo... |
e4d50d71c369940e446a37c57eabfc34629e3e82 | 0a7248a1b36975cc44bfa41b5d55a32474c0fe8c | /tests/test_object.py | 655ab34dacb7f8d562a6cc33791a4ede4debb053 | [
"MIT"
] | permissive | bshishov/objectmodel | 33c7a379ec91690f0fd250557f1f49f5935c86ce | 22aaed6fa73e063bbd098f2c65008d920648c828 | refs/heads/master | 2022-10-18T17:25:48.805775 | 2020-06-14T15:53:32 | 2020-06-14T15:53:32 | 255,056,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,330 | py | test_object.py | import pytest
from objectmodel import *
def test_empty_instance():
class A(ObjectModel):
pass
obj = A()
assert obj.__fields__ == {}
assert obj.__state__ == {}
def test_field_binding():
class A(ObjectModel):
foo = Field()
instance = A()
assert 'foo' in A.__fields__
... |
aa8ed95bcb981f8f386774174f7cde21468061cb | 5c734e2a4b0b52c8ce34635fac895dc04dc512c1 | /client.py | 2c6c3bd3173a71889061adf7fc5fa1ea1850b0b7 | [] | no_license | VibhorKanojia/SmartMeter | 2751db55c05f5fd4307a95f43e503796ca401808 | ffe28975234c623fc577965e3c0e042971e472f5 | refs/heads/master | 2021-01-22T14:40:07.138579 | 2015-04-21T07:54:44 | 2015-04-21T07:54:44 | 33,884,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 992 | py | client.py | # echo_client.py
import socket
import MySQLdb
import time
host = '192.168.122.101'
port = 2000
# The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
while True:
sending_str = " /"
try:
db = MySQLdb.connect(host="127.0.0.1", # your host, usuall... |
8b5a5e7c05c1af7af0d9ae85128804f0034adf04 | 7ae6755fb48827c6d8c18c1db67f63fa1182525f | /train_word2vec_model.py | 173bfe8d4db49e4f1e7d4f0c28b33584b9d95c18 | [] | no_license | eating-chen/text_classification | 63fabf1c2076f0c39aab2f07e919019587c4899d | 85f629040a91cb267bb0b5585112eabb19b79e28 | refs/heads/master | 2020-08-01T01:26:15.852131 | 2019-09-25T10:15:42 | 2019-09-25T10:15:42 | 210,813,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,386 | py | train_word2vec_model.py | # 訓練 word2vec model
import re
import jieba
import codecs
import logging
from gensim.models import word2vec
# 載入停用辭典
def load_stopword():
stop = []
fle = open('jieba_dict/stop_words.txt', 'r')
stop = fle.read()
stop = stop.splitlines()
return stop
# 利用jieba斷詞,產生斷詞文檔'data_seg.txt'
def sen_jieba(afte... |
3083747d8444a5bd1062ef8335de244c45c603db | 06f06dd45766f81187aad7974f9e80854e127993 | /rax/api.py | 8e88b1514a3bab9183d6ffd8e681cd6e6b22ad75 | [] | no_license | torchbox/raxtool | 0434ea00b110f041831d5f20be6b62899d69c419 | 5fbbe963fd104aa2555e94e17fc04b311ab7a0e5 | refs/heads/master | 2020-12-29T02:42:35.485211 | 2018-08-14T13:29:32 | 2018-08-14T13:29:32 | 45,212,190 | 1 | 1 | null | 2016-01-05T11:35:31 | 2015-10-29T21:39:06 | Python | UTF-8 | Python | false | false | 5,124 | py | api.py | # vim:sw=4 ts=4 et:
import dateutil.parser, pytz, datetime, os, requests, logging, json, warnings
IDENTITY_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0'
#import httplib as http_client
#http_client.HTTPConnection.debuglevel = 1
#logging.basicConfig()
#logging.getLogger().setLevel(logging.DEBUG)
#requests_... |
73c00bead0895ebbf8d9374499cb926b0712b93c | e0fff3139a63b4f16f3e025ce647c91546ff65bf | /infoshop/migrations/0002_auto_20190512_0832.py | 394de4ea189801c056afdfbf97b8c033f9c2174c | [] | no_license | spirally/aryks_cms | c5eaf631e409a9b6fa57db49724eb54ffae438da | 1f0bbaa8f8b0d03b53fde10de5c60ac2f4445899 | refs/heads/master | 2021-06-27T11:19:21.923275 | 2019-10-01T16:17:43 | 2019-10-01T16:17:43 | 184,873,322 | 0 | 0 | null | 2021-06-10T21:25:16 | 2019-05-04T09:03:36 | CSS | UTF-8 | Python | false | false | 574 | py | 0002_auto_20190512_0832.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-12 01:32
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('infoshop', '0001_initial'),
]
operations = [
migrations.RenameField(
m... |
6767f45a2de3284f65fa86fb4524b8e67cd283b2 | 38279377ffdfa34161bdee85d5335f9b12b6d81a | /app/data_coll/user.py | 72f3586f7ceef4604069c3bf067d1597fc2da0d7 | [] | no_license | biefeng/recosys | 372a0bdebb559cd4441281aeef300b4f5288b70d | d08d0040e72a32cc13b58bd4fc8659db453ee0fb | refs/heads/master | 2022-12-16T19:12:32.025678 | 2020-01-09T09:27:38 | 2020-01-09T09:27:38 | 227,958,234 | 0 | 0 | null | 2022-12-08T03:19:41 | 2019-12-14T03:06:51 | Python | UTF-8 | Python | false | false | 1,707 | py | user.py | # -*- coding:utf-8 -*-
# author : BieFeNg
# date_time 2019/12/13 10:28
# file_name : user.py
import logging
import csv
from io import BufferedReader, StringIO
from flask import (Blueprint, request)
from werkzeug.utils import secure_filename
from app.shard import db, BaseModel
logger = logging.getLogger(__name__)
... |
c52375d332d3cb63126f77837956b6279e5cda0a | 129e65b23a172ea686f220868c923eb4b08493c7 | /data_type/slice.py | 573902f65d32f26d383dffbbae36ef4d2de1ede6 | [] | no_license | urstkj/Python | 8dcf434858f9eb171204e064237bb10d76fe7f16 | 5a41df7c57c1975e0d335f59b528e28ba63cab85 | refs/heads/master | 2023-01-01T14:15:42.833144 | 2020-10-12T15:00:55 | 2020-10-12T15:00:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | slice.py | #!/usr/local/bin/python
#-*- coding: utf-8 -*-
data = "wangxinghe"
print(data[:3])
print(data[:])
print(data[1:])
print(data[3:4])
print(data[1:2])
print(data[0:1]) |
3250ba0bcb82f836dfc0ccc6a5d4b293ceaa2d6c | a873993c42b9ce0eac0a5d57b5767ebd5db60357 | /API/employee.py | 37ca07361d9284686c7e5816d03f6df42a5283b9 | [] | no_license | Ayushshah2023/API-using-Python | df283cf71c3c4ce8488083c175e699818b05434c | 8ef11034a50042e1d012567b305fd66a73e0b37e | refs/heads/master | 2020-08-21T23:03:16.580751 | 2019-10-19T20:41:57 | 2019-10-19T20:41:57 | 216,267,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,413 | py | employee.py | '''
#create a class called company D
#object is an employee D
#employee-employee id D, name, designation,salary,statue-{active(default),terminated,suspended}
#annual hike is 10% of the og sslaryD
#hike ratio is a class attribute D
#fina a way to assign valuesD
#at least 5 objectsD
#function compute hike (self)... |
d3aa34300c930ef6881aa422ad9420b1b55fa60b | 9c60c1213317b5b3fd71374c1b2d5f0228a5fda9 | /chat/views.py | f2926916035ba5990b13c39c629eb06902d5278c | [] | no_license | hguitar/ChatChat | 4bdd4ec961a57cf33335acdf6d491b7f290d18b5 | b94a02f5adbf96d8de2c56f25a4d3f28f6dbe353 | refs/heads/master | 2022-09-19T23:47:43.342328 | 2019-12-22T05:57:31 | 2019-12-22T05:57:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,735 | py | views.py | from django.shortcuts import render, HttpResponse,HttpResponse,HttpResponseRedirect, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate,login,logout
from chat import models
import json
import time
import queue
import os
from django.views.decorators.csrf impor... |
1c5c427a54353187cae09427dac1fb294bcbbd67 | 66523f742bdf068bf6f86833a481486d801bae87 | /app/utils.py | f04e26a4f8594f5277d09d47492a57e23486e67f | [
"MIT"
] | permissive | oakshieldrf/django-bug-tracker | b9681113f5a050b3e4d108906c54211e3d7856da | dc62a120675ebb6ad52bc3d3ad108524550d3a6e | refs/heads/master | 2023-07-20T01:12:49.508674 | 2021-08-20T20:21:26 | 2021-08-20T20:21:26 | 375,160,169 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | utils.py | from django.shortcuts import render
def error404View(request, exception):
return render(request, "page-404.html", status=404) |
914a8eae30b8b25c1f5cee6f005bcf640ceee8fe | 54fe92573c07a563204beac77cc01095be93dd9b | /0819_Stack1/4866_괄호검사.py | 6c5953c3216f8cf7b32490e2cbb163c7e001fc2d | [] | no_license | dev-riley/SSAFY_Algorithm | ef7c4bf83c0b2763336efdb3b2d02d8624968550 | 6565dda7b801237a71d9af0df6d4a34dce3270a1 | refs/heads/master | 2023-08-22T22:51:48.058262 | 2021-10-09T08:04:46 | 2021-10-09T08:04:46 | 415,242,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,271 | py | 4866_괄호검사.py | import sys
sys.stdin = open('4866.txt', 'r')
T = int(input())
for tc in range(1, T + 1):
p = input()
stack = []
ans = 1
for i in range(len(p)):
if p[i] == '(' or p[i] == '{':
stack.append(p[i])
elif p[i] == ')':
if len(stack) == 0 or stack[-1] != '(':
... |
9b829b488d7a212cfa025918e418b407e89fc723 | ba8c71aa5b79418a49d9987a6c047384da5e5263 | /build/lib.macosx-10.5-x86_64-3.4/OpOp/snap.py | ba17f52ebf11c7c96687b7d834601ee4212d084d | [] | no_license | lowks/OpOpGadget | a6e7b51619f3f17cdd668924b154399d92de876a | 1b2c8d9cae04d539ac0ea71475a96ec9e136a20b | refs/heads/master | 2020-12-25T21:23:41.906306 | 2015-11-30T14:51:29 | 2015-11-30T14:51:29 | 47,251,739 | 0 | 0 | null | 2015-12-02T09:45:43 | 2015-12-02T09:45:43 | null | UTF-8 | Python | false | false | 192 | py | snap.py | from .src.snap_src.WriteSnap import write_snap
from .src.snap_src.LoadSnap import load_header, load_snap
from .src.snap_src.analysis import Analysis
from .src.snap_src.profile import Profile
|
2ccc2fa8ddd5b9460966dcacba2ffc8f006703fc | 55f4a3845a9e386a711a9c29c04a8e34311301ad | /barcods/image_paster.py | 6ff81d632ea36a4d277794cdb208c0ba6a5c3d1b | [] | no_license | lolbefree/Gift_certificate | 5dae442f115e534fbfb003efc326f7717de58670 | dfed7835842a682c62ed3be96d33a2f12126f157 | refs/heads/main | 2023-03-12T15:45:34.049567 | 2021-02-22T10:18:46 | 2021-02-22T10:18:46 | 341,159,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | image_paster.py | from PIL import Image
class certification:
def __init__(self, barcode, image_name):
self.barcode = barcode
self.image_name = image_name
def five_100(self,):
img1 = Image.open('500.jpg') # main image
im = Image.open("8784542537122.png") ... |
32a8ebca9aee8faf65aebe36870b8b642fd1f0f8 | bea3bea0b3f5bf978b564136eccd87891986d912 | /ALGO/Belleman_ford.py | 99019a579d3442e862edaf5f70dfb24515f30c40 | [] | no_license | ShubhamPnd/Python_Practice | 4f3d70dced2317ef6c4f24bdc7f0e8d802328f7b | 4bc8052851f07929630055b2256f2f6f2867d840 | refs/heads/main | 2023-07-19T14:38:00.718424 | 2021-09-24T17:41:30 | 2021-09-24T17:41:30 | 343,513,258 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,019 | py | Belleman_ford.py | // A Java program for Bellman-Ford's single source shortest path
// algorithm.
import java.util.*;
import java.lang.*;
import java.io.*;
// A class to represent a connected, directed and weighted graph
class Graph {
// A class to represent a weighted edge in graph
class Edge {
int src, dest, weight;
... |
11c7bb9d9f2e40a20bcc49cee2164f37043f07f4 | bdb79aabdebbc93e9aa9c270b58885ec0f7948c6 | /Design Tutorial - Learn from Math.py | f89e9664427dc93ea3cfa96b0032965fb24abddb | [] | no_license | adampower48/codeforces | 1489276ab621963790623fe608185e351876cf55 | 8b34a7e3573e6669bd82e68cec530c06dd2c1216 | refs/heads/master | 2021-05-05T08:15:26.610050 | 2018-01-25T18:22:26 | 2018-01-25T18:22:26 | 118,954,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | Design Tutorial - Learn from Math.py | primes = list()
def primeSieve(bound):
bound += 1
numbers = [True] * bound
for i in range(2, bound):
if numbers[i]:
for d in range(i * 2, bound, i):
numbers[d] = False
for i in range(2, bound):
if numbers[i]:
primes.append(i)
# Program starts... |
e87d816acd17fd6ff27f553d357ec2de4c0c980b | 2f55c3474042c0f46efee0799209be0691f64d96 | /semana1/dia4/practicaMain.py | 9c6cc0978c5dfb84555781d3ee49fb03c6e06d6f | [] | no_license | FabioMenacho/backend | 5244fcb0ccb0c95ddd9b710efbeeb2fbe07d0a61 | df735ce9c85872135c0c8a5dc23bc56ac02d1ba8 | refs/heads/master | 2023-08-20T02:09:52.416018 | 2021-09-23T03:26:08 | 2021-09-23T03:26:08 | 388,661,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,033 | py | practicaMain.py | from practicaLibAlumno import *
# definir variables de entrada y salida
alumnos = []
alumno = {}
salir = 'no'
fr = open('alumnos.csv','r')
fAlumnos = fr.read()
alumnos = cargarAlumnos(fAlumnos)
# for a in alumnos:
# print(a.nombre, a.email, a.celular)
fr.close
while(salir == 'no'):
menuopciones()
opci... |
0b42a612ac5cb659beadff9a36a08c4cc6c6bbc3 | 38d3507b93f65883ab19faa9e2e2712a42715423 | /python/python/add.py | 902c5ad769538099d76c49d4059a314da8d2d3cb | [] | no_license | AbhishekAOne/Programming-Codes | 6042d8c1f9844ec0b4b471540cee067c5f290cf2 | ebc4b8fdf9a2a4fb5e3250b7c18dcb2e48f62178 | refs/heads/master | 2020-07-11T20:08:58.029111 | 2019-08-27T06:38:01 | 2019-08-27T06:38:01 | 204,634,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | add.py | #add two numbers withourt using arithmatic + operator
a=int(input("a"))
b=int(input("b"))
s1=0;
s2=0;
if(a>b):
s1=a;
s2=b;
else:
s1=b;
s2=a;
i=s2;
for i in range(i,m):
print(i); |
627cf4474388c4a02a48028692a0b83ad18f114c | 682a4aa7c94860606bf31612e5a1790cc479c249 | /bachelor/communication-and-networks/ping_client.py | cc3b5cc36c0ad7a4c4ab57d5969ea9e54969a2ba | [
"MIT"
] | permissive | Brent-rb/University | bff5d73ee58ca7612833eb0bc1939a7f02b9ed9e | caae9c7d8e44bf7589865517f786529b1f171059 | refs/heads/master | 2023-01-10T13:06:20.653593 | 2019-09-13T15:14:17 | 2019-09-13T15:14:17 | 208,272,149 | 0 | 0 | MIT | 2023-01-05T22:38:42 | 2019-09-13T13:39:25 | C++ | UTF-8 | Python | false | false | 2,797 | py | ping_client.py | __author__ = 'Brent Berghmans 1334252'
import socket
import time
import sys
class PingClient:
def __init__(self, ip, port, pings):
self.mIp = ip
self.mPort = port
self.prepareSocket()
self.mPings = int(pings)
#Clamp pings
if pings < 1:
self... |
87d3a72d503a09600c12744f84ab23bbd383a71c | 45125dda9e0e2cdd0a2eed18ef08e3f1929edb17 | /src/tallerprofe.py | c58120245fbe6b7ef1879e5c7a50d83dfb24a14e | [] | no_license | XoanCarlos/tallerprofe | 9b13fd7dbad840f2aedc0b07720b15a3e45e5701 | 1bd350c200017e4cdf5063deab0a8bf0dad69711 | refs/heads/master | 2021-09-01T03:41:12.496914 | 2017-12-24T15:08:51 | 2017-12-24T15:08:51 | 115,268,743 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,120 | py | tallerprofe.py | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
__author__ = "jcarlos"
__date__ = "$Oct 27, 2017 8:36:20 AM$"
import sys
import glib
import os
import conexion
import gi
import moduloscli
fro... |
64ce9395cb71bfa01a0ca644f8548bc40a120206 | fd64e364368bcb2cdcf77ab1e0fc234a6b698f69 | /Python/ROBOGAME.py | aac0a0468b6fc2be579338a237031cf774150bf2 | [] | no_license | Parizval/CodeChefCodes | 57712069f3d56cc42282f9e35c6ddd9398e4a5bf | cfd2876816be806882650b6ea51431b1f8d6bec5 | refs/heads/master | 2021-07-16T13:10:15.668713 | 2020-07-06T21:40:09 | 2020-07-06T21:40:09 | 188,693,667 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | ROBOGAME.py | def answer(string):
if len(string) == 1 :
return 'safe'
else:
count = 0
position = -1
for i in range(len(string)):
if string[i] != '.' and position == -1 :
count = int(string[i])
position = i
continue
if stri... |
93ce393f00d48a937e62f3408fd7ce4739474339 | bf76eacd7b3583d8e3cf6f806bd0f5a19baceee9 | /trim-syntax | 4112d48142b8b79a30020017885d9b3c9201c7fa | [] | no_license | Teemperor/bash-utils | 61d96f95363ad92e95ba2afdac435e958cb9c375 | f7317dcde5c8015a6aa7e5f65ee55f813a70fec6 | refs/heads/master | 2022-06-12T11:14:10.509558 | 2022-05-18T22:51:55 | 2022-05-18T22:51:55 | 87,948,924 | 5 | 1 | null | 2019-05-13T10:16:09 | 2017-04-11T15:14:42 | Shell | UTF-8 | Python | false | false | 260 | trim-syntax | #!/usr/bin/python
import fileinput
import sys
import re
input = ""
for line in fileinput.input():
input += line
start = input.find("<body")
end = input.find("</body>")
input = input[start + 5:end] + "\n"
input = input.strip()
sys.stdout.write(input)
| |
97a2b7663b1ef7c5c2029b9b35ce2cea45ee1434 | 744f4ffa39fb1def7f273931d6b7c61107e61896 | /TensorflowLearningNote/LeNet-5_code_folder/mnist2tfrecord.py | b701646621e42715210ac3012c562802ceeccd6c | [] | no_license | QinLuyao11/DeepLearningNote | 0a43f8012a46fbd8c541a983aae20541e3b1d2c6 | f9b0018e0a739fad41255b24828ac9c96ad30ceb | refs/heads/master | 2023-08-26T16:48:02.385555 | 2021-11-09T09:55:26 | 2021-11-09T09:55:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,321 | py | mnist2tfrecord.py | #_*_coding:utf-8_*_
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import os
import numpy as np
# 生成整数的属性
def _int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
# 生成字符串类型的属性
def _bytes_feature(value):
return tf.train.Feature(bytes... |
5cf651003c1d11933afcbb7dd314a060e189308c | f33a292b7db74554df5e3e0f9a54b613c00ed258 | /PythonForDataAnalysis/chapter5/pandasintro/essentialfunctionality/correlationcovariance.py | ffe8aa08558245c266ecf2f4f76130d09dd21727 | [] | no_license | liang12k/PandasLearning | 063cfd6a50ad8f9ff00ed062ea2da30621405551 | f50a96e14d4aaf8045b5d1db16aca571e3714b99 | refs/heads/master | 2020-04-10T16:57:05.479605 | 2015-04-24T04:04:18 | 2015-04-24T04:04:18 | 29,999,521 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,361 | py | correlationcovariance.py | """
correlation:
-how closely related two sets of data are
-http://simple.wikipedia.org/wiki/Correlation
covariance:
-measure of the strength of the correlation between two or more sets of random variates
-positive, negative, zero
-http://mathworld.wolfram.com/Covariance.html
-http://stats.stackexchange.com/question... |
6c1b3a51aef4b62e08df83cae1f747d02aa4d195 | 940aefeb0ec6d7f8e7f9a122eb9529493a5c407d | /4.py | 2f15d335577a98ba7ef1cda077209a2cdea0ebc4 | [] | no_license | christinadivyalekha/assignment-5 | e7354e206f9a5bd6cf470cc1a553ea36e72d31d8 | 75f9e996f75d4e8e40d4afe6a33a8a035dcfc248 | refs/heads/master | 2022-11-11T18:20:22.602593 | 2020-07-04T12:27:42 | 2020-07-04T12:27:42 | 277,105,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | 4.py | my_data = (11, 22, 33, 44, 55, 66, 77, 88, 99)
print(my_data)
# elements from 3rd to 5th
# prints (33, 44, 55)
print(my_data[2:5])
# elements from start to 4th
# prints (11, 22, 33, 44)
print(my_data[:4])
# elements from 5th to end
# prints (55, 66, 77, 88, 99)
print(my_data[4:])
# elements from 5th to second last
... |
89ea21ba06f9b74e461e74882cf9e31da35835ca | 47056cc9d5a7906c39cfc81da3ec25f01517af33 | /Blender/export_oolite.py | 87628f8be80be1741e8706b38696bd853c4fe59a | [] | no_license | blm768/oolite-mesh-converters | b9256d68b30b75c503c2795bf194702f66563934 | 9ffc425bfdb625b572ac9320f487af331dbf1523 | refs/heads/master | 2020-12-11T05:25:28.511825 | 2016-07-09T20:09:07 | 2016-07-09T20:09:07 | 16,095,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,590 | py | export_oolite.py | #!BPY
"""
Name 'Oolite DAT'
Blender: 263
Group: 'Export'
Tooltip 'Oolite mesh exporter'
"""
bl_info = {
"name": "Oolite (.dat)",
"author": "Ben Merritt",
"blender": (2,6,3),
"version": (0,0,1),
"location": "File > Import-Export",
"description": "Exports the selected mesh to an Oolite .dat file",
"category": "... |
97fdec06b0909e0d277934e5edcf2d16be25a140 | 43d241beb9fb12ae4046ad66a1141f703d98f236 | /8queens.py~ | 04ce842c503275e6634b72a6c83f6c10b9ecbd94 | [] | no_license | MeghnaPalde06/programs1 | e4e608300c87fc290fe10b988b7809b2dee7dc9e | 4ab9569739e585e5fea83275e9c9ab2d4ad6e67f | refs/heads/master | 2020-03-10T21:01:54.020686 | 2018-04-18T15:07:55 | 2018-04-18T15:07:55 | 129,583,329 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | 8queens.py~ | import xml.etree.ElementTree as ET
board=[]
tree=ET.parse('queen.xml')
root=tree.getroot()
start=int(root[0].text)
print("start position is:"),start
size=int(root[1].text)
print("Size of the board is"),size
def danger(row,col):
for(i,j) in board:
if row==i: return True
if col==j: return True
if abs(row-i)==abs... | |
ada9f19f8f928b8facc2c91bb8fb5baebf9b1db0 | e702b9c686cdc276c2ad8b077e131ec753e2a43f | /config/log_config.py | 092c96c82b43b640b942843839e0f29f4677a836 | [] | no_license | VoidWolker/git_interface | 5d8d684101fa5661a10dff4ca0d845c2bdbd5d61 | de2727f1d892a09c00265dd922d63b50aeb0d63e | refs/heads/master | 2021-01-01T17:53:24.326034 | 2017-08-16T01:53:26 | 2017-08-16T01:53:26 | 98,188,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | log_config.py | #!/usr/bin/env python3
# _*_ coding:utf-8 _*_
"""
log config
created by VoidWalker in 2017.8.15
"""
info_file = r"../log/infoLog.txt"
error_file = r"../log/errorLog.txt"
debug_file = r"../log/debugLog.txt"
warning_file = r"../log/warningLog.txt"
critical_file = r"../log/criticalLog.txt"
log_format = r"%(asctime)s %(... |
f8ada5cd405c63442b9940551c9b7e4daba32a47 | 9b3c7bef12298acd1495bd6e607ef4de7f122e9f | /tools/multi_processing_compare_img.py | c7392cba55de7b79e0e7eb34bb90f76e5086d01d | [
"MIT"
] | permissive | Yogurt2019/abd-deep-person-reid | a74d754761eb606df1d57924736421de505c5c11 | 47c9b9499bffb937891a896f7b5ab7ce7a8f67c4 | refs/heads/master | 2021-01-06T12:21:41.262281 | 2020-02-23T09:55:49 | 2020-02-23T09:55:49 | 241,324,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,516 | py | multi_processing_compare_img.py | import xlrd
import xlwt
import os
import random
import cv2
import numpy as np
from PIL import Image, ImageDraw, ImageFont
from multiprocessing import Pool
from tqdm import tqdm
from PIL.ExifTags import TAGS
import exifread
def get_path(root):
"""
:param root: 根目录的路径
:return: 最后一级文件夹的所有路径
"""
path_... |
231768f20e5ec2c338d8a6d882fac77889cee0b2 | 1b006886e503dd4540128d460b13f6b19b17edb4 | /SliceParser.py | fe53a18f2a6ae829e8ee1b83673a75a7f0c64cd6 | [] | no_license | captainvera/PHPDetective | 2336b8c4b70e568a34652c0c7f3e3620559b7e1a | 8eb0db1d0767d29ac0552fdb5877480b0cd246fc | refs/heads/master | 2021-03-22T05:14:53.454622 | 2017-02-21T23:17:05 | 2017-02-21T23:17:05 | 71,000,023 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,490 | py | SliceParser.py | import re
import logging
#Lists of possible EP/val/sink
possibleEp = []
possibleVal = []
possibleSink = []
#Lists of found things
foundEntryPoints = []
foundValidations = []
foundSensitiveSinks = []
foundVariables = []
logger = logging.getLogger("mylog")
logger.setLevel(logging.WARNING)
class Slice:
entryPoints... |
a6102e6a908555be3e3fa7b55f937e9cf319af6c | 747f759311d404af31c0f80029e88098193f6269 | /addons/magento_openerp_synchro/wizard/magento_so_import.py | bfd18c79074b4bed8c0fdb0118bda4406f7f04d4 | [] | no_license | sgeerish/sirr_production | 9b0d0f7804a928c0c582ddb4ccb7fcc084469a18 | 1081f3a5ff8864a31b2dcd89406fac076a908e78 | refs/heads/master | 2020-05-19T07:21:37.047958 | 2013-09-15T13:03:36 | 2013-09-15T13:03:36 | 9,648,444 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 89 | py | magento_so_import.py | /home/openerp/production/extra-addons/magento_openerp_synchro/wizard/magento_so_import.py |
e8b885b1a7ba60bcd9fdb11d3fc87d4729d57cde | 6875f0f5aa9cf22520ae3145507e2559e948c8ed | /src/datamonitoring/__main__.py | bca3d29afe0f4735b9d1f3f6565ae710bc234082 | [
"MIT"
] | permissive | corentinvds/orange-data-quota-exporter | 2de5338d74889ff94f896f5bb316c86128477d5b | 17637e2edb21e2b1d7fd83eba2e098817d829ce4 | refs/heads/main | 2023-02-24T10:30:10.121488 | 2021-01-27T13:59:10 | 2021-01-27T13:59:10 | 333,435,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,404 | py | __main__.py | import logging
from argparse import ArgumentParser
from datetime import datetime
from datamonitoring.metrics import start_metric_server
from datamonitoring.processor import print_usages
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
LOGGER = logging.getLogger(__name__)
def main():
try:
... |
5018d76c393cfb781d3f60da3e322b8c727546f2 | a80866134af2e36e6ea124b44ecbb6f588882817 | /ds_manager.py | 15805a04953d91959bc1a84068bbf173e1d2e53d | [] | no_license | charchit7/MIDAS_Internship | 9fb2d9581bc15bc31571d477ce813cb4e44958a4 | 14980d8592aaff72035b844955321c1d4fb2076f | refs/heads/main | 2023-04-26T09:17:55.330968 | 2021-05-25T20:07:09 | 2021-05-25T20:07:09 | 356,654,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,948 | py | ds_manager.py | import os
import pathlib as Path
from collections import defaultdict
import csv
# os.walk() returns the generator which is of type path, directory, filename
#to check for the unique files in a csv
# from more_itertools import unique_everseen
# with open('1.csv','r') as f, open('2.csv','w') as out_file:
# out_file... |
d5acb7532e4244babce3fb7b6f4a8ab7d00ace5f | 678216e4777eac47bf676d2bfe64ce203e07c6d2 | /redpwnCTF/rot26/exploit.py | 0ad89085f49ef853f39b1e94f8f12b1f5c1e9b1b | [] | no_license | r00tstici/writeups | 171647c28ec500dd2d9e1ebdb565ffc02e5f71d9 | e2f02b7d7613ea370e3040d48d0e529a179fe3d1 | refs/heads/master | 2023-02-23T07:22:12.481427 | 2022-11-12T14:59:19 | 2022-11-12T14:59:19 | 202,710,606 | 34 | 16 | null | 2023-02-16T02:41:00 | 2019-08-16T10:46:14 | G-code | UTF-8 | Python | false | false | 577 | py | exploit.py | #!/usr/bin/python2
from pwn import *
shell = 0x8048737
exitplt = 0x804a020
exploit = ''
exploit += p32(exitplt) #set first address to write to
exploit += p32(exitplt+2) #set second address to write to
exploit += '%34607x' #print enough character to reach shell[4:]
exploit += '%7$n' #write number of character printed... |
c928a51025e69b222c30eeca9fd1a7768e6a0426 | 239006db199b14a86ca0ffc9cf16a817041ce30b | /DeterminantCalculator/determinant_calculator.py | 344f4b82b1c15669c9d7aa5f03ebd8776142a408 | [] | no_license | L30n4rd0/quantum-computing-codes | ec04983b5b4f29d568477432b489ea88e9e9ba4c | 8ac8c2ee8767ab92dfd2d55cb3926b7953dd4dc1 | refs/heads/master | 2020-05-05T05:07:26.483941 | 2019-06-24T17:54:58 | 2019-06-24T17:54:58 | 179,739,661 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,113 | py | determinant_calculator.py | '''
Created on 4 de out de 2017
@author: leonardo
'''
class DeterminantCalculator(object):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
def printMatrix(self, currentMatrix):
'''
Show the matrix on the console.
Inputs... |
a0b8bb1432a3ab691a943d5bd16a8d5cc6e18046 | ff67631d39f86cbae957f314e48a9479c7e7b02c | /Single_ciccle_list.py | 4793e3b41ee6a19d26eab43ec14bfa63d0808c19 | [] | no_license | Fcupid/Lxq | 79959a0847a6649b025fad7ab829a5296123d4e4 | b208e373a53fff4c6b8762405c5c22da2b587f69 | refs/heads/master | 2022-12-14T21:11:43.922257 | 2020-08-26T09:54:19 | 2020-08-26T09:54:19 | 284,033,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,820 | py | Single_ciccle_list.py | #用类表示出链表
#建立节点node
class Node(object):
'''初始化'''
def __init__(self,elem):
self.elem=elem
self.next=None
#创建链表
class SingleCircleList(object):
'''单链表'''
def __init__(self,node=None):
self._head=node
if node:
node.next=node#变量私有化,且头节点为空
"关于... |
3d0cd3e394da6e4d82d1c17c0f77bae8139cd3d8 | 66b815d67eb94ab7223da2d91db208dd37dfe8db | /differentialequationsolver.py | a537708c11188c01f6de9d3c52ef5b55e86b39af | [] | no_license | annusgit/another_test | 39d603384664802c23ad868f9e3a482a5cc38a64 | b11264314b315a52b9114ccbf4ff7b834d028f2f | refs/heads/master | 2018-11-24T12:11:02.919437 | 2018-09-04T16:40:30 | 2018-09-04T16:40:30 | 117,666,071 | 0 | 0 | null | 2018-09-04T16:40:31 | 2018-01-16T09:57:08 | Python | UTF-8 | Python | false | false | 4,302 | py | differentialequationsolver.py |
# let's solve and draw a pendulum's animation
from __future__ import division # this is the most important import
from __future__ import print_function
from matplotlib import pyplot as plot
from matplotlib import animation
import math
import pygame
import os
print("imports successful!")
def fuv(u,v):
return -20*mat... |
345816b2d00edcfc49a4390578fcaba3c5e134b4 | 56b4d00870af18752b4414495b08e2ec3adf3ae4 | /tests/sentry/utils/test_metrics.py | 5ce4ee569bf9b0253cf882fa262796db7238c592 | [
"BSD-2-Clause"
] | permissive | commonlims/commonlims | 26c3f937eaa18e6935c5d3fcec823053ab7fefd9 | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | refs/heads/develop | 2021-07-01T17:20:46.586630 | 2021-02-02T08:53:22 | 2021-02-02T08:53:22 | 185,200,241 | 4 | 1 | NOASSERTION | 2021-02-02T08:53:23 | 2019-05-06T13:16:37 | Python | UTF-8 | Python | false | false | 986 | py | test_metrics.py | from __future__ import absolute_import
import mock
import pytest
from sentry.utils.metrics import timer
def test_timer_success():
with mock.patch('sentry.utils.metrics.timing') as timing:
with timer('key', tags={'foo': True}) as tags:
tags['bar'] = False
assert timing.call_count == ... |
3b84a244af5a9e737cfe02eda4deeaf1064969c7 | 9a08eb1b13035993ac254f39a4a0eb4bbb12afbe | /assignments/week1/day3/Daniel_Zabari_LC_187.py | 9ef021fc5671e4388785dc5131851de2e8021e01 | [] | no_license | Shulamith/TechnicalInterviewPrep2020 | 5870c76d2ccfd0d2b116fb38f04d60df33b7ee68 | 90fb512ea135118cf1c27e78dc7227d84c53ad2f | refs/heads/master | 2022-11-08T05:42:48.183643 | 2020-06-16T14:01:08 | 2020-06-16T14:01:08 | 270,806,759 | 1 | 0 | null | 2020-06-08T19:54:48 | 2020-06-08T19:54:48 | null | UTF-8 | Python | false | false | 477 | py | Daniel_Zabari_LC_187.py | class Solution:
def findRepeatedDnaSequences(self, s: str) -> List[str]:
i = 0
j = i + 10
length = len(s)
seq = {}
while j <= length:
if s[i:j] in seq:
seq[s[i:j]] += 1
else:
seq[s[i:j]] = 1
i += 1
... |
bdb7a7448a2dbaf66409489c645afe20468ca461 | 75c2761af4e6b81f981e8bfcdc847ad46af2c8dc | /utils/utils.py | 9df5167d7c4ebb73f8959821c06660aeadaf5429 | [] | no_license | miont/fewrel-project-ipavlov | dd983dbc8ccac452b4f15d9a85c9bb52b459d5d8 | 2b80784319a1a977463cf53c79358faff7fb61a0 | refs/heads/master | 2020-05-09T19:07:55.693696 | 2019-05-25T10:29:47 | 2019-05-25T10:29:47 | 181,367,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | utils.py | import numpy as np
import torch
import torch.nn as nn
import torch.functional as F
def get_weights(n_in, n_out):
w = torch.zeros(n_in, n_out, requires_grad=True)
w = nn.Parameter(data=w, requires_grad=True)
nn.init.xavier_normal_(w)
return w |
204c50d80ed4b44933cbb729d7564bac46613ae4 | 42d981b9ac42ad12577865115228b3744aad6e6b | /bachelors/year4/semestre1/algebra/main.py | d2bcf8cb90e3e4dcacd4fb21aa8c5c1bf2f34af7 | [] | no_license | Witalia008/university_courses | bcd7683ac3abbfb8f5474c0d114ed01cbc15eab6 | 8bdfb3b5f8ce44680dde530e4eabc28141013bd0 | refs/heads/main | 2023-04-11T11:16:59.444067 | 2021-04-01T01:31:02 | 2021-04-01T01:31:02 | 350,045,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,955 | py | main.py | # http://alex-black.ru/article.php?content=117
# array (coef, pow_x, pow_y, pow_z)
import copy
def compare(mon_a, mon_b):
for i in range(len(mon_a) - 1):
if mon_a[i] != mon_b[i]:
return 1 if mon_a[i] > mon_b[i] else -1
return 0
def sort(poly):
poly = sorted(poly, rever... |
a4e27eb46b1b9289aa796ac9c49918ac2aca594d | a71a65b95722966a7454cd4d6a5d2a88d9cdb94c | /CSE6339/flaskcode.py | e9fa3f457630d501b20f74c7a39aa56c173b218d | [] | no_license | indrajithbandara/6339Project | 558f11c9610aff73c71e82aa516b0438bd3d2551 | 74c17c580e3d128bc89a6aaa96e5b8d45918dbc0 | refs/heads/master | 2021-05-10T17:18:21.596170 | 2015-05-08T06:53:03 | 2015-05-08T06:53:03 | 118,606,139 | 0 | 1 | null | 2018-01-23T12:16:54 | 2018-01-23T12:16:54 | null | UTF-8 | Python | false | false | 1,306 | py | flaskcode.py | from flask import Flask, render_template, request,session
from flask_pymongo import PyMongo
from bson import json_util
import json
from flask.json import jsonify
from bson.json_util import dumps
import getRestaurants
from getRestaurants import getCCData
'''
Create an app config to store the connection detail... |