blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8249cf00c2f599f554f4091d82a9228f753634ec | 29b9c067361b5c9b9038bbec7efef31e680011c2 | /projects/witcher.py | f189a57d1ae6a06dc9f922d290505cbf65b727f0 | [
"MIT"
] | permissive | KryoKorpz/Vector | a387b3e9e5a9762d3e81608e0857b96e9323cf22 | e1a9dd4eec4a03027e66c5acab680dcc4937aa03 | refs/heads/master | 2020-11-30T07:08:35.471238 | 2020-01-01T21:21:41 | 2020-01-01T21:21:41 | 230,342,406 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,199 | py | """
Have Vector change face to witcher coin and play Valley of plenty
"""
import os
import sys
import time
try:
from PIL import Image
except ImportError:
sys.exit("Cannot import from PIL: Do `pip3 install --user Pillow` to install")
import anki_vector
from anki_vector.util import degrees
def main():
a... | [
"jesse.reichel@live.com"
] | jesse.reichel@live.com |
21ecd7523521524e5e984511a9fc8da312c0cb2d | b25208ffef4dd656e781760b158ea299ea74c6a6 | /newffunction.py | ecfc65a6f76a2d586aacc8c4f0b02034e80467ed | [] | no_license | ks18212/pydatastructure | a168cc6cc7c14ec76d77c0fe6d0865df8748dffa | f094ed427af190ea096ab5796a3fe7dc3ccba75a | refs/heads/master | 2020-12-30T17:51:06.695667 | 2017-05-13T02:59:28 | 2017-05-13T02:59:28 | 90,932,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29 | py | def Add(x, y):
return x+y | [
"ksriji@gmail.com"
] | ksriji@gmail.com |
0122fffd0f7a8f3db4a4e28afbd37fd70412b36f | cec64b38884a4ba25da7447d2290cef7b67a8467 | /blog/migrations/0002_auto_20210330_1557.py | 707a725d47cc175b51a5359cde426e458b779151 | [] | no_license | JannatTurdumbayeva/blog_molchanov | 418ae666059eadd0b537c22c07a1911be1193a9c | e5aecd26739c3f076499a84f2adb849439e16b2c | refs/heads/master | 2023-03-31T06:22:43.350725 | 2021-04-02T12:39:12 | 2021-04-02T12:39:12 | 354,013,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 741 | py | # Generated by Django 3.1.7 on 2021-03-30 15:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Tag',
fields=[
('id', models.... | [
"you@yourdomain.example.comjannelya@gmail.com"
] | you@yourdomain.example.comjannelya@gmail.com |
e468e099bcb970ff97fc6ad4c6274f326e0cc25e | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /third_party/blink/tools/try_flag.py | 6bba6a55e3ae179c862d8ea4cf4aa7cf222d21a5 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Python | false | false | 411 | py | #!/usr/bin/env vpython
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Triggers and processes results from flag try jobs.
For more information, see: http://bit.ly/flag-try-jobs
"""
import sys
from bl... | [
"sunny.nam@samsung.com"
] | sunny.nam@samsung.com |
9dd6da2c076305740bb57622c4a4fd9dd54adfd0 | 733d283389362b80d783f3bcdbcc6a51eec3f300 | /src/recomb/len_llh.py | 3c326bc97e1307e8a021df0553742010b119d6e8 | [
"MIT"
] | permissive | ngannguyen/aimseqtk | 1abf40cc794c4c6c78b042cee18f02b430f85753 | 1ebaee3b927f7fb128de4a59b759c19fceeefb5b | refs/heads/master | 2020-05-17T00:19:16.361068 | 2014-08-20T00:30:50 | 2014-08-20T00:30:50 | 23,130,513 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,890 | py | '''Compute the likelihood of generating sequences of each specific length
'''
import os
import sys
from math import log10
import cPickle as pickle
import gzip
from jobTree.scriptTree.target import Target
from jobTree.scriptTree.stack import Stack
from sonLib.bioio import system
import aimseqtk.lib.common as lcommon
... | [
"nknguyen@soe.ucsc.edu"
] | nknguyen@soe.ucsc.edu |
aa1d41dd1307400c3f7b80cfd443c12f4c19343f | d49ff97be24539856f725e591bf2cff626e1a3d5 | /electrumx/server/version.py | 137eb2f1e8daa69b6a396da9a45f4c65059d08fa | [
"MIT"
] | permissive | rootSig/electrumx-atom | 3b75b11bd07bf4621a10022018cb3f3625b1eebf | c11b36cdf5acdb9129d7d4507a79cdd7d1408bcb | refs/heads/master | 2020-03-28T13:25:35.654573 | 2018-09-04T19:47:42 | 2018-09-04T19:47:42 | 148,394,514 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 28 | py | VERSION = 'ElectrumX 1.5.2'
| [
"kyuupichan@gmail.com"
] | kyuupichan@gmail.com |
b5085bc81ecf945c3ae437698d35ee024d6096d1 | 76dba08689db40edf2d01a98856fa2a20d98d679 | /Python:从入门到实践/从入门到实践代码/第15章 生成数据/15.4 使用Pygal模拟掷骰子/动动手/15-7 两个D8骰子.py | c407144e32e950fef7d8df457fa1c7e35db04ff1 | [] | no_license | pangfeiyo/PythonLearn | ce0747d75b53eb21acb6199acfe10934778420b2 | b514b3d7baa62fa7b801d26ff49266f02cb9cbd2 | refs/heads/master | 2021-05-11T10:20:14.818774 | 2020-01-16T15:47:16 | 2020-01-16T15:47:16 | 118,096,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 937 | py | # 请模拟同时掷两个 8 面骰子 1000 次的结果。逐渐增加掷骰子的次数,直到系统不堪重负为止。
import pygal
# 若不在同一目录,python查找不到,必须进行查找路径的设置,将模块所在的文件夹加入系统查找路径
import sys
sys.path.append("..") # 上级目录
from die import Die
die_1 = Die(8)
die_2 = Die(8)
result = [die_1.roll() + die_2.roll() for roll_num in range(1000000)]
# 两个骰子面和
max_result = die_1.num_sides + ... | [
"35551631+pangfeiyo@users.noreply.github.com"
] | 35551631+pangfeiyo@users.noreply.github.com |
bdb43ab9e72cc2d066b3dee755eae5060bd6c4fe | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_267/ch76_2020_05_13_20_14_15_244931.py | b776d73d9f1c29cf528dbbcbba0d1d85863dcdcc | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | def aniversariantes_de_setembro(dicio_nomes_birth):
new = dict()
for n,i in dicio_nomes_birth.values():
if i[3:5] == '09':
new[n] = i
return new
| [
"you@example.com"
] | you@example.com |
09ce368184cffcfcd74d912cf3a822f6f8e1d4ae | fd3c2071c2b74ade4d4938ee9a6e7141c9958c76 | /faa.py | eae9d1eb447d649918dee9ad83cc6f9b658c4480 | [] | no_license | RaviKumar10052/Python-code-Practice | 9f79889f1c963dd068eebfad440ddf8c5c669eef | 406d18011a85f86154ccc49f14b3d6d1dd320aec | refs/heads/master | 2020-07-19T23:32:17.178204 | 2019-09-05T10:06:10 | 2019-09-05T10:06:10 | 206,531,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | def keys(i,n, r):
# combinations('ABCD', 2) --> AB AC AD BC BD CD
# combinations(range(4), 3) --> 012 013 023 123
p = tuple(i)
n = len(p)
if r ==0:
return
else:
for i in range (0,n):
del_list(p,i,new)
x=keys(New,n-1,r-1)
l="bcdfghjklmnpqrstvwxyz... | [
"noreply@github.com"
] | RaviKumar10052.noreply@github.com |
a7ee1c3be59a6b35c6bdf0c3e2c8573d743101f6 | 3bc79d5b5f16bc17b27c22246053850664870e6e | /class_inheritance.py | 9cff52ed6469251ef0f1ec119a5deaf8219af943 | [] | no_license | OokGIT/pythonproj | 379344fe332c2734d7d598eccfa9b6a88438e21f | cad5852527fae1347f7000e09546ebf7b3d9122f | refs/heads/master | 2022-01-08T10:53:06.742045 | 2019-03-10T01:27:24 | 2019-03-10T01:27:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,726 | py | class Animal(object):
def __init__(self, age):
self.age = age
self.name = None
def get_age(self):
return self.age
def get_name(self):
return self.name
def set_age(self, newage):
self.age = newage
def set_name(self, newname=""):
self.name = newname
... | [
"slanjr@gmail.com"
] | slanjr@gmail.com |
5847abd56c78f21361e646d230bff446ff2e7ff2 | be78478bc48bd836fe497f082d9dfe1675dfcc3e | /playbookquiz/wsgi.py | 5c3afca36a35d82e993e2b30f156b49b56a02134 | [] | no_license | regold123/playbookquiz-django-react | 137533341ec049802b0942e29f61ea74a5beaa6b | 81ae64565d9c169f5e8ab10f5987d525c4f082f5 | refs/heads/master | 2023-01-10T00:37:02.862583 | 2020-11-15T10:29:07 | 2020-11-15T10:29:07 | 312,997,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | """
WSGI config for playbookquiz project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | [
"ari@replyall.me"
] | ari@replyall.me |
5dca3ca15af2450c43355677a72edfd2e4ef807d | 91fa98e3108e1360e63fe4d7f91f0530500f32cc | /src/hhash.py | a28ba2457c287ed97e3cd9584c723014d75b8654 | [] | no_license | ddmbr/Extendible-Hashing | c702d9594d7fc85cbcc25e204780485db3a08a0c | 192f2fba8639ab7417a6e9b15c38ab6a442cfdc5 | refs/heads/master | 2021-01-10T20:33:07.097122 | 2012-05-23T10:41:30 | 2012-05-23T10:41:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,838 | py | import re
import sys
import pygame as pg
from pygame import Rect
from time import sleep
DEBUG = 0
PCONTENT = 0
class Record:
FormatPatt = re.compile(r'(\d+)\|(\d+)\|')
def __init__(self, rawstr):
self.data = rawstr
self.orderkey, self.partkey = map(int, Record.FormatPatt.match(rawstr).groups())
... | [
"ray040123@gmail.com"
] | ray040123@gmail.com |
a9cc6866def09742144858776e0a9934b2392345 | 147d121b736e56ca7a63e945bb8933de36203a0b | /logical question/error_hendaling.py | 1ffe76e4c50b227f3eb6fba25daa36f50fcd7116 | [] | no_license | Nehajha99/Python | 4473443038d0c07a3f59f7940c0a96fe21c2df4b | ae208d06b5c53cf3f3dd8df6015ead0009658c39 | refs/heads/master | 2023-07-13T21:21:02.174047 | 2021-08-23T19:56:00 | 2021-08-23T19:56:00 | 399,231,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | # list1=["123s","874w","675","890","789r"]
# new_list=[]
# for i in range(len(list1)):
# try:
# b=int(list1[i])
# new_list.append(b)
# except Exception:
# pass
# print(new_list)
ages = {'Jim': 30, 'Pam': 28, 'Kevin': 33}
person = input('Get age for: ')
try:
print(f'{person} is {... | [
"neha20@navgurukul.org"
] | neha20@navgurukul.org |
8dcb7a190653d321a50aa5a3d6333a019407c168 | a627060a0f443843f76170993018f6c2d8c42ca3 | /util/modis_tile_cal.py | 1004442c36e2fb121ed28a996bfcc2d60b700ae2 | [] | no_license | MarcYin/Global-analysis-ready-dataset | 2547395581c26347278642b74c5a716403ea682e | e103a2d6175b44bbf813077ed3d845214a9ad2cf | refs/heads/master | 2020-03-28T00:14:49.741952 | 2018-11-08T17:28:48 | 2018-11-08T17:28:48 | 147,388,318 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,580 | py | #!/usr/bin/env python
import os
import osr
import ogr
import gdal
import numpy as np
'''
This is a function used for the calculation of MODIS
tile names from lat and lon coordinates. get_raster_hv
is used for the calculation of MODIS hv from a raster
file and get_vector_hv form a raster file
'''
x_step = -463.31... | [
"marcollinbobo@gmail.com"
] | marcollinbobo@gmail.com |
e626f9bcf86cceb851f1eed94b0772987defa8ce | bc2cdb1e438efaf67131e975ac4db80b4dc43385 | /src/private/activity/business/migrations/0007_accessalarmresult.py | 229ec399c9747919cd062b9334ff2561d9c8716d | [] | no_license | Shadow-linux/ops-for-study | cf4d55409ebc6f27d454bea60886cd154c994484 | 115b567948d25a64e423a6cdc89bc8337896afe2 | refs/heads/master | 2023-01-14T13:35:56.880896 | 2019-09-23T05:01:31 | 2019-09-23T05:01:31 | 209,781,758 | 2 | 0 | null | 2023-01-04T10:55:45 | 2019-09-20T12:08:11 | Python | UTF-8 | Python | false | false | 875 | py | # Generated by Django 2.0.1 on 2019-05-14 17:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('business', '0006_auto_20190514_1301'),
]
operations = [
migrations.CreateModel(
name='AccessAlarmResult',
fields=[
... | [
"liangyedong@qipeipu.com"
] | liangyedong@qipeipu.com |
08ced66bbdf4f7ca827ce00c37edfa9b6475841f | 5fc098414b45cf8f4cb0580e92af95aaccb675b0 | /huffpsst/urls.py | f59757cf1e3d55e38d13f10cc70457a0e68eec0e | [] | no_license | sachitad/huffingtonpsst | 16e26b9197f6607cb7204bf3d56454688fed1f73 | 47ff9399c2142f49b07809dcdada88855d768322 | refs/heads/master | 2021-01-19T22:23:47.415738 | 2017-04-20T01:39:48 | 2017-04-20T01:39:48 | 88,807,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,753 | py | # -*- coding: utf-8 -*-
import os.path
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic.base import RedirectView
from django.contrib import admin
from django.conf import settings
from wagtail.wagtailcore import urls as wagtail_urls
from wagtail.w... | [
"sachit@qed.ai"
] | sachit@qed.ai |
726d5a3b31fa3abbfb051de91c55087b28816e66 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/222/users/4072/codes/1578_1560.py | 003ad9a0d0baed87e52716d0e8a1ef8139930790 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py | string = ('Augusta Ada Byron, a Condessa de Lovelace, nasceu em 1815, na Inglaterra.')
print(string.lower()) | [
"jvlo@icomp.ufam.edu.br"
] | jvlo@icomp.ufam.edu.br |
49088c7dfe1f91e9c82dbf323b00876e28a2b585 | b4dd9cd86fd0b802e38e8cc468752ad34cd1ee6c | /COEN171_Programming Languages/HW2/HW2.py | 24427c99d51f37d58016fae3853f82a5188e065f | [] | no_license | tchung777/School-Projects | c1a88c921856e016a7edb80ee526fe75087df1e6 | c07fbab1200d37c4a45105458e8a11e19fa586b4 | refs/heads/master | 2021-05-16T01:01:36.543539 | 2019-03-17T05:30:20 | 2019-03-17T05:30:20 | 107,031,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,029 | py | #!/usr/bin/python
from Tkinter import *
from random import randint
from time import sleep,time
from math import sqrt
H = 600
W = 800
scorePoint = 0
NUM_MINES = 10
BUB_CHANCE = 10
SHIP_RADIUS = 30;
SHIP_LIFE = 4;
GAP = 100
GAMEOVER = False
window = Tk()
window.title("Submarine Game")
c = Canvas(window, width = W, he... | [
"cchung@scu.edu"
] | cchung@scu.edu |
5b7eedd4d4d3e3d922da6372774b69cfacf3b6d9 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5756407898963968_0/Python/methane/magicktrick.py | 22f320c4758561b273b14dfd3c86937f0c3fa0de | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 569 | py | import sys
def read_rows():
return [[int(x) for x in sys.stdin.readline().split()] for _ in range(4)]
def solve(T):
n1 = int(sys.stdin.readline())
cand1 = read_rows()[n1-1]
n2 = int(sys.stdin.readline())
cand2 = read_rows()[n2-1]
cand = set(cand1) & set(cand2)
if len(cand) == 1:
p... | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
d9755d36d4ecea5aaaca5f900735f8fb14154b2d | 1e36de4d741d56437dd285816f38e61878a82d09 | /src/tests/test_quick_sort.py | 44e57614f398f3f51e6b16f2e945ae5d2a93c103 | [
"MIT"
] | permissive | Woojgh/data-structure | a61fd5d1cfd5914156d3dcff8693886ec7cb35cb | f44bcb5950f26b5e098f1e25d11ad6e19cfb0eb1 | refs/heads/master | 2020-04-05T13:38:27.919769 | 2019-12-10T21:28:49 | 2019-12-10T21:28:49 | 94,933,670 | 0 | 0 | MIT | 2019-04-08T17:04:34 | 2017-06-20T20:46:51 | Python | UTF-8 | Python | false | false | 973 | py | """Test that quick."""
import pytest
from random import randint
from quick_sort import quick_sort
to_sort = [
([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
([10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
]
def test_quick_non_list_raises_error():
"""Non list raise... | [
"jamessalamonsen@gmail.com"
] | jamessalamonsen@gmail.com |
9e98e30afaa17a6351d8233793fac472df76b88c | ae97300ae6ee4c274ccefd86b565b876ddf558d2 | /bs4_pyquery_lxml_exerices/xml_py2_2.py | fa1fecea1362ec16abe4313cd7f2110726f3e363 | [] | no_license | Mensyne/python_crawler | 7d3eae531bcbff46fc256f342ac7819d4077558e | b883570fbeadaf9b07439a16229ebee61bb8e8e7 | refs/heads/master | 2022-12-16T10:59:37.522407 | 2020-09-08T06:45:54 | 2020-09-08T06:45:54 | 130,138,875 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,144 | py | #-*- coding:utf-8 -*-
from lxml import etree
html = etree.parse('./hello.html')
print(type(html))
# 获取所有的li标签
result = html.xpath("//li")
print(result)
print(type(result))
print(len(result))
print(type(result[0]))
# 获取所有的li标签下classshuxiang
result1 = html.xpath('//li/@class')
print(result)
# 获取li标签下href 为link1.html的a标... | [
"1379022527@qq.com"
] | 1379022527@qq.com |
d44e7245ae198153aeebb6d5a664a5be23588dbe | db731f2ae2708b7f0b274d03f3a4aa3200b225bf | /app/controller.py | 28a3b88a24fa4da64b52b35cef03374a779e51c3 | [] | no_license | AmyBrowneDesigns/CC_Flask_Event_Lab | c87fedcc1542a88dfa3f3d09beca6c4c7c33631e | aa2a3b405881b5bc32f57b98aaa50b74a8eb419b | refs/heads/master | 2022-12-20T13:28:58.813319 | 2020-09-24T17:15:35 | 2020-09-24T17:15:35 | 298,345,467 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | from app import app
from flask import render_template, request, redirect
from app.models.events_list import events, add_new_event
from app.models.event import *
@app.route('/')
def index():
# return "hello"
return render_template("index.html", title= "Home", events=events)
@app.route('/add-event', methods=['... | [
"amybrowne20@gmail.com"
] | amybrowne20@gmail.com |
ab48d8f590363579e1895eb26a3fea33faff1879 | e3e150079a617b96e8ee6305adca0e862ee93db3 | /coco-dst/classifier_filter/bert_filter.py | d3d500c7d822e7f13e59fac0da213deb333ee28f | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | Janeey99/coco-dst | 1e2c84cd03ebb3a18f9541dde6f126f243c4aca1 | f50868d0d8349b522dd070c667d58da1788e27e4 | refs/heads/main | 2023-08-18T06:11:19.230921 | 2021-10-12T19:05:00 | 2021-10-12T19:05:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,274 | py | """
Copyright (c) 2020, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import prin... | [
"semihyavuz9091@gmail.com"
] | semihyavuz9091@gmail.com |
8faa535f77e9ee8d6cb8c6b69d92a30d23e281bd | 41898ee4cc597a19540d64c333687610d5792168 | /Problems/557. Reverse Words in a String III.py | 06cbf8f6ce5f9612f7228b00c8168b7305d69334 | [] | no_license | aidardarmesh/leetcode | 82c4e09a85dc5b6cf05bceb089b57b3a81e2406e | 4509f4b2b83e172e6ccc21ff89fc1204e0c6b3f3 | refs/heads/master | 2021-07-06T15:56:04.244369 | 2020-11-15T20:47:16 | 2020-11-15T20:47:16 | 205,086,346 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 792 | py | from typing import *
class Solution:
def reverseWords(self, s: str) -> str:
left = None
n = len(s)
arr = list(s)
def mirror(left, right):
while left < right:
arr[left], arr[right] = arr[right], arr[left]
left += 1
... | [
"darmesh.aidar@gmail.com"
] | darmesh.aidar@gmail.com |
be8a1bb2c9aa57a82e0da7cf0672f2b6102613b4 | 7bf9709ac227bb9ad70aa38810f9282e66948415 | /project/domain_layer/stores_managment/DiscountPolicy.py | 66ffa8797b17664721f7ce77d7327f1b0d39bd79 | [] | no_license | MoranNeptune/Workshop | ad7ad5a01be7ce36d9fe847da4a683749ed59ce8 | 925982e889be41cd7fb3eb6959e981c38ac1cd68 | refs/heads/master | 2022-07-16T22:55:18.218174 | 2020-05-13T15:41:56 | 2020-05-13T15:41:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 58 | py | class DiscountPolicy:
def __init__(self):
pass | [
"levamit@post.bgu.ac.il"
] | levamit@post.bgu.ac.il |
d29851148971353b46c941e65a866086a96c1bb3 | 5872d377d6a733fcd558979e5a720b29c02375f7 | /assignment13.py | ad55298f8362cf4e76a6bfba48722f82a07e6074 | [] | no_license | bharti-11/assignment1 | 739186572f308e62e87824245dd2ade3ab06f767 | e7bbe59acbc57e7ac6754ea039faf5bfe6029eed | refs/heads/master | 2020-03-20T04:03:33.842100 | 2018-07-13T09:03:00 | 2018-07-13T09:03:00 | 137,169,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,540 | py | #Q.1- Name and handle the exception occured in the following program:
a=3
if a<4:
a=a/(a-3)
print(a)
#sol
a=3
if a<4:
try:
a=a/(a-3)
except Exception:
print("exception occurred")
#Q.2- Name and handle the exception occurred in the following program:
l=[1,2,3]
print(l[3])
#sol
l=[1,2,3]
try:... | [
"bhartirana9050@gmail.com"
] | bhartirana9050@gmail.com |
83ad7c7af9dcfd89ee4d58da68d4db5bc5b0c14f | e2f98708ab775e2ce7d2b83325319b86ad9e4961 | /WilliamsCleveland/Assignments/Flask/NinjaGold/server.py | 7cfd4343fe8f75b65222e444074ee905b5054ba6 | [
"MIT"
] | permissive | brroberts/Python201608 | fc9ac57950175a1809e0409446804fe1f1190294 | 518b7e01e5243508c987d5046ace9df5b324c8f0 | refs/heads/master | 2021-01-18T17:23:16.285923 | 2016-08-29T16:41:09 | 2016-08-29T16:41:09 | 64,950,868 | 1 | 0 | null | 2016-08-04T16:37:37 | 2016-08-04T16:37:37 | null | UTF-8 | Python | false | false | 1,485 | py | from flask import Flask, request, render_template, session, redirect, Markup
import random
app = Flask(__name__)
app.secret_key = "secretshhh"
@app.route('/')
def main():
if "gold" not in session:
session["gold"] = 0
session['activities']=""
return render_template('index.html')
@app.rout... | [
"cameron3579@hotmail.com"
] | cameron3579@hotmail.com |
4d56f19824b7d8e6d79d13913b481d1890ba68cd | 6eca5af393e8e3c83efa7b89857e6876a4da9f9c | /athena/modules/active/google.py | 9c8182b1ea00359bb186faa33b8f522ace0c6531 | [
"MIT"
] | permissive | dimitar-petrov/hey-athena-client | ec714dbf661a2a66eaea3f3bc72f1998ae0c7d78 | c4e3121b1df2493d0ddd097eb584ff4c69995695 | refs/heads/master | 2021-05-04T12:53:45.750307 | 2016-05-22T03:29:41 | 2016-05-22T03:29:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 753 | py | """
Handles most general questions (including math!)
Usage Examples:
- "How tall is Mount Everest?"
"""
from athena.classes.module import Module
from athena.classes.task import ActiveTask
from athena.apis import api_lib
class AnswerTask(ActiveTask):
def __init__(self):
p_... | [
"rcbyron@utexas.edu"
] | rcbyron@utexas.edu |
46443b8beed1cc102c120ce14f62826fec969d7d | 4a59f973b28aff4db1864ca8fb19c70790b4d6f3 | /main.py | 51b97a69941dc145e23a5c798f870d1586314923 | [] | no_license | Zoey-little5/20754243_MSBD5001 | faf18294b75247181396169011b9ade3f8924e28 | 937cb37120c12769647d40238ea015e338f64084 | refs/heads/main | 2023-01-31T21:11:54.028639 | 2020-12-05T10:17:28 | 2020-12-05T10:17:28 | 318,756,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,757 | py | import numpy as np
import pandas as pd
import xgboost as xgb
from dateutil.parser import parser
def read_and_preprocess_training_data(file_path):
dataframe = pd.read_csv(file_path)
traits_data = []
label_data = dataframe.loc[:, 'speed']
p = parser()
for date in dataframe.loc[:, 'date']:
tr... | [
"noreply@github.com"
] | Zoey-little5.noreply@github.com |
bf9e51d5d73d63fcdabb9aa1a7e3e9c75c0dc27b | 82f902d013a323d0cf1123b089a298fd502cd6f5 | /liangyun_app/views.py | 44ada5af04e28de537159336e2396a3672e79d68 | [] | no_license | SmallGaoX/liangyun | b976925ec57c5b08cb69c93517b60d664de7f68b | 4231d412228b177fb6d3a40dda33c843d77e117d | refs/heads/master | 2020-04-13T01:04:28.212958 | 2018-12-23T04:55:26 | 2018-12-23T04:55:26 | 162,863,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,750 | py | from django.shortcuts import render
from liangyun_app import models
from django.db import connection
from collections import namedtuple
import datetime
import json
class CJsonEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime):
return obj.strftime('%Y-%m-%d %H:%M:%... | [
"wadxf@live.com"
] | wadxf@live.com |
60ee66cae16ac6e0439eb6a3fff8cc6949654f44 | e3c8f786d09e311d6ea1cab50edde040bf1ea988 | /Incident-Response/Tools/grr/grr/server/grr_response_server/databases/mysql_utils_test.py | a4b36b9292c5c412bae2c71fa29a79284ccdba3a | [
"MIT",
"Apache-2.0"
] | permissive | foss2cyber/Incident-Playbook | d1add8aec6e28a19e515754c6ce2e524d67f368e | a379a134c0c5af14df4ed2afa066c1626506b754 | refs/heads/main | 2023-06-07T09:16:27.876561 | 2021-07-07T03:48:54 | 2021-07-07T03:48:54 | 384,988,036 | 1 | 0 | MIT | 2021-07-11T15:45:31 | 2021-07-11T15:45:31 | null | UTF-8 | Python | false | false | 2,478 | py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
from absl.testing import absltest
from grr_response_server.databases import mysql_utils
from grr.test_lib import test_lib
class DocTest(... | [
"a.songer@protonmail.com"
] | a.songer@protonmail.com |
dd1ed8b4a163e13f54325b7f7d8cc675fbc91d57 | ffed689b2ea1c0be9a3b750887a6f6d19cc153c2 | /flair/models/__init__.py | 2e3c9e2619b2a721c98ab1bdc3f0a331f3cc1f31 | [
"MIT"
] | permissive | shtechair/AIN | a70eec8eb1ee817c528f29898c951f0da9abdfbd | 7b0413434550c7f5194393526b554df629029743 | refs/heads/main | 2023-01-23T06:31:07.087598 | 2020-11-30T07:18:09 | 2020-11-30T07:18:09 | 303,882,729 | 0 | 0 | MIT | 2020-11-30T07:18:10 | 2020-10-14T02:35:20 | null | UTF-8 | Python | false | false | 69 | py | from .sequence_tagger_model import SequenceTagger, FastSequenceTagger | [
"wangxy1@shanghaitech.edu.cn"
] | wangxy1@shanghaitech.edu.cn |
c32fd622445ab01b56b3a39587039f4d82e7d06d | 27ba6b3f865631c9c0fea429842e41a0fdc27241 | /even_the_last.py | 36ee64f84ed9fdf8f593eac7e2239776b7ae97e4 | [] | no_license | jigi-33/checkio | 7c3b0b68213ef6777df3247edc888805e0c505b8 | afbfe565618c3e81dbc8f24249bf6832239ece0a | refs/heads/master | 2022-05-22T00:22:26.117962 | 2020-04-20T10:12:07 | 2020-04-20T10:12:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py |
def checkio(array: list) -> int:
if len(array) == 0:
return 0
else:
a = 0
for i in range(len(array)):
if i % 2 == 0:
a += array[i]
mult = a * array[-1]
return mult
if __name__ == '__main__':
print('Example:')
print(c... | [
"pollicier@gmail.com"
] | pollicier@gmail.com |
64a48734fa864359da59f93107a8e4b623c3f06f | 79cb8e02d967a5a7718f22bc75115f34126328b0 | /python/cuml/dask/datasets/blobs.py | 49ed85e4d168593bf9021a2744e71c8d55ecdb8b | [
"Apache-2.0"
] | permissive | taureandyernv/cuml | 55b289d81bc2783878b0ba5c5eb9d28ad9d4b3be | c92b594d3bda342c64d88a9c44b5d6e507b13f6c | refs/heads/branch-0.11 | 2023-08-16T18:05:24.513141 | 2019-10-22T15:10:28 | 2019-10-22T15:10:28 | 216,860,609 | 0 | 0 | Apache-2.0 | 2023-08-03T18:53:05 | 2019-10-22T16:32:52 | null | UTF-8 | Python | false | false | 4,272 | py | #
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# 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 ... | [
"cjnolet@gmail.com"
] | cjnolet@gmail.com |
a57786a4a1571ef6d33d42dac65e879857b201a8 | f33c3e874b1142ba2213ac0dfd9df20c698f0542 | /mnist_cifar/models.py | fbf8dff953087218b81c6eb2825fb53b52aea35a | [] | no_license | GaoYi439/Complementary-GAN | 4a60aeac78dcf6e78b388d43b4b6555c3b915188 | 408e1c571e342fff2bdf5aa7d9afb749261baf4f | refs/heads/master | 2022-12-18T10:49:03.354107 | 2020-09-28T15:30:03 | 2020-09-28T15:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,354 | py | import torch.nn as nn
import torch.nn.functional as F
import torch.nn as nn
import torch.nn.functional as F
class G_MNIST(nn.Module):
def __init__(self, nz, ngf, nc):
super(G_MNIST, self).__init__()
self.embed = nn.Embedding(10, nz)
self.conv1 = nn.ConvTranspose2d(nz, ngf * 8, 4, 1, 0)... | [
"yanwuxu@gpu050.pvt.bridges.psc.edu"
] | yanwuxu@gpu050.pvt.bridges.psc.edu |
32bccf79d8b966c581bc2a92d82c5997f5058fc5 | 6d359f5cac4ed59199bd1b03c5a172237b80b72a | /kafka-python/kafkaProducerAsync.py | ce02ca3529660efb8916c840044c94e3046588a7 | [
"Apache-2.0"
] | permissive | acs/kafka-samples | 9e223d9e2e7b151a427c11064960bba3def7fd35 | 1e12ce3c0ca8e5bb6b4d6039a357087639204b35 | refs/heads/master | 2020-12-29T07:34:09.057543 | 2020-02-07T11:15:29 | 2020-02-07T11:15:29 | 238,516,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | import logging
import time
from aiokafka import AIOKafkaProducer
import asyncio
loop = asyncio.get_event_loop()
async def send_one():
producer = AIOKafkaProducer(
loop=loop, bootstrap_servers='localhost:9092')
await producer.start()
try:
while True:
logging.debug("Sending me... | [
"adelcastillo@thingso2.com"
] | adelcastillo@thingso2.com |
e8e33c30c7a55aeffb0206fba3fafc45a976f7b9 | 427f23bb5886425eadebb7a2db562f049b50123d | /metan/settings fordeploy.py | 1b04b5e2b693bf6990ec1c582dde158a0e79f7a9 | [] | no_license | mmahdavim/corrmeta | fcf119d8a33590bc4891ac07268425ee65321a95 | 079814abba612f3083c66dcd78fd22afcb0fec56 | refs/heads/master | 2020-03-28T20:32:26.122038 | 2018-04-25T19:20:31 | 2018-04-25T19:20:31 | 94,613,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,233 | py | """
Django settings for metan project.
Generated by 'django-admin startproject' using Django 1.11.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
... | [
"mmahdavim@gmail.com"
] | mmahdavim@gmail.com |
913aea80a7be92a30a978815f13ada4dfbc2480d | feb1131c3300c1f581c96114bfa512f65f72015d | /prac04/quick pick.py | 2697b49d6c315d68c6ee3b56f59aaf9fa91feccd | [] | no_license | jot1/workshops3 | db4b015ae243f1dd79fa8e2d5cbbfc282a0494fd | dd1817c19e2de70e7cea677c7a494be814847559 | refs/heads/master | 2021-01-13T14:59:24.404379 | 2016-12-16T11:28:11 | 2016-12-16T11:28:11 | 76,627,561 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 341 | py | __author__ = 'jc450453'
from random import randint
quick_pick=int(input("How many quick picks? "))
pick_of_6nos=[]
num=0
for i in range(0,quick_pick):
num=randint(1,45)
for n in range(0,6):
while num in pick_of_6nos:
num=randint(1,45)
pick_of_6nos.append(num)
print(sorted(pick_of_6nos))
... | [
"prabhjotkaur7@my.jcu.edu.au"
] | prabhjotkaur7@my.jcu.edu.au |
59c4c00d5f432dec66af350497740d2f71a38cb3 | d3a556e969b21e42d9a7ee5da4c66ba692029bab | /gmm.py | a0a7b3eae82359aed981c5feb639c1cd1b03b9ce | [] | no_license | caleblu/MLSP-Project-fall17 | 7e2e6f59a0b8d52faffa33cab7253092de552f49 | 90c1b4936b1dbe8eea3fa4428363968fbd75273c | refs/heads/master | 2021-08-24T14:11:08.665505 | 2017-12-10T05:22:19 | 2017-12-10T05:22:19 | 104,931,330 | 1 | 1 | null | 2017-11-19T01:21:26 | 2017-09-26T19:55:04 | TeX | UTF-8 | Python | false | false | 2,749 | py | import sklearn.mixture
import numpy as np
def train_GMM(jnt):
"""
train GMM with joint vectors
:param jnt: joint vector of spectral features
:return: trained GMM model
"""
GMM = sklearn.mixture.GaussianMixture(n_components=40, covariance_type='full')
GMM.fit(jnt)
return GMM
def get_den... | [
"nanshu.wang@gmail.com"
] | nanshu.wang@gmail.com |
d40abeb6c070fc71ba4e1f5fa90193ab97b47fd6 | a57541520ab737843c9ba125e5856a7563d8756d | /utils/old/make_mndwi_4pred.py | 64ea3c58da4794de1caa00fd717275e00ebb9c82 | [
"MIT"
] | permissive | dbuscombe-usgs/segmentation_gym | 5fbfb2896557657b8ef6678dadc4006e483deadd | 1517efad76513e0decd51d8e31fca279b7bdcf1c | refs/heads/main | 2023-04-17T11:42:49.141844 | 2022-03-11T20:16:16 | 2022-03-11T20:16:16 | 469,203,035 | 0 | 0 | MIT | 2022-03-12T21:21:33 | 2022-03-12T21:21:33 | null | UTF-8 | Python | false | false | 11,892 | py | # Written by Dr Daniel Buscombe, Marda Science LLC
# for the USGS Coastal Change Hazards Program
#
# MIT License
#
# Copyright (c) 2022, Marda Science LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in... | [
"dbuscombe@gmail.com"
] | dbuscombe@gmail.com |
dd907f0a69cd9c88ddfd52f92553161b2d59a294 | 44989ba6b04f78b0a9fd7b7879b433eca1047275 | /06-Condities/blad steen schaar.py | 2c8cce7af147ee6f655d627f60796c50fb672406 | [] | no_license | Milan9870/5WWIPython | f97bcd908d0e4ec0182fe4eb497f0a0712f0b2f9 | d9c5ef52e6fe8311caee0440f38a52da6eb1a53d | refs/heads/master | 2020-07-21T04:59:43.781802 | 2020-02-21T10:53:10 | 2020-02-21T10:53:10 | 206,759,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | py | # invoer
speler1 = str(input('Blad, steen of schaar: '))
speler2 = str(input('Blad, steen of schaar: '))
# berekening
if speler1 == speler2:
winnaar = 'onbeslist'
elif speler1 == 'blad':
if speler2 == 'steen':
winnaar = 'speler 1 wint'
else:
winnaar = 'speler 2 wint'
elif speler1 == 'steen'... | [
"milan.desmijter@sgsintpaulus.eu"
] | milan.desmijter@sgsintpaulus.eu |
ab71c566f2da89fc084c540cb552a05ad7e1ed29 | f1390c49b3640731c7a869accf59d871785ec5e7 | /src/users/migrations/0001_initial.py | 57ed018dd8f6a567d387355ca1b3196ed1a80174 | [] | no_license | alirezahassanzade/Drmotor | de7c094ccabf6983e004aabbb16da7f7140d5f00 | cd128f992b7f11d82abb74cc867897c9046ef6f3 | refs/heads/master | 2020-04-18T17:33:39.807324 | 2019-07-24T07:56:20 | 2019-07-24T07:56:20 | 167,657,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,680 | py | # Generated by Django 2.2 on 2019-07-01 07:36
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import users.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0011_update_prox... | [
"pedram_parsian@outlook.com"
] | pedram_parsian@outlook.com |
412dbd51051a3e82471b4b614b8810caed980d3f | 0146f63cbb2c5bdc321d264e24b112bcb875e8be | /animations/stretch1_pose.py | b9998595782857d883ca9e76ce9c84f952ad6588 | [] | no_license | zhexenova/NAO_Planning | 7dcea52a6cf8305bd4bdc01b55703284e6dd950a | 5cb395b07dc2ddc3e9113ff9f440c55d848de3f7 | refs/heads/main | 2023-01-28T10:48:58.901542 | 2020-12-04T14:35:07 | 2020-12-04T14:35:07 | 318,368,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,950 | py | # Choregraphe bezier export in Python.
names = list()
times = list()
keys = list()
names.append("HeadPitch")
times.append([1.48, 2.24, 2.76, 3.12, 3.76, 5.12, 6.64, 7.4, 8.08])
keys.append([-0.299172, -0.372804, -0.495674, 0.400331, 0.49544, 0.492371, 0.506179, 0.307178, -0.161112])
names.append("HeadYaw")
times.appe... | [
"zhanel.zhexenova@studio.unibo.it"
] | zhanel.zhexenova@studio.unibo.it |
519c0c9c2dee80eff81906db8d7544c392de95f4 | 6eec34dc8e9085e72fdaf42a2b35214338d9fe3e | /shop/urls.py | e264ce64f4a1c4b377f89f93b6ee9eaf8a549b90 | [] | no_license | danielspring-crypto/yate1 | 013676e23e8383d9d78ac043a0398c69c008da69 | 29efc3018a281ca5c21af846a2cc4905977ca313 | refs/heads/main | 2023-01-15T19:05:05.857762 | 2020-11-25T08:12:46 | 2020-11-25T08:12:46 | 315,871,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | from django.urls import path
from . import views
app_name = 'shop'
urlpatterns = [
path('', views.product_list, name='product_list'),
path('<slug:category_slug>/', views.product_list, name='product_list_by_category'),
path('<int:id>/<slug:slug>/', views.product_detail, name='product_detail'),
] | [
"borncode3@gmail.com"
] | borncode3@gmail.com |
a7efb63f3dcee1313420c7f152ef22f4a7ab3dd1 | 80e564b9acc2795e5eba79ebd51ccd4ff4e64ab5 | /Day4/set_up_display.py | d16d7c6a65b1c7707b5d34522c13379ebf9b4d37 | [] | no_license | Sean-McLeod/Sean-FinalProject | 80cf76fee2904a01f88b162d36566ad99c3fe07b | f5b791f00769e0109003e92140892ab8697478df | refs/heads/main | 2023-06-03T02:48:03.727969 | 2021-06-19T01:24:06 | 2021-06-19T01:24:06 | 375,555,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,339 | py | #!/usr/bin/env python3
# Created by Sean McLeod
# Created on June 2021
# This is the display class
import constants
import pygame
from golem_class import GolemClass
from maps import Maps
from monsters import Monsters
from prisoner_class import PrisonerClass
from sprites import Sprites
class SetUpDisplay:
def __... | [
"noreply@github.com"
] | Sean-McLeod.noreply@github.com |
4380463608298f8490ce3638b50b1aec0f104568 | 63d4e6f765e612a1f5fbf73c2a5af88b74041f66 | /curso-python/poo/to_do_v5.py | 39549c6d12e3e8cb769c02d4fee7e7702405e7a5 | [
"Apache-2.0"
] | permissive | gui-hub/Estudos-Python | e9af0ab2231f9d804a95daae515c3d01752a9321 | 0219da2430526c4c3705248e86e65b8c847175b8 | refs/heads/master | 2020-09-05T08:59:31.133017 | 2019-12-04T00:39:57 | 2019-12-04T00:39:57 | 220,045,141 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,480 | py | from datetime import datetime, timedelta
class Projeto:
def __init__(self, nome):
self.nome = nome
self.tarefas = []
def __iter__(self):
return self.tarefas.__iter__()
def add(self, descricao, vencimento=None):
self.tarefas.append(Tarefa(descricao, vencimento))
def p... | [
"guilherme.est9@gmail.com"
] | guilherme.est9@gmail.com |
5a3b79eed9f6b309a19ff6d523da69cae7fd420e | 8e4b99c5b0915415e1919c25f4c310c36c2320b6 | /jobportalproject/jobportalproject/urls.py | 44d1ec81524ee6a91dd2d2393d3af9dcb01b8a27 | [] | no_license | rohitmanjhi/dj_jobsproject | 1ec5b87742bd43ff8587b41a2239d75d9ba9c68e | 8e9c7414b70a035dd2b5a5ee1b3d01cc45c16f8b | refs/heads/master | 2020-04-13T11:45:39.899084 | 2018-12-27T02:34:00 | 2018-12-27T02:34:00 | 163,182,931 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | """jobportalproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')... | [
"rohitmanjhibtc@gmail.com"
] | rohitmanjhibtc@gmail.com |
f8912b81865a7c26fda37b5815cea9c7477b5a55 | 2b04963c3d6870d9cace072229c38a119d312e40 | /main.py | 07e3f93c557a5f5cfe2752476cc2dbbd4f7b3149 | [] | no_license | alishbah13/BooleanRetrievalModel | a27f2f731c0faeadf8acf7f5564c18fc38d604e5 | e54fc762c82fc3f23d09c6b24c43cad2e91531fa | refs/heads/main | 2023-04-13T06:56:24.373657 | 2021-04-24T19:22:10 | 2021-04-24T19:22:10 | 352,271,422 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,444 | py | import tkinter as tk
from tkinter import ttk
from tkinter import *
from qp import query_processor
def show():
tempList = query_processor(raw_query.get())
result_list = []
if len(tempList) >= 1:
for i in range(1,len(tempList)+1):
result_list.append([i, str(tempList[i-1]) + ".txt"])
... | [
"alishbah13@gmail.com"
] | alishbah13@gmail.com |
336b57254b205f5b5d316d407f031a32fbdcf1ec | b0e64b050e43519df5e172d1b1c191e7341aa4b7 | /theme.py | 386b7f6beb4ee6c41a394a1250ed86e03390807d | [
"MIT"
] | permissive | whtsky/catsup-theme-CHO | 125fdf8b8dcac8f02fdae753f20415d7b3f5182d | 8350f42352c1331473023d9d8da6a30a41d33ac0 | refs/heads/master | 2021-01-17T05:32:43.662645 | 2014-01-12T14:14:54 | 2014-01-12T14:14:54 | 15,843,962 | 0 | 0 | MIT | 2019-03-05T16:00:43 | 2014-01-12T14:40:45 | CSS | UTF-8 | Python | false | false | 122 | py | name = 'CHO'
author = 'Oran Zhang'
homepage = 'https://github.com/oranzhang/catsup-theme-CHO'
post_per_page = 20
vars = {} | [
"423794590@qq.com"
] | 423794590@qq.com |
c7ab178a852f777960a56505deeb38def08faf90 | e7ccd71a2da26d170f23194397f125457d7199ec | /mtensorflow/base.py | 993f49650133acdf95d3e14604f0037c3fa8bde7 | [] | no_license | intererting/PythonAllInOne | 0dd0287db45932f865061254f65cc899a87b7c17 | a9d02b29ff518856faef3bfd3e3b68c680bd1bf4 | refs/heads/master | 2020-04-14T01:43:48.454086 | 2019-01-02T08:51:04 | 2019-01-02T08:51:04 | 163,494,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,129 | py | import tensorflow as tf
import numpy as np
def testA():
a = tf.constant(3.0, dtype=tf.float32)
b = tf.constant(4.0, dtype=tf.float32)
total = a + b
sess = tf.Session()
print(sess.run(total))
print(sess.run((a, b, total)))
print(sess.run({'a': a, "b": b, 'total': total}))
def testB():
... | [
"645644717@qq.com"
] | 645644717@qq.com |
2902ccce1a81c074d5666f55c969ceb7dc41c4d1 | 0db05f7b843e8450bafd5ae23f8f70f9a9a8c151 | /Src/StdLib/Lib/site-packages/win32com/test/testExchange.py | 22fafccfb8ef3e4b7652839c64309313d9fa7c8f | [
"BSD-3-Clause",
"Python-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | IronLanguages/ironpython2 | 9c7f85bd8e6bca300e16f8c92f6384cecb979a6a | d00111890ce41b9791cb5bc55aedd071240252c4 | refs/heads/master | 2023-01-21T21:17:59.439654 | 2023-01-13T01:52:15 | 2023-01-13T01:52:15 | 91,620,472 | 1,171 | 288 | Apache-2.0 | 2023-01-13T01:52:16 | 2017-05-17T21:11:51 | Python | UTF-8 | Python | false | false | 3,269 | py | # TestExchange = Exchange Server Dump
# Note that this code uses "CDO", which is unlikely to get the best choice.
# You should use the Outlook object model, or
# the win32com.mapi examples for a low-level interface.
from win32com.client import gencache, constants
import pythoncom
import os
ammodule = None # was the g... | [
"pawel.jasinski@gmail.com"
] | pawel.jasinski@gmail.com |
6d673e1488323ef093aa6afb6a9b2ec12e6202cc | 8c98a6f0108bf2aaf01f898be234ed0ecdb55759 | /50.网络编程/粘包现象/3.sshclient.py | b13450d78dc8a99076ceb07a87850806f592df0e | [] | no_license | mafei0728/python | 5d3d6268602a24166d3a2301f2bd256713259587 | 51cd8bd843c5fcedc9fc457f927b4e48db406d7b | refs/heads/master | 2020-03-28T14:17:10.123953 | 2018-10-15T11:27:48 | 2018-10-15T11:27:48 | 100,848,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import socket,struct
s1 = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s1.connect(('127.0.0.1',10010))
while True:
mes = input('ssh-->')
if not mes:
continue
if mes == 'quit':
break
s1.send(mes.encode('utf8'))
#先收4个字节的报头
data_size ... | [
"275060461@qq.com"
] | 275060461@qq.com |
4fce7f850dacd24f34f079e59b0179cf87857913 | dd1424b76ed7b9cced681ab13c87026b35124bc4 | /feature_engine/timeseries/forecasting/base_forecast_transformers.py | d332036d19f3826283159d6d85860eb120108364 | [
"BSD-3-Clause"
] | permissive | solegalli/feature_engine | 2c685b34db53681d14ae9dc3115534924596dba6 | 3cd3bbb6e6bcb0e7ce7321684ced2a3f3a33d48d | refs/heads/main | 2023-07-06T21:15:56.288083 | 2022-12-07T10:32:49 | 2022-12-07T10:32:49 | 394,274,826 | 42 | 13 | BSD-3-Clause | 2021-09-10T22:01:57 | 2021-08-09T12:02:48 | null | UTF-8 | Python | false | false | 6,770 | py | from typing import List, Optional, Union
import pandas as pd
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.utils.validation import check_is_fitted
from feature_engine._base_transformers.mixins import GetFeatureNamesOutMixin
from feature_engine._docstrings.fit_attributes import (
_feature_n... | [
"noreply@github.com"
] | solegalli.noreply@github.com |
2ad83f05cdc784f41d41b2d0117f8ce45f46a603 | 625fec15a0bea4ed3d4a02eba56608e63bb18053 | /app/models.py | f8ac18277b54702e5cc68297d0fb48689d4b8e09 | [] | no_license | deepaksinghcv/microblog | 70df64dfe3d42acd7143d9e90b812636e6f61fa9 | 84c14907707e4f96d4a033cfdef4f6a42ea17de5 | refs/heads/master | 2022-04-06T01:45:59.602794 | 2020-03-06T13:34:40 | 2020-03-06T13:34:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | from app import db
class User(db.Model):
id = db.Column(db.Integer, primary_key = True)
username = db.Column(db.String(64), index=True, unique=True)
email = db.Column(db.String(120),index = True, unique= True)
password_hash = db.Column(db.String(128))
def __repr__(self):
return f"<User {se... | [
"deepak.singh@research.iiit.ac.in"
] | deepak.singh@research.iiit.ac.in |
908bcd0ea9be997e48755466c5d0e2bed4bde5a8 | 1361a8d0f43b8467c9208bfff69429dd0f679450 | /python_koans/python3/runner/sensei.py | df99154606117dd8de4430079d9ff02c38f62fdd | [
"MIT"
] | permissive | jonahoffline/python-practice | acc6ab84ac7dd5560fff3e27a452863fbc754589 | 3740c756be766bae5a15331655e7b72b69f79cf3 | refs/heads/master | 2016-09-05T13:58:29.007122 | 2013-08-25T05:27:25 | 2013-08-25T05:27:25 | 12,315,982 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,551 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import re
import sys
import os
import glob
from . import helper
from .mockable_test_result import MockableTestResult
from runner import path_to_enlightenment
from libs.colorama import init, Fore, Style
init() # init colorama
class Sensei(MockableTestResu... | [
"jonah@pixelhipsters.com"
] | jonah@pixelhipsters.com |
4efcc55ae6a8de5b8580d5b5b5d25bc9662516c7 | f0a0a5feb73597e8c54db72deec35d9cd3c977a3 | /manage.py | 7c0f64d4a90798b573d0f02c506033595f33e383 | [] | no_license | rjslingshot/ISv1 | 7016423d4e681d75e01ea25f78caa3569dafe700 | 54e0d91f773ea94ad980785f365d895a09e3a489 | refs/heads/master | 2022-12-13T13:17:41.661113 | 2020-09-13T20:09:41 | 2020-09-13T20:09:41 | 295,229,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ISv1.settings')
try:
from django.core.management import execute_from_command_line
except ImportE... | [
"61992435+rjslingshot@users.noreply.github.com"
] | 61992435+rjslingshot@users.noreply.github.com |
f3c067729e4d7cdef9425a8ea6a7a61fcd0c13c3 | a28841b530e90c0a55ed858abfb92b68da45857a | /amino/tc/traverse.py | 4f561ff409fab0b44337386d65af0b18124f4954 | [
"MIT"
] | permissive | GitHub-Notables/amino | 172d3657bcc6fdc888f30614b41a57ce4c7273ed | 3ab30ee65ba4e726b4f9db5384ddbd24551c8c33 | refs/heads/master | 2020-03-16T16:46:49.195323 | 2018-05-07T18:03:47 | 2018-05-07T18:03:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,139 | py | import abc
from typing import TypeVar, Generic, Callable, List
from amino.tc.base import TypeClass
from amino.func import I
from amino import _
from amino.tc.apply_n import ApplyN
A = TypeVar('A')
B = TypeVar('B')
class TraverseF(Generic[A]):
pass
class TraverseG(Generic[A]):
pass
F = TraverseF
G = Trave... | [
"torstenschmits@gmail.com"
] | torstenschmits@gmail.com |
c53276a9b8a51151a001d7ca22af7cb0eee2f421 | 585dd2091e5414d15eb807163f41473e560759e6 | /tf_retrainer/utils/download_flowers.py | eb49afca1647cd0ebfbc78ab15f34abcdeb53f13 | [
"BSD-3-Clause"
] | permissive | joshsungasong/tf-retrainer | c2a869ce59294f242dafdb6623822344e1869173 | c8f202cfc323e66e2bb252ccee10a3ea76994cdd | refs/heads/master | 2021-04-27T01:40:29.617385 | 2018-02-23T04:11:50 | 2018-02-23T04:11:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | import os
import sys
import tensorflow as tf
sys.path.append('/repos/tensorflow/models/research/slim')
from datasets import dataset_utils
url = 'http://download.tensorflow.org/data/flowers.tar.gz'
flowers_data_dir = '/tmp/flowers'
def main():
if not tf.gfile.Exists(flowers_data_dir):
tf.gfile.MakeDirs... | [
"messiercr@gmail.com"
] | messiercr@gmail.com |
a805fa28b435a4533264a55906b316de63d7dbf1 | 344c410e8f245ab032610bdf8fbf2ece561621b4 | /blog/shell.py | 2be75da0722320d5b1e17353274b1351eee78c73 | [] | no_license | yulits/Django-blog | a602df0aff8890f75ffe7bc098f4b7f9ec7309e3 | 66473a715839c8847466aca479ca6fbf91144e88 | refs/heads/master | 2021-01-11T23:22:37.119360 | 2017-01-10T21:02:15 | 2017-01-10T21:02:15 | 78,573,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | import datetime
from django.utils import timezone
from blog.models import Post
from django.contrib.auth.models import User
time = timezone.now() + datetime.timedelta(days=30)
user = User.objects.get(username = 'yuliya')
Post.objects.create(title='title %s' % time, slug='slug_%s' % time, author=user, body='body', publi... | [
"yulits@gmail.com"
] | yulits@gmail.com |
21697788a792b44fc25537856e2c150aa90fdbfe | 9f30c5ddc20d7d198f15c12ce4a6aae968764d41 | /dataset.py | b9fd3a55f1d4d65fbc4d04d0bc18d31494cc5796 | [] | no_license | allenwind/word2vec-in-tensorflow2.0 | f947f54be4cb3106b4d61b4e46b9946f957abc0b | 1ac36c444ceec77c5c2a4845762ac67e69871ea5 | refs/heads/master | 2023-02-18T20:11:54.156169 | 2021-01-20T14:15:46 | 2021-01-20T14:15:46 | 316,661,222 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,177 | py | import glob
import os
import itertools
import random
import collections
import numpy as np
import jieba
import tensorflow as tf
from tokenizer import Tokenizer
window = 5 # 窗口大小
minlen = 30 # 句子最小长度
mintf = 64 # 最小词频
processes = 7 # 并行分词进程数
def preprocess(content):
# 文章的预处理,这里暂不处理
return content
_THUContent ... | [
"allenwind@foxmail.com"
] | allenwind@foxmail.com |
a3ef57459a80b0ea6d084ea01131d839dc18bff6 | 9984fa5e343a7810ae8da2ee3933d1acce9a9657 | /random_sampling_of_accounts/collect_basic_user_profile_info.py | ed05a7c1976f05e8b48c5edff47c660944cc78f0 | [] | no_license | kennyjoseph/twitter_matching | 4757e7cff241d90167888ce24625be36015b5a93 | 9fe3a2b970e0ff2f559261f89d29b3202db25920 | refs/heads/master | 2022-01-05T15:45:19.643082 | 2019-07-11T20:28:54 | 2019-07-11T20:28:54 | 84,259,451 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,774 | py | """
An example of how to use a UserSimpleDataWorker to collect basic information about users,
and then to see if users have been suspended/deleted from that.
Basically, we don't get information back from the API if these users have been suspended/deleted, so
we can learn from that information
"""
__author__ = 'kjoseph... | [
"kennyjoseph@Kennys-MacBook-Pro.local"
] | kennyjoseph@Kennys-MacBook-Pro.local |
0d2f70e1924505a4a1c0b85b513286db86ca90a5 | 943080ab1f5535228bc70f9d1b4f1749712662ea | /zhihu/zhihu/items.py | 1fc16a45b32c98dfa4d782205ad3a82e1abcf782 | [] | no_license | mezc/spider-crawlZhihuUseScrapy | 48438fd08fb2bc3ed744a6fbb759d708b51fdfcb | 6164096e858ff17cebb47291731c9b8b3cbd7843 | refs/heads/master | 2020-03-28T12:09:03.346589 | 2018-09-17T06:17:15 | 2018-09-17T06:17:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 822 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
# import scrapy
from scrapy import Field,Item
class ZhihuItem(Item):
# define the fields for your item here like:
# name = scrapy.Field()
# pass
allow... | [
"noreply@github.com"
] | mezc.noreply@github.com |
509f86e2cfc2944eb6f6fa78124a30ee82cef12c | a701d44222e81e5636ba4ccabc373fc3da5f337a | /scripts/venv/bin/pip | 46f899e86b10818df5cf8e4cb742a7875cbe5a4a | [
"MIT",
"LicenseRef-scancode-other-permissive"
] | permissive | alexanderjacks/dex7 | b738e9961782660af1ad2b1546133379678de249 | f322dde3f32849292d9ca23ae306597ffe545efc | refs/heads/master | 2023-01-07T11:57:29.149359 | 2020-02-01T08:05:39 | 2020-02-01T08:05:39 | 205,595,877 | 0 | 0 | null | 2023-01-04T08:38:06 | 2019-08-31T21:01:22 | Python | UTF-8 | Python | false | false | 256 | #!/Users/alexanderjacks/stardewdex/scripts/venv/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"alexanderthejacks@gmail.com"
] | alexanderthejacks@gmail.com | |
b33dbf58444f4d6bfb70b411d9d46f3efc815648 | 3365e4d4fc67bbefe4e8c755af289c535437c6f4 | /.history/src/core/dialogs/swimmer_dialog_20170810150405.py | 6407ba898248bb4dc73215c2627a021a2a97948f | [] | no_license | kiranhegde/OncoPlotter | f3ab9cdf193e87c7be78b16501ad295ac8f7d2f1 | b79ac6aa9c6c2ca8173bc8992ba3230aa3880636 | refs/heads/master | 2021-05-21T16:23:45.087035 | 2017-09-07T01:13:16 | 2017-09-07T01:13:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,179 | py | from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
import matplotlib.pyplot as plt
from PyQt5.QtWidgets import (QApplication, QDialog, QWidget, QPushButton, QVBoxLayout, QTreeWidget, QTreeWidgetItem)
... | [
"ngoyal95@terpmail.umd.edu"
] | ngoyal95@terpmail.umd.edu |
4917ef790ad266ca127572ab20027fad94a4b702 | 7fb770d2e905333bcf7a7fd479adb194200a1b34 | /vision/bin/iptest3 | 9e218e0cb97dea7ef54abbf918e449f280d628ec | [
"MIT"
] | permissive | JiangWenPL/CS231n | 59424681220fdb83d7c2153dae05f1393e1df7cb | c88c61ec78441389df1151080258d99473a1d3b3 | refs/heads/master | 2020-03-08T20:41:24.976987 | 2018-05-11T13:41:05 | 2018-05-11T13:41:05 | 128,388,531 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 270 | #!/Users/jiangwen/Desktop/CS231n/vision/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from IPython.testing.iptestcontroller import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"JiangWenPL@users.noreply.github.com"
] | JiangWenPL@users.noreply.github.com | |
7f01ae969cfec51582d547c6680543e7f9442fcd | b015f287c3d690df7242d86a77b347b5e724bfd9 | /xnmt/rl/policy_priors.py | 638df0f28fe96b74007b010c3edc3e0099ae898d | [
"Apache-2.0"
] | permissive | philip30/xnmt | 0db384d36c18826968bdef41badeef7702c61b15 | b5e6985d3bedfac102312cab030a60594bc17baf | refs/heads/master | 2020-05-16T15:12:19.995227 | 2019-05-09T08:23:05 | 2019-05-09T08:23:05 | 183,123,358 | 0 | 1 | NOASSERTION | 2019-05-19T16:32:40 | 2019-04-24T01:31:28 | Python | UTF-8 | Python | false | false | 34 | py | class PolicyPrior(object):
pass
| [
"philip.arthur30@gmail.com"
] | philip.arthur30@gmail.com |
3d1b354c2a01e91e52bb9c95b7c4dcb1352f0e23 | b7e93f7c5b2fc830cb3fc49825e25638e338e35b | /project/settings/development.py | 91224dcf6afe12fbf381206b0ff286a96f2b657d | [
"MIT"
] | permissive | thomasleese/django-template | 7e5fc3c63e121a6587bb806887123971ec624f4b | 9f0a5835ce65db8c19e0d04662d7ed7a1429950c | refs/heads/main | 2023-02-17T00:06:21.611385 | 2021-01-21T07:46:30 | 2021-01-21T07:46:30 | 323,590,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | from .common import * # noqa: F403
SECRET_KEY = "CHANGE-ME!"
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": str(BASE_DIR / "db.sqlite3"), # noqa: F405
}
}
| [
"thomas@leese.io"
] | thomas@leese.io |
43c93d0986a46aea9421cd55b036abe186385fab | 344507fea1e483b2743be7118430dd92014f4c2f | /Hunter/spiders/news/japan_gongtong/gongtong_news_economy_science.py | 7bb3fca4599a41e2762e62ebaad584df6a104674 | [] | no_license | sunheqing/Hunter | 1f755b7d2171cb5defcece9af909422dc159fab2 | d1b34aac6581f45d4f3d55703c80561cd6c4a526 | refs/heads/master | 2020-03-22T02:34:58.646830 | 2018-07-27T10:09:07 | 2018-07-27T10:09:07 | 139,379,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,006 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# shq
from scrapy import Spider, Request
from Hunter.items import items
import os
import re
from urlparse import urljoin
class GongTongEconomyScience(Spider):
name = "gong_tong_economy_science_spider"
start_urls = [
'https://china.kyodonews.net/news/economy_... | [
"sunheqing@basaltmatrix.com"
] | sunheqing@basaltmatrix.com |
d99d6ed3ca318be0c23513944d85a8ab42e4ec0b | 7cbff51ecdcca2c234318c5f8a4679c350ec9f1a | /average_perceptron.py | 1d3ec3e88bd05ae49ac0d3030a9ca00381d0a9f5 | [] | no_license | ericlamnguyen/MNIST | 27c94f00aa864e8f499c1bb98a176a5beb0a7f8a | 544184335d4be36db0b89108dc8cc5ec5c0f7cd9 | refs/heads/master | 2022-01-27T01:35:47.124873 | 2022-01-24T04:42:04 | 2022-01-24T04:42:04 | 152,354,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,628 | py | import sys
import struct as st
import numpy as np
import gzip
def parseMNIST(dataset):
"""
this function parses the binary data from MNIST files and return a numpy 2D
array of the instances
Params:
dataset (str): "training" or "testing"
Returns:
data (numpy 2D array): ... | [
"noreply@github.com"
] | ericlamnguyen.noreply@github.com |
f62d1f4d9d18e4a14b3fe1f9d973a55f68525fdf | 707483bde7bf6b8b35c8ad933550a1a179dfe504 | /正则表达式re操作/demo02.py | ab4d77b227f45d930de76fe2137089218244f1d7 | [] | no_license | AH-Toby/RegularExpressionBasics | 57a625730c52691498517768fb10b795b77cd503 | f7894f61d4e6f3f9c58e04a6c343636ec84562e5 | refs/heads/master | 2021-05-25T07:40:10.448334 | 2020-04-08T17:02:47 | 2020-04-08T17:02:47 | 253,720,803 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | import re
# .的使用
# 匹配单个字符
char = re.match('.', 'M')
print(char.group())
# 匹配一段文字
resultString = re.match("s.ort", "short is long!")
print(resultString.group())
| [
"1751001928@qq.com"
] | 1751001928@qq.com |
d6f6ea6881821f5c0756efe1baf745c624c220ce | b13f200db3238f3ac60dd7cea240c40ed0a55da6 | /vespa/transit_basic.py | 3b407434668af0049821102c1247e1deda928ffa | [
"MIT"
] | permissive | TheBatmanofButler/VESPA | 13447f6c93b6a0afe6d3f03f3a745141c1e7f621 | 6cc42fcc995fe02e8d63f6d3d1943378e56cec04 | refs/heads/master | 2021-01-22T14:46:32.777689 | 2015-06-09T19:40:17 | 2015-06-09T19:40:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,410 | py | from __future__ import print_function, division
import os
import logging
import pkg_resources
#test if building documentation on readthedocs.org
on_rtd = False
try:
import numpy as np
import numpy.random as rand
from scipy.optimize import leastsq
from scipy.ndimage import convolve1d
from scipy.in... | [
"tim.morton@gmail.com"
] | tim.morton@gmail.com |
60e955d09fd9dff5c4d25bfb3c9f922d16e1ffe0 | c2ba1de59b83d58600db335b69512319093a6a81 | /nltk/util.py | 5bd5b7c30efe821b79ca7ed8f62b5b4530f2dcd9 | [] | no_license | GustavoKatel/stackcontest | 87a49be419d4bfa124fdd8bf4dc419b88f25aaf7 | f75c1b978a8c04dc0dc909584305c0dbf4b138ee | refs/heads/master | 2020-06-01T09:28:22.900817 | 2012-10-01T04:12:04 | 2012-10-01T04:12:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | #!/usr/bin/python
#coding: utf-8
import nltk
def tokenizeIt(sentence):
tokenizer = nltk.tokenize.PunktWordTokenizer()
return tokenizer.tokenize(sentence.lower())
def featureIt(tokens):
return {}.fromkeys(tokens,True)
def featuresetIt(feature,labelList):
return [ (feature,label) for label in labelList ]
| [
"gustavobs.katel@gmail.com"
] | gustavobs.katel@gmail.com |
daad2b33289afc5124d355dc7371ed687541f7a5 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_205/50.py | c9b42cb43da39eb13706fb051b66e91cc8a899f0 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,104 | py | # coding=utf-8
import sys
def simu(hd, ad, hk, ak, b, d, b_cnt, d_cnt):
hp = hd
pre = False
cnt = 0
while True:
cnt += 1
if d_cnt > 0:
if ak - d >= hp:
if pre:
return 0
pre = True
hp = hd
else:... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
67d279cec8d429bf09392177fa8c0ee1d136d2c8 | 1621ab066a9c1c6b4a34a8d3c5ff2a117a735d5b | /ailog-bot/db.py | eeb8c917a7fe9a791727453209078c3a600bc7a5 | [] | no_license | penguinkang/logbot | 7ee12d97d9d6c35ddbbb047db2e881fe46525c68 | aa137ca538a471cc7b9382cff969aa133bec03cb | refs/heads/master | 2023-05-11T18:28:29.044473 | 2020-07-19T08:08:36 | 2020-07-19T08:08:36 | 280,818,811 | 0 | 0 | null | 2023-05-01T21:44:31 | 2020-07-19T07:54:27 | Python | UTF-8 | Python | false | false | 1,966 | py | import boto3
from datetime import datetime
import pytz
import validators
from urlextract import URLExtract
def put_ailog(url, comment, dynamodb=None):
if not dynamodb:
dynamodb = boto3.resource('dynamodb', endpoint_url="http://localhost:8000")
dynamodb = boto3.resource('dynamodb')
localtimezo... | [
"Jay_Kang@intuit.com"
] | Jay_Kang@intuit.com |
62ac59df0d732f96e5867b9da792da1896a945df | 1259ee2a27cbb2d7de3e034159957d6043161add | /tests/test_catalogs.py | 4bfbb18a3884cb07012a351cdffe073ad7bc917b | [
"MIT",
"Python-2.0",
"LicenseRef-scancode-secret-labs-2011",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | balabit-deps/balabit-os-7-sphinx | f7b0ad4967418f074e8876cd8c7f4a7f5cfbe5d3 | 4e18ca37f4ddddf346c0b30835a544db20887259 | refs/heads/master | 2020-04-07T09:14:11.757278 | 2018-04-11T21:10:19 | 2018-07-20T22:59:13 | 158,244,890 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | # -*- coding: utf-8 -*-
"""
test_build_base
~~~~~~~~~~~~~~~
Test the base build process.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import shutil
import pytest
from sphinx.testing.util import find_files
@pytest.fixture
def setup... | [
"testbot@balabit.com"
] | testbot@balabit.com |
9396ffff142006a7aa4a7dc55bd6f269ec1a4f85 | abf3e150a8e8d9db5b95c1d6a8cf2f287ce25507 | /涨幅最高分级B.py | d16e6450620c54119bf65675b8591fe7178e59b3 | [] | no_license | littlestone/Hamlet | 4e8a27bdd961867aec081004eb3b3d849a8efb3a | 9bb57973de7a99f9d3489662f9930495fad90c4f | refs/heads/master | 2023-03-15T02:31:30.485221 | 2017-10-05T14:27:42 | 2017-10-05T14:27:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,179 | py | def initialize(context):
# 使用真实价格回测
set_option('use_real_price', True)
#设置滑点
set_slippage(PriceRelatedSlippage(0.01))
# 交易总次数(全部卖出时算一次交易)
g.trade_total_count = 0
# 交易成功次数(卖出时盈利即算一次成功)
g.trade_success_count = 0
# 统计数组(win存盈利的,loss 存亏损的)
g.statis = {'win': [], 'loss': [... | [
"noreply@github.com"
] | littlestone.noreply@github.com |
2e0a163249d5fd8602d58c558cc6305977f5c5f5 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/image_classification/SmartSketch_ID1046_for_PyTorch/backend/data/cityscapes_dataset.py | 7babf09c7a27ed97b81e5970dc59ada2505f910b | [
"GPL-3.0-only",
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"CC-BY-NC-SA-4.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-other-copyleft",
"CC... | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 3,604 | py | """
Copyright (C) 2019 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
#
# BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Redistribution and use ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
9f39cbc22d17ed80320c3d912128d2c052b91042 | 259cc44b3f829ccb0d534534bcf51b5b47014dbc | /app.py | 0008aeabc5ba08396d9dfe1da650a78653425e53 | [] | no_license | Axorimaster/prueba_flask | bb60fb51ec4673eed6f5ee3895b365c794ec54e0 | de1ab9981832e96124b738f9f8beecffbb41dd6a | refs/heads/main | 2023-01-09T03:58:16.828968 | 2020-10-30T17:15:58 | 2020-10-30T17:15:58 | 308,175,523 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,276 | py | from flask import Flask, render_template, request, redirect, url_for, flash
from flask_mysqldb import MySQL
app = Flask(__name__)
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = ''
app.config['MYSQL_DB'] = 'contactosdb'
mysql = MySQL(app)
app.secret_key = 'mys... | [
"rodrigo.zambrano@utec.edu.pe"
] | rodrigo.zambrano@utec.edu.pe |
b2f7243d37ac49ca0cdd95e3ed979d074a8dc30b | 74460e5a294d0d5f7c1204ba7e99855cea49d762 | /ex19.py | 622c4b419ff682aec1341b305eb35d8a17752e4e | [] | no_license | HungryEagle/zed_shaw_learn_python_the_hard_way | 4809ef781728efa4265f1641d49ec39fe83eaeff | 992e2831a4a88dd57d5391ce23eacb00d4c6af3c | refs/heads/master | 2023-01-11T16:07:09.306802 | 2020-11-15T10:45:37 | 2020-11-15T10:45:37 | 307,918,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | def something(cheese_count,boxes_of_crackers):
print "You have %d cheesess!" % cheese_count
print "You have %d boxes of crackers!" % boxes_of_crackers
print "Man that's enough for a party!"
print "Get a blanket.\n"
print "We can just give the function numbers directly:"
something(20,30)
print "OR, we ... | [
"iyengarvenugopalan@gmail.com"
] | iyengarvenugopalan@gmail.com |
a23f829e5df7dfc851e5e4b5b0c08838b6288584 | b27714b21d6282a397fd8a9e832f33739e349648 | /news/views.py | d0b701b3c2699fc92502aadc4605a174be67fb9f | [] | no_license | AzatZinatullin/Study-web-project | f1a28fc87a8baf3183e2543965ea7a972c4a0128 | 3431e3e4c79890068268552ac6f92e6b945cbba5 | refs/heads/master | 2020-04-10T22:45:09.658116 | 2019-06-28T18:21:18 | 2019-06-28T18:21:18 | 161,331,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,429 | py | from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.dates import ArchiveIndexView
from django.views.generic.detail import DetailView
from news.models import New
from generic.mixins import CategoryListMixin, PageNumberMixin
from django.core.urlresolvers import reverse_lazy,... | [
"zinatullin.azat@mail.ru"
] | zinatullin.azat@mail.ru |
ec70d0194966dbf2f70639e867ec153839fe63fd | 0245aead667916a7abc63b9fc109633cdb77b891 | /educative_grokking_coding_interview_patterns/14_dynamic_programming/05_word_break_ii.py | 2ed25573f5a59333fed9bd8c0d72adf67be18f06 | [] | no_license | chlos/exercises_in_futility | b6850c456d48e363dfdd3d47ee487ca843113a7d | 5c2473f859da5efec73120256faad06ab8e0e359 | refs/heads/master | 2023-08-04T09:58:09.584146 | 2023-07-31T16:44:42 | 2023-07-31T16:44:42 | 219,707,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | class Solution:
# dfs / top-down
# see the: https://leetcode.com/problems/word-break-ii/solutions/44311/python-easy-to-understand-solution/comments/881748
def wordBreak(self, s: str, wordDict: List[str]) -> List[str]:
# a bit faster in 'word in wordDict' checks
# wordDict = set(wordDict)
... | [
"baphonet@gmail.com"
] | baphonet@gmail.com |
0b77d281cdd7a2fd494ca4ed716f2a5df8dc98aa | 775378afa2eff7b7b539aa00ad373938cbc651de | /train.py | 4b25f3c35143edccff0c9dabd8b760138655a31c | [
"MIT"
] | permissive | RuHungLee/2019_Deep_Learning_For_calligraphy | ab259fc46475337108f3fc26b120d12dcaba6fe9 | 820a560c63663c8280621af50baf397a5d4b501a | refs/heads/master | 2020-07-29T00:10:46.983551 | 2019-10-24T06:38:13 | 2019-10-24T06:38:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,683 | py | import torch
import torch.nn as nn
import torch.optim as optim
import pandas as pd
import numpy as np
#import save_gif
from PIL import Image
from models import Model, Model_v2, Model_v3
from visdom import Visdom
from dataloader.dataloader import Loader
def train():
device = torch.device('cuda:0')
model = ... | [
"q1a2z3nmnm1010@gmail.com"
] | q1a2z3nmnm1010@gmail.com |
ad8d1374dc143b2f0d290231c845d35fe23b1d82 | bb87579e47fc04b299694b8a8fe318f022f54ee8 | /Practice Python/Exercise_06.py | 07e6b0f3f57b4197d3310985c9a563d48f0a03b6 | [] | no_license | QaisZainon/Learning-Coding | 7bbc45197085dfa8f41ac298d26cf54e99e7b877 | a3991842e79c30f24d7bc0cca77dbd09bc03372f | refs/heads/master | 2022-12-23T05:47:26.512814 | 2020-09-25T08:10:20 | 2020-09-25T08:10:20 | 297,945,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | '''
Ask the users for a string and print out whether it is a palindrome or not
'''
def palindrome_checker():
string = input('Check if a sentence is a palindrome\n')
string2 = string[len(string) :-len(string)-1 :-1]
if string == string2:
print('This is a palindrome')
else:
prin... | [
"noreply@github.com"
] | QaisZainon.noreply@github.com |
93f586b8b57676bdca5f28196965d63cdb3d646b | 88f17875a2886c56ec91bc517f49087f52ebe0eb | /examples/butatriene/nokrr/diabatize.py | 92080a0ae83dc3a9f676ef5b9904eba38d6abdeb | [
"MIT"
] | permissive | addschile/propdb | 403566cf8c9b4e66e6aa3249b63c3fe08795c7e6 | 1062c1d371b44c62d58da47cffff294f5f957860 | refs/heads/main | 2023-06-19T21:33:22.986904 | 2021-07-13T21:20:58 | 2021-07-13T21:20:58 | 381,525,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,116 | py | import numpy as np
from propdb import diabatize
if __name__ == "__main__":
nel = 2
nmodes = 2
ngeoms = 813
# get adiabatic energies
eads = np.zeros((ngeoms,2))
f = open('adpes.dba','r')
for i in range(ngeoms):
f.readline() # record no
es = f.readline().split()
eads[i,0] = float(es[0])
... | [
"addison@ummac.local"
] | addison@ummac.local |
30faf0d47ba0f57bc9f9df27b0db6ec1633d5a42 | 9b75094dd493c362a7bf488f8b1031e5d9235a13 | /oldProgs/Test1.2.py | 7a5f708cab93c5d8993ecf418d6a20c3e166284f | [] | no_license | cmibarnwell/python | 40330ce6c0d5ae1cd3047003ae75fa238d5598e9 | 4ddbbe7677696d737436a87cbd9ba2de58d0f242 | refs/heads/master | 2021-01-11T17:07:37.671241 | 2017-01-22T15:55:58 | 2017-01-22T15:55:58 | 79,726,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | def volume(l, w, h):
return l*w*h
def main():
l=input("What is the length of the rectangle? ")
h=input("What is the height of the rectangle? ")
w=input("What is the width of the rectangle? ")
l_int=int(l)
h_int=int(h)
w_int=int(w)
print(volume(l_int,w_int,h_int))
ma... | [
"calebbarnwell@gmail.com"
] | calebbarnwell@gmail.com |
fab9c995fa494e4fa2e1d0fa45978e30482968af | 48da2708fb52948c21cc513bdd323511602c9cbd | /random_seq_engine.py | f9e00088775e187dfbfae21ae1ce4618658ae8a2 | [
"MIT"
] | permissive | a1exwang/qtrading-algorithms | d99a1a75fe07eb4f2177d3924d25f8e68a3f48dd | f5c9a0a2aa28fa0ec49fbbc8d1bfda13b472df97 | refs/heads/master | 2020-07-22T16:57:06.380011 | 2019-09-09T08:58:00 | 2019-09-09T08:58:00 | 207,266,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,398 | py | import numpy as np
import math
import matplotlib.pyplot as plt
class MyOperator:
def __init__(self):
self.init_price = 0
self.expected_return_rate = 0.8
self.max_return_rate = 0.8
self.max_last_prices = 100
self.last_prices = []
self.sell_percent = 0.5
self... | [
"ice_b0und@hotmail.com"
] | ice_b0und@hotmail.com |
16c9c2f253d3c693699b34d7a7058b078c5fedbd | 5e94d48dfefde297b538afba5f551a1140d06806 | /gibbs-sampler.py | b7a9bf5e5f8142d32aa63aaced6b6319c7c68abd | [] | no_license | audreyferry/gibbs | c3ecf3d7740170fe3d8b9ce8f7a351546b28b333 | be0d8471a34c882a2c0af263ce604c0059a39fe8 | refs/heads/master | 2016-08-12T02:58:11.120508 | 2016-04-16T02:21:21 | 2016-04-16T02:21:21 | 49,163,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88,457 | py | #!/usr/bin/env python3
# LoopNumberAtWhichWeStartTracking = 20 # Will need this later in development
import sys
import os
import random
import math
import json
import jsonpickle
import time
import datetime
import copy
#import numpy # TODAY ONLY
g_encoding = "asci" # "utf8"
# PARAMETERS # probably want shorte... | [
"audrey@audreyxvi.local"
] | audrey@audreyxvi.local |
060db81fe3de88de7ae6b3057678182060f034f7 | 487487954ce7b34b97a904be4082e5da5cfacec2 | /038 - [O.O] Funcionário 2.py | 6b7deeeef87897702790cef86d3e6fec09165895 | [] | no_license | rifatmondol/Python-Exercises | 62eae905793e4f747a51653fd823fe7aba49a3c3 | 5b5f3fa6bf34408ca9afa035604a79cf19559304 | refs/heads/master | 2022-01-19T02:07:10.940300 | 2018-12-26T18:07:17 | 2018-12-26T18:07:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | #038- Aprimore a classe do exercício anterior para adicionar o método aumentarSalario (porcentualDeAumento) que aumente o salário do funcionário em uma certa porcentagem.
# Exemplo de uso:
# harry=funcionário("Harry",25000)
# harry.aumentarSalario(10)
class Funcionario:
nome = None
salario = None
tax ... | [
"astrodelta14@gmail.com"
] | astrodelta14@gmail.com |
46e1b390c4e8f62a880af59b8c029db26f3a94d9 | e0b5a869c687fea3c9dda138734d25b3c5e68b88 | /5. Inheritance/5.2 Exercises/Problem 2- Zoo/project/animal.py | 261c20dcaf8fa94f6ac665dceac99a882268cbda | [] | no_license | asen-krasimirov/Python-OOP-Course | b74de5f83fb3e287cb206d48c3db79d15657c902 | c6df3830168d8b8d780d4fb4ccfe67d1bb350f7e | refs/heads/main | 2023-02-01T04:09:33.796334 | 2020-12-15T14:56:59 | 2020-12-15T14:56:59 | 309,389,119 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py |
class Animal:
def __init__(self, name: str):
self.__name = name
@property
def name(self):
return self.__name
| [
"68907559+asen-krasimirov@users.noreply.github.com"
] | 68907559+asen-krasimirov@users.noreply.github.com |
9d9e3c36b558a527c58f312429f564e2c2aacc91 | c152ee1ffd2e4c4f3a2ff085517f0149cff87b23 | /eventex/subscriptions/views.py | 347a539a324a7294ca2ef3e76cb526f52e70c2de | [] | no_license | veridianamt/eventex | 3319dd1e5f58943ea0aca75f40933f8e5ee48527 | dca5e043459cc24dff21baaa73887e43a0f6ceec | refs/heads/master | 2021-01-21T18:34:05.146864 | 2018-01-25T18:18:56 | 2018-01-25T18:18:56 | 92,058,359 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,650 | py | from django.conf import settings
from django.core import mail
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render
from django.shortcuts import resolve_url as r
from django.template.loader import render_to_string
from eventex.subscriptions.forms import SubscriptionForm
from eventex... | [
"vmantecom@options.qss.com.br"
] | vmantecom@options.qss.com.br |
4258078d9866fd3462f783966f5dca8fe44371be | 6afe7ba26ed50d158110874cf3f9767f6a108d18 | /task_1_4.py | 4735518a6351831af7cad2435f40514696b1843e | [] | no_license | hejaziak/Regular-expression-to-NFA | 9603ded3b1459b6b17de838c410c2d101fc3d779 | f959fb0da21d2896ebee857cd201bac48765f3c6 | refs/heads/master | 2020-05-02T19:17:46.777728 | 2019-03-28T09:53:12 | 2019-03-28T09:53:12 | 178,155,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 694 | py | import argparse
import re
def task_1_4(args):
regex = re.compile("[123\+\-\*\/\.=]{2,4}")
output_file = open("task_1_4_result.txt","w+")
with open(args.file+"/task1_4.txt", "r") as file:
for line in file:
matches = regex.finditer(line)
if(matches):
for mat... | [
"atherkhalid158@gmail.com"
] | atherkhalid158@gmail.com |
1ed42624220a828e400ca519d611390d05b01c6f | 47c4e8c83d8c1e5f1093488b22ed1ecf27b29454 | /schoolmanager/enroll/admin.py | 641eb44c83656709f03774d021288c747b61f8bc | [] | no_license | sjbitcode/schoolmanager | 077a3295069e1b9e3494fbd7bfcae34d28d6a690 | 934d3cb1da99c746f15481fde2be25f78402c901 | refs/heads/master | 2021-01-11T18:10:17.990357 | 2017-01-20T00:53:23 | 2017-01-20T00:53:23 | 79,509,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | from django.contrib import admin
from .models import Student, Classroom, School
admin.site.register(Student)
admin.site.register(Classroom)
admin.site.register(School)
| [
"sjbitcode@gmail.com"
] | sjbitcode@gmail.com |
592bf6d633bee2449ba9302f858c095db9aac103 | 85153198367fc7df788d8732627041f43edad400 | /whoosh/example.py | d8a9b03ab86b28737484b67564f3b29159352bdd | [] | no_license | An0nYm0u5101/python_discover_search_engine | 823596089fc49cf7696e9ebcd3a0108f6715b603 | 1dbaca7792720d5e721155ac52f83b22013db4df | refs/heads/master | 2022-04-19T12:46:07.687022 | 2017-09-23T18:47:46 | 2017-09-23T18:47:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,748 | py | from whoosh import fields, index
from datetime import datetime
'''class whooshSCHEMA(fields.SchemaClass):
title = fields.TEXT(stored=True,sortable=True)
content = fields.TEXT(spelling=True)
date = fields.DATETIME(stored=True)
summary = fields.STORED
url=fields.ID(stored=True, unique=True))'''
WHOOSH_SCHEM... | [
"jmoc25@gmail.com"
] | jmoc25@gmail.com |
7645dc17368bfb6ea9d70b6b6796e5ba81bed16f | 7ec3d5ec9ca964c72479a8f9295bfddd82dc7ed8 | /chat.py | 517f15fe335d759b614401bf448f76d65a84f895 | [] | no_license | lucaskc/t2networks | 9a3946148b12e1ccf52fd4e14edf693833982256 | 8396a0bda6d16cfce2a50dba934e4ebf7d0cb6ce | refs/heads/master | 2021-01-10T18:50:06.542891 | 2016-04-16T01:10:00 | 2016-04-16T01:10:00 | 56,322,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,581 | py | # -*- coding: utf-8 -*-
"""
Chat Server
===========
This simple application uses WebSockets to run a primitive chat server.
"""
import os
import logging
import redis
import gevent
from flask import Flask, render_template
from flask_sockets import Sockets
REDIS_URL = os.environ['REDIS_URL']
REDIS_CHAN = 'chat'
app ... | [
"lucas.crocomo@gmail.com"
] | lucas.crocomo@gmail.com |
cded55579c0e4ece740a6d67c6ee740de3a1317a | e8cc093ce857f65882e25f4bfae94a395ffc2fe5 | /PESA-BACK/docs/urls.py | 5393afc48426f59a0119887f30be96b8a18658f7 | [] | no_license | mandelashaban593/Chatting-App | f6d0f7ac3785da690f52a7c1427353956699af4c | 0e6e5d9edb0a4f0c91a40391ae5916549e87ec7b | refs/heads/master | 2021-01-22T06:01:42.649403 | 2017-03-20T08:08:55 | 2017-03-20T08:08:55 | 92,512,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^$', 'docs.views.home', name='docs_home'),
url(r'^api$', 'docs.views.apidocs', name='apidocs'),
)
| [
"mandelashaban593@gmail.com"
] | mandelashaban593@gmail.com |
6ce2bc017407a86ee6b88e1ba18c45d91acd5dc8 | 195577cb8b2a0ecaf77f5bdaa318e3b57d20e090 | /torch/_C/_distributed_c10d.pyi | 708586a7bd1c5c09113ad95d4b02948b19072c73 | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | Hemantr05/pytorch | 747e0fd17dee1f8aa2a18707b1027786e1702f74 | cc9cb8286a0d7c7fae1097bf8273cc8c297cd01a | refs/heads/master | 2021-03-30T11:14:52.285048 | 2021-03-22T23:41:18 | 2021-03-22T23:41:18 | 248,046,669 | 0 | 0 | NOASSERTION | 2020-03-17T18:40:03 | 2020-03-17T18:40:03 | null | UTF-8 | Python | false | false | 9,014 | pyi | from torch import Tensor
from enum import Enum
from typing import Optional, List, Any, overload
from datetime import timedelta
# This module is defined in torch/csrc/distributed/c10d/init.cpp
_DEFAULT_FIRST_BUCKET_BYTES: int
_DEFAULT_NO_TIMEOUT: timedelta
class BuiltinCommHookType(Enum):
ALLREDUCE = ...
FP16... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
6000c38166aa34b4a4f88f0e2514bac752047095 | a508dec8ee78466f5a4598150c5bd2e960c67245 | /banking/migrations/0001_initial.py | b34c29ed3d2a802b6f2f0458ac9d8a16c2e1ee34 | [] | no_license | koffskeyj/Iron_Bank | 0c19ec54423fc53999bf304d705fdac0134de484 | 18afbd9323f8df16f57a2af8f90788ef2af52d2d | refs/heads/master | 2021-01-17T19:24:07.244331 | 2016-07-05T02:57:11 | 2016-07-05T02:57:11 | 61,582,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,225 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-20 20:09
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | [
"koffskeyj@gmail.com"
] | koffskeyj@gmail.com |
cc63467008ab0a8e13868fe769018dc8cba1852c | c1be2084053fdbe5804a12751b5a1fba8f86b30a | /contrib/seeds/generate-seeds.py | e09f271ba25bed2517e08bbec1cc3e7ba01564fb | [
"MIT"
] | permissive | LordSoylent/ZinniCoin | 76186400cc69b90cde61d5a574face34c3a43912 | 697eedf7def8423bb23ad6a5b16b44296e186ca2 | refs/heads/master | 2020-03-28T19:16:52.975219 | 2018-08-22T17:25:28 | 2018-08-22T17:25:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,327 | py | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | [
"root"
] | root |
d29985f01b3be9780b7cb8589a4cd0a905200a28 | a8904a94eaf1402fa2cd4dcc88ad2c87f3ce77de | /hfcs | 3f46f78622ad93806879663da66fe3a4fa3e11f3 | [
"Apache-2.0"
] | permissive | dbgdd/hifi-tutorial | cfaf3189b845f8c8bab9fcfaf4271fdf12a51478 | 4cb56bf5b83d1799dfad5ef75fe9ab9fd0453ebd | refs/heads/master | 2020-04-29T07:03:23.295097 | 2018-10-10T18:55:59 | 2018-10-10T18:55:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,741 | #!/usr/bin/env python
"""
This tool provides functionality to:
* Generate a content set directory that the High Fidelity domain server
and assignment clients can process.
* Copy the models.json.gz that your entity server is using back into the src
directory.
* Package the generated content set into a releasab... | [
"ryanhuffman@gmail.com"
] | ryanhuffman@gmail.com | |
a72386a31efdb6eab615e6b723aa396531289c9b | c1e1e1e510a9ef249857325295dae86c028e4185 | /Modules/resize_by_pad_or_crop.py | 67287bda35eddeb774e4c85b6d4a548e26bab773 | [] | no_license | templeblock/JPEG-reconstruction | bc6f67c01738895235ae135dca578e3c828fcbed | 4c59fb9745579056b63cada51b2df17ead002bb7 | refs/heads/master | 2020-07-03T11:53:07.181546 | 2019-06-14T22:21:06 | 2019-06-14T22:21:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 706 | py | import numpy as np
def resize_by_pad_or_crop(img, sz=[256,256], padVal=0):
X,Y = img.shape()
offx = abs(sz[0] - X)/2
offy = abs(sz[1] - Y)/2
print (X, Y)
print (offx, offy)
tmpx = np.zeros((sz[0], Y), dtype=np.uint8) + padVal
if X < sz[0]:
tmpx[floor(offx):-ceil(offx),:] = img[:,... | [
"ubuntu@ip-172-31-15-244.us-east-2.compute.internal"
] | ubuntu@ip-172-31-15-244.us-east-2.compute.internal |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.