blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | repo_name stringlengths 7 96 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 58
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 12.7k 662M ⌀ | star_events_count int64 0 35.5k | fork_events_count int64 0 20.6k | gha_license_id stringclasses 11
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 43
values | src_encoding stringclasses 9
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 7 5.88M | extension stringclasses 30
values | content stringlengths 7 5.88M | authors listlengths 1 1 | author stringlengths 0 73 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
09aa0e6424b150ea73e45f68fb4e799e0261c80c | f7ff5c9cb8693e8a06841eaddff8c1d3ab898ad9 | /testing.py | 75222f05e7ec4a5c684f4f21b5e0f08a58e94fac | [] | no_license | cro1100/sqlalchemy-challenge | c067fadc91f8f6a781e1cb49e906913934c70256 | 860c1ac4870c6d7f7ed37ac4b04e16413f8c66ec | refs/heads/main | 2023-01-28T14:34:59.092250 | 2020-12-02T22:57:28 | 2020-12-02T22:57:28 | 310,405,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,827 | py | #!/usr/bin/env python
# coding: utf-8
# get_ipython().run_line_magic('matplotlib', 'inline')
from matplotlib import style
style.use('fivethirtyeight')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import datetime as dt
# # Reflect Tables into SQLAlchemy ORM
# Python SQL toolkit and Object ... | [
"charlesro1@gmail.com"
] | charlesro1@gmail.com |
415f38765388035c4444c139c8ef46f53a74dc5d | 2f545a9c55611d35b061c999f924b4bdb6fb8f20 | /Analysing_twitter/Downloading_tweets.py | 3652083f3c9cb32c141098d462bb18e726bb393e | [] | no_license | ConstanceSL/vigilant-octo-memory | 2049ab79be0e1616bd1d206bc547610d8b330c26 | c6bc431eeb81e5f7dd7573ceedfbe041476c1769 | refs/heads/master | 2020-03-17T19:00:39.023972 | 2018-09-04T09:48:54 | 2018-09-04T09:48:54 | 133,842,840 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,842 | py | import tweepy
import pandas as pd
import datetime
import os
import numpy as np
# Importing the keys for the twitter API
keys = pd.read_csv('/Users/Constance/keys/twitter_keys.csv', index_col=0)
consumer_key = keys.loc['consumer_key'][0]
consumer_secret = keys.loc['consumer_secret'][0]
access_token = keys.loc['access_... | [
"c.desaintlaurent@gmail.com"
] | c.desaintlaurent@gmail.com |
265ebd4b01c92572c56ef4f7bfd68a340da1ad7b | 1f67e01617c2893fd0f33b057a1a80b70976f489 | /chapter2/get_cntour.py | fa8800cdec1c1c1c88319931799c4dca08e0754c | [] | no_license | yxl1761274146/studyssh | 0f60d82faa914882329c2b162c100aa43002f58f | cc8c66719a251062939174ac831b622d48617443 | refs/heads/master | 2022-04-28T10:01:00.511832 | 2020-04-24T08:13:15 | 2020-04-24T08:13:15 | 257,182,160 | 0 | 2 | null | 2020-04-20T08:11:40 | 2020-04-20T05:38:40 | HTML | UTF-8 | Python | false | false | 91 | py | import requests
url="http://www.centor.cn"
response=requests.get(url)
print(response.text) | [
"1761274146@qq.com"
] | 1761274146@qq.com |
77f896b78bdca51ae020b151b70c96935c627d4c | 9ebc24d199d0031ba290001bdbfdebc969ecd8a9 | /api.py | 4295ff9603156e7ecd21e228f7608265bf75e704 | [] | no_license | SorakaMafaka/Riot_API | 0074b549f9d0ed917e35b29040aa4958e65fee13 | 9fdec116f28ea260b35c4eb8f4d1c286d1f99662 | refs/heads/master | 2023-03-06T00:26:58.423914 | 2021-02-24T16:10:05 | 2021-02-24T16:10:05 | 341,957,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,485 | py | # SοrakaMafaka
# API-Key: API
from riotwatcher import LolWatcher, ApiError
import pandas as pd
import cv2
# Global vars
api_key = 'API KEY'
watcher = LolWatcher(api_key)
my_region = 'eun1'
region = 'eune'
# Check league's latest version
latest = watcher.data_dragon.versions_for_region(region)['n']['champion']
# Cham... | [
"chomikmaster10@wp.pl"
] | chomikmaster10@wp.pl |
faf3d095d3cc4af042fe18427706194245f0b483 | 83e45f7177a29cfc39a4eff83f9b83aebdf78048 | /test/frequency/test_calculate.py | e931305a22795da8a9ad5b207bb9630ce36d3a18 | [
"Apache-2.0"
] | permissive | UCL/twitter-user-fetch | f9c8ca641c5dfd7d37a8a6286773247d02f8443c | 1677e4468ebc083046c641568b9770cb650d18a9 | refs/heads/master | 2021-07-14T18:43:56.383991 | 2017-10-20T08:28:52 | 2017-10-20T08:28:52 | 107,196,137 | 0 | 0 | null | 2017-10-20T08:28:53 | 2017-10-17T00:05:49 | Python | UTF-8 | Python | false | false | 1,643 | py | from app.frequency import calculate
import unittest
class TestCalculate(unittest.TestCase):
dl = [
['Tue Sep 19 11:53:24 +0000 2017', '#alltestsmatter1'],
['Thu Sep 21 11:53:24 +0000 2017', '#alltestsmatter2'],
['Thu Oct 19 11:53:24 +0000 2017', '#alltestsmatter1'],
['Thu Oct 19 1... | [
"d.guzman@ucl.ac.uk"
] | d.guzman@ucl.ac.uk |
6bfb52aa9f932793c3fb1ce5394829309aab7d4e | 169d809f45dedcaa3c7b1b49912d8b025abe18d9 | /challenge251_easy_re.py | 516f39b9767f732d8d695bcffd712a849d351e4d | [] | no_license | bermec/challenges | 8a82d1d38d1ed1a0fc3f258443bc0054efc977a6 | 9fb092f20f12b4eaa808e758f00f482a49346c88 | refs/heads/master | 2021-10-08T05:05:56.803332 | 2018-12-08T00:20:20 | 2018-12-08T00:20:20 | 109,448,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,324 | py | '''
Nonograms, also known as Hanjie, Picross or Griddlers, are picture logic puzzles in
which cells in a grid must be colored or left blank according to numbers at the
side of the grid to reveal a hidden picture. In this puzzle type, the numbers are a
form of discrete tomography that measures how many u... | [
"rog@pynguins.com"
] | rog@pynguins.com |
8b7072d1ba5a4ede933dd01a2384c3eaf6b82838 | cbc41d6251f6cd9ddf802046d73f67f01baabf48 | /tp0/copia_jimmy.py | 2f958d68e8ccc14c85e1f0703bf8fcc671bffbe7 | [] | no_license | jimsrc/bio16 | cf004bd9413372214a567ab3abb6b82d52e2492c | a3f5452c9b133fbc3f7e2ba32d979a8dd2b01931 | refs/heads/master | 2020-08-04T20:14:34.420227 | 2016-08-25T20:59:46 | 2016-08-25T20:59:46 | 66,593,826 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | import numpy as np
import codecs
import igraph
import pandas as pd
u = open(1, 'w', encoding='utf-8', closefd=False)
data = pd.read_csv("lista_curso.csv",encoding='utf-8')
data = data.replace(np.nan,0)
names_data = data.drop(data.columns[range(14)] ,axis=1)
print(names_data.columns,file=u)
print(names_data,file=u)... | [
"raulonco@gmail.com"
] | raulonco@gmail.com |
219150b5a382ba176958a98fcb77fe773104e5fa | 53a262d3db0d5540991bd042e883b78fe8c87a05 | /gis_rest_project/urls.py | d5a9c7ea79431819515bf284e8f0b21e19d6dc0c | [] | no_license | davy254/gis_rest_project | 42e40f79439b6b966562fb8461ba00f136d53d17 | 049cd40975a09a92cbef1ab031136f0f5d1dca8f | refs/heads/master | 2022-12-14T17:31:56.083232 | 2020-09-10T12:08:54 | 2020-09-10T12:08:54 | 295,836,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | """gis_rest_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cl... | [
"davidmunyiri2@gmail.com"
] | davidmunyiri2@gmail.com |
d34431680d74d350cfa028cb5ffe34f5d8fada99 | dfce9280c3299bacae9563a3837519d1d23c2a5a | /chap13_files/item05_see_matrix.py | e76d6c77ac189e620ae263a097098bc561616d27 | [] | no_license | DemianLuna/python-01-basics-2020-course | bda5b8efc7da54b1af7b27c549e7b6e7c70eba33 | e499eb8e3cfc644dea175baaada7c923cc18739c | refs/heads/master | 2022-12-22T19:16:05.809925 | 2020-09-26T18:34:04 | 2020-09-26T18:34:04 | 294,977,293 | 0 | 0 | null | 2020-09-12T16:01:14 | 2020-09-12T16:01:13 | null | UTF-8 | Python | false | false | 690 | py | """
Before start, go to the following direcction
- [First 10 years of Google stock](https://goo.gl/3zaUlD)
Download de csv file and renamed to google_stock_data.csv
After that copy the header and the first 5 records and create the file google_stock_data_mini.csv
"""
from colorama import Fore, Style, init
import pl... | [
"polo.de.esparta@gmail.com"
] | polo.de.esparta@gmail.com |
94bed5381ed0ed656b517ee6a6c890226eb4ca73 | 4537fb9c826c9cf67f1774300d5bf235f6992360 | /Solutions/0042/Q_0042.py | 344a43e6d0877cc20828777b687b119ad252f4d7 | [] | no_license | Conzpite/ProjectEuler | 1270300bc3f9dfe321fa7ade8342124a49d3b475 | c21f401effc26dd74ad23913f5e85355c6810ba9 | refs/heads/master | 2022-11-23T16:52:54.507136 | 2020-07-19T13:44:34 | 2020-07-19T13:44:34 | 277,668,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | import math
#Return highest value for comparison
def AddTriangleNumber(numSet, n):
value = n * (n+1) // 2
numSet.add(value)
return value
#Set up triangle numbers by preloading some numbers
currN = 1
largestValue = 0
numSet = set()
for i in range(20):
largestValue = AddTriangleNumber(numSet, currN)
... | [
"mtszenson@gmail.com"
] | mtszenson@gmail.com |
4db72792a3d7ae6431c64ea43c349511e7c74b70 | 3ac98e9354f761927732d75f096a27334a7f2d6a | /superbench/benchmarks/return_code.py | 74739d2b761aa05e71ea86652089e4f27b9e0824 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | santakd/superbenchmark | e8a3ac900853e2fb75b76efa3088fc7bf877032a | 2299d238dd52e8da1142f59673b4e8c35134b123 | refs/heads/main | 2023-04-09T16:54:14.552150 | 2021-04-21T03:58:55 | 2021-04-21T03:58:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""A module for statuses of benchmarks."""
from superbench.benchmarks.context import Enum
class ReturnCode(Enum):
"""The Enum class representing benchmark status."""
# Common return codes.
SUCCESS = 0
INVALID_ARGUMENT = 1
I... | [
"noreply@github.com"
] | noreply@github.com |
905cdae5fb8ee9fa03abad70fc7fb8b91b627ae6 | 720a8ffc5807d3d02a4c9f2d3c18f79fa7f66c45 | /baseTest/reptile/pic_Test.py | 04ea47a70048406c55e9c10ad658bc076de2fc88 | [] | no_license | tbgdwjgit/python3 | 8123f87753b2469256843cf3257d0dc11744712a | ef7f54e492c73cf1e5533857b126fdd4eb1d8ca2 | refs/heads/master | 2021-04-06T00:36:31.333267 | 2019-09-16T08:07:49 | 2019-09-16T08:07:49 | 125,023,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,247 | py | __author__ = 'Test-YLL'
# coding:utf-8
'''
reptile
英[ˈreptaɪl]
美[ˈrɛptɪl, -ˌtaɪl]
n. 爬行动物; 卑鄙的人;
adj.爬虫类的; 卑鄙的;
[例句]Is not a reptile but a mammal.
并不是爬虫动物,而是哺乳动物。
'''
import re
import urllib.request
'''京东手机图 '''
'''
def craw(url,page):
html1=urllib.request.urlopen(url).read()
html1=str(html1)
pat... | [
"17049185@qq.com"
] | 17049185@qq.com |
29048e5c0449e12f3b2de6b9c46ec9062e2cf697 | 13a624bd01fa7bac79be91f1ea5a5d4ba006e3d3 | /bioinfo_python/029.py | 867939cbdb72bea33f509d57fcec7c0bf67da5ce | [] | no_license | KennethJHan/bioinfo-lecture-2107 | 3ab1800aef5e5f62a51ef07629fc84d1711c7c23 | 4a08814a6a7ccae4b9d81d9f5ad485399ddd9498 | refs/heads/main | 2023-06-24T18:46:46.026166 | 2021-07-30T11:04:39 | 2021-07-30T11:04:39 | 389,945,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 72 | py |
Seq1 = "ATGTTATAG"
res = "C" in Seq1
print(res)
print("A" in Seq1)
| [
"kenneth.jh.han@gmail.com"
] | kenneth.jh.han@gmail.com |
8c059f5fb4903b8a5dab179210a0124b5dce14af | 1fbeb08c86243de89fa3c855ae79959f421b8581 | /movie_db.py | 879bbfa9b8e082af6d3e71ec398c2eff51e6fe8e | [] | no_license | SYAN83/movie_review_analysis | e7fb14c804d9645b2109beabae05b12201c7a497 | 3577774bf533a75823ddf7f57278eed5c451f073 | refs/heads/master | 2021-06-06T01:28:50.134251 | 2015-06-26T18:32:12 | 2015-06-26T18:32:12 | 38,014,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,382 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 15:39:07 2015
@author: Shu-Macbook
"""
import movie_review as mr
import pandas as pd
import sqlite3
#movie_list = ["Inception","Interstellar 2014","Mad Max: Fury Road",\
# "WALL.E","PK","Eternal Sunshine of the Spotless Mind"]
#movie_list = ["Its Such ... | [
"yanshu.usc@gmail.com"
] | yanshu.usc@gmail.com |
b7c4e916e1f6d81465c6f830d753a881a0a6b7e7 | ad3e18b7c0045141dbed62e91419f3e126153f41 | /TodoAPI/UserDetails/migrations/0002_auto_20210803_0114.py | 4623c94912659a051917b9408031d23604541624 | [] | no_license | Kakashi-23/TodoAppApi | 5b58d82447e7434890c7d2f44799c9eb254446e4 | 4449325cbb99e5e17864cc3651eeaff94310465e | refs/heads/main | 2023-07-11T00:31:12.107327 | 2021-08-15T20:39:41 | 2021-08-15T20:39:41 | 396,438,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | # Generated by Django 3.2.5 on 2021-08-02 19:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('UserDetails', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='tododetails',
name='title',
... | [
"64219152+Kakashi-23@users.noreply.github.com"
] | 64219152+Kakashi-23@users.noreply.github.com |
7cfcfacde49b160679ab8f0831c59b01fccd91aa | 1cb793903eac98d5ce8a7502ccf972f954dfc9c5 | /HouseEstimator/admin.py | 88396faf6fd8c0ab2d0d14dbcb1ccf68e99ee798 | [] | no_license | incognitoSE/backend | 8af21868d1df801fec25f9f108bfc18e51274ee9 | 4f7002dc68e6c0cb6c0459b8ab6b007017eedeb8 | refs/heads/master | 2023-06-12T09:24:49.767586 | 2021-07-03T23:27:04 | 2021-07-03T23:27:04 | 360,358,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | from django.contrib import admin
from .models import House
admin.site.register(House)
| [
"ehsanjalali353@mehr.ui.ac.ir"
] | ehsanjalali353@mehr.ui.ac.ir |
ad7566b72ea8423788389fb72979e95b2a81b0b3 | 156f5b9dd349522e94bb2b0822b867ba092d93f3 | /hash_generator.py | 174429325e89313461b76aff80bc022527c32201 | [] | no_license | ashfrol/py31_classes | 85e64585502ac776d0712e87d23024856621484c | e8452c3c6c5a49667b8536d033d6fcf813712097 | refs/heads/master | 2022-11-13T01:47:45.305226 | 2020-07-12T18:06:22 | 2020-07-12T18:06:22 | 266,164,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | from hashlib import md5
from os.path import join
def hash_strings_from_file(filepath):
with open(filepath, 'r', encoding='utf-8') as file_read:
for line in file_read:
hashed_line = md5(line.encode()).hexdigest()
yield hashed_line
for item in hash_strings_from_file('output/country... | [
"darya.frolova@rt.ru"
] | darya.frolova@rt.ru |
fe1882007038df7d006b3525c72f65d8fb6f1eac | cfb37a99d374d31dbf626dcab69ff1aff5ed6e44 | /app-engine-twitter/responses.py | d9b50932173491fd0bf53cdcbaef9d684c54bc69 | [] | no_license | nicolavic98/twittershade | 73f8ff919d33e17d12690161465e641c80db8f10 | c17923b6ffd2a63ae65121bf0b2c3a09d19b00d9 | refs/heads/master | 2021-01-01T20:44:57.502032 | 2017-08-04T15:39:45 | 2017-08-04T15:39:45 | 98,925,357 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py |
below10k = ["TP someone's house", "Go to an abandoned warehouse", "Take a shower while wearing all your clothes", "Eat a raw egg", "Take a bite out of a bar of soap", "Give a hug to a random stranger"]
tenKto25K = ["Slap the person next to you", "Inhale Sour Patch Kids sugar", "Order 100 pizzas and send them to you... | [
"css@CSSs-MacBook-Air.local"
] | css@CSSs-MacBook-Air.local |
a8c959d8e9f329313bd71de766b856523a873d00 | 28239578bb6bfa6c2d930ceb758a2d5ad6f96dbd | /app/models/transaction_output.py | eda00e41e71edcb20e5c02aecf6da7e7cf94b818 | [] | no_license | YuitoSato/buidle-chain | 43037601632a65acd7754fff69592a2beeb420d6 | 570b8c3414e496ea9da48c4ac7a08d56613c14a5 | refs/heads/master | 2020-04-17T12:15:59.243594 | 2019-01-22T11:37:14 | 2019-01-22T11:37:14 | 166,573,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,845 | py | import hashlib
import uuid
from functools import reduce
from operator import add
from app.models.exceptions.not_enough_balance_exception import NotEnoughBalanceException
from app.models.transaction_input import TransactionInput
from app.utils.constants import COINBASE_ADDRESS
from Crypto.Cipher import PKCS1_OAEP
from ... | [
"yuitosato.w@gmail.com"
] | yuitosato.w@gmail.com |
c96eae7c3f8bdf6cadee7eb9455b092a1192d4c4 | 65052e95e1e48dffa143abd8d0e0181658ed5752 | /TeamUPLIFTCA/morenews.py | 26f739aa2caedb8a90d15edc88519c903a78fe5c | [] | no_license | mkm1088/Positive-News-Finder | f3c2708a0fded0d5e0b166a0f51fd4ab7e3aa9dc | c89eadd6774881219578456bd6a056d21709fdcf | refs/heads/master | 2020-04-21T08:01:47.231887 | 2019-02-06T13:22:13 | 2019-02-06T13:22:13 | 169,407,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py | import requests
#from urllib3.request import urlopen
from bs4 import BeautifulSoup as soup
from selenium import webdriver
from bs4 import BeautifulSoup as BS
import re
def newsFromCNBC():
main_url = "https://newsapi.org/v2/top-headlines?sources=the-hindu&apiKey=***************"
open_cnbc_page = requests... | [
"noreply@github.com"
] | noreply@github.com |
07f746e0a6c9a0546c3d7a88aa78518545bbb39e | 81f22c3c76e9136c27915ebb1b05b5cc8e539156 | /hebChatbot/States.py | 086b1a7a59dc934490fed318a3b5e6e4bddc78fc | [] | no_license | RnDteam/CCai | 9a4870d9a0a6d88a579ddadc271779d246af3cea | 8913edf078c9dea732578dbe3ca2d85e9a632d74 | refs/heads/master | 2021-01-11T17:59:28.500829 | 2017-02-20T11:31:11 | 2017-02-20T11:31:11 | 79,892,554 | 1 | 2 | null | 2017-02-14T10:09:10 | 2017-01-24T08:26:37 | HTML | UTF-8 | Python | false | false | 264 | py | from enum import Enum
class States(Enum):
EntityExtraction = 1
IntentRecognition = 2
ExecutingAction = 3
ActionDone = 4
@staticmethod
def is_edge_state(state):
return state == States.EntityExtraction or state == States.ActionDone
| [
"yarivgavriel2@gmail.com"
] | yarivgavriel2@gmail.com |
5b491aab07e6ef8e121b3f5e427d92718c934b8d | 0e7ac0061f2d6d81a12946476a767d0c63e17155 | /Define_Model/Pooling.py | 85168020c13d5c929bf58ef20bc455fa7ca6b03c | [
"MIT"
] | permissive | forwiat/SpeakerVerifiaction-pytorch | b80afe6cfdc8d7a350f064fc49781de586064d68 | feb8efe9b22a08f1995db02d77d022036d205573 | refs/heads/master | 2022-12-05T01:33:38.132016 | 2020-07-24T17:06:21 | 2020-07-24T17:06:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,291 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@Author: yangwenhao
@Contact: 874681044@qq.com
@Software: PyCharm
@File: Pooling.py
@Time: 2020/4/15 10:57 PM
@Overview:
"""
import torch
import torch.nn as nn
class SelfAttentionPooling(nn.Module):
def __init__(self, input_dim, hidden_dim):
super(SelfAttention... | [
"874681044@qq.com"
] | 874681044@qq.com |
f11d8a1d3dde20793f358024f72b265acdbb6630 | 308c7d5dd37ca24096081edea6f73e79ce089da4 | /51-100/84. 柱状图中最大的矩形.py | dae417f40d7fb2e5a16d31f1bbfb002823eabc5d | [] | no_license | fengges/leetcode | 4953ca038b085cdb772054fa1483bf816dccb578 | 5d592440b214024cad342c497b381dbce19d8a70 | refs/heads/master | 2022-09-18T17:52:49.525234 | 2022-09-03T08:45:07 | 2022-09-03T08:45:07 | 132,389,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 765 | py | class Solution:
def largestRectangleArea(self, heights):
res = 0
st=[]
heights.append(0)
i=0
while i<len(heights):
if len(st)==0 or heights[st[-1]] < heights[i]:
st.append(i)
i+=1
else:
cur = st[-1]
... | [
"1059387928@qq.com"
] | 1059387928@qq.com |
c355d00f358671006e580deed575d744d53a8a2f | b88be390d375277294dc958a29f1f35ec05c7783 | /player/migrations/0003_playersmodel.py | 6728bef9709d50a4c82dbb96a9e54a897ae3dfd6 | [] | no_license | rafaelcavasani/sort_my_team_new | 92ecadc33ae7dde43a6dc672ce05490a63599d6c | fe003a6bf250991d8faf0b533398bc1f2ec0c768 | refs/heads/master | 2021-09-23T03:53:49.862685 | 2020-02-09T22:35:22 | 2020-02-09T22:35:22 | 238,510,867 | 0 | 0 | null | 2021-09-22T18:31:42 | 2020-02-05T17:40:23 | Python | UTF-8 | Python | false | false | 628 | py | # Generated by Django 3.0.3 on 2020-02-05 16:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('player', '0002_teammodel'),
]
operations = [
migrations.CreateModel(
name='PlayersModel',
fields=[
(... | [
"rafael.cavsani@gmail.com"
] | rafael.cavsani@gmail.com |
12b9d50b32c934ec5bed1e7f3ddf7a6bed070236 | 0e3ee223395e74cc1c80445d2c3e7fc61b1d5216 | /networks/transformer/encoder.py | c12e2d219910b3a832224056f9cf924badc6f65d | [] | no_license | xduan7/DLTM | 2c757843a7f8d8fca499f44af56fd09f7c9eee1c | 36058ca72f4720005d324fcc400c6a805abf4753 | refs/heads/master | 2020-04-05T09:54:15.493338 | 2019-03-04T23:27:22 | 2019-03-04T23:27:22 | 156,780,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,201 | py | """
File Name: DLTM/encoder.py
Author: Xiaotian Duan (xduan7)
Email: xduan7@uchicago.edu
Date: 11/8/18
Python Version: 3.6.6
File Description:
"""
import torch.nn as nn
from networks.transformer.embedding import Embedding
from networks.tr... | [
"xduan7@gmail.com"
] | xduan7@gmail.com |
72399c862381921816e9e4b50b98d88fc69a7001 | 9a5094444b6b343c184367f5be902fb0663aa340 | /node_modules/gulp-sass/node_modules/node-sass/build/config.gypi | 21beeef653b37154ab0f63b37e0ce1d906a36f50 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sethwisniewski/agency-x | 5b37bca61f3750c6a45326d9ce0d2f0b271820e6 | 5e2a9ef2f2d26a5fcb1e4567a506dc4c29e086e8 | refs/heads/master | 2020-03-30T18:05:13.605262 | 2018-10-10T11:29:24 | 2018-10-10T11:29:24 | 151,482,775 | 0 | 0 | null | 2018-10-10T11:29:25 | 2018-10-03T21:28:11 | CSS | UTF-8 | Python | false | false | 4,640 | gypi | # Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"debug_http2"... | [
"shadiamalfoy@gmail.com"
] | shadiamalfoy@gmail.com |
b2b258726dadc8f9172d3f68557313f7379335ff | 8ea8c399175c3e00296365eb31f62e57913354ec | /venv/bin/pip3 | be8913c154dd52e16633ce12f7f00f6c85c88587 | [] | no_license | dfriveros11/Arquisoft | ec81bcb2b8dea9481ad4e53c26993623bff97666 | 9543352519e09bc96182730c2b4f950d3725ab1e | refs/heads/master | 2021-07-16T06:34:06.797412 | 2018-05-03T00:43:47 | 2018-05-03T00:43:47 | 131,207,721 | 0 | 1 | null | 2020-05-12T00:29:37 | 2018-04-26T20:33:45 | Python | UTF-8 | Python | false | false | 400 | #!/home/arcadia/IdeaProjects/Arquisoft/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==9.0.1','console_scripts','pip3'
__requires__ = 'pip==9.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.... | [
"df.riveros11@uniandes.edu.co"
] | df.riveros11@uniandes.edu.co | |
85c45e3b374f9d2207ceeb63ad4edc812bd52f9c | 6245f2a57c849b50bf3528020a1a44f49b6ce6ba | /scripts/avsb/visualize.py | 51104acb8b2c3ea9fc29d8399745835746c384e2 | [
"MIT"
] | permissive | nanlovescan/frg | 725222302311408326030fa280f2ad2ead5a2215 | e789439f599eb884a6220ae5b471cf610b0c2b2a | refs/heads/master | 2023-07-01T01:28:57.697151 | 2021-07-20T01:45:43 | 2021-07-20T01:45:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | '''显示结果'''
import numpy
from helpers.drawer import draw_heatmap
def main():
'''入口'''
lval = 5.20
rpath = 'heatmap8/avsb'
uval = numpy.load('{0}/{1:.2f}U.npy'.format(rpath, lval))
draw_heatmap(uval[0, 0, 0, 0, :, :, 0])
draw_heatmap(uval[1, 1, 1, 1, :, :, 0])
draw_heatmap(uval[1, 0, 0, 1, :... | [
"maryprimary@outlook.com"
] | maryprimary@outlook.com |
66a65c7bfb388fbad1a797acd3f5aa5a3f32735f | fe764f99cc4f75d70bb42a4bfcc06a26db026c45 | /solve.py | 0f9ce5a3a6179ebe911b58ca811e37c212456ce6 | [
"CC0-1.0"
] | permissive | atolopko/mastermind | a46a0ae59dedaffb095a6a8bd83ef50fe3c89c3c | 388aecac3d7cacaaca81a4004f55e4547277f8c7 | refs/heads/main | 2023-01-22T21:23:37.164087 | 2020-12-07T14:42:53 | 2020-12-07T14:42:53 | 319,185,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,967 | py | from random import randrange
import sys
import numpy as np
# code repr is 4-char string, with each color as digit 0-5
COLORS = 6
CODE_LEN = 4
MAX_CODES = COLORS ** CODE_LEN
ALL_CODES = [list(np.base_repr(code, 6).rjust(CODE_LEN, '0')) for code in range(0, MAX_CODES)]
def next_code_query(admissible_codes) -> list:
... | [
"atolopko@chanzuckerberg.com"
] | atolopko@chanzuckerberg.com |
0d4454aa7c7bb30c66477f6a76d147030978da18 | 7a48540ac332c51e2a7d9bbf8e06d20b8300945a | /detection/train.py | 17ff0ca5f443946f4affbe7ed30c9cf5a45423b6 | [] | no_license | Sophia-team/OCR-CARS-PLATES | 6ae29072f64bf9e9547e52a26b39da01d120c392 | 25594a40d1422880f4861583f0772c4d27fcf85b | refs/heads/master | 2022-11-15T13:11:01.599622 | 2020-07-10T10:54:06 | 2020-07-10T10:54:06 | 278,608,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,672 | py | import os
import sys
from argparse import ArgumentParser
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import tqdm
import torchvision
from dataset import DetectionDataset
from unet import UNet
from torch import optim
from torch.utils.data import DataLoader
from transform import ... | [
"pavel.burtovoy@phystech.edu"
] | pavel.burtovoy@phystech.edu |
478392f69605aa14e27129e23f3c8df664336ea2 | 2d82d4c6574bd6d32f2cf1c781615f7951f55f66 | /muntjac/addon/weelayout/wee_layout_application.py | 9fbb1c28bf11aa6d2409b487f217f9d1eff263f8 | [
"Apache-2.0"
] | permissive | metaperl/muntjac | f83f745ee03942a61af92ee7fba7285aa9c46f3c | 8db97712edd81b4d25deaaa48587d2a08010f2c8 | refs/heads/master | 2021-01-15T22:04:25.057862 | 2012-11-09T03:52:59 | 2012-11-09T03:52:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,183 | py |
from muntjac.api \
import Application, Window, VerticalLayout, HorizontalLayout, \
NativeButton, TextField, Alignment, Label
from muntjac.ui.button \
import IClickListener
from muntjac.addon.weelayout.wee_layout \
import WeeLayout, Direction
class WeelayoutApplication(Application):
def __init_... | [
"r.w.lincoln@gmail.com"
] | r.w.lincoln@gmail.com |
0e97feb704d3f04968e8895281546cf9d069744c | 275fc5b32727ba2ae9d4390d3222cb7544544203 | /evaluate/model_mlp.py | ea682ad27844995fa80177780b14cc9be44bb26a | [] | no_license | kpzhang/vec2link | 3ec1475eebd6df0b030864ecf0a914a14dac735c | fdda251c92871409a336d0c10f2c75e19f461673 | refs/heads/master | 2020-04-15T19:07:46.013229 | 2020-01-29T17:56:24 | 2020-01-29T17:56:24 | 164,939,188 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,293 | py | # coding: utf-8
import tensorflow as tf
import numpy as np
from sklearn.metrics import roc_auc_score
# run four_methods.py first
class Mlp:
def __init__(self, sess, inputs_data, outputs_data, test_inputs, test_labels, output_dim, lr=0.0001,
batch_size=128, run_time=100000, learning_rate_decay_fact... | [
"noreply@github.com"
] | noreply@github.com |
a35f7f17c325450fd3f72aa5da2507ce62d3fb68 | 96b44dc0df4cc0e9059da1c79d6d2468740939b1 | /downloads/code/LintCode/Majority-Number.py | ba5587fb3f949e0cfe40e3cac3fbbd45d26f9882 | [] | no_license | sdytlm/sdytlm.github.io | 5cb9fcc93fc5d2a287c4f0d1920ab83c34b3f68d | 0506ca9039db2ba253eb311c23b544d164c6bbda | refs/heads/master | 2021-01-24T11:08:54.257293 | 2019-05-06T03:59:17 | 2019-05-06T03:59:17 | 27,394,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | class Solution:
"""
@param nums: A list of integers
@return: The majority number
"""
def majorityNumber(self, nums):
# write your code here
hash_map = dict()
for i in nums:
if hash_map.has_key(i):
hash_map[i] += 1
else:
... | [
"minli@MindeMacBook-Pro.local"
] | minli@MindeMacBook-Pro.local |
f05fd839d4e468ea11af460eb32bff753a8f404c | 4fb44d59c82b15fdfd22c9c0a84490f1fb66a750 | /venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/configuration.py | bdf06a4759d29bbf3a0210b07bcb42fd11390022 | [] | no_license | thevirg/InvoiceProgram | 2e04d72a1c1e9f48f027ae6bbbd72289eb571d6a | 248464183bc65dcb9de99120c0e9279eb4fac8a5 | refs/heads/master | 2021-02-18T22:47:20.670377 | 2020-03-05T19:25:05 | 2020-03-05T19:25:05 | 245,246,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,247 | py | """Configuration management setup
Some terminology:
- name
As written in config files.
- value
Value associated with a name
- key
Name combined with it's section (section.name)
- variant
A single word describing where the configuration key-value pair came from
"""
import locale
import logging
import os
from ... | [
"kenglis8@uncc.edu"
] | kenglis8@uncc.edu |
532f1188a9ed5536a02984ae1bc71401b1cfc649 | c0cf737b53fa32e1c88a1b39a188ccc63c879fc9 | /day-02/day-02.py | 447cc166272e4d13f98da564e1903160f272fa94 | [] | no_license | aoutzen/advent-of-code | 5dd7af6e575fce923c10901e4a16e42b853fdfdc | 04f5ea70568d2ad517742489021985015f202ec5 | refs/heads/master | 2020-11-24T18:37:38.507845 | 2019-12-17T01:51:27 | 2019-12-17T01:51:27 | 228,294,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,566 | py | # --- Day 2: 1202 Program Alarm ---
# On the way to your gravity assist around the Moon, your ship computer beeps angrily about a
# "1202 program alarm". On the radio, an Elf is already explaining how to handle the situation:
# "Don't worry, that's perfectly norma--" The ship computer bursts into flames.
# You noti... | [
"saxoclone16@gmail.com"
] | saxoclone16@gmail.com |
3841c04c4a9890bd1483de5b35dec315e5f3f246 | 6cb5b4e56b727b98b234b04c519ec6f41b4e3701 | /Primary/Str/isAnagram.py | dcf67eca0ad025ad770b081c66bcf312fc93e12e | [] | no_license | doubleLLL3/Leetcode-Exercise-Codes | fd90b9addcad11412aacdfb577afbe481547624b | 190a85d59d16dee929ca025dafdee7747c5abc87 | refs/heads/master | 2022-08-28T18:17:05.716623 | 2020-06-01T06:52:41 | 2020-06-01T06:52:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,990 | py | def isAnagram(s, t):
'''
1.先使用长度作为第一条件筛选
2.用两个字典存储字符和出现次数
3.判断两个字典是否相同
'''
# if len(s) != len(t):
# return False
# dict_s = {}
# dict_t = {}
# for i in range(len(s)):
# dict_s[s[i]] = dict_s.get(s[i], 0) + 1
... | [
"44157339+liuzaozao7799@users.noreply.github.com"
] | 44157339+liuzaozao7799@users.noreply.github.com |
53de61303078f02960067e5d6cd8fc4046ef4b5c | 64ddafcdca09310c14582916dd82c35f2b7a431b | /privx_api/base.py | 9fa805ec642fa602354a597bbec2b4daed1f5e8f | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cnguyenc/privx-sdk-for-python | b6463ce09bfbf6b209c4957fd02baa52127542da | 8baf4fd2abe126b0c550558240fd26643206e076 | refs/heads/master | 2023-04-24T18:53:35.028170 | 2021-04-26T09:19:06 | 2021-04-26T09:19:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,448 | py | import base64
import http.client
import json
import ssl
import urllib.parse
import urllib.request
from typing import Union
from http.client import HTTPException
from privx_api.exceptions import InternalAPIException
from privx_api.enums import UrlEnum
def format_path_components(format_str: str, **kw) -> str:
comp... | [
"boogaloosurf@gmail.com"
] | boogaloosurf@gmail.com |
26ee7bcef0591e0555bd2838881e925565b67435 | 86d980c3ec7e4201454e229c1216b7a9be294d0a | /Quiz.py | 92e1e0350f410d4b4a9684b459d234981a4e5d21 | [] | no_license | rupalidhumne/Perceptrons-and-Decision-Trees | 3d3e57749f0119babc5d6661ae76f74a27ca2d97 | 8768554ba42c9811ea2469b93a2007e90d87e63b | refs/heads/master | 2021-09-01T12:47:50.993500 | 2017-12-27T03:01:20 | 2017-12-27T03:01:20 | 115,473,680 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,851 | py | global NumNodes
trains=[]
import csv
global CLASS_idx
testDS={}
trainDS={}
ds={}
import math
import random
global root
trainVals=set()
global headers
global headers2
totAccuracy=[]
nn=[]
#if I reach a question mark then count it as a no
class Node:
def __init__(self, state,parent, children, soln,freq,path): #state... | [
"rdhumne@Rupalis-MBP.home"
] | rdhumne@Rupalis-MBP.home |
c026df261b9fe18e1441c5ac0ff698fa9e98fbb0 | f3b233e5053e28fa95c549017bd75a30456eb50c | /p38a_input/L2U/2U-2Q_MD_NVT_rerun/set_1ns_equi_2.py | b3c77f65a18691de8b4767e75d70e78db63cc808 | [] | no_license | AnguseZhang/Input_TI | ddf2ed40ff1c0aa24eea3275b83d4d405b50b820 | 50ada0833890be9e261c967d00948f998313cb60 | refs/heads/master | 2021-05-25T15:02:38.858785 | 2020-02-18T16:57:04 | 2020-02-18T16:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | import os
dir = '/mnt/scratch/songlin3/run/p38a/L2U/MD_NVT_rerun/ti_one-step/2U_2Q/'
filesdir = dir + 'files/'
temp_equiin = filesdir + 'temp_equi_2.in'
temp_pbs = filesdir + 'temp_1ns_equi_2.pbs'
lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078]
for... | [
"songlin3@msu.edu"
] | songlin3@msu.edu |
9f29b589276529f8f51a0be792b49a3e6ed48456 | 7e3028dcfd18acd1f8268af56be08d4d9a8cf0c8 | /IniReader.py | 09a3848051af87fd88d77a9b8007543a8badc9d7 | [] | no_license | mbits-os/solver | 04299313f673296abf5512d9827f5dad979a5269 | 640c60b7ee86004e7ba2ccd3ff9cdb889c45d90a | refs/heads/master | 2021-01-23T19:38:02.340673 | 2014-03-13T12:01:43 | 2014-03-13T12:01:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,392 | py | from ConfigFile import \
PrintOut, PrintMessage, PrintError, PrintWarning, PrintExc, \
Location, Field, Section, FileContext, Macros
import sys, os, tempfile, shutil, getopt
from xml.parsers.expat import ParserCreate
from string import Formatter
kOpt = 0
kReq = 1
#list of well-known platforms, that will n... | [
"mzdun@midnightbits.com"
] | mzdun@midnightbits.com |
ac6e8a3c6bcc8819ec62e8ea30d218e242058332 | 0007122ec169c11037cf1007e822e02702317a5d | /ml/subprocess_wrapper.py | 466590be76abb5102d595ddb3cdab5ee4cbed26c | [] | no_license | themarzbar247/CCTV_Cam | aac442d60fd3fce2b947f81af9cef5097409ada6 | 099c1879a469e5355e9b63b147f7cbff737c6897 | refs/heads/main | 2023-06-01T05:22:47.192175 | 2021-06-23T13:58:50 | 2021-06-23T13:58:50 | 329,317,747 | 0 | 0 | null | 2021-06-23T13:58:51 | 2021-01-13T13:32:07 | Python | UTF-8 | Python | false | false | 3,669 | py | import subprocess
import sys
import pickle
from queue import Queue, Empty
from threading import Thread
from struct import Struct
ON_POSIX = 'posix' in sys.builtin_module_names
HEADER = Struct("!L")
def send(obj, file=sys.stdout.buffer):
"""Send a pickled message over the given channel."""
payload = pickle.... | [
"myles.puddephatt@bt.com"
] | myles.puddephatt@bt.com |
65e56979950079da89c6f081f7033b2c4a160d7a | 72368c0515f47cbea81413bad6b525eb8170f3d1 | /osbuild/mounts.py | 7f46b89cb76393f998229b80a27a422c9514c66f | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | teg/osbuild | 187bbcab1505b76eb3a5349fd4c2bdc048aba886 | 8bc4bff80c5d615a4ec5435f537d77e827bebbfa | refs/heads/main | 2022-06-01T05:50:05.051190 | 2021-11-19T08:50:15 | 2022-01-25T11:23:36 | 452,252,955 | 0 | 0 | Apache-2.0 | 2022-01-26T11:41:44 | 2022-01-26T11:41:43 | null | UTF-8 | Python | false | false | 4,174 | py | """
Mount Handling for pipeline stages
Allows stages to access file systems provided by devices.
This makes mount handling transparent to the stages, i.e.
the individual stages do not need any code for different
file system types and the underlying devices.
"""
import abc
import hashlib
import json
import os
import s... | [
"teg@jklm.no"
] | teg@jklm.no |
7bb8400b870908871347973d08509a7f99913fa8 | abb0b8c04bbb5a91fd50c6540a864de66e624ba9 | /Analysis/bec_rabi_flop_3state.py | 2088a04782010c315fb602c4fc77a26ef4b66cad | [] | no_license | anavaldesc/Chern | eb292ceda0ab99c11ac2c157766d863bd9b341f8 | b2985ca11a4309bc27b12e852aa1d77caaf5b650 | refs/heads/master | 2021-01-20T22:05:53.449553 | 2017-11-16T14:54:26 | 2017-11-16T14:54:26 | 101,799,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,147 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 5 17:39:08 2017
@author: banano
"""
import sys
sys.path.append('/Users/banano/databandit')
import numpy as np
import matplotlib.pyplot as plt
import h5py
import os
import pandas as pd
from fnmatch import fnmatch
import databandit as db
from scipy.sparse.linalg import exp... | [
"anavaldesc@gmail.com"
] | anavaldesc@gmail.com |
edd79dabbe37979eddc9265b68061e477fbc0a8f | de41c4ee70f0ff41c198794cd204b7025d745ce9 | /tests/test_repository.py | 1c0fcb979a475b5a0d773ffdb3cf868d99ded20c | [] | no_license | liluo/linguist | 30b6957ba3bc8f116a7500f2a0a7bfd32cd368cf | d65d34be638e7314f6f63d024f1c6cb940121f53 | refs/heads/master | 2021-01-16T00:57:48.797495 | 2013-11-19T15:35:49 | 2013-11-19T15:35:49 | 11,943,348 | 3 | 5 | null | 2013-11-19T15:09:30 | 2013-08-07T06:46:35 | Python | UTF-8 | Python | false | false | 893 | py | # -*- coding: utf-8 -*-
from pygments.lexers import find_lexer_class
from framework import LinguistTestBase, main, ROOT_DIR
from libs.repository import Repository
from libs.language import Language
class TestRepository(LinguistTestBase):
def repo(self, base_path):
return Repository.from_directory(base_pa... | [
"i@liluo.org"
] | i@liluo.org |
c8d12fe384351eefbc7005f84e44367ebb3c90b8 | 270537e8095d7e86ccf4c672d992d3c7c0dea339 | /build/20130906/UUBlog/UUBlog/core/ubasemodel.py | 78467082aa0c6640972cb7a95659c43f13140aa9 | [] | no_license | Missyliang1/UUBlog | 5d566045a28e4f03a97b473be106ecd9f2c4835d | db287da6de7acd970c431a5e417a89c6285d677a | refs/heads/master | 2021-01-18T07:40:42.032139 | 2013-09-18T05:54:06 | 2013-09-18T05:54:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | #-*- coding:utf-8 -*-
from django.db import models
class UBaseModel(models.Model):
class Meta:
abstract =True
def getModelResult(model,count=None,*orders,**wheres):
ret=model.objects.filter(**wheres)
for order in orders:
ret=ret.order_by(order)
if count:
... | [
"djangochina@sina.com"
] | djangochina@sina.com |
cc8fa5ed8c3057249d6ea406fc6e8a5ae4dc625d | abc2b1b09440de924792cb1b50594cc7fefd6d05 | /deployment_queue/views.py | 2a0157df00bf1107cb19edc8377df98de644efed | [] | no_license | SJSU272Spring2019/Project-Group-5 | 46e4642289d81ee5d46b7772d63d8f5a5a525375 | 48ee3457f8696524e7bd5e5ed5d68a52a7b2929c | refs/heads/master | 2020-04-25T19:34:16.965936 | 2019-05-12T04:42:15 | 2019-05-12T04:42:15 | 173,024,873 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,108 | py | from django.shortcuts import render
from deployment_detail.models import DeploymentDetail
from django.shortcuts import redirect
from authenticate.models import UserProfile
def deployment_queue(request):
if not request.user.is_authenticated:
user_message = "Please login to access the Training Management Sy... | [
"bradley.foy@sjsu.edu"
] | bradley.foy@sjsu.edu |
fb5c6da20a7f06bc3f7ae9e52b83c9776894e320 | 05bcba01ccadacdcb50930d8a14ca866d4860aa3 | /每日一码/1.4.py | d562765773e791296e3d3948d1f59bf072f06599 | [] | no_license | bai3/arithmetic | 1de9057a376cc9025a30e8eed069c1657b297fb3 | 0688e44ba2ec9cdd18661602f60ddd011e8e077d | refs/heads/master | 2021-09-14T12:37:05.125808 | 2018-05-14T02:27:48 | 2018-05-14T02:27:48 | 106,187,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | # -*- coding:utf-8 -*-
class Solution:
def jumpFloor(self, number):
if number <= 0:
return 0
elif number <= 2:
return number
else:
b = 1
c = 2
for i in range(3, number+1):
c = c + b
b = c - b
... | [
"2442694004@qq.com"
] | 2442694004@qq.com |
d4a02a75781865a75f8f07caad950b79ddaf844c | a283608134d59391f88d877d642bb23ba4015fcb | /core/window_controller/window_controller.py | 70985fdf8b05e03a2c81c02787129acf94d69bc5 | [
"MIT"
] | permissive | wo1fsea/TheOldChineseRoom | 6daf371e65c3626981c9eec70677a0372c6da16c | 19e52d86a9720bb8701149a47126f8e7975320b5 | refs/heads/master | 2021-10-08T19:04:10.497774 | 2018-12-16T15:37:06 | 2018-12-16T15:37:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,580 | py | # -*- coding: utf-8 -*-
"""----------------------------------------------------------------------------
Author:
Huang Quanyong (wo1fSea)
quanyongh@foxmail.com
Date:
2017/10/4
Description:
window_controller.py
----------------------------------------------------------------------------"""
import sys
c... | [
"wo1fsea@126.com"
] | wo1fsea@126.com |
27e6878286735e53449181168380113412444fa9 | c58b04695593fe579ff5681c215807a70fb02661 | /team7/pytorch_0.4_classification/example-ngraph_1.py | 9a7278d2cb08fc57818c280d95fbfd1bc1e13ea7 | [] | no_license | Mowd/nctu_dl_final | 2322d660834b33c544db7dd1d0607c77338774e6 | e2d9628e9f2a00c37fa18af69390a391d3a83b60 | refs/heads/master | 2020-04-15T06:46:58.568984 | 2019-01-10T16:03:29 | 2019-01-10T16:03:29 | 164,472,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,802 | py | from benchmark import benchmarking
import torch
import torchvision
import torchvision.transforms as transforms
from torchvision.models.resnet import resnet18
import os
import sys
#data_dir = os.environ['TESTDATADIR']
#assert data_dir is not None, "No data directory"
#from models import ResNeXt29_2x64d
from collections ... | [
"mowd8574@gmail.com"
] | mowd8574@gmail.com |
95fef40a5dc2a68a14ca2b5b5e61ee8198383dcd | 952daeb7e254e863fc57459b87ca29b745c8ce94 | /Amazon/purchasing/serializer.py | 1d302f484744ec8824783db41c73fd9cbfe0f5b5 | [] | no_license | yjesefcu/AmazonSeller | 2fbce7e08cbd0e8dff996d28e94f789d56441ddb | ca155dd81c0583eecd5128433291dc2b3f16f80d | refs/heads/master | 2021-01-22T06:01:53.656798 | 2018-01-28T13:39:49 | 2018-01-28T13:39:49 | 92,515,839 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,148 | py | __author__ = 'liucaiyun'
from rest_framework import serializers
from products.serializer import ProductSerializer
from models import *
class DateTimeFormat(serializers.DateTimeField):
def to_representation(self, value):
if not value:
return ''
return value.strftime('%Y-%m-%d %H:%M')
... | [
"l00164778@sina.com"
] | l00164778@sina.com |
104286c34947124afae89f5f9066ce8775935aa8 | e4cb0a704203c54d8c7eeb4e9881b71b96976bea | /outsourceScraper/main.py | ab8d86195cb1c1964a798ff7d0155c8e352f6d42 | [] | no_license | artemutin/outsourceScraper | a170ee53e56e317e3872a2d66408a247fea9a146 | 54196af06f03dca8f8aa2e39aa1dada78a21d171 | refs/heads/master | 2020-04-14T05:23:39.516288 | 2016-06-23T14:58:52 | 2016-06-23T14:58:52 | 61,720,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,672 | py | import sys
sys.path.append(".")
from outsourceScraper.Catalog import full_scrape
from outsourceScraper.utils import setupLog
from logging import exception, info
from sys import exc_info
from os.path import expanduser
import traceback
import datetime as dt
import argparse
import os
def main(path=expanduser('~'), max_... | [
"artemutin@yandex.ru"
] | artemutin@yandex.ru |
acee49631bfcc0689e388480765c6dbf8cf16025 | ee890ca4c28bb6e23cc96b69e83d87cdcafebf7c | /towerofhanoi.py | e59572da9bb254a42af276afaf5f1ce8ce185ec2 | [] | no_license | deepandas11/Python-ADS | 6778b5501967379006b2c4f1d4429a60651d816d | 352e54e550e78ac7e2c1cf62e29520b823dbf462 | refs/heads/master | 2020-04-26T00:42:28.791873 | 2019-03-06T07:08:42 | 2019-03-06T07:08:42 | 173,187,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 307 | py |
def moveDisk(fp, tp):
print("Moving disk from "+str(fp)+" to "+str(tp)+".")
def moveTower(height,fromP, withP, toP):
if height>=1:
moveTower(height-1, fromP,toP,withP)
moveDisk(fromP,toP)
moveTower(height-1, withP, fromP, toP)
moveTower(4, "A", "B", "C")
| [
"noreply@github.com"
] | noreply@github.com |
9bc990a63d2e3801b4ea704ddc416f4fa47663e5 | 7cba457b2bb23b79cb17d46a81d50a5c4b6b1b09 | /backprop.py | 766f1445a85ed22d4e5d788e00ce1d50e0f45521 | [] | no_license | josh-dh/CNN-framework | 44e5cf7d8bac752fdf1f30f58e09762d179e7f16 | bbd1cc58b764ff46c784272538655fc2c47bcb12 | refs/heads/master | 2021-01-16T02:51:50.326886 | 2018-02-07T02:26:22 | 2018-02-07T02:26:22 | 99,988,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,256 | py | #Backprop Module
import numpy as np
def final_layer_error(predictions, labels, weighted_input):
"""
calculate the error of the final layer
"""
def d_loss_quadratic_d_activations(predictions, labels):
"""
derivative of quadratic loss with respect to activations
"""
return np.subtract(predictions, labels)
... | [
"jdonellyhiggins@gmail.com"
] | jdonellyhiggins@gmail.com |
927b0fc5f3b203bab957dfcd205dc23da901a874 | eb54a6dfa7bf958fdc145c011062657b6bd2b24c | /163music_spider.py | 39ab1e330da8571661b7b309f7c19ea5c75b4c39 | [] | no_license | youmulove/163musicpinlun_spider | e8b7e23afc76ffdccb94c56aa558e095598fb547 | c62dd0b647bc4302f69c87f75d7eddebd49107f7 | refs/heads/master | 2020-03-22T06:42:23.431354 | 2018-07-04T01:11:38 | 2018-07-04T01:11:38 | 139,652,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,428 | py | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
'''
@Description:
网易云音乐评论爬虫,可以完整爬取整个评论
部分参考了@平胸小仙女的文章(地址:https://www.zhihu.com/question/36081767)
post加密部分也给出了,可以参考原帖:
作者:平胸小仙女
链接:https://www.zhihu.com/question/36081767/answer/140287795
来源:知乎
'''
from Crypto.Cipher import AES
import base64
import requests
import json
... | [
"123456@123456.com"
] | 123456@123456.com |
60b0ba41b564ea65de3d21e92281b00dbe37aebc | d27091244f97969d5084c568f0e2c4040f18baa6 | /{{cookiecutter.project_slug}}/tasks.py | 0d881d7e4c671cbea56d5aa2b2d26b144b44a0a4 | [
"MIT"
] | permissive | i2biz/cookiecutter-python-pylint | 26d997d6f1928045e8568f9e722b0dffe1d4bb11 | ba07cd620d982cb11161fee808025257176c62c3 | refs/heads/master | 2021-07-07T13:00:30.758374 | 2019-06-17T14:13:42 | 2019-06-17T14:13:42 | 98,869,317 | 0 | 0 | MIT | 2021-04-20T18:14:25 | 2017-07-31T08:59:58 | Python | UTF-8 | Python | false | false | 537 | py | # coding=utf-8
from invoke import task
@task
def style(ctx):
ctx.run(
"black --check {{cookiecutter.project_slug}} {{cookiecutter.project_slug}}_test"
)
@task
def lint(ctx):
ctx.run(
"pylint {{cookiecutter.project_slug}} {{cookiecutter.project_slug}}_test -r n"
)
@task
def test(ct... | [
"jbzdak@gmail.com"
] | jbzdak@gmail.com |
c77f81ced232aaf35321ab772ccc4cc15336acb6 | 71bfc12150b66a3dea788368176eea11179bff0c | /main.py | 46e2788fa7abf2daa476d7dee4d4bcc61e6a243f | [] | no_license | qc5111/RA | d5526c5d07bb9c90c5ae0ece0e6c1b3ff1bb1979 | c5d95a1eb04218b6eb488730685f0cdcb9134577 | refs/heads/master | 2020-03-22T18:28:08.492812 | 2018-07-11T07:59:31 | 2018-07-11T07:59:31 | 140,462,261 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,374 | py | import os,aes256,rsa_lib,rsa,hashlib
def ra_encrypt(r_file_name,block_size,pub_key):
(path,filename) = os.path.split(r_file_name)
if path:
path=path+"\\"
md5=hashlib.md5()
w_file_name=path+str(int(time.time()*1000))+".ra.tmp"
w=open(w_file_name, 'wb')
r=open(r_file_name, 'rb')
#开始处理头
pwd1=aes256.get... | [
"noreply@github.com"
] | noreply@github.com |
6dd2cfb8ffa27592008f6df6cc0c027517ba095b | 64b26ce32c9f1b3ce7fe5c57a45b06aca7b9c511 | /实验一/171860537_实验一/stackoverflow/doc2vec.py | bcdbd3b4f07b11a577d7a4d47dc48409bd514e15 | [] | no_license | wego1236/SREE | 584b155b523e2f93a01fa9eaaccadd12f7d074ce | edd1c4f6f357c81dd1aa4765ea509cc59701088b | refs/heads/main | 2023-03-21T18:21:37.249559 | 2021-03-17T14:45:22 | 2021-03-17T14:45:22 | 307,331,706 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | import sys
import logging
import os
import gensim
# 引入doc2vec
from gensim.models import Doc2Vec
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
# 引入日志配置
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
# 加载... | [
"56502074+wego1236@users.noreply.github.com"
] | 56502074+wego1236@users.noreply.github.com |
35af1d18981e1a0ce05538dca938add529273b43 | 3ce1ebbbf3e69e7c3bafd2cd359c63e85c960e5b | /src/models/RCNN_elmo.py | 5a2a87876dc8f6b03d0a3641fe671196e6965907 | [] | no_license | IreneZihuiLi/TopicAttentionMedicalAD | 2afb75b2be0965d9601c5d459224eb5fc2535a44 | 8d5ccdabbae6ad0c7abef9765ae3441b565615da | refs/heads/master | 2020-08-20T18:35:13.410327 | 2019-12-03T17:23:58 | 2019-12-03T17:23:58 | 216,054,583 | 14 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,982 | py | # _*_ coding: utf-8 _*_
'''
This is the one using ELMO!
'''
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import functional as F
from allennlp.modules.elmo import Elmo, batch_to_ids
options_file = "/home/lily/zl379/Playing/bilm-tf/mmc_new/options.json"
weight_file = "/home/lily... | [
"irenelizihui@gmail.com"
] | irenelizihui@gmail.com |
336b50fad3e7231e3b5b30f884847f23185931fe | 8557f0621d75848afddd65b1a5cce12449772e0a | /app/routes.py | b7cba988184e473476a98744d335ccd7a30f5ed9 | [] | no_license | halversondm/microblog | 5fd2f835db83d90b46bc136c5815a94e7e38cd74 | c621844acef4549dca547b81c6f7ca5570020751 | refs/heads/master | 2023-08-08T06:13:55.578623 | 2019-11-02T14:12:25 | 2019-11-02T14:12:25 | 219,163,332 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,256 | py | from datetime import datetime
from flask import render_template, flash, redirect, url_for, request
from flask_login import current_user, login_user, logout_user, login_required
from werkzeug.urls import url_parse
from app import app, db
from app.forms import LoginForm, RegistrationForm, EditProfileForm
from app.model... | [
"daniel.m.halverson@gmail.com"
] | daniel.m.halverson@gmail.com |
e61797bb2a81da08a2b58f8a43a84c3f54913716 | 0556889bc09ccebacb6091a0e6ef7dcc07598ad7 | /python/step5_tco.py | cbb92c975d71c2fb4c7a71ffb22419a372b17de2 | [] | no_license | mkhoeini/mal | 0b475dc45f9ad256cca1b8be5a0049ece81c1a13 | 0de08030ebf15d58f626d822692159f2ef1a0649 | refs/heads/master | 2020-12-11T01:46:38.956456 | 2015-01-08T17:53:00 | 2015-01-08T17:53:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,775 | py | import sys, traceback
import mal_readline
import mal_types as types
import reader, printer
from env import Env
import core
# read
def READ(str):
return reader.read_str(str)
# eval
def eval_ast(ast, env):
if types._symbol_Q(ast):
return env.get(ast)
elif types._list_Q(ast):
return types._li... | [
"github@martintribe.org"
] | github@martintribe.org |
af8dafba7bb90bef6fb05a2448c570252ae0ea10 | c7a4193e2f2835307a288dff24305d0702af6873 | /misc/comprehension.py | 1a188ef9e3456510ca886e50443282b2a5a2107b | [] | no_license | n3k0fi5t/pythonLearn | 15ffa6269d417c500b5b01806537832e45972916 | 5b6807c8fb4e353a3722df18852ac44625298056 | refs/heads/master | 2020-05-25T02:35:26.196590 | 2019-01-07T06:49:01 | 2019-01-07T06:49:01 | 84,902,079 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#list comprehension
a = [i for i in xrange(10)]
print a
#dic comprehension
b = {key:val for key,val in [(i,i**2) for i in xrange(10)]}
print b
| [
"r05922078@ntu.edu.tw"
] | r05922078@ntu.edu.tw |
a6dbe76b742a764e70d0d2ab068d6cbd11481fb5 | a8a97b1a9f4b136c39522e1a5e2ef6fbe3d33f9f | /analysis/flux_selection/beta.py | 588a63df2b5778c352ba74cf3c5ba66ca24d155b | [] | no_license | stephenmwilkins/optimum-selection | 99900aa721215ad068c13ffe227e0c37b77bdc95 | 2c07421eec42d36f9f9ec5c5e0118773191d1ce5 | refs/heads/master | 2022-11-05T00:55:38.228129 | 2020-06-25T15:26:28 | 2020-06-25T15:26:28 | 272,703,973 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,407 | py |
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import FLARE
cosmo = FLARE.default_cosmo()
import FLARE.SED.models as models
import FLARE.plt as fplt
import FLARE.photom as photo
import FLARE.surveys
import FLARE.filters
import FLARE.plt as fplt
import h5py
... | [
"stephenwilkins@Stephens-MacBook-Pro.local"
] | stephenwilkins@Stephens-MacBook-Pro.local |
5e3658bca27393e2631a0f8f2f2c6ee58daf9337 | 407cb37f5c826840263a9755589c23a40b07ebed | /phones/migrations/0001_initial.py | 9858f175087205af37baf43159347430e8fcdc68 | [] | no_license | r1zon/dj_dip | b53b9f4b2c59aa3e952b12106ab22421c89aec17 | 60a8caa238c4aaf5badb8376e1510473c1d4961d | refs/heads/master | 2022-12-10T22:35:30.883903 | 2020-09-14T14:21:01 | 2020-09-14T14:21:01 | 293,579,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,829 | py | # Generated by Django 2.2.10 on 2020-09-11 13:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | [
"elvellon@yandex.ru"
] | elvellon@yandex.ru |
18070692b9d88bc2d548cfc41d82881611e741e0 | 6afc1214961b6461ed9f73111f6aa43bf9142339 | /myhod_wrapper/code/funcdef.py | 0bc800cfac0cd48c6c4106da8396d908744d5428 | [] | no_license | sp-shah/H0_pipeline | bb60c6c01323d75fb2abd98badcf39840f9fc920 | 99c6f26b5a708b756b503e23003f207230dfe46e | refs/heads/main | 2023-07-18T12:51:53.470467 | 2021-09-02T03:29:50 | 2021-09-02T03:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,506 | py | import numpy as np
import h5py
import matplotlib.pyplot as plt
import hod_wrapper as hodWrap
import sys
from matplotlib import rc
rc('text', usetex=True)
rc("text.latex", unicode = True)
rc("font", size =16., family = 'serif')
def read_cat(path):
f = h5py.File(path, "r")
s = f["sim1"]
pos = s["pos"][:... | [
"shivani.shah@ufl.edu"
] | shivani.shah@ufl.edu |
15ec9b50a88b09460a9b8d7b4366e8046bcc58af | 067bc0691f8db2754607cc6a2e3ba3d230151d90 | /run_s2s_image_digit.py | 4362a7ce0cd235551b7e28e4b457ff60b63b6cfe | [] | no_license | tristanguigue/vib_s2s | bf9579c5a57c731df54979390f9f654003de5a0d | 46149200a7571dee67954d58dfbb180dd5f14327 | refs/heads/master | 2021-06-27T01:54:31.895545 | 2017-09-08T10:08:38 | 2017-09-08T10:08:38 | 94,911,512 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,616 | py | """Apply the variational information bottleneck to predict the labels of a sequence of MNIST
images."""
from tensorflow.examples.tutorials.mnist import input_data
from networks import Seq2Labels
from learners import DiscreteLossLearner
from tools import Batcher
import argparse
import time
import os
import numpy as np
... | [
"tristan.guigue@gmail.com"
] | tristan.guigue@gmail.com |
c38778bbf98df1850395ea59fc8b6ea5eb4ad7e1 | 310b4ea73685ae061d8531030e2bcc6e023019c1 | /app/migrations/0003_auto_20190910_2158.py | 67586ce38e6300642968ecbb33839eb2c268c8a5 | [] | no_license | Kirill882/news_blog | a8b6f0e284658f5ad404977d54ffc771103cb50a | 691ff92a5bc8c622d87f09949198331a3923159a | refs/heads/master | 2023-04-26T20:07:52.307715 | 2019-11-01T10:51:47 | 2019-11-01T10:51:47 | 218,967,092 | 0 | 0 | null | 2023-04-21T20:39:41 | 2019-11-01T10:47:00 | Python | UTF-8 | Python | false | false | 387 | py | # Generated by Django 2.2.5 on 2019-09-10 18:58
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0002_comment_approved_comment'),
]
operations = [
migrations.RenameField(
model_name='comment',
old_name='approved_co... | [
"NT@mail.com"
] | NT@mail.com |
0e195bf69220bc5cfcdf17a5a47617fb4f551f3b | fa19df33728779d9a662542a674be6554af1feba | /src/main/java/nl/Ipsen5Server/Service/kik-bot-api-unofficial/examples/kik_unofficial/protobuf/groups/v2/group_service_pb2.py | ba231b404a8416c8469d6f44b7819a72f55c37bd | [
"Apache-2.0",
"MIT"
] | permissive | anthonyscheeres/Ipen5BackendGroep11 | 3abfe0e07ec1d240a8e0b2db79a4f8d2f26bd59f | e2675c2ac6580f0a6f1d9e5f755f19405d17e514 | refs/heads/master | 2022-11-15T07:08:22.619268 | 2020-06-23T09:10:33 | 2020-06-23T09:10:33 | 263,292,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 51,098 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: groups/v2/group_service.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impo... | [
"info@anthonyscheeres.nl"
] | info@anthonyscheeres.nl |
c1480def64eb483f4e4fc918b25fb7381d35c616 | 19973144ec11438c8bc4c973473033ee877e1ad3 | /tuples/named_tuples_modifying_and_extending.py | 9ac0a122c05ed86ec52cc8c8849be7adcf3bdeaa | [] | no_license | kuzmich321/python-core | b6d1720c1a0202e5d40032ed9f4b96aec1d284df | cd137980c8c5677a72f3e9c0703a1f3f06ef37e5 | refs/heads/main | 2023-04-16T19:10:42.450055 | 2021-04-24T06:52:43 | 2021-04-24T06:52:43 | 332,165,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | from collections import namedtuple
# Named Tuples are Immutable
# So how can we "change" one or more values inside the tuple?
# Just like with strings, we have to create a new tuple, with the modified values
Point2D = namedtuple('Point2D', 'x y')
pt = Point2D(0, 0)
pt = Point2D(100, pt.y)
print(pt)
# Maybe slicing o... | [
"dota2drot@gmail.com"
] | dota2drot@gmail.com |
af4c49328bbfed02acdb365d357d20e4a58a6be9 | bad62c2b0dfad33197db55b44efeec0bab405634 | /sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_03_31/operations/_operations.py | 84e5a71475974e9361d744abcd9b2b494f011e56 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | test-repo-billy/azure-sdk-for-python | 20c5a2486456e02456de17515704cb064ff19833 | cece86a8548cb5f575e5419864d631673be0a244 | refs/heads/master | 2022-10-25T02:28:39.022559 | 2022-10-18T06:05:46 | 2022-10-18T06:05:46 | 182,325,031 | 0 | 0 | MIT | 2019-07-25T22:28:52 | 2019-04-19T20:59:15 | Python | UTF-8 | Python | false | false | 6,149 | py | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | [
"noreply@github.com"
] | noreply@github.com |
1ad3c1b95cd561d50dbb80b504710344c5e194ba | 3c529285a0029436ec63185c5c3bd2484ab18a15 | /jwst/regtest/test_fgs_image2.py | 3eabd0340ed05c28372673a4ecdf25744df29eb4 | [
"BSD-2-Clause"
] | permissive | ARKA1112/jwst-1 | 7d2c30aaf1e58c26731f0c64b6b94f734b8989a9 | 63b5caa69dbe102245d703feb635a33f72e47e75 | refs/heads/master | 2023-04-10T17:58:54.212100 | 2021-04-21T23:34:27 | 2021-04-21T23:34:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 963 | py | import pytest
from astropy.io.fits.diff import FITSDiff
from jwst.stpipe import Step
@pytest.fixture(scope="module")
def run_fgs_image2(rtdata_module):
rtdata = rtdata_module
rtdata.get_data("fgs/image2/jw86500007001_02101_00001_GUIDER2_rate.fits")
args = ["calwebb_image2", rtdata.input,
"--... | [
"noreply@github.com"
] | noreply@github.com |
e9746ca8aa1b22d1059d49bd4430f3ce70b24f96 | 26d33a53ee00b5c10134da72529caa945c20ef8d | /23_group_of_statement_with_UDF.py | 9294e6eda6e6c300257f9be3e6192e293d5bace5 | [] | no_license | Shinakshi09/Python | 560cc802eeb6ebb850707fd0ed9f18493b89522e | 033e35622d0263d5f8aaa5c9aabff33c01137455 | refs/heads/main | 2023-06-18T20:55:54.941772 | 2021-07-19T15:00:55 | 2021-07-19T15:00:55 | 387,363,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py |
"""
Printing a group of statements by combining them into a user defined a function
"""
def print_group_of_statement(i):
""" Printing a group of statement"""
print("__________________")
print(" I am bloody superman once again")
print(" I am Q ")
print(" Super bond girls")
for i in range(10):
... | [
"87409887+Shinakshi09@users.noreply.github.com"
] | 87409887+Shinakshi09@users.noreply.github.com |
4dae29235c8e5a38aad40c087fb29bfbb50c2257 | c005fd84d7153fb26c42ba205270869033a7f339 | /sinfonier-backend-api/clustering/storm/StormUI.py | 1c515bca149c7dd8f5f3479396c63f9fe726d898 | [
"Apache-2.0"
] | permissive | aspgems/fiware-sinfonier | 7a5df99f33f9e99cbfaf7b2b5f596a01d63589b2 | 8dac57bef88f19fc79bdde5edfbb2dd37f1d1fba | refs/heads/master | 2021-01-11T03:08:48.874844 | 2016-10-18T11:10:46 | 2016-10-18T11:10:46 | 70,148,771 | 0 | 0 | null | 2016-10-18T15:40:54 | 2016-10-06T11:45:35 | Java | UTF-8 | Python | false | false | 11,531 | py | import json
from utils.HTTPHandler import HTTPHandler
from config.config import conf
from error.ErrorHandler import TopologyNotInCluster
class StormUI:
@staticmethod
def baseurl():
return "http://{}:{}".format(conf.STORM_UI_HOST,conf.STORM_UI_PORT )
# GET Operations
##########################... | [
"alejandro.matos@global.11paths.com"
] | alejandro.matos@global.11paths.com |
b8b6a6d2a24f72e6e26a34f9dabbad7a00dcbd5d | f2f9c70d0e333286ff56c65217575ceeada4ddb6 | /reinforcement learning/zad.py | d109e7ea4e94314f81dc113803b231fd5dfd2bae | [] | no_license | maciejsz95/WNO-2 | 47532ebcc8095f7ad778fc5cf7dfe3bda102e52f | 24a327efc841a4d3a34efe4ce8cfba2aa1272e4a | refs/heads/master | 2020-03-18T20:25:48.524877 | 2018-05-28T22:37:42 | 2018-05-28T22:37:42 | 135,215,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,624 | py | import numpy as np
import gym
from gym import wrappers
import tensorflow as tf
import json, sys, os
from os import path
import random
from collections import deque
env_to_use = 'Pendulum-v0'
# hyperparameters
gamma = 0.99 # reward discount factor
h1_actor = 8 # hidden layer 1 size for the actor
h2_actor = 8 # hi... | [
"maciejsz95@gmail.com"
] | maciejsz95@gmail.com |
e425346780022da8a5f60b47f83874eabb99ecd7 | e3900b74d7ac56ed215f35612b61b1b465fdae1f | /deepzen/api/base/layer/norm/dropout.py | 0fefc6c4b541fe1c2e97bc8b65d23d913ddb92f6 | [] | no_license | knighton/deepzen | ae3bf9405344a917e4be480ac9d2887a7397ce5b | e60e8441d05789979e87ef87c8d2844c7d70ba72 | refs/heads/master | 2020-03-10T17:49:19.224002 | 2018-08-16T07:08:25 | 2018-08-16T07:08:25 | 126,268,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,693 | py | class BaseDropoutAPI(object):
def _dropout_mask_shape(self, x_shape, keep_spatial_axis=None):
if keep_spatial_axis is None:
keep_spatial_axes = []
elif isinstance(keep_spatial_axis, int):
keep_spatial_axes = [keep_spatial_axis]
elif isinstance(keep_spatial_axis, (list... | [
"iamknighton@gmail.com"
] | iamknighton@gmail.com |
716e3562ae637f4edc50528a02bd8174c192ab40 | 7d71acdf6e8954452ce0910c229ce866ad373efd | /Web_Server/led.py | 35e6d34308f839c21094705938aef6baa8f54978 | [] | no_license | cverbitzki/SeniorProject | 1a432074634b2695dec4c366853dca6a874fa774 | b6896ad9798d25e56267abe36152e82850f4f3d0 | refs/heads/master | 2020-12-24T07:45:17.606666 | 2017-03-06T21:58:13 | 2017-03-06T21:58:13 | 58,071,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,148 | py | #!/usr/python
import RPi.GPIO as GPIO
import time
import sqlite3
# blinking function
def blink(pin):
GPIO.output(pin,GPIO.HIGH)
time.sleep(1)
GPIO.output(pin,GPIO.LOW)
time.sleep(1)
return
GPIO.setwarnings(False)
# to use Raspberry Pi board pin numbers
GPIO.... | [
"christopher.verbitzki@maine.edu"
] | christopher.verbitzki@maine.edu |
c022c602e2a4697d0a16386b80833b7a667fed92 | 2969ee2b6c579348870c346eb3edcaec7eac4fd3 | /mcnets/tempering.py | c8bcf852aa6b740a6537c02e4080196176aa012a | [] | no_license | stuhlmueller/mcnets | 500143476509af1dfc137ba278189480648983d4 | f564db53c7d85dce1fb365e8e704bd261e3ec5f1 | refs/heads/master | 2020-04-04T13:35:17.394491 | 2014-02-06T01:55:24 | 2014-02-06T01:55:24 | 15,242,129 | 1 | 0 | null | 2014-02-06T01:55:26 | 2013-12-17T01:34:19 | Python | UTF-8 | Python | false | false | 14,131 | py | ## Copyright 2013 Google Inc. All Rights Reserved.
##
## Licensed under the Apache License, Version 2.0 (the )
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or ag... | [
"andreas@stuhlmueller.org"
] | andreas@stuhlmueller.org |
13e837f8a0c0ff0d32762df56f54b0d1fdea8bb9 | 3539f98e7b54e58622cabb745117a861817c1e1c | /main.py | d7192d5b91d0bdbff5de41c5cfbfb06bf2599d85 | [] | no_license | youfeng243/mongo-dump | 285e03349f261c56e9755d103ea0e10f81c23676 | 966d5933eed0f78d60ecd95d103686df17c92e08 | refs/heads/master | 2020-12-02T19:16:46.047885 | 2018-02-07T08:25:14 | 2018-02-07T08:25:14 | 96,317,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,491 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: youfeng
@email: youfeng243@163.com
@license: Apache Licence
@file: main.py
@time: 2017/7/1 12:27
"""
import json
import os
import subprocess
import sys
import time
import tools
from config import app_data_config, sleep_time, check_period, data_sync_config, dump_tabl... | [
"youfeng@haizhi.com"
] | youfeng@haizhi.com |
01bc570da861c7c1e88b64e8ad0b6c96647329ec | 5d3c7539ba982e58d8cf249fb1f55cf4e248c730 | /Create Maximum Number.py | 6e3493a83a1bcf3c614abb3a73cdf337e80fe2d4 | [] | no_license | jinxin0924/LeetCode | b95bc4321d0a0589d66c18fa5bb17e5d38b2f436 | bdf5518fb387dfa599964425354115dfad49eb00 | refs/heads/master | 2020-04-05T14:04:59.839117 | 2016-09-19T09:44:27 | 2016-09-19T09:44:27 | 42,444,294 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,879 | py | __author__ = 'Xing'
# Given two arrays of length m and n with digits 0-9 representing two numbers.
# Create the maximum number of length k <= m + n from digits of the two.
# The relative order of the digits from the same array must be preserved.
# Return an array of the k digits. You should try to optimize your time a... | [
"jinxin0924@gmail.com"
] | jinxin0924@gmail.com |
59f12fb2cc85e4f4266e067f7685062e16ceef87 | 8175f5bcd468236d4739bf4c5e3b6d8e26a65b2e | /Tarea1 - Ensamblador_Maquina/Expresiones regulares/venv/Scripts/pip3-script.py | 1bc6ae06628cedaf9ff542dfa649f74abc2a8450 | [] | no_license | FernandoFigueroa14/Multiprocesadores | 5678b7450f64822df2b513de0add553abc9463dc | 4210eca16aa86aee755d239aadf499e3e8e4c09d | refs/heads/main | 2023-07-10T01:51:17.223370 | 2021-08-15T17:41:29 | 2021-08-15T17:41:29 | 395,199,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | #!"D:\Lenguajes y traductores\Expresiones regulares\venv\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '... | [
"luisfersurfer14@hotmail.com"
] | luisfersurfer14@hotmail.com |
719032921ebe700cca37282e531011fdbb1c0f6b | c6dcecd43edf7ee1488be38779a59b41781b8371 | /06. Index Numbers/index.py | 36af556092a1b430f841ff225aa9542e4f5b6bcb | [
"MIT"
] | permissive | joshtsengsh/Learn-Coding-with-Python | c56ead768cc9fff38b33e992b6d6368c9ab821d0 | 9280c41f919f60c33a5d7d0a8bc454877692feec | refs/heads/master | 2022-09-11T03:20:46.364526 | 2020-06-04T14:25:47 | 2020-06-04T14:25:47 | 260,665,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | #created by Josh Tseng, 1 May 2020
#This file introduces the concept of index numbers, which are important when handling certain types of data in Python
#In this example, we would be looking at the indexes in strings
sample_string = "This is my string."
#Show the value in the string at index position 0
print(sample_s... | [
"joshua.tseng.sh@gmail.com"
] | joshua.tseng.sh@gmail.com |
c409eb09079f579e2f14e64adf5125cb958596e3 | 4fc7805a55135224c068e9e2ff67983d3a626569 | /Week 6 [JSON,SOA]/json1.py | a826f30dc0bdf0c1e5468b1c91dc8aabfe8a589f | [] | no_license | Pryangan/Using-Python-to-Access-Web-Data | 0da06571fc067c9aaaf25db9d7fb3a190ee1f0d7 | 561ad34bf00207b41c71a475da55ba866ac12874 | refs/heads/master | 2020-04-15T05:22:36.136422 | 2019-01-07T10:59:41 | 2019-01-07T10:59:41 | 164,419,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | import json
data = '''{
"name" : "Pryangan",
"phone" : {
"type" : "intl",
"number" : "9876543210"
},
"email" : {
"hide" : "yes"
}
}'''
info = json.loads(data)
print('Name:',info["name"])
print('Hide:',info['email']['hide'])... | [
"noreply@github.com"
] | noreply@github.com |
58a5ac993e18950c414a11b2bd8fdc06e517b292 | bbc3ba50910f57d00c54d9c16103853dedc9c78a | /src/CreateInsByHooks.py | 1e28875c8a049f5a9e06493c9af22b8021a78da2 | [
"Apache-2.0"
] | permissive | wjtlt3/pyloader | 4bcc98a028e17ba6a54b4033c915463e8374c9bf | 2be0919ab80dbb38b1fdd7969c31647be20e8fa9 | refs/heads/master | 2021-10-08T20:09:17.191412 | 2018-12-17T08:23:56 | 2018-12-17T08:23:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 535 | py | '''
Created on 2018年10月30日
@author: yinyayun
'''
from loader.hook.DynamicLoadByHooks import DynamicLoadByHooks
if __name__ == '__main__':
base = '../package/demo'
dynamic = DynamicLoadByHooks(base)
print("-----create 001.ImportDemo")
ins1 = dynamic.create_ins('001', 'ImportDemo', 'ImportDemo')
pri... | [
"yinyayun1314@gmail.com"
] | yinyayun1314@gmail.com |
3e2a108c6f256bcf94bf27c819c5affb28ecfab2 | 1e09bc56bf2904b349df1873e11da3d527437880 | /lecture-08/stringfn.py | ef0277ea4f2fa1625465ed088e5402016831126e | [] | no_license | codeforcauseorg-archive/DSA-Live-Python-Jun-0621 | f3444f5671cb4985644c7432517477c3585c70fb | e4fe544178d7851c24755242390f39675b99fabe | refs/heads/main | 2023-08-09T08:31:41.449120 | 2021-09-14T16:44:39 | 2021-09-14T16:44:39 | 384,725,085 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | line = "Hello {}, Its {} to meet you."
# print(line.index("o"))
# print(line.format("Amit", "good"))
out = "we are so happy. and then again.".capitalize()
print(out)
# line.endswith("yu.")
| [
"anujgargcse@gmail.com"
] | anujgargcse@gmail.com |
a1d938d10d362c370e273a1a5d6abc819fdfd4f6 | 0089c10e2fde9538415623ec2f6b6c213d4b81db | /ex_2_spyder.py | c4356d9992de1ff4f2e547d38f6da10cbf259389 | [] | no_license | isuru-m/RL_labs | c7546b4e5b430cc7899069b53c5670f064a56728 | b2cf1344b9d7388cfe644190c6e0655ef92cc2e0 | refs/heads/master | 2020-04-25T04:02:07.227518 | 2019-03-24T02:01:00 | 2019-03-24T02:01:00 | 172,497,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,968 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 1 06:02:53 2019
@author: Isuru
"""
import numpy as np
class Gridworld:
def __init__(self):
self.num_rows = 5
self.num_cols = 5
self.num_fields = self.num_cols * self.num_rows
self.gold_reward = 10
s... | [
"47976516+isuru-m@users.noreply.github.com"
] | 47976516+isuru-m@users.noreply.github.com |
51495f4dae656f1832ef0dbee351dfe3ff503ca3 | e23749ca0f78c3e2ecfca58352ad65f3c4d487bb | /Face-Recognition/picture_menu/local_main.py | da580ed14c821c7fc325ddbce72561bb4e578b15 | [] | no_license | davichiar/2018_KidsHaru-FaceRecognition | a923c8bcc1a83d549d55ddcaa8e4da37bc366d4a | 5c2d43202dae45ae49b302104533900c2fd48bec | refs/heads/master | 2020-03-23T19:13:28.142373 | 2019-01-22T05:56:29 | 2019-01-22T05:56:29 | 141,961,423 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,851 | py | import json
import requests
import os
import sys
import shutil
import urllib.request
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
from utility import path, download, pickle
from picture_util import detecting, clustering, saving
def local_play():
# ====================================... | [
"ardabitchy02@naver.com"
] | ardabitchy02@naver.com |
7f41409c32f68944f9c19faceb81e9904a6b9f4d | 2ef5c8fe070db835f944250be648d32c9ffe208f | /backjoon/10818.py | fa6c8147a70a384755ee8763baa009391dcbc088 | [] | no_license | Hyoukjoo/study-algo | dfde817fdccfd7f6fe03a35d9b08e8b7de6f3ef0 | fd99ee7b03910226b03eba369319c7d2ba5824ed | refs/heads/main | 2023-04-20T05:16:55.867061 | 2021-05-09T12:24:03 | 2021-05-09T12:24:03 | 358,767,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 92 | py | n = int(input())
nums = list(map(int, input().split()))
print(f'{min(nums)} {max(nums)}') | [
"jo920208@gmail.com"
] | jo920208@gmail.com |
04ff18cb3a28a6777a34d20828fd38fb9815439b | 8aa352851122a6ba3cd4d11e0ad89a10058f5206 | /mysite/mysite/urls.py | 953baa1c0eadcffe5be08b693cc1c20fe35c3237 | [] | no_license | marchell93/django_news | 3f8d7134ee4d1df40897e9dc0a4bd5bac51ebb07 | 7d2db7b0de497206ed4357ca25de55460605b59f | refs/heads/main | 2023-01-02T07:29:40.159772 | 2020-10-27T08:39:33 | 2020-10-27T08:39:33 | 307,632,242 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,226 | py | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | [
"marchell93@mail.ru"
] | marchell93@mail.ru |
421a98d91f2a1ef9d1ef0c88cb7e72d9f3a0a075 | 0bf6b37f856d3fb7e0970b58c6f4cf49fbd74b35 | /preprocess.py | 8c3b9b71639be580838a01fffb51e2006995fe95 | [] | no_license | Skinny-Joey/Retrieval-Automatic-Comment-System | a08a67679bfabcf021b8f253bb4ec392dc09afb4 | d925397152bf9a31b2a0a419ef1a0c94e543b565 | refs/heads/master | 2022-04-03T06:05:31.859650 | 2018-11-21T15:11:04 | 2018-11-21T15:11:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,390 | py | # -*- coding: utf-8 -*-
import os
import cPickle
import json
import jieba
# 加载数据只需修改此函数即可
def train_data(path):
print 'start process ', path
data = []
with open(path, 'r') as f:
for line in f.readlines():
line = line.strip().split('\t')
post = line[0].split()
com... | [
"719616985@qq.com"
] | 719616985@qq.com |
a38bc5dad2aaa1bda7ad1e5a463b3066f2dd7422 | 290499258919c5ca039cc725bbc5d0a47511f1ef | /pbtotflite.py | cdcbf5a2a694a2c46335cb28fffdbf4ecc8886b4 | [] | no_license | Medicmind/grading_demo | d4f22eefa8131faa64768a830ad2e4ca80c8a044 | f53b1f3093966ee17be9e03b69ddd0a8a4a63ba3 | refs/heads/master | 2022-12-11T04:08:56.217525 | 2022-12-03T00:06:26 | 2022-12-03T00:06:26 | 140,697,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | #Convert a Medicmind grading classifier frozen_model.pb file into a keras tflite model
import tensorflow as tf
from tensorflow_addons.optimizers import LAMB
import glob
import sys
tf.keras.optimizers.Lamb = LAMB
if True:
converter = tf.compat.v1.lite.TFLiteConverter.from_frozen_graph('camera/data/frozen_model.pb',
... | [
"noreply@github.com"
] | noreply@github.com |
5789883cf8c75a130c8dc57f3ab2e517f8d42824 | eab9d48cfc6318ab3c94a6156662826209db27f4 | /server-src/NNModels/allPairs.py | 94f2904ae6d15729b3223743ebbdc3a98ebbc1bc | [] | no_license | schasins/unstructured-data-scraping-extension | 715d77d832bb5ffe185ebfddfe11848e24955c60 | ebdbb758f665b596d45b084662583665ac443e2f | refs/heads/master | 2021-01-21T21:47:26.042228 | 2016-03-14T16:09:42 | 2016-03-14T16:09:42 | 42,411,510 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 35,306 | py | #!/usr/bin/python
from operator import attrgetter
import libfann
import re
import copy
import sys
import array
import csv
import os
import itertools
import time
import random
import math
# **********************************************************************
# Data structure for documents, for dealing with single-n... | [
"schasins@gmail.com"
] | schasins@gmail.com |
d15f7f874707565cc02a4efbcddec8e03367b55d | 3cd2de2d088afd4908cf2bb9b87953d86b6e76b8 | /intcode/test.py | a18884550793019c34ea7ac9529e908a2af3c14c | [] | no_license | pedrokiefer/adventofcode2019 | 055c4cb84afe598ec064d8a48b2384fa14d02de2 | 56a2bc4102a69f7511c00ea3f23dca258b100bc5 | refs/heads/master | 2020-09-30T02:08:30.163519 | 2019-12-28T02:08:21 | 2019-12-28T02:08:21 | 227,174,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,453 | py | from unittest.mock import Mock
from .cpu import IntComputer
def test_simple_program():
program = [1, 0, 0, 0, 99]
c = IntComputer(program)
c.run_program()
assert c.p == [2, 0, 0, 0, 99]
def test_multiply_program():
program = [2, 3, 0, 3, 99]
c = IntComputer(program)
c.run_program()
a... | [
"pedro.kiefer@corp.globo.com"
] | pedro.kiefer@corp.globo.com |
d0335d56677c85543a5999292c7d92942cb7f4ad | c0204acff3fd9d276ab315dd4134eb228bbadf2d | /116_version1.py | c1f8fa3a3245d3c8286a0952069cf20d5a7846d1 | [] | no_license | haruto0519/haruto_hirai | bee95366adde7702e276679d7d5832ddf2cce54f | 8668a7bee65d109f5a0afa6357f5a45337cb7bc4 | refs/heads/main | 2023-08-23T21:21:40.078199 | 2021-10-27T20:55:12 | 2021-10-27T20:55:12 | 421,956,481 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | # a116_buggy_image.py
import turtle as trtl
# instead of a descriptive name of the turtle such as painter,
# a less useful variable name x is used
spider = trtl.Turtle()
spider.pensize(40)
spider.circle(20)
n_legs = 6
lengh = 70
angle = 360 / n_legs
spider.pensize(5)
n = 0
while (n < n_legs ):
spider.g... | [
"noreply@github.com"
] | noreply@github.com |
8618008c2deaeda1af5852467c436db706c5400b | ff31d31493bc75de2bc1a206ebf13ca91d937f9b | /Master.py | 262c03f98f9ca9c3cf97d0d9d5e37e28159287a1 | [
"MIT"
] | permissive | Researchnix/HackThe6ix | c96bcc8d892747e94a483c23d09862b02d23f962 | 85057a0eede9ef4e30f3246221071e028946cbc0 | refs/heads/master | 2020-09-21T12:56:45.390518 | 2016-10-22T22:48:55 | 2016-10-22T22:48:55 | 66,153,079 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,983 | py | #
# Master.py
# HackThe6ix
#
# Created by Jeffrey, Maliha and Lennart on 2016-08-20.
# Copyright 2016 Researchnix. All rights reserved.
#
import sys
from random import *
import Map
import Car
import RoutePlanner
# the main traffic coordinator
class Master:
''' constants'''
maxRunTime = 10000
verbose ... | [
"forschnix@gmail.com"
] | forschnix@gmail.com |
dcc9d8b7a1b36caead18840a6d9efa1039e3f5ce | 09e8a0935bb6c96bb42616b6931d2ea37b4288a7 | /MovuinoUSB_2015/MovementRecognition_LibSVM_Python/PLAY_AppFitNS_01.py | e74f515d1a47962f322b6f88538c97e1dce7e7e1 | [] | no_license | hssnadr/Movuino | 817a36058b93c8a4f13e142a0faac4a69991c5fd | aa4b9fb9435aadd0d45661bbb0663061f0047287 | refs/heads/master | 2020-06-09T09:09:47.424345 | 2017-12-15T13:05:09 | 2017-12-15T13:05:09 | 76,047,127 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,725 | py | import math
import time
import numpy as np
from svmutil import *
#Not necessary
import serial #to get our sensor data
import pygame #to close session by closing pygame window
#Local script
import getFeatures_Detection
#Initialize graphic window
pygame.display.init()
fig = pygame.display.set_mode((640, 480)) #Open ... | [
"husson.adr@gmail.com"
] | husson.adr@gmail.com |
b947e26aedcbe4d02c260f1b1f68502685c232fb | a2f753285b0c270168e260d72a08cf0fcfc77b22 | /firstApp/app_V1.py | 50bdc011ecf1fd511ce0aeb71e1a5df39ff6406b | [] | no_license | IzumiHoshi/My-Python-Code | cc7df2d1ac5e4f5481f7cf9647b95f648a722aa3 | 73ba606f1c9be8f9651971da9be4c83903f6f903 | refs/heads/master | 2021-01-16T23:03:32.111385 | 2020-06-22T06:29:40 | 2020-06-22T06:29:40 | 71,847,496 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | import logging; logging.basicConfig(level=logging.INFO)
import asyncio, os, json, time
from datetime import datetime
from aiohttp import web
def index(request):
return web.Response(body=b'<h1>Awesome</h1>', content_type='text/html', charset='utf-8')
@asyncio.coroutine
def init(loop):
app = web.Application(l... | [
"tsunami2deng@gmail.com"
] | tsunami2deng@gmail.com |
abd6aba250f267573bacd3daf43a21b2c1952ce2 | 22fe6ed51715486ebbc09e404504ed4d7a28c37d | /python-katas/PN2RangeSum.py | efe3460738df4c950e68422a3ee4ffe022739815 | [] | no_license | Jethet/Practice-more | 1dd3ff19dcb3342a543ea1553a1a6fb0264b9c38 | 8488a679730e3406329ef30b4f438d41dd3167d6 | refs/heads/master | 2023-01-28T14:51:39.283741 | 2023-01-06T10:14:41 | 2023-01-06T10:14:41 | 160,946,017 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | # Given a range of numbers, iterate from 0-th to end number and
# print the sum of the current number and previous numbers
def range_sum(nums):
sum_old = 0
for i in range(nums):
sum = sum_old + i
print(sum)
sum_old = i
print(range_sum(10))
| [
"henriette.hettinga@gmail.com"
] | henriette.hettinga@gmail.com |
b66326ad63b412657ddd4448b5320a22614e8070 | 143d912d73d8f75a0a235b027c5212475ac54981 | /detect_model/yolo_net.py | 7aaabb389168f214e6b576b3cc9a610ed154b1dd | [] | no_license | SolarSword/Camera-Object-Detection | fc3d60f7df89ef582907d8dc5f4dd578eca05001 | ca9aeaecab6516ffbd81c33b48319f988e6ed617 | refs/heads/master | 2020-05-15T15:17:05.640295 | 2019-04-20T06:30:31 | 2019-04-20T06:30:31 | 182,368,691 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,031 | py | import copy
import numpy as np
import tensorflow as tf
import cv2
#import config as cfg
from . import config as cfg
class YOLONet():
def __init__(self):
# initialize all parameters
self.weights_file = cfg.WEIGHTS_FILE
self.classes = cfg.CLASSES
self.num_classes = len(self.classes... | [
"953595576@qq.com"
] | 953595576@qq.com |
fd5a18ddc398096b45e83773bf591eedc129469d | 5269e071cca7d3ed6c12bf3d4672ed80c99208b3 | /testa.py | 604f1f6347f6f8531145c723da5ec7a44a4a3f13 | [] | no_license | VictorJaque/SukobanPython | 7856071d059e65b27fd59b5b059dc2e63a0ca135 | 98f39a72165b106e294f2b3b6b55d1eda8e74635 | refs/heads/main | 2023-03-25T18:12:53.276222 | 2021-03-12T12:30:00 | 2021-03-12T12:30:00 | 347,057,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 883 | py | def create_level_1(level):
x = 0
y = 0
teck = []
with open("first_level.sokoban") as f:
for rad in f:
for tecken in rad:
x = x + 1
if tecken == '\n':
y = y + 1
x = 0
if tecken != " ":
... | [
"victor.jaque.mte21lin@tucsweden.se"
] | victor.jaque.mte21lin@tucsweden.se |
94986732f3b504318a4e2610f8c4c6c1ce8cc693 | 087d0c6d58dca56148033662a0f6841482615b2a | /crawler/spiders/focusedscrape/disprot.py | d299d8ac5591ad235f95d5e343c09639337ab54d | [
"Apache-2.0"
] | permissive | biothings/biothings.crawler | 52c1aa7ab13b9cebcf6b4366ec8f96c54101656e | 5d5c7d089b1e2e4344dfff34c077cd70ff46e5cc | refs/heads/master | 2022-02-13T14:10:10.354966 | 2021-08-31T23:07:36 | 2021-08-31T23:07:36 | 209,951,853 | 0 | 5 | Apache-2.0 | 2022-02-03T17:36:06 | 2019-09-21T08:39:50 | Python | UTF-8 | Python | false | false | 1,377 | py | import requests
from scrapy.spiders import Spider
from scrapy_selenium.http import SeleniumRequest
from selenium.webdriver.support.expected_conditions import presence_of_element_located
from selenium.webdriver.common.by import By
from ..helper import JsonLdMixin
class DisProtSpider(Spider, JsonLdMixin):
name = '... | [
"zqian@scripps.edu"
] | zqian@scripps.edu |
d4e8e220a67ba05abe839b534b6f318d04f9c75a | 08a1e46bab043055d56ae0e8914a3045562b2ac4 | /Edmodo/searchEngine/scraping.py | 4e0cb2b86e3f46b1f5be3df1910d58775c54c4b1 | [
"BSD-3-Clause"
] | permissive | calchulus/Product-Search-Engine | 67eea389076dd2199f7d3842b9c87cd6b43e9c55 | ebf9c7bbf4e7083e25698a563f35a3d5781f794e | refs/heads/master | 2021-01-10T00:46:53.560734 | 2016-04-06T18:25:10 | 2016-04-06T18:25:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,745 | py | import json
import urllib2
import MySQLdb
from searchEngine.models import product_info
count=0
def getJSONUtil(url):
"""
This method will pull data from Edmodo api and using models push data into
'searchEngine_product_info' table.
"""
global count
data = json.load(urllib2.urlopen(url))
products=data["prod... | [
"aniket0123@gmail.com"
] | aniket0123@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.