repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unknownboyy/GUVI | 2,293,512,539,827 | 32cbac996b68c775bed6fc8dd8b1a4e8e120ae3a | 233f97c6f360d478bf975016dd9e9c2be4a64adb | /temp2.py | fa4f70167eab54a948ac4e5778896222ead255f2 | [] | no_license | https://github.com/unknownboyy/GUVI | 3dbd1bb2bc6b3db52f5f79491accd6c56a2dec45 | d757dd473c4f5eef526a516cf64a1757eb235869 | refs/heads/master | 2020-03-27T00:07:12.449280 | 2019-03-19T12:57:03 | 2019-03-19T12:57:03 | 145,595,379 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from time import time
# Recursion
def fibo1(n):
if n<=1:
return n
return fibo1(n-2)+fibo1(n-1)
n = 33
f = [-1]*(n+1)
call = 0
# Memoization
def fibo2(n):
if f[n]==-1:
if n<=1: return n
else: f[n]=fibo2(n-2)+fibo2(n-1)
return f[n]
# Tabulation
def fibo3(n):
ff = [0,1]
... | UTF-8 | Python | false | false | 595 | py | 358 | temp2.py | 335 | 0.571429 | 0.514286 | 0 | 36 | 15.555556 | 42 |
Vincc/snakeReinforcementLearning | 15,659,450,774,219 | 52b88341a8ca86925dc2684b9c0456addb4cd5fb | 4cf20e1247223281fb36c21a1dda8a921ba22647 | /SnakeEnv/snake_Env/envs/snake_env.py | b7efbab5890e7439ffa566b0459027d2bc8a3345 | [] | no_license | https://github.com/Vincc/snakeReinforcementLearning | 8cc73f7a57816cc0cf293efe294145b9e3670b5e | 04fb0913f7fa257f7ebb43884adb8223cf5db155 | refs/heads/master | 2022-12-31T15:58:05.539107 | 2020-10-28T04:11:22 | 2020-10-28T04:11:22 | 301,163,505 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import gym
from gym import error, spaces, utils
from gym.utils import seeding
from gym.spaces import Discrete, Box
from gym.envs.classic_control import rendering
import pygame
from time import sleep
from random import randint
import sys
import numpy as np
class SnakeEnv(gym.Env):
metadata = {'render.modes': ['hum... | UTF-8 | Python | false | false | 4,011 | py | 7 | snake_env.py | 6 | 0.557218 | 0.531538 | 0 | 112 | 34.821429 | 172 |
gleekzorp/pyclinic | 11,879,879,542,769 | d78d6c0de870d3b1468c5eddae73d7ae9059f9a6 | 58f7cdfd4217c5199ce244ee68adfeee2339810d | /pyclinic/openapi.py | 9a38520228584d0f8411c31827a025875f8686dd | [
"MIT"
] | permissive | https://github.com/gleekzorp/pyclinic | 00fb7c6bd0ac2b00d01f9cd3a38c7fe3ad19139c | 4e95d0a49b536bc08884b74668b833ab03c69c2a | refs/heads/main | 2023-07-12T20:31:32.003003 | 2021-08-18T19:35:49 | 2021-08-18T19:35:49 | 395,820,298 | 0 | 0 | MIT | true | 2021-08-13T22:54:45 | 2021-08-13T22:54:45 | 2021-08-13T16:27:36 | 2021-08-13T16:27:34 | 157 | 0 | 0 | 0 | null | false | false | import os
import re
import json
import logging
from typing import Dict, List, Optional, Tuple
import yaml
import requests
from rich.console import Console
from pyclinic.normalize import normalize_class_name, normalize_function_name
console = Console()
_logger = logging.getLogger(__name__)
METHODS = [
"get",
... | UTF-8 | Python | false | false | 9,734 | py | 9 | openapi.py | 4 | 0.610438 | 0.607458 | 0 | 266 | 35.593985 | 119 |
kms08452/CoroNet | 6,425,271,092,689 | a6b6338891c091f01c7b34a971e82fa5f97af29a | 3363253c15a1c79f0dea133b7a0731f9d51f109d | /Corona_pmid/Corona_pmid.py | 90b295939069a8303207e773c213ff9ba0854db2 | [] | no_license | https://github.com/kms08452/CoroNet | d516f38f423b4276fb94c214ae6e649c5e689048 | 37cc036857ff31c1d0c927ffac8374af45a18e01 | refs/heads/master | 2021-05-20T00:43:16.489352 | 2020-07-27T07:24:13 | 2020-07-27T07:24:13 | 252,110,745 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import io
import json
import sys
import time
import random
def web_request(method_name, url, dict_data, is_urlencoded=True, timeout_seconds=3):
"""Web GET or POST request를 호출 후 그 결과를 dict형으로 반환 """
method_name = method_name.upper() # 메소드이름을 대문자로 바꾼다
if method_name not in ('GET', 'POST'):
... | UTF-8 | Python | false | false | 5,825 | py | 26 | Corona_pmid.py | 22 | 0.547064 | 0.531464 | 0 | 155 | 35.812903 | 139 |
Ahmedabied/the-hole | 7,327,214,225,538 | e798b41fe5e4f107cbc82787dd5b72a4d6797bcc | 5f18a128cc4bcbc04e6157db73cdf5647fd1ebe4 | /uptohole.py | 5db6f17b45f8640caf3c942dffbda71ec7bd7caf | [] | no_license | https://github.com/Ahmedabied/the-hole | a09ceda87c752976189196f77cdf80e00a417c05 | 0f1dad0772de14718ef629e19546373af6294240 | refs/heads/master | 2021-01-02T22:52:36.566710 | 2017-08-05T08:26:23 | 2017-08-05T08:26:23 | 99,372,414 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ftplib,os,os.path,sys,zipfile,socket
host="host"
username="username"
password="password"
curdir=os.getcwd()
try:
ftp=ftplib.FTP(host,username,password)
print("[#] Connected to : %s"%(str(ftp.host)))
print("[#] Server current Dir : %s"%(ftp.pwd()))
print("[#] Current Device Dir : %s"%(curdi... | UTF-8 | Python | false | false | 1,334 | py | 3 | uptohole.py | 2 | 0.593703 | 0.58021 | 0 | 44 | 28.181818 | 111 |
BinaryAlien/itemsetcopier | 317,827,627,187 | 04a7c5cd4c78b2bddc515501925295e326183240 | 81fac885a73cf49de99728a56afc2204527dade3 | /test.py | 6e88f02e0a5e3a3fd7cb95a884a2db567a214175 | [
"MIT"
] | permissive | https://github.com/BinaryAlien/itemsetcopier | cbef9fcbbc9bbc319a6d83651f3d3cb5b383fabe | b34842b1470dd02a00b1f3a958605a61f7a65d00 | refs/heads/master | 2021-07-22T18:17:23.186203 | 2021-01-23T15:51:37 | 2021-01-23T15:51:37 | 239,313,812 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from itemsetcopier import SET_NAME_MAX_LENGTH, Translator, ReturnCode, translate
import unittest
class MobafireTest(unittest.IsolatedAsyncioTestCase):
async def _test(self, set_name, url, build_index, expected_code):
res = await translate(Translator.MOBAFIRE, set_name=set_name, url=url, build_index=build_index)
s... | UTF-8 | Python | false | false | 6,644 | py | 4 | test.py | 2 | 0.724413 | 0.684828 | 0 | 102 | 64.137255 | 197 |
NageshRaykar/quality-analyzer | 2,774,548,906,603 | c1c4ef61ed301cccb90959d3917dc18a2faccce4 | a3d7db054656de34db5fb1e8d68b09c14456afdb | /rapidplugin/tests/resources/pypi/p1/p1.py | cb4483169e33c22a173407a9c95d8c8aa8dcf84b | [
"Apache-2.0"
] | permissive | https://github.com/NageshRaykar/quality-analyzer | 27ba09fe5a3a6296be14072f547282eae9959633 | f8861865db0683ad37cc42ae858e9fcc004e6b17 | refs/heads/master | 2023-06-23T04:05:29.562209 | 2021-07-22T15:12:21 | 2021-07-22T15:12:21 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def c():
return
| UTF-8 | Python | false | false | 20 | py | 27 | p1.py | 17 | 0.5 | 0.5 | 0 | 2 | 9 | 10 |
apalade/restaurants | 11,879,879,553,455 | 0f88172e32606e4bd24846c401af1f6d5d6aa29f | 13feefb4f28fcbb2532b33614b217f0c00aab4f2 | /backend/resources/restaurant.py | d7a179c8c5156d96096c52d7250d16bd6e2c0882 | [] | no_license | https://github.com/apalade/restaurants | ab94d89b8590195a42345fa3486cfea624733d20 | c440aa2f1c8b220c5e664651b2045d2cfcf7ed5c | refs/heads/main | 2023-01-03T07:51:51.189634 | 2020-10-29T09:40:59 | 2020-10-29T09:40:59 | 308,280,853 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from typing import Optional, List
from fastapi import HTTPException
from fastapi_utils.cbv import cbv
from fastapi_utils.inferring_router import InferringRouter
from sqlalchemy import orm
from resources._base import BaseLoggedInResource
import schemas
import models
router = InferringRouter()
@cbv(router)
class Rest... | UTF-8 | Python | false | false | 2,908 | py | 39 | restaurant.py | 25 | 0.607978 | 0.603851 | 0 | 84 | 33.619048 | 74 |
Jaskaran23/Programming-for-big-data-1-cmpt-732 | 3,135,326,140,027 | 49329e25fa7afeb4569ee6ed588bd5054d4a3157 | 32fc071128fd7fd104a23fa60fbca0acf003faeb | /Assignment4/relative_score_bcast.py | 050bd09504e1f350c94ffde3c537f6f2cafc1c3c | [] | no_license | https://github.com/Jaskaran23/Programming-for-big-data-1-cmpt-732 | 2b7f4a2741e3e95a5f46b0d772568e1bea2b8732 | ac4446b43af669070be2aadc93ce5476cfcfe2a9 | refs/heads/master | 2020-04-21T03:23:29.085651 | 2019-02-05T18:01:24 | 2019-02-05T18:01:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from pyspark import SparkConf, SparkContext
import sys
import json
assert sys.version_info >= (3, 5) # make sure we have Python 3.5+
def key_valuepair(dictvalue):
reddit_key=dictvalue.get("subreddit")
score_key=dictvalue.get("score")
yield (reddit_key,(1,score_key))
def adding_pairs(i,j):
sumone=0
scoresum=0
... | UTF-8 | Python | false | false | 1,482 | py | 24 | relative_score_bcast.py | 24 | 0.682186 | 0.653171 | 0 | 59 | 24.118644 | 93 |
abos5/pythontutor | 9,603,546,882,253 | f11946ce30e0f8bd0260ca563b615e9e6326774f | 7bc5f02dab36eb41e4245059b0830830f828b0fe | /dive/regression.py | 4253cf075c4430e75e69f5d21bee894ed04e50bb | [
"MIT"
] | permissive | https://github.com/abos5/pythontutor | 3380686cec0ce6a7000fdb0ad424227e8a489684 | eba451700def8bd98d74668d1b6cc08c0ccc0d3c | refs/heads/master | 2020-04-10T18:05:52.438924 | 2018-12-10T15:16:37 | 2018-12-10T15:16:37 | 70,141,475 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Regression testing framework
This module will search for scripts in the same directory named \
XYZtest.py. Each such script should be a test suit that tests a \
module through PyUnit.
"""
import sys
import os
import re
import unittest
from toolbox import exit
def regressionTest():
path = os.path.abspath(os.p... | UTF-8 | Python | false | false | 894 | py | 124 | regression.py | 88 | 0.709172 | 0.706935 | 0 | 35 | 24.542857 | 65 |
majhar-nayem/Software-Engineering-Project | 14,035,953,162,587 | e73e2a8eaefcc3cb9e43e2a878af41afe8385fa5 | 7992752f110aceaa47fa1951c333a3cbb6209684 | /smartmenu/food/urls.py | 051965ae13806efd6365cf8f56cba25004cf8c0a | [
"MIT"
] | permissive | https://github.com/majhar-nayem/Software-Engineering-Project | 42f48a29e44e2a3c2b94f11786cfddaaff812aea | e768cc738054d4df3453ee2d42ae03c4d6948152 | refs/heads/master | 2020-04-19T19:12:46.562875 | 2019-06-23T15:31:40 | 2019-06-23T15:31:40 | 168,382,824 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path, include
from . import views
from .views import FoodListView, FoodDetailsView, FoodCategoryView
# api url handler
urlpatterns = [
path('category/', FoodCategoryView.as_view(), name='food-category'),
path('foodlist/', FoodListView.as_view(), name='food-list'),
path('fo... | UTF-8 | Python | false | false | 455 | py | 20 | urls.py | 14 | 0.685714 | 0.685714 | 0 | 12 | 35.916667 | 79 |
alehlipka/TarotMG-server | 6,012,954,263,639 | daae6fec76d9cbb54f25f157326db290c84e7d0d | cab10378580423bd2f76407b773dc2a007eb16b6 | /settings.py | 4224924271cb9a9df6c8e6765a9fc21bee96c2eb | [] | no_license | https://github.com/alehlipka/TarotMG-server | 4248f1a5464e566a0fa8132a3f49f6f22fafdddb | e9d5ba4c5b6cedaa8500ebfc5ad1eb225108fe73 | refs/heads/master | 2020-06-20T20:00:11.353538 | 2019-08-07T18:24:39 | 2019-08-07T18:24:39 | 197,230,396 | 0 | 1 | null | false | 2019-08-07T23:19:44 | 2019-07-16T16:32:11 | 2019-08-07T18:25:13 | 2019-08-07T18:25:12 | 58 | 0 | 1 | 1 | Python | false | false | """File for settings"""
# for shuffle
NUMBER_OF_SHUFFLE = 15
NUMBER_OF_CARDS = 78
# for Bot
token="" | UTF-8 | Python | false | false | 105 | py | 13 | settings.py | 10 | 0.647619 | 0.609524 | 0 | 8 | 12.25 | 24 |
Catory/mumu_fruits | 6,227,702,588,095 | 2d328309ca6a68eb6ffc69a72ff7aacbcb604071 | b56017aa4f7a40671835688ef7abcc276e0b902b | /appOne/migrations/0008_order.py | 9301f2f8d054e9f4a735017eaf997d53b93a8fb1 | [] | no_license | https://github.com/Catory/mumu_fruits | f51ab10f5353eb578293ee522393bc5067526404 | 86439ec3e2571f429aa4a0eeb85702cc65e8e4d1 | refs/heads/master | 2021-05-11T01:39:00.443031 | 2017-12-23T10:02:59 | 2017-12-23T10:02:59 | 118,335,192 | 0 | 0 | null | true | 2018-01-21T13:01:37 | 2018-01-21T13:01:37 | 2017-12-23T10:03:49 | 2017-12-23T10:03:48 | 547 | 0 | 0 | 0 | null | false | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-06 06:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('appOne', '0007_user'),
]
operations = [
mi... | UTF-8 | Python | false | false | 793 | py | 30 | 0008_order.py | 13 | 0.566204 | 0.534678 | 0 | 27 | 28.37037 | 114 |
samarthvaru/FarmUp1 | 6,983,616,834,014 | 8e6be4e7c04bb1cf2eaf7ba1a4f290e4a09bff45 | 6b899d257d40365dc3ce09f6a286378432bd152e | /Backend/backend/api/product/serializers.py | 9e5a35fb3ade1869dd7e9965643953adb918105d | [] | no_license | https://github.com/samarthvaru/FarmUp1 | e0b663bcd0066dd183280cf4e4f670d16183488d | 2d0fb358317339b754c55fb431035137b11959a7 | refs/heads/master | 2023-08-10T23:39:33.804508 | 2021-09-20T22:04:09 | 2021-09-20T22:04:09 | 408,607,002 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rest_framework import serializers
from api.customerProfile.serializers import FarmerSerializer
from products.models import Product,Tag
from api.customerProfile.serializers import FarmerSerializer
class TagSerializer(serializers.ModelSerializer):
class Meta:
model = Tag
fields = ['title', 'sl... | UTF-8 | Python | false | false | 1,105 | py | 33 | serializers.py | 31 | 0.648869 | 0.648869 | 0 | 39 | 27.358974 | 105 |
DamonZCR/PythonStu | 11,012,296,152,663 | 5dff900c193dd605ba5f2de56ae29e9d00b61916 | caa72788fdae6b05c5ce4c132b45fc00d55bb607 | /47Tkinter/Canvas画布/18-4Canvas画布画图形.py | 15351acebbe878bea337f0e94b0e4238cf4d307b | [] | no_license | https://github.com/DamonZCR/PythonStu | dcc2ba49195f5859fd63227fe0f8f78b36ed46df | 88fec97e3bccff47ba1c5f521f53a69af6ca2b2d | refs/heads/master | 2023-07-05T06:29:53.300920 | 2021-08-13T12:22:30 | 2021-08-13T12:22:30 | 302,256,563 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
'''显画出一个椭圆'''
root = Tk()
w = Canvas(root, width=200, heigh=100)
w.pack()
# 前两个参数代表起点,后两个代表终点,dash代表线的样式,虚线
w.create_rectangle(40, 20, 160, 80, dash=(4, 4))
w.create_oval(40, 20, 160, 80, fill='pink')
w.create_text(100, 50, text='Damon')
w2 = Canvas(root, width=200, heigh=100)
w2.pack()
w2.create... | UTF-8 | Python | false | false | 522 | py | 237 | 18-4Canvas画布画图形.py | 230 | 0.667401 | 0.519824 | 0 | 16 | 27.4375 | 49 |
bsmi021/eahub_shopco | 1,494,648,643,497 | 3a1f75459e8eb5cbb45b29d5e415a53af37998d2 | 31c2ef1b6e999ebc0ca6b61ca03e20cc7701e1ff | /simulator/simulator.py | bd4144468340946747b63840530ddd194213e232 | [] | no_license | https://github.com/bsmi021/eahub_shopco | a1c8e71e40bc507f2ded22fa2b56fbdfb3b17184 | 3f4c93c631e5d5b52acd2ce11e220ff3fbec07b6 | refs/heads/master | 2022-12-09T01:22:21.446915 | 2019-06-11T17:40:42 | 2019-06-11T17:40:42 | 175,206,709 | 0 | 0 | null | false | 2022-12-08T01:41:44 | 2019-03-12T12:29:56 | 2019-06-11T17:40:57 | 2022-12-08T01:41:44 | 16,596 | 0 | 0 | 13 | Python | false | false | import requests
from py_linq import Enumerable
import random
import json
from werkzeug.security import generate_password_hash
from faker import Faker
from faker.providers import profile, person, address, phone_number, credit_card
from uszipcode import SearchEngine
import namesgenerator # using this for brands and pr... | UTF-8 | Python | false | false | 10,315 | py | 60 | simulator.py | 33 | 0.585167 | 0.565778 | 0 | 334 | 29.883234 | 101 |
srajsonu/LeetCode-Solutions-Python | 5,506,148,107,909 | 878912ef1f22329f656c2f1adf5a80e5d3cf0d5c | e8199f1d424592affe19b50fd96a02815067d1b1 | /Stacks/316. Remove Duplicate Letters.py | 263e3329f37f52b66ca25d8db7df936ff29448e8 | [] | no_license | https://github.com/srajsonu/LeetCode-Solutions-Python | 39a809e4c6d555a3a3055ce03d59cfa40b93a287 | 8ec31c8df2885f3da533424ba13060b7d3e3af78 | refs/heads/master | 2023-03-19T10:05:42.578615 | 2021-03-13T17:21:36 | 2021-03-13T17:21:36 | 280,716,200 | 0 | 1 | null | false | 2020-10-06T09:54:02 | 2020-07-18T18:32:04 | 2020-10-02T14:54:51 | 2020-10-02T14:54:48 | 116 | 0 | 1 | 1 | Python | false | false | class Solution:
def solve(self, A):
freq = {}
for i in A:
if i not in freq:
freq[i] = 1
else:
freq[i] += 1
ans = []
vis = set()
for i in A:
freq[i] -= 1
if i in vis:
continue
... | UTF-8 | Python | false | false | 584 | py | 304 | 316. Remove Duplicate Letters.py | 303 | 0.369863 | 0.359589 | 0 | 29 | 19.137931 | 60 |
ddtkra/atcoder | 3,779,571,225,556 | 9d562ad42ef5ae47c00e3f8fa5669ba799dbe00a | 0bb474290e13814c2498c086780da5096453da05 | /abc129/D/main.py.1 | 0399bbd378d78ca41a5376c955960f39962963f3 | [] | no_license | https://github.com/ddtkra/atcoder | 49b6205bf1bf6a50106b4ae94d2206a324f278e0 | eb57c144b5c2dbdd4abc432ecd8b1b3386244e30 | refs/heads/master | 2022-01-25T15:38:10.415959 | 2020-03-18T09:22:08 | 2020-03-18T09:22:08 | 208,825,724 | 1 | 0 | null | false | 2022-01-21T20:10:20 | 2019-09-16T14:51:01 | 2020-03-18T09:22:19 | 2022-01-21T20:10:20 | 1,657 | 0 | 0 | 2 | Python | false | false | #!/usr/bin/env python3
import sys
import re
def solve(H: int, W: int, S: "List[str]"):
L = [[0] * W for i in range(H)]
R = [[0] * W for i in range(H)]
U = [[0] * W for i in range(H)]
D = [[0] * W for i in range(H)]
for i in range(H):
for j in range(W):
# 左
... | UTF-8 | Python | false | false | 1,830 | 1 | 395 | main.py.1 | 217 | 0.372667 | 0.35236 | 0 | 75 | 23.293333 | 165 |
kingdion/filmstarter-server | 6,932,077,217,421 | fad19d9b50ec0068744eca973d9a1c214d90660b | 1e29104d1ed925af50c0e2f8867d8c48d7e9d8e0 | /create_script.py | 09da1f5f9f4d8db49f211c3e04b2900beb58d967 | [] | no_license | https://github.com/kingdion/filmstarter-server | 31f1bdea29d863104d2268e9d474ac7d5577f466 | 5f9cf86e58ca69f7b8f94b1f7b311f273a35d228 | refs/heads/master | 2020-05-27T14:28:18.187840 | 2019-06-03T04:30:44 | 2019-06-03T04:30:44 | 188,659,609 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
import string
import random
from app import create_app
from app.models import *
from werkzeug.security import generate_password_hash, check_password_hash
import uuid
app = create_app()
with app.app_context():
db.drop_all()
db.create_all()
user1 = Account("John", "Doe", "TestUser... | UTF-8 | Python | false | false | 2,704 | py | 6 | create_script.py | 6 | 0.670858 | 0.639053 | 0 | 53 | 50.037736 | 174 |
KaprianZ/IFPI | 9,191,230,032,283 | 3930d61be8d24102f4fb09576b7511121fec430c | 396886c96fe16f6bee2cfba4466d0a4d3df78044 | /Python/Atividades - DOT/Ativ. Sem. 01/Peso Ideal.py | 890d572351826012210474135396a77dc7424f94 | [
"MIT"
] | permissive | https://github.com/KaprianZ/IFPI | 198db256b62b0764ab33d0aae4fc56158fa1f40c | 54ffea357073f03f70010670a88382bf06a0af1f | refs/heads/main | 2023-07-15T20:08:43.453771 | 2021-08-27T16:40:59 | 2021-08-27T16:40:59 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def peso_ideal(a, s):
if s == 1:
return (62.1 * a) - 44.7
if s == 2:
return (72.7 * a) - 58
def main():
h = float(input("Digite a sua altura: "))
s = int(input("Você é homen ou mulher? 1 - Mulher 2 - Homem "))
c = peso_ideal(h, s)
print(f"Seu peso ideal é {c} kg.")
if _... | UTF-8 | Python | false | false | 357 | py | 21 | Peso Ideal.py | 12 | 0.477401 | 0.435028 | 0 | 18 | 18.666667 | 67 |
drnodev/CSEPC110 | 10,084,583,229,656 | 05b40eb220e7302a73197723786bfb86d51f0bba | 61e3974b8862606ef69953ed3cc745237de35e7b | /prove01_colors.py | c0d56146bc2ac797256402f2f3556883b62ac507 | [] | no_license | https://github.com/drnodev/CSEPC110 | 23a7a1113a12fdb9af6bef94bff3858105073cd5 | bc575262ac2f56864ebe6c4427433affc90efbb9 | refs/heads/master | 2023-05-26T03:16:16.731471 | 2021-06-08T03:02:20 | 2021-06-08T03:02:20 | 367,801,860 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
File: prove01_colors.py
Author: NO
Purpuse: This program ask your favorite color, and give you back
"""
color = input("Please type your favorite color: ")
print("Your favorite color is: {} Woow!!!!! That color is gorgeous".format(color))
dislike = input("What color do you dislike? ")
print(":( .... Oh!!!! No!!! ... | UTF-8 | Python | false | false | 373 | py | 7 | prove01_colors.py | 6 | 0.670241 | 0.664879 | 0 | 12 | 30.166667 | 82 |
vakulenkoannag/gloss | 5,171,140,666,941 | 5fa5dca40fc9cf4c52bd9ddc1bf95288bbb79726 | f892a1c6b5d82ab64aa284fe0696a812c4c3ede9 | /hw9/hw9.py | edda968432b67c319544b27c8eae797a9ab3a7a7 | [] | no_license | https://github.com/vakulenkoannag/gloss | 8724431949c3c3755955681660aeb5ee6dff16fd | 107937b92c3d0d30da7927fd6745d2be74eefa6c | refs/heads/master | 2018-09-07T15:47:39.755998 | 2018-06-20T09:47:52 | 2018-06-20T09:47:52 | 103,251,849 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
def nameinput():
filename = input('Введите название файла: ')
return filename
def gettext(filename):
with open (filename, 'r', encoding='utf-8') as f:
text = f.read().lower()
for symbol in ['.', ',', ':', ';', '—', '!', '?', '*', '&', '"', '"', '«', '»', '…', '/', '(', ')']:
... | UTF-8 | Python | false | false | 1,596 | py | 65 | hw9.py | 41 | 0.529703 | 0.527581 | 0 | 49 | 27.857143 | 104 |
benti/Error-Pypagation | 13,134,010,037,519 | 5ca30be7f3c5b54567833b5548148d43066d0f8b | d1011bcd64c5aae27738a877f2ab86b06395689c | /errorpro/core.py | c5bd46bfd295bac3a8eca1cb24cf0461b9bdbf78 | [] | no_license | https://github.com/benti/Error-Pypagation | 1f0c88b10f2b778c463bfb5c0c5a31d4f409d1cf | 108feddc58a705da82fe6fdce658b419b589b533 | refs/heads/master | 2021-01-16T17:51:41.775271 | 2016-04-21T18:38:33 | 2016-04-21T18:38:33 | 41,669,639 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
from sympy import S, Expr, latex, Function, Symbol
from errorpro.units import parse_unit
from errorpro.quantities import Quantity, get_value, get_error, get_dimension
from errorpro.dimensions.dimensions import Dimension
from errorpro import pytex
from IPython.display import Latex as render_latex
d... | UTF-8 | Python | false | false | 5,465 | py | 20 | core.py | 17 | 0.627081 | 0.625984 | 0 | 148 | 35.925676 | 119 |
savethebeesandseeds/cuwacunu_dowaave | 111,669,192,281 | 041eac041cc13828e739d0393dd5f2644d1e875a | 451d5e3ed6f65bfe6b6918caa4a07ec5c2734de7 | /cwcn_duuruva_piaabo.py | 6bb1efe9d2ca28e1f87bafa0d8fbc6dc91f67297 | [] | no_license | https://github.com/savethebeesandseeds/cuwacunu_dowaave | b75c40d236be23bedc8b1721d1c9303bfa6f94ff | 836406874e59c97f97253c42fcbaca8c751dce1a | refs/heads/master | 2023-08-30T01:22:41.742420 | 2021-10-25T05:43:23 | 2021-10-25T05:43:23 | 411,772,746 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # --- --- ---
# cwcn_duuruva_piaabo.py
# --- --- ---
# a mayor TEHDUJCO to python fundation
# --- --- ---
# a mayor TEHDUJCO to the torch fundation
# --- --- ---
import math
# --- --- ---
import cwcn_dwve_client_config as dwvc
# --- --- ---
class DUURUVA:
def __init__(self,_duuruva_vector_size : int,_wrapper_duuruv... | UTF-8 | Python | false | false | 6,471 | py | 21 | cwcn_duuruva_piaabo.py | 16 | 0.48586 | 0.476433 | 0 | 126 | 50.349206 | 199 |
schwt/bi_graph | 12,068,858,131,806 | 99e99cc9d0569592c10421f05ac48d93b95482b5 | 98638a1b31c6ffe372c381e1ed7b7bf742e8b489 | /src/print_result.py | 7154708aea2f24b7dfed0e4c3ea6c084280890aa | [] | no_license | https://github.com/schwt/bi_graph | 79e9afb54ed1e7ca2d7871469884971caaaa6021 | 56657dac5b1ef765a5cb33a6ef5f1bee93e2418a | refs/heads/master | 2021-06-04T14:41:32.300563 | 2020-03-19T06:12:48 | 2020-03-19T06:12:48 | 103,367,097 | 1 | 2 | null | false | 2019-03-22T08:34:13 | 2017-09-13T07:20:09 | 2018-11-06T09:20:53 | 2019-03-22T08:34:13 | 125 | 1 | 0 | 0 | C++ | false | null | #!/usr/bin/python
#encoding:utf-8
import sys
s_sep = "\t"
count = 0
f_src = sys.argv[1]
f_dst = sys.argv[2]
f_name = sys.argv[3]
idc_id = int(sys.argv[4])
idc_name = int(sys.argv[5])
if len(sys.argv) >= 7:
count = int(sys.argv[6])
d_name = {}
for line in file(f_name):
sep = line.strip().split(s_s... | UTF-8 | Python | false | false | 1,249 | py | 42 | print_result.py | 35 | 0.486789 | 0.461169 | 0 | 55 | 21.709091 | 99 |
thaahtel/Toinen_kerta | 16,750,372,456,086 | 63b3ea4b3ce346de19dfb0e5bac8722bdd7c33ce | 46650a83f935d76c8556ae5d12c1994e4d8ff84a | /lukumaara1.py | 66d5bf33bf760286da720415527514d49536c2ba | [] | no_license | https://github.com/thaahtel/Toinen_kerta | 88289c7c51f00ffaafbab03399168cce42e09834 | 2ce2bf6648a984fcafade8f539f8847a2eae04ea | refs/heads/master | 2022-11-06T12:42:26.492506 | 2020-06-15T11:00:12 | 2020-06-15T11:00:12 | 272,415,403 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print("Syötä kokonaislukuja, 0 lopettaa:")
luku = int(input("Luku: "))
lkm = 0
while luku != 0:
luku = int(input("Luku: "))
lkm = lkm +1
print("Lukuja yhteensä " + str(lkm))
| UTF-8 | Python | false | false | 187 | py | 7 | lukumaara1.py | 6 | 0.603261 | 0.581522 | 0 | 9 | 19.444444 | 42 |
Refragg/VMU-Bad-Apple | 18,992,345,395,434 | 056075c1e011de1ca8f65223a06a7536530a319c | bdccfab594f79677936c14b8dd26a378c96cddfa | /converter.py | 2100dd58371f667ba5b88854e6c8543bc8e069cc | [] | no_license | https://github.com/Refragg/VMU-Bad-Apple | 5a66ad86a61b86f5c85267d0eb89639de5416bf1 | bfd0db411000c906082f2a51e73b8474dbcf7afa | refs/heads/master | 2023-04-02T13:42:47.457301 | 2021-04-13T19:00:41 | 2021-04-13T19:00:41 | 357,643,353 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This script assumes you have a set of frames that are 48x32 in size
and a bit-size of 1 or equivalent so that it can be converted correctly.
"""
from PIL import Image
totalbytes = bytearray()
for i in range(6073): # Iterate through all frames
currentPath = "frames/frame" + str(i) + ".png" # Set Path ... | UTF-8 | Python | false | false | 1,624 | py | 5 | converter.py | 3 | 0.589286 | 0.570197 | 0 | 49 | 31.142857 | 122 |
tojames/mobilesystem | 11,184,094,839,430 | 79e96d8fe34092149f8f6504d62b2423fba96cd7 | fc633b759fff244f1d753719d147e8553ccc231b | /mobile/apps/entry/urls/tags.py | 53aeba7081299295eb4d3e3aa921278bc30a649c | [] | no_license | https://github.com/tojames/mobilesystem | 99ef591e77e830a875eeeefb471848e5d4f856fa | ab30887bab69f46c93461ab550311fb1ed865d65 | refs/heads/master | 2019-07-05T13:21:44.239144 | 2011-12-18T11:06:03 | 2011-12-18T11:06:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Urls for the entry tags"""
from django.conf.urls.defaults import url
from django.conf.urls.defaults import patterns
from apps.entry.views.tags import tag_detail
tag_conf = {'template_name': 'entry/tag_list.html'}
urlpatterns = patterns('entry.views.tags',
url(r'^$', 'tag_list', tag_conf, name... | UTF-8 | Python | false | false | 570 | py | 300 | tags.py | 178 | 0.554386 | 0.554386 | 0 | 11 | 50.818182 | 116 |
yshlodha/multidb_router | 10,067,403,360,483 | 020e733c9e884550d43c2b341cebf6129d819ed9 | f01597b46110214c3823e762b0e46455d67930f7 | /multidb_router_app/data_handler.py | 2342ceb8375c703de4c8cc43cd9cb352d16d39ce | [] | no_license | https://github.com/yshlodha/multidb_router | 3f128399391b7a40668117d60d29f7c34d805dc3 | ce7769be4c2b0f10ccec375f72f5fd6dd5fe1e46 | refs/heads/master | 2020-03-10T00:03:13.877376 | 2018-04-11T12:24:58 | 2018-04-11T12:24:58 | 129,072,669 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .models import *
def get_product_list(user):
"""
:param user:
:return:
"""
product_list = []
try:
dbuser = DatabaseUser.objects.get(user__username=user.username)
dbs = dbuser.databases.all()
for db in dbs:
products = Product.objects.using(db.name).filte... | UTF-8 | Python | false | false | 2,233 | py | 14 | data_handler.py | 7 | 0.61442 | 0.61442 | 0 | 90 | 23.822222 | 82 |
HsOjo/FlaskExamples | 833,223,687,823 | 2df8260b025251870213a1ec3ff49382c6bd7d8a | acf2f17a28922f72b9ea792fedee57eb4a6c2b42 | /FlaskChapter4/forms.py | 0b3bcd020a941cd566268648371741e0e58d09d1 | [] | no_license | https://github.com/HsOjo/FlaskExamples | 1339246e7f07c2863451e5f48783bde772c8399c | 24246d7f18fbcf4db8a1de7ad68b299fd54047c4 | refs/heads/master | 2020-06-22T20:26:52.375162 | 2020-05-15T17:23:34 | 2020-05-15T17:23:34 | 198,390,826 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField, IntegerField, TextAreaField, SelectField, \
SelectMultipleField, RadioField
from wtforms.validators import DataRequired, Email
class LoginForm(FlaskForm):
username = StringField(label='用户名', validators=[DataRequired()... | UTF-8 | Python | false | false | 1,566 | py | 100 | forms.py | 55 | 0.60631 | 0.599451 | 0 | 42 | 33.714286 | 104 |
Sagar2366/SPOJ-Python-Solutions | 8,529,805,059,533 | c7a065969920f2cf830a13da4deba2ba5a745248 | 8ae6d9b79ed1d18ce9677099225b17d99c64171d | /CANDY.py | f8e4953cb593af7f10f4b74f71741947e454b223 | [] | no_license | https://github.com/Sagar2366/SPOJ-Python-Solutions | d0645ce08378da6220a1e03577c246a5aa7db841 | 3acc1431761d53b96dff9c49a2d9c785c377abe4 | refs/heads/master | 2020-05-09T13:42:47.887839 | 2016-05-30T11:54:23 | 2016-05-30T11:54:23 | 181,164,916 | 1 | 0 | null | true | 2019-04-13T12:03:50 | 2019-04-13T12:03:49 | 2017-07-21T01:36:37 | 2016-05-30T11:55:06 | 31 | 0 | 0 | 0 | null | false | false | while True:
noOfCase=int(raw_input())
if noOfCase<0:
break
else:
series=[]
for i in range(noOfCase):
series.append(int(raw_input()))
sum1=0
for i in series:
sum1+=i
if sum1%noOfCase==0:
avg=sum1/noOfCase
moves=0
... | UTF-8 | Python | false | false | 472 | py | 73 | CANDY.py | 71 | 0.427966 | 0.40678 | 0 | 20 | 22.65 | 43 |
somphorsngoun/graphic-1 | 670,014,922,131 | 37cd2d7a09ef0fa9f66b309a4aec4a017de7c251 | 21c5a502b9cba927d47e6989be10d9fe1e04b87d | /Homework/Import/Events-/event_1.py | 40ee7b962f574456b68ad00afa4e91c50a13ad3f | [] | no_license | https://github.com/somphorsngoun/graphic-1 | 19e011c5ad9d45a574dc8f50e10d8a70510c274b | a3b50f6b948cfdf67b040c1eb85109b3f58bce86 | refs/heads/main | 2023-02-19T00:01:15.462078 | 2021-01-19T08:28:57 | 2021-01-19T08:28:57 | 330,911,479 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
import random
def doOnClick_1(event):
print("class B")
def doOnClick_2(event):
print("class C")
# Create an empty window
root = tk.Tk()
root.geometry("600x400")
canvas = tk.Canvas(root)
oval = canvas.create_oval(50, 50, 300, 300, fill="#F39118", tags="myTag")
canvas.tag... | UTF-8 | Python | false | false | 492 | py | 28 | event_1.py | 28 | 0.654472 | 0.599593 | 0 | 23 | 19.478261 | 73 |
malminhas/trello-utils | 19,396,072,329,998 | 32174ed3bd92fee25621df31ab39a11889d76f3a | d95ca79b4341bc404e31d32760c7e91d39969131 | /trelloDataProcessor.py | 6752f32ede2a85b2a7f99d2f7e836bbe1a0111df | [
"Apache-2.0"
] | permissive | https://github.com/malminhas/trello-utils | 08d2ffbfe960be2284a08ac1270d4305604c736b | 49a011de1563a87a87e32523dc6d1c73f1fa2a66 | refs/heads/master | 2020-03-28T19:54:25.405050 | 2019-12-02T17:01:35 | 2019-12-02T17:01:35 | 149,020,339 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#
# trelloDataProcessor.py
# ----------------------
#
# Mal Minhas <mal@kano.me>
# Copyright (c) 2018 Kano Computing. All Rights Reserved.
# Licence: GPLv3
#
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from matplotlib import cm
import seaborn as sns
# us... | UTF-8 | Python | false | false | 9,939 | py | 10 | trelloDataProcessor.py | 8 | 0.576718 | 0.559312 | 0 | 226 | 42.977876 | 158 |
broadinstitute/RVBLR | 11,768,210,427,970 | e4af970023334ec78b72a282f8420be0c2e9b0a1 | daf017f502eb34fc697c366922925c4327ca1869 | /util/RVBlr_examine_each_var_separately.py | de855098a21366981dcee623b50372a19b2e1051 | [
"MIT"
] | permissive | https://github.com/broadinstitute/RVBLR | 7453870127d4b04c674faa08f2374b1381e6d8b7 | 462848ab21c9352d2c18dbdb9005695e216b217f | refs/heads/master | 2023-07-09T21:10:18.012773 | 2021-08-27T15:32:26 | 2021-08-27T15:32:26 | 346,779,782 | 0 | 1 | MIT | false | 2021-03-11T17:23:58 | 2021-03-11T17:15:27 | 2021-03-11T17:15:50 | 2021-03-11T17:23:58 | 0 | 0 | 1 | 0 | null | false | false | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys, re
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
import datetime
import subprocess
import argparse
import logging
FORMAT = "%(asctime)-15s: %(levelname)s %(module)s.%(name)s.%(funcName)s %(message)s"
logger = logg... | UTF-8 | Python | false | false | 2,538 | py | 7 | RVBlr_examine_each_var_separately.py | 6 | 0.631994 | 0.626478 | 0 | 79 | 31.063291 | 140 |
Jin-SukKim/Algorithm | 455,266,545,077 | fcddb626b46868e15d8d0cece7a60864343188d5 | 11130633fe59b222da0696dc05e72ac30871a573 | /Problem_Solving/leetcode/Algorithm/Binary_Search/167_Two_Sum_II_Input_Array_is_Sorted/twoSumII_v2.py | bb4e1ccdf4274e82b90d536e5cafb4e3287d5144 | [] | no_license | https://github.com/Jin-SukKim/Algorithm | 024aa77c6bf63666910a1eb03407e808a05307ec | 5f2a14fe1f64032126df55b1eadc1580a32735f3 | refs/heads/master | 2023-09-01T20:50:13.150780 | 2023-09-01T07:54:32 | 2023-09-01T07:54:32 | 263,555,962 | 4 | 0 | null | false | 2023-02-14T14:36:38 | 2020-05-13T07:24:51 | 2023-02-12T08:15:48 | 2023-02-14T14:36:37 | 3,011 | 1 | 0 | 0 | C++ | false | false |
import bisect
# 이진 검색으로 풀이하면 검색 log n을 n번 반복하므로 시간 복잡도가 O(n log n)이 된다.
# 투 포인터 방식인 O(n)보다 이진 검색이 더 느리다.
def twoSum(numbers: List[int], target: int) -> List[int]:
for k, v in enumerate(numbers):
left, right = k + 1, len(numbers) - 1
expected = target - v
# 이진 검색으로 나머지 값 판별
while ... | UTF-8 | Python | false | false | 1,177 | py | 400 | twoSumII_v2.py | 347 | 0.523906 | 0.512716 | 0 | 31 | 30.677419 | 63 |
justinsimonelli/Corkboard | 10,419,590,664,004 | 4ccb7e56da1d88f9d12b781dd09f60262c772806 | 02be15f4120c4c29d6d354abe732e3d4cf0fb6a8 | /routes.py | 1a2e281ee09ebad33694aeb0f0cd174db447c6a8 | [] | no_license | https://github.com/justinsimonelli/Corkboard | a2200f5f7a2330ab906300efcafe0bd9572f8069 | c60000e624f1aea098e53be998b167a28fa3706f | refs/heads/master | 2016-09-05T16:25:52.762740 | 2013-12-30T01:53:32 | 2013-12-30T01:53:32 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!flask/bin/python
from flask import jsonify,make_response,request, render_template, abort
import forecastio, dbUtil
from app import app, models
from config import FORECASTIO_KEY
@app.route('/', methods = ['GET'])
def render_home():
items = models.Todos.query.order_by(models.Todos.timestamp.desc()).all()
retu... | UTF-8 | Python | false | false | 3,244 | py | 12 | routes.py | 9 | 0.60111 | 0.586621 | 0 | 97 | 32.453608 | 113 |
FourColorsSuffice/FSND | 7,026,566,529,563 | 726f85ee49432132743fad050fc209cd94144b84 | 53a3c152a91f2776f63b162281816d14334927e3 | /projects/01_fyyur/starter_code/env/lib/python3.6/shutil.py | 98633f8f8c005e897b6c57ea3372404d4f4cc112 | [] | no_license | https://github.com/FourColorsSuffice/FSND | 789bd8551756fc20fbae97d31230d31a73bf2e90 | dd55b78d380836faa67d29855a64299cc60aa846 | refs/heads/master | 2020-12-02T13:11:02.484351 | 2020-01-02T06:47:37 | 2020-01-02T06:47:37 | 231,016,717 | 0 | 0 | null | true | 2019-12-31T03:09:26 | 2019-12-31T03:09:25 | 2019-12-30T19:18:06 | 2019-12-18T04:41:04 | 2,656 | 0 | 0 | 0 | null | false | false | /Users/pnu/anaconda3/lib/python3.6/shutil.py | UTF-8 | Python | true | false | 44 | py | 43 | shutil.py | 41 | 0.818182 | 0.75 | 0 | 1 | 44 | 44 |
cryptk/pylight | 17,721,035,083,803 | b2a7a01e1423fdb780d7fd7678a01029d10c6914 | 284ed75e0ace87d53394c2f5a62629b66819e092 | /pyqlight/command_line.py | 57a911129d53f54ed646f5835aa17ff086cada28 | [
"MIT"
] | permissive | https://github.com/cryptk/pylight | e2cd738ac686497e9abaf09908d36207f99742db | beb78662f8ff5ae0c9670ad6227de6cc87b381ed | refs/heads/master | 2020-05-17T16:47:56.861992 | 2015-07-28T16:14:10 | 2015-07-28T16:14:10 | 39,591,012 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
from pyqlight import QLight
from collections import OrderedDict
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
def main():
parser = ArgumentParser(description="control a Q-Light warning tower. "
"All lamps should have red, yellow and green "
... | UTF-8 | Python | false | false | 3,294 | py | 4 | command_line.py | 3 | 0.480267 | 0.476928 | 0 | 63 | 51.285714 | 79 |
KC2004/sqlAlchemy-hw | 4,939,212,443,340 | 40b0939c6a8ed35e0c9af739cbb5077de4540f4c | 370ef4712d31285cab584196e1603ccf0f2ae2af | /query.py | 5654be362c69feb6df75dff300d16a4e01550d5d | [] | no_license | https://github.com/KC2004/sqlAlchemy-hw | 8663b46558c8c09f4150aa4386131d967e617384 | 1b2c65e0847c7283610221b6eb8da72d6e96b458 | refs/heads/master | 2021-01-22T02:21:47.181976 | 2017-02-07T22:29:54 | 2017-02-07T22:29:54 | 81,048,237 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This file is the place to write solutions for the
skills assignment called skills-sqlalchemy. Remember to
consult the exercise instructions for more complete
explanations of the assignment.
All classes from model.py are being imported for you
here, so feel free to refer to classes without the
[model.]User prefix.... | UTF-8 | Python | false | false | 3,312 | py | 1 | query.py | 1 | 0.656099 | 0.6407 | 0 | 112 | 28.553571 | 118 |
wsgan001/data-mining-course | 4,045,859,194,332 | e726cbecbdf6be3a942e8808f0c684bc42791489 | 97b75306f4c7e2d366cbe58aa7c979c3c1fb2ff1 | /assignment6/santander.py | ad272288b1a1d35cf051878b8eed679e9973cebf | [] | no_license | https://github.com/wsgan001/data-mining-course | 0bd65ce954be28a1170dd3bd188ad0f2a01b66c9 | 4bd869b99a29933ce7304bf08f5f94aa87e95e9d | refs/heads/master | 2020-03-27T00:47:40.383517 | 2016-12-22T07:53:11 | 2016-12-22T07:53:11 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 16-12-1 下午1:10
# @Author : 骆克云
# @File : santander.py
# @Software: PyCharm
import pandas as pd
import numpy as np
import xgboost as xgb
import csv
from sklearn import preprocessing
data_dir = "./data/"
# 离散数据类型
mapping_dict = {
# 雇佣状态
'ind_emple... | UTF-8 | Python | false | false | 16,080 | py | 43 | santander.py | 31 | 0.500933 | 0.42654 | 0 | 333 | 45.663664 | 120 |
openstack/freezer-tempest-plugin | 11,029,476,058,159 | b1feb1a2c27cac8e34e8ac0cad1598457193bea6 | 4db753584b6d4dc4f2e594a79b4bab65b5aba80e | /freezer_tempest_plugin/tests/freezer_api/api/test_api_jobs.py | 4edf5650239a116b386602b1ea4c32a1e4a075bd | [
"Apache-2.0"
] | permissive | https://github.com/openstack/freezer-tempest-plugin | 03f5db6a8a5dcf79f8e1fcd57439e0decae5e4de | f8fe406aafb82878837706984b9a441a46aaf088 | refs/heads/master | 2023-09-03T22:11:35.113236 | 2023-02-14T01:58:32 | 2023-02-14T01:58:32 | 94,874,360 | 7 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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 ... | UTF-8 | Python | false | false | 5,685 | py | 27 | test_api_jobs.py | 19 | 0.585576 | 0.564116 | 0 | 154 | 35.915584 | 79 |
sztojfen/Euler | 10,453,950,402,596 | bd1d82fc8f6de0f385a5cdb335df40c550d722c6 | 09af8ebe9c02362f797dd9c4b132e68ba51f4860 | /15.py | 567b4f497a376588f7ab0b8cea6a87c76032664c | [] | no_license | https://github.com/sztojfen/Euler | 5471f2fa13c32bddea1efb9526ab51c2d2489a03 | 9f36dc8d91ca0590ac48ed83583720f551ec3eca | refs/heads/master | 2021-06-03T09:16:34.163012 | 2020-12-03T14:02:38 | 2020-12-03T14:02:38 | 145,708,684 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | __author__ = 'stefan'
def silnia(n):
if n==1:
return 1
else:
return n*silnia(n-1)
print silnia(40)/(silnia(20)*silnia(20))
| UTF-8 | Python | false | false | 151 | py | 47 | 15.py | 47 | 0.536424 | 0.476821 | 0 | 9 | 15.555556 | 40 |
aynella/lab22 | 6,889,127,544,284 | e5a7f5c5495040e516822eeca4589be8f0e9f8ae | 8289e5c60547fba8ab56542f2f9a5e5bf1437e9d | /ex1.py | 422adfa7ccb83547ed9162dfa5a90342f66d29b9 | [] | no_license | https://github.com/aynella/lab22 | ddc85832904d30021a6faa1cb80fd548071a744c | b1b5e794d1608777270c9e9f7c76a31837bc7d61 | refs/heads/master | 2021-01-06T11:29:56.112877 | 2020-02-18T08:47:24 | 2020-02-18T08:47:24 | 241,311,969 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def ex_1(n, i):
return n[i]
print(ex_1([10, 3, 4, 5, 9], 3))
print(ex_1([10, 3, 4, 5, 9], 4))
| UTF-8 | Python | false | false | 98 | py | 14 | ex1.py | 14 | 0.469388 | 0.295918 | 0 | 4 | 23.5 | 32 |
ssgalitsky/pymm | 5,557,687,719,936 | e3afb3d62472a10313ec950ae812619696aebd64 | ac81bb2c70a68dbc3e0403996e88def41cd9d11d | /setup.py | 30b5094c630aa09ecb658f467a05453c5e803173 | [
"MIT"
] | permissive | https://github.com/ssgalitsky/pymm | 1596ec6c15d399211e45453c5491a93178d5674f | 77f0cfc32a6819781cf61e3c311f1340406e3fba | refs/heads/master | 2020-06-04T06:57:14.761501 | 2017-02-17T21:37:10 | 2017-02-17T21:37:10 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from distutils.core import setup
# thanks to http://www.diveintopython3.net/packaging.html
# for the excellent tutorial on packaging python modules
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language ::... | UTF-8 | Python | false | false | 1,974 | py | 16 | setup.py | 10 | 0.650456 | 0.645897 | 0 | 52 | 36.961538 | 79 |
Julien-Kinderf/word-blitz-solver | 6,700,149,007,520 | 5855309cd9f803b6c1dd4d5f9f0dac4bed9efa71 | 9b195cf355d4bba73feb6867d9eab1494933f5f4 | /src/solver.py | c769ea7d26c818d69ddcc5d28ba0c51a722e7da4 | [] | no_license | https://github.com/Julien-Kinderf/word-blitz-solver | e77fef6b1703638085a1b79f573284e74cadb992 | 4dcdf90de8fc3287822dbf7dc97b64931f42f1d7 | refs/heads/master | 2022-04-16T03:16:07.018372 | 2020-04-09T20:20:03 | 2020-04-09T20:20:03 | 250,363,984 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
"""
This script
"""
import sys
import os
import time
import ocr
def neighboors(case):
"""
Returns the list of neighboors of the input node, following our grid convention
"""
# Switch case made with a dictionnary
n = {0: [1, 4, 5],
1: [0, 2, 5, 6, 4],
2: [1, 3... | UTF-8 | Python | false | false | 6,444 | py | 7 | solver.py | 5 | 0.577145 | 0.549899 | 0 | 189 | 32.984127 | 186 |
BhagyeshDudhediya/PythonPrograms | 16,569,983,830,510 | 4df0cac6d76dda3a1af63e399d508cec7159e781 | deea011bef7b656eb579a9769d07f14478a32690 | /18-loop-cntl-statements.py | f64b5167af240ae2308968153e4842076985700f | [] | no_license | https://github.com/BhagyeshDudhediya/PythonPrograms | 38abcfd94e21b7cc8c323760a313cf3930bb07b2 | 185152b7644462d9dc75a1c91aedf2cf13da5015 | refs/heads/master | 2021-04-30T15:09:54.311064 | 2018-10-31T09:50:57 | 2018-10-31T09:50:57 | 121,232,711 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3
# The Loop control statements change the execution from its normal sequence. When the execution leaves a scope,
# all automatic objects that were created in that scope are destroyed.
# There are 3 loop control statements:
# 1. break, 2. continue, 3. pass
# BREAK STATEMENT
# The break statement is ... | UTF-8 | Python | false | false | 2,145 | py | 55 | 18-loop-cntl-statements.py | 53 | 0.715152 | 0.699767 | 0 | 48 | 43.583333 | 119 |
tfmorris/wrangler | 17,403,207,492,564 | 12c5eb3299d16a40d256bef5ea583d2df0235951 | fa96af5a7b13ef0c79c134f0f38e0c8beb2ad4ac | /runtime/python/setup.py | e702f0502cbad601b0e56cec8a3eae338e062094 | [] | no_license | https://github.com/tfmorris/wrangler | 0eda4610207128047187be427d53d90958860021 | 0ae804edd84cb8040e1c93cc42222e0a41a4e94a | refs/heads/master | 2021-01-24T00:24:50.076635 | 2013-06-18T20:55:05 | 2013-06-18T20:55:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from setuptools import setup, find_packages
setup(
name = "DataWrangler",
version = "0.2",
packages = find_packages(),
url = 'http://www.stanford.edu/~skandel/platform/python/DataWrangler-0.1.tar.gz',
download_url = 'http://www.stanford.edu/~skandel/platform/python/DataWrangler-0.1.tar.gz',
) | UTF-8 | Python | false | false | 307 | py | 45 | setup.py | 27 | 0.70684 | 0.687296 | 0 | 8 | 37.5 | 91 |
Jiongxiao/Leetcode | 11,020,886,095,455 | 37aae13cee1e1b21016556550145d08b04f9069f | 4c67533d6d5183ed985288a55631fe1c99b5ae21 | /413_Arithmetic_Slices.py | 36793499a7ff658d7a1d929d67303960379edaa1 | [] | no_license | https://github.com/Jiongxiao/Leetcode | 546f789a0d892fe56d7f53a41aa97ccb2a8e1813 | 641775f750a1197f9aaa23e5122b0add2ae064ee | refs/heads/master | 2021-01-17T01:11:35.970423 | 2017-09-21T07:04:52 | 2017-09-21T07:04:52 | 56,422,836 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def numberOfArithmeticSlices(self, A):
"""
:type A: List[int]
:rtype: int
"""
n=len(A)
if n<3:
return 0
res=0
tail=[0]*n
if A[2]+A[0]==A[1]<<1:
tail[2]=1
res+=1
for i in range... | UTF-8 | Python | false | false | 450 | py | 128 | 413_Arithmetic_Slices.py | 128 | 0.375556 | 0.337778 | 0 | 20 | 21.5 | 42 |
leftomelas/funny-morse | 14,078,902,827,192 | 5c67387916db086ba3198bdb25fadefb9379c0e8 | fb82083e434c42ed6220a866183488aa8a7807cf | /funny_morse/show.py | e37ec4d4b824397c4bf0c1685282299851b2f77a | [
"MIT"
] | permissive | https://github.com/leftomelas/funny-morse | 6d4c7b35fb4f1b7f588c499cb61e9cab61e485ce | c50c9165ff739bd6da45cdc486e597742d8a1fea | refs/heads/master | 2023-08-11T15:46:40.680829 | 2020-07-15T08:10:44 | 2020-07-15T08:10:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter
import morse
TITLE = "funny-morse"
GEOMETRY = "" # Default
WPM = morse.WPM
FS = morse.FS
def info(title=-1, geometry=-1):
title = TITLE if title == -1 else title
geometry = GEOMETRY if geometry == -1 else geometry
print("Window :")
print(" Title =", title)
print(" G... | UTF-8 | Python | false | false | 1,597 | py | 10 | show.py | 8 | 0.589856 | 0.571071 | 0 | 56 | 27.517857 | 68 |
avvarga/Lab206 | 12,910,671,731,985 | bb0f7a0e59fc30032433c0742202386778cc65cf | 9ee644fdb3b0a5ae7887ecb1f4a9013b3abbcb8b | /Python/OOP/car.py | 17104afd7deeb4c779ff70c423641f088128c5fc | [] | no_license | https://github.com/avvarga/Lab206 | 0aa0bf7f1e0340466c5e120e7c1a8726f9385567 | c55fae4044625355ec392f3de58442b2767f7916 | refs/heads/master | 2021-04-15T15:42:11.700351 | 2018-04-13T23:07:25 | 2018-04-13T23:07:25 | 126,499,170 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class car(object):
def __init__ (self,price,speed,fuel,mileage):
self.price=price
self.speed=speed
self.fuel=fuel
self.mileage=mileage
if price>10000:
self.tax= 0.15
else:
self.tax= 0.12
print self.display_all()
def display_all(self... | UTF-8 | Python | false | false | 725 | py | 124 | car.py | 76 | 0.569655 | 0.475862 | 0 | 34 | 20.352941 | 49 |
romonzaman/piphone | 13,417,477,860,831 | 8dacd17c3195da5ab5fd83175d402f0b9cb18291 | 75d270d2a1f52a5977707f012dc6ff460e4689f5 | /oled_test.py | 7c7fd502751b953a8d9ac28e58e3a1a1c38a792e | [] | no_license | https://github.com/romonzaman/piphone | b8570dd6ce7ddfdbccd81f035085994c685d99f0 | 398098813f9aa609f4009f9dc35a956e93cfee4d | refs/heads/main | 2023-08-17T06:30:57.047861 | 2021-09-12T03:41:49 | 2021-09-12T03:41:49 | 405,401,976 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import board
import busio
from PIL import Image, ImageDraw, ImageFont
import adafruit_ssd1306
import time
i2c = busio.I2C(board.SCL, board.SDA)
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)
def oled_white():
oled.fill(250)
oled.show()
def oled_black():
oled.fill(0)
oled.show()
oled_black()
oled_... | UTF-8 | Python | false | false | 548 | py | 3 | oled_test.py | 2 | 0.698905 | 0.638686 | 0 | 39 | 13.051282 | 49 |
jpgil/logdelay | 14,894,946,588,601 | ca5130b09cca4c724ab1557d0fd089f8f53ec49c | 5ce28e39b5971e9c80b0c03456f304691effc847 | /src/helpers.py | 68ab687fe6ecef72d2a4b2aa3f42eb83190c7a6a | [
"Apache-2.0"
] | permissive | https://github.com/jpgil/logdelay | 0aefbf9efdbebc9cb028cbe7fc1d3ba27e7af029 | 788e9402d63cecc732822ac49a39dd961b63219f | refs/heads/master | 2022-09-09T20:24:55.507441 | 2021-06-02T07:41:33 | 2021-06-02T07:41:33 | 228,706,066 | 0 | 0 | Apache-2.0 | false | 2022-08-10T18:58:07 | 2019-12-17T21:38:21 | 2021-06-02T07:41:42 | 2022-08-10T18:58:06 | 13,961 | 0 | 0 | 6 | Jupyter Notebook | false | false | from networkx.drawing.nx_agraph import write_dot
from networkx.drawing.nx_agraph import to_agraph
from IPython.display import Image
import pygraphviz as pgv
def graph(G, color="#cccccc", filename="/tmp/simple.png"):
for u, v in G.edges:
if "weight" in G[u][v]:
G[u][v]["label"] = G[u][v]["weig... | UTF-8 | Python | false | false | 1,011 | py | 55 | helpers.py | 14 | 0.541048 | 0.536103 | 0 | 34 | 28.764706 | 84 |
roniwinik/Drivers | 9,766,755,642,504 | b68eab1631b483e8e69cacf6e406dfc0e77e2778 | b7de4effae566d88add33a9cd9656283167c960c | /Noise_Generator/Noise_Generator.py | a7b9ce29425325123e5a466d5e3622c7eff9e974 | [
"MIT"
] | permissive | https://github.com/roniwinik/Drivers | 3212122ffe52aa801223bbf2ed0f4f2ad047c828 | ba473bc21d1b5321da1e6caadec5b4d624282edc | refs/heads/master | 2021-06-25T06:54:26.563656 | 2020-03-23T21:45:13 | 2020-03-23T21:45:13 | 134,781,611 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import pickle
import InstrumentDriver
import numpy as np
import ast
import sys, os
from scipy.fftpack import fft, ifft
import scipy.io as sio
def loadData(file_path):
"""
Load a log file. (Use the built-in pickle module)
Parameters
----------
file_path: str
pa... | UTF-8 | Python | false | false | 19,576 | py | 5 | Noise_Generator.py | 4 | 0.566152 | 0.554914 | 0 | 454 | 42.118943 | 150 |
aitoralmeida/intellidata | 14,697,378,121,820 | b4fffaacc784f07ba742820aa58e3b97738836bd | 3f16f572ab972792be2cff2789fb6a0629088564 | /mongo_import.py | ed2b5f0d8118f7cd0dc4261243452fad02a13ff6 | [
"Apache-2.0"
] | permissive | https://github.com/aitoralmeida/intellidata | 13512827fb73cbb762345b6e5331c6d0a1b863b4 | 7a0ebdb9f9097aae4410e589646312ad3e24e66a | refs/heads/master | 2021-01-13T01:54:14.315721 | 2014-02-10T11:15:10 | 2014-02-10T11:15:10 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import json
import glob
from bbvalib import create_mongoclient
DELETE_ALL = True
TOP_CLIENTS = True
SHOP_ZIPCODE_SUMMARY = True
#############################################################################
#
#
# Import flat data (regular tables)
#
#
def process_origin_flat():
... | UTF-8 | Python | false | false | 46,439 | py | 4,764 | mongo_import.py | 23 | 0.442645 | 0.438511 | 0 | 1,114 | 40.685817 | 261 |
xiepeiheng/Visualization-of-machine-maintenance-data | 13,322,988,581,719 | 80b2827dc7b2d9e545226b50d4eeca45ecc0a9e9 | cb7edf68504f88cee8313d1ebc12190528242ae5 | /Visualization of machine maintenance data/view/person/parse.py | 828bd1c2a3aa6a2e7037fb638383917afdc90dab | [
"MIT"
] | permissive | https://github.com/xiepeiheng/Visualization-of-machine-maintenance-data | 894d292e25ca46dceae6e004ba72452366713c7c | 02bd235f21d2fe429c701929a3938fbc15385272 | refs/heads/main | 2023-08-16T14:45:35.131025 | 2021-10-20T15:19:19 | 2021-10-20T15:19:19 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Blueprint, render_template, request
from function.sqlite_function import *
import sqlite3
from settings import DATABASE_PATH
_person = Blueprint('person', __name__, url_prefix='/')
@_parse.route('/parse', defaults={'time': '2021-06-292021-07-29'})
@_parse.route('/parse/<time>')
def parse1(time):
... | UTF-8 | Python | false | false | 2,697 | py | 37 | parse.py | 17 | 0.574082 | 0.557235 | 0 | 88 | 25.306818 | 199 |
xenomarz/advanced-topics-in-deep-learning-236605-hw1 | 11,252,814,356,323 | 221e494744f3510ac9cc7a5a7f5dbc66ce85d58c | 86b9d66b4bae1098f99c1673e33af05bf3d3b3cc | /train_feature_extractor.py | c3514154dad1dddf86c7eeaf477b75fde6d3a4a1 | [] | no_license | https://github.com/xenomarz/advanced-topics-in-deep-learning-236605-hw1 | c5f33601f4556ca8bd650132a70b42812073ed22 | f5af0cd23da666bab391de7aee1e9baf00cdda74 | refs/heads/main | 2023-05-07T19:17:10.330984 | 2021-06-04T22:23:50 | 2021-06-04T22:23:50 | 372,843,482 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from torchvision.datasets.utils import download_url
import os
import sys
import tarfile
import hashlib
import torchvision
import torch
from torchvision.transforms import transforms
import numpy as np
import matplotlib.pyplot as plt
from augmentation import TwoCropsTransform
from moco import KeyEncoder
from moco import ... | UTF-8 | Python | false | false | 6,305 | py | 10 | train_feature_extractor.py | 6 | 0.618715 | 0.599841 | 0 | 153 | 40.20915 | 214 |
ParamitaDhyana/python-demo | 7,335,804,178,100 | b35712ce412c2a9e0d7f37f2d83ee555577ac5c9 | e18508d7b29ca29537198fe86e39fd445426a28b | /20181017/io/PickleDemo.py | 343b5a8e413aa746f75c32d483877943ed60865f | [] | no_license | https://github.com/ParamitaDhyana/python-demo | e417bed4f2e95588dbee5957b926e14ff0c9d427 | 1e7d7f1cad449a7b1c88a61cf85d3db6387feb6a | refs/heads/master | 2020-03-18T14:28:05.496021 | 2018-11-07T04:29:08 | 2018-11-07T04:29:08 | 134,849,555 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pickle
import os
import json
d = dict(name='Bob', age=20, score=99)
# print(pickle.dumps(d))
# with open('c:/GitHub/python-demo/20181017/io/dump.txt', 'wb') as f:
# pickle.dump(d, f)
# print(json.dumps(d))
# json_str = '{"age":20,"name":"daniel","score":100}'
# j =json.loads(json_str)
# print(j['age'])
... | UTF-8 | Python | false | false | 640 | py | 59 | PickleDemo.py | 51 | 0.602201 | 0.566038 | 0 | 31 | 19.548387 | 69 |
ryan-way-leetcode/python | 13,022,340,846,249 | af5912ca997e82f990a9dee72e18417817dfada0 | 55d8050c64c95af7315ac2585e745ecd485ab125 | /242_ValidAnagram/solution.py | c7c16fbcb1b0a7abff39978159dc77d142d9ae74 | [] | no_license | https://github.com/ryan-way-leetcode/python | bf6db483048be95b85d347401917fe2335618054 | aa210e56d9953ce2c4084ec7bfc953e52efcb8f1 | refs/heads/main | 2023-08-18T21:19:39.693588 | 2021-10-19T19:50:26 | 2021-10-19T19:50:26 | 419,070,851 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def isAnagram(self, s: str, t: str) -> bool:
d_s = {}
d_t = {}
for c in s:
if c not in d_s:
d_s[c] = 0
d_s[c] += 1
for c in t:
if c not in d_t:
d_t[c] = 0
d_t[c] += 1
return d_t... | UTF-8 | Python | false | false | 327 | py | 19 | solution.py | 19 | 0.321101 | 0.308869 | 0 | 16 | 19.5 | 48 |
denotepython/pythonbook | 13,254,269,118,451 | f9a92e78ee81153d7b998fb9877c80ce64d885ba | 1688cf63a2513238f3afdccdbb080aa0cca4004e | /learn python without code knowledge-- Craig Richardson/冒险一:太空飞船.py | 45ebea97dd038eb3d5ca5832498c3e95ac8bc0ce | [] | no_license | https://github.com/denotepython/pythonbook | 34910dd1379e5b5b9dce07c2126d02363af1ac0a | 885179a8ca67262c4db7fcb9b2673a3313a3ec92 | refs/heads/master | 2021-01-22T03:39:21.549355 | 2016-07-31T07:30:25 | 2016-07-31T07:30:25 | 58,024,965 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #raw_input()函数:使用户在提示符后面输入字符串
import time
shipname = "LQ_ship"
captain = "LQ"
location = "earth"
password = "1234"
password_temp = raw_input("Enter the password: ")
while password_temp != password:
print "password wrong"
password_temp = raw_input("Enter the password: ")
print "password right, weclome to the " + ship... | UTF-8 | Python | false | false | 1,235 | py | 57 | 冒险一:太空飞船.py | 56 | 0.662781 | 0.652789 | 0 | 48 | 24.041667 | 62 |
AloneRoad/ElasticLog | 15,874,199,141,755 | 3b574b4abd35c73f3d4bf4f4bdb4535888433e5f | 46a23a57a6e94a588b9f211e672390717cdf65a4 | /src/web.py | c285fa1e15b353810320f5deba0a335f950a5395 | [] | no_license | https://github.com/AloneRoad/ElasticLog | 00c671dc1d6dc293ac4225f158571af783331da2 | 7c3a750a1cd18356464f0752488a51cc5f026e26 | refs/heads/master | 2021-01-22T11:20:25.702760 | 2012-04-04T18:20:40 | 2012-04-04T18:20:40 | 3,931,705 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! coding: utf-8
# pylint: disable-msg=W0311
"""
- Hiển thị giao diện:
+ 1 ô nhập truy vấn
+ 1 vùng biểu đồ
+ 1 vùng các kết quả tìm thấy
- Nhận truy vấn
+ Tìm trong ElasticSearch
+ Tổng hợp kết quả, vẽ biểu đồ theo thời gian hoặc các tham số đã tách ở bước phân tích
"""
from flask import Flask, request, ren... | UTF-8 | Python | false | false | 3,837 | py | 11 | web.py | 10 | 0.528352 | 0.519078 | 0 | 132 | 27.598485 | 89 |
Umbrella-Digital/DataStream_Cookbook | 12,386,685,682,300 | 5b5cdd0dd8d430ec1bdd49364380105939c45789 | ee67ab08aac3a9c10d0e0c87888f46a1899be71a | /Recipes/lib/lotame.properties | e5c82a23a33cdc352d98755cc6c79bbf61c1bacc | [
"MIT"
] | permissive | https://github.com/Umbrella-Digital/DataStream_Cookbook | f7e2474d741aaa5e41999ca04164dafced289fcc | feceb9cffd87696f3bcd0e24a66a5b5c7c244617 | refs/heads/master | 2022-11-15T22:33:21.678522 | 2020-07-07T17:36:54 | 2020-07-07T17:36:54 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
#
# Filename:
#
# lotame.properties
#
#
# Basic Usage:
#
# 1. populate the following fields:
# username
# password
# client_id
#
#
[default]
auth_url=https://crowdcontrol.lotame.com/auth/v1/tickets
base_url=https://api.lotame.com/2
username=<username>
password... | UTF-8 | Python | false | false | 353 | properties | 1 | lotame.properties | 1 | 0.631728 | 0.623229 | 0 | 24 | 13.75 | 56 |
rakesht2499/ip_model | 77,309,446,584 | 4510c090e44bc650fe1d07ae5056fe89fde64bc8 | e040bdc04bf124cfcd693b3add2786d9137d7367 | /Ip.py | 3028acac6e08ea4882200497cf49713e0cd4d67c | [
"Apache-2.0",
"Python-2.0"
] | permissive | https://github.com/rakesht2499/ip_model | feea51ad8562e9e6614d555cecb39732937c0a84 | 951bef164fed2ae9142bff0f9f5b98b45e0fc2a1 | refs/heads/master | 2022-09-21T16:50:25.327634 | 2020-06-06T14:35:06 | 2020-06-06T16:24:32 | 251,326,314 | 5 | 0 | Apache-2.0 | false | 2020-06-03T22:19:12 | 2020-03-30T14:14:17 | 2020-06-03T18:51:09 | 2020-06-03T22:19:11 | 2,380 | 6 | 0 | 0 | Python | false | false | from ipaddress import ip_address, IPv4Address, IPv4Network, ip_network
from ip_model.IpObject import IpObject
from ip_model.Ipv4 import Ipv4
from ip_model.Ipv6 import Ipv6
class Ip(IpObject):
def __init__(self):
self.ipv4 = Ipv4()
self.ipv6 = Ipv6()
def __ip_decider(self, ip):
if isin... | UTF-8 | Python | false | false | 2,357 | py | 19 | Ip.py | 17 | 0.595248 | 0.58846 | 0 | 78 | 29.217949 | 84 |
bituka/e-eleksyon | 1,743,756,757,702 | e964be86e85fd852ce2fd924a825d40c098a818f | b0856bad0d28d74eac160bea58aabe37fe16f941 | /backend/vote/serializers.py | b86cc228a67b3bf87be8056519a9279ac2c2afc0 | [] | no_license | https://github.com/bituka/e-eleksyon | 90ab025c5aa5ec74f18776374e8376933216d26a | ecd494df83ecdfdd134c69213841051138ea32a3 | refs/heads/master | 2023-06-28T03:15:14.638512 | 2021-07-19T00:36:54 | 2021-07-19T00:36:54 | 364,792,939 | 0 | 3 | null | false | 2021-07-26T11:49:45 | 2021-05-06T05:17:50 | 2021-07-19T00:37:21 | 2021-07-20T05:59:44 | 3,264 | 0 | 1 | 0 | Vue | false | false | from rest_framework import serializers
from vote.models import Position, Candidate
class CandidateSerializer(serializers.ModelSerializer):
class Meta:
model = Candidate
fields = ['name', 'position', 'votes']
class PositionSerializer(serializers.ModelSerializer):
class Meta:
model = Pos... | UTF-8 | Python | false | false | 352 | py | 15 | serializers.py | 4 | 0.707386 | 0.707386 | 0 | 12 | 28.416667 | 55 |
Developing-Community/Developing-Community-Web | 17,892,833,756,271 | 4eb3a92c9bd1f3edd898bcb62755fef1040a447b | c63baadbefa9ff9800553487c4e3a0c125f13b72 | /users/urls.py | b1be075cdd2f27a8bb8f133dccb52cf2debf8734 | [
"MIT"
] | permissive | https://github.com/Developing-Community/Developing-Community-Web | 306245eafb857ee13c9f8e71ad38a23139681a03 | 733233da20148ae1affc33067c332f3619daa176 | refs/heads/master | 2018-09-17T05:39:15.940850 | 2018-09-15T10:27:25 | 2018-09-15T10:27:25 | 135,051,348 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from .views import (
UserCreateAPIView,
ProfileUpdateAPIView,
ProfileRetrieveAPIView)
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token
urlpatterns = [
path('auth/refresh_token/', refresh_jwt_token),
path('auth/verify_token/', v... | UTF-8 | Python | false | false | 627 | py | 44 | urls.py | 43 | 0.714514 | 0.714514 | 0 | 16 | 38.1875 | 90 |
claudiospro/neointel_proyecto01 | 6,528,350,307,297 | 42310db0a9991ed30343166066fd224a460ccd57 | e5381fbb04c325818abc44d7c97ad0792c380014 | /docs/analisis/muestra02/proceso.py | 5e782e41272bc9667214138aa4e091335701938b | [] | no_license | https://github.com/claudiospro/neointel_proyecto01 | 4b64d0a77d5c39fd11fc499e4a70b3b3468b0f1b | f6f13f038b7b759511958885eb2e3681220b0980 | refs/heads/master | 2016-08-11T16:36:49.915964 | 2016-01-08T21:43:10 | 2016-01-08T21:43:10 | 49,088,342 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import re
import time
from openpyxl import load_workbook
from openpyxl import Workbook
from openpyxl.cell import column_index_from_string
import config.cols
cols = config.cols.huecos
wb10 = load_workbook(sys.argv[1])
ws11 = wb10['X']
wb20 = Workbook()
ws21 = wb20.active
ws21['A1'] = 'municipio'
ws21['B... | UTF-8 | Python | false | false | 1,315 | py | 97 | proceso.py | 85 | 0.601521 | 0.542966 | 0 | 53 | 23.811321 | 70 |
BertrandBordage/Titelouze | 6,219,112,656,622 | 1d34db9c0c965eacacd0a60287f25fcd0bd39d12 | 7f7f09dc32c5e8bac7cedd9b56782f882e671fee | /setup.py | 56c7ba0b4db2c5267f13ea642903163696c55633 | [] | no_license | https://github.com/BertrandBordage/Titelouze | 5509f858ccc7daf0bec0bac5cae50d0b385dc672 | 178b8e26d16a38993d0d252e1de2300f6513bec2 | refs/heads/master | 2021-01-21T09:59:25.304895 | 2013-04-17T15:54:44 | 2013-04-17T15:54:44 | 3,545,692 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python
# coding: utf-8
from distutils.core import setup
setup(
name='Titelouze',
version='0.1.2',
author='Bertrand Bordage',
author_email='bordage.bertrand@gmail.com',
url='https://github.com/BertrandBordage/Titelouze',
packages=('titelouze',),
package_data={'titelouze': ['... | UTF-8 | Python | false | false | 859 | py | 18 | setup.py | 9 | 0.6461 | 0.640279 | 0 | 26 | 32.038462 | 70 |
eahmedali2005/GTM-DSM2 | 4,054,449,160,348 | 1a1fd7667b1d83fe79d5a5a42d0914663e02162a | 404d14312f008f9648b51b16dcca9716ab865d36 | /input_storage/component.py | 471cac379cc06710f1963b312c0c1938304f0b50 | [] | no_license | https://github.com/eahmedali2005/GTM-DSM2 | 898bee7019d800a8f70f0944fb8b58815c71bcc9 | 6aa949eed7ca44d3cef2847c082cb52d0cb18d90 | refs/heads/master | 2020-03-27T09:28:45.469432 | 2018-08-27T19:34:13 | 2018-08-27T19:34:13 | 146,344,871 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import string
def component_order():
return["envvar",\
"scalar",\
"channel",\
"xsect",\
"xsect_layer",\
"reservoir",\
"reservoir_connection",\
"gate",\
"gate_pipe_device",\
"gate_weir_device",\
"transfer",\
"io_file",\
"tidefile",\
... | UTF-8 | Python | false | false | 8,081 | py | 235 | component.py | 29 | 0.582972 | 0.582477 | 0 | 208 | 37.841346 | 127 |
karebearvfx/cspath-datastructures-capstone-project | 13,572,096,674,561 | a137360ebb521839774fca076b2502edfb9e9b22 | 57a6a0750f1015ebda6b7dbe7d47666581982073 | /finalcodes/script.py | 673aa8dfcc9075445e9e37ed043b728113b46065 | [] | no_license | https://github.com/karebearvfx/cspath-datastructures-capstone-project | 2865aeaa69a19f2ac8f42ea12638b322028b73a8 | 4b1b895aba4503534af47743139d62d248dfea5e | refs/heads/master | 2020-04-07T21:58:06.264145 | 2018-11-23T07:49:37 | 2018-11-23T07:49:37 | 158,748,618 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | ##import functions###
from data import *
from welcome import *
from hashmap import HashMap
from linkedlist import LinkedList
##GOAL:To retrieve a list of restaurants given a single input of what food type user enters
##
####variables###
#copy existing data
food_types = types
restaurants_list = restaur... | UTF-8 | Python | false | false | 5,491 | py | 1 | script.py | 1 | 0.585139 | 0.577855 | 0 | 211 | 23.805687 | 158 |
Yunshan-Liu/gdplib | 3,298,534,895,144 | fd61aed0c403d641327db7e1b84d24388fb78937 | f5e8a25d5585fc7a08a713760485627926a49dd7 | /gdplib/mod_hens/modular_integer.py | b0b7308f743af0bdd471ee3e0179720e2d350a8c | [
"BSD-3-Clause"
] | permissive | https://github.com/Yunshan-Liu/gdplib | a408921745c4f5797ab9ecfd5e371f6d4cdd3a95 | f453abcde1906018635c2245414b707b69fa110c | refs/heads/master | 2023-03-06T04:29:29.078550 | 2021-02-10T04:19:05 | 2021-02-10T04:19:05 | 298,096,123 | 0 | 0 | BSD-3-Clause | true | 2020-09-23T21:15:04 | 2020-09-23T21:15:03 | 2020-09-23T20:10:34 | 2020-09-23T20:10:32 | 393 | 0 | 0 | 0 | null | false | false | """Heat integration case study.
This is example 1 of the Yee & Grossmann, 1990 paper "Simultaneous optimization
models for heat integration--II".
DOI: 10.1016/0098-1354(90)85010-8
This is a modification to support the incorporation of standardized exchanger
modules using integer variables for module selection.
"""
f... | UTF-8 | Python | false | false | 4,607 | py | 63 | modular_integer.py | 38 | 0.610593 | 0.598654 | 0 | 119 | 37.714286 | 79 |
RaulRC/genetic-neural-optimizer | 14,044,543,074,586 | ef41af978a0cf35a5d252a2b0ac29fc5a8a6f331 | ce983badab44f2fe35ab63ad2da0612611657b32 | /src/config_mnist_regularization.py | 3a022b3559bc5c8509730f7e5c21bbf8d703fd38 | [
"MIT"
] | permissive | https://github.com/RaulRC/genetic-neural-optimizer | c4e3cf9c7bd08ee9394205fc245a8c492e976e28 | fa169cdc9b43c58470c3e7a7214185d56e61579a | refs/heads/master | 2023-02-16T17:25:43.938905 | 2019-09-19T17:11:43 | 2019-09-19T17:11:43 | 209,153,737 | 1 | 0 | MIT | false | 2023-02-02T06:39:38 | 2019-09-17T20:48:27 | 2021-04-30T09:07:15 | 2023-02-02T06:39:38 | 504 | 1 | 0 | 7 | Python | false | false | iterations = 10
generations_list = [200]
populations_list = [6]
elitism_list = [0.5]
mutables_list = [1]
EPOCHS = 3
MODE = None
| UTF-8 | Python | false | false | 128 | py | 26 | config_mnist_regularization.py | 18 | 0.679688 | 0.601563 | 0 | 7 | 17.285714 | 24 |
outlaw6/AdventOfCode2020 | 8,718,783,650,071 | 64c9e258dfd6464d08bb912467556168620e148d | 6cffbac77a72ce5fb84bc530d654b5bbec8e4b10 | /TreeTobboganProblem.py | 4545bb02868f638e6e6b74065d357298485efd8f | [] | no_license | https://github.com/outlaw6/AdventOfCode2020 | 8ca30b5f757c1d72eca3d76ba72ded32eb49787d | f5a3c75d0fcff10316255eaa18b1a940b91a92b4 | refs/heads/master | 2023-03-08T00:07:47.623887 | 2021-02-15T18:22:29 | 2021-02-15T18:22:29 | 322,637,242 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | lista1 = []
list_of_list = []
#print(lista1)\
f = open('input.txt.txt', 'r')
temp_list = []
c=0
for x in f:
temp_list.append(x.strip('\n'))
steps = 3
counter = 0
treeLine = 1
while treeLine <= len(temp_list) - 1:
if temp_list[treeLine][steps % 31] == '#':
print("Correct: ", treeLine, steps, len(temp_list[treeLin... | UTF-8 | Python | false | false | 450 | py | 18 | TreeTobboganProblem.py | 17 | 0.62 | 0.584444 | 0 | 26 | 16.269231 | 63 |
jmzhao/foo.bar | 14,671,608,311,671 | 75a52e4dcf648fa2a7b3dd97f95bc7942726395b | 675337d68d87f121f65e5e322c2a5fe7c9b7d717 | /save_beta_rabbit/solution.py | dbb381fb1dcfae250113325a578d0802978e070a | [] | no_license | https://github.com/jmzhao/foo.bar | 48490b70d9ca5538f05f4e78c6fb11d78592b150 | f5d9f690096e3a3dfc79c1ef3d207991fabca553 | refs/heads/master | 2020-12-06T11:27:17.613193 | 2016-09-12T05:34:09 | 2016-09-12T05:34:09 | 66,224,006 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | def answer(food, grid):
costs = all_possible_cost(grid)
try :
m = max(x for x in costs if x <= food)
except ValueError :
return -1
return food - m
def all_possible_cost(grid) :
n = len(grid)
a = [[set() for _ in range(n)] for _ in range(n)]
for i in range(n) :
for j ... | UTF-8 | Python | false | false | 760 | py | 31 | solution.py | 26 | 0.389474 | 0.375 | 0 | 24 | 30.666667 | 80 |
StevenLu2004/code-x-code-for-china-2019 | 12,421,045,430,874 | 6ec5095e102743e8cdb05ff06322a26c8cdd1863 | 7e1e61987e3e5b660a6605aea25a303265550314 | /practice/drawWindowsPane.py | 9fa09e93fd30fe54d6ee76e598e42b793160609e | [] | no_license | https://github.com/StevenLu2004/code-x-code-for-china-2019 | ad4dc08324e59485652995b027cd6d22aac85724 | aac7397e6a4d3e5e0731b81f5c1932873c579488 | refs/heads/master | 2020-06-19T18:43:35.335510 | 2019-09-06T18:44:19 | 2019-09-06T18:44:19 | 196,827,801 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python3.5
import turtle
import random
screen = turtle.Screen()
t = turtle.Turtle()
screen.colormode(255)
screen.tracer(0)
t.speed(0)
t.hideturtle()
def f1(a, b, k):
return a * k + b * (1 - k)
def line(x1, y1, x2, y2):
t.penup()
t.goto(x1, y1)
t.pendown()
t.goto(x2, y2)
t.penup()
def singlePane(x, y... | UTF-8 | Python | false | false | 1,390 | py | 28 | drawWindowsPane.py | 27 | 0.531655 | 0.484173 | 0 | 61 | 21.786885 | 111 |
mbroihier/tennisball | 377,957,149,865 | 76a8fe5f82a9866895f7505f65e0afedb5b1c55a | 0659564ac57fe2aae239199aea57db967e9e2fb6 | /tennisball.py | 680ef225291de0ef903ec57e074d9236c0b6feeb | [
"MIT"
] | permissive | https://github.com/mbroihier/tennisball | 4455f866cf44a9d86a13f117820b79779b6d1b22 | e91efa7d60be056f2f6bf3461c6a8bb19043eac4 | refs/heads/master | 2020-07-12T11:15:03.706775 | 2020-03-13T21:49:47 | 2020-03-13T21:49:47 | 204,803,475 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Created on Aug 19, 2019
@author: broihier
'''
import LED
import Ping
class TennisBall():
'''
Tennis Ball class
'''
def __init__(self):
self.ping = Ping.Ping()
self.led = LED.LED()
def run_tennisball(self):
'''
run_tennisball - send pings and reports time betwee... | UTF-8 | Python | false | false | 1,015 | py | 8 | tennisball.py | 5 | 0.48867 | 0.482759 | 0 | 43 | 22.604651 | 76 |
TJJTJJTJJ/pytorch_CycleGAN_frame | 1,142,461,336,566 | 4ea08c7661fd3b85a7e21bc8ff5398cd69f9d674 | a5401a19c810f83188d706083b32c6733f252182 | /utils/util.py | b220d42460a5bb3e453e84bf616c3a78570d358d | [] | no_license | https://github.com/TJJTJJTJJ/pytorch_CycleGAN_frame | 556fd42c35461e12337a3a2645bf3a61d87e96c3 | 08e40983688ead674fcb4c00f4e29517b8c41ab8 | refs/heads/master | 2020-04-04T20:14:54.105230 | 2018-11-05T15:29:19 | 2018-11-05T15:29:19 | 156,239,442 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/python3
# -*- coding:utf-8 -*-
# @Time : 18-10-30 下午11:41
# Author : TJJ
__all__ = ['mkdirs', 'mkdir', 'tensor2im']
def mkdirs(paths):
"""
根据paths生成文件夹
:param paths: list或者str
:return:
"""
if isinstance(paths, list) and not isinstance(paths, str):
for path in paths:
... | UTF-8 | Python | false | false | 1,001 | py | 12 | util.py | 10 | 0.608784 | 0.57712 | 0 | 37 | 25.486486 | 74 |
Gracewx/MouseBrainHierarchy | 5,446,018,579,604 | 618bf63538e8b7b9061947afd1296ac8637c3112 | 82cfed2d1f933c52689e11a462f5b5e5670ebdb8 | /run_TCCT_module.py | 68e805e6222e91c86c9f102d1ea5c78e56ca596c | [
"BSD-2-Clause"
] | permissive | https://github.com/Gracewx/MouseBrainHierarchy | 9db9fff39fe4643d152296ed30523a70d6f5d246 | 8e4e0dd271fab84a745d8101aef2f995eb07a2bc | refs/heads/master | 2023-03-18T18:47:28.558214 | 2019-10-10T22:28:41 | 2019-10-10T22:28:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import division
import logging
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from IterativeMethod import iterativeTCCT
"""
Created on Mon Jun 24 16:04:07 2019
@author: Hannah Choi
"""
"""
This code finds intra- or inter-module hierarchies of cortical network,
ba... | UTF-8 | Python | false | false | 10,942 | py | 13 | run_TCCT_module.py | 12 | 0.616158 | 0.60647 | 0 | 285 | 36.385965 | 152 |
RyanPoy/sweet_orm | 8,272,107,045,055 | a298952dd1b730f93682cff9b03ad1a94430f61d | ba6c148c63179fda44e366c7b0752a54fee5838a | /tests/integration/for_sqlite/test_relation_has_one_sqlite.py | 88720a5ee86d1772b12fa12328ffa403b4a8ed8f | [] | no_license | https://github.com/RyanPoy/sweet_orm | b706731cbfd97f1c4fb5a61132305b8b3785de04 | bd19c5218d02b706e5ebe92d0771c9ee8dade006 | refs/heads/master | 2023-05-07T01:02:02.964371 | 2021-05-08T03:35:14 | 2021-05-08T03:35:14 | 266,485,666 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #coding: utf8
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
import unittest
from tests.integration.for_sqlite.helper import User, Mobile, Car
class TestHasOneToSQLite(unittest.TestCase):
def setUp(self):
self.remove_record()
def tearDown(self):
... | UTF-8 | Python | false | false | 2,797 | py | 65 | test_relation_has_one_sqlite.py | 59 | 0.574187 | 0.557383 | 0 | 99 | 27.252525 | 74 |
Peteliuk/practicebot | 3,616,362,474,339 | f673b8b921f3edb07a23c83964c3715f07286000 | b23c962bb77ddd424e0e6723b0ebb6adc3a51d46 | /bot/constants/variables.py | 859478eaa3837aaf43dc8146699779e5d3e3d871 | [] | no_license | https://github.com/Peteliuk/practicebot | 82bbd0b17fdae98608c8b56b9bc7f19ff2c76ce3 | d588516465499b1b36b253ab8b717cbfe6132050 | refs/heads/master | 2020-12-27T15:57:04.220563 | 2020-10-02T14:08:47 | 2020-10-02T14:08:47 | 237,960,372 | 0 | 0 | null | false | 2020-10-02T14:08:49 | 2020-02-03T12:31:32 | 2020-02-05T09:56:39 | 2020-10-02T14:08:48 | 96 | 0 | 0 | 1 | Python | false | false | STATUS_VARIANTS = [
(1, 'created'),
(2, 'rejected'),
(3, 'accepted'),
(4, 'completed'),
]
| UTF-8 | Python | false | false | 126 | py | 37 | variables.py | 35 | 0.396825 | 0.365079 | 0 | 6 | 20 | 25 |
nullpass/grocerylist | 1,614,907,734,196 | 78ee524f76d2920764f3cf1ddfe78e57a9cd5c0e | afd11578be01987c999597685ee8ad81ccf6be60 | /items/forms.py | 549b0f1dfbf7276b43a4f28a3c446e5c24970c31 | [] | no_license | https://github.com/nullpass/grocerylist | daa284cfc9280012bbef1bf6a7468f79c1181627 | b254b48cb85f43b5863acbed384d9a774af2e944 | refs/heads/master | 2021-01-21T08:01:40.043083 | 2015-08-22T17:23:01 | 2015-08-22T17:23:01 | 21,701,763 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # items/forms.py
from django.forms import ModelForm, CheckboxSelectMultiple, RadioSelect
from . import models
class EmbedItemForm(ModelForm):
""" The item-add form that is embedded in StoreDetailView.html """
class Meta:
fields = (
'name',
'price',
'from_isle... | UTF-8 | Python | false | false | 1,062 | py | 50 | forms.py | 38 | 0.546139 | 0.541431 | 0 | 40 | 25.55 | 72 |
atom-chen/myCode | 6,141,803,280,441 | bac04b55281f103da60ea3324ba0bd3bcb13f406 | 6a0dec28e7d606075c86c3f43b527cd04112347b | /tool/sdk_tools/scripts/tool_splash.py | 74e1da8a1d6ab6fd3d09a3c12d92f2406db565ab | [] | no_license | https://github.com/atom-chen/myCode | 8b8af86f2c98255174b26fba3c819aba973f33e7 | ebecd0af139ffb4caf0d3c7f603b27c461f0839f | refs/heads/master | 2020-12-04T13:31:54.251342 | 2017-02-28T02:20:43 | 2017-02-28T02:20:43 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
import sys
import file_utils
import config_utils
import os
import os.path
import time
from xml.etree import ElementTree as ET
from xml.etree.ElementTree import SubElement
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import ElementTree
import xml.dom.minidom
import subp... | UTF-8 | Python | false | false | 2,087 | py | 223 | tool_splash.py | 108 | 0.579507 | 0.578057 | 0 | 61 | 32.934426 | 101 |
ponkbrown/flaskBlog | 6,253,472,394,659 | f985d81d854a7e5b64247224158fba8695718308 | a9a13a0b2636c6f7ba97352fc7eaf2e043a734a4 | /app.py | ba291d3eea77b9b5a9271939dda3a7ce6272832a | [] | no_license | https://github.com/ponkbrown/flaskBlog | 8bc351c19f26d19d40e9cc6c90976f8e2c08b897 | 80bd82cd88421bf9db2852f05b8deba3b66347a4 | refs/heads/master | 2016-08-09T13:11:27.832163 | 2016-03-18T22:08:03 | 2016-03-18T22:08:03 | 54,070,894 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/bin/env python3
from flask import Flask, render_template
from flask.ext.script import Manager
from flask.ext.bootstrap import Bootstrap
app = Flask(__name__)
manager = Manager(app)
bootstrap = Bootstrap(app)
@app.route('/')
def main():
return render_template('index.html')
@app.route('/showSignin')
def sh... | UTF-8 | Python | false | false | 507 | py | 5 | app.py | 2 | 0.696252 | 0.69428 | 0 | 23 | 21.043478 | 41 |
hanyiwen/imooc-django-ref | 15,264,313,777,357 | 5ddf4f33639e1cc98f2cdc02cb5180ede01da99f | 092d3ba8db5cebafda6a2699ec746439ceea7faa | /apps/courses/__init__.py | c4597a391ed4008f32c095bf87b8e747e7b1bef9 | [] | no_license | https://github.com/hanyiwen/imooc-django-ref | b12eb8552da144e3186383c6d4d106ed7559cf84 | 2f717fda56d276671f4ab94d2a46f0b33ab0810f | refs/heads/master | 2020-04-04T17:14:41.564562 | 2018-11-15T16:57:34 | 2018-11-15T16:57:34 | 156,113,001 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # 新建app时并没有引用apps的配置 因此需要
default_app_config = "courses.apps.CoursesConfig"
| UTF-8 | Python | false | false | 106 | py | 5 | __init__.py | 3 | 0.815789 | 0.815789 | 0 | 2 | 37 | 49 |
ritazchen/AAIA | 11,630,771,467,456 | a340de99528b061ffaa3d6e47e48adf85b04348a | 85cf4fedfcf301467e62d46f9926d557be7c28b1 | /AA/Programa.py | f8eeae331688b742846ccec2e8bb75266f228741 | [] | no_license | https://github.com/ritazchen/AAIA | 96439b8f6a2e443862927f024b5769ee8e00bf0e | 92fdb1c251440c0acd21289773b59d2574a272af | refs/heads/master | 2020-09-14T05:13:16.844399 | 2019-12-06T11:26:34 | 2019-12-06T11:26:34 | 223,029,250 | 0 | 0 | null | true | 2019-11-20T21:17:47 | 2019-11-20T21:17:46 | 2019-11-20T19:49:24 | 2019-11-20T19:49:22 | 204 | 0 | 0 | 0 | null | false | false | #import pygame
import sys
#from AA.configuracoes import *
from AA.Pacman import *
from AA.Fantasma import *
pygame.init()
vec = pygame.math.Vector2
class Programa:
def __init__(self):
self.janela = pygame.display.set_mode((LARGURA, ALTURA)) # Criacao da janela (dimensoes)
self.clock =... | UTF-8 | Python | false | false | 12,555 | py | 7 | Programa.py | 6 | 0.551873 | 0.541195 | 0 | 263 | 45.726236 | 150 |
DanRuckz/pacman | 11,811,160,076,912 | 99b9003e98fa6c5a449037c7fa6915ec85ae3aba | e0017d5824f124115266944e94e3fce7303e745c | /LoadFile.py | 81c09c37243ef468ae6f855f5384dc0dda040e30 | [] | no_license | https://github.com/DanRuckz/pacman | ffb120a78f7378cbca4f84e51a3be5963e1be636 | 7973cb1004c9e218f22726f42b7729f26887fbe0 | refs/heads/main | 2023-07-06T03:50:59.899213 | 2021-07-26T20:15:15 | 2021-07-26T20:15:15 | 342,968,039 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pygame
map = pygame.image.load("spritesheet/30x30-tiles.png")
#Pacman = pygame.image.load("pacman.png")
#ghost = pygame.image.load("assets_old/ghost.png")
spritesheet = pygame.image.load("spritesheet/pacman.png")
| UTF-8 | Python | false | false | 223 | py | 17 | LoadFile.py | 9 | 0.748879 | 0.730942 | 0 | 7 | 30.714286 | 57 |
alvinkwekel/gpio-playground | 867,583,434,975 | 2a655a28370ea83a9b62091b572f8d9b50b12621 | 52dc7b0e126547e210c343a9aa1571a49878e4c7 | /led_board.py | 19c7d74a1901ae7aa980377b6023354c0d47ee02 | [] | no_license | https://github.com/alvinkwekel/gpio-playground | 6f3516eef4eb85a592cab3633af1f9b06f68978b | f1c2d4c4da59fff848f81c998427fdf676135ce7 | refs/heads/master | 2020-05-29T21:54:49.697919 | 2019-05-30T10:53:44 | 2019-05-30T10:53:44 | 189,397,012 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from gpiozero import LEDBoard
from time import sleep
leds = LEDBoard(26, 19, 13, 6, 5)
while True:
leds.value = (1, 0, 0, 0, 0)
sleep(.1)
leds.value = (0, 1, 0, 0, 0)
sleep(.1)
leds.value = (0, 0, 1, 0, 0)
sleep(.1)
leds.value = (0, 0, 0, 1, 0)
sleep(.1)
leds.value = (0, 0, 0,... | UTF-8 | Python | false | false | 577 | py | 3 | led_board.py | 3 | 0.47487 | 0.357019 | 0 | 28 | 19.607143 | 33 |
balajitummala/sagemaker-python-sdk | 10,393,820,901,781 | c9aa31f48f46387221cdb945097b2170cbb1fd0c | 417aa7cefaa3d14a23f9484b1cb2f41105bfbc21 | /src/sagemaker/clarify.py | dba978a209eca212863518f17505ee04a5497148 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/balajitummala/sagemaker-python-sdk | 4816244918cb27f7beaaf722c4be0ed817c1cea3 | 2594ffb3eaefaf55936b71ea0c38442135223602 | refs/heads/master | 2023-08-18T16:04:57.091104 | 2021-10-04T16:45:55 | 2021-10-04T16:45:55 | 256,359,718 | 0 | 0 | Apache-2.0 | true | 2021-10-05T22:07:10 | 2020-04-17T00:18:26 | 2020-05-04T22:33:36 | 2020-08-06T20:49:38 | 59,275 | 0 | 0 | 1 | Python | false | false | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | UTF-8 | Python | false | false | 45,118 | py | 30 | clarify.py | 17 | 0.616827 | 0.613724 | 0 | 846 | 52.330969 | 130 |
dkristensen/IFT-6135-HW-3 | 11,089,605,577,887 | c64f1e6c77c4f1ec5701169aef61d524a6636963 | fec407156dd2ca4c345c578518dada406cede8fa | /question_2.py | 676b4cc134db573dfca5018644ad6e063f3c794f | [] | no_license | https://github.com/dkristensen/IFT-6135-HW-3 | 07768357afc047689c36803d80843cf105667b78 | d8f5b085c3455306b4c7402e41405553427b6b6b | refs/heads/master | 2020-05-16T08:41:05.170371 | 2019-04-26T12:49:01 | 2019-04-26T12:49:01 | 182,922,022 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import torch
import numpy as np
import utils
import matplotlib.pyplot as plt
from models import q2_VAE as VAE
import time
def train_epoch(model, train_dataloader, optimizer, loss_fn):
"""Train the given model for one epoch.
Longer Summary
Args:
model (torch.nn.Module): Module to use for the train... | UTF-8 | Python | false | false | 6,228 | py | 9 | question_2.py | 8 | 0.645472 | 0.635356 | 0 | 148 | 41.054054 | 150 |
sharonmaswai/edsa_analyse_project | 9,801,115,399,556 | 66c1c0f4f62ea17d0526c19bf357732ce63fa1d5 | afaad81ae999850a65fbeb8a95e8654cfe5e7c64 | /tests/test.py | 272694f35405d10e8c674f218c507e0d02bdbe87 | [] | no_license | https://github.com/sharonmaswai/edsa_analyse_project | dd08572892f0ab5bfa56b217fabe5ab5d437c233 | 0537e10ff55986b9934123760cd4168cedd54e26 | refs/heads/master | 2022-12-22T23:05:23.856239 | 2020-09-12T17:48:39 | 2020-09-12T17:48:39 | 293,762,793 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from analyse import analyse
def test_metrics_dict():
assert analyse.dictionary_of_metrics(gauteng)=={'max': 39660.0, 'mean': 26244.42, 'median': 24403.5, 'min': 8842.0, 'std': 10400.01, 'var': 108160153.17}, 'Failed'
def test_summary():
assert analyse.five_num_summary(gauteng)=={'max': 39660.0, 'median': 2440... | UTF-8 | Python | false | false | 567 | py | 5 | test.py | 3 | 0.634921 | 0.417989 | 0 | 10 | 55.8 | 167 |
rhiju/rhiju_python | 3,487,513,455,165 | 533aa35c30faf9ae91d29f3be338f5a36b0ad9b6 | 3dcc44bf8acd3c6484b57578d8c5595d8119648d | /extract_spreadscore_decoys_outfile.py | a02f2f5de4c5108b3e79c9da62314ef83e94dddd | [] | no_license | https://github.com/rhiju/rhiju_python | f0cab4dfd4dd75b72570db057a48e3d65e1d92c6 | eeab0750fb50a3078a698d190615ad6684dc2411 | refs/heads/master | 2022-10-29T01:59:51.848906 | 2022-10-04T21:28:41 | 2022-10-04T21:28:41 | 8,864,938 | 0 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
from sys import argv,exit
from os import popen, system
from os.path import basename
import string
def Help():
print
print 'Usage: '+argv[0]+' <silent out file 1> < silent file 2> ... <N> '
print ' Will extract N decoys with lowest score from each silent file.'
print ' If you want... | UTF-8 | Python | false | false | 2,809 | py | 340 | extract_spreadscore_decoys_outfile.py | 340 | 0.571378 | 0.553578 | 0 | 124 | 21.637097 | 120 |
vaibhav0077/To-Do-ListApp-django | 16,192,026,745,221 | 63216ed6c9a90488793c15c520bf0cf3f8b89c6f | cdc542c2ce0ff784f4593968c98e9f213757a4fa | /base/forms.py | e6a1cbd0d90d4df7efe5ef911270c769b9c3a77b | [] | no_license | https://github.com/vaibhav0077/To-Do-ListApp-django | 95e89d366627727232316a6828179ef53b737f93 | 690d2dc47cd857dc4145cd8d56a42471fb33d5bc | refs/heads/master | 2023-08-31T12:41:52.408689 | 2021-10-29T03:20:48 | 2021-10-29T03:20:48 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # from To_Do_List.base.models import TODO
from django.contrib.auth import forms
from django.contrib.auth import models
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.forms import fields, widgets, ModelForm
from django import forms
from django.forms.forms i... | UTF-8 | Python | false | false | 1,981 | py | 29 | forms.py | 12 | 0.661787 | 0.661282 | 0 | 70 | 27.3 | 70 |
sunnycia/pima-classifier-tf | 6,193,342,872,386 | a75404442f13f1416762498f4dc1ec82066528a0 | ea865843b65416f60204fee03380562feedfc428 | /input_data.py | f4f2cb7319dffb17110a2abadeac7c90e95567d7 | [] | no_license | https://github.com/sunnycia/pima-classifier-tf | 55ed3d2c10fd7d4629ee7fe882dc1e619280f288 | ca2d4d9ca9557b13f7b6133f77f6111fcd129c1e | refs/heads/master | 2020-04-16T18:00:10.476301 | 2019-01-15T06:40:10 | 2019-01-15T06:40:10 | 165,798,898 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import os
def dense_to_one_hot(labels_dense, num_classes=2):
"""Convert class labels from scalars to one-hot vectors."""
num_labels = labels_dense.shape[0]
index_offset = np.arange(num_labels) * num_classes
labels_one_hot = np.zeros((num_labels, num_classes))
labels_one_h... | UTF-8 | Python | false | false | 2,934 | py | 6 | input_data.py | 4 | 0.549761 | 0.543286 | 0 | 89 | 30.988764 | 83 |
ouceduxzk/kaggle-ndsb2 | 6,330,781,822,067 | afe0b80f5d1054dd7f052672b3951f7f6f108e85 | 46cd9164abc0c7383ec26503583ca42bb3763761 | /model.py | 5f0f110600e4ce6df37bf43ce2a60390514d3459 | [] | no_license | https://github.com/ouceduxzk/kaggle-ndsb2 | ddf93add3fd03c13df9787d89d449abc8f911ee5 | 45a4af0157f8a883cd987ac4a07414480afd8ff8 | refs/heads/master | 2016-08-09T14:49:08.857944 | 2016-02-13T21:21:52 | 2016-02-13T21:21:52 | 51,666,049 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from __future__ import print_function
from keras.models import Sequential
from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D
from keras.layers.core import Activation, Dense, Flatten, Dropout
from keras.optimizers import Adam
from keras.regularizers import l2
from keras import backend as ... | UTF-8 | Python | false | false | 9,600 | py | 7 | model.py | 6 | 0.656979 | 0.575313 | 0 | 262 | 35.637405 | 81 |
netmanchris/pykanyerest | 17,351,667,901,245 | c521282a6250e4ff227d53b2602557e5b2e8071a | 55d78df9898e3f698ff7abb405569d0ae4d7c3d8 | /pykanyerest/quotes.py | 531ef54ce14e3df6cadc97ee16a22e1a7e7e0437 | [
"Apache-2.0"
] | permissive | https://github.com/netmanchris/pykanyerest | 9943229e77ca5547f744619772266f08c363069e | 223e264c9d0bb8756448c4687130d5d0f6ea2e46 | refs/heads/master | 2020-12-21T19:20:09.849010 | 2020-01-27T16:19:21 | 2020-01-27T16:19:21 | 236,533,692 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests, json
def get_new_quote():
url= 'https://api.kanye.rest'
r = requests.get(url)
quote = json.loads(r.text)
print ("New Kanye Quote coming up!")
return quote
| UTF-8 | Python | false | false | 193 | py | 3 | quotes.py | 2 | 0.637306 | 0.637306 | 0 | 8 | 23.125 | 40 |
YYN117/Demo | 4,964,982,228,490 | 40371be35d77d37a98c98ed67ab673b320edefe8 | aa28417be8935d6fa369fcb526174f9e1e30479a | /qianfeng/day11/ATM/银行自助提款机.py | 662a6a89eefcd47ab68ce4d00317d3fcdf0a1d92 | [] | no_license | https://github.com/YYN117/Demo | d6fca95ed8a1a433ef06f1f3fc2e768414e863cb | 40690040a7422fd5d8f03a0d68f20f1be5d4a836 | refs/heads/master | 2020-04-14T12:29:30.129709 | 2019-01-02T13:31:10 | 2019-01-02T13:31:10 | 163,841,708 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
人
类名:Person
属性:姓名,身份证,电话,卡
行为
卡
类名:Card
属性:卡号,密码,余额
行为
提款机
类名:ATM
属性:
行为:开户,查询,取款,存款,转账,改密码,锁定,解锁,读卡,销户,退出
界面类
类名:View
属性:
行为:管理员界面 管理员登录 系统功能界面
'''
from view import View
from atm import ATM
import time
import pickle
import os
def main():
#用户数据
allUsers = {}
#界面
view = View()
view.printAdmin... | UTF-8 | Python | false | false | 1,777 | py | 296 | 银行自助提款机.py | 276 | 0.483502 | 0.474747 | 0 | 80 | 17.575 | 56 |
nanersmariee/Labs_AnnaMarie | 5,514,738,051,288 | caf2e6aa6575548b214e5272d309b9121d49d79d | 385ba6b52414042ccc1a44fb5c143fee86a7d194 | /calculator1.py | c76e2f99649bcbaf2cc768f6627f19fc0a0341d9 | [] | no_license | https://github.com/nanersmariee/Labs_AnnaMarie | b5cdb2c95a90e35169d038c68284e154f74ee21e | 75de2327d11aa8e6963ecd7dab290ed646883477 | refs/heads/master | 2022-12-09T03:35:50.411671 | 2020-01-19T00:12:28 | 2020-01-19T00:12:28 | 216,278,357 | 0 | 0 | null | false | 2021-06-02T00:42:47 | 2019-10-19T22:30:35 | 2020-01-19T00:12:45 | 2021-06-02T00:42:45 | 16,850 | 0 | 0 | 16 | TSQL | false | false |
"""repeat forever"""
from arithmetic1 import *
"""import arithmetic functions for calculator"""
while True:
"""read input"""
input_string = input("Please enter parameters> ")
print(input_string)
"""tokenize input"""
tokens = (input_string.split(" "))
print(tokens)
"""If token is Q -... | UTF-8 | Python | false | false | 4,266 | py | 5 | calculator1.py | 3 | 0.558118 | 0.54 | 0 | 208 | 19.408654 | 75 |
nguyenletan/python2 | 11,209,864,664,000 | c383f311b3bd331176c088dc2ad5aab1dd8f03d6 | c9540e808ac6c30c21f8a825293fa981f474aedb | /a2_task1.py | 39a71715b99202aedbd4e34553d1406bff1a71a7 | [] | no_license | https://github.com/nguyenletan/python2 | 47560f643911cf81198d37791e3845bec2e9e438 | 7b52d09a9886dd8885290950eb943cb442196e81 | refs/heads/master | 2022-10-02T02:00:49.652519 | 2020-05-21T11:35:06 | 2020-05-21T11:35:06 | 265,832,395 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Task 1 code template for FIT9136 Assignment 2.
# Instructions to students:
# 1. Where required, replace the *pass* statements with your own method and
# function definitions. Your submission must comply with the specification:
# do not rename specified functions or change the number or type of arguments
# or re... | UTF-8 | Python | false | false | 4,832 | py | 3 | a2_task1.py | 3 | 0.642798 | 0.635555 | 0 | 146 | 32.09589 | 96 |
jamesgleave/neat | 2,216,203,172,621 | f866479cc68aa20fd9a1688dd66a5ce95899f7d0 | f3f1ca77e428be31fce79108ca45dad03cb8217c | /plot_racetrack.py | 171558811e69e30f3ceb456719eeba4a7022de5f | [
"MIT"
] | permissive | https://github.com/jamesgleave/neat | 11b7e1f6dbb33de3cfd604c4c96781546adf5f3e | f0776d1f0dc68e391b8bb97b82a42bf13605898a | refs/heads/master | 2021-09-12T08:48:47.192433 | 2018-04-15T17:50:41 | 2018-04-15T17:50:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
import numpy as np
import matplotlib
#matplotlib.use('Agg',warn=False)
import matplotlib.pyplot as plt
import scipy.io
def angle(v1, v2):
""" Returns the angle in radians between vectors 'v1' and 'v2' """
c = np.dot(v1, v2)
s = np.linalg.norm(np.cross(v1, v2))
return np.arctan2(s... | UTF-8 | Python | false | false | 2,490 | py | 21 | plot_racetrack.py | 13 | 0.565863 | 0.515663 | 0 | 113 | 21.035398 | 102 |
chuanqin1230/network-science | 13,675,175,920,514 | bb1fad38392727c100693810726fffda43895602 | dcb30fc270fda8fd63c0851e29bbcd91c6726040 | /codes/louvain.py | 59d03915a620d2314a3df0055fb25971ece384f8 | [] | no_license | https://github.com/chuanqin1230/network-science | 3c6a9bfc68a9c02a850fa253bbeb0e4027e71e1d | a6797a77f3766d5f0ee70356f415a91c92cbe446 | refs/heads/master | 2022-06-30T05:50:07.560434 | 2020-05-06T03:56:02 | 2020-05-06T03:56:02 | 261,643,062 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 16 13:50:33 2018
@author: Jinglin
"""
import os
from pygrid import *
import random
import matplotlib.pyplot as plt
import numpy as np
from sklearn import cluster, datasets, mixture
import modification
def louvain(graph_silm,SQV):
#set default weight value
graph... | UTF-8 | Python | false | false | 7,278 | py | 15 | louvain.py | 4 | 0.599615 | 0.587387 | 0 | 214 | 33.014019 | 134 |
chan-p/DSP | 12,120,397,716,020 | fc0c48d15c0c34d7d2db8161998e889890972f72 | f938f9f16a7efc52991beb1dd0371b1af6e9d47e | /parse.py | e97b05529c874a8d0bd43744c9d113a2952e734c | [] | no_license | https://github.com/chan-p/DSP | 2de354251713c3040089012b234531907f7081a1 | 2f5111b5f71eb642cb8abcc8f1f1598d8efde9b1 | refs/heads/master | 2016-09-26T16:53:50.188139 | 2016-09-14T07:30:01 | 2016-09-14T07:30:01 | 68,183,914 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | f = open("/Users/TomonotiHayshi/Desktop/haihu/training.csv")
count = 0
count1 = 0
g12 = open("/Users/TomonotiHayshi/GitHub/DSP/data/data12.csv","w")
g34 = open("/Users/TomonotiHayshi/GitHub/DSP/data/data34.csv","w")
g56 = open("/Users/TomonotiHayshi/GitHub/DSP/data/data56.csv","w")
g78 = open("/Users/TomonotiHayshi/Git... | UTF-8 | Python | false | false | 1,636 | py | 240 | parse.py | 11 | 0.608191 | 0.490831 | 0 | 48 | 33.083333 | 70 |
HuLiangHu/Spiders | 17,325,898,078,413 | bdb84d7e70fb1fe938e3dc3669fa4207adc55a96 | cfab1c4e501d4a45e8e21e94244b878350fd032d | /DoubanSpiders/douban/spiders/movie.py | a924428b9457cbb39aaae1be644241e85b1dbbf4 | [] | no_license | https://github.com/HuLiangHu/Spiders | 85f2317f6a5342c6921dd32fa212eb0170396449 | 0e809279eff2584b73557cd9d51ad2e4c148a5cf | refs/heads/master | 2021-06-16T03:35:12.560845 | 2020-01-29T14:05:23 | 2020-01-29T14:05:23 | 182,927,044 | 1 | 1 | null | false | 2021-03-25T22:37:02 | 2019-04-23T03:52:22 | 2020-01-29T14:05:57 | 2021-03-25T22:36:59 | 64,393 | 1 | 1 | 6 | Python | false | false | # -*- coding: utf-8 -*-
import scrapy
import json
import re
import random
from datetime import datetime
from scrapy.utils.project import get_project_settings
#import pymysql
import random
#from scrapy_redis import connection
class DoubanNewTVSpider(scrapy.Spider):
name = "newtv2"
start_urls = ['https://m... | UTF-8 | Python | false | false | 2,055 | py | 244 | movie.py | 211 | 0.618024 | 0.576549 | 0 | 47 | 40.574468 | 136 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.