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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3758f1d2fc628019ffb27cc8d9c833c5cdee2c3f | f0000766ad3a5c47834a59144207e5e411749c19 | /python/get_commands.py | eb239d4f6c7e17d7adafa35df4a949945b44ba53 | [] | no_license | GitBolt/discord-slash-guide | f972f0bccf7dc0829f2934b59628a5e6de6258f4 | 886adac4b210df57af8ed41ccdac94f21a8b0ee7 | refs/heads/master | 2023-07-26T10:44:45.503744 | 2021-09-06T07:50:17 | 2021-09-06T07:50:17 | 403,006,058 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,527 | py | """
This is to get all commands, not to be confused with `get_command.py`
which returns details of a particular command.
"""
import os
import requests
TOKEN = os.environ["TOKEN"] or os.getenv["TOKEN"]
HEADERS = {"Authorization": f"Bot {TOKEN}"}
def get_global_commands(application_id: int) -> str:
"""
https... | [
"stingbolt1@gmail.com"
] | stingbolt1@gmail.com |
abf504d987f86ea021d138b7f2ff2b1fa1df0dc8 | 2173a5432ff7d47346cdd4d45811284b117708c6 | /Python/ifstatements.py | 03085abbc1f64a069c21109d7493c2e31357778e | [] | no_license | lucasvdiepen/PythonAchievements | beac4abeac7a46920f641a2f34db9d8a4438ba2a | 25eb9f4518abb69f31c3c979e041319810deb42b | refs/heads/master | 2023-01-10T07:44:45.578549 | 2020-11-11T18:05:13 | 2020-11-11T18:05:13 | 292,278,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | varA = 5
varB = 10
if (varA == 5):
print("varA staat gelijk aan 5")
else:
print("varA staat niet gelijk aan 5")
if(varA == varB):
print("varA staat gelijk aan varB")
elif (varA < varB):
print("varA is kleiner dan varB")
elif (varA == 50):
pass #Doe niks
else:
print("varA is toch groter dan va... | [
"lucascool@ziggo.nl"
] | lucascool@ziggo.nl |
f8030a439634075910d8b4cc1c7c7a989af7d51d | c6a624ffc2b6165d8e1f1c85a45ae1fa1c2baee4 | /OJ/CodeWars/Find the odd int.py | fcd97c3bb29e11c390a08aaea3b08331fe73416b | [
"Unlicense"
] | permissive | JuChunChen/Algorithm | 41be8f8b9fd0543ef4d3e2297c3a0be81fc1433d | 8291a7ed498a0a9d763e7e50fffacf78db101a7e | refs/heads/master | 2023-04-02T21:25:08.227053 | 2021-04-10T07:57:55 | 2021-04-10T07:58:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | from functools import reduce
def find_it(seq):
return [
k for k, v in {
v: (lambda val, seq: reduce(lambda r, v: r + (v == val), seq, 0)
)(v, seq)
for v in seq
}.items() if v % 2 != 0
][0]
"""
def find_it(seq):
for i in seq:
if seq.count(i)%2!=0:
retu... | [
"simon@tomotoes.com"
] | simon@tomotoes.com |
dd8b91a8d77bbcac5b19fb4af0dd08e07c255110 | 7e46361bda7d0912e715a4046a91758da0cfca5d | /course/migrations/0012_auto_20200519_1211.py | b19c04b7c311e53923dbc187eee012e54d993737 | [] | no_license | varun560/Learning_Portal | dee70c64a54dc7ca1cbfa42debc5941289d0984b | 9cbac1221a33c54be696d174cff470e7399a28d7 | refs/heads/main | 2023-01-21T14:29:27.196241 | 2020-11-25T05:59:47 | 2020-11-25T05:59:47 | 315,658,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | # Generated by Django 3.0.6 on 2020-05-19 06:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('course', '0011_auto_20200519_1210'),
]
operations = [
migrations.AlterField(
model_name='lecture',
name='src',
... | [
"varunjn652@gmail.com"
] | varunjn652@gmail.com |
27cacce4b3a5ddfcd0ac9cd6fe61e916c9aee2a2 | 1210fd2bdad04eb7dfb7c015caf3aaa9a06c73d4 | /meditation/post/models.py | a9d989806902f13e2cf6e04682c7e119bd67da89 | [] | no_license | andyxdman/meditation | c719c8d3a906a29d2ea521fc14d8f093e92dc499 | 612d8c56ed1c658018b8a583d55ce712b4f2cf79 | refs/heads/master | 2020-09-22T17:54:41.528561 | 2019-12-02T15:47:30 | 2019-12-02T15:47:30 | 225,292,138 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,788 | py | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Post(models.Model):
POST_DRAFT = 0
POST_NORMAL = 1
POST_HIDDEN = 2
POST_TYPE = (
(POST_DRAFT, '草稿'),
(POST_NORMAL, '正常'),
(POST_HIDDEN, '隱藏'),
)
owner = models.Fore... | [
"andylee1994@gmail.com"
] | andylee1994@gmail.com |
6a0c12dd4b63cb5682b5fa5da97a603bd330653b | 6f7495631dcf2d8ad1e878f8492ffc686691d50a | /day09/ex03/polynomial_model_extended.py | 5e0c19f41587d325d861bd19e5066fcb55c917c5 | [] | no_license | mli42/python_bootcamp | 0e0012f611902c0be40ea4933d17255652465501 | 4e71ec20b12676016514875ee96d15dafb177718 | refs/heads/main | 2022-12-11T00:55:44.880734 | 2022-09-16T15:13:16 | 2022-09-16T15:14:13 | 233,590,858 | 3 | 2 | null | 2022-12-08T13:07:05 | 2020-01-13T12:30:49 | Python | UTF-8 | Python | false | false | 2,562 | py | # **************************************************************************** #
# #
# ::: :::::::: #
# polynomial_model_extended.py :+: :+: :+: ... | [
"mli@student.42.fr"
] | mli@student.42.fr |
65577a7929129e9b76f9edfec1ce190f54c356b8 | 31fadfd463b8f4d54f0a6b9aa95896b33c4e2aa9 | /gamepad/controls/gamepad.py | 09bbbfe8bb8b04a70de0ffa2b73176e544f1a1e0 | [] | no_license | Cyboot/Crazyflie | a6d53194dfbb6ac0f35b3f9ef017fdcaa405e2af | 9e8e9d6b325fcee3b07ad560b3cdaa6fb56244d6 | refs/heads/master | 2020-04-28T20:57:48.330988 | 2014-02-27T19:26:18 | 2014-02-27T19:26:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | #!/usr/bin/python -tt
# -*- coding: utf-8 -*-
'''
Created on 21.02.2014
@author: Tim
'''
class Gamepad(object):
'''
represents the gamepad with all buttons and axis values
'''
def __init__(self):
self.axisLeft_X = 0
self.axisLeft_Y = 0
self.axisRight_X = 0
self.axisRig... | [
"Cyboot@timweb.de"
] | Cyboot@timweb.de |
84726ebef0eded344477e352bc63f88f51ba6372 | 5c92518544220facaf97dc55d32b15d55b9b6c56 | /mealie/routes/recipe/tag_routes.py | ce527f01cba338bbfb115f5e485928570b814549 | [
"MIT"
] | permissive | W1ndst0rm/mealie | 3302cdff289439e40f15ac535dd512630bf8a527 | 50a5b39836fb448ec6dfeacc20cb70d6d9d060a4 | refs/heads/master | 2023-03-01T22:43:59.265920 | 2021-02-09T03:52:35 | 2021-02-09T03:52:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 997 | py | from db.database import db
from db.db_setup import generate_session
from fastapi import APIRouter, Depends
from sqlalchemy.orm.session import Session
router = APIRouter(tags=["Recipes"])
router = APIRouter(
prefix="/api/recipes/tags",
tags=["Recipe Tags"],
)
@router.get("/all")
async def get_all_recipe_tags... | [
"noreply@github.com"
] | W1ndst0rm.noreply@github.com |
5f78d5f22130ef95b5451dbb67e83853d93a80b0 | a6566ebc69ed5e7a17e2091bdb10e7b6523eefc9 | /py/notifier/config.py | 49ae8e99337c9f08bbbe648c1ba901d19f2924d8 | [
"MIT"
] | permissive | mabotech/mabo.task | 916e71650b45a24bb3852206a3755a7fd0342e47 | 96752a5ae94349a46e3b6f9369cc0933d5e37be0 | refs/heads/master | 2020-06-05T13:05:02.768838 | 2015-11-29T08:18:10 | 2015-11-29T08:18:10 | 23,750,849 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py |
import toml
from singleton import Singleton
class Config(object):
__metacass__ = Singleton
def __init__(self):
conf_fn = "conf.toml"
with open(conf_fn) as conf_fh:
toml_str = conf_fh.read()
self.conf = toml.loads(toml_str)
def get_co... | [
"aidear@163.com"
] | aidear@163.com |
f6253d0ce4e2dc6d3431eccade1b0b644c677d62 | bb9d23669160e4a330914667b4426a161cdb5125 | /lab1/string1.py | e059c097f36a421ef53c9fef034cdb66961fd04b | [] | no_license | yuliasimanenko/Python | 7d02c0fc79b6d56586fcf3d1960aaf1c9dae2b6d | 3f8a5d8acaad7f5d5d063af5cd5e9220258336ea | refs/heads/master | 2023-08-29T07:14:40.195360 | 2021-10-04T14:11:45 | 2021-10-04T14:11:45 | 312,831,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,019 | py |
# 1.
# Входящие параметры: int <count> ,
# Результат: string в форме
# "Number of: <count>", где <count> число из вход.парам.
# Если число равно 10 или более, напечатать "many"
# вместо <count>
# Пример: (5) -> "Number of: 5"
# (23) -> 'Number of: many'
def num_of_items(count):
string = 'many' if count >= 1... | [
"Julia.Simanenko@yandex.ru"
] | Julia.Simanenko@yandex.ru |
f63660d7a58a51a6d96d21c74bf21e35e3469584 | 6bfda75657070e177fa620a43c917096cbd3c550 | /kubernetes/test/test_v1_job_status.py | f929582f971cf175bfa94a502d44fde0352fba4f | [
"Apache-2.0"
] | permissive | don41382/client-python | 8e7e747a62f9f4fc0402eea1a877eab1bb80ab36 | e69d4fe204b98f7d7ee3ada3996b4f5fbceae5fe | refs/heads/master | 2021-01-19T23:15:50.172933 | 2017-04-18T18:00:48 | 2017-04-18T18:00:48 | 88,943,866 | 0 | 0 | null | 2017-04-21T05:19:52 | 2017-04-21T05:19:52 | null | UTF-8 | Python | false | false | 827 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | [
"mehdy@google.com"
] | mehdy@google.com |
d467b8c5697dbe12bffb4375b8df339b99818fbd | 043cb79b38e2935686dcf080827567b790e96b8b | /scripts/ismap_v2_unittests.py | f21ccb3f049616c4581474eef8e457272143e7fe | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jhawkey/IS_mapper | a8de728ec78fa0a8c1791474dfb7a6fc3bfae9c2 | 937640d09ae308085c2b1c9002e5fed7f2b83d96 | refs/heads/master | 2021-12-15T07:04:55.422633 | 2021-12-03T02:31:00 | 2021-12-03T02:31:00 | 16,825,331 | 41 | 21 | NOASSERTION | 2019-06-11T00:28:45 | 2014-02-14T02:58:48 | Python | UTF-8 | Python | false | false | 10,944 | py | import unittest
import pathlib
import ismap_v2
import read_grouping
import run_commands
import mapping_to_ref
import mapping_to_query
import os
import create_output
from Bio import SeqIO
import filecmp
import shutil
class TestGetSeqs(unittest.TestCase):
def setUp(self):
self.query_single = ["/Users/jane/D... | [
"jhawkey@student.unimelb.edu.au"
] | jhawkey@student.unimelb.edu.au |
a08866fdeb02d1584aca3775017ebe2a118292d7 | 04252676935223f4d03eff0393ba921cb00be1e5 | /api/__init__.py | 59d9087892b08ac0854226a2346b05ea5f5dff99 | [] | no_license | kongp3/cross4u | 4083aec3e5fe9de1d351d25609cbdf996df6abe3 | 8bd4dcfe8ae8fee5a3f169428b138b1294633da0 | refs/heads/master | 2020-11-29T23:11:17.838675 | 2019-12-30T06:56:20 | 2019-12-30T06:56:20 | 230,235,707 | 0 | 0 | null | 2019-12-26T09:33:09 | 2019-12-26T09:31:52 | Python | UTF-8 | Python | false | false | 1,419 | py | # -*- coding: utf-8 -*-
import traceback
from flask import jsonify
from functools import wraps
class RestResponse(object):
""" 标准的接口Response类, 所有的api必须返回这个类的对象, 以便统一处理返回 """
def __init__(self,):
pass
def fail(self, code=500, message="Server Got A Exception"):
d = {'meta': {
'... | [
"kongp3@outlook"
] | kongp3@outlook |
df5067ed924759eb620db5322d38ca197b139fca | d399538a42addaed05376754bd686ad79acfae85 | /tests/utils/rs_exprmgmt_paths_add.py | 6f1bd06467bd248cd78b2efedc0cede722e1ea39 | [] | no_license | jacob2512/plfs-regression | 4faf201991f2b8cd848136d4e60c2c7b0b7a3e49 | 0514feec60e59bdbae533c5b09523c2dd501bf25 | refs/heads/master | 2021-01-16T19:03:34.550286 | 2012-11-01T20:18:37 | 2012-11-01T20:18:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 725 | py | #!/usr/bin/env python
#
# Add the paths to experiment_managment to sys.path
import os,sys,re
def add_exprmgmt_paths(basedir):
"""Adds paths to experiment_management modules to sys.path
Input:
basedir: The regression suite's base directory.
"""
expr_mgmt_dir = get_expr_mgmt_dir(basedir)
expr_m... | [
"dshrader@979fb63a-54b4-4514-8d67-9ab8ea1b59df"
] | dshrader@979fb63a-54b4-4514-8d67-9ab8ea1b59df |
06e0def26f3d9503032cd09607f5df919acbed38 | ed2229caf4089532e19e227276e98a910b228b65 | /test.py | 308cba21a2cc272cedf91429d96f2b7ab5175e7f | [] | no_license | RenmaHirano/PCM_DanceMovie | b9cbd70be3b0c0e823248d9a70df575f9f543c78 | 25a3e66032e83ba0f89e545194bef1cbf82e03f1 | refs/heads/master | 2023-09-02T19:18:59.541760 | 2021-11-11T16:46:24 | 2021-11-11T16:46:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | from sklearn.datasets import fetch_openml
import numpy as np
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
x = np.linspace(0.2,1,100)
y = 0.8*x + np.random.randn(100)*0.1
X = np.vstack([x, y]).T
np.random.shuffle(X)
print(X)
print(type(X))
print(X.shape)
pca = PCA(n_components=2... | [
"everydaysai@gmail.com"
] | everydaysai@gmail.com |
693b5d23fcf762329e9caaaf81cb5e80096e70d6 | f26d67e3e9f8b90e5d6243279a1c2ce87fa41d46 | /src/prodstats/cq/tasks.py | f48b077503fffa1d9e9d88a31617f973023e977b | [
"MIT"
] | permissive | OCB-DS/prodstats | cf554e3abee651463e9f81606d4b633f464658a7 | 4ff5a6e0b0d6152af2d7e1f3844ede2d33ad4824 | refs/heads/master | 2022-11-25T15:30:06.988683 | 2020-08-02T16:08:05 | 2020-08-02T16:08:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,803 | py | import asyncio
import itertools
from datetime import timedelta
from typing import Coroutine, Dict, List, Union
import pandas as pd
from celery.utils.log import get_task_logger
from celery.utils.time import humanize_seconds
import calc.prod # noqa
import config as conf
import cq.signals # noqa
import cq.util
import ... | [
"brocklfriedrich@gmail.com"
] | brocklfriedrich@gmail.com |
a7f65228a1a5c133e9d806213124e862f5e27193 | fab99203d20d8755a055045b5117ea8a77ab9597 | /spanningForest/txn2Phase/tools/run_once.py | f59a2b1c3f648ed2edae85039fe10d7491591f62 | [] | no_license | yuxiamit/LiTM | 2ee787a9d8b433fbfbb1219e9355a9a0512e8dab | d118033ed4dd3b42f45b85f61908015fac8b5293 | refs/heads/master | 2020-04-18T12:08:47.797136 | 2019-08-19T19:57:01 | 2019-08-19T19:57:01 | 167,524,994 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,135 | py | batchRanges =[
#500, 700, 1000, 2000, 3000, 5000,
10000, 20000, 50000, 75000, 100000, 200000] # [100, 200, 300, 500, 700, 1000, 2000, 3000, 5000, 10000, 20000, 50000, 75000, 100000, 200000]
import os
import sys
import subprocess
trials = 10
executable = "MIS"
inputFile = "randTI"
if len(sys.argv) > 1:
# inputFile ... | [
"yuxia@mit.edu"
] | yuxia@mit.edu |
a7833550c3629ae6e2e33022924a2e4d51d2dcc7 | 77653811587e0d9285380ae866952b3fcf09ae80 | /dj4e-samples/views/views/settings.py | 8bb54857eb0d6da3145fd0e858926655dc91be25 | [
"MIT",
"CC-BY-3.0"
] | permissive | natc23/SI_364_Local | 477c82a74f7ac34bcca9db33c11ea6ec1c333cd5 | e72c98bef29ee9d6cdb1b9c120152ffc007293d2 | refs/heads/master | 2020-04-24T00:37:57.639011 | 2019-04-12T01:17:48 | 2019-04-12T01:17:48 | 171,571,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,118 | py | """
Django settings for views project.
Generated by 'django-admin startproject' using Django 2.0.5.
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/
"""
import os
# B... | [
"nataliecieslak@yahoo.com"
] | nataliecieslak@yahoo.com |
408d71b6a801104b746897a13cfd9e7746ddc72b | 9274ef055268897fa399803e12218aaf0698dd72 | /desire_lines_dialog.py | f567d886d87144010717eb3a18f5929ba4aa96bb | [
"MIT"
] | permissive | silky/AequilibraE | 730029a1e0b373d049e299cde358e653c107de0b | 2d69395cc122637621beed12c705c836acc47d20 | refs/heads/master | 2020-12-24T05:48:06.006634 | 2016-10-01T11:02:50 | 2016-10-01T11:02:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,108 | py | """
/***************************************************************************
AequilibraE - www.AequilibraE.com
Name: Dialogs for matrix manipulation tools
-------------------
begin : 2014-03-19
copyright : TOOLS developers 2014
... | [
"veigacamargo@gmail.com"
] | veigacamargo@gmail.com |
11c47ab14698b2ea99c0247d3d4034c86eae58a7 | 633229ef106b4a210b85c85fdf5383c4f1d9fd2d | /fashion/migrations/0001_initial.py | 50e3bdb9f72a86b7cee52a2ffda2b86994fcacab | [] | no_license | corymunvo/target | 3520f233fb55743e78faba2c676d2fd74bb18445 | cfa5827af509a0b02173bae1d8fc812c410e5a16 | refs/heads/master | 2022-02-06T09:16:35.842973 | 2022-01-11T16:48:00 | 2022-01-11T16:48:00 | 220,041,333 | 0 | 1 | null | 2022-01-04T16:33:47 | 2019-11-06T16:27:45 | HTML | UTF-8 | Python | false | false | 2,844 | py | # Generated by Django 2.2.7 on 2019-11-13 20:41
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
import phonenumber_field.modelfields
class Migration(migrations.Migration):
initial = True
dependencies = [
migra... | [
"cory.norris@munvo.com"
] | cory.norris@munvo.com |
47c6a982193cd3b29095c09aed8f2ec5fc372038 | eb4f62f15d9c9cb20c297f71417e9d1743bd16d3 | /desk2m.py | 6e611ff8d30bc4f3474b95fdef755fef0fd3ab54 | [] | no_license | UWCCDL/scripts | 47725820f292a1710e2debc394d662b582274ccc | 0b185fce356114d055638f2ac2bbaee1ec173e18 | refs/heads/master | 2021-01-22T01:43:06.936492 | 2019-01-24T02:58:41 | 2019-01-24T02:58:41 | 102,228,966 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,025 | py | #! /usr/bin/env python
## ---------------------------------------------------------------- ##
## DESK2M
## ---------------------------------------------------------------- ##
## A file that calculates the onset of experimental events (grouped
## by condition) in the DESK study. Event onsets and durations are
## written... | [
"andrea.stocco@gmail.com"
] | andrea.stocco@gmail.com |
4e2a5aac3f2d8596ac600f55307f6e113b1f375b | 71da259f71428648d4285b1b4863ec2b7641e58c | /ecom/website/filters.py | 561533e588086d70c2830bed74278b2c4dbe38da | [] | no_license | rafimuhammad01/e-com | 8a58d0ccff27516da260b41c180c703fa22e76b3 | 75d451bfc10075090d88d5a16dbd03f626ff72ef | refs/heads/master | 2023-02-18T08:48:26.144483 | 2021-01-15T08:56:54 | 2021-01-15T08:56:54 | 291,625,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | import django_filters
from .models import Product
class ProductFilter(django_filters.FilterSet) :
class Meta:
model = Product
fields = {
'price' : ['lt', 'gt'],
'review__rate' : ['iexact']
}
class ProductSearch(django_filters.FilterSet) :
class Meta:
... | [
"rafi10muhammad@gmail.com"
] | rafi10muhammad@gmail.com |
045c865fc678eba2750f62646d81f6c24d5e15cb | 7e93b1c33045b4c03054f42b6a2b800279b12a9b | /core/cache/backends/redis/compressors/base.py | 8d9e74deabf56d11d14abf6ab944ca71c3f9526c | [
"MIT"
] | permissive | anthill-arch/framework | 6f8036980667843f2be1414850255cf6a10e2dcd | a6c238a62ae9c3fb319d12e77f7e9047aab75e8d | refs/heads/master | 2020-05-09T06:01:31.186830 | 2019-08-23T13:52:43 | 2019-08-23T13:52:43 | 180,988,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | class BaseCompressor(object):
def __init__(self, options):
self._options = options
def compress(self, value):
raise NotImplementedError
def decompress(self, value):
raise NotImplementedError
| [
"x55aah@gmail.com"
] | x55aah@gmail.com |
af0c6fba2ed9e0375be3b9ccccd00341cc31fc0c | e9275362bc90afb1218c7035db5e993d2cf256aa | /learn_python_the_hard_way/mystuff/ex33.py | f45dfb48a9cb8a73c44b69cf6d86ae7add84bf72 | [] | no_license | hanson377/textbook_notes_and_exercises | 620cd844926a0553c3dfc46634ae991dadbe57eb | 09c60c523ac8730c054c535515e9cda7271d642e | refs/heads/main | 2023-06-05T20:57:54.007065 | 2021-07-07T11:54:15 | 2021-07-07T11:54:15 | 383,776,330 | 0 | 0 | null | 2021-07-07T11:54:16 | 2021-07-07T11:33:58 | Python | UTF-8 | Python | false | false | 359 | py |
def thing(max_i,increment):
i = 0
numbers = []
while i < max_i:
print "at the top i is %d" % i
numbers.append(i)
i = i + increment
print "numbers now: ", numbers
print 'at the bottom i is %d' % i
print 'the numbers: '
for num in numbers:
print num... | [
"hanson377@gmail.com"
] | hanson377@gmail.com |
4e515a7ffea62d3d0983fe8800071ecacb2849a2 | 14c712219774aef5a620cde4cd3150ac31cca512 | /jjwxc/parse_user.py | a4155212fddb99dd41ceb2e3ad23c0996cf401c5 | [
"MIT"
] | permissive | jeffmxh/spider | 8d9a6e41852c84967bb44c170927a9e6a6aa96af | bec2376a05a64185d956760d9b143424c639c33f | refs/heads/master | 2021-05-11T23:57:38.861728 | 2019-01-06T07:55:47 | 2019-01-06T07:55:47 | 117,522,604 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,527 | py | import pandas as pd
import threading
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
import argparse
import re
import os
import time
import random
import logging
'''
获取html原网页文本
参数:url,即要打开的网页链接
返回值:为html网页文本
'''
class Spider:
def __init__(self):
self.headers = {'user-agent': ... | [
"jeffmxh3946@gmail.com"
] | jeffmxh3946@gmail.com |
abc977568852cbb171525797863a63f3f63231a4 | b314b8ccfdb83d84dd54df341a3191ed7aedab08 | /text_categorizer/trainer.py | b36437de54f433634f6c2d4511dc935614a18ec9 | [] | no_license | LuisVilarBarbosa/DISS | 9dc817c18197795277a81c1ab2aa8a00f014fd4d | d276b4f3e98a811031da3971587bf15fb292fb7d | refs/heads/master | 2020-04-22T22:09:19.391734 | 2019-07-26T13:43:29 | 2019-07-26T13:44:22 | 170,697,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,644 | py | #!/usr/bin/python3
# coding=utf-8
import classifiers
import pickle_manager
from os.path import isfile
from pandas import read_excel
#from profilehooks import profile
from FeatureExtractor import FeatureExtractor
from functions import data_frame_to_document_list
from logger import logger
from Parameters import Paramet... | [
"luisfernandobarbosa@live.com.pt"
] | luisfernandobarbosa@live.com.pt |
f6c7e47f18fecf5204af653cae821b0dbc934729 | 3a60b8935f809e300405214a66d949f0042e7e46 | /src/map/tile.py | de575e0a0d16478ca90b3e9f8119073989688f77 | [] | no_license | stellarlib/centaurus | e71fe5c98b94e8e575d00e32f55ba39fe71799e6 | 896ae73165f3f44dfb87378ef2635d447ccbccae | refs/heads/master | 2020-08-29T00:02:47.294370 | 2020-07-06T20:06:02 | 2020-07-06T20:06:02 | 217,860,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,355 | py | from random import randint
from src.map.hex_map_properties import EdgeID
class Tile(object):
n = 15
GRASS, WOODS, WATER, ROCKS, SAND, CLAY, ROAD, WALL, EXIT,\
EXIT0, EXIT1, EXIT2, EXIT3, EXIT4, EXIT5 = range(n)
OPEN = {GRASS, ROAD}
IMPASSABLE = {WALL, ROCKS, WATER}
OBSTACLE = {WALL, ROC... | [
"marzecsean@gmail.com"
] | marzecsean@gmail.com |
8fcb9b84855a9a8bec534729291e1ce0c271749d | c8420732ae1b2c46a5315fc32b1c37dc40bbe41f | /Rohan2/urls.py | 9c6a8e19f1e1a232eccb89705f916cde8bdc92a6 | [] | no_license | Niranjan4712/Django-hyperlinks-with-creating-specified-html-page | 95c34f14bb3434aaabbf073060c6531fc6e8b38a | f235592575e492f432c3331a7bb8f27b386ff208 | refs/heads/main | 2023-04-10T11:26:35.942719 | 2021-04-29T18:18:50 | 2021-04-29T18:18:50 | 358,689,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | """Rohan2 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | [
"niranjan.patil.8888@gmail.com"
] | niranjan.patil.8888@gmail.com |
b049e56da653b855a8ad4584671e6605341e7f9f | 50c02a07926f706a9de70b6cc2576c3daf3c441e | /Maya/Python/digital37/maya/lighting/test.py | f47a0bc42d69b2354552ea3d07de3bb02055e340 | [] | no_license | kizikay/digital37 | d24204a0ae68ef84c0778333ddaa01137f06731f | 9bcb111c013cbbd51b36f3ba32346a78349755cf | refs/heads/master | 2021-05-29T12:57:36.466534 | 2012-08-05T17:11:25 | 2012-08-05T17:11:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,326 | py | import maya.cmds as cmds
import re
import os
def getShadingSG(shapesList):
for shape in shapesList :
#def SYH_changeMapDetail(detail):
#
# noTexture = False
# pattern = "."
#
# sel = cmds.ls(sl = True)
# if(len(sel) <= 0):
# print "no object are selected"
# ... | [
"hongloull@gmail.com@e21bde55-81c9-5408-e5b9-2d3a39b4433e"
] | hongloull@gmail.com@e21bde55-81c9-5408-e5b9-2d3a39b4433e |
6d5a2f9b2ddc3bfe891a3c7d27a364e5c4cb78eb | cdbb11473dc8d34767a5916f9f85cb68eb2ca3f2 | /sde/migrations/0036_auto_20180729_1518.py | a313a94deec723d4c8b6e96c080fc6923b8eec30 | [] | no_license | skyride/evestats | fb2a1a248952771731dcfecadab7d02b1f08cd4b | 4bd2153f65c084b478272513733dcc78f9a0ef98 | refs/heads/master | 2020-03-23T13:50:19.216870 | 2018-08-05T19:19:47 | 2018-08-05T19:19:47 | 141,640,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 587 | py | # Generated by Django 2.0.7 on 2018-07-29 15:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('sde', '0035_auto_20180729_1456'),
]
operations = [
migrations.RemoveField(
model_name='attribut... | [
"adam.findlay@mercurytide.co.uk"
] | adam.findlay@mercurytide.co.uk |
16929652a578a13f35466e8c785048bd1a45f63a | f9a2ac4593462c669ec2cf996a01d3706c6bb955 | /bookmarks/views.py | be9ec2b1390839acb139afc4935ab43cc2f95b90 | [] | no_license | rogatzkij/readhelper-be | 2287a341780509a0d76ac69b9042da9222230388 | 18fe3e4263a431c29f84d51c9136f1b620568bc3 | refs/heads/master | 2022-04-04T13:39:46.305275 | 2020-01-04T14:30:46 | 2020-01-04T14:30:46 | 225,032,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,672 | py | from django.db import IntegrityError
from django.http import JsonResponse
from django.utils.timezone import now
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework.views import APIView
from bookmarks.models import Bookmark
from bookmarks.serializer import BookmarkSer... | [
"rogatzkij@yandex.ru"
] | rogatzkij@yandex.ru |
be136d34d8b79c6aa596f970cf3d0bd28b394505 | 965da23a89791f445334fd7e23f032435bf993c4 | /dturm.py | 10ce1d10771f2bee7232bbf9443070455fc39296 | [
"MIT"
] | permissive | aktech/dturmscrap | b669c9d461fa89a6d4b9ff146796025d6df2e242 | b6046daa4deec5782f98069f57c4c96262443563 | refs/heads/master | 2021-01-01T16:19:00.902853 | 2015-11-16T19:21:33 | 2015-11-16T19:21:33 | 40,501,549 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,728 | py | # DTU RM Scrapper
# Author: AMiT Kumar <dtu.amit@gmail.com>
# Version: 0.1
import sys
sys.path.insert(0, 'libs')
import webapp2
from google.appengine.api import mail
from google.appengine.ext import db
import pickle
import logging
import cookielib
import urllib2
import mechanize
from bs4 import BeautifulSoup
# Glo... | [
"dtu.amit@gmail.com"
] | dtu.amit@gmail.com |
f2bad36195e63f0b3cb1fdf493ed82c0e050032f | 7dbb0b7c634fe66bfbe10c16307495ea61f6831b | /shared/admin.py | 9f677da1adde630d62cda4cdd5a1de8fdee5040f | [] | no_license | dev12aiatic/Multitenant | d15c93bf28c513b2e99c4ad36d1982607a549de2 | 6103562c0628a43a39358c3bc6f26a934d126d2d | refs/heads/master | 2022-11-06T07:19:25.658735 | 2020-06-23T17:31:56 | 2020-06-23T17:31:56 | 273,732,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | from django.contrib import admin
from shared.models import Client, Language
# Register your models here.
admin.site.register(Client)
admin.site.register(Language) | [
"innarov@hotmail.com"
] | innarov@hotmail.com |
7bba2b545e38840999f2778d1537f8684c064ee8 | 946ead8406872492ca4763e96b4d6a3fb5c05a81 | /venv/Scripts/easy_install-3.7-script.py | c84b105c51d98b7171cf4562cb748e94afc3d9ac | [] | no_license | Hortmagen21/Flex | 14249ad9d8563af4807f29bce935d991ab582d8f | db8cc5a0f11af3c6678e2e3631cc296efb44f1db | refs/heads/master | 2023-01-24T14:49:59.074381 | 2020-09-21T12:27:44 | 2020-09-21T12:27:44 | 243,205,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | #!C:\Users\Max\Flex\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.... | [
"max_yudkin@ukr.net"
] | max_yudkin@ukr.net |
5dd88af5ae5e82c13194560776281ec8a542cab7 | 93ad65a519037b2a6c9363f356a00b3e51350537 | /djR/conf.py | c80052a26cce28b6dc8ddf5b5a232ed373f0e040 | [
"MIT"
] | permissive | JheanMarllos/django-R | 6ccc9b42dbca50c803c740315fbeda136be1ad9c | 3c1f8adfa2a16ad9cf9856e4dd7cd889e7a3c229 | refs/heads/master | 2020-05-30T12:42:49.200732 | 2019-06-02T11:37:49 | 2019-06-02T11:37:49 | 189,741,022 | 0 | 0 | MIT | 2019-06-01T14:16:22 | 2019-06-01T14:16:22 | null | UTF-8 | Python | false | false | 418 | py | # -*- coding: utf-8 -*-
from django.conf import settings
RETHINKDB_HOST = getattr(settings, 'RETHINKDB_HOST', 'localhost')
RETHINKDB_PORT = getattr(settings, 'RETHINKDB_PORT', 28015)
RETHINKDB_USER = getattr(settings, 'RETHINKDB_USER', None)
RETHINKDB_PASSWORD = getattr(settings, 'RETHINKDB_PASSWORD', None)
DEFAULT... | [
"synwe@yahoo.fr"
] | synwe@yahoo.fr |
b70b66f6096c21bc356db17ef7a9da3c02eaf719 | f8bb2d5287f73944d0ae4a8ddb85a18b420ce288 | /python/basic/for/format_obj.py | df47968c9dd34f209133f19983ab9c23ed9b0fe2 | [] | no_license | nishizumi-lab/sample | 1a2eb3baf0139e9db99b0c515ac618eb2ed65ad2 | fcdf07eb6d5c9ad9c6f5ea539046c334afffe8d2 | refs/heads/master | 2023-08-22T15:52:04.998574 | 2023-08-20T04:09:08 | 2023-08-20T04:09:08 | 248,222,555 | 8 | 20 | null | 2023-02-02T09:03:50 | 2020-03-18T12:14:34 | C | UTF-8 | Python | false | false | 46 | py | for 変数 in オブジェクト:
処理
| [
"yusuke059@gmail.com"
] | yusuke059@gmail.com |
1e9a589c10d0c25d21f869a1ea2f538fb5c59aff | ad313a7f3258ce0065d3f3f63aea48ed57052ce4 | /Titanic/file.py | 966e16377537f8b1daabce20b2f38b4233f4665b | [] | no_license | lqzzz/ML | fd4cdd6f85495643d73dacea2404909d098f4b97 | 02fac41a6db9d2a846c249de0efd94b868150ed5 | refs/heads/master | 2021-08-30T22:02:37.923920 | 2017-12-19T15:36:58 | 2017-12-19T15:36:58 | 114,114,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | import numpy as np
import pandas as pd
import tensorflow as tf
def TrainData():
train = pd.read_csv('train.csv')
test = pd.read_csv('test.csv')
test.loc[test.Age.isnull(),'Age'] = 30.0
train.loc[train.Age.isnull(),'Age'] = 29.0
train.Cabin = train.Cabin.isnull().apply(lambda)
# print(train[tra... | [
"616478774@qq.com"
] | 616478774@qq.com |
be1a846751a9b1a0055e8a81bbfe3ca6df2c437e | 173f6c30ec4e5e3eb99ecf493e9019828270f5d3 | /main.py | ac93f58ecffa8176285a3e5857c06808694f3832 | [
"MIT"
] | permissive | DrLuke/FEMM-bode | 14d1468d7f623a0fa874b9bb7d25b0feb9eb79f3 | 851397f914fbb114707ffa1202f9c3ac3a37bc37 | refs/heads/master | 2021-01-19T16:48:37.216579 | 2017-07-05T13:27:22 | 2017-07-05T13:27:22 | 88,288,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,234 | py | import subprocess
import matplotlib as mpl
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import numpy as np
import re
import math, cmath
from scipy.interpolate import griddata
import os
from femm import FEMM, FEMMfem, FEMMans
from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu, ... | [
"Lukas@Jackowski.de"
] | Lukas@Jackowski.de |
df6b3cdaa09073a8075e928c7ef9df25a4f7150f | 1f3a2cee3654c11586b30151fd9a3fc6fd705c0a | /deep_learning/pic.py | 5488840c452ac9667371b0542085d8a928c76634 | [] | no_license | 2020668/AI | 24ff42cefacac3f397e7a6f54dda7e9d741f2e03 | 3e1a78a6348e453b0f3e8862a784105620a22bc1 | refs/heads/master | 2020-12-09T02:03:55.311209 | 2020-02-10T15:36:26 | 2020-02-10T15:36:26 | 231,186,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | import tensorflow as tf
print(tf.__version__)
# 输出'2.0.0-alpha0'
print(tf.test.is_gpu_available())
# 会输出True,则证明安装成功
| [
"keen2020@outlook.com"
] | keen2020@outlook.com |
c74e724a225f8334412b1593428a285b7c2f0acd | 69eca466d7f184e9cb100572ba1dee4264d2e0c8 | /organization/migrations/0001_initial.py | bdd91ae95d41f35a0106038179b5451172ed4734 | [] | no_license | bbkchdhry/django-crud | 1247dafe55d522994ae0d070e669a67b7be1d553 | a2724b0a6c611ae3759ae7b4fd63315a66a921c4 | refs/heads/master | 2021-08-29T23:26:33.299576 | 2017-12-15T08:37:02 | 2017-12-15T08:37:02 | 114,346,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,353 | py | # Generated by Django 2.0 on 2017-12-15 07:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
... | [
"bbkchdhry@gmail.com"
] | bbkchdhry@gmail.com |
69760eac1ab88994ee40c1bdb95cbc7b06efb5dc | 4e8cefd285579510b04667f19884aefe0ed6ad4a | /common/utils.py | a075478e7fd5de161942df411ff215bc38069bc2 | [] | no_license | duguhuo/neural-subgraph-learning-GNN | 75ee22ea213d317844bf0de97684e00e3ff15df0 | 4d074cbc0fa9d81defef746302e62b1b9a97791d | refs/heads/master | 2023-06-15T08:16:36.572865 | 2021-03-28T08:53:49 | 2021-03-28T08:53:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,486 | py | from collections import defaultdict, Counter
from deepsnap.graph import Graph as DSGraph
from deepsnap.batch import Batch
from deepsnap.dataset import GraphDataset
import torch
import torch.optim as optim
import torch_geometric.utils as pyg_utils
from torch_geometric.data import DataLoader
import networkx as nx
import... | [
"azw7@cornell.edu"
] | azw7@cornell.edu |
9ba384d7416217505108520e70e49bd802012c66 | 7b3009e019e081667df67c6b41328b5db632b898 | /instances/shadows_of_infinity.py | 34a98b9e889adc772c3ce344061ead7226547267 | [
"MIT"
] | permissive | frostburn/multibranch-mandelbrot | d1e2cc6bce6ab8f065b678fb2133bd3057b832d5 | 84e4887ffc90a5338ae448ced6f62fcf40bc11a1 | refs/heads/master | 2023-08-02T18:20:56.671175 | 2021-09-28T09:57:58 | 2021-09-28T09:57:58 | 287,219,716 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,926 | py | import os
import sys
sys.path.insert(0, os.path.abspath('.'))
from pylab import *
from mandelbrot import mandelbrot, mandelbrot_generic, buddhabrot
import nonescaping
import classic
from coloring import red_lavender, black_multi_edge, rainbow, gray, sepia, subharmonics, creature, white_multi_edge
import color_gradient... | [
"lumi.pakkanen@gmail.com"
] | lumi.pakkanen@gmail.com |
27c988fce97f7f978cfb139a5db2015c8984802f | a0515802638e793f48d859c4e0d1287aaee74b9a | /003/solution.py | 0c4df95f763fee86fe0e70830dd72e898a6aa78e | [] | no_license | samlobel/PROJECT_EULER_SOLUTIONS | 8e782e922a9cbb9cb032a53a40a82331775ee439 | ed58261b46d76267005ee122830c549549e0e8df | refs/heads/master | 2021-01-10T03:57:17.240744 | 2016-01-25T20:31:59 | 2016-01-25T20:31:59 | 48,966,573 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py |
# def prime_sieve(max_num):
# primes =
# start = 2
from math import sqrt
# def largest_prime_factor(num):
# # square_root = int(sqrt(num))
# # print square_root
# i = num - 2
# while i > 0:
# if num % i == 0 :
# # print num
# return i
# i -= 1
# if i % 1000 == 0:
# print i
# pass
def lar... | [
"samlobel@yahoo.com"
] | samlobel@yahoo.com |
b99c7afcd7667375b863d78b5cdc537e1e0d7ecb | 5a4cb1c076b3a0e4bbd9057f3e8073c906ae45fc | /tests/price_feed_test.py | 79026f8af73ecd5414d4a4200e0fb4930930ca8c | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | quantadex/DEXBot | 5c7d8749ce815c0442dd109862aa86a23345eff9 | 32082b8b5e89fc9b6311969b2a9e68b4e9b57ddd | refs/heads/master | 2020-04-23T04:59:51.795269 | 2019-04-11T21:33:09 | 2019-04-11T21:33:09 | 170,926,293 | 0 | 0 | null | 2019-02-15T20:48:14 | 2019-02-15T20:48:13 | null | UTF-8 | Python | false | false | 3,116 | py | import unittest
from dexbot.strategies.external_feeds.price_feed import PriceFeed
from dexbot.strategies.crossmarket.strategy import CrossMarketStrategy
from dexbot.strategies.crossmarket.external_market import ExternalMarket
from dexbot.strategies.crossmarket.internal_market import InternalMarket
from bitshares import... | [
"quocble@gmail.com"
] | quocble@gmail.com |
a64527d978a39e55af993411eebb1df7f9478e49 | ff6aae6ae220f2629821f8307429b13cb20a44a7 | /cli.py | 9740bee59f0599a1133ebe1637763c49ade95c56 | [
"MIT"
] | permissive | Filipe-Barbos/Projeto-Watch-Dogs | 4759b4c47a43b240de6b2ac34707d37f4c30ff45 | 100254404219112779725fdc93be7900c6d9a078 | refs/heads/master | 2020-03-26T09:16:30.365089 | 2018-08-14T16:13:56 | 2018-08-14T16:13:56 | 144,743,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,786 | py | from program import computer, cpu, memory, tools, disks, network
import sys
# Get arguments from terminal
params = sys.argv
# Checks if was send any param
if len(params) > 1:
if params[1] == "-os" or params[1] == "-operationalsystem":
print("Operational System: ", computer.os())
print("Version: ", computer.osVer... | [
"filip.barbos@gmail.com"
] | filip.barbos@gmail.com |
b6fb4455d07af06981d26f6564e05f5b37c2435e | c07ea84e1dc86e63209bf81bad2f4c13010f2d65 | /package/mtwow/general/user.py | a42b96127c1d499b8391974fec9ceb2f1d810457 | [
"MIT"
] | permissive | periodically-makes-puns/phoenix-mtwow-bote-py | ca433dbeef37106c4d574dfa1452eb197c6da30a | ebef75e8a48d97c54b128c066d49d2ccd21a5dc9 | refs/heads/master | 2020-09-03T02:05:16.339138 | 2019-11-14T03:44:44 | 2019-11-14T03:44:44 | 219,357,646 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,099 | py | """
Defines the functions needed for the common user.
"""
from . import sqlutils
from ...generic.utils import data
import sqlite3
import random
import logging
from typing import Tuple, Union, List, Callable
sql_logger = logging.getLogger("sqlite3")
@sqlutils.handleSQLErrors
def signup(conn: sqlite3.Connection, uid: in... | [
"eyang10000@gmail.com"
] | eyang10000@gmail.com |
5de0f9c4b170ee96a23070ab179376033873edf0 | 3436a1502b344e92351c03a03a2e97e9dc0b3e00 | /chapter4/code/classifier-fast.py | 3283e6a907145eb9ea64e8a5797152456d44f9b9 | [] | no_license | Rajiv-Nayan/Machine-Learning | 0c47321c59938600f6f77ab9a6f7de5637598b9e | 3850eb7c4ce1018c92ccf6a228174599613cfba7 | refs/heads/master | 2022-11-30T04:26:21.882330 | 2020-08-11T16:09:59 | 2020-08-11T16:09:59 | 284,464,237 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,188 | py | import os
import numpy as np
from collections import Counter
from sklearn.metrics import accuracy_score
def make_Dictionary(root_dir):
all_words = []
emails = [os.path.join(root_dir,f) for f in os.listdir(root_dir)]
for mail in emails:
with open(mail) as m:
for line in m:
... | [
"rajivnayanu23@gmail.com"
] | rajivnayanu23@gmail.com |
2e6db1095be14073089b39307e04d983490684cd | 5e32c5c4db30edfbbd8016325dd0d48ddf672d4f | /integrationtest/vm/hybrid/test_stub.py | f611a2d19a6a0efa47dc907892e8d11930e7e680 | [
"Apache-2.0"
] | permissive | welldoer/zstack-woodpecker | 7519e0cffe98cba84b7774c8e8b296c2d1318615 | e0cea9672c764858fc124fa0b02111fc31b2af0f | refs/heads/master | 2020-03-28T22:11:50.431319 | 2018-09-14T10:08:27 | 2018-09-14T10:08:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51,442 | py | '''
Create an unified test_stub to share test operations
@author: Youyk
'''
import os
import sys
import time
import random
import commands
import threading
import urllib2
import functools
import zstacklib.utils.ssh as ssh
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_util as test_util
imp... | [
"legion.xiong@gmail.com"
] | legion.xiong@gmail.com |
6524ea94820092e4a5ac123ed4c71fb81f6f7c7e | 764001a417797e484d20b90e902dce6e0cc41c97 | /code/models_single_xgb_tree.py | ce587d370ff8141143498bc47cc5fd029f25860f | [] | no_license | apex51/kaggle-home-depot-search-relevance | 39145f8e6d2f944e5e8f50e9b149bd2041d74a92 | 44b439e5ef462dcdde2cd19ff879ca9086639536 | refs/heads/master | 2021-01-19T12:22:03.853816 | 2017-03-09T14:14:11 | 2017-03-09T14:14:11 | 84,448,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,040 | py | import numpy as np
import pandas as pd
import pickle
import xgboost as xgb
# from sklearn.cross_validation import train_test_split
from sklearn.cross_validation import KFold
from sklearn.metrics import mean_squared_error
from datetime import datetime
from hyperopt import fmin, tpe, hp, STATUS_OK, Trials
PROJECT_PATH ... | [
"jiangh@dxy.cn"
] | jiangh@dxy.cn |
0be3ce62f1272fed0b3e68f1055e1809062aab96 | 1f14921d3372a0570f39d0d000d4de560823aea7 | /src/day1_7/day5_2.py | 2be276d7d1e87af3544e2b840d5c048145c62103 | [] | no_license | YangYishe/pythonStudy | 8e47346f9b9da5724e0ba23cd67666c7e20e9794 | 825c7601fd7f7a635dd309fce339e456ca66a110 | refs/heads/master | 2020-08-08T09:39:45.541771 | 2019-10-22T09:07:25 | 2019-10-22T09:07:25 | 213,806,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 595 | py | """
说明:百钱百鸡是我国古代数学家张丘建在《算经》一书中提出的数学问题:
鸡翁一值钱五,鸡母一值钱三,鸡雏三值钱一。
百钱买百鸡,问鸡翁、鸡母、鸡雏各几何?
翻译成现代文是:
公鸡5元一只,母鸡3元一只,小鸡1元三只,用100块钱买一百只鸡,问公鸡、母鸡、小鸡各有多少只?
"""
for a in range(0, 101):
for b in range(0, 101):
c = 100 - a - b
if a * 5 + b * 3 + c / 3 == 100:
print('公鸡%d只,母鸡%d只,小鸡%d只' % (a, b, c))
... | [
"YangYishe@users.noreply.github.com"
] | YangYishe@users.noreply.github.com |
a23a94fd41f8b4ba1969672db4aa44e1875101a5 | e36bdda1c178b409f581681a4633a9da5551425c | /NIGGA.py | 01670a4290aafec729142c97f09b8f0d7a033b76 | [] | no_license | jamakedo/MAMORY | c94d4e84715f9fab323c6c9add09a097734c0a01 | 0e53cff31a7d4b2786783a3a410ef1d444c60205 | refs/heads/main | 2023-08-04T02:37:14.214809 | 2021-09-24T13:55:15 | 2021-09-24T13:55:15 | 409,970,546 | 0 | 0 | null | 2021-09-24T13:38:38 | 2021-09-24T13:18:39 | null | UTF-8 | Python | false | false | 51 | py | ValueError
BaseException
TypeError
SyntaxError
| [
"noreply@github.com"
] | jamakedo.noreply@github.com |
9782f416c9447c9bea34e745ec11be24c68003db | 8dbba1dc3b0a9cb3972e6fee6f41459d6fa56d78 | /ch09/ex9-10.py | b644f50c93a1b0bc17981d880b07bc7f5e71550d | [] | no_license | freebz/Foundations-for-Analytics-with-Python | 8da8308981538266e8e982ffcd080657058144ca | 736b2075e339a679905071b39201e6a575f59229 | refs/heads/master | 2020-03-15T21:53:43.100954 | 2018-05-06T18:07:59 | 2018-05-06T18:07:59 | 132,363,669 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | import numpy as np
from numpy import concatenate, vstack, r_
array_concat = np.concatenate([array1, array2], axis=0)
array_concat = np.vstack((array1, array2))
array_concat = np.r_[arry1, array2]
| [
"freebz@hananet.net"
] | freebz@hananet.net |
4a699bc62ac3bdeec338f860c09e2a05aefe9edf | 7a6c9a4e38e4c7271bddd3c51ff8fb1bfa714c87 | /4/1.py | 923a108704b6cead829194f7df0776d896c91fc0 | [] | no_license | simonsayscodes/School | bf934e2a32b01e063d5f3fa49e4a4668b566518c | 377de06267ab6744992fd4f241c64cb047ba8c26 | refs/heads/master | 2023-02-23T04:49:39.232936 | 2021-01-24T22:53:03 | 2021-01-24T22:53:03 | 292,821,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | name = "Pog" # Använd inte () när det är name
age = 18,77
print(f"Ajad {age} är riktigt jobbig")
if name is "Simon Jendman": #Du glömde : tänk alltid att om du använder if name is / is not använd :
print ("Och ska åka snart")
elif age == 19: #Samma sak som tidigare med if name is fast elif
print ("snälla di... | [
"70754158+simonsayscodes@users.noreply.github.com"
] | 70754158+simonsayscodes@users.noreply.github.com |
41f393d491852164a2cfb96a4570ea66239f8b85 | 2ae046e1e6329479275fb15e318c4db80de96edd | /rider_skills_tree.py | 71593a54b256d1c3b9a211b66d7a3282e1b083b4 | [] | no_license | pcwong13/wardragons-gamepedia | cb658ed5520e8db92bba9d7339dac95850b59cd9 | 327dfe4b9d80fa2135896cee405e3760db2a4c30 | refs/heads/master | 2021-07-18T10:46:36.940214 | 2020-08-10T17:07:06 | 2020-08-10T17:07:06 | 204,075,528 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,483 | py | #!/usr/bin/env python
import csv
import riderdata
import requests
import wikilogin
# -----------------------------------------------------------------------------
# Main processing loop
# -----------------------------------------------------------------------------
#
# rider skills tree
#
for info in riderdata.info_d... | [
"noreply@github.com"
] | pcwong13.noreply@github.com |
9476e4db2cbac69b7e83f6265beadd71f0c0b4ff | b60605f75050a9987acd0838df5cb107d1849962 | /resources/erase.py | ec00db39af7254932d96361d6413b400a02ba736 | [] | no_license | MatteRubbiani/2b | 01c192a46f1ee09fabe8728531b76ffd27d4e7c7 | 2c3dc541c313b7b30f80ea781d96238101ec494a | refs/heads/master | 2020-04-18T07:57:57.279525 | 2019-02-05T21:46:21 | 2019-02-05T21:46:21 | 167,378,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 602 | py | from db import db
from flask_restful import Resource, request
from models.users import UserModel, select_all
class Erase(Resource):
def delete(self):
mail=request.args.get('mail')
user=UserModel.find_by_mail(mail)
if user:
users=select_all()
if users:
... | [
"Matteo@iMac-di-Maria.home"
] | Matteo@iMac-di-Maria.home |
f3409674f6082e19e2cdbb91ddc6cc1956ae779f | 9aea1b19a8681b4c6b15d628a080982fb2d98b39 | /mianJing111111/Google/Implement Queue using Stacks.py | 2e144185623f255bcbf62dc1b0ca3271002fcff4 | [] | no_license | yzl232/code_training | ee7612efc6f166742fcf48e1af715f57a624d3aa | fc165027c3d7b1fec58ebfad2f9ada275a6b8c03 | refs/heads/master | 2021-01-21T04:32:02.522931 | 2016-07-01T21:35:29 | 2016-07-01T21:35:29 | 26,989,266 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | # encoding=utf-8
'''
In this method, in en-queue operation, the new element is entered at the top of stack1. In de-queue operation, if stack2 is empty then all the elements are moved to stack2 and finally top of stack2 is returned.
enQueue(q, x)
1) Push x to stack1 (assuming size of stacks is unlimited).
deQueue(... | [
"buptyuzhenglin@gmail.com"
] | buptyuzhenglin@gmail.com |
12499e79860b8214c7af7b3d4cd71912cad85ace | 0cd266f5a862e0849ff534ac06fccd4eaa2114bd | /scikit/sklearn/neighbors/tests/test_dist_metrics.py | 3e0ab34aab3ccfa93cf323800dfebd9657ef24ab | [
"BSD-3-Clause"
] | permissive | johnnykwwang/GPGPU_Final_Python_CUDA | 45eeed3631ce577c22ffaea7ba076c5563771d60 | 439d11b98cd839c5a9bac153ee0f21c62d7ba932 | refs/heads/master | 2021-03-22T03:04:18.953358 | 2017-06-14T16:09:53 | 2017-06-14T16:09:53 | 93,535,442 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,356 | py | import itertools
import pickle
import numpy as np
from numpy.testing import assert_array_almost_equal
from scipy.spatial.distance import cdist
from sklearn.neighbors.dist_metrics import DistanceMetric
from sklearn.neighbors import BallTree
from sklearn.utils.testing import assert_raises_regex
def dist_func(x1, x2, ... | [
"ec2-user@ip-172-31-12-7.ap-northeast-1.compute.internal"
] | ec2-user@ip-172-31-12-7.ap-northeast-1.compute.internal |
4a0902dc27453f1c3c75f66b24e4029df02fe5ed | 4f205fc9316eff48092f573b072b644e8f02d8bd | /src/training/mytransforms.py | a8bdbb915bba86ea0d73dbf24e6f4d62a1ae0203 | [
"Apache-2.0",
"MIT"
] | permissive | hip-satomi/microbeSEG | 017d5a0af616b4ee4652c315dea21eb4fc62b754 | 7e5455f1a27bc42ad765ec06e62c36012be71c11 | refs/heads/main | 2023-04-14T10:29:08.178419 | 2023-01-26T10:09:59 | 2023-01-26T10:09:59 | 483,291,328 | 6 | 1 | MIT | 2022-10-21T15:11:37 | 2022-04-19T14:55:12 | Python | UTF-8 | Python | false | false | 15,396 | py | import numpy as np
import random
import scipy
import torch
from imgaug import augmenters as iaa
from skimage.exposure import equalize_adapthist, rescale_intensity
from torchvision import transforms
from src.utils.utils import min_max_normalization
def augmentors(label_type, min_value, max_value):
""" Get augment... | [
"tim.scherr@kit.edu"
] | tim.scherr@kit.edu |
7ed539393db275f2f1dd067a9bf2e75a118f4e81 | 6edcb269d4f54ea37f7f12c31169192ab13e882f | /text.py | 3518e7030baf503f62f4b6845e0c3e6f9c65fe59 | [] | no_license | Jovi007/newGit | 63f79befe801865d8132f6211422fa473e452e68 | 7b26570343d95d00b4e1dd4c05383ca8dcb43653 | refs/heads/master | 2021-01-01T04:58:04.412831 | 2016-04-20T10:10:59 | 2016-04-20T10:10:59 | 56,666,477 | 0 | 0 | null | 2016-04-20T10:10:59 | 2016-04-20T07:43:26 | Python | UTF-8 | Python | false | false | 175 | py | print 'new branch'
print 'master branch fix'
print 'fix conflict'
print 'I want master get my code,I am dev1'
print 'I am master,I have new code'
print 'fix bug ing.........'
| [
"zhouwei03@chinatopcredit.com"
] | zhouwei03@chinatopcredit.com |
7543cdf445cb135d685ea0c8aadce2b1123acf5d | b07208301e07076da04fde86402fbaf826a90d73 | /chapter2/Chapter_2.1.1.4 KNN.py | 40bbeb0dd79e24167282d812dcdcc51916cb6fb9 | [] | no_license | TaoStarlit/python_ML | b5baf7c90c207a215db2b311bea1f6068b30d881 | 278524509503613b71c0d66c3b533e5b0c79d8d1 | refs/heads/master | 2021-08-29T01:43:40.746184 | 2017-12-13T10:01:51 | 2017-12-13T10:01:51 | 103,505,901 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,786 | py |
# coding: utf-8
# In[1]:
# 从sklearn.datasets 导入 iris数据加载器。
from sklearn.datasets import load_iris
# 使用加载器读取数据并且存入变量iris。
iris = load_iris()
# 查验数据规模。
iris.data.shape
# In[2]:
# 查看数据说明。对于一名机器学习的实践者来讲,这是一个好习惯。
print iris.DESCR
# In[3]:
# 从sklearn.cross_validation里选择导入train_test_split用于数据分割。
... | [
"zhengt2016@gmail.com"
] | zhengt2016@gmail.com |
3bbfc34b91572873ef075cf05e8158c8325a294f | 5f2039b325a63765c43e9fdf28c275f7af990dac | /acamica-course/unit_testing/test_cap.py | 426f2fc0735314904586e52e6ef52f2c0afa8fde | [] | no_license | pipecm/learning-python | da33cd8c076c58eee426cd4547ab05daaacd60d9 | 3f5fde44db21fb81316d2b2b956c832e719ab8b4 | refs/heads/master | 2022-11-09T18:27:16.515577 | 2020-06-25T01:03:30 | 2020-06-25T01:03:30 | 258,350,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | import unittest
import cap
class TestCap(unittest.TestCase):
def test_cap_one_word(self):
text = 'python'
result = cap.cap_text(text)
self.assertEqual(result, 'Python')
def test_cap_multiple_words(self):
text = 'monty python'
result = cap.cap_text(text)
self.as... | [
"pipecm@gmail.com"
] | pipecm@gmail.com |
003ffc8b931687487cf729b77a66c0d3d2b33116 | af41debd568a7e2701f6be440b2a60d3afb3afef | /py_tests/t_queue.py | 7cf04f164bead3a0ce1390479b5b403e501f57fd | [] | no_license | rimelis/BBB-Alarm | f948b208df2e5529445689b3bf2f21bc3df381a0 | cd3539746ec118d5556bc096f0816ad2ceb29ed4 | refs/heads/master | 2021-01-01T17:54:25.204728 | 2019-03-19T15:37:40 | 2019-03-19T15:37:40 | 98,190,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,539 | py | import threading
import time
import logging
import random
import queue
logging.basicConfig(level=logging.DEBUG,
format='(%(threadName)-9s) %(message)s',)
BUF_SIZE = 10
q = queue.Queue(BUF_SIZE)
class ProducerThread(threading.Thread):
def __init__(self, group=None, target=None, name=None,
... | [
"debian@arm.localdomain"
] | debian@arm.localdomain |
e94a700f968a82baaa9b58e135e2d927dc8dca63 | 43e79af67945b3bf580d294d09da63d0379b4ae0 | /script/relative_kinect_publisher.py | 58d7290d3d026b3ed5f6e8d0de08c01edd44fa41 | [] | no_license | payamn/following-ahead | 3ef0caf0a50cdbec877c98051969661a42a98a90 | 25743f8683df3e96d79355422bd202a935b61c28 | refs/heads/master | 2021-09-05T17:24:30.442715 | 2017-09-20T03:28:47 | 2017-09-20T03:28:47 | 104,242,088 | 0 | 0 | null | 2017-09-20T16:44:00 | 2017-09-20T16:44:00 | null | UTF-8 | Python | false | false | 2,396 | py | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import TransformStamped
import message_filters
import tf as transform
import numpy as np
tfObj = transform.TransformerROS(True, rospy.Duration(10.0))
relativePosePub = rospy.Publisher('/person_follower/groundtruth_pose', TransformStamped, queue_size=1)
def cal... | [
"payam222@gmail.com"
] | payam222@gmail.com |
ea876ca3108b51995f148ecb425ba1ea887579b0 | e5718bfa592ca171fd4100116ce566ecb0883e10 | /lib/to_delete/ConvDeconvClassesMnist_mods.py | 25cd606c3926001bf43fd87215e721ac80405fbe | [
"MIT"
] | permissive | joaquimlyrio/feature-visualization | e0d4eba7d9f5d3e99c917d00a6780e59fbf77ef5 | 47ead5044d1239dba1133b7ea812b2ed7f2564dc | refs/heads/master | 2021-08-30T13:03:09.928336 | 2017-12-18T03:27:05 | 2017-12-18T03:27:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,528 | py |
###
### maybe try to use tf.nn.conv2d?
###
# Imports
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import random
import math
from scipy.misc import imsave
###
### Convolutional Neural Network (CNN) for MNIST
###
class CnnMnist:
def __init__( self, session, n_in, n_out, mode... | [
"31713176+joaquimlyrio@users.noreply.github.com"
] | 31713176+joaquimlyrio@users.noreply.github.com |
b1a48b404cef952e203b19b3d0a78243594f0388 | 97ccf3f73e371afd4037b664ba0c71b0b6af1db3 | /guessing_number.py | aa6edf2ce024ad5db431f145fa4fdc80d98c9d35 | [] | no_license | jaesmanalang/number-guessing | 97f33e61d0c44d3e385965c4c671ab377bb5f7b4 | 919255390e1aef6b43c748c0d0e2551ed08561f2 | refs/heads/master | 2022-08-13T15:51:05.519634 | 2020-05-17T14:51:21 | 2020-05-17T14:51:21 | 264,690,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,859 | py | import random
import os
attempts = 0
game_playing = True
def play_game():
reset()
global game_playing, attempts
max_range = get_max_range()
the_number = number_to_guess(max_range)
while game_playing:
guess = player_guess(max_range)
if check_guess(guess, the_number):
ga... | [
"jaesmanalang@gmail.com"
] | jaesmanalang@gmail.com |
b4b48833b14eeae1819479c4994e066e45300d1c | d0dccd8b1c31c0256dca3472719acab561661aa9 | /events/views.py | 8f52985d56e7d9d48486c2516ac1ab2f8b850635 | [] | no_license | cjredmond/GrouperApp | 5fe97271bc275e570d2e3565c2bb5233ce34a79d | aba431c7def9173150e24686dbbb87685d25ed24 | refs/heads/master | 2020-03-19T21:43:12.609648 | 2018-06-29T16:17:10 | 2018-06-29T16:17:10 | 136,947,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | from django.shortcuts import render
from django.views.generic import *
from django.views.generic.edit import *
from django.contrib.auth import get_user_model
from django.urls import reverse
from .models import Event
from .forms import EventCreateForm
from group.models import Entity
class EventCreateView(CreateView):... | [
"connor.redmond@gmail.com"
] | connor.redmond@gmail.com |
e0d2036b5459a0bba69f3c1b91adeb65c9e1cccb | f1d850a59052deb004b8742a468d3f03e5d849cc | /youtap.py | e94858323194787eee1ba093a236114c4f4ccc5e | [
"Apache-2.0"
] | permissive | hubert10/youtap | 00c5bf168d6967b17400a913932e2d6e7cec45ef | 232134389336afd316f79d09689e127630d087ae | refs/heads/master | 2020-12-28T12:18:22.928153 | 2011-07-26T21:52:11 | 2011-07-26T21:52:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,812 | py | #!/usr/bin/python
#
# Copyright [2011] Sundar Srinivasan
#
# 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 ... | [
"krishna.sun@gmail.com"
] | krishna.sun@gmail.com |
96697e0a1210d4821564472422964ebcc50a0e3b | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /python/zulip/2015/12/run-dev.py | 67b1614d07af8c64d03977bec514a539b207ca73 | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Python | false | false | 3,852 | py | #!/usr/bin/env python2.7
import optparse
import subprocess
import signal
import traceback
import sys
import os
from twisted.internet import reactor
from twisted.web import proxy, server, resource
# Monkey-patch twisted.web.http to avoid request.finish exceptions
# https://trac.zulip.net/ticket/1728
from twisted.... | [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
e0912c5ac778e21ca948703da25cf176eec9062e | 415a2bcd0350270956e94a8e1adb90216b1293e8 | /venv/Scripts/pip-script.py | 1f44689ada4571fcbbab8ad5ec3c9978f3602acd | [] | no_license | unclet1999/Sort | 1205d0c19b7603d8960a9701e27e0c1c60ecb6ab | b620dd714d1d0b86e6fd0fecfec19de03f5a9c48 | refs/heads/master | 2020-08-23T11:29:37.636864 | 2019-10-28T18:03:01 | 2019-10-28T18:03:01 | 216,606,298 | 0 | 1 | null | 2019-10-28T19:16:43 | 2019-10-21T15:48:07 | Python | UTF-8 | Python | false | false | 408 | py | #!C:\Users\Uncle\Desktop\Sort_Project\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
... | [
"real.friend2013@outlook.com"
] | real.friend2013@outlook.com |
9004f791a1dcd8b9174c7e98612c338f9f24f0b8 | 1bfab43b76b084e428e8d0ff1809afd6d20acc35 | /on luyen python/django/render_templates/render_templates/settings.py | 02ecb7968a902fe613e0f578cd8570a56debf306 | [] | no_license | namdh1985/python | 807a292c24e225b7d671fe2138b1d3d63865d191 | 35c2760326b04e264ed35342a73262e816be8798 | refs/heads/master | 2022-12-05T10:20:48.910118 | 2020-08-26T14:28:57 | 2020-08-26T14:28:57 | 287,443,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,129 | py | """
Django settings for render_templates project.
Generated by 'django-admin startproject' using Django 3.0.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
imp... | [
"namdh1985@gmail.com"
] | namdh1985@gmail.com |
fd719ea423919eefadcd1185e677cc2b990b8786 | 0d60d2a954610d207efb976a50e28e59aae93286 | /programmers_algorithm/이중우선순위큐(dual_priority_queue).py | acc81f45c6775c0e592e7f726af61e81126f1326 | [] | no_license | darlcode/algorithm | 074806be0a08918a6a594e5471aa61cd3f5755a6 | 359630d41faf1923314cf9e06b486a39643258d1 | refs/heads/master | 2021-07-16T15:07:55.209580 | 2021-04-04T06:37:44 | 2021-04-04T06:37:44 | 243,684,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,041 | py | ####### link : https://programmers.co.kr/learn/courses/30/lessons/42628 ########
## 2019.10.01 ##
def solution(operations):
answer = []
for i in operations:
# 명령어 데이터를 분리하여 command, data에 넣어주기
command, data = i.split(" ")
# command가 I일 경우
if(command == "I"):
... | [
"noreply@github.com"
] | darlcode.noreply@github.com |
ee0c4d0093eb8fb6ee16511f21e8fcbcd1f15975 | d0b6e0994331a27e4828a42256cf2a4960e6fc77 | /src/visualization/visualize.py | fad8beca4b6d54169a1b7d0eec11dbfd9f7f9ab5 | [] | no_license | MikkelMathiasen23/mlops_cookiecutter | 08593f1475a164def363d7bf9ca231000f29efd9 | 9ec63e756257abaa793658db7d8671213cead17e | refs/heads/master | 2023-06-02T07:48:28.159788 | 2021-06-17T08:28:27 | 2021-06-17T08:28:27 | 374,989,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,705 | py | import argparse
import sys
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import torch
import torch.nn as nn
from sklearn.manifold import TSNE
from src.data.make_dataset import mnist
from src.models.model import MNIST_NET
parser = argparse.ArgumentParser(description='Training arguments')
p... | [
"s174344@student.dtu.dk"
] | s174344@student.dtu.dk |
06072e8a7f63c5d0535c8e97d3d3590ec3ef64bc | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_backup.py | 9eff4b2688d253805fa8fdb41115f611870c9543 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 588 | py |
#calss header
class _BACKUP():
def __init__(self,):
self.name = "BACKUP"
self.definitions = [u'(someone or something that provides) support or help, or something that you have arranged in case your main plans, equipment, etc. go wrong: ', u'a copy of information held on a computer that is stored separately from... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
9574cb4698ffe8030a2193baae1e5054ffa6bc81 | 33a89d3df007e896e74e743bd0bd32b515f794b9 | /src/storage/common/entity/EntitySerializer.py | e160754fbf66d80e54f1b978c89509979282329c | [] | no_license | andreyzaytsev21/MasterDAPv2 | 75cb8712262290a418a6aa73a9cd7ddcd305ea91 | d34ae3e0ecb2c06cbf707f3c948c0c5307390845 | refs/heads/main | 2023-06-22T06:24:59.465823 | 2021-07-11T20:09:24 | 2021-07-11T20:09:24 | 385,041,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | from typing import Dict
from src.property.Property import Property
class EntitySerializer:
@staticmethod
def serialize(props: Dict[str, Property]) -> Dict[str, str]:
return {props[i].get_id(): props[i].get_val() for i in props.keys()}
| [
"62799231+andreyzaytsev21@users.noreply.github.com"
] | 62799231+andreyzaytsev21@users.noreply.github.com |
f933c954e217766db493055dde446e4bbc81de4e | 189e580f1525a4f15a279daacb1e62155c65542b | /metrilyx/metrilyxconfig.py | cf2fba1498ac1c594f3be18db0a7ddacc50de9b8 | [
"Apache-2.0"
] | permissive | hvyas/metrilyx-2.0 | 33c009a0c925d84e31580960d8424c4ab9a7f1be | ca3aac416298fb6ba2550dd040cdc50379ab894a | refs/heads/master | 2020-12-26T04:37:38.725817 | 2014-09-28T22:56:22 | 2014-09-28T22:56:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | import os
from datastores import jsonFromFile
_abspath = os.path.abspath(__file__)
_apphome = os.path.dirname(os.path.dirname(_abspath))
CONFIG_FILE = os.path.join(_apphome, "etc/metrilyx/metrilyx.conf")
config = jsonFromFile(CONFIG_FILE)
config["static_path"] = os.path.join(os.path.dirname(_abspath), "static")
con... | [
"abs.pathak@ticketmaster.com"
] | abs.pathak@ticketmaster.com |
391eafe0985b6bbaa0f03b8aabc19aed9a0aeefa | 9b8caa2e66fa81a0037e8066536f09b8c824941c | /atcoder/arc/arc142/b.py | 436236417ec2b1770a6ab33b4cb46f91c9bbc7ea | [] | no_license | ayanamizuta/cpro | a66b46c87c71c2e9451fa01af1736242f09832a2 | ddd6fa35ed11a1fddadbed4027c52ed5479725eb | refs/heads/master | 2022-11-18T00:19:57.289569 | 2022-10-22T00:42:09 | 2022-10-22T00:42:09 | 149,390,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,712 | py |
def render(arr):
for a_ in arr:
print(*a_)
def validate(arr):
n_=len(arr)
for i in range(1,n_-1):
for j in range(1,n_-1):
a_=arr[i][j]
cnt=0
for ii in range(-1,2):
for jj in range(-1,2):
if (ii,jj)!=(0,0) and a_<arr[... | [
"ayanamizuta832@gmail.com"
] | ayanamizuta832@gmail.com |
15a4d561dfb7b03334bf6343e7c40bcd382ae8a9 | a7893ea023f4839fa0447845b88fbf2536966ba0 | /FASRGAN_and_Fs-SRGAN/codes/models/__init__.py | 035089f9d36bccbf24381558a598506920d7475d | [] | no_license | Rainyfish/FASRGAN-and-Fs-SRGAN | c84f6e0220d48271799b521237b937c9383e6471 | 2d85fc0bb5cb65d4ef4101c1953f0322fd3effbf | refs/heads/master | 2021-06-21T23:53:35.992689 | 2021-03-14T10:22:56 | 2021-03-14T10:22:56 | 201,067,476 | 24 | 6 | null | null | null | null | UTF-8 | Python | false | false | 989 | py | import logging
logger = logging.getLogger('base')
def create_model(opt):
model = opt['model']
if model == 'sr':
from .SR_model import SRModel as M
elif model == 'FsSRModel':
from .FsSR_model import FsSRModel as M
elif model == 'srgan':
from .SRGAN_model import SRGANModel as M... | [
"1040999427@qq.com"
] | 1040999427@qq.com |
cbf79af35fb2759d0e7ec9a19ca7f7380778de56 | 02d003627dc39487c43827de23f8a26faa616574 | /ds/array/contains_dup.py | b279e96b09329f845a71fa8705cba64e06c63801 | [] | no_license | amitt001/cs-review | 63d31739d70c24eb1204537d2e37b4bbfb195e36 | f04987b32f2598e6f058edd44c2e586894dab704 | refs/heads/master | 2020-05-24T23:32:50.234181 | 2019-09-03T14:26:18 | 2019-09-03T14:26:18 | 187,516,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 892 | py | """Given an array of integers, find if the array contains any duplicates.
Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.
Input: [1,2,3,1]
Output: true
Input: [1,2,3,4]
Output: false
"""
def containsDuplicate(nums) -> bool:... | [
"mail2amit19@gmail.com"
] | mail2amit19@gmail.com |
406ba475df4e4247276045d3a8377eed80d0612b | 116763c900b41ff793c6621edeb196ccfafda403 | /scripts/analyses/archive/penalized_regression/penal_regresFC_Age_TMDif_Gaus.py | 6a7081400f43036e2ac33d7f730a639cb93d57fe | [] | no_license | weiwei-wch/multiscale | b29d1ef24013c4756c019b6f5d884bfe0c7708ec | 9f7cbc021a47c4acb87afa85b3654093b7ef984a | refs/heads/master | 2023-04-26T04:38:33.998724 | 2021-05-17T21:25:56 | 2021-05-17T21:25:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,317 | py | ## imports ##
import scipy
import scipy.io as sio
from os.path import dirname, join as pjoin
import numpy as np
import sklearn
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import RidgeCV
from sklearn.linear_model import Ridge
from skle... | [
"pinesa@pennmedicine.upenn.edu"
] | pinesa@pennmedicine.upenn.edu |
8fdf3accccfac6904b4799b77cccadf2bfc83862 | 42516b0348936e257d04113c2e632dc72ba58e91 | /test_env/test_suit_ui_file_explorer/test_suit_ui_file_explorer_case06.py | d446ea461909499285fd138a157ee129cd48ee84 | [] | no_license | wwlwwlqaz/Qualcomm | 2c3a225875fba955d771101f3c38ca0420d8f468 | a04b717ae437511abae1e7e9e399373c161a7b65 | refs/heads/master | 2021-01-11T19:01:06.123677 | 2017-04-05T07:57:21 | 2017-04-05T07:57:21 | 79,292,426 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,124 | py | #coding=utf-8
import settings.common as SC
from test_case_base import TestCaseBase
from logging_wrapper import log_test_case, take_screenshot
from test_case_base import TestCaseBase
from qrd_shared.case import *
import fs_wrapper
from case_utility import *
import settings.common as SC
from utility_wrapper import *
##... | [
"c_wwan@qti.qualcomm.com"
] | c_wwan@qti.qualcomm.com |
924ad60f641a250c2dc45b133d9e54b951e6657d | 3d42221bf6adffb35000a0cf2dd115de6ffa5796 | /clades_adapted - Kopie/Delphineae/input/01_make-revscript.py | e14988122ea32c4fa154d548b7aface5ea9816f7 | [
"MIT"
] | permissive | envima/AlpineFloraLJ | 0e021f47d0457fc018b0dad0e52b6735e2d45a90 | d3d7bbd188fbe1792382756237776cf317eabf71 | refs/heads/main | 2023-04-07T13:34:06.290176 | 2021-04-12T10:12:53 | 2021-04-12T10:12:53 | 304,222,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,623 | py | import operator
from functools import reduce
import model
pd = model.pd
areas = model.areas
ranges = model.ranges
biomes = model.biomes
states = model.states
nstates = model.nstates
# read the data csv files - the first column (taxa) is identical in each,
# so we can concatenate them
csvdata = pd.concat([pd.read_csv(... | [
"nauss@staff.uni-marburg.de"
] | nauss@staff.uni-marburg.de |
a3dcc90e068ad557401a75428293332468a08fb3 | ebff4045910369fafd56ad369f2de0da992dd221 | /button.py | 4d8510cc5a5355da8a451c9d60a87dfe6a408fa8 | [] | no_license | galaxy-dust/alien_invasion | 0d654e33af3fc4cd49cddcf7dc3faf2d959bf8fb | 206141b0fde7ee30bed41cc6850ec2b2962137b0 | refs/heads/master | 2020-04-10T00:29:37.037805 | 2018-12-06T14:32:04 | 2018-12-06T14:32:04 | 160,686,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 849 | py | import pygame.font
import pygame
class Button():
def __init__(self,ai_settings, screen, msg):
self.ai_settings = ai_settings
self.screen = screen
self.screen_rect = self.screen.get_rect()
self.width, self.height = 200, 50
self.button_color = (0,255,0)
self.text_color =(255,255,255)
self.font = p... | [
"zhangxuyu_ts@he.chinamobile.com"
] | zhangxuyu_ts@he.chinamobile.com |
187962dd8c17294e9070e38afbd203c6d97037a2 | 1258e001beb0c5aabb866a170625698e9385d3e9 | /Alura/diff21.py | 1295c6d8cd97d286c3f377611f0ca9d13ae814b9 | [] | no_license | mgarcia86/python | 7b3d450d7a0cb5623af446074784f247eb113497 | 66dd2e0dd6000a6d500dca594b23b54acae88169 | refs/heads/master | 2020-03-16T19:46:28.420744 | 2018-05-10T19:32:28 | 2018-05-10T19:32:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py | def diff21():
if n > 21:
return 2 * (abs(21 - n))
elif n <= 21:
return abs(21 - n)
def sleep():
if not week:
return True
elif week and not holiday:
return False
else:
return True
def nao_string(str):
if len(str) >= 3 and str[:3] == 'not':
ret... | [
"marcos.note@gmail.com"
] | marcos.note@gmail.com |
fc7d7b27a526a43db9c9b511ae29a4442acf81d4 | 0fb2e09c0629cf47045881d7eecc125f674230e5 | /pps_webapp/main/views.py | bf6d96c2869c358792ae6771da7c09201b547904 | [] | no_license | satwik77/phenopacket-scraper-webapp | ea24ad2cc2fbd988e12df1178be5ba940c8a9859 | 4382c2a4e501448e7bfd68c7826a3c4c5ab39a26 | refs/heads/master | 2021-01-17T09:33:07.188192 | 2016-08-23T17:24:20 | 2016-08-23T17:24:20 | 61,695,575 | 0 | 0 | null | 2016-06-22T06:45:50 | 2016-06-22T06:45:50 | null | UTF-8 | Python | false | false | 1,984 | py | from django.shortcuts import get_object_or_404, render_to_response, redirect
from django.shortcuts import render
from django.contrib import auth
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import requests
import pprint
api_url= 'http://localhost:8001/api/'
@csrf_exempt
de... | [
"satwik55@gmail.com"
] | satwik55@gmail.com |
c4d968751daae4a8ae948fa75f2ff562ca58b8b2 | bb0ef99c4b16047b8c16b6d5ff0605b8e9b8dfbf | /neat2.py | 4450d44c67a69c4464344d2b734abe2fdae62b86 | [] | no_license | JRGCaponde/JRGCaponde | 85c71a18145110a12d76699ab12463c70c2d28c2 | 092c0b4cafd17d5abc285b7ad2caff8c95c2a691 | refs/heads/main | 2023-09-03T17:17:39.581408 | 2021-11-05T23:24:40 | 2021-11-05T23:24:40 | 364,477,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,514 | py | import pygame
from random import randrange
import os
import neat
branco = (255, 255, 255)
preto = (0, 0, 0)
vermelho = (255, 0, 0)
verde = (0, 255, 0)
azul = (0, 0, 255)
geracao = 0
velocidade_x = 10
velocidade_y = 10
CobraXY = []
try:
pygame.init()
except:
print('o modolo pygame não foi inic... | [
"noreply@github.com"
] | JRGCaponde.noreply@github.com |
d6722ce189fbb5948c8db922d888a2d1878b4e68 | 6fa437f198e74ebac1446999303bd34a04378e3f | /wat/wat.py | 3cffd9f75ebfc222306612cb35ee58220fed0d5e | [] | no_license | 0f11/Python | 27f718e38cf40d2a8a348a9134660b619f4f6f20 | 7ba7941343560604539c2ad61b94afd660f8279d | refs/heads/master | 2020-07-11T01:43:04.402080 | 2019-08-26T07:32:50 | 2019-08-26T07:32:50 | 204,421,162 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | """Wat."""
def first(n: int):
"""
First.
:param n:
:return:
"""
if n == 1:
return 0
if n == 2:
return 2
if n == 4:
return 4
if n == 3:
return 6
if n == 713:
return 8
if n == -145:
return 11
if n == -789:
return 12... | [
"Welcomettu13"
] | Welcomettu13 |
ebe0553b549074fa2039364d294b9e381bbae91a | a7ca85d9a0a1e93fb9557f5afcf25dd9883909d3 | /run_stgcn.py | 9843f69d3e2e3283c6327d1793ec53b694293db9 | [] | no_license | youngflyasd/STG2Seq | c03f88bcabc685ab53e7e1a46029ad0d6a5bf401 | 6047e29dc40571d99900c1b84c0a2a60e5fd67ac | refs/heads/master | 2022-04-07T16:27:57.112543 | 2020-03-11T09:57:52 | 2020-03-11T09:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,562 | py |
import tensorflow as tf
from tqdm import tqdm
import numpy as np
import os
import h5py
from lib.load_dataset import load_dataset_multi_demand_external
from lib.batch_generator import batch_generator_multi_Y
from lib.generate_adj import generate_graph_with_data
from RootPATH import base_dir
base_dir = os.path.realpath(... | [
"32267565+LeiBAI@users.noreply.github.com"
] | 32267565+LeiBAI@users.noreply.github.com |
16a366d7fe0e7f788721b4bb5f0dad1de7ce646f | 77929020bd02471b46e5627de621e13870876216 | /weather/urls.py | 8dbbf64b32fbd85072cbfb07c8e9ca9d83869b31 | [] | no_license | Hiwa2719/weather | 0c8b593ce8935b938e72616d41867bd75fd0acab | b16b9c7cf90dda43d8d6e34c8f7d8200b7454c37 | refs/heads/main | 2023-04-14T23:01:16.794996 | 2021-04-23T21:36:30 | 2021-04-23T21:36:30 | 348,776,625 | 0 | 0 | null | 2021-04-23T18:23:10 | 2021-03-17T16:23:58 | SCSS | UTF-8 | Python | false | false | 366 | py | from django.urls import path
from . import views
app_name = 'weather'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
path('new-list/', views.NewList.as_view(), name='new_list'),
path('remove-city/', views.RemoveCity.as_view(), name='remove_city'),
path('model-detail/', views.Get... | [
"hiahmadyan@gmail.com"
] | hiahmadyan@gmail.com |
3bae786e9e40c36b6f97504686557294fa9bf5c6 | 695a2237c52485a01086e690a633f4fd43e3c128 | /COVID-away_one-class_classification_models/Acc+Gyro+Mbar+RVect/Local_Outlier_Factor.py | 5608c38c7b291f332df1ef6940f08aed4ae2db11 | [] | no_license | wbing520/COVID-away | db3c3dc10d4b56036a30985a02e93d3b7f0338e3 | fea67b4d1e7232e0f16b5bbd886788fe7a676771 | refs/heads/master | 2022-12-23T14:43:57.455443 | 2020-10-07T01:53:19 | 2020-10-07T01:53:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | # local outlier factor for imbalanced classification
import pandas as pd
from sklearn.metrics import precision_recall_fscore_support, classification_report,confusion_matrix, precision_recall_curve
import pickle
test = pd.read_csv('./Test.csv')
testX = test.drop(['label','Pattern'], axis = 1)
testy = test.label
f... | [
"bhasud@ie.deri.local"
] | bhasud@ie.deri.local |
d4fa5bcb847d01f156a7da6ca7aebead0bed0ebb | 10079a6cf80ce917159a87f09f4dcc939bfe5436 | /oldboy/面向对象/super解析.py | ce4ce33545a6ea7806bdcd243d077587213642da | [] | no_license | w1033834071/qz2 | 27b89a48a8eb4e86e30f252a92ead28dd46fcd81 | 4d8664bc714bbd134d26cf31d16b942c925cedf3 | refs/heads/master | 2021-01-01T06:13:00.267460 | 2017-10-02T12:01:26 | 2017-10-02T12:01:26 | 97,381,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
class Animal:
def __init__(self):
print("A 构造方法 ")
self.A = "动物"
class Cat(Animal):
def __init__(self):
print("B 构造方法 ")
self.B = "猫"
super(Cat,self).__init__() # self 在本例中是c对象 super的执行顺序和继承相同
c = Cat()
print(c.__dict__)... | [
"2232339224@qq.com"
] | 2232339224@qq.com |
31a0c3c321b124e25d22c7584aa8ccbc4ed0ae04 | c7a6f8ed434c86b4cdae9c6144b9dd557e594f78 | /ECE364/.PyCharm40/system/python_stubs/348993582/PyQt4/QtNetwork/__init__.py | 499f277c4fd5601ad24160f4fb960e5e5fc2f65f | [] | no_license | ArbalestV/Purdue-Coursework | 75d979bbe72106975812b1d46b7d854e16e8e15e | ee7f86145edb41c17aefcd442fa42353a9e1b5d1 | refs/heads/master | 2020-08-29T05:27:52.342264 | 2018-04-03T17:59:01 | 2018-04-03T17:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,637 | py | # encoding: utf-8
# module PyQt4.QtNetwork
# from /usr/lib64/python2.6/site-packages/PyQt4/QtNetwork.so
# by generator 1.136
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
# no functions
# classes
from QAbstractNetworkCache import QAbstractNetworkCache
from QAbstractSocket import QAbstractSocket
from QAut... | [
"pkalita@princeton.edu"
] | pkalita@princeton.edu |
ddb174f793b28d3d67bd47fc709bbd1e25118f3d | a671a684173ba8128f43d075d6b070c04689a0f7 | /myS2SVAE/Vocabulary.py | a4c5c515eec4cff42bb9365bff21e71cf52983f6 | [] | no_license | yeyeye529/my-vae | 160a983a8f6249fa989b13b3ed6ae9f493a11051 | 8809ebd603f6dc8dc26759fa2cb457313ac5ab10 | refs/heads/master | 2020-03-29T22:05:01.785176 | 2018-10-23T07:41:33 | 2018-10-23T07:41:33 | 150,402,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,362 | py | from collections import defaultdict
class vocabulary(object):
def __init__(self, max_vocab_size = 1000000):
self._vocab = None
self._word2idx = None
self.bos_id = 0
self.eos_id = 1
self.unk_id = 2
self.pad_id = 3
self._max_vocab_size = max_vocab_siz... | [
"shiwenxian@bytedance.com"
] | shiwenxian@bytedance.com |
c245e365442238e1f481ff741ef8a55ec08242bd | af5184f69ef76b40a27a220cd6b9085978e6ade4 | /handlers/ui_ibon.py | 3824f5dd68ef1c2f1d6f421d3dfb44a822863395 | [] | no_license | igoiko-ii40project/web_remoht | f0a71a2954083367956edcad3e58c08420ab19f2 | 4e63c897d357e71686d449796b224c33ea5dec54 | refs/heads/master | 2020-09-15T23:16:06.365373 | 2016-09-13T08:09:12 | 2016-09-13T08:09:12 | 67,804,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,735 | py | __author__ = '105031691'
import os
import logging
import webapp2
import jinja2
from google.appengine.api import xmpp, taskqueue, users
from google.appengine.ext import ndb
import datetime
import json
import model
from . import BaseHandler
COUNTER_PAGE_HTML = """\
<!DOCTYPE html>
<html>
<body>
<form action="#" method=... | [
"ibon.ii40project@gmail.com"
] | ibon.ii40project@gmail.com |
e87c25a0946568e24a4c75d826cd347aa92d0ceb | 60baa50bc1f5b30136aa2618bd04c64fdef4bc7f | /plotting_from_mongo.py | 47a0ee68ff3b278525e0b5a927d54721f84fd24e | [] | no_license | SaharCarmel/Memristor-NN | 07159e2957e8db0e80efd070df89929d68f4d7f9 | 8d767c73790252afaba8ef22f940e05ec927f76e | refs/heads/master | 2020-05-23T04:05:09.397918 | 2020-01-22T19:12:16 | 2020-01-22T19:12:16 | 186,628,314 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,104 | py | import pymongo
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
from sacred import Experiment
from sacred.utils import apply_backspaces_and_linefeeds
from sacred.observers import MongoObserver
def plot_results(run_id_1,run_id_2,metric):
myclient = pymongo.MongoClient("mongodb://localhost:27017/")
... | [
"45436875+AmirsSaad@users.noreply.github.com"
] | 45436875+AmirsSaad@users.noreply.github.com |
acb8cafa74645f1560e286301b9c4b31274498d0 | b72e42f7f15ea8d359512cc0fe524f5407f358e5 | /CS50_web_dev/src/src8/airline1/airline/urls.py | f9e85ea4cf69f88b0dfd879f4bc3a158aa887856 | [
"MIT"
] | permissive | ChuaCheowHuan/web_app_DPTH | ec9f96d66c69ebd7e04df8d4b92578a3aaa7e392 | dd901e6359fe76f15b69701c53f76666c3219173 | refs/heads/master | 2021-06-18T11:31:10.959634 | 2020-07-23T04:04:52 | 2020-07-23T04:04:52 | 205,556,446 | 0 | 0 | MIT | 2021-06-10T21:55:14 | 2019-08-31T14:42:35 | HTML | UTF-8 | Python | false | false | 797 | py | """airline URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | [
"17569306+ChuaCheowHuan@users.noreply.github.com"
] | 17569306+ChuaCheowHuan@users.noreply.github.com |
700e79e4d279bb312926b55257ce6be156b4ee69 | 6bc8a3ea831b544514160f61131c5d2b6c8b4234 | /side-experiments/two_worker_classes/gen_class_condition_test.py | 08737f317c88e5a2d5e90aaf043d36dcb2771795 | [] | no_license | populace-org/optimal-filtering-rating | 31d243c06d003584d566e6e9c35b78447b4ebe63 | 84d9d57a746e0a6df7f7626d68c1136d593bf5f8 | refs/heads/master | 2020-12-24T07:26:46.844180 | 2016-07-02T19:35:55 | 2016-07-02T19:35:55 | 62,466,846 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 780 | py | import math
import matplotlib.pyplot as plt
def LHS(P, m, k):
return (math.pow(1.0 - P, k) / math.pow(P, m-k-1))
def RHS(p, m, k):
return (math.pow(1.0 - p, k+1) / math.pow(p, m-k))
m = 10
P_range = [float(i) / 100.0 for i in xrange(80, 100)]
p_range = [float(i) / 100.0 for i in xrange(60, 80)]
for k in r... | [
"akash@troo.ly"
] | akash@troo.ly |
6e74598ac562afd898833af86af9f06afb2a53aa | b99c82c6f280da992d539fcffbba7cb2cf6e78ce | /core/admin.py | a1ae04832490eff3ec6ff0e715f40fb3ad87d92a | [] | no_license | jonas-pettersson/Polls | 541c6854274d81df35223a4fa0ff22b617ffa0ff | 754e2e5ebde228734b21db4403237d056df23dcb | refs/heads/master | 2022-12-17T06:24:03.734284 | 2020-09-09T16:16:47 | 2020-09-09T16:16:47 | 293,620,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | from django.contrib import admin
from .models import Question, Choice
admin.site.register(Choice)
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class QuestionAdmin(admin.ModelAdmin):
fields = ['date_published', 'question_text']
inlines = [ChoiceInline]
list_display = ('ques... | [
"jonas.pettersson@siemens.com"
] | jonas.pettersson@siemens.com |
b5f5180f9a11d57ae823a912a59eb65def369fcd | 95f0d18cfabeb3806d6a54f80a47aa3b7f996dfb | /newsletter.py | a65ebc63f2e8e0bb01be6a573817946c43907fd5 | [
"MIT"
] | permissive | thedeadwoods/Comradery-API | 14eade52bc41b4b5e2fdbf5746bff468c62c75d0 | 0d30df376f5542d01a04b96c5fdf9363d3103679 | refs/heads/master | 2023-03-23T07:52:27.476182 | 2021-03-06T20:01:36 | 2021-03-06T20:01:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,104 | py | from lionhearted import settings
import os
import django
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lionhearted.settings")
django.setup()
from django.utils.html import strip_tags
from forum.models import Comment, Post, partial_update_objs, Community
from datetime import datetime, timedelta
from djan... | [
"rishabhegde@Rishabs-MacBook-Pro.local"
] | rishabhegde@Rishabs-MacBook-Pro.local |
74839efab519d289ba6649d52bf30afcb25301e6 | ab22bd8e87813af9b02ddef3f6403b114fec7921 | /drawing.py | b17be49192d3b0c3a6d3d17d687601fb5f77df98 | [
"MIT"
] | permissive | AmirRaad/Chess-Piece-Presence | 791f56a81502fc3de39191f499685d3718c8134c | 9d6a3981179e75bb9aade3c8db156d7fe721d4e7 | refs/heads/master | 2023-01-11T04:02:44.784036 | 2023-01-07T14:49:19 | 2023-01-07T14:49:19 | 230,105,795 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,868 | py | import cv2 as cv
import numpy
def drawredlines(result):
hsv_result = cv.cvtColor(result, cv.COLOR_BGR2HSV)
h, s, v = cv.split(hsv_result)
chess_board = numpy.zeros((8, 8))
squaresizex = result.shape[0] / 8
squaresizex = int(round(squaresizex))
squaresizey = result.shape[1] / 8
squaresizey ... | [
"59220669+AmirRaad@users.noreply.github.com"
] | 59220669+AmirRaad@users.noreply.github.com |
0b04dcafbb7bafeed73250d6bc7254c906731ccc | 7486b3af4d4413a96b3e0bf76f776cd8605d7c05 | /koalakid1/Divide Conquer/bj-2630.py | bdd6711efba8a0bed6260a699fb4fb5d2babdeb5 | [] | no_license | WonyJeong/algorithm-study | 7146e18ec9a3d7f46910e31890768b2e37f8b9b4 | dd659bf75c902800bed226d392d144b691d8e059 | refs/heads/main | 2023-03-31T14:38:47.365622 | 2021-04-02T01:35:36 | 2021-04-02T01:35:36 | 334,309,434 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | import sys
def quadtree(n, x, y):
global graph, blue, white
point = graph[x][y]
for i in range(x, x + n):
for j in range(y, y + n):
if point != graph[i][j]:
quadtree(n//2, x, y)
quadtree(n//2, x, y+n//2)
quadtree(n//2, x+n//2, y)
... | [
"koalakid154@gmail.com"
] | koalakid154@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.