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 220
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 257
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6e412c2830f0c0210c5542502eff73dfa2776a76 | 1b78ca7f3250ebed418717c6ea28b5a77367f1b8 | /411.minimum-unique-word-abbreviation/minimum-unique-word-abbreviation.py | 70887cecba089f780017d17a96ca6739c187979c | [] | no_license | JaniceLC/lc-all-solutions | ced854f31b94f44c0b03a0677988805e3b9ee718 | 3f2a4ee8c09a8890423c6a22c73f470eccf979a2 | refs/heads/master | 2020-04-05T19:53:31.307528 | 2018-11-12T04:18:45 | 2018-11-12T04:18:45 | 157,155,285 | 0 | 2 | null | 2018-11-12T04:13:22 | 2018-11-12T04:13:22 | null | UTF-8 | Python | false | false | 1,290 | py | class Solution(object):
def minAbbreviation(self, target, dictionary):
"""
:type target: str
:type dictionary: List[str]
:rtype: str
"""
def dfs(w, start, res):
res.append(w)
for i in xrange(start, len(w)):
for l in re... | [
"jedihy@yis-macbook-pro.local"
] | jedihy@yis-macbook-pro.local |
3330ec5ca7f6b0fb66c55b33c5965f82536c61ca | 72cbc497c1a36ad66cedaf6fd0a880ee331f11e7 | /uri-problem90-100.py | 2a28f871ddbca7d798ad7dff5b7bb15dfcbd4f3b | [] | no_license | Anik85/uri-begineer-solution-in-python | 9e53ce44109388f91596587f49a6c3657907c867 | 5b387c4efa007881dcc42e8bfd9e7974d2b123f3 | refs/heads/master | 2023-01-31T23:21:22.156292 | 2020-12-05T18:01:46 | 2020-12-05T18:01:46 | 291,981,824 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 595 | py | '''#just practice
digit={
"1": "one ",
"2": "two",
"3": "three",
"4": "four"
}
phone=input()
output=""
for ch in phone:
output += digit.get(ch,"!")+" "
print(output)
def function(N):
for i in range(1,N):
print(i,end=" ")
print(N)
N=int(input())
if 1<=N<=1000:
... | [
"noreply@github.com"
] | Anik85.noreply@github.com |
8cf1337f8036de2054ba11a4c1ef5921ff9e2863 | 641f76328bfeb7e54f0793a18c5b7c00595b98fd | /apps/goods/migrations/0015_auto_20181019_1007.py | a9bf43d5073534905d8a89c4b1ee68ce1ac10451 | [
"Apache-2.0"
] | permissive | lianxiaopang/camel-store-api | 1d16060af92eb01607757c0423377a8c94c3a726 | b8021250bf3d8cf7adc566deebdba55225148316 | refs/heads/master | 2020-12-29T13:23:18.118617 | 2020-02-09T08:38:53 | 2020-02-09T08:38:53 | 238,621,246 | 0 | 0 | Apache-2.0 | 2020-02-07T14:28:35 | 2020-02-06T06:17:47 | Python | UTF-8 | Python | false | false | 1,439 | py | # Generated by Django 2.1.2 on 2018-10-19 02:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('goods', '0014_auto_20181011_1646'),
]
operations = [
migrations.AlterModelOptions(
name='goodscategory',
options={'o... | [
"lyh@gzqichang.com"
] | lyh@gzqichang.com |
d01b1468d7aaf781d587e8b861611e92d26f28dd | e8f99a162207cba82d4e0f969d7bcdb2b9d8b522 | /imooc/python3_shizhan/ten/c1.py | 6a78a3e875eb35796ea35e07c606f9f44d0ef637 | [] | no_license | TesterCC/Python3Scripts | edb5446278ebf13edb64336001081941ca27d67d | 58be67e1ffc74ef50289a885aa4ad05f58e2c383 | refs/heads/master | 2023-08-30T21:16:38.328045 | 2023-08-17T11:23:08 | 2023-08-17T11:23:08 | 93,401,996 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'MFC'
__time__ = '18/5/2 21:48'
"""
第10章 正则表达式与JSON
正则表达式
JSON XML
正则表达式是一个特殊的字符序列,一个字符串是否与我们所设定的这样的字符序列相匹配。
快速检索文本、实现一些替换文本的操作
1.检查一串数字是否是电话号码
2.检测一个字符串是否符合email
3.把一个文本里指定的单词替换为另外一个单词
如果正则用的6,可以不用很多内置方法
"""
a = 'C|C++|Java|C#|Python|Javascript'
# Python... | [
"liyanxi07@gmail.com"
] | liyanxi07@gmail.com |
f6875d21a1e2ef9361652317b273c9e108e0d214 | e6452c8706e90638e31ad7d56e597d9ac51006ef | /urls.py | f75dab217c7b38fb7be8376d09d5fef5e4f01b74 | [] | no_license | gelliravi/Django-redis_auth | 23024602a3d45f48af6a8f4a96d7e1bc3e0a1ada | 93bf514613270565b35e01100e60ee46bf5bb5eb | refs/heads/master | 2021-01-01T19:56:21.890945 | 2012-04-20T00:13:44 | 2012-04-20T00:13:44 | 9,632,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'redis_auth.views.home', name='home'),
# url(r'^redis_auth/', include('redis_auth.foo.u... | [
"mark.vismonte@gmail.com"
] | mark.vismonte@gmail.com |
4314eb2e3669ee41547bd4d12cc4d8689c34d0aa | 74b65dee638e73b07032b4d26a9e0ce7a50b7ccc | /neural_network/network.py | a8d781a35c4b16245ae5b9b31c4d9c88e34b61b6 | [] | no_license | mpwillia/Tensorflow-Network-Experiments | 6aec1d0a645d18536f0293185be553d67b584ad6 | 6d43f9a71c0b80a4d634de812e5141a8b295a4f8 | refs/heads/master | 2021-01-11T16:23:44.949529 | 2017-04-27T23:10:06 | 2017-04-27T23:10:06 | 80,074,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 32,465 | py |
import tensorflow as tf
import tensorflow.contrib as tfc
import tensorflow.contrib.layers as tfcl
print("Using Tensorflow Version: {}".format(tf.__version__))
import numpy as np
import sys
import math
import random
import os
from functools import partial
from network_util import match_tensor_shape, batch_dataset,... | [
"mike@clwill.com"
] | mike@clwill.com |
8aa68c99463545c8c82d13104e1a46c6ea0065c7 | 07e12ec5f9b8eb898c0c7c67d1e0a50ea66ca14d | /clear.py | 3b56cdcc871c022a6484c208bf29a9e8f90d1f20 | [] | no_license | EzAccount/LBM | d14566511800a330c076d2d4642e740d9a45e36f | 8fd36968646335e3ed6389e50cdf1e4399eb167b | refs/heads/master | 2022-04-18T19:32:41.252861 | 2020-03-03T20:18:35 | 2020-03-03T20:18:35 | 139,371,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 64 | py | #! /usr/bin/python
import os
os.system("rm -rf results/*.dat");
| [
"misha7322@hotmail.com"
] | misha7322@hotmail.com |
b07084a05c9106fed5e9f3fceaf902363990afb6 | 50c668e9e0c10c1bcfd093b824e58ab66867cf30 | /17-POO-constructor/main.py | 3127bcbe5c9a58779b831af0c6c681b5e346165c | [] | no_license | bthecs/Python | 1d4e9f424fce633c2fe50455654b21a1e56b3a19 | b587f67bc6f999de4e80ebb53982430e48a68242 | refs/heads/master | 2023-03-29T00:40:36.071294 | 2021-03-30T00:31:34 | 2021-03-30T00:31:34 | 352,788,286 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | from coche import Coche
carro = Coche("Naranja","Gallardo","Ferrari",400,1000,2)
carro1 = Coche("Azul","Clio","Renault",400,1000,2)
carro2 = Coche("Blanco","Argo","Fiat",400,1000,2)
print(carro.getInfo())
print(carro1.getInfo())
print(carro2.getInfo())
#Detectar tipado
carro1 = "Perro"
if type(carro1) == Coche:
p... | [
"fl.gimenez@alumno.um.edu.ar"
] | fl.gimenez@alumno.um.edu.ar |
e5811eaa99eb0ea2a9e3f35b55128c42962f6ab6 | ffd1413f7ed9c78726addccb328a616e4c62a635 | /migrations/log_ignore.py | 53120ab5f78177fe275ba273fb81bd08b3a9d050 | [
"MIT"
] | permissive | NotSoPrivate/NotSoBot | 4be3fd33954830887e98f0abadb3df985f8ca917 | 75a30ead638f824035bc06d93a62ba726845ceaa | refs/heads/master | 2023-03-14T17:00:24.941399 | 2021-03-22T13:05:34 | 2021-03-22T13:05:34 | 350,292,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | import pymysql
import datetime
connection = pymysql.connect(host='localhost',
user='discord',
password='q3cnvtvWIy62BQlx',
db='discord',
charset='utf8mb4',
cursorclass=pymysq... | [
"root@mods.nyc"
] | root@mods.nyc |
c2f1bce72a4047a4cf454934f74b03c2b20d0bdf | 8fd6ee528f4699559174b80fe88965486a669523 | /Futu/trade/kline2.py | 813aa85eefbb631fe887752e027290544a784de6 | [] | no_license | aptentity/futu_quoter | 60ce51616b0c93e06beca4ce59a2d86641b75a7a | 78c7df1b3de25d605415f01b5bb6cf3f235ba6df | refs/heads/master | 2023-03-27T14:40:45.853176 | 2021-03-18T07:04:27 | 2021-03-18T07:04:27 | 328,276,512 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,033 | py | # -*- coding: utf-8 -*-
from pyecharts import options as opts
from pyecharts.charts import Kline
data = [
[2320.26, 2320.26, 2287.3, 2362.94],
[2300, 2291.3, 2288.26, 2308.38],
[2295.35, 2346.5, 2295.35, 2345.92],
[2347.22, 2358.98, 2337.35, 2363.8],
[2360.75, 2382.48, 2347.89, 2383.76],
[2383.... | [
"aptentity@163.com"
] | aptentity@163.com |
c38c19f67d976a9f4044f56d3cdcc1eb31710082 | c9cafe2123fd348174f36e110865dc7915c45a8f | /blog/models.py | 153ed935b43349f992606f862b716cf7eb37955c | [] | no_license | CESAREOMARIO/mi_segundo_blog | 899e11565d3f156a631e0f0de421ad476f1b2e7c | 229264b46435f20a9aa71ab17f73dd5f7ed9d44c | refs/heads/master | 2020-08-06T18:10:36.591464 | 2019-10-06T03:08:11 | 2019-10-06T03:08:11 | 213,102,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | from django.db import models
from django.utils import timezone
# Create your models here.
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(default=timezone.now)
publish... | [
"cguajardomur@gmail.com"
] | cguajardomur@gmail.com |
b4e2926b4134199eaadf96a67e52631ed4a9bbce | 427200bdf814d859665f449542fe6c9c1de5a96c | /doc/source/conf.py | a9715d0ad0714672009bacc401a85b5984fd9da9 | [
"BSD-3-Clause"
] | permissive | giltis/pyRafters | c54f6c4c8f02370ad168a3c90d1ce490077b5d78 | 94bf0e1d671ce58f6cbc09600e99a6d2a4b0127c | refs/heads/master | 2021-01-22T13:22:19.768905 | 2014-03-28T13:40:24 | 2014-03-28T13:40:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,737 | py | # -*- coding: utf-8 -*-
#
# PyLight documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 30 13:08:54 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | [
"tcaswell@bnl.gov"
] | tcaswell@bnl.gov |
d20052ac78b0218a2ba50a2894ff44eaf07bc208 | ec5b0e75b17489c264107ea5d9152ae3d2717a5b | /reconstructShamir.py | b7013b53463a4063bfd48e1614e7a31b49ab3ef1 | [] | no_license | taabishm2/Proactive-FDH-RSA-Signature | b3e571914bf22c6aa692f5ddd619fad4c54b96fe | 69f2889d4dc580b3a958dce75ff651f8cbb7c271 | refs/heads/master | 2020-05-07T18:46:21.694210 | 2019-07-24T15:23:14 | 2019-07-24T15:23:14 | 180,783,053 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | import fileOp
import RSAFeldmanVSS
def reconstruct_shamir(shares,i,t=0): #Do we have to mention which additive share these backups belong to? i.e. need for 'i'?
'''Verify first using VSS and then reconstruct, i is index of the additive share for vss_p, etc'''
vss_q = fileOp.read_list("FvssQ")[0]
vss_p = f... | [
"taabishm2@gmail.com"
] | taabishm2@gmail.com |
957a10da60dedb198e915925d91593a08f1c4fba | 67a94314b9a64078ac6463592555d80f1236a7e4 | /KNeighborsClassifier of my_eMeL/KNeighborsClassifier of my_eMeL.py | a60ed17817642c01e1f3e533f70f0e7254e4354c | [] | no_license | UlucFVardar/my_eMeL | b413b9171d7a599e358a16c836e7a4a2b05711e4 | 255fd6da0ff8ab3406af9b6bceecf746cc473f45 | refs/heads/master | 2020-04-23T12:32:36.667338 | 2019-03-01T21:07:21 | 2019-03-01T21:16:36 | 171,172,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,585 | py | #!/usr/bin/env python
# coding: utf-8
# ## Needed Libs
# For this lecture I started to develop a library.
# with using this lib all ML lecture can be coverted.
# with every assignment lib will grove
# In[1]:
import my_eMeL.my_eMeL as my_eMeL
import my_eMeL.data_loader as data_loader
# ### Reading data... | [
"ulucfurkanvardar@gmail.com"
] | ulucfurkanvardar@gmail.com |
a502baacd568f4ec8f715ef459a5d0689434064b | 5e557741c8867bca4c4bcf2d5e67409211d059a3 | /torch/distributed/elastic/agent/server/local_elastic_agent.py | c84df1a8e434267abf07aca90210e89b834c1b00 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | Pandinosaurus/pytorch | a2bb724cfc548f0f2278b5af2fd8b1d2758adb76 | bb8978f605e203fbb780f03010fefbece35ac51c | refs/heads/master | 2023-05-02T20:07:23.577610 | 2021-11-05T14:01:30 | 2021-11-05T14:04:40 | 119,666,381 | 2 | 0 | NOASSERTION | 2021-11-05T19:55:56 | 2018-01-31T09:37:34 | C++ | UTF-8 | Python | false | false | 9,100 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
import shutil
import signal
import tempfile
from typing import Any, Dict, Opti... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
197926393868d21e6ae154a9dd519b9c67bbad9c | cd014fae6791f51a9a382f34dbdcee6d61d84e30 | /64_eqf_fveqf_fvf_fvegf/64.py | 64fae91ef51cb384faf818ac502876f63733d358 | [
"Apache-2.0"
] | permissive | ckclark/Hackquest | 1505f50fc2c735db059205d1c9bbba1832cc5059 | 65ed5fd32e79906c0e36175bbd280d976c6134bd | refs/heads/master | 2021-01-16T19:32:29.434790 | 2015-09-29T13:39:04 | 2015-09-29T13:39:04 | 42,388,846 | 13 | 5 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | lines = [x.strip() for x in open('64.txt').readlines()]
for shift in [16]: #range(len(lines[0])):
out_graph = []
for line in lines:
out_line = []
for i in range(len(line) - shift):
if line[i] == line[i + shift]:
out_line.append(' ')
else:
o... | [
"clark.ck@gmail.com"
] | clark.ck@gmail.com |
5920ba78e09eb4f5be44b465dda4879c3b817140 | 1bfebc7e1c95cd3c25024b6b1adbf518e55513bf | /src/pykit/strutil/test/test_hex.py | 111d8a160a9a91f0c53b0653ae2f85d8536d8489 | [
"MIT"
] | permissive | bsc-s2/ops | a9a217a47dad558285ca8064fa29fdff10ab4ad7 | 6fb8ad758b328a445005627ac1e5736f17088cee | refs/heads/master | 2021-06-24T09:32:49.057026 | 2020-11-02T06:50:01 | 2020-11-02T06:50:01 | 123,527,739 | 8 | 0 | MIT | 2020-09-03T04:58:26 | 2018-03-02T03:54:20 | Python | UTF-8 | Python | false | false | 5,256 | py | #!/usr/bin/env python2
# coding: utf-8
import os
import unittest
from pykit import strutil
from pykit.strutil import Hex
from pykit import ututil
from pykit import utfjson
dd = ututil.dd
class TestHex(unittest.TestCase):
def test_init(self):
byte_length = 3
cases = (
(0, 0),
... | [
"drdr.xp@gmail.com"
] | drdr.xp@gmail.com |
a252840d3048e3d032bdb954edc31e7fcb80d614 | 4c444d7fd25c645cc48820fa103cad36ae963d81 | /django_demo/settings.py | 96a001869d4776c0b353dcde86f0a9a40cf8abc4 | [] | no_license | sanghee911/django-rest-api | 8fd1ecf95b0490244f9b09c61298e950f2af4696 | 1697b26abda0493383f19e69eff912c2d1eace48 | refs/heads/master | 2021-09-02T01:16:58.258065 | 2017-12-29T15:28:49 | 2017-12-29T15:28:49 | 113,106,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,970 | py | """
Django settings for django_demo project.
Generated by 'django-admin startproject' using Django 1.11.3.
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/
"""
impor... | [
"sanghee911@hotmail.com"
] | sanghee911@hotmail.com |
eee6d67932cc653ddbb810dc59c3e19fcdce12f3 | 8acb126606d430ae546fa13ebd3d6b8200b4a7d1 | /lib/modeling/DSN.py | e249291d12012b67211ec8f9a2dc6489dcc63073 | [
"MIT"
] | permissive | MeowMeowLady/InstanceSeg-Without-Voxelwise-Labeling | 7a3a65e2dc43d35655a1cd0bcc517038ace98923 | 5ac8ceb42d3c82b4c31871d14654e7444b3b1629 | refs/heads/master | 2020-08-22T06:44:16.602237 | 2020-04-20T15:07:53 | 2020-04-20T15:07:53 | 216,340,297 | 10 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,605 | py | # -*- coding: utf-8 -*-
"""
Created on 18-11-16 下午3:34
IDE PyCharm
@author: Meng Dong
"""
import torch
import torch.nn as nn
import torch.nn.functional as nnf
from core.config import cfg
class dsn_body(nn.Module):
def __init__(self):
super(dsn_body, self).__init__()
self.conv1a = nn.Conv3d(1, ... | [
"noreply@github.com"
] | MeowMeowLady.noreply@github.com |
b4b726de7dd2fe2197a67e6aa174fe63bd1eb9a1 | 1616557beba5f845fa909950f548254bb5e1a982 | /dictionary.py | 7ca13d0b34b96c4e7eb8940138988922fa388391 | [] | no_license | devendrasingh143/python | 8123a98b5bef93b53e4791a191eba25f4582d6a2 | 4ff6f30c48670dc96c73274615e0230cb7fbb49d | refs/heads/master | 2021-01-21T11:45:59.885607 | 2014-08-05T08:56:55 | 2014-08-05T08:56:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,394 | py | eng2sp = dict()
eng2sp['a', 's', 'd']=['z', 'x', 'c']
print(eng2sp)
eng2sp = dict()
eng2sp={'one': 'uno', 'two': 'dos', 'three': 'tres'}
print('\n')
print(eng2sp)
print(len(eng2sp)) #number of keys
print('one' in eng2sp) #it tells whether something appears as a key in the dictionary.
print('uno' in eng2sp)
vals = eng... | [
"deniedchrist.rathore5@gmail.com"
] | deniedchrist.rathore5@gmail.com |
9ecc842f23895f3713c99a55702174b7192797fa | 31e7aa5176876e6caf7ff9b37336b39292c9dd5b | /selfdrive/controls/lib/pathplanner.py | de43c041805990c89541efeab04f50f6241ea132 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | avolmensky/openpilot | 02d822f7eb50bb74368c794a3d580f95a53c2ca4 | dc61915529aabfad62061e784f277af311013cf1 | refs/heads/devel | 2021-12-15T01:43:10.994332 | 2020-02-14T01:30:43 | 2020-02-14T02:33:40 | 191,065,999 | 2 | 9 | MIT | 2019-06-26T10:13:29 | 2019-06-09T23:32:13 | C | UTF-8 | Python | false | false | 9,158 | py | import os
import math
from common.realtime import sec_since_boot, DT_MDL
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lane_planner import LanePlanner
from selfdrive.config import ... | [
"user@comma.ai"
] | user@comma.ai |
1175d5410bea7a625814a1ad364a134aea18001a | 64c491fbb983a2c35bc0a31e18b4797bf915525a | /search_folds.py | 59b231963c6acb5ad0e8e252a8fd773cfa350f26 | [
"MIT"
] | permissive | fabiohsmachado/bn_learning_milp | 75e7c9fd1486d46084c41db8bf11efb8650609da | 05ec0999969ac7c439c0cd881925399beef0613a | refs/heads/master | 2021-05-29T08:37:45.459331 | 2015-08-11T18:07:10 | 2015-08-11T18:07:10 | 33,931,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | import sys
from milp import ComputeMILP
def SearchFold(scoreFile, treewidth):
print "Managing dataset ", scoreFile;
ComputeMILP(scoreFile, treewidth);
print "Finished managing dataset", scoreFile, "with time.\n";
def SearchFolds(fileList, treewidth):
for scoreFile in fileList:
SearchFold(scoreFile, treewidth);... | [
"fabiohsmachado@gmail.com"
] | fabiohsmachado@gmail.com |
b2fcdf4b6dc405488bfc98d9ae9b64c0609f42ae | 9668a304a46a77eef55a6fb6e2a097049f088a9e | /newBlog/models.py | 58a613aa551dc436b8574e7c5ffd461ca5c8c5a3 | [] | no_license | AineKiraboMbabazi/Blog-Django | ce030b1786905ef044bf10bf4922c1d600a54529 | 6d72aec43effd453d198c079b30afa670c7c1c97 | refs/heads/master | 2021-06-23T06:09:26.704381 | 2019-03-19T09:50:35 | 2019-03-19T09:50:35 | 176,450,991 | 0 | 0 | null | 2021-06-10T21:17:05 | 2019-03-19T07:29:20 | Python | UTF-8 | Python | false | false | 578 | py | from django.db import models
# Create your models here.
from django.db import models
from django.utils import timezone
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
title = models.CharField(max_length=200)
description = models.TextField()
creation_date = m... | [
"miraqomambasa@gmail.com"
] | miraqomambasa@gmail.com |
28bae91f06a0f3667e8316de61e7ad47890a2a95 | 5000676812f8ede0beb861c185df67b862b5be55 | /src/get_reference_to_original_future_when_use_as_completed.py | 313c6d58c11264f80f3a58aa367e5972da4a74d1 | [] | no_license | oleyeye/python_code | 3cf3493dffcb23baa34deda083b488890e6cbf34 | 20ed14c5edfea4d156a5710f7f39bfdc10f2fdcc | refs/heads/master | 2020-04-17T10:41:16.573058 | 2019-01-19T05:51:54 | 2019-01-19T05:51:54 | 166,510,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 852 | py | import asyncio
async def coro(sec):
print(f'Coroutine {sec} is starting')
await asyncio.sleep(sec)
print(f'Coroutine {sec} is done')
return sec
async def main():
futures = {asyncio.ensure_future(coro(i)): f'item({i})' for i in range(1,5)}
for future in as_completed_hooked(futures.ke... | [
"tigerlee7@163.com"
] | tigerlee7@163.com |
f43198ced2fc10d9bb99c03a434993608a6a4df1 | e396c4a15caf661588cd73fdf1b46bfe7899d011 | /Machine_Learning/linear_regression.py | fa089096e9717dde9fea7985ea42bb99afd472d9 | [] | no_license | VictorGulart/DataScience | 42355bf7ce5b9e5e5f9d33238018b55a13620ceb | 62910b8b5f3651a2d5621767071dc1c388da0003 | refs/heads/master | 2023-08-12T13:27:07.552707 | 2021-10-13T18:01:14 | 2021-10-13T18:01:14 | 295,250,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,874 | py | import math
import numpy as np
from statistics import mean
import matplotlib.pyplot as plt
from matplotlib import style
style.use('fivethirtyeight')
'''
Defining my own liner regression algorithm
Linear Regression is basically the best fist line
-> applying linear algebra for Linear Regression
y = mx + b
m = ( ... | [
"aureumtempus@protonmail.com"
] | aureumtempus@protonmail.com |
8cb65e961c15c1d5dd99cefb8b667cdf46ad9471 | 8d2c2f2f80204c4d90ed691dc0c8ed148cbe20af | /code/defaults.py | 3d4f9dc1b8cfa1ce1bf13f88555bf351f55567d9 | [] | no_license | matttrd/information_sampler | 1dbf434622fd383a60b8f36a03a55c0681ef0cd2 | f2cdbd00a7828bdf526cf7b4869e0a899f559d2b | refs/heads/master | 2022-04-09T06:39:20.278305 | 2020-03-31T21:29:21 | 2020-03-31T21:29:21 | 176,366,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,526 | py |
SAVE_EPOCHS = [0,59,119,159]
TRAINING_DEFAULTS = {
'cifar10': {
#"epochs": 180,
#"b": 128,
"save_epochs" : SAVE_EPOCHS,
#"wd":5e-4,
#"lrs": '[[0,0.1],[60,0.02],[120,0.004],[160,0.0008]]'
},
'cifar100': {
"epochs": 180,
#"b": 128,
"save_epochs" ... | [
"matteoterzi.mt@gmail.com"
] | matteoterzi.mt@gmail.com |
d90bbf146be2cf8d882bcac5844e04533816c778 | 4b40d911e2b3109717463437c9740f06eea9f4ce | /weighted_lottery.py | 01696a38a194a2976223d334869a71cc1c683bf8 | [] | no_license | Code-JD/Python_Exercises_Notes | 94eaba8716306324ad424d085c072e2f278a0ddd | b83b8391375eea6e8ea0a9ed17a635b370c2054f | refs/heads/master | 2020-09-19T20:34:51.478650 | 2020-01-22T02:25:22 | 2020-01-22T02:25:22 | 224,291,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | # import numpy as np
# def weighted_lottery(weights):
# container_list = []
# for (name, weight) in weights.items():
# for _ in range(weight):
# container_list.append(name)
# return np.random.choice(container_list)
# weights = {
# 'winning': 1,
# 'losing': 1000
# }
# print(weigh... | [
"jonathan.d.herring@gmail.com"
] | jonathan.d.herring@gmail.com |
b336e9d406c8e195778f6588752748e100d7e6b6 | 97445678c009b02a32975abd464ca03216d185ef | /django_practice_2/load_initial_data_2.py | 93e08008fda1d6c77d9d8b50739e4a48a14b268d | [] | no_license | jwinf843/wdc-django-practice-2 | edca54cf43c7f8926b85fddc867937acfafb68a7 | c26d9a1818a2b624e409b09f82cc29b24a300d3c | refs/heads/master | 2020-03-15T09:22:27.417114 | 2018-05-06T14:18:45 | 2018-05-06T14:18:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | import django
def main():
django.setup()
from artists.models import Artist
from django.contrib.auth.models import User
User.objects.all().delete()
Artist.objects.all().delete()
User.objects.create_superuser(
username='admin', email='admin@example.com', password='admin')
ARTISTS... | [
"zugnoni.ivan@gmail.com"
] | zugnoni.ivan@gmail.com |
33570dc3d1b45740d29e24bcb7b74956bd79dec5 | fa5006f55b612d22e8d69a006065ac0eca8fccc6 | /track.py | dd87681e917f76cd260e82e9f6337a38c3a05d3d | [] | no_license | Arrowana/vroom | 3bbc7a00c1eccbd41c6a6813e862837342ee9289 | fb70b81e927373e96dd433718073044912eed3f1 | refs/heads/master | 2021-01-12T10:41:48.208368 | 2016-11-06T10:22:14 | 2016-11-06T10:22:14 | 72,621,878 | 0 | 0 | null | 2016-11-06T10:32:19 | 2016-11-02T09:00:37 | Python | UTF-8 | Python | false | false | 3,002 | py | from matplotlib import pyplot as plt
from random import random
import math
import numpy
import pdb
def convex_hull(points_input):
points = points_input[:]
points = sorted(points, key=lambda x: x[0])
print(points)
U=[]
L=[]
def cross_product(o, a, b):
return (a[0] - o[0])*(b[1] - o[1]... | [
"pierre.duval@gadz.org"
] | pierre.duval@gadz.org |
531af58373c2595fa690550bdb0e1fe88237820e | 13c5a070c180a7cdac899ee40e094896694becfa | /employeeproject/employeeproject/settings.py | f0c7ff6f25cd46f51a6470d818e90333fa02f751 | [
"Apache-2.0"
] | permissive | cs-fullstack-2019-spring/django-formclassv2-cw-clyde5649 | 3a0c87be10b961b5c6b90759bfd65f1e1dc3be43 | 4986a3145c2b06d309ac9c2ebf9231b83bf3c279 | refs/heads/master | 2020-04-25T17:28:40.551451 | 2019-03-01T20:05:36 | 2019-03-01T20:05:36 | 172,949,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,130 | py | """
Django settings for employeeproject project.
Generated by 'django-admin startproject' using Django 2.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
impo... | [
"clyde.bledsoe@yahoo.com"
] | clyde.bledsoe@yahoo.com |
331c011eaa5c5078287cccdaa9759838135b7f83 | a81ab54706f673f17abaf979d30eff2c08b5cf7b | /scripts/handle_path.py | e87634523705da2bff9e20cb1f1fe90a8a8ddab7 | [] | no_license | yhusr/future | af1feff82dc70f904ee23590ebdc09a5801eeb85 | 250f6fa1817b3cbbf46672b629cd2b0c7d590692 | refs/heads/master | 2021-06-26T01:42:00.520164 | 2021-04-05T13:39:13 | 2021-04-05T13:39:13 | 225,109,578 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 872 | py | """
Time:2019/11/17 0017
"""
import os
# 获取根目录路径
BASEPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 获取配置文件目录
CONFIGPATH = os.path.join(BASEPATH, 'configs')
# 获取配置文件的具体路径
YAMLPATH = os.path.join(CONFIGPATH, 'casesconf.yaml')
# 获取excel的data路径
DATAPATH = os.path.join(BASEPATH, 'datas')
# 获取excel... | [
"904239064@qq.com"
] | 904239064@qq.com |
4325bb0a9a24eb4fd75d2dd52a78330a20b42d2b | 3ca599bf6998f36e283f2024e8869a233931a965 | /lib/output.py | 8b74b540821afbeabbb430a110794eb7ec52133f | [
"BSD-2-Clause"
] | permissive | johnjohnsp1/mesc | 6b23ba0b208c084cb926ff7631087afea825a24b | bfc3a0e5d710f586ea75a9d23a29cd8f2307d500 | refs/heads/master | 2020-12-25T23:46:51.436435 | 2014-11-13T21:53:03 | 2014-11-13T21:53:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__ = """
███╗ ███╗███████╗███████╗ ██████╗
████╗ ████║██╔════╝██╔════╝██╔════╝
██╔████╔██║█████╗ ███████╗██║
██║╚██╔╝██║██╔══╝ ╚════██║██║
██║ ╚═╝ ██║███████╗███████║╚██████╗
╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝
MESC: Minimun Essential Security Checks
Author... | [
"miguel.morillo@gmail.com"
] | miguel.morillo@gmail.com |
ea9891c42ef6fc7f1ca7896c9b1e6aadd4fe3db7 | 38221ca553059a83ed8f64e2cb25181ed88da275 | /deeppavlov/models/spelling_correction/levenstein/tabled_trie.py | 502376482ef26e8fc4feca5ddd880788e9dcc39f | [
"Apache-2.0",
"Python-2.0"
] | permissive | stenpiren/DeepPavlov | 7153ce828225d9d1fdf1c171794efe463f2e9dea | fe59facab4854f2fe56ed126e27eb9696ad6dfd8 | refs/heads/master | 2020-03-23T10:08:53.962961 | 2018-07-16T22:10:17 | 2018-07-16T22:10:17 | 141,427,836 | 1 | 0 | Apache-2.0 | 2018-07-18T11:50:30 | 2018-07-18T11:50:30 | null | UTF-8 | Python | false | false | 19,969 | py | import copy
from collections import defaultdict
import numpy as np
class Trie:
"""
Реализация префиксного бора (точнее, корневого направленного ациклического графа)
Атрибуты
--------
alphabet: list, алфавит
alphabet_codes: dict, словарь символ:код
compressed: bool, индикатор сжатия
c... | [
"seliverstov.a@gmail.com"
] | seliverstov.a@gmail.com |
50b28d0ed7daa7be97decf477b846c80cd2df47e | 4f0385a90230c0fe808e8672bb5b8abcceb43783 | /框架/crawler/scrapy/scrapy_demo/scrapy_demo/spiders/quotes.py | 8c9928611b92d882b2c0eebf7d5163ee20e145da | [] | no_license | lincappu/pycharmlearningproject | 4084dab7adde01db9fa82a12769a67e8b26b3382 | b501523e417b61373688ba12f11b384166baf489 | refs/heads/master | 2023-07-10T05:21:15.163393 | 2023-06-29T14:02:35 | 2023-06-29T14:02:35 | 113,925,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,268 | py | # -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
import scrapy
from scrapy_demo import items
from scrapy_demo import settings
import scrapy.settings
from scrapy.mail import MailSender
# 这是最普通的爬虫形式,
# class QuotesSpider... | [
"lincappu@163.com"
] | lincappu@163.com |
fde9e29a1d3f8167b29c9268be16769f23716b6f | d0c88770cac95cf837dc7ea33eb41c84588c5ee5 | /game/collision.py | 505730b4ac90102d2822809099a4ac2d83f0c024 | [] | no_license | bmaclean/ascii-zoo | bf671a49a529c9b5a57ca2710cbd3fc044d3b059 | 16e5a27f3a3d74a162b6cad2c01fff2a916444a3 | refs/heads/master | 2022-07-27T21:34:38.437654 | 2019-05-30T19:41:23 | 2019-05-30T19:41:23 | 159,284,851 | 0 | 0 | null | 2022-06-21T21:40:43 | 2018-11-27T06:08:58 | Python | UTF-8 | Python | false | false | 785 | py | import os
from app_config import root_dir
import pygame
class Collision:
sound_filepath = os.path.join(root_dir, 'assets/zapsplat_cartoon_punch_002_17900.wav')
sound = pygame.mixer.Sound(sound_filepath)
def __init__(self, animal1, animal2):
self.animal1 = animal1
self.animal2 = animal2
... | [
"brendan.maclean94@gmail.com"
] | brendan.maclean94@gmail.com |
fcd8de835cfb135f10a819e6fd43dbc457b9f1eb | 78c110eaf5b3b89a8d609e5b9d01aeec2c86d781 | /03_multidimensional_lists/2021.02_multidimensional_lists_lab/01_Sum Matrix Elements.py | 6036f2771433e15cbf45eff8c0a548d4da986bf4 | [] | no_license | NPencheva/Python_Advanced_Preparation | 08c42db6fdecae92b12c335d689433eaaa43e182 | beee92a4e39538e873936140840a09f770ae7aeb | refs/heads/master | 2023-03-02T16:35:05.045227 | 2021-02-10T21:35:29 | 2021-02-10T21:35:29 | 332,894,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | number_of_rows, number_of_columns = [int(x) for x in input().split(", ")]
matrix = []
matrix_sum = 0
for row_index in range(number_of_rows):
row = [int(y) for y in input().split(", ")]
matrix.append(row)
for index in matrix:
matrix_sum += sum(index)
print(matrix_sum)
print(matrix)
| [
"nvpencheva@gmail.com"
] | nvpencheva@gmail.com |
ec31acbdb0cf41622d1a325d3f894382ad8fd78f | d4fa331d7d8a00865f99ee2c05ec8efc0468fb63 | /alg/remove_k_digits.py | f25427c08b7db78277402c25b6aa25fed1054238 | [] | no_license | nyannko/leetcode-python | 5342620c789a02c7ae3478d7ecf149b640779932 | f234bd7b62cb7bc2150faa764bf05a9095e19192 | refs/heads/master | 2021-08-11T04:11:00.715244 | 2019-02-05T15:26:43 | 2019-02-05T15:26:43 | 145,757,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | class Solution(object):
def removeKdigits(self, num, k):
"""
:type num: str
:type k: int
:rtype: str
"""
if len(num) <= k:
return '0'
stack = []
for i in num:
while stack and k > 0 and stack[-1] > i:
stack.pop()... | [
"9638293+nyannko@users.noreply.github.com"
] | 9638293+nyannko@users.noreply.github.com |
1f97596a4534396f4848c29caeee8100eb7f788e | de1abd0ebbb817aa5f23d369e7dda360fd6f1c32 | /chapter3/scrapy/wikiSpider/wikiSpider/settings.py | 9bf879252847b3f89efa7323e1c40f4f86ae3b30 | [] | no_license | CodedQuen/Web-Scraping-with-Python- | 33aaa2e3733aa1f2b8c7a533d74f5d08ac868197 | 67f2d5f57726d5a943f5f044480e68c36076965b | refs/heads/master | 2022-06-13T01:34:39.764531 | 2020-05-05T11:07:01 | 2020-05-05T11:07:01 | 261,435,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,258 | py | # -*- coding: utf-8 -*-
# Scrapy settings for wikiSpider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.or... | [
"noreply@github.com"
] | CodedQuen.noreply@github.com |
a334a0c204fac1c32004bf0b488df99ca06cd6c8 | fdb91a44b774edb78ec904e2a76edd60b3aac528 | /ex25.py | 6db1261d6f3604391723219fe40743dc1a5979f9 | [] | no_license | xia0m/LPTHW | 9447cdff2a84f2a867f34d6b3b2e9d4b46bf3c0a | 4f23b0e60d2e2e38d8f989a3a7f616c6c5e90c1d | refs/heads/master | 2020-05-14T14:26:36.742772 | 2019-04-22T06:12:09 | 2019-04-22T06:12:09 | 181,833,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,392 | py | def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Worts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print(word)
def print_las... | [
"alexma325@gmail.com"
] | alexma325@gmail.com |
b63224119f103400cd98d53d767ebf99d1f01f61 | ba921a5286df9a2d1c66f28a8bcdd6a60eb0eb0b | /organization/migrations/0001_initial.py | 8f3b08e33973e47dd94562ef85c7ef68c20e56ef | [] | no_license | Shaurya9923/Hackathon-Case-Management-System | 33b3ae97582f9553d11df1f11c2970d07d03f5c5 | 6eb782d6e665260cb2abb795370ea58b5764f0c3 | refs/heads/main | 2023-02-15T22:18:23.751424 | 2021-01-03T11:08:24 | 2021-01-03T11:08:24 | 326,386,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py | # Generated by Django 3.0.8 on 2020-07-24 14:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='organiation',
fields=[
... | [
"shauryamehta9923@gmail.com"
] | shauryamehta9923@gmail.com |
ba1cba5c8a2a1b7898a46fb6a4abeebd84541336 | 51885da54b320351bfea42c7dd629f41985454cd | /abc075/c.py | 18f98c98169acb0c09d089c7c2b89ef4b8bc0bd0 | [] | no_license | mskt4440/AtCoder | dd266247205faeda468f911bff279a792eef5113 | f22702e3932e129a13f0683e91e5cc1a0a99c8d5 | refs/heads/master | 2021-12-15T10:21:31.036601 | 2021-12-14T08:19:11 | 2021-12-14T08:19:11 | 185,161,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,777 | py | #
# abc075 c
#
import sys
from io import StringIO
import unittest
from collections import deque
class TestClass(unittest.TestCase):
def assertIO(self, input, output):
stdout, stdin = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(input)
resolve()
sys.stdout.seek... | [
"mskt4440@gmail.com"
] | mskt4440@gmail.com |
5a53f221c372ba4f516ce29fa0811152cfe05e26 | 7cbd54c390f57982bb0f81ae67351cf512f08ad1 | /Scripts/Sims/SLiM/PopExpansion/PopExpansionChangedRecRate/simulate_treeseqPopExpansionNeutral.py | dec79a1f2309f84c4393c9b714464ef20d8570d5 | [] | no_license | dortegadelv/HaplotypeDFEStandingVariation | ee9eaa9a44169523349bef09d836913221bf24cb | eb196acf6bbaa43f475f132b667f0f74b6f7cee4 | refs/heads/master | 2022-05-25T03:47:39.948444 | 2022-03-07T22:41:15 | 2022-03-07T22:41:15 | 108,029,910 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,624 | py | #! /usr/bin/env python3
import gzip
import numpy as np
import sys
import argparse
import os
def read_boundaries_as_dict():
bounds = gzip.open('./annotations/hg19.recomb.boundaries.txt.gz')
bounds = bounds.readlines()
bounds = [x.decode('utf_8').strip('\n').split(' ') for x in bounds]
bounds = [[x[0], ... | [
"gochambas@gmail.com"
] | gochambas@gmail.com |
316dbf8c733316c4baf8d3471c2d9aaf98e2ff79 | 85fdf45f4047e78bc92818debd69c8795aa31ce9 | /home/api_1_0/verify_code.py | abb9d7a6647b5f23ba1b62116e8d98300e954f4c | [] | no_license | Lgvcc/iHome | 15cfe3891216f7c7b848e57f2a5c9a680df54024 | 71484600bb49459cf1fc79a8b87924ce9051b8f6 | refs/heads/master | 2020-06-15T22:44:30.206382 | 2019-07-09T15:44:18 | 2019-07-09T15:44:18 | 195,411,768 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | # coding:utf-8
from flask import current_app, jsonify, make_response
from . import api
from home.utils.captcha import captcha
from home import redis_store
from home.constants import REDIS_IMAGE_CODE_EXPIRE
from home.utils.response_code import RET
@api.route('/image_codes/<image_code_id>')
def get_image_code(image_co... | [
"18790334713@163.com"
] | 18790334713@163.com |
2e520ceaa6db8cdadf3aa8bd40a79b659dd16308 | 2c318438747613034dfb4c3f9099fba1c3c98d30 | /run.py | f1a9f2fa006080e4b2d9a83ef9ff3e719c6e9bcf | [] | no_license | wycstar/bthub_all | 674e00239993b636c3af4d2937a73639c5859c38 | 96f1b2adc00e0515dedfe9f9b65624b0b5203ae4 | refs/heads/master | 2021-07-03T23:19:55.083423 | 2017-09-26T11:29:30 | 2017-09-26T11:29:30 | 103,232,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | #!/usr/bin/env python
# -*-coding:utf-8 -*-
from spider import Master
from spider import DHTServer
from server import SITE, SERVER
from db import DataProcess
if __name__ == '__main__':
q = DataProcess()
q.start()
# master = Master()
# master.start()
# dht = DHTServer(master, "0.0.0.0", 6881, max_... | [
"wycstar@live.com"
] | wycstar@live.com |
70e19baa27259958c38615665bee3f6c8ac77d48 | b8cc6d34ad44bf5c28fcca9e0df01d9ebe0ee339 | /入门学习/threading_dead_lock-eg.py | 277a2b79b337003460067bedae3cb0eeca00cd29 | [] | no_license | python-yc/pycharm_script | ae0e72898ef44a9de47e7548170a030c0a752eb5 | c8947849090c71e131df5dc32173ebe9754df951 | refs/heads/master | 2023-01-05T06:16:33.857668 | 2020-10-31T08:09:53 | 2020-10-31T08:09:53 | 296,778,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,591 | py | """
import threading
import time
lock_1 = threading.Lock()
lock_2 = threading.Lock()
def func_1():
print("func_1 starting......")
lock_1.acquire()
print("func_1 申请了 lock 1 ......")
time.sleep(2)
print("func_1 等待 lock_2 .......")
lock_2.acquire()
print("func_1 申请了 lock 2 ......")
lock_... | [
"15655982512.com"
] | 15655982512.com |
190447cb8c2132b958f9feca6996e737c0772f08 | bb22780e26ec87baa3e9e61efe3dfc5b904f853f | /test.py | 50df2505fe1bc7715148f2e8f15e0b8398148365 | [] | no_license | evelinamorim/wordembedding | 12f0fb5b32c520b33c34283d6d23b83e831374d0 | 8ea8f483973781132e16d66a029f5c993d15e30b | refs/heads/master | 2016-09-06T19:42:00.262270 | 2015-08-06T21:34:05 | 2015-08-06T21:34:05 | 32,351,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,105 | py | import sys
import gensim
import time
class ReadCorpus:
"""
Read corpus for some tasks. Nowadays, there is only two corpus:
* MSR: research.microsoft.com/en-us/
projects/rnn/
* Google: code.google.com/p/word2vec/source/
browse/trunk/questions-words.txt
"""
def __init__(... | [
"evelin.amorim@hera.speed.dcc.ufmg.br"
] | evelin.amorim@hera.speed.dcc.ufmg.br |
fc636c063c6ddb1fa97d59630f452e3e84f662d4 | b51fcf9d94ad483139d5e5f17785f7dcb39404ae | /mdl/Guideline36Spring/QSS/run.py | d214ff42afa470f3d1f0bc98d8708f2972f25000 | [] | no_license | NREL/SOEP-QSS-Test | 7d508f79dd3a49b609e6400b8c5a05757cb22928 | bd8e3c39d0a205b7b3cf3c64bc2c500e761a76e8 | refs/heads/main | 2023-08-30T21:23:53.766525 | 2023-08-30T03:02:11 | 2023-08-30T03:02:11 | 97,882,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | #!/usr/bin/env python
import subprocess, sys
args = ' --zrFac=1000 --dtND=1e-4 --dtInf=0.001 --dtOut=100 --out=sSXL ' + ' '.join( sys.argv[1:] )
with open( 'run.log', 'w' ) as log:
subprocess.run( 'run_QSS.py' + args, stdout = log, stderr = subprocess.STDOUT, shell = True )
| [
"Stuart_Mentzer@objexx.com"
] | Stuart_Mentzer@objexx.com |
90d662d9b82ee1a8490bdc09aa96fc25d2c0ce6e | 832852c679816673f708860929a36a20ca8d3e32 | /Configurations/HighMass/Full2017/configuration_mm.py | 1ee0bb7d5dbf9cfab8779a7973ed2065f8bd52d3 | [] | no_license | UniMiBAnalyses/PlotsConfigurations | c4ec7376e2757b838930dfb2615e1dc99a64e542 | 578fe518cfc608169d3418bcb63a8342d3a24390 | refs/heads/master | 2023-08-31T17:57:45.396325 | 2022-09-01T10:13:14 | 2022-09-01T10:13:14 | 172,092,793 | 0 | 13 | null | 2023-04-27T10:26:52 | 2019-02-22T15:52:44 | Python | UTF-8 | Python | false | false | 905 | py | # example of configuration file
treeName= 'Events'
tag = 'Full2017_mm'
# used by mkShape to define output directory for root files
outputDir = 'rootFile_'+tag
# file with TTree aliases
aliasesFile = 'aliases.py'
# file with list of variables
variablesFile = 'variables.py'
# file with list of cuts
cutsFile = 'cut... | [
"dennis.roy@cern.ch"
] | dennis.roy@cern.ch |
d6e82d1a43184d0b47aeb99ebe45b7630327dd6a | 28e0e93f853e4d7f99edbbb83ceb91e4e2b50256 | /src/rules.py | 41746d9b1dac61ea2264e997bbefbbd865e1579b | [
"MIT"
] | permissive | harry-124/sbsim-19 | fe2fbfa5cf84b1e75190d0f1213169d654289dcf | d70f3d0caa6daa1db038c83c03cea215b49afb98 | refs/heads/master | 2020-07-23T15:06:25.113554 | 2020-01-28T16:55:43 | 2020-01-28T16:55:43 | 207,603,896 | 0 | 0 | MIT | 2020-01-28T16:55:44 | 2019-09-10T16:04:04 | Python | UTF-8 | Python | false | false | 2,910 | py | #!/usr/bin/env python
import sys
import physics as p
import pygame as pg
import pid
import rospy
import math as m
from geometry_msgs.msg import Pose, Twist
from sbsim.msg import goalmsg
from sbsim.msg import dribble
import controller as c
from std_msgs.msg import Int32
from std_msgs.msg import Float64
r10 = Pose()
r11... | [
"srike27@gmail.com"
] | srike27@gmail.com |
6127e057f7dff15cd81fd6834820cf5db6e6a872 | 5f123b35d63e60982b0d034c40614ea1d8f288a4 | /AndroidGuard/examples/omegacodee.py | addf94b6452ab83bbc81e581f64a8a6c0efe85a8 | [
"Apache-2.0"
] | permissive | Simplewyl2000/Similarity_Detection | 2f5d76d8b50474bb226a4ea524f97c504aa1b2ac | 9018c120cb4023a24de8032e8aa7d55cf42f2446 | refs/heads/master | 2020-05-22T23:37:39.885251 | 2019-05-10T03:13:29 | 2019-05-10T03:16:31 | 186,562,541 | 0 | 0 | null | 2019-05-14T06:52:18 | 2019-05-14T06:52:17 | null | UTF-8 | Python | false | false | 909 | py | import os
import numpy
file1="omegafrequency.txt"
file=open(file1,'r')
listomega=[]
listfrequency=[]
for eachline in file:
temp=eachline.strip('\n').strip("['").strip("]").split("',")
#print(temp)
listomega.append(int(temp[0]))
listfrequency.append(temp[1])
#print(istomega)
for j in listomega:
... | [
"734966463@qq.com"
] | 734966463@qq.com |
ccf9c467b82d8823d29085edb6e3716535af8ad0 | 69f631bb9f2f1b48fd06eb57a6647dcc403addf2 | /Face_Mask_Model.py | 7815039579c6fbf18f26265e16a9eb544b1aee43 | [
"MIT"
] | permissive | Mridul20/Face-Mask-Detector | 75436c552acb35426360a56fbe108f805a061a51 | 3cc9b42fb2ced83710814334308c258e1bb04770 | refs/heads/main | 2023-02-02T10:15:30.694803 | 2020-12-19T18:53:52 | 2020-12-19T18:53:52 | 322,915,678 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,598 | py | #!/usr/bin/env python
# coding: utf-8
# <a href="https://colab.research.google.com/github/aarpit1010/Real-Time-Face-Mask-Detector/blob/master/Face_Mask_Model.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# In[1]:
# IMPORTING THE REQUIRED LIBRAR... | [
"mridulmittal20@gmail.com"
] | mridulmittal20@gmail.com |
cb7c05a54a44455c1eaa0a2c45bd633da858aa80 | 14bcdb37b818638fc9d6f2f4e4595c82685b8972 | /network_visualizer.py | 86481484d4093c96de66a95989456e0350b7778d | [] | no_license | shainesh77/Testing | 7e8b3cd135b722d8bff1ef29eedebfd862c954b5 | 45f593871657c57de4981512dcd2f6a841eb78d5 | refs/heads/main | 2023-07-13T23:56:10.835377 | 2021-08-18T12:19:35 | 2021-08-18T12:19:35 | 397,588,629 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | import os
from keras.engine.topology import InputLayer
from keras.models import Model
from keras.layers import Conv2D
from flask import Flask, jsonify, send_from_directory
from src.game_environment import GameEnvironment
from src.state_machine_game_environment import StateMachineGameEnvironment
import src.model_util ... | [
"noreply@github.com"
] | shainesh77.noreply@github.com |
41e4fc4f2a66d20510bcfed184eb34f465362860 | d1a7dcd0ffacd057dc09b19766d96db8d54334bf | /HW2/code/linear_regression/main_poly_model_selection.py | a37292c5e3221848fe63f402a6a816fb0d8bdd2e | [] | no_license | brg3n3r/ComputationalIntelligenceUE | d64ff3435258a085dacbd6bbbe90ee6abfea8d6a | 86db363d8132ceea30a696abc6e28983f8556927 | refs/heads/master | 2021-05-24T14:06:50.633304 | 2020-06-30T14:55:54 | 2020-06-30T14:55:54 | 253,597,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | #!/usr/bin/env python
import numpy as np
import json
import matplotlib.pyplot as plt
from plot_poly import plot_poly, plot_errors
import poly
#!!! import os
"""
Assignment: Linear and Logistic Regression
Section: Linear Regression with polynomial features
This file:
1) loads the data from 'data_linreg.... | [
"maxbuergener@me.com"
] | maxbuergener@me.com |
e1c8772a70ff0b7a5ead0b6c73d8adda9807dd1a | 28c598bf75f3ab287697c7f0ff1fb13bebb7cf75 | /testgame.mmo/genesis/spawn/spawnmain.py | d1a6e96ee033931ad1e1cf4df3507ff6d4965fc9 | [] | no_license | keaysma/solinia_depreciated | 4cb8811df4427261960af375cf749903d0ca6bd1 | 4c265449a5e9ca91f7acf7ac05cd9ff2949214ac | refs/heads/master | 2020-03-25T13:08:33.913231 | 2014-09-12T08:23:26 | 2014-09-12T08:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py |
import races
import animal
import npc
"""
#Critter Pack
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import critters
"""
#Monster Pack Examples
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import monsters
"""
Mythical Creature Pack Examples
http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#im... | [
"mixxit@soliniaonline.com"
] | mixxit@soliniaonline.com |
be9ff97e74554405f78e2ae14f59d41d20871ca0 | fd5de9c7489f38eae683582b0476a7685b09540a | /config.py | 5c7740e6edfd8adda65027b1b6ac8137b8a88701 | [] | no_license | FrankArchive/ICPC_Challenges | 8cdf979909014345c9e1198e82fce55eaa65a186 | 366c631c3464f4348c4cb07c4ff425640f84fe71 | refs/heads/master | 2022-03-01T11:53:11.326549 | 2019-09-19T05:49:14 | 2019-09-19T05:49:14 | 201,845,208 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | import os
JUDGE_ADDR = os.getenv('JUDGE_ADDR') or 'localhost'
JUDGE_PORT = os.getenv('JUDGE_PORT') or '5000'
JUDGE_PORT = int(JUDGE_PORT)
JUDGE_TOKEN = os.getenv('JUDGE_TOKEN') or 'set_token'
| [
"frankli0324@hotmail.com"
] | frankli0324@hotmail.com |
f0db0d024328299a986df6e4bece188d36f970c2 | 92f9fd4397d88619073c17174f3d52f5f489d4e4 | /contrib/devtools/fix-copyright-headers.py | b87a96eb6f4f577fc786621653ac85686017456e | [
"LicenseRef-scancode-other-permissive",
"MIT"
] | permissive | diablax2/bts | 380df7562d73a292e641faaff1b0d1e17a10f0a8 | fe3c727ce607e11bee64bb03afadb653e9bd23fd | refs/heads/master | 2020-04-24T21:57:40.173603 | 2019-02-25T06:33:48 | 2019-02-25T06:33:48 | 172,295,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | #!/usr/bin/env python
'''
Run this script to update all the copyright headers of files
that were changed this year.
For example:
// Copyright (c) 2009-2012 The Bitcoin Core developers
it will change it to
// Copyright (c) 2009-2015 The Bitcoin Core developers
'''
import os
import time
import re
year = time.gmtime(... | [
"47169271+BitcoinSDN@users.noreply.github.com"
] | 47169271+BitcoinSDN@users.noreply.github.com |
a56a7a18cf5105747b45d3be8f72ba207bc8a2d8 | eb7e4b062b7fc9c6434bed24f8f9c65c96df7914 | /filesort.py | bcaf483272d37b9eb192e993c56331c86ed47985 | [] | no_license | kitizl/FileSorterPy | 0ff545b32130e348be821263fae2613d58a753a4 | 5c386d40dff4ca3a2b0ef8009ae24c6874d1fa90 | refs/heads/master | 2020-03-27T13:23:18.384074 | 2018-08-29T17:04:39 | 2018-08-29T17:04:39 | 146,606,133 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | #!python3
import os
import sys
import re
import glob
import shutil
START_FOLDER = os.getcwd()
def numToMonth(number):
return ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][number-1]
def getDate(filename):
# filename = yyyymmdd-nnnnnn
date = re.findall(r"(\d{4})(\d{2})(\d... | [
"nithesh.dragoon98@gmail.com"
] | nithesh.dragoon98@gmail.com |
0f0de7f4f62d5363e19ca6ac55276c6a92bce3dc | d16292aad097ee66c356093731132ca148a39df2 | /LeetCode_Python/Test205.py | 4556c0f9c5a13095b83d22700504649331877601 | [] | no_license | zhuyingtao/leetcode | 702189a521506b1d651f75e604aa98105ef7580c | b7c520e3fb4e487ed625733bea373f2429c217c9 | refs/heads/master | 2021-01-14T13:21:50.277663 | 2020-03-08T16:09:42 | 2020-03-08T16:09:42 | 39,811,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | __author__ = 'zyt'
class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
# ds = {} # can't ds=dt={}
# dt = {}
# cs = ct = 0
# for i in range(len(s)):
# if s[i] not in ds:
# ds[s[i]] = cs
... | [
"yingtao.zhu@foxmail.com"
] | yingtao.zhu@foxmail.com |
e48c897fdb5024719e538c8eef85ba293d1b3b3b | 77c6d0e5a25eb7b16d8c6a843b9e9915d6f6afd7 | /apps/order/views.py | fc8724a12eaab415b3189f3403ae6c0a4a4dea0e | [] | no_license | zhangwei725/shop_projects | 28c794bcba6f79b4f017b17fc0942afb3ed5f2b1 | 24a98ae5ff4fb6552d3315f5b3690e3bc5b82ab6 | refs/heads/master | 2020-03-28T20:31:50.180680 | 2018-09-21T09:40:46 | 2018-09-21T09:40:46 | 149,079,157 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,585 | py | import datetime
import random
from decimal import Decimal
from django.http import HttpResponse
from django.shortcuts import render
from apps.home.models import ShopCar, Order, Shop
from django.db import transaction
"""
拿到所有被选中的购物车记录显示
#
# 第一个 选择地址
# 第二个 选择支付方式
# 第三个 配送方式
# 提交订单 操作订单表
# 1>生成订单号
# 2> 把商品的库存量减
... | [
"18614068889@163.com"
] | 18614068889@163.com |
d99c9108d337ed703b7f5b6063ed0429bfb22b1c | ecf52346badfccf15a8959cb36618ce1edbdec6d | /libs/utils.py | 5d66b20503b295a01c43ec2b0d2dda2b54316f4d | [
"BSD-2-Clause"
] | permissive | aoxiangzhang/tuxiangshijue | 3571279296bce17b2a896d4512d594fabfb2f490 | 4b9541f64bf6e4c8e1b6b1ce8be141aaf8c67dae | refs/heads/master | 2023-01-23T06:33:57.810171 | 2020-11-26T08:07:34 | 2020-11-26T08:07:34 | 316,161,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,966 | py | from __future__ import division
import os
import cv2
import time
import torch
import scipy.misc
import numpy as np
import scipy.sparse
from PIL import Image
import scipy.sparse.linalg
from cv2.ximgproc import jointBilateralFilter
from torch.utils.serialization import load_lua
from numpy.lib.stride_tricks import as_stri... | [
"zhang_ax@qq.com"
] | zhang_ax@qq.com |
0ce5054c29d7414e6c56e074af1b1ef1b32afe58 | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /CheckIO/HOME/pawn_brotherhood.py | 4b0929a05d3c3562eadcb0a6374c8a5fdf00444c | [] | no_license | linxiaohui/CodeLibrary | da03a9ed631d1d44b098ae393b4bd9e378ab38d3 | 96a5d22a8c442c4aec8a064ce383aba8a7559b2c | refs/heads/master | 2021-01-18T03:42:39.536939 | 2018-12-11T06:47:15 | 2018-12-11T06:47:15 | 85,795,767 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | #!/usr/bin/env python
# *-* coding:UTF-8 *-*
def safe_pawns(pawns):
cnt=0
for l in pawns:
col,row=l.lower()
if int(row)==1:
continue
if col>='b' and chr(ord(col)-1)+str(int(row)-1) in pawns or col<='g' and chr(ord(col)+1)+str(int(row)-1) in pawns:
cnt+=1
return cnt
if __name__ == '__main__... | [
"llinxiaohui@126.com"
] | llinxiaohui@126.com |
c5a5fa1f10d00e0b202512be63246adc05209344 | 73079120d673a9ff71128049cf3d661409fc8870 | /levelupapi/models/__init__.py | 2ad4244c97a2ca116ea243496a11cd5a73a087f5 | [] | no_license | ConnorBlakeney/levelup-server | 3974e80e0846e160c0fac34ca89c91ca9575a693 | 2488e03b0bae920c17f0a3ac85e97e91ceb78a59 | refs/heads/main | 2023-01-19T20:14:57.841307 | 2020-12-01T20:26:45 | 2020-12-01T20:26:45 | 308,676,715 | 0 | 0 | null | 2020-10-30T15:52:32 | 2020-10-30T15:52:31 | null | UTF-8 | Python | false | false | 138 | py | from .gamer import Gamer
from .event import Event
from .eventgamer import EventGamer
from .gametype import GameType
from .game import Game | [
"connorblakeney@yahoo.com"
] | connorblakeney@yahoo.com |
a3719f7dffa582ca17d74a9984494b0a1d048e71 | 499f2596cd40ad5ae8510d735f1d6c699b044050 | /GlibcGenerator.py | bc0d0d4fdf577902720693075822b021bdfc4344 | [] | no_license | alicja-michniewicz/crypto-break-lcg | bdaab30c15a6938aed180f33402613ad59cc4f61 | 4ba9139faa7904db7f9cbff74b05974998b67bbd | refs/heads/master | 2021-01-24T02:53:37.931661 | 2018-03-11T12:11:58 | 2018-03-11T12:11:58 | 122,865,781 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | import random
class GlibcGenerator:
def __init__(self, seed_int:int) -> None:
super().__init__()
self.gen = random.glibc_prng(seed_int)
def generate(self):
return next(self.gen)
def generate_n(self, n):
return list([self.generate() for i in range(n)]) | [
"alicjamichniewicz@gmail.com"
] | alicjamichniewicz@gmail.com |
8aa44c49b1ccdc0c8d55e6211a30bda0f2a9ade8 | a0458c27f9f0f946b0071c7c8bf5dbbb3bde96f3 | /src/settings.py | a3ce8e9248c34ed356b6eac5ad2b84d0d8566348 | [
"MIT"
] | permissive | sergachev/litex-template | b10175fe98e723539ff108f2db322b21cc3910ad | 00c7b36b8f9b380bc509b76a44f3885ffa2a932d | refs/heads/main | 2023-08-03T16:05:45.258246 | 2022-12-11T20:32:32 | 2022-12-11T20:32:32 | 214,885,817 | 17 | 3 | MIT | 2023-07-25T20:49:53 | 2019-10-13T20:04:27 | Python | UTF-8 | Python | false | false | 49 | py | device_model = "xc7a200tfbg484"
speed_grade = -1
| [
"ilia.sergachev@protonmail.ch"
] | ilia.sergachev@protonmail.ch |
6fef01c2498c9a9b7a52d8a294080b7fe61d6627 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/CJ/16_2_1_Dom_ju.py | c726b4de6450f76ad915989d09c20461a1c9a8cd | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 538 | py | DOWNLOAD_DIR = "/Users/Dom/Downloads/"
def jopen( filename ):
return open( DOWNLOAD_DIR+filename+".in", "r")
def jout( filename, results, linebreaks=False ):
f = open(DOWNLOAD_DIR+filename+".out","w")
for n in range(len(results)):
f.write( "Case #" + str(n+1) + ": " )
if isinstance(n, list... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
8c693acb05745c20689b0a071a611d9b22ec6549 | fa60536fbc7c0d8a2a8f08f0a5b6351c77d08054 | /3]. Competitive Programming/03]. HackerRank/1]. Practice/12]. 10 Days of Statistics/Day_5.py | 9205935baf59949bf266af43020d1b9d8c2f88cf | [
"MIT"
] | permissive | poojitha2002/The-Complete-FAANG-Preparation | 15cad1f9fb0371d15acc0fb541a79593e0605c4c | 7910c846252d3f1a66f92af3b7d9fb9ad1f86999 | refs/heads/master | 2023-07-17T20:24:19.161348 | 2021-08-28T11:39:48 | 2021-08-28T11:39:48 | 400,784,346 | 5 | 2 | MIT | 2021-08-28T12:14:35 | 2021-08-28T12:14:34 | null | UTF-8 | Python | false | false | 864 | py | # 1st Solution---------------------------------------
from math import factorial, exp
f = float(input())
i = int(input())
eq = ((f**i) * exp(-f))/factorial(i)
print('%.3f' %eq)
# 2nd Solution-------------------------------------------
x,y = [float(i) for i in input().split(" ")]
cx = 160 + 40*(x + x**2)
cy = 128 +... | [
"akashsingh27101998@gmai.com"
] | akashsingh27101998@gmai.com |
1e4f57cb7ae54552f4520fc68b828043c2167752 | e41c10e0b17265509fd460f860306784522eedc3 | /basic_config.py | 8e0791dbf7f899d792c04ef3414e39b0ef1d7b41 | [
"CC0-1.0"
] | permissive | hyyc116/research_paradigm_changing | c77ecf2533a6b2e2cd3f74fc3d3073454bffc55c | eac69c45a7a17eb70ace185fa22831ac785e504e | refs/heads/master | 2020-11-24T05:48:07.973347 | 2019-12-18T12:17:02 | 2019-12-18T12:17:02 | 227,992,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,102 | py | #coding:utf-8
import os
import sys
import json
from collections import defaultdict
from collections import Counter
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from sklearn.metrics import r2_score
import math
import numpy as np
import random
import logging... | [
"hyyc116@gmail.com"
] | hyyc116@gmail.com |
78792c4fe3cdb3800594e5d3efa5738bab851ebf | 7b1067f680621b84c28571ba8488308b00b055f0 | /week1/day4/test.py | 3b771e0ec6ddb33b587048b7691e0b8b24eff933 | [] | no_license | wangfei1000/python-study | ddf9149e42cff02c75bca036243b603e25188a30 | 781e9edeca1d956325e56858b4d484beff121bec | refs/heads/master | 2021-09-02T16:11:01.271486 | 2018-01-03T15:05:37 | 2018-01-03T15:05:37 | 116,148,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
# Authour wangfei
# def f1():
# return a1+100
#
# f2 = 100+1
#
#
# print(callable(f2))
# print(chr(65))
# print(ord("a"))
# LIST = []
# import random
# for line in range(6):
# num = random.randrange(9)
# if num == 3 or num == 5 or num == 1:
# # num = ... | [
"wangfei1000@yeah.net"
] | wangfei1000@yeah.net |
595c27d7b42568980e69f0ab516589558e4603c5 | 82a682480d6ab5d082360b08a158bda42ae571b8 | /music/migrations/0001_initial.py | dcd4ade0bb2e2454ba30be663909dd324eebd60c | [
"MIT"
] | permissive | saddhu1005/Viberr | a19edd8e71503793f6035ce06f5827bf175ef746 | f0847d479bce72b5da593d63848ae0fa79c3165a | refs/heads/master | 2021-06-24T06:13:51.838927 | 2019-07-26T19:33:50 | 2019-07-26T19:33:50 | 172,378,410 | 0 | 0 | MIT | 2021-06-10T21:16:36 | 2019-02-24T19:08:36 | HTML | UTF-8 | Python | false | false | 1,173 | py | # Generated by Django 2.1.7 on 2019-02-24 13:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
... | [
"saddhu1005@gmail.com"
] | saddhu1005@gmail.com |
fc9e559deb7f5bddce6f8748ac93e3cc190dfb31 | 0130533e0f40a0f1cf476f519a3673b10ceabff3 | /teste/maximo.py | b0fd9c6f4d4edd354a14ef1c57bb97f12fe9654e | [] | no_license | danielcanuto/revisao_python | d79c8fbf475e1cea12ca9719d02868666e0591db | 3dbd2af74c7cc94f8e1962acb4069f40d0e71772 | refs/heads/main | 2023-03-02T04:37:30.777336 | 2021-02-11T11:16:54 | 2021-02-11T11:16:54 | 337,031,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | def maior(x, y):
if x > y:
return x
else:
return y
def maximo(x, y, z):
a = maior(x, y)
return maior(a, z)
| [
"danielpscanuto83@gmail.com"
] | danielpscanuto83@gmail.com |
d2ba7f08e6dd720ddd8de76660a048f88cc8e038 | 622be10edbbab2c932c7c37ef63b6c3d88c9ed10 | /rest/migrations/0001_initial.py | 81bea894bbff28b14bb084c6232a6bd8d10fe9f2 | [] | no_license | Joycewaithaka/Framework | 38ef8c872317c78175a9b774da789cb5ee10073c | 9831b205011166b960a0773e95b34453b5d868ad | refs/heads/master | 2021-07-01T05:17:08.170456 | 2017-09-22T06:32:36 | 2017-09-22T06:32:36 | 104,442,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-21 09:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Studen... | [
"joycewanjiruwaithaka@gmail.com"
] | joycewanjiruwaithaka@gmail.com |
c20f62c857e46f2c593a8ca4715ae05c5d55b16e | 0b448e2f8dc5f6637f1689ed9c3f122604ec50d5 | /PyPoll/main.py | b881853c53ca1dd296e4abbbce958fa4f48aa595 | [] | no_license | mounicapokala/Python-challange | 00b3f88683738b360b844f2e1f0c5ab8b4f54179 | 30e71cf2a9057390a0b3bc46f455ecc5baba226c | refs/heads/master | 2020-04-04T21:02:24.749417 | 2019-03-13T16:48:16 | 2019-03-13T16:48:16 | 156,270,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,584 | py | import os
import csv
import operator
csv_path="/Users/mouni/Documents/GitHub/election/UTAUS201810DATA2/Python/Homework/Instructions/PyPoll/Resources/election_data.csv"
output_path="/Users/mouni/Documents/GitHub/Python-challange/PyPoll/PyPoll.txt"
with open(csv_path) as csvfile:
csv_reader=csv.reader(csvfile,delimit... | [
"mounicadona@gmail.com"
] | mounicadona@gmail.com |
a7c910acf371d992b72da6e4efb6e5bbfc6eb773 | 875304da764ebd3d27491fd50852f7be5e9233b6 | /Distance_Between_Points.py | 3c9e45f089eb9d661861614cd3b031d327bca65a | [] | no_license | IvetaY/PythonFundamentals | 9ace0aaeddfc7e61f27fd3308e643627cd280875 | cf0bb87ba399a697be335f8979d7284c8be15246 | refs/heads/master | 2022-01-26T00:43:00.627871 | 2019-08-14T19:13:32 | 2019-08-14T19:13:32 | 119,277,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | from math import sqrt
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def read_point():
liniq = input()
tokens = [float(num) for num in liniq.split(' ')]
x, y = tokens
point = Point(x, y)
return point
def distance_between_points(point1, point2)... | [
"noreply@github.com"
] | IvetaY.noreply@github.com |
b551aaf1cc0ed4d622b9137b4fb432ed71cb4f6b | 88095fb5174ae3b0d15aa4ee56ceebe2411e8fb7 | /dive-into-deep-learning-pytorch/3.3_linear-regression.py | 01843a802551610d98c5b1b9fac8fd3fc5845791 | [
"Apache-2.0"
] | permissive | taotao1234abcd/machine-learning-and-artificial-intelligence-python | a5c04973767851ed7cef1187be50334f0326a8e3 | 04095d03a9bbe6b6189824a6a0f63b939ea04b65 | refs/heads/master | 2021-07-07T20:25:19.301573 | 2020-09-14T03:36:46 | 2020-09-14T03:36:46 | 180,847,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,352 | py |
import numpy as np
import matplotlib.pyplot as plt
import torch
from torch import nn
import torch.utils.data as Data
torch.manual_seed(1)
print(torch.__version__)
torch.set_default_tensor_type('torch.FloatTensor')
num_inputs = 1
num_examples = 2000
true_w = 2.5
true_b = 4.2
features = torch.tensor(np.random.normal... | [
"49369890+taotao1234abcd@users.noreply.github.com"
] | 49369890+taotao1234abcd@users.noreply.github.com |
abcfc7f85883e49ffa5113a31431886ddf533f5c | 5b1b478b0e7b8069762855baa8a2a4f6ff48ebf4 | /src/reviews/forms.py | bf83b29d371abc3b2b2686430c5fe69d7b383f5e | [
"MIT"
] | permissive | junaidq1/greendot | 9e4a0402fcee7182ca7531a0dd4a48edb43f79c5 | cd9e7791523317d759e0f5f9cf544deff34a8c79 | refs/heads/master | 2020-04-06T06:54:07.994376 | 2016-09-11T18:33:15 | 2016-09-11T18:33:15 | 61,906,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,047 | py | from django import forms
from .models import Review, Employee
from registration.forms import RegistrationFormUniqueEmail #this is to edit the registration redux form
# class ReviewForm(forms.ModelForm):
# class Meta:
# model = Review
# fields = [
# "content",
# "employee",
# "work_again",
# ]
#actual rev... | [
"junaidq1@gmail.com"
] | junaidq1@gmail.com |
e1c50ce55b94d0b8974045c6d12124d2db102332 | 21b39d50e4df56ea01453001845d1580729af1df | /jdcloud_sdk/services/redis/apis/DescribeClientListRequest.py | 450146bb94baa2db571d11a497779f82c80cb4ac | [
"Apache-2.0"
] | permissive | Tanc009/jdcloud-sdk-python | ef46eac7731aa8a1839b1fc1efd93249b7a977f0 | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | refs/heads/master | 2021-08-09T14:49:16.177709 | 2021-06-25T02:38:41 | 2021-06-25T02:38:41 | 141,714,695 | 0 | 0 | Apache-2.0 | 2018-07-20T13:21:17 | 2018-07-20T13:21:16 | null | UTF-8 | Python | false | false | 1,572 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | [
"tancong@jd.com"
] | tancong@jd.com |
a1ff43af09345e62519dc8bc4ca87bc75b6d115a | 0de0f7a797738387118ac8aecdf31a696c8800d1 | /sampler.py | 860c54b97697144bda1bb1ce910b9cb1aaf25d00 | [] | no_license | hyzcn/metriclearningbench | f4aa56849e9ae19a2f2298167ae7f76727cd0e30 | 79320fdfcdce2f9e65c9ecb39c14fbce8bf8b6ab | refs/heads/master | 2021-06-20T12:23:06.208100 | 2017-07-17T14:16:15 | 2017-07-17T14:16:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,786 | py | import random
import itertools
def index_dataset(dataset):
return {c : [example_idx for example_idx, (image_file_name, class_label_ind) in enumerate(dataset.imgs) if class_label_ind == c] for c in set(dict(dataset.imgs).values())}
def sample_from_class(images_by_class, class_label_ind):
return images_by_class[class... | [
"vadimkantorov@gmail.com"
] | vadimkantorov@gmail.com |
dbd63181e26bf71a1fa5f35c11a8f3a74f5dc202 | c25a6a30dcb773590669f5c5698547e9a550c460 | /trace_gen.py | 326d3e8c5e7d8b1bf1708489f232bd81378eea78 | [] | no_license | crusader2000/lrc_coding | f68eb621383399d980975f67568535d8b2ceb183 | 887fc27b72980381b27c52371ac716df9242331b | refs/heads/main | 2023-07-11T02:02:44.995285 | 2021-08-12T16:10:28 | 2021-08-12T16:10:28 | 377,253,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,560 | py | import csv
import requests
import re
import hashlib
import os
def cheaphash(string,length=6):
if length<len(hashlib.sha256(string).hexdigest()):
return hashlib.sha256(string).hexdigest()[:length]
else:
raise Exception("Length too long. Length of {y} when hash length is {x}.".format(x=str(len(ha... | [
"ansh.puvvada@students.iiit.ac.in"
] | ansh.puvvada@students.iiit.ac.in |
425bbfbbe5ae1399dac988c42a53fa836aa09111 | cbfddfdf5c7fa8354162efe50b41f84e55aff118 | /venv/lib/python3.7/site-packages/nltk/tokenize/punkt.py | f0dcaca359521808d4344948c5389317ab0fdec1 | [
"MIT",
"Apache-2.0"
] | permissive | tclerico/SAAC | 8d2245221dd135aea67c5e079ac7eaf542b25e2f | 2f52007ae8043096662e76da828a84e87f71091e | refs/heads/master | 2022-12-09T21:56:33.430404 | 2019-02-20T14:23:51 | 2019-02-20T14:23:51 | 153,152,229 | 3 | 0 | MIT | 2022-09-16T17:52:47 | 2018-10-15T17:13:29 | Python | UTF-8 | Python | false | false | 62,162 | py | # Natural Language Toolkit: Punkt sentence tokenizer
#
# Copyright (C) 2001-2018 NLTK Project
# Algorithm: Kiss & Strunk (2006)
# Author: Willy <willy@csse.unimelb.edu.au> (original Python port)
# Steven Bird <stevenbird1@gmail.com> (additions)
# Edward Loper <edloper@gmail.com> (rewrite)
# Joel... | [
"timclerico@gmail.com"
] | timclerico@gmail.com |
9765259fe66a9c580fb6bcac5113e9f6a5e872f3 | 2376dcbb96c9fca65c10c8f8db66822ba01d6a6a | /src/api2db/ingest/api2pandas.py | 9ac5015ae0e4c0caa29bf211e20968b32de46e20 | [
"MIT"
] | permissive | TristenHarr/api2db | 054443456b0b07e047216142d74eb2dc30dabe15 | 8c8b14280441f5153ff146c23359a0eb91022ddb | refs/heads/main | 2023-05-12T07:47:17.462089 | 2021-06-02T20:32:24 | 2021-06-02T20:32:24 | 364,407,770 | 46 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,808 | py | # -*- coding: utf-8 -*-
"""
Contains the Api2Pandas class
=============================
"""
from ..app.log import get_logger
from .api_form import ApiForm
import pandas as pd
import os
from typing import Union, Callable
class Api2Pandas(object):
"""Used to extract incoming data from an API into a pandas DataFrame... | [
"tjhm9c@mail.missouri.edu"
] | tjhm9c@mail.missouri.edu |
1b4ab7cf2f915702b202e3a75ac79732075f6950 | 2746d27fa7c6669e7782527f010c514c6ba17058 | /Django/timetable/env/lib/python3.6/os.py | 4614206a11b2a35caec1cb3a51a04e40fb2fbeaa | [] | no_license | samoyl11/TimeTable_optimizer | 4dd86f31cf9b9f7413e73dc0af60211efcb96d57 | ddbf908121792a2335c9ecd0f8ee2bc783c44a1b | refs/heads/master | 2020-05-25T17:56:54.566081 | 2019-05-21T19:21:03 | 2019-05-21T19:21:03 | 187,918,798 | 2 | 0 | null | 2019-05-21T21:53:58 | 2019-05-21T21:53:57 | null | UTF-8 | Python | false | false | 42 | py | /Users/bulat/anaconda3/lib/python3.6/os.py | [
"bulatuseinov@gmail.com"
] | bulatuseinov@gmail.com |
179681d70d25f6f5bf47fefd4828c21956e78241 | 68d135307198e316b7c66ef668cd88fc9b558c41 | /desert_model/parse_file.py | c42f180cb79e97301d10501842852f7ce130c3e3 | [] | no_license | SynergisticDrugCombinationPrediction/DeepSignalingSynergy | 64c3a14dbabae1145eadac4492842efdb4181d8c | 1c14818050f1ba75d5fbf96c630deca79dfe7f4e | refs/heads/master | 2023-01-13T08:34:21.017268 | 2020-11-21T13:44:51 | 2020-11-21T13:44:51 | 280,046,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,341 | py | import numpy as np
import pandas as pd
from numpy import savetxt
from load_data import LoadData
from sklearn.model_selection import train_test_split
class ParseFile():
def __init__(self, dir_opt):
self.dir_opt = dir_opt
# use map dict to read input from deeplearning
# drug -[drug_map]-> drug_name(... | [
"hemingzhang@wustl.edu"
] | hemingzhang@wustl.edu |
cd11eb32fe2a2e38bf7f9c2a3c02bd747ddd5eaa | ec4a98a487a07568dcc7e19fa36e1e2c4973b3f1 | /convertToSameImage.py | 1a559ce4f4e9446123e660ac84e0b1e9e89a8e18 | [] | no_license | jackellis98/pytorch-small-dataset-image-generation | eebf883a0a59f15ba80d9ae1d5ecca93309d1c0d | 90495a6c8d290f120abe85be19050c47ce614663 | refs/heads/master | 2020-05-24T01:12:27.813635 | 2019-05-22T17:52:54 | 2019-05-22T17:52:54 | 187,030,482 | 0 | 0 | null | 2019-05-16T13:10:03 | 2019-05-16T13:10:02 | null | UTF-8 | Python | false | false | 597 | py | import os
import cv2
import matplotlib.pyplot as plt
old_dir = 'data\cloud1'
new_dir = 'data\cloud2'
filename1 = 'pic0.png'
filename2 = 'pic3.png'
for i in range(len(os.listdir(old_dir))):
if i<25:
path = os.path.join(old_dir,filename1)
im = cv2.imread(path,cv2.IMREAD_UNCHANGED)
newPath = ... | [
"jackellis.home@gmail.com"
] | jackellis.home@gmail.com |
aed9b1d04dab1509879d9b416a9b84cdf20a89e3 | 61a4d618f8b6b50863171fd52776ff6583ee5665 | /house lease/logic/house_unit.py | 74318e0274180b7dfb5822fedd839af7bc9d2bf0 | [] | no_license | Dark-0-forest/house_lease_system | 231ce42678d3fd3620783c798301d5f79ec7f95a | b10fcd89f31deee84014990315d9db36b0aa3c94 | refs/heads/master | 2023-01-11T00:23:30.451356 | 2020-10-24T05:31:06 | 2020-10-24T05:31:06 | 306,812,969 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,418 | py | """
@作者:余宗源
@文件名:house_unit.py
@时间:2020/9/18
@文档说明: 完成关于房屋信息的一些操作,并将其封装为函数,为上层调用提供接口
"""
import mysql_connection as mct
# 插入房屋信息
def house_insert(he):
# 初始化mysql的连接
conn = mct.create_connection()
cur = conn.cursor()
# 插入房屋信息
sql = "insert into houselease.house values(null, %s, %s, %s, %s, %s, %s... | [
"928774025@qq.com"
] | 928774025@qq.com |
40dba682efd38da2e3964fce6502dc8d0e62ec5c | 9f59acd956f1e8985f8d1d2b93a2f69009de0fed | /src_panic_app/panic/tests/noses/trivial_tests/test_trivial01.py | 71b07bca1c6d29d2637fb73b9d47ee84b83a8fe1 | [] | no_license | MarCialR/flask_docker | cda3aefc48c8dd9a9e9608ae4e41bf0509a9ef02 | f78dc22f4fde98640b2adf66c5980eb68e79fd54 | refs/heads/master | 2020-06-05T20:22:55.136539 | 2015-10-04T18:38:58 | 2015-10-04T18:38:58 | 28,040,352 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | import unittest
class TC(unittest.TestCase):
pass
class TrivialTestCase(TC):
def test_01_diquesi(self):
assert "diquesi" == "diquesi"
def test_02_diqueno(self):
assert "diqueno" == "diqueno"
def test_03_faildiquesi(self):
assert "diqueSI" == "diquesi"
def test_04_faildi... | [
"marcialemilio@gmail.com"
] | marcialemilio@gmail.com |
e03dfaabbfac03e7cdeb9ee8fedae62f5be8c5fa | 49b7e9fe956a400d6901aaf1e6fa7b74c69001c5 | /tools/eval_metrics.py | 502cca3b3f9b32ce83d66c483cbfb142f55db2cd | [
"MIT"
] | permissive | xujinglin/AutoLoc | 4e718bf748f03a5f1c440826e83e496fa11b917c | 82c7e51a28eb740a8f002a460ce5c918fc61731b | refs/heads/master | 2022-03-22T19:37:39.561780 | 2019-10-31T23:20:47 | 2019-10-31T23:20:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,221 | py | """
Script entry for evaluation of training & testing results.
Usage:
1. $ mkdir exp/<DATASET>/<EXPNAME>
2. Setup configuration in `config.yml`
3. Setup proto template in `solver.tpl` and `train.tpl`
4. $ python tools/eval_metrics.py --phase <PHASE> --dataset <DATASET> \
--expname <EXPNAME> --rs... | [
"zs2262@columbia.edu"
] | zs2262@columbia.edu |
2c2739f472c192a6a1d708b67cc4007b1fdd782c | 44e69670ee5417bd1c0739448a8859f6b5e848c6 | /tf/lanczos_experiment.py | b818484a6d48d0d1065daad6718299f698b3469c | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | PForet/spectral-density | 4b3e3ebebdb47893d303e62fd5df29784db9a592 | 6defcc310cfce77c6aafd7ea7324fd5e6bf434c3 | refs/heads/master | 2021-01-06T20:04:55.870322 | 2020-03-13T19:18:48 | 2020-03-13T19:18:48 | 241,473,175 | 0 | 0 | Apache-2.0 | 2020-02-18T21:39:51 | 2020-02-18T21:39:51 | null | UTF-8 | Python | false | false | 9,466 | py | # Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
"7751707+yingusxiaous@users.noreply.github.com"
] | 7751707+yingusxiaous@users.noreply.github.com |
7c6e2ad300adefc46b95d659f9cefe698aeb499b | 20f951bd927e4e5cde8ef7781813fcf0d51cc3ea | /fossir/modules/events/contributions/models/subcontributions.py | 9ff806fba366acfa3d3ecfa78f127ae91c426fa9 | [] | no_license | HodardCodeclub/SoftwareDevelopment | 60a0fbab045cb1802925d4dd5012d5b030c272e0 | 6300f2fae830c0c2c73fe0afd9c684383bce63e5 | refs/heads/master | 2021-01-20T00:30:02.800383 | 2018-04-27T09:28:25 | 2018-04-27T09:28:25 | 101,277,325 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,998 | py |
from __future__ import unicode_literals
from fossir.core.db import db
from fossir.core.db.sqlalchemy.attachments import AttachedItemsMixin
from fossir.core.db.sqlalchemy.descriptions import DescriptionMixin, RenderMode
from fossir.core.db.sqlalchemy.notes import AttachedNotesMixin
from fossir.core.db.sqlalchemy.util... | [
"hodardhazwinayo@gmail.com"
] | hodardhazwinayo@gmail.com |
b1514bede7b460561ff960cecb8def7bbc963dde | af9a37d2ef29f49d0bc037e5397d448f3097aef6 | /alarm/alarm_db.py | 843f5ce3f39ce9e5135fa7c1ed5ff20bc1e1db1d | [] | no_license | amsuredev/alarm | ea954f429f79c1d2c5998bec4c121e3ea914f81f | 809be964ff7b8fa5613231a987eb37abac7568b8 | refs/heads/master | 2023-02-20T23:24:52.969006 | 2021-01-28T16:56:52 | 2021-01-28T16:56:52 | 332,046,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,842 | py | import sqlite3
from alarm import Alarm
class AlarmDatabase:
def __init__(self):
conn = sqlite3.connect('alarm.db') # create file if not exist;connect if exist
cursor = conn.cursor()
cursor.execute("""CREATE TABLE IF NOT EXISTS alarms (
_id INTEGER PRIMARY KEY AUTOINCREMENT... | [
"71019216+amsuredev@users.noreply.github.com"
] | 71019216+amsuredev@users.noreply.github.com |
bb54dfe78d3f41b4a773888239740f927f839580 | a7477f153eebf6d2848beecde7ca88cedd26dfa8 | /learning_log/settings.py | 3f0c23d1867b5cdfe7354c0aabfa268e5d94e304 | [] | no_license | Artem19861910/learning_log | 83f26595929fb691bccf2f4f50f0eebda6f4cede | e9dbfcffa9559c4cb6bafa75affb5161a18eac56 | refs/heads/master | 2021-01-18T02:03:25.353534 | 2016-09-15T09:17:01 | 2016-09-15T09:17:01 | 68,282,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,975 | py | """
Django settings for learning_log project.
Generated by 'django-admin startproject' using Django 1.9.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import ... | [
"defenite@meta.ua"
] | defenite@meta.ua |
d0698c08924aafd818b04986d915218db6465545 | 223eea1c29d87d9eb29b5133d08feb00b0dff09d | /hotDog/tester.py | 078b02dedb04d8f5b626a110d62cdf2890c7e83b | [] | no_license | hydroguy45/hotDog | 626914e9090e912fa3d8f842a7813e490956c99c | a39e0a496d27707eb4aa47f25b0d7615740e6b13 | refs/heads/master | 2021-01-02T09:13:46.159476 | 2018-03-15T18:18:31 | 2018-03-15T18:18:31 | 99,170,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,048 | py | import tensorflow as tf
from tflearn.layers.core import input_data, fully_connected, dropout
from tflearn.layers.conv import conv_2d, max_pool_2d
from tflearn.layers.estimator import regression
from tflearn.layers.normalization import local_response_normalization
from tflearn.data_utils import shuffle
import tflearn as... | [
"foleychriscpfjr@gmail.com"
] | foleychriscpfjr@gmail.com |
b0ca8e5f2883d66123cfd050dbb3a54d90ba92d2 | 3bd892608e67f4acc50f00714d03927825f5ca14 | /mynews/newsfeeder/newsfeeder.py | 4a2af342522b6bbb124c79c8c7f21fcb5f61b4c1 | [] | no_license | tobetao/webtest1 | bca522503dc1fd69b9478ad6cfbf72ed58b7c45f | cff60d36b014ab5d882ea20c82b02ba36e034e82 | refs/heads/master | 2020-04-06T03:41:58.375014 | 2014-12-10T15:30:35 | 2014-12-10T15:30:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,328 | py | #-*- coding:utf-8 -*-
import urllib, pprint
from bs4 import BeautifulSoup
import urllib2, sys
import cookielib
import feedparser
import codecs
a = codecs.open("iteye.txt", "w", "utf-8")
# pretent to be a browser: firefox 18.0
header_data = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/2010010... | [
"Grace"
] | Grace |
d118824d1a1abb31dad6b3ab52b9722b4509b23f | 82dc9f951c693324ef32a5cc8f78d0563eacf0f7 | /examples/compare_all.py | 99ecba1b8a9d1074300a8252260e84f9a0f97633 | [
"BSD-2-Clause"
] | permissive | nmcveity/pyfreetype | ebf11359908f53d254bc16f06fea7e12dd18e700 | 51b0ce7d13509a556940606cbbf35b74e9130b0e | refs/heads/master | 2021-01-10T21:10:50.714479 | 2015-01-19T18:56:20 | 2015-01-19T18:56:20 | 1,354,659 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | import os
import os.path
from compare import generate_comparison
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-d", "--directory", dest="path", help="The directory to search for fonts", action="store", default="c:\\windows\\fonts")
parser.add_option("-o", "--output", dest="output", hel... | [
"nmcveity@gmail.com"
] | nmcveity@gmail.com |
6305acaf43a088e91df5df323d21cd70ced14c36 | a062669a7f37412f016534ae30bd41e9efe6afa5 | /product/migrations/0013_auto_20201127_0026.py | 8b034f4bd8a91d3a1e265777d20c4ce041f762fb | [] | no_license | techappg/meat_fun_backend | 7c05045ae0ca6a442eb6e24693a800ca98447e9b | e16da0ec1ccfb583a43f534ad9fd6cb79fe1e6c1 | refs/heads/main | 2023-04-16T22:42:38.183722 | 2021-04-22T07:37:07 | 2021-04-22T07:37:07 | 360,430,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | # Generated by Django 3.1 on 2020-11-27 08:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0012_auto_20201127_0024'),
]
operations = [
migrations.AlterField(
model_name='contact_us',
n... | [
"techappg@gmail.com"
] | techappg@gmail.com |
8038cea1fdf0b24c8720840e9409fe133a40824e | 710f60cb392c18345af3861690dd8a47b469bb51 | /booksapp/serializers.py | 92ceca6ad775205069a8db0d4757bf5b856ba86c | [] | no_license | mkazber/books | 1ba6817f6509f76863a68a060ffcdeada2d63580 | be0355ccff699bd367618aa0bff43e89e21b4965 | refs/heads/main | 2023-07-26T08:08:45.421636 | 2021-08-25T20:48:41 | 2021-08-25T20:48:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,391 | py | # from rest_framework import serializers
# from django.contrib import admin
# from .models import Book, BookType, BookIsbn, Author, Rating, Publishing
#
# class BookTypeSerializer(serializers.ModelSerializer):
# class Meta:
# model = BookType
# fields = ['id', 'name']
#
# class BookIsbnSerializer(se... | [
"noreply@github.com"
] | mkazber.noreply@github.com |
db702c1abf2eafb2e4c4d19ae35c6078727e3948 | 2638bdaf737fd357cbef480ae04fe60c25c87f82 | /0x04-python-more_data_structures/10-best_score.py | 3a0339dd6d77d6bccfeccfc74f80e583d8d1f3c4 | [] | no_license | peytonbrsmith/holbertonschool-higher_level_programming | 394993ba6f899768cd5e8b7a4beec31f9aba97a5 | ac87fcb3527f73cc5c5d8214406edb2c6d47e1c7 | refs/heads/master | 2023-04-19T16:25:19.725354 | 2021-05-12T20:19:02 | 2021-05-12T20:19:02 | 319,422,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | #!/usr/bin/python3
def best_score(a_dictionary):
if a_dictionary is None:
return (None)
first = True
best = None
for key in a_dictionary:
if first:
prev = a_dictionary[key]
best = key
first = False
if a_dictionary[key] > prev:
prev ... | [
"peytonbrsmith@gmail.com"
] | peytonbrsmith@gmail.com |
8407e71af54b5030a04c8ad0b1ed06504ccdca51 | 8ea1daa200e304aa878427d6a7d91b955b9b7660 | /autoload.py | 7a4319028639b52d981f66326350f7c0b5c2033e | [] | no_license | techite/PythonImp | 6877dbdac379f90515cde77b558de40b1fdb1e1b | 30573586d52012ab97c3958314357949a45c0829 | refs/heads/master | 2021-01-10T02:55:57.372489 | 2016-01-27T12:11:42 | 2016-01-27T12:11:42 | 50,400,346 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | #Auto Load multiple URLs from a text file
#By Shashi Prakash Agarwal
import webbrowser
with open('a.txt') as f:
for line in f:
webbrowser.open(line)
#Ensure that a.txt exists and contains URLs separated by line break (i.e. one URL per line)
| [
"admin@techite.com"
] | admin@techite.com |
acc85dad8ae26e4d8552b7b8f3228b41d07b394f | 66fdca0d6d3420fec4e6c24cab041737c4f36960 | /nowa/util/bcmd.py | 68dbf7ce631a325bb8dae2302d813fc55e0656d6 | [] | no_license | a-bunch-of-nerdy-ass-developers/nat-one-with-advantage | eac86756a21bfe9a00f27ad6c90297d9a0b9d84a | 3d13e5a2dc2ebd13477b1d48fff4deb1db62b1b8 | refs/heads/master | 2023-01-14T19:49:45.429462 | 2019-07-13T19:16:07 | 2019-07-13T19:16:07 | 175,209,131 | 0 | 0 | null | 2022-12-22T11:15:34 | 2019-03-12T12:43:25 | JavaScript | UTF-8 | Python | false | false | 1,667 | py | from cmd import Cmd
class BetterCmd(Cmd):
def do_EOF(self, arg):
print()
return True
def emptyline(self):
pass
def do_exit(self, arg):
"""Exits the command line"""
return True
def do_help(self, arg):
'List available commands with "help" or detailed help with "help cmd".'
if arg:
# XXX check ar... | [
"hooman.shaah@gmail.com"
] | hooman.shaah@gmail.com |
98bbe2eefa6f1fb4cf434d5f7d1171a548f7067f | b57943732ce8883ad17b19eed8e644fc255c283a | /env/bin/pip | 80c31350ca54d18cce7fd2206bc281eea0480e78 | [] | no_license | Albardiaz/my-first-test-django | 7c561abedde4fc9d295d9ae04f5c0273af8c3c57 | fccc0793efa4f7a7dd8847d366386eb0add34ba3 | refs/heads/master | 2023-01-13T14:39:11.018223 | 2020-11-17T12:20:35 | 2020-11-17T12:20:35 | 313,581,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | #!/home/javi/django-apps/env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"albardiaz@gmail.com"
] | albardiaz@gmail.com | |
4c55d65f8078736e34c5d784a6d565b14ca42660 | 31b8a4df6e85e892e1b9256d541dd356747eb173 | /src/json_input.py | 6898f17f232217baced77c3ec7297ccbf50a6b91 | [] | no_license | mohamedhamidat/Challenge | 350dda9e80bd3cd4ef78432537a70c25e463b64a | e93eadc19e36f2d62dc25165b27bef65f22f1121 | refs/heads/master | 2021-05-12T11:10:52.768601 | 2018-01-15T10:59:09 | 2018-01-15T10:59:09 | 117,379,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 825 | py | """
Just a model to simulate json request
"""
import json
def get_json_queries():
input = """
{
"queries": [
{
"paths": {
"start": "A",
"end": "D"
}
},
{
"... | [
"hamidatmohamed@yahoo.fr"
] | hamidatmohamed@yahoo.fr |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.