blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a0d4e77f09b4ce752631ae36a83ff57f96b89b1 | 3b8fc51426bcac9fb23b0ede5c9584afb8e052cf | /babySteps/babySteps.py | 0f660350f6e2a91b6ae7d449e07f93ccb76d7aeb | [
"MIT"
] | permissive | kiyoshimoran/RLBot | 2f6932a21430d1b31e620524932a10c4906ff4af | 007d551c07a8d4f213a3fbbfc107a9e68c368202 | refs/heads/master | 2021-06-09T23:49:31.359839 | 2021-04-03T01:26:02 | 2021-04-03T01:26:02 | 136,963,660 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,876 | py | babySteps.py | from rlbot.agents.base_agent import BaseAgent, GameTickPacket, SimpleControllerState
#from rlbot.utils.structures.game_data_struct import GameTickPacket
from Decisions.challengeGame import ChallengeGame
from Decisions.info import MyInfo, Car
from Decisions.strat import Strategy
from Drawing.Drawing import DrawingTool
f... |
4a0eca90de3ce7fb0ab6decb0ec6aadb32c1a9fa | eb954584d48315f248d0459c90ba93456bc2915c | /Level6/Trees/Identical Binary Trees.py | 9a104b077e2a8f88cff02c9b950397af36fc6915 | [] | no_license | Sauvikk/practice_questions | 366f701f763ea00576b80989e4d5428a618e8d4e | e678314b143e4cbf8cab28b6d924121345d1359b | refs/heads/master | 2020-04-06T04:12:56.605428 | 2016-07-22T18:18:28 | 2016-07-22T18:18:28 | 58,483,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | Identical Binary Trees.py | # Given two binary trees, write a function to check if they are equal or not.
#
# Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
#
# Return 0 / 1 ( 0 for false, 1 for true ) for this problem
#
# Example :
#
# Input :
#
# 1 1
# / \ / \
# 2 3 ... |
0c1de2c1eb5a4de7aeb14ad6b27aa61e07bc4c51 | 9c15c28df929cc401c805f9562f78b95e25b2960 | /trees/urls.py | 0f59bee7fa38a64871e05cea3fa87cb44e24090c | [] | no_license | TheRayOfSeasons/SpecimenClassifier | 66e69cbffcf159656cc6f5200542c60e612ab634 | 94e1b6a93f9d041d546cbca3bf6c731e3cc04a70 | refs/heads/master | 2022-12-16T05:44:32.770710 | 2020-04-19T11:23:44 | 2020-04-19T11:23:44 | 236,300,347 | 0 | 0 | null | 2022-11-22T05:23:49 | 2020-01-26T11:04:17 | JavaScript | UTF-8 | Python | false | false | 363 | py | urls.py | from django.urls import path
from .views import (
TreeCreateView,
TreeListView,
TreeUpdateView,
)
app_name = 'trees'
urlpatterns = [
path('list/', TreeListView.as_view(),
name='list'),
path('create/', TreeCreateView.as_view(),
name='create'),
path('<int:pk>/update/', TreeCreat... |
42d03aabef7d75c813f30bb6d8a835d76fd1fc83 | 1ea357f9b33d1a1822fd71ed5e306a10774ca5cd | /randomGuess2.py | 6a2aad6aa1f60ee3a74c0058ebe388afc86e166c | [] | no_license | thebigshaikh/PythonPractice | 02b2472566a3899b3e84a1c498395e857a907911 | 90cc229eff0e7a35435710e4c5e12dad2ba22512 | refs/heads/master | 2020-04-12T11:52:50.348772 | 2018-12-25T19:59:40 | 2018-12-25T19:59:40 | 162,474,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | randomGuess2.py | start=0
last=100
middle=50
counter=1
print(" Guess a number between 0 and 100")
condition = int(input("Is your guess " + str(middle) + "? (0 means it's too low, 1 means it's your guess and 2 means it's too high) "))
while condition != 1:
counter += 1
if condition == 0:
last = middle
elif conditio... |
97d4387c7bfd141b5a7019b221adb550105d4351 | e44550c779a0bbcae5e903e61590e2fad7b1fb12 | /lorem-ipsum/lorem-ipsum/lorem_ipsum/auth.py | 9f611034a8963169e58eee8b303d0815c5ba6570 | [] | no_license | adriandolha/cloud-demo | c7b505b5349386e606139244f0d3104a4611e541 | b040141b8ff5cee5cbd3eb9077208d6891887aa6 | refs/heads/master | 2023-01-21T07:12:30.358419 | 2022-10-07T12:18:34 | 2022-10-07T12:18:34 | 139,439,172 | 0 | 0 | null | 2023-01-08T23:19:54 | 2018-07-02T12:14:51 | Python | UTF-8 | Python | false | false | 5,779 | py | auth.py | import datetime
import logging
import os
from functools import lru_cache
from authlib.jose import JsonWebKey, jwt
from flask import g, request, jsonify
from lorem_ipsum.model import User, AppContext
import lorem_ipsum
from lorem_ipsum.model import Permission, BlacklistToken
LOGGER = logging.getLogger('lorem-ipsum')
... |
eb90912d09fca52a43b28ec4c988e3658ddfc219 | 2daa93615226c51be0a304828cfa228d70d74026 | /D14.py | 5c2f8b778aff20838293d48753d99c852d04d277 | [] | no_license | ashika29/hackerrank_30DOC | 7d376038c4473f23a92ce7120fad3c54f5f90970 | d0187fa5c6232352dce00de00cd18baaf0f11810 | refs/heads/master | 2022-12-29T20:33:45.210791 | 2020-10-01T11:17:13 | 2020-10-01T11:17:13 | 300,235,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | D14.py | # Question link: https://www.hackerrank.com/challenges/30-scope/problem
# Code section:
def computeDifference(self):
# Add your code here
self.maximumDifference = -111111
for i in range(0,len(self.__elements)-1):
for j in range(i+1, len(self.__elements)):
diff = abs(self._... |
be1ef0aa3868985bf198781ee827bd447588df15 | 31e3e0ce6d8b8cd1b286971aa1ea3c56a338ca48 | /sunpy/visualization/wcsaxes_compat.py | 3167f1c461612d203407334cbc10c7fe22c64b5a | [
"BSD-2-Clause"
] | permissive | sunpy/sunpy | d8df998cf7753834ffd7add6911c0e4f6828b5b8 | edd3ea805f4540d41ce2932a0e865cab2d6a4cf5 | refs/heads/main | 2023-09-01T12:05:09.343909 | 2023-08-31T13:36:35 | 2023-08-31T13:36:35 | 2,165,383 | 792 | 683 | BSD-2-Clause | 2023-09-14T14:03:09 | 2011-08-06T15:34:08 | Python | UTF-8 | Python | false | false | 6,779 | py | wcsaxes_compat.py | """
This module provides functions to make WCSAxes work in SunPy.
"""
import matplotlib.pyplot as plt
from packaging.version import Version
import astropy.units as u
from astropy import __version__ as astropy_version
from astropy.visualization import wcsaxes
from sunpy.coordinates import HeliographicCarrington, Helio... |
af9b83b6e213359f5e193918b6c09c22220e5457 | ee7b9303e5d16bf777091ae5b168e4035190ef63 | /crf_for_Eng.py | 466151476b9e0c935e5b9a15677e1d59b4e48bfc | [] | no_license | Atsuki-sa/ner | 4570b6dca12dceddd0bf9a53f1ad0b18ebf6ebb0 | 524c90863ff30543ac7c739a48faa959523985b7 | refs/heads/master | 2021-01-17T17:09:52.926297 | 2017-01-20T07:37:48 | 2017-01-20T07:37:48 | 61,279,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,353 | py | crf_for_Eng.py | #crfで英文に固有表現認識(タグ付け)をする
#usr/bin/python3
#coding:utf-8
from itertools import chain
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.preprocessing import LabelBinarizer
import sklearn
import pycrfsuite
from sklearn import cross_validation
import sys
import os
import math
import random
d... |
932bb7c9dbf3e97c966d2d7d537e747756831e30 | 8acffb8c4ddca5bfef910e58d3faa0e4de83fce8 | /ml-flask/Lib/site-packages/nltk/draw/util.py | ec00bd9dd6ca1a70742a42c82809b062ff6a9fd9 | [
"MIT"
] | permissive | YaminiHP/SimilitudeApp | 8cbde52caec3c19d5fa73508fc005f38f79b8418 | 005c59894d8788c97be16ec420c0a43aaec99b80 | refs/heads/master | 2023-06-27T00:03:00.404080 | 2021-07-25T17:51:27 | 2021-07-25T17:51:27 | 389,390,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | util.py | version https://git-lfs.github.com/spec/v1
oid sha256:a2959c4cccf29b3797cc2e2dcef87ddb5a0779d9fb992bb38e190b791ae37eb0
size 88352
|
2536b22c2d154e87bdecb72cc967d8c56ddb73fb | 1fdab954a261310ae227fc8ebad7ce6adfea46f1 | /vid2gif/transfer.py | a94d30ffae4b0a559aa354bdba458401fca0859d | [] | no_license | hhschu/vid2gif | e1cd330272728e4fb822acd0acb0eea1a7dfb0f5 | ffcf65c7a6bcda558620534b5b6b420f95a0e323 | refs/heads/master | 2022-12-09T04:48:05.860667 | 2021-04-13T09:53:06 | 2021-04-13T09:53:06 | 146,709,459 | 0 | 0 | null | 2022-12-08T07:43:18 | 2018-08-30T07:01:48 | Python | UTF-8 | Python | false | false | 1,190 | py | transfer.py | import os
from pathlib import Path
import Algorithmia
API_KEY = os.environ.get('ALGO_API_KEY')
DATA_DIR_BASE = os.environ.get('DATA_DIR')
ORIGINAL_DATA_DIR = DATA_DIR_BASE + 'original/'
TRANSFERD_DATA_DIR = DATA_DIR_BASE + 'transferd/'
def upload(client, fnames):
for im in fnames:
im = Path(im)
... |
0f5e63424c51bb16373f0a65e6a6372c6f3962f7 | a12c05f7686e526c7fca01fd91bf0c385b90e727 | /product.py | 07fca3b8535f97822ecf7965c894d7af3c66fcbb | [] | no_license | ricardoruiz19/phyton | 18fff66874305c052ec68bf6c21857f301049d69 | 663ece88e8bd3ed8463e76fa51c282e078ea3fcc | refs/heads/master | 2021-04-09T10:47:57.259871 | 2018-03-16T01:23:36 | 2018-03-16T01:23:36 | 125,446,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | product.py | from flask_restful import Resource
class Product(Resource):
def get(self):
return {
'products': ['Ice Cream',
'Chocolate',
'Morcilla',
'Fruit',
'Vegetales',
'Banano',
... |
8aaeb7253ea0b6e20b152c5fd1189db61fcfb4e7 | 56893cfcc8d86096188bcae30eb6a0d3a0aef3c8 | /config/MakePkg.py | 3a5d6c35a7ed146cbafbffa44adda2bb6bb4b27e | [] | no_license | nvng/Notepad | b15c97c9a9a38fbbdcc0cb9be621558e49bbc80f | 4afd8b381506e6c13184dfdd1652e9b7bd9e2316 | refs/heads/master | 2020-05-22T02:47:48.966565 | 2017-06-06T14:30:00 | 2017-06-06T14:30:00 | 65,781,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 652 | py | MakePkg.py | #!/bin/env python2
# slackware包制作工具
import sys
import commands
pkgBaseName = sys.argv[1]
sysVersion = "14.2"
sysPlatform = "x86_64"
pkgSufix = "tgz"
baseDirName = "/home/lsw"
pkgName = pkgBaseName + "_" + sysVersion + "_" + sysPlatform + "." + pkgSufix
buildDir = baseDirName + "/build_for_makepkg/" + pkgBaseName
... |
061726a5b878bf38830f86d88550dea64a5c1d62 | 9d6f292bc1a9f2e277821c98672603c779a26ec5 | /TestWithCamera.py | e0efe831e188d982327ab6b97ec9b8f22026809e | [] | no_license | shinesanthosh/Fire-Detection-With-Camera | 23a5d3ab5b0ddf04a3121cdca45331ac325fd6c0 | 33f9bb3520238348b2883190fdb91ceca3d93ad2 | refs/heads/main | 2023-04-12T10:17:17.543745 | 2021-05-06T04:19:09 | 2021-05-06T04:19:09 | 364,784,754 | 1 | 0 | null | 2021-05-06T04:31:22 | 2021-05-06T04:31:21 | null | UTF-8 | Python | false | false | 1,475 | py | TestWithCamera.py | import numpy as np
import cv2
from keras.models import load_model
from BeepSound import beepsound
from CAMERA import camera,MobileCamera
width = 640
height = 480
threshold = 0.65 #minimum threshold for classify
cap = cv2.VideoCapture(0)
cap.set(3, width)
cap.set(4, height)
#model file loaded
model = load_model('fir... |
89ecd05f5093f10551ac91ee046fd9bd8510ca48 | 75dd8881b8f0e9210155cd58fcd88259a80ea1cf | /index3.py | 46d423ab9dee82f5db010ead5083dbe3b4a09284 | [] | no_license | liuxianlon/bj15 | a15185a88a9b4750a81635790be5ea13b75b4abe | 97204c29b20f8cf65b9e01ea6b29e9ffeb1934cd | refs/heads/master | 2021-07-14T22:27:42.750001 | 2017-10-19T13:16:51 | 2017-10-19T13:16:51 | 107,522,086 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 95 | py | index3.py | from django.http import HttpResponse
def index(request):
return HttpResponse('index3件')
|
ed2be389b46eb4ceca8b7fe52560363e0217d8e0 | f45198a4daaaff3f98870e3bc7aff1f38bd4f851 | /sort/datafile/gen.py | b710f29b2da74e736f8a57edfc63fafcefeac87c | [] | no_license | zhsun/neu-cs5800 | da69669d69d09a471746ca968e89b20ea4a56c0f | c8580687ddf8678fdea1c0eb058ef2033d10447d | refs/heads/master | 2020-12-24T13:18:15.754445 | 2016-04-27T01:14:24 | 2016-04-27T01:14:24 | 25,142,755 | 5 | 10 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | gen.py | #!/usr/bin/python
import random
for i in range(1000000):
print random.random()
|
84b7dc4b7f2201a48a15f155fb6f9f4235983690 | 68a72f7654a549ac2a171641197c6c2ebb8ff65c | /demoQA/test_dynamicProperties.py | 3e44dd896323cfdfb7558442c0fff9e3c6c333a6 | [] | no_license | EduardPinter/Python_Selenium | 56dbd0c3385770927c8b99ff06ded49da62d0979 | b2e0000b008b6ca895626f1457d012e03c08d88b | refs/heads/main | 2023-06-05T20:20:42.652529 | 2021-06-18T13:18:56 | 2021-06-18T13:18:56 | 374,580,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,689 | py | test_dynamicProperties.py | from webdriver_manager.driver import GeckoDriver
from page_objects.dynamicProp.basePage import PageStart
from selenium import webdriver
from page_objects.dynamicProp.elementsPage import ElementsPage
from page_objects.dynamicProp.dynamicPropertiesPage import DynamicPropPage
from webdriver_manager.chrome import ChromeDri... |
274e4725a05f735fa73df174f647a3ae0260d2ab | 3a27a10e08a5bd052e1c1a3223c6468d2660a20d | /lab3/4.py | 8acb22f09b79394fd7be83e1bd29a19674e73d9a | [] | no_license | podobry-m/infa_2020_podobry-m | cf06a3cafc491bb53cc1610d651bf662e2629a49 | bf19b9f1bf6617a6d417597437d20d6ad3e8c711 | refs/heads/master | 2023-01-09T03:03:50.407205 | 2020-10-30T08:42:54 | 2020-10-30T08:42:54 | 298,483,508 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | 4.py | from random import randint
import turtle
import math
X=turtle.window_width()
Y=turtle.window_height()
K=0.01
number_of_turtles = 10
steps_of_time_number = 1000
pool = [turtle.Turtle(shape='circle') for i in range(number_of_turtles)]
v = [[randint(-4, 4), randint(-4, 4)] for _ in range(number_of_turtles)]
for unit in ... |
b266b0aedd53d479f0ec25fa24ad4f36d6faa60e | ee7fd791285d5cef3036c2435d29b7aa52a28cf5 | /app/effects.py | f7574bcec0dff67ffcbe17e3a2333a567e0b30b4 | [] | no_license | egichuri/checkpoint4 | 2c8f813eb88f5f6fea8c1b66bcbd00f5397eec37 | 4fa8b388ecddd443ec714137088ef849b1daf2a5 | refs/heads/master | 2021-05-30T15:38:00.634522 | 2016-02-29T12:03:12 | 2016-02-29T12:03:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,162 | py | effects.py | import os
import time
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.conf import settings
from PIL import Image, ImageFilter, ImageOps, ImageEnhance
from .models import Effect
class EditImage:
""" Class to perform image editing and filtering. """
def __init__(self, image, ... |
0feda5562655f890efb9677d1b6457543b88394c | 16285b4efec2e04f4e9294eea2f3d42426fbd99f | /setup.py | 3b2376fbe9ac841269e0c7dfd67b0944960a111f | [] | no_license | RealOrangeOne/yubi-lock | 0381cdbfae0b5eebe3479b98d5a4425c3fd5dff8 | b714bddd94fb0aed75e35e31642fe5107a015769 | refs/heads/master | 2021-01-20T00:41:40.285176 | 2016-05-19T21:24:55 | 2016-05-19T21:24:55 | 59,145,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | setup.py | from setuptools import setup
setup(
name='yubi-lock',
version='1.0',
install_requires=[
'click',
'python-yubico'
],
entry_points='''
[console_scripts]
yubi-lock=yubi_lock.cli:cli
''',
)
|
308e6949d34b1fb49ff81b43c65e3343d160f72b | 037238438512cb78ebc1e7da055556ac94e12e5f | /util/model.py | 98937c71f8f23787a3f8f98e2e46fb20135912d0 | [] | no_license | WangHelin1997/FPNet | 5c5463397266904d8104a414ab95bdd71a6dd4bf | f5dd5e2fe4c2da12b3d8481f55010c2274a34c34 | refs/heads/master | 2021-07-22T12:13:45.465429 | 2020-07-27T01:01:06 | 2020-07-27T01:01:06 | 200,811,600 | 8 | 4 | null | null | null | null | UTF-8 | Python | false | false | 20,913 | py | model.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
def num_flat_features(x):
# (32L, 50L, 11L, 14L), 32 is batch_size
size = x.size()[1:] # all dimensions except the batch dimension
num_features = 1
for s in size:
... |
50271d88d6d1e0dfe6a7a13ec4f2dda3e9873c67 | d7d4fd07f12e655abeab385c2dd204bcd489f6e4 | /dataset.py | ecfc0924d5c5baadc58e881eff4f397b252463b6 | [] | no_license | kostas1515/rcnn_drone_vs_bird | c941c3ee1f2b2011f4dd18e473d1a66bd121d78c | 439e29037f914122b2b047faec961e9fabf0f0f3 | refs/heads/master | 2021-02-13T14:23:06.736119 | 2020-03-03T17:53:24 | 2020-03-03T17:53:24 | 244,703,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,100 | py | dataset.py | from __future__ import print_function, division
from torch.autograd import Variable
import numpy as np
import cv2
import os
import torch
import pandas as pd
from skimage import io, transform
import numpy as np
import matplotlib.pyplot as plt
from torch.utils.data import Dataset, DataLoader
from torchvision import trans... |
4ee15f3ef1005696f120f65b57659bb6ace13457 | 31275bb76afd46c82d8c224c8dba07748ee200ca | /first_test.py | 23404bea56b8663790facdc8a1c18c2286d74831 | [] | no_license | shincling/TensorFlow_Basic | f514c4e8da0c520bbe9aa5b44724bee2585afd15 | 0816c84fc1d2263833eea654fb1b2d850818eb92 | refs/heads/master | 2020-12-30T14:34:11.728462 | 2017-06-12T15:55:23 | 2017-06-12T15:55:23 | 91,068,632 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | first_test.py | import tensorflow as tf
m1=tf.constant([[3.,3.]])#1*2
m2=tf.constant([[2.],[2.]])#2*1
product=tf.matmul(m1,m2)
sess=tf.Session()
result=sess.run(product)
print result
sess.close()
|
74d63bb86a4957e720eeaa1b390542ef2bc2020e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/135/usersdata/227/54953/submittedfiles/OBI.py | a6e25b01c9d2c4a9032f268cff5a3d1133d6ecca | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py | OBI.py | # -*- coding: utf-8 -*-
n=int(input('Digite a quantidade de competidores:'))
p=int(input('Digete o numero de pontos para ser convidado:'))
pontos=0
cont=0
for i in range (1,n+1,1):
x=int(input('digite o numero de pontos da primeira fase:'))
y=int(input('digite o numero de pontos da segunda fase:'))
pontoa=x... |
be701fa0baf0a30fb301ef3969d4f893f8a434bb | b4859c934012cbb46113ee26e5288cdc17cab568 | /Loopers/scripts/do_fcnc_v2.py | f349a8e4ce784be9bdcd8ac76665823794cbda52 | [] | no_license | sam-may/ttH | e3f8dab2d464d268839643cd7b07b895944c69e6 | cb04bc13f162b035409dc388ac2ec2f1680abe7d | refs/heads/master | 2021-07-16T14:13:29.490552 | 2021-05-20T23:18:47 | 2021-05-20T23:18:47 | 125,431,222 | 1 | 3 | null | 2020-05-04T20:57:11 | 2018-03-15T22:03:57 | C++ | UTF-8 | Python | false | false | 16,769 | py | do_fcnc_v2.py | import sys, os
sys.path.append("../")
import itertools
import parallel_utils
import workflow_utils
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--tag", help = "tag to denote with", type=str)
parser.add_argument("--baby_version", help = "which version of babies to use", type=str)
args = parser... |
03077ffac3826c5f8bad2fbccec88156b554fcee | 32beefd917bdc09db3acde8f7346eee3c577584c | /components/draw.py | 5b1193e6383cc4359676e83e48a692ac7c6c7241 | [] | no_license | goyalk72/Pacman | 5b300c14b342b011dd477b0cf9bbb67cf36102b9 | 7b23667a791aa83af1a6243be4d648ebf896076b | refs/heads/main | 2023-02-22T02:42:09.946115 | 2021-01-23T07:02:21 | 2021-01-23T07:02:21 | 320,485,748 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,951 | py | draw.py | from graphics import Point, Text
from config import SCALE, VSCALE, TEXT_SIZE, OFFSET, BORDER_COLOR, LENGTH, SCOREOFFSET
def draw_head(window, color, ITEM):
WIDTH = window.getWidth()
HEIGHT = window.getHeight()
CENTERX = WIDTH//2
CENTERY = HEIGHT//2
for j in range(len(ITEM)):
for i in rang... |
df2e2351acbbca47847a8c07ee9e06dda27fdd38 | d60d0e6d25cde760498b073e94cce454201bc117 | /polyaxon/api/activitylogs/views.py | 965f0cf76daf293ce480bf7af45945a33e4ed00a | [
"MIT"
] | permissive | rsumner868/polyaxon | de8321b69d69f2e156591330019f1e098e244bbe | 7917a1a8ac1884382d6b3b9ec11c417ea479acfd | refs/heads/master | 2020-03-28T15:07:00.168128 | 2018-09-13T00:37:10 | 2018-09-13T00:37:10 | 148,557,629 | 2 | 0 | MIT | 2020-07-10T06:18:15 | 2018-09-13T00:14:06 | Python | UTF-8 | Python | false | false | 1,854 | py | views.py | from rest_framework.generics import ListAPIView, get_object_or_404
from rest_framework.permissions import IsAuthenticated
from django.db.models import Q
import activitylogs
from api.activitylogs.serializers import ActivityLogsSerializer
from constants import content_types
from db.models.activitylogs import ActivityL... |
652cac5e8f9d0da12eb382729bafa7e6e133e478 | 8a80358eec9c59fcbd5211a0612d09d4cfd7a4a9 | /zspider/middlewares/httpproxy.py | c1b76ba6dc97474a19c05215fca9e91b69731186 | [
"MIT"
] | permissive | Zephor5/zspider | f80798d301206d582233d7d8e1ab6285b0b48070 | 84773d75942391f93dcde0465ffb73e592ac3ed1 | refs/heads/master | 2023-04-15T01:09:30.781259 | 2023-04-10T14:40:56 | 2023-04-10T14:40:56 | 48,484,407 | 12 | 1 | MIT | 2023-04-08T16:42:54 | 2015-12-23T10:22:16 | Python | UTF-8 | Python | false | false | 868 | py | httpproxy.py | # coding=utf-8
import logging
from scrapy.exceptions import NotConfigured
from scrapy.utils.httpobj import urlparse_cached
__author__ = "zephor"
logger = logging.getLogger(__name__)
class HttpProxyMiddleware(object):
"""
http(s) proxy
"""
def __init__(self, proxy):
self.proxy = proxy
... |
af7d40c2c2a56a9747d2b5a195129dbf1f858f6e | d5218bc22ee0b5e01cce771ec1a75007a3a95bba | /Login/test_views.py | 844011df0eafb9964560baac3eaeb426cb8bddf0 | [] | no_license | shaunakmukherjee/iJamU-the-jamming-app | 9833ccd3cd944bd4f758e01f13988d3e094b8053 | 17e51e41caf47efa5d3b975854b66bbcc20c5c8d | refs/heads/master | 2021-01-12T00:02:51.990088 | 2017-02-14T19:55:48 | 2017-02-14T19:55:48 | 80,863,847 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,490 | py | test_views.py | #Login/test_views.py
# Enables use of dummy web browser
from django.test import TestCase, Client
from django.contrib.auth.models import User
# imports of views
from . import views
# test Login and Signup
class Test_Login_Signup(TestCase):
# Install the test fixtures for user
fixtures = ['user_data']
usrs... |
5ccb7d0608a3352d2a2ac412d6d31a75b1ecb344 | 1262b6c4339b59cdc7b770bf2ea5642f017201ca | /seed.py | 5885fe3ef3867274e5001cd3172a68baf0daa12a | [] | no_license | maplekiru/flask-pet | 9665ea0f9b423d64c169cfa45b3e5ff7a840150f | 7e72eef5128c6e62c996f3690e655559d258238c | refs/heads/main | 2023-04-14T09:50:18.899305 | 2021-04-30T23:59:04 | 2021-04-30T23:59:04 | 363,228,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | seed.py | """Seed file to make sample data for users db."""
from models import Pet, db
from app import app
# Create all tables
db.drop_all()
db.create_all()
# If table isn't empty, empty it
Pet.query.delete()
# Add users
vin = Pet(name="vin", species="dog",
photo_url="https://media1.popsugar-assets.com/files/thumb... |
748ab0e7f6b63e39d1f26745a307f7741e9215a4 | 53d5a7f0f55adf7bfac7bdeae37d531399632d60 | /python/unittest/myFunc.py | e39dc156b58c934471efa57eee5760b2bdf5d0bc | [] | no_license | liu753951/CodePlayground | 4db0b568f62d70f619c7c56a9e283a9750be8bc1 | 572a13c9dd9789cf4c58bb8d09fa4029176478ae | refs/heads/master | 2020-05-24T14:17:04.230095 | 2019-08-31T03:50:39 | 2019-08-31T03:50:39 | 187,306,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | myFunc.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 30 19:22:50 2019
@author: pinchun
"""
def increase(input_num):
return input_num+1
def decrease(input_num):
return input_num-1 |
d32b7597eb9ce92f074b05eb4dca57b67037fd25 | ecc04121c2410fb36087c70fb017b9142420454c | /opencricket/suggestion/__init__.py | b31556e9f67ffc7c6ff95af9ad44653e74b8d363 | [] | no_license | digideskio/open-cricket | a4a5f440f942212c3508c00879751c9823d096ec | 8bb389cd197a1df7f09e902c592f80f07d7bfbf3 | refs/heads/master | 2021-01-17T09:03:55.524128 | 2016-11-09T21:05:25 | 2016-11-09T21:05:25 | 59,554,563 | 0 | 1 | null | 2016-05-24T08:25:20 | 2016-05-24T08:25:19 | null | UTF-8 | Python | false | false | 24 | py | __init__.py | __author__ = 'leninraj'
|
8f607cbe58f8ea180f2862a3f5de5d3e67f945fb | fd3ffffbb9fd82c0eb8f7ebc3562d79835d05576 | /csvAndDocx/pcs_all_col.py | 0750d1c22ff3cf5f098e4dc7ba153469f99aa219 | [] | no_license | jki21/pythonScripts | dbb9d03b68afa13034698b1cadb573cb8ab7124a | f3caa201a37ed65b89b24539635ab9d3cf3d84df | refs/heads/master | 2022-12-16T17:13:45.152730 | 2020-09-25T11:13:00 | 2020-09-25T11:13:00 | 105,097,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 809 | py | pcs_all_col.py | import re
import os
from bs4 import BeautifulSoup
import json
import shutil
import csv
p = re.compile(r'[^\d]')
tarDir = r'C:\Users\cjackng\Desktop\Work\LCSD-PCS-2017Revamp\trunk\Prototype\Latest'
rptBase = os.path.join(tarDir,r'rptBase.htm')
with open('pcs_all_col.csv', newline='') as csvfile:
with open('pcs_al... |
1982f601d6d2122e9f5b01f5487ab50d50429e71 | 694c4b633da0ba680b010514081fc8ff8e58dae9 | /shift/__init__.py | b2bc4207db6a0482f82cbb070457ffa5bd3339a9 | [] | no_license | kiddikn/otake_app | a1f7d296a978c38d07b15b8a9a8760b45abc147f | 422417f00cecef91b9775a682e0c7218c5a8bed2 | refs/heads/master | 2022-10-12T01:40:41.342558 | 2021-01-23T04:08:11 | 2021-01-23T04:08:11 | 227,144,214 | 0 | 0 | null | 2022-09-23T22:50:44 | 2019-12-10T14:42:13 | Python | UTF-8 | Python | false | false | 142 | py | __init__.py | from django.contrib import admin
admin.site.site_title = 'パトロールシフト管理'
admin.site.site_header = 'patrolシフト管理'
|
8ad3e6f55f951fc31acc912fc5b70879a9388f63 | 251962309776bf84973605d47c474e03e15c7469 | /hotelsite/views.py | 4e63dc3c87f9c01ceea642da9d15562e02319293 | [] | no_license | codesweetcat/GoogleAppEngine_django_hotelReviews | 4ef93aca8d56a2eb120657e3a3a52f3321a23cfa | 79b9fa1af28c85d41bdf95dbabfcdf799922605f | refs/heads/master | 2020-03-25T11:59:17.993041 | 2018-08-07T09:42:43 | 2018-08-07T09:42:43 | 143,756,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, "hotelsite/home.html")
def about(request):
return render(request, "hotelsite/about.html")
def reviews(request):
return render(request,... |
387943d29f8f28791942a8aaa3212cfc18615bdf | 60a322ffe210dd9e2d24b16382cc027c493e06ac | /testpipenv/testpipenv.py | 741431135074d9f9487584fac425d6f7620af545 | [] | no_license | kiwamunet/testpipenv | 8c00765f16f2cf9aaaaca23750d958d78c3a5f1d | 97c754f1e6ec5bf10d3ab049ed9f06f13ff630af | refs/heads/master | 2020-08-04T20:48:38.660889 | 2019-10-02T07:27:27 | 2019-10-02T07:27:27 | 212,274,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | testpipenv.py | class Echo:
def __init__(self):
pass
@classmethod
def echo(cls, message):
print(message)
|
340857bffc95e0518fe1cd97869fbb968c731fe0 | d697c3470b1dd4dc0ad1e6bfec09d8f5bf10e6a3 | /loss/lsss_loss.py | ea8e49ed352ec030b48607aafd7268000a0fca5d | [
"MIT"
] | permissive | deep0learning/f-statistic-loss-nips-2018 | fbf4e4b4e2f717aeed79c44f3133b4ab15f37ce2 | e1e60f1d9b2a9c24eec75c3d303cc3ac51ecf73e | refs/heads/master | 2020-04-14T10:39:51.581518 | 2018-10-17T22:54:38 | 2018-10-17T22:54:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,325 | py | lsss_loss.py | import tensorflow as tf
import numpy as np
import batch_pair_generator as gen
def create_loss(model, z):
#Margin from "Deep Metric Learning via Lifted Structured Feature Embedding Query Retrieval"
margin =1.0
model.pos_comps = pos_comps = tf.placeholder(tf.int32, [None,2], name='pos_comps')
model.neg_... |
4c11e66011d13aacb957ce70fed3368f1c6c5282 | bf3a357718aeb5eba34c6fd98eb7bd1628f7f62d | /apps/Analyzer_Datasets/maps/lib_data_geo_shapefile.py | 2c374391e6e4a8f311a812d9a1689de799880a8a | [
"MIT"
] | permissive | c-hydro/fp-hat | 0a9fb8f0d1a7454422901505b6b223277014d1a9 | 5942699cc53cda85480ad17b81c9baa963ea8189 | refs/heads/main | 2023-05-11T11:04:08.075582 | 2023-05-09T08:26:36 | 2023-05-09T08:26:36 | 216,774,585 | 2 | 0 | MIT | 2023-08-31T14:16:11 | 2019-10-22T09:28:02 | Python | UTF-8 | Python | false | false | 4,055 | py | lib_data_geo_shapefile.py | """
Class Features
Name: lib_jupyter_data_geo_shapefile
Author(s): Fabio Delogu (fabio.delogu@cimafoundation.org)
Date: '20210113'
Version: '1.0.0'
"""
#######################################################################################
# Libraries
import pandas as pd
import geopandas a... |
bda6fbc09217d251ed23b01b7e5c06960bddb745 | 57971987d66778a4d848407d5fbf8e89484de63d | /facehugger.py | 7326882029f2df021344ed5944ad3816bdb3cb25 | [] | no_license | Hackinfinity/Facehugger | ccc5e908114ca50b291604c5f651af7da4e2e47a | 9741cda347f629fd5e13f515546c393aae79f73d | refs/heads/main | 2023-05-27T06:10:54.877587 | 2021-06-09T16:56:38 | 2021-06-09T16:56:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,044 | py | facehugger.py | # Libraries
# ---------
import subprocess
import os
import requests
from bs4 import BeautifulSoup
from termcolor import colored
import re, sys
import signal
import socket
class Terminal:
""" Provides methods that provide command line functionality to let the user
load and run additional modules and provides t... |
fae02ffa8164f14a36e5c79078504612382ae90e | 130904374cb0b4620be803c3152a050c8670d942 | /odsparsator/tests/test_main.py | 2300e9abfa72e601ba759c28bc87044fca62be4c | [
"MIT"
] | permissive | jdum/odsparsator | 1aa313423ab3bfb11d7343fc883281fd24a449cd | cf51a0dafbaa03438cdea392a935e4f717b29238 | refs/heads/main | 2023-04-05T21:07:49.401397 | 2021-05-05T22:52:19 | 2021-05-05T22:52:19 | 364,053,075 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,408 | py | test_main.py | #!/usr/bin/env python
from unittest import TestCase, main
import os
import json
import odsparsator.odsparsator as p
class TestMain(TestCase):
def test_no_args_odsparsator(self):
with self.assertRaises(TypeError) as cm:
p.ods_to_json()
self.assertEqual(cm.exception.code, 0)
d... |
b4a9cce72e30404d18af7c1c2ba4d2696b5dc55d | f2076dc97f38c1886bd0216dfa1eeaf5a41f01e6 | /voprov/serializers/voyaml.py | 4c3c7108b6974226e5cd1cc29a289d9127fa8945 | [
"MIT"
] | permissive | sanguillon/voprov | ed4ab97e88c19df6930e608560b7b7839f941bdb | 7c876de0fa4b802fef0c0f540aa96180f167c6c5 | refs/heads/master | 2023-06-22T14:20:24.543568 | 2023-06-20T08:39:01 | 2023-06-20T08:39:01 | 75,845,395 | 4 | 2 | MIT | 2023-06-20T08:39:02 | 2016-12-07T14:47:00 | Jupyter Notebook | UTF-8 | Python | false | false | 6,439 | py | voyaml.py | from voprov.models.model import VOProvEntity, VOProvAgent, VOProvActivity, VOProvAttribution, VOProvUsage, \
VOProvGeneration, VOProvEntityDescription, VOProvActivityDescription, VOProvParameter
from voprov.models.voprovRelations import VOProvWasConfiguredBy
from prov.serializers import Serializer
import yaml
impor... |
7bd089f5df8f11dcc684f5495e29528c1ebd6c78 | 95daa9d67784ff6b156716663bb75408b602b4ab | /2020/day_13/bus.py | e51ec3e90f01c9ecdf8d9a9c03839459242519c2 | [] | no_license | dlopezg/advent-of-code | 8838cb1337f970ed4d78ddcb50e62ce0d7ea4b2c | 7b0953216447360b619898332f0bc9c1f70acf6c | refs/heads/master | 2023-02-02T03:20:56.484097 | 2020-12-21T10:48:48 | 2020-12-21T10:48:48 | 317,638,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 864 | py | bus.py | from pprint import pprint
from copy import deepcopy
def readLines(file):
data = open(file).read().split('\n')
timestamp = int(data[0])
ids = [int(busId) for busId in data[1].split(',') if busId != 'x']
return (timestamp, ids)
def departures(buses):
timestamp, ids = buses
busIds = deepcopy(id... |
3a841ad8d6f5eebc57fdb5a5638064be9e15fb2a | 266ffe9d22fd04b9f12dde21fa0433415adc3cc9 | /simulOfBioNN/nnUtils/chemTemplateNN/filesForDev/chemTemplateCpLayer.py | 9d0ebc4fe56ba91616c109235e7f36b5a17d1f76 | [] | no_license | PierreOrhan/bioNN | bdada03d97233f26b00c58761ab769809114afd5 | 51147113c4a713de7a9114d43672cf32c186bba8 | refs/heads/master | 2022-12-26T00:01:14.330774 | 2019-08-19T09:36:05 | 2019-08-19T09:36:05 | 191,162,122 | 0 | 0 | null | 2022-11-22T03:52:26 | 2019-06-10T12:17:00 | Python | UTF-8 | Python | false | false | 37,441 | py | chemTemplateCpLayer.py | from tensorflow.python.framework import ops
import tensorflow as tf
class chemTemplateCpLayer(tf.keras.layers.Layer):
"""
A layer that given the inputs should compute the competition and return it as a Tensor.
"""
def __init__(self, deviceName, **kwargs):
"""
Creates the Variab... |
63d3985fbe661fdaea9f25829758d8db9f6d3638 | a2c6984d66097a7c7c486267927a00f420fa044c | /src/views/index/ir_data_resolver.py | 67455b82f9e47db16e37d14b5ca9a482b45cd2b1 | [] | no_license | yoohhal/data_gathring_web | e1fd1ec45c8ead649261896a4c744da0e7ee3377 | 245ce1adfc8a43d09afb49dbc61f466e894a4be9 | refs/heads/master | 2022-11-01T06:41:00.072361 | 2020-06-17T02:33:36 | 2020-06-17T02:33:36 | 270,882,759 | 0 | 0 | null | 2020-06-17T02:34:35 | 2020-06-09T02:21:00 | Vue | UTF-8 | Python | false | false | 14,629 | py | ir_data_resolver.py | import random
import base64
import numpy as np
import cv2
import pymysql.cursors
import struct
import config
import queue
import math
class IrDataResolver:
temp_queue = queue.Queue(maxsize=config.TEMP_QUEUE_SIZE)
INSERT_SQL = "INSERT INTO `ir`.`" + config.MYSQL_TABLE_NAME + "` (`box_id`,`visible_img_file_n... |
b868a5e775d4be0cdb64865020f627c1926cabc1 | c162b3bdc55d0223912aff58e49f040687b29137 | /wecom/testcase/register_test.py | 2ebaa84709566937d39ace9ae79d15262c35a21e | [] | no_license | sunyanan218/hogwarts | e3f85e1a4cbfbdcb742dd944ceae9243e3268ac1 | 3b19057dd8cad1086acff3a9a3f06b3b8bf16f0b | refs/heads/master | 2023-04-16T23:47:43.094383 | 2020-08-28T09:25:53 | 2020-08-28T09:25:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | register_test.py | from wecom.page.mainpage import MainPage
class TestRegist:
def setup(self):
self.main = MainPage()
def testregist(self):
self.main.goto_regisete()
|
593622ff33eb55447e75c994b2a9edc97c0c9ef6 | c892d5abd74ae5781a4daada4ff17ae5ed734159 | /testPackage.py | e9b6a55153c55076fa0f38f22f2eae533e7601aa | [] | no_license | vanhungbkcbg1/learning_python | 0fbda5b47bb91996b8efe33e96d1d5b551d186d5 | 962c0571c1e0b5782d5278c16e68808a463efa74 | refs/heads/master | 2020-03-12T18:57:12.904581 | 2018-04-25T14:40:21 | 2018-04-25T14:40:21 | 130,773,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | testPackage.py | import package
package.Student.test()
package.Teacher.teach()
obj=package.PackageClass.Interviewer()
obj.interview() |
6a2459a0c43c3dfd7c29694b2dd7e112a677ae4c | 016747529a09dd12ef9979e778d0bd700c6e54c6 | /Scrapy_Scrapers/CMA/CMA/spiders/core.py | 0e07fd5f3adfb1edfe4efdb552a02bbdcf6b6950 | [] | no_license | goobyme/WebScrapers | c8cdc1627c73ea8f86a64d510f7816b89898e7c4 | 5e6bbdd0761236ee4886db991b40d202347eb22c | refs/heads/master | 2021-09-07T07:56:01.236791 | 2018-02-19T18:36:58 | 2018-02-19T18:36:58 | 116,184,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,786 | py | core.py | # -*- coding: utf-8 -*-
import scrapy
import re
class CoreSpider(scrapy.Spider):
name = 'core'
allowed_domains = ['californiamortgageassociation.org']
start_urls = ['http://californiamortgageassociation.org/member-directory/?start=0&where=WHERE+tblPeople.CompanyID+%3D+tblCompany.CompanyID+AND+%28tblPeople... |
8e8acc14b4815184263b4b5bce219cdf315749ab | bf397eb8e8a1543ec283b7a4536dc7cd08b6a3bf | /cct/core/commands/__init__.py | 44ee67b2fd098d9e72b6760d149c8b3bd9eac2e8 | [
"BSD-3-Clause"
] | permissive | chrisgauthier9/cct | 0c152a72b61baa43b99719d60c6ad26b41d50c91 | 62da7149b15c0d39e9303e0cbe0cffa13bac55ba | refs/heads/master | 2021-02-17T00:01:22.190527 | 2020-01-23T11:26:38 | 2020-01-23T11:26:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | __init__.py | from . import basic, circulator, command, detector, device, jump, mapping, motor, scan, script, transmission, vacuumgauge, \
xray_source
from .command import Command, CommandError, CommandTimeoutError
|
7986c79802a40ee8932cb3689b970cd8aa517252 | f508da1fd2e65491e1e6b5dd3a64d8bf6039bc6c | /tools/get_auth_token.py | 61ef6175fcd97b2ba672218d34e34511bdf9d243 | [
"Apache-2.0"
] | permissive | senhuang/eho | b9595739b109829b44e6d538b36348ac84529af8 | ca4dba1d0e7ab24d748b746e115ca6dc2191997a | refs/heads/master | 2021-01-21T00:36:50.271363 | 2013-03-19T07:55:50 | 2013-03-19T07:55:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | get_auth_token.py | import os.path, sys
from flask import Config
from keystoneclient.v2_0 import Client as keystone_client
def main():
if len(sys.argv) > 1 and len(sys.argv) != 4:
print "You must either specify no parameters or exactly 3: <username> <password> <tenant>.\n" \
"If you specify no parameters, credenti... |
fec1e2477418b33232c31632404171cf20c36f88 | 661d778bcc07306528b5d43291d188a338601674 | /etl/etl_excel_to_mysql.py | 3d55de64ede19569467117a4381f280f54e254c8 | [] | no_license | zkc360717118/pythonStudy | 44156d3336c0f966d92ee41035eb70194985a7df | 54a26eb6e7ec4ef27ade96d37c6fa1a9138d70e2 | refs/heads/master | 2020-07-07T23:53:44.301092 | 2019-08-21T05:17:55 | 2019-08-21T05:17:55 | 203,511,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,242 | py | etl_excel_to_mysql.py | # -*- coding: utf-8 -*-
import xlrd
from datetime import datetime
def read_excel():
#获取文件
# ExcelFile = xlrd.open_workbook(r'E:\root\pythonStudy\etl\kevin.xlsx')
ExcelFile = xlrd.open_workbook(r'E:\root\pythonStudy\etl\Sample-File-utf.xlsx')
# 获取目标EXCEL文件sheet名
# print(ExcelFile.sheet_names())
... |
ea95d1c359b679d3db5c20891cce821b9b90cdff | 55c26ac641ddfa67f8730fd7ae540609284b31e6 | /Week 1/hackerrank/medium/merge.py | 487b36494fab13e0196004b42f21fb3d3aeb8e1a | [] | no_license | bashenov98/BFDjango2020 | 2f34401f3bcc4046af70c5a3b20d86c2da2029fc | 89e761d9d5c1a5dac2b66afb16f6534f8bb2fc03 | refs/heads/master | 2023-08-18T03:03:41.503414 | 2020-04-20T00:30:07 | 2020-04-20T00:30:07 | 257,066,857 | 0 | 0 | null | 2021-09-22T19:00:42 | 2020-04-19T17:57:08 | Python | UTF-8 | Python | false | false | 197 | py | merge.py | s = raw_input().strip()
k = int(raw_input())
i = 0
while i < len(s):
a = s[i:i+k]
output = ""
for x in a:
if x not in output:
output += x
print output
i += k |
ab72ca91ad8ba7f6dd2668b80dd791a7b4e0251f | f781ce09761ed97a229dff5614013d8ef91d7add | /07.py | fea2b9c8607e4415abc44b752faab233e324771e | [] | no_license | kiwitea/AOC-2020 | 8dc491da93463adc0c401b6ad3d9f4457d5d8495 | f22a60158373bd26593ded4afff9dc86a55e9fa3 | refs/heads/master | 2023-02-05T03:59:52.094147 | 2020-12-24T20:16:30 | 2020-12-24T20:16:30 | 320,682,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,902 | py | 07.py | import re
from pathlib import Path
from typing import Dict, List, Set
import runner
pattern = re.compile(r'^(?P<color>[\w\s]+) bags contain ((?P<children>((\d+) ([\w\s]+)+ bag(s?)(, )?)+)|(?P<nothing>no other bags))\.$')
child_pattern = re.compile(r'(\d+) ([\w\s]+)+ bags?(?:, )?')
def parse_spec(spec: str) -> dict:
... |
b5c079fe3de5153df9c6d5673dfff69e75b44adc | d91a61442d0ba0547301f54e7f63039ab5346198 | /monitoria/funções/exercício_2.py | e5c6066b264834123840e063b855946bcc1ff239 | [] | no_license | pedroceciliocn/programa-o-1 | a41bf89475939ad1791320c8fa4845744921ec19 | 15f8a3dbc13f4cbbc15f2b626ccef47fe145cc3f | refs/heads/main | 2023-07-12T20:06:20.632304 | 2021-08-17T22:05:57 | 2021-08-17T22:05:57 | 377,301,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py | exercício_2.py | """2) Faça um programa que contenha uma função chamada spell.
Esta função irá receber um nome e imprimir cada letra desse
nome separadamente."""
def spell(nome):
for letra in nome:
print(letra)
spell('pedro')
|
b59caf55885708a062f416b52916c60f590a8faa | 5945903ff7b3c0be799d8b228aa96309e8d6b68a | /PTA_2020_7.py | d9db18d82e6672b8d74bfcfe6b88766914a12786 | [] | no_license | freesan44/LeetCode | 44fd01fa37e2d7e729ae947da2350b1649c163ae | 2ed9f1955c527d43fe1a02e5bebf5a6f981ef388 | refs/heads/master | 2021-12-07T20:07:02.308097 | 2021-11-01T23:58:11 | 2021-11-01T23:58:11 | 245,178,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 920 | py | PTA_2020_7.py | start,end = map(int,input().split())
# start,end = map(int,"10 14".split())
# start,end = map(int,"1 10".split())
inputList = [str(i) for i in range(start, end+1)]
def actionRes(a:str) -> str:
res = 1
for i in a:
res = res *(int(i)**3)
b = str(res)
resb = 0
for j in b:
... |
20e2d163460c6f498eab7e846eb025d19158a6e8 | 51e82c3eaf6f0a98e6247114b7bc88b1595308cb | /novel_all/novel_biquge.py | a1ce967c68f452451ce6a6397c229c594f536255 | [] | no_license | 0thunder0/wpPlugins | 4e887ec3fdd533b00a2cc9f127c1ec206e24f40d | dd0fa79dd9bbd131075312822da83f6063652d9c | refs/heads/master | 2020-04-04T09:49:59.417327 | 2019-09-05T14:26:12 | 2019-09-05T14:26:12 | 155,832,073 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,995 | py | novel_biquge.py | from wp_plugin import wp_plugin
import time,random,os,urllib
from pyquery import PyQuery as pq
urls=['http://www.hizbo.com/meinv/']
#header={"User-Agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36"}
header={'User-Agent':'Opera/9.80(Macintosh;Inte... |
c15e94b9a346b3b103011f62aaf641ee1b42a013 | f8f18b91e2f670c91a7447e0c45c52e7e939a510 | /generator/generator.py | d6356cbea988534859b4ef6f226fc28138524596 | [] | no_license | mrmechko/SimpleOntology | 3a2b947a84e02260bc285042d111863dc19ac0c4 | 68dcc2b14befa01e6a0cf942bbbb78584236c5fd | refs/heads/master | 2020-04-01T15:52:12.782379 | 2019-01-15T00:37:49 | 2019-01-15T00:37:49 | 153,355,712 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,582 | py | generator.py | import re
template = """
(defmethod JONATHAN::%to-json ((variable {struct}))
(JONATHAN::WITH-OBJECT
{entries}
)
)"""
entry = '(JONATHAN::WRITE-KEY-VALUE "{name}" ({getter}))'
def slot_to_name(slot):
return slot.replace("-", "_")
def generate(struct, slots):
entries = []
for s in slots:
x... |
eb38e4ec30cf5ad333920b3cc5e3686049f3f82d | a0d542acc06843202995df801796c85409d7a40f | /COVID-19 Notifier/COVID-notifier.py | 7fc47ac15af52f7578ede0bb65491a83916c5c62 | [
"MIT"
] | permissive | Re-Creators/ScriptAllTheThings | 044736d6c37a1e6e52b10c4bbfdd0bbd5b624c34 | 78fdadc63b55c5e984ebaa4b7a1b64496fd92a23 | refs/heads/master | 2023-08-31T08:46:07.688596 | 2021-10-06T14:59:13 | 2021-10-06T14:59:13 | 412,712,758 | 0 | 0 | MIT | 2021-10-02T06:36:28 | 2021-10-02T06:36:27 | null | UTF-8 | Python | false | false | 881 | py | COVID-notifier.py | """
COVID-19 Status
- Get notification of new cases and deaths
Author : Sudhanshu Motewar
Date : 21/03/21
"""
import requests
from bs4 import BeautifulSoup
from win10toast import ToastNotifier
# get your country url here https://www.worldometers.info/coronavirus/
url = 'https://www.worldometers.inf... |
09fa44e14336a76e496651c43e113331acda6247 | 5a842c0a9525912b43f865b819b2c4064e6c8be9 | /reading_list/toplongterminterests.py | 98d01c30e3aa3ad8a0e9d8e720fa9929a055926c | [] | no_license | joetm/jonaso | c507002555a9fcdcb587a9e2ce5d5810c17aea90 | 2fca50224bd04bc07f3239f6dede3ddcdbb033ec | refs/heads/master | 2023-09-02T15:29:25.728727 | 2023-09-02T14:37:38 | 2023-09-02T14:37:38 | 114,383,626 | 1 | 0 | null | 2023-06-09T23:14:00 | 2017-12-15T15:17:30 | HTML | UTF-8 | Python | false | false | 3,108 | py | toplongterminterests.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import json
import sys, os
# import time
from datetime import datetime
filter = ['Issues', 'General, Theory', 'Research Methods', 'Applications', 'Communities, Networks']
CUTOFF = 11
DAYS = 30
def convertToDate(tim... |
e5e5cb7eb30743a20b49f3416b8dd1dca6f28edb | dbba024123760e0eda79e2cff188a64e60d7c280 | /jazz_scraper/spiders/jazz.py | dc7f3fd94ce0ddccf878e82df7940edbca9684dd | [
"BSD-2-Clause-Views"
] | permissive | palazzem/umbria-jazz-scraper | a6ee7c90456a89af903753107b657fe11b2a4ca1 | 196a3c866fc3bc5fa59fb7628d4d594717bb3979 | refs/heads/master | 2021-06-03T09:44:20.752397 | 2014-07-17T10:47:45 | 2014-07-17T10:49:05 | 21,938,358 | 0 | 0 | NOASSERTION | 2020-03-12T20:40:35 | 2014-07-17T10:49:31 | Python | UTF-8 | Python | false | false | 1,363 | py | jazz.py | # -*- coding: utf-8 -*-
import scrapy
from ..items import JazzScraperItem
class JazzSpider(scrapy.Spider):
name = "jazz"
allowed_domains = ["umbriajazz.com"]
start_urls = (
'http://www.umbriajazz.com/pagine/programma-umbria-jazz',
)
def parse(self, response):
for days in response... |
6f9678f9f6ad3f5a12223f15913e5fb0ba5fa0bc | 176c9662d1e430ac5eb29130866e66fce5968e01 | /controller/apps_info.py | ac6215b0e86081c61243ef668b9d9a2e8cd73996 | [
"MIT"
] | permissive | hotpoor/hj_hackathon_201607 | af1ffbc6aca7373d2649e085dc3f669cabd75e31 | 7ef326a733f88e9a02961a5b467b9109e5b375b9 | refs/heads/master | 2021-06-01T04:24:05.238663 | 2016-07-10T03:52:25 | 2016-07-10T03:52:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | apps_info.py | #coding=utf-8
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/vendor/')
#os.chdir(os.path.dirname(os.path.abspath(__file__)))
import uuid
hotpoor_apps = {
"hotpoor":{
"app_name_cn":u"Hotpoor序",
"app_na... |
4208dd136ef4843175d3f144add3885dd72c2da1 | 9eef1406943a38a8258bbb9c228d5b96b288a6cf | /coolway_website/models/invite.py | 7cf39ec1a7f43e4c4d9781e87a51026b81cf0276 | [] | no_license | laoxu/coolway_site | 58cba586b37bd231e6d12aefb3c1372ea04c488c | e8f042898cb73a25ccaf7c419cd45e987184a245 | refs/heads/master | 2016-09-06T04:09:55.544458 | 2012-12-01T16:43:13 | 2012-12-01T16:43:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | invite.py | from django.db import models
class Invite(models.Model):
id = models.IntegerField(primary_key=True)
user_id = models.IntegerField(null=True, blank=True)
invitee = models.CharField(max_length=384, blank=True)
code = models.CharField(max_length=384, blank=True)
status = models.CharField(max_length=24... |
8a631adc8d919fb1dded27177818c4cb30148e94 | 2b8f1b067a6602a6520e9846a2df8b83a359623a | /BOJ/BaaarkingDog/0x18_그래프/1325.py | 17271c4553ba055aedc36bd43f3e3a2577de9822 | [] | no_license | ymink716/PS | 3f9df821a1d4db110cd9d56b09b4c1d756951dd8 | e997ecf5a3bec1d840486b8d90b934ae1cbafe94 | refs/heads/master | 2023-08-18T18:21:45.416083 | 2023-08-16T07:26:18 | 2023-08-16T07:26:18 | 218,685,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | 1325.py | # 효율적인 해킹
# https://www.acmicpc.net/problem/1325
from collections import deque
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
graph = [[] for _ in range(n + 1)]
for _ in range(m):
a, b = map(int, input().split())
graph[b].append(a) # B를 해킹하면 A도 해킹할 수 있다
def bfs(start):
visited =... |
833923c1928862e13c24904f5614927a683b168f | 4b8644f1399d4e568ca2f46a7f1429461e77f001 | /app/config.py | eee9e3979a7d4e16615e3af2c8c3369c4c251a03 | [] | no_license | richard999/COMP3161PROJECT | 3852b24e09b73f1d73e1c71c49edbcfa444581e3 | c8c7c4a8d4209015d90bb0790d2e7e357b48f101 | refs/heads/main | 2023-04-04T06:55:29.208062 | 2021-04-12T04:19:33 | 2021-04-12T04:19:33 | 352,231,362 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | config.py | import os
class Config(object):
"""Base Config Object"""
DEBUG = False
SECRET_KEY = os.environ.get('SECRET_KEY') or 'Som3$ec5etK*y'
UPLOAD_FOLDER = './uploads'
dbconfig = {
'host': os.environ.get('MYSQL_HOST') or 'localhost',
'user' : os.environ.get('MYSQL_USER') or 'root',
'password' : o... |
1748c8dfcc3974b577d7bfacb5cabe4404b696bc | 678588dc03828db3b00306469940e6b86a41c4eb | /prototyp/src/filter/bilater_median.py | 85f5f2fac869917605cb75e8b3ead5be1d84a123 | [] | no_license | Arnizack/opticalFlow | d3d815161d18422a99ce737a7135b06e49774a09 | 14d3f79abfd81e2b8ce360773384494b211003a4 | refs/heads/master | 2021-05-26T09:27:09.247343 | 2020-12-29T16:41:12 | 2020-12-29T16:41:12 | 254,075,717 | 1 | 0 | null | 2020-11-29T19:10:41 | 2020-04-08T12:02:18 | Python | UTF-8 | Python | false | false | 3,526 | py | bilater_median.py | import math
import numpy as np
from statistics import median
from src.filter.median import quickselect_median
def bilateral_median_filter(flow, log_occlusen, auxiliary_field, image, weigth_auxiliary, weigth_filter,
sigma_distance = 7, sigma_color =7 / 200, filter_size=5):
"""
:par... |
55f76ae1ffe0fb2d2ca2c7a20aab45ffb00cf178 | ba4b9be72cf89fd51bd0315f9f69db4b128c79f9 | /vcenter.py | 189a2739d13629c2fcaeea45518c2b70a652a094 | [
"MIT"
] | permissive | codekoala/collectd-vcenter | 4bf3f6accacf55d2c0701e806c0da0607e39207a | 0aae83fadadc14d023b7efaf60b6d8eb30a494f6 | refs/heads/master | 2020-12-11T01:39:09.122695 | 2015-06-22T18:13:28 | 2015-06-22T18:13:28 | 37,677,651 | 1 | 0 | null | 2015-06-18T18:37:04 | 2015-06-18T18:37:04 | null | UTF-8 | Python | false | false | 16,826 | py | vcenter.py | # collectd-vcenter - vcenter.py
#
# Author : Loic Lambiel @ exoscale
# Contributor : Josh VanderLinden
# Description : This is a collectd python module to gather stats from Vmware
# vcenter
import logging
import ssl
import time
from pysphere import VIServer
try:
import collectd
COLLECTD_ENABLED... |
7e50fc5eb794d7f2e4805924dcc7a99296e0d732 | 4d332c45578246847ef2cdcdeb827ca29ab06090 | /modules/Bio/Phylo/_io.py | 534a2e99000893c8ca6087beb4a99fb2e371034a | [
"MIT"
] | permissive | prateekgupta3991/justforlearn | 616cc297a2a6119fa959b9337a5e91c77a11ebf7 | 3984c64063b356cf89003e17a914272983b6cf48 | refs/heads/master | 2021-03-12T22:09:12.184638 | 2014-01-28T10:37:07 | 2014-01-28T10:37:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36 | py | _io.py | /usr/share/pyshared/Bio/Phylo/_io.py |
a571abd88184c8d8bb05245e9c3ce2e4dabb4c09 | 21efc22d6ef2169ec94aa7d4af88ac5212da8004 | /boj/01966.py | 623fba7d1361d7bb16726204bc85f66c2c388724 | [] | no_license | holquew/PS | a3866e467fdefa3112195b2c14743cbb82b7a51a | faabe21538e33e70fd8357ae489b3c12c3069854 | refs/heads/master | 2023-04-23T22:48:03.413726 | 2021-05-16T13:00:13 | 2021-05-16T13:00:13 | 127,525,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | 01966.py | import sys
from collections import deque
t = int(sys.stdin.readline().rstrip())
for _ in range(t):
n, m = map(int, sys.stdin.readline().split())
q = deque(map(int, sys.stdin.readline().split()))
count = 0
while q:
highest = max(q)
doc = q.popleft()
m -= 1
if doc != high... |
2257494dec9fccc4e8bd4acf0aff31a73c252a61 | d01796cde91a62c0ea6a571ad0bb0841d1173a32 | /genuary2021/Day_05_golf_2/Day_05_golf_2.pyde | 8a0fc48aa9da2fbb691e16d95f304dee46297a18 | [
"MIT"
] | permissive | zarify/processing | 72ebad7275c56a807056ae9a3bb9f3693354ad22 | 3e3bdb6d0d388db7634968a2ffc91bf6f17ff3f3 | refs/heads/master | 2021-07-23T12:24:03.085189 | 2021-07-18T00:01:56 | 2021-07-18T00:01:56 | 207,069,047 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,006 | pyde | Day_05_golf_2.pyde | h = 160
xorg = 0
yoff = 400
xcount = 0
xvel = 2
def setup():
size(800, 800)
colorMode(HSB, 360, 1, 1, 1)
background(140, 0.49, 0.75)
frameRate(30)
noStroke()
def draw():
global h, xorg, yoff, xcount, xvel
if frameCount % 10 == 0:
fill(140, 0.49, 0.75, 0.2)
square(0,0,width)... |
6f99b4e4204e85c78f9c02a5cd53cd76f52c022c | f2b3781edefb3ae0718a65cf788b10a38e02421f | /json/test_ujson.py | 7fb56c102be19f1ecb33f61812c2c55dfc5cc193 | [
"MIT"
] | permissive | Kreyren/benchmarks | c6482cd734ddb78c788d7cace0ab19adfe439eb1 | 64aabadb0d1113d2a04d7b27bc1da2adc3545f38 | refs/heads/master | 2020-12-21T22:06:18.383575 | 2020-01-21T18:12:16 | 2020-01-21T18:12:16 | 236,576,938 | 1 | 0 | MIT | 2020-01-27T19:38:53 | 2020-01-27T19:38:52 | null | UTF-8 | Python | false | false | 725 | py | test_ujson.py | import ujson as json
import platform
import socket
import os
from pathlib import Path
def test_json(text):
jobj = json.loads(text)
l = len(jobj['coordinates'])
x = 0
y = 0
z = 0
for coord in jobj['coordinates']:
x += coord['x']
y += coord['y']
z += coord['z']
print(x / l... |
94be205e516c1f1248b6028419c04c927236596e | af101b467134e10270bb72d02f41f07daa7f57d8 | /tests/test_models/test_editors/test_inst_colorization/test_colorization_net.py | e9da280267d784c5a3a4cdda08ef4c6534fbda09 | [
"Apache-2.0"
] | permissive | open-mmlab/mmagic | 4d864853417db300de4dfe7e83ce380fd1557a23 | a382f143c0fd20d227e1e5524831ba26a568190d | refs/heads/main | 2023-08-31T14:40:24.936423 | 2023-08-30T05:05:56 | 2023-08-30T05:05:56 | 203,999,962 | 1,370 | 192 | Apache-2.0 | 2023-09-14T11:39:18 | 2019-08-23T13:04:29 | Jupyter Notebook | UTF-8 | Python | false | false | 1,205 | py | test_colorization_net.py | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmagic.registry import MODELS
def test_colorization_net():
model_cfg = dict(
type='ColorizationNet', input_nc=4, output_nc=2, norm_type='batch')
# build model
model = MODELS.build(model_cfg)
# test attributes
assert mode... |
cb3c1adb9d91aecee5b21774d61dfe9400a330fa | f6eaeb36a4a49dd3e7bfce4a6ba2a2ec94ef49f7 | /paddle.py | 94faf7d38b55adc048645396c4535c9640a8ff26 | [] | no_license | dallincoons/pong | 6fdab31430e5c9a926b43634f5db5434378d507c | 21667522ce5a490768df0f09e228c0e5ce7ff311 | refs/heads/master | 2020-04-21T23:18:46.806393 | 2019-02-10T04:30:05 | 2019-02-10T04:30:05 | 169,942,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 719 | py | paddle.py | from point import Point
from velocity import Velocity
import arcade
import config
PADDLE_WIDTH = 15
PADDLE_HEIGHT = 30
class Paddle:
def __init__(self):
self.center = Point(390, 50)
self.velocity = Velocity(0, 5)
def draw(self):
self.drawing = arcade.draw_rectangle_filled(self.center... |
d70e5f52f15e134080a3cdf718bb05a94a82e5f8 | 6c86af7af7be5bbb2f4506e844c765653642db34 | /MakeUniqueAndsort.py | 329be3c5b6b0fa147768f2b5f89ce3b9a2196417 | [] | no_license | Tarun-Sharma9168/Python-Programming | 83e64ac48cef3959adac24ea45b3985816499cbc | 73c8b38ba68deda74a22be49d0e9113448b7163f | refs/heads/master | 2020-08-11T03:53:39.571654 | 2020-04-29T20:49:10 | 2020-04-29T20:49:10 | 214,485,665 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | MakeUniqueAndsort.py | def unique_sort(lst):
lst=list(set(lst))
lst.sort()
return lst
print(unique_sort([6,5,4,3,5,4,1])) |
e714c93267db7eb8ac9413b066d446ed70dd1bce | 36503a663533d82db71273837921509d85de4f85 | /app/controllers/controller.py | c01fb20c97f03c3656ade11ac0b5ff169ca07cb8 | [] | no_license | cftang0827/word_count_api | 385f309a02f711e02c6502f815089fd75c1e6a0e | ccdde4b8b3da6c53fc2e7d4e1d54a9d8cc1f5d96 | refs/heads/master | 2020-04-27T22:07:45.573939 | 2019-03-14T03:56:01 | 2019-03-14T03:56:01 | 174,724,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,882 | py | controller.py | import re
import requests
from models import model
class WordCounter():
'''
The word counter module, that can count number of keyword in url and save it to the DB
'''
def count_from_url(self, url, keyword):
'''
Args:
url (str): The url that you want to analyze
... |
d9778fe247b8974fec77c240d2eb5dd87b22a59f | aed590e8d2ed6c429f0d423abb18f911d8540b37 | /electrode/clients/lib/forms/input_forms.py | 4db0b5cbba63d93ea8de9645b39812913362ef41 | [] | no_license | junruli9/labrad_tools | 7281178e8820de9db4871fb0d1956637e81cb4e1 | 395eaf1b44494644aa2a0a289959a67b981b8c62 | refs/heads/master | 2023-01-04T01:46:02.811863 | 2020-09-26T15:24:55 | 2020-09-26T15:24:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,850 | py | input_forms.py | import json
import time
import numpy as np
import os
import sys
from PyQt4 import QtGui, QtCore, Qt
from PyQt4.QtCore import pyqtSignal
from twisted.internet.defer import inlineCallbacks
from copy import deepcopy
sys.path.append('../../client_tools')
from connection import connection
from widgets impo... |
d4210f438eafdd028e6be39f179ab9bfacc7d802 | f5d7676738497d1baed6a43b4a6e62af484a72a0 | /seniorServer.py | 236718143a3a8d74303eb2798a2026da05efb235 | [] | no_license | owen1050/seniorDesignServer | af70c8fa3309b94addea57f6285a9cc0973c847b | 1c2a316cc0a86fc92b5f4db98c2b52723dd612b5 | refs/heads/master | 2023-03-18T01:48:16.042376 | 2021-02-23T22:05:00 | 2021-02-23T22:05:00 | 340,738,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,282 | py | seniorServer.py | from http.server import BaseHTTPRequestHandler, HTTPServer
import time
hostName = "localhost"
serverPort = 1234
devices = {}
test_devices = {"device1" : "1", "device2" : "0", "device3" : "0"}
last_request_time = {"device1" : "0", "device2" : "0", "device3" : "0"}
class MyServer(BaseHTTPRequestHandler):
def log_m... |
599178be23e81c6eb0a476c36c823898fe22e0f7 | 08745766734c4ec73dc227492d6c13841d732558 | /gauss/gaussPivotTotal.py | 0efcd7041e341e5f3a8638a1da0665bb779c8751 | [] | no_license | preinh/simcom | bb6dd582501b75232b9d2efed7d6f11ea49b289b | defd8117aa5ac8f0959b85190a892cb45d6f3f7d | refs/heads/master | 2021-01-20T07:15:48.781702 | 2013-04-25T14:30:50 | 2013-04-25T14:30:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25 | py | gaussPivotTotal.py | __author__ = 'pirchiner'
|
d0eb6c4378104e8a1cc8e79922dd7115dd0a7237 | d31c2134e298acf4e96d82267026aa03963312ff | /clients/onesession.py | f132485abe6d07f842f42a33dd83c712c85ec1e9 | [] | no_license | haneensa/flask_debug | b76037557df3916bdb31547114a01f697c77b8eb | 4a32b80f26a38db0838ac1e4ec253aa6b176d977 | refs/heads/master | 2020-04-25T17:27:55.921991 | 2019-02-28T20:42:04 | 2019-02-28T20:42:04 | 172,949,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | onesession.py | """
at the server side:
@app.route("test/connection", methods=["GET", "POST"])
def connect()
return Response(json.dumps(["success"]))
"""
import logging, requests, time, httplib
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log... |
0b4379d77e16643602e71919ee915073bef647a0 | cc90002f2e52cab2f3d7faef592345e433558743 | /terminal/classifieds/migrations/0011_auto_20180515_1915.py | a1c0bc063af48dbad2e367705a13b469bef71fe2 | [
"Apache-2.0"
] | permissive | THEMaxNorman/TerminalMain | f266f53236bd99f47dca28c38ff3d011125b3057 | 3cf23786bd08a0ce704ce5b0469cf396ca75a2ed | refs/heads/master | 2020-03-16T16:45:00.823671 | 2018-05-16T17:38:12 | 2018-05-16T17:38:12 | 132,801,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | 0011_auto_20180515_1915.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-05-15 19:15
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('classifieds', '0010_auto_20180515_1847'),
]
operations = [
migrations.Alter... |
cefed9572078c422c62460ae73efa7939d88cd9b | e9d89469c0cf0515b2bd9d26c6026d6e895f7f1e | /packs/load/preprocessor0.py | 701579f600d0d73c661354c9380602458b35ea18 | [] | no_license | jpra2/adm_impress | b29e76a036051bcff29d849635c3bb2dc64d0dc0 | ca4de66880ef536a17695501ed96105c55e4fa70 | refs/heads/master | 2023-07-11T11:35:30.371293 | 2020-11-05T17:29:54 | 2020-11-05T17:29:54 | 211,879,481 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | preprocessor0.py |
from impress.preprocessor.meshHandle.finescaleMesh import FineScaleMesh as msh
from .. import directories as direc
mesh_name = direc.data_loaded['mesh_name']
load = direc.data_loaded['load_data']
M = msh(mesh_name, dim = 3)
|
4a388318aed14b7ffcce75cb28a9eebb54b51328 | 0488c0506fa26a7536a59cd29fa4ee7fc01b1500 | /src/main/tasks.py | 7c39cff1783c34abe4a48d117518ae6c1b047081 | [] | no_license | alfa24/jw_test | 25cfd9a2487b62e54ae8e7bb90e28e26db2f7a94 | 91b89361fcb5c679fab199748d39f58860b67525 | refs/heads/main | 2023-08-03T23:48:39.472671 | 2021-09-15T10:04:10 | 2021-09-15T10:04:10 | 406,069,959 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | tasks.py | from main.services.contents import inc_counter_by_page
from project.celery import app as celery
@celery.task(queue="low")
def inc_counter_by_page_task(page_id: int) -> None:
"""Задача, увеличивающая счетчик контента, связанного с страницей."""
inc_counter_by_page(page_id)
|
e93bba57217363e53cc9eece7c0b1123765ae391 | c7a5cb15c13171b4755a7b499ca21cb03f97d26a | /blseg/backbone/xception.py | 5b1fb4d0bae8f7e81a95f62c346b79a4e0cd763c | [
"MIT"
] | permissive | linbo0518/BLSeg | ead1e02181361d38ce7575b9d7531b1a1c4e0ac5 | 38b6715f2b7be80ac77d8eaa17f73db3f7b01c75 | refs/heads/master | 2021-07-19T06:31:02.489464 | 2020-06-05T07:42:21 | 2020-06-05T07:42:21 | 176,919,003 | 43 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,145 | py | xception.py | import torch
from torch import nn
from .utils import conv3x3, DepthwiseSeparableConv
from .base import BackboneBaseModule
__all__ = ["ModifiedAlignedXception"]
class XceptionBlock(nn.Module):
def __init__(self,
in_ch,
out_chs,
stride,
residual_t... |
92b4fd7343dd11298722e7545fe436f48d82cedb | fc46d24b46ff938e314a9b0c4f2a1e839df2d0db | /src/app/libs/estatisticas_transf_serie.py | 76783210732de84e7e00e04519e02b849d79b23d | [] | no_license | jadsonlucio/Projeto-extensao | 6717d172923b24a72aab4ff5021bcdb5c940e5c7 | 1061f75fcef20f84e9b95bdbab09b91ad428d5e1 | refs/heads/master | 2022-04-11T18:40:51.746064 | 2020-01-09T15:14:01 | 2020-01-09T15:14:01 | 107,275,231 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,609 | py | estatisticas_transf_serie.py | from numpy import mean,median,percentile
def reta_tendencia(array_x, array_y):
soma_x = 0
soma_x_q = 0
soma_y = 0
soma_xy = 0
x = []
y = []
n = len(array_x)
for cont in range(0, n):
soma_x = soma_x + array_x[cont]
soma_x_q = soma_x_q + (array_x[cont] * array_x[cont])
... |
ef7cc41980ad4c91603e5e58e7a232f23ebcb078 | f49025a40922d1309621769df047dd02e2064caf | /main.py | ba1f10e05c0a8cf2349fa083e0c7acedde3cf1dd | [] | no_license | k-karayan/autobahn | bcd7fa0d811617001539ba008e2a2c87b96bd448 | a4b4b485623bb8578ab2bffea0b0a28450fbd962 | refs/heads/master | 2020-03-28T00:29:34.265000 | 2018-09-05T20:20:38 | 2018-09-05T20:20:38 | 147,420,805 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | main.py | from Data import Data
from Calculations import Calculations
## LOAD DATA - SAVE TO CSV
data = Data()
json_data = data.api_request()
df_data = data.data_transformation(json_data)
data.data_to_csv(df_data, filename='files/cryptocurrency_daily_data.csv')
print 'Data saved in files/cryptocurrency_daily_data.csv'
## CALC... |
dd95d0d8b9db9468610044ecbd088071270f46d8 | 922863da9907341ef155175814f9af834cc87a5a | /geo_garry/polygons.py | eafd1402ba2461b99513b3367516bd7ea8394a3e | [
"MIT"
] | permissive | serg-the-engineer/geo-garry | b0eaac5fbecc6cf7870f28b6301e34843b0ce8a2 | 244adffb7b5644758d7d52d6503335810e676e8f | refs/heads/master | 2020-08-08T02:37:01.419113 | 2019-12-19T14:56:24 | 2019-12-19T14:56:24 | 213,679,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,133 | py | polygons.py | from shapely.geometry import Polygon
MKAD_POLYGON = Polygon([
(55.77682929150693, 37.8427186924053),
(55.77271261339107, 37.843152686304705),
(55.738276896644805, 37.84134161820584),
(55.71399689835854, 37.83813880871875),
(55.699921267680175, 37.83078428272048),
(55.6962950504132, 37.82954151... |
9d0781cab7cb047da42b0caff90b8bbcf70d6421 | 9e80de9ef62fd0fb2f979d3cdc5ddb1f489df3ac | /Special_topics/example/scripts/format_info.py | e9a9a9aecd12ce51623887382a5232d830442d53 | [
"CC-BY-4.0",
"CC-BY-3.0",
"MIT"
] | permissive | hadjimy/ACM-Python-Tutorials-KAUST-2014 | ef245e3c08e0b35265dee80e63a2d231a3cb8dd3 | d5580424c2f22bf7fd8a0c659b00d0b429bb5a90 | refs/heads/master | 2020-12-31T01:36:16.677437 | 2014-03-02T11:21:35 | 2014-03-02T11:21:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | format_info.py | #!/usr/bin/env python
import sys
name = str(sys.argv[1])
height = float(sys.argv[2])
weight = float(sys.argv[3])
age = int(sys.argv[4])
f = open('results/patient_' + name + '_' + str(age) + '.txt', 'w')
f.write( "patient's name: " + name + "\n")
f.write( "patient's age: " + str(age) + " Years\n")
f.write( "patient'... |
66b938dd751679d4727954b31da6f79e9e1a8ef3 | fbb2ea8fde5037e3ed81cd4e2be912f157fda87c | /test/model/acompanhanteanunciotipo.py | 31ba1de2379d1ee5e37a9441684577ecb3e9a831 | [
"MIT"
] | permissive | robertons/dbmodel | d7c491c8d3a572fca5559ab9c3bb9f5ac5a77aca | 628c4d6a2d0b23d9137015e5b0ea4551b20943bd | refs/heads/master | 2021-06-25T13:12:33.914469 | 2021-03-16T16:02:08 | 2021-03-16T16:02:08 | 215,111,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,236 | py | acompanhanteanunciotipo.py | #-*- coding: utf-8 -*-
from dbmodel.entity import *
class AcompanhanteAnuncioTipo(Entity):
__primary_key__ = ['id']
# FIELDS
@Int(pk=True, auto_increment=True, not_null=True, precision = 10, scale=0)
def id(self): pass
@Int(fk=True, not_null=True, precision = 10, scale=0)
def id_servico(self): pass
@String... |
1d4ff913186e839c84427d51451a50fc0b92b13f | a6123dc4260f7a68a72189950e66799f162755cd | /codes/bruteForceKnapsack.py | 538519939d27fac6995e66f953250e8dd5161a1a | [] | no_license | ms03831/algorithmicAnalysisProject | f35479a8b5366efa705afbed338fce511f91635a | 0a84ce276d9a2225cfb8d2663c09c4509ec49da3 | refs/heads/master | 2020-08-02T22:36:57.400955 | 2020-06-02T09:58:32 | 2020-06-02T09:58:32 | 211,528,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | bruteForceKnapsack.py | import sys
from myMemory import *
def powerset(items):
result = [[]]
Memory.updateMemory(len(items))
for item in items:
newset = [r+[item]for r in result]
result.extend(newset)
Memory.updateMemory(len(result))
Memory.updateMemory(len(newset))
... |
7d707bbc2fc243af9dcd1d34a81e06de64fbeee8 | 1a771ed1f3c72a8abba9834fe25deb5b2cc33a3e | /Occluder.py | f9fd64b9c417ee5c68856a87acbfccd5d717ca38 | [] | no_license | Attatekjir/OSRS-Python-Renderer | 717c7b75b4942fa60933f89468103aa44e90a74e | 4655751de99e164fa3acb05dcca8667e46a6ec1a | refs/heads/main | 2023-07-29T17:29:23.059681 | 2021-09-12T12:30:36 | 2021-09-12T12:30:36 | 403,677,781 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | Occluder.py | from numba import int32, float32, boolean, short, int64
from numba.experimental import jitclass
@jitclass()
class Occluder:
minTileX : int32
maxTIleX : int32
minTileZ : int32
maxTileZ : int32
type : int32
minX : int32
maxX : int32
minZ : int32
maxZ : int32
minY : int32
maxY... |
46d6f5c3cad4d36cb4ef847c2c8a70d47ba42651 | a2c1b2b0fa9af6adf317e3018ef55ba84c2966e8 | /Chapter05/MySharedObject.py | bd6951bae24b214add511d24560ff3a9c3ee61c7 | [] | no_license | huozhiwei/PyQt5_RapidDevolpment | e720ed3f9a6ddd26fd1b211510554f17551e5076 | 53efad8c1fd47cf7cb71188b170a1d0d92cc8515 | refs/heads/master | 2020-06-03T10:13:16.785467 | 2019-06-12T10:09:48 | 2019-06-12T10:09:48 | 191,532,594 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | MySharedObject.py | # -*- coding: utf-8 -*-
from PyQt5.QtCore import QObject
from PyQt5.QtCore import pyqtProperty
from PyQt5.QtWidgets import QWidget,QMessageBox
class MySharedObject(QWidget):
def __init__( self):
super( MySharedObject, self).__init__()
def _getStrValue( self):
#
return '100' ... |
f535a4d2618816a3921b82ef1b41448626d61ca7 | ba2d31cd471d1c50ed952c1620ef4328dee9d6ed | /pastebin/apps.py | b76a8abed1370aacde6c60fe40d1d63fe64e7ea3 | [] | no_license | skyride/capritools3 | 7aa0289dc41cfc6fb40c3e80a34e869dbf7b11b7 | e3444a781d2fb46969ae5d6546f2b0a5db527e21 | refs/heads/master | 2023-06-01T02:55:54.275424 | 2020-06-15T18:52:12 | 2020-06-15T18:52:12 | 174,607,409 | 1 | 1 | null | 2023-05-22T23:19:38 | 2019-03-08T20:49:23 | Python | UTF-8 | Python | false | false | 228 | py | apps.py | from django.apps import AppConfig
from core.navigation import navigation_controller
class PastebinConfig(AppConfig):
name = 'pastebin'
def ready(self):
navigation_controller.add("Pastebin", "pastebin:submit") |
9b529f48be1db00b12701be366841b018f101a8a | 5f16bb80f47bef953026ce4ac905467b7c87bb1b | /lesson6/6-posts1/posts1.py | 2c95910a47f2eef56fdc445e799d17592245e384 | [
"Apache-2.0"
] | permissive | lucasca95/harvard_flask_python_course | b48c082534930d4c13db23dc22230b9628effa22 | 76ac51ae6f6b5f5e7460c9c9c40d0c1be52779e1 | refs/heads/master | 2022-12-31T08:46:25.593447 | 2020-10-17T22:36:15 | 2020-10-17T22:36:15 | 254,966,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 674 | py | posts1.py | import time
from flask import Flask, render_template, jsonify, request
app = Flask(__name__)
app.config['ENV'] = 'development'
app.config['DEBUG'] = True
@app.route('/')
def index():
return render_template('index.html')
@app.route('/posts', methods=['POST'])
def posts():
start = int(request.form.get('start'... |
84363dd41ecb5121baa0ebae4c1b9d2b04b8f202 | 2bc22e3fa1d960d25155cf8b3ff2b47c91a57114 | /proxytest.py | 7943c42b4987eb0113690c39a541334c14210e97 | [] | no_license | Leibnizhu/IPProxys | 194ae2fb1e1e93fdc6b8f37499298026ad086ede | ad9cae6b4cab68ba218df6e3d720e8bac77081d5 | refs/heads/master | 2020-06-20T22:17:46.345378 | 2017-01-24T01:56:39 | 2017-01-24T01:56:39 | 74,818,090 | 2 | 0 | null | 2016-11-26T10:05:17 | 2016-11-26T10:05:17 | null | UTF-8 | Python | false | false | 339 | py | proxytest.py | #coding:utf-8
import requests
import json
import sys
ip = sys.argv[1]
port = sys.argv[2]
header ={'Proxy-Connection':'Keep-Alive'}
proxies={
'http':'http://%s:%s'%(ip,port),
'https':'http://%s:%s'%(ip,port)
}
r = requests.get('http://www.turing.click/test/index.htm',proxies=proxies,headers=header)
r.encoding='u... |
0df30ea87cf10cbd13e98be30b75d3766ab11b0c | 200961dbd5349bc14b5bb19d6de062b9b6387b03 | /Example/Gutenkunst2007/Zwolak_2005/Nets.py | a0bd27c997ab6d078aef59dd83c6acd7c17b7e58 | [
"BSD-3-Clause"
] | permissive | GutenkunstLab/SloppyCell | 9f60ebb24a00b97358ceca492c2654f99c9b0a2c | 9aa3382eacac66cc06d6137340e4cb6c66a3d1bb | refs/heads/master | 2023-07-21T03:54:24.014098 | 2022-04-19T21:09:23 | 2022-04-19T21:09:23 | 102,897,736 | 3 | 3 | BSD-3-Clause | 2023-07-06T22:52:15 | 2017-09-08T19:34:30 | Python | UTF-8 | Python | false | false | 2,435 | py | Nets.py | from SloppyCell.ReactionNetworks import *
net = Network('frog_cell')
net.add_compartment('cell')
net.add_species('M', 'cell', 0.0)
net.add_rate_rule('M', '(v_dp*(1-D) + v_dpp*D)*(C_T - M) - (v_wp*(1-W) + v_wpp*W)*M')
net.add_species('D', 'cell', 0.0)
#net.add_rate_rule('D', 'v_d*(M*(1-D)/(K_md/mu + (1-D)) - rho_d*D/(... |
dbc4bdda6df55574acabecafcc5a2a4d80c15f96 | cc2d9715ba55d47688828b9315979db4c4c4b2b4 | /permute1.py | ec6aae4fbc5a0e6799057a5244749090be99cd5b | [] | no_license | lierfengmei/pyworks | e68872297ca0e83821fad8238fc374de1f5202e3 | 24aff26f1b753ead3815d34c0300275d082c152d | refs/heads/master | 2020-06-27T08:54:29.899049 | 2016-11-23T01:34:27 | 2016-11-23T01:34:27 | 74,526,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | permute1.py | # permute1.py
def permute(seq):
result = []
for a in seq:
for b in seq:
for c in seq:
for d in seq:
for e in seq:
if a!=b and a!=c and a!=d and a!=e and \
b!=c and b!=d and b!=e and \
c!=d and c!=e and d!=e:
result.append(''.join([a,b,c,d,e]))
return result
seq = list("56... |
c99f8954042a516c7df8f803ae38d16ce1a97b3d | f4937f53c01914885db5dd81e03b864c3c27713a | /astrosource/analyse.py | 5f075fefb14271d614be379a83751b6c00881ddb | [
"MIT"
] | permissive | JAlbertoGonzalez/astrosource | c4735a956079c13563df8b3081f5cb267037d527 | 8010cba8b958b491d368d6b9184967d5ad6075ca | refs/heads/master | 2023-01-15T20:09:42.679656 | 2020-11-04T09:37:43 | 2020-11-04T09:37:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,870 | py | analyse.py | from numpy import genfromtxt, savetxt, load, delete, asarray, multiply, log10, divide, \
less, append, add, std, average, median, inf, nan, isnan, nanstd, nanmean, array
import numpy as np
from astropy.units import degree
from astropy.coordinates import SkyCoord
import glob
import sys
from pathlib import Path
impo... |
618560ae760ae36da0c2c45774d30a50e72994bb | e65d74f927a6725cbebe3147ea7287ea0672d54b | /v3_/api/config.py | 9b26445fd0f855a3dc4dc3fd87c87e8022021c2a | [] | no_license | suiweifanchen/Amz-Order-System | 27b811d437a93c4af6c3005769a1230793477c1f | bb81cd07b4fe2af8fa508128ddb437749d562ca8 | refs/heads/master | 2020-03-28T07:58:29.125182 | 2018-09-09T15:43:06 | 2018-09-09T15:43:06 | 147,937,810 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,164 | py | config.py | # -*- coding: utf-8 -*-
"""
Created at: 18-4-23 上午7:47
@Author: Qian
"""
import re
import hmac
import base64
import hashlib
from .my_time import get_timestamp
# add the father dir into the path
import sys
sys.path.append('..')
from exceptions import *
"""
此文件是配置文件,包含向api发起请求所需要提供的信息
"""
amazon_time_format = '^[-... |
d08c13f3750b31a2d344ef1205cfcda1bfc8009d | 3da559998db591a59fd50745b18db08d4acd18d5 | /base/models/person.py | 90eba48ae97d23fcba416a396a728540ee493ad2 | [
"Apache-2.0"
] | permissive | basmot/futsal_management | 03a185419bb2fa1a0a525477d0bc297105d4603f | c9e174cfc25977bf249647c7f00fc7ce83d8748b | refs/heads/master | 2021-01-10T14:03:32.340356 | 2016-04-02T15:06:03 | 2016-04-02T15:06:03 | 55,075,634 | 0 | 0 | null | 2016-04-02T15:06:03 | 2016-03-30T15:41:15 | Python | UTF-8 | Python | false | false | 2,722 | py | person.py | ##############################################################################
#
# Copyright 2015-2016 Bastien Mottiaux
#
# 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.apac... |
fe70ced90cd4fd50baf4e17aaf5603d3dae7e0b7 | c43a682cbdf4f8eeb63761b57017c3a37bca9067 | /flt_geom_ui_v2/mainwindow.py | 60725fd62402fd91c8b04481b315eb0484d3efef | [
"CC0-1.0"
] | permissive | TorbenTreffeisen/FaultGeomPy_v2 | b14d128e30f897fbb77336f92b83fc683ffe3d03 | 924fd4f7eb1744335d91ef89549e2c02752567ab | refs/heads/main | 2023-03-18T10:41:20.680454 | 2021-03-01T10:06:46 | 2021-03-01T10:06:46 | 334,091,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 28,873 | py | mainwindow.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'flt_geom_ui_v2\mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, Mai... |
0eb337339b1848823f1850c01631f498adcf68ca | 678f3de123cbe3fe951cf4d8c0dffc1e7fbdc716 | /core/models/UNet_torch_like_keras.py | 8f4561108d9e4630d4d810e34a6b93b0f166c069 | [] | no_license | cdesio/leaf_reco | 3c43455fc691d78f0b3e072a314d03b6e8ea9efe | 9581e30e823eab3deb0ee6b08b2f5cb8df7cb631 | refs/heads/master | 2020-04-24T02:51:44.043139 | 2020-03-31T10:57:42 | 2020-03-31T10:57:42 | 171,651,946 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,969 | py | UNet_torch_like_keras.py | import torch
import torch.nn as nn
def double_conv(in_channels, out_channels):
conv_block = nn.Sequential(nn.Conv2d(in_channels, out_channels, 3, padding=1),
nn.ReLU(inplace=True),
nn.Conv2d(out_channels, out_channels, 3, padding=1),
... |
baf9c048bb0625474e7c60340656dc68a0321c57 | a34ec07c3464369a88e68c9006fa1115f5b61e5f | /I_Searching/DFS/Tree/L0_117_Populating_Next_Right_Pointers_in_Each_Node_II.py | fedb7ddd79d9675206af0fbc6c23dce53819c791 | [] | no_license | 824zzy/Leetcode | 9220f2fb13e03d601d2b471b5cfa0c2364dbdf41 | 93b7f4448a366a709214c271a570c3399f5fc4d3 | refs/heads/master | 2023-06-27T02:53:51.812177 | 2023-06-16T16:25:39 | 2023-06-16T16:25:39 | 69,733,624 | 14 | 3 | null | 2022-05-25T06:48:38 | 2016-10-01T10:56:07 | Python | UTF-8 | Python | false | false | 601 | py | L0_117_Populating_Next_Right_Pointers_in_Each_Node_II.py | """ https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/
1. apply level order traversal using dfs and hash table
2. assign next node level by level
"""
class Solution:
def connect(self, root: 'Node') -> 'Node':
T = defaultdict(list)
def dfs(node, i):
if ... |
d4ac7405c091bfdeae8fb73a8b873310808fa71e | 323caaa8cbbe2b8d3cf3ae433d273a92457e61f7 | /10,tf.keras搭建神经网络/model.fit&&model.summary.py | 3604e0864870cfa0d93ffe338f0a62d10fff6603 | [] | no_license | 1414003104/OldSheep_TensorFLow2.0_note | 04e8b23d087295e18db829224cfad4999471012a | 9c0241c01908c9df347d243420d84b292304c20d | refs/heads/main | 2023-08-02T10:32:36.768385 | 2021-09-18T10:08:50 | 2021-09-18T10:08:50 | 407,482,324 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | model.fit&&model.summary.py | '''
model.fit(训练集的输入特征,训练集的标签,
batch_size=,epoch=,
validation_data=(测试集的输入特征,测试集的标签),
validation_split=从训练集划分多少比例给测试机,
validation_freq=多少次epoch测试一次)
'''
'''
model.summary()
可以打印出网络的结构和参数统计
''' |