This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A: | |
pass | |
class B(metaclass=A): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shelve | |
import multiprocessing | |
import os | |
filename = "tmp.shelve" | |
N = 4 | |
end = 10000 | |
def insert((offset, jump, end, filename)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"net/http" | |
"net/url" | |
"crypto/tls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tarcheck | |
/elsevier_tarcheck.ndj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tee plus LimitWriter. | |
// LimitWriter taken from: https://github.com/kubernetes/kubernetes/blob/579e0c74c150085b3fac01f6a33b66db96922f93/pkg/kubelet/util/ioutils/ioutils.go#L39-L70 | |
// | |
package main | |
import ( | |
"bytes" | |
"flag" | |
"io" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class dotdict(dict): | |
""" | |
A dictionary supporting dot notation. | |
""" | |
__getattr__ = dict.get | |
__setattr__ = dict.__setitem__ | |
__delattr__ = dict.__delitem__ | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Tkinter | |
from Tkinter import Frame, BOTH, Canvas | |
#By Caleb Robinson | |
class Pong(Frame): | |
player1 = 0 | |
player2 = 0 | |
ballX=50 | |
ballY=50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was drawn to programming, science, technology and science fiction | |
ever since I was a little kid. I can't say it's because I wanted to | |
make the world a better place. Not really. I was simply drawn to it | |
because I was drawn to it. Writing programs was fun. Figuring out how | |
nature works was fascinating. Science fiction felt like a grand | |
adventure. | |
Then I started a software company and poured every ounce of energy | |
into it. It failed. That hurt, but that part is ok. I made a lot of | |
mistakes and learned from them. This experience made me much, much |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix | publisher | journals | dois | |
---|---|---|---|---|
10.12679 | 0 | 0 | ||
10.7579 | 123Doc Education | 0 | 0 | |
10.3731 | 21st Century COE Program (Toplogical Science and Technology) | 1 | 40 | |
10.5775 | A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu | 1 | 80 | |
10.4037 | AACN Publishing | 2 | 766 | |
10.1306 | AAPG/Datapages | 4 | 21817 | |
10.3183 | AB Svensk Papperstidning | 1 | 1550 | |
10.5769 | ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia | 1 | 57 | |
10.7597 | ACOPIOS - Revista Iberica de Mineralogia | 1 | 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One of the fastest ways to insert bulk data into Postgres (at least, aside from COPY) is using the psycopg2 extras function execute_values. | |
# However, this doesn't return an accurate row count value - instead, it just returns the row count for the last page inserted. | |
# This wraps the execute_values function with its own pagination to return an accurate count of rows inserted. | |
# Performance is approximately equivalent to underlying execute_values function - within 5-10% or so in my brief tests. | |
import psycopg2 | |
import psycopg2.extras | |
import math | |
db_connection_string = "dbname=EDITME host=EDITME" |